System.register("chunks:///_virtual/ActionFramesItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './FrameUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Sprite, SpriteFrame, Component, FrameUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      SpriteFrame = module.SpriteFrame;
      Component = module.Component;
    }, function (module) {
      FrameUtil = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "34d231t/uJAKKkOWiG725z6", "ActionFramesItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var ActionFramesItem = exports('ActionFramesItem', (_dec = ccclass("ActionFramesItem"), _dec2 = property(Sprite), _dec3 = property([SpriteFrame]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ActionFramesItem, _Component);
        function ActionFramesItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "action", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "frames", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "frameRate", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "loop", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "autoPlay", _descriptor5, _assertThisInitialized(_this));
          _this.isPlaying = false;
          return _this;
        }
        var _proto = ActionFramesItem.prototype;
        _proto.onLoad = function onLoad() {};
        _proto.start = function start() {
          if (this.autoPlay && this.frames.length > 0) {
            this.play();
          }
        };
        _proto.play = function play() {
          var _this2 = this;
          if (this.frames.length === 0 || this.isPlaying) {
            return;
          }
          this.isPlaying = true;
          FrameUtil.play(this.action, this.frames, {
            frameRate: this.frameRate,
            loop: this.loop,
            timeScale: 1
          }, function (success) {
            _this2.isPlaying = false;
          });
        }
        /**
         *
         * @param bundleName 动画路径
         * @param name 动画文件名字
         * @param action 动画动作
         * @param callFunc 播放完成回调
         * @returns
         */;
        _proto.playWithResource = /*#__PURE__*/
        function () {
          var _playWithResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bundleName, name, action, callFunc) {
            var _this3 = this;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!this.isPlaying) {
                    _context.next = 2;
                    break;
                  }
                  return _context.abrupt("return");
                case 2:
                  this.isPlaying = true;
                  _context.prev = 3;
                  _context.next = 6;
                  return FrameUtil.getAnimationFrames({
                    bundleName: bundleName,
                    name: name,
                    action: action
                  });
                case 6:
                  this.frames = _context.sent;
                  FrameUtil.play(this.action, this.frames, {
                    frameRate: this.frameRate,
                    loop: this.loop,
                    timeScale: 1
                  }, function (success) {
                    _this3.isPlaying = false;
                    if (callFunc) {
                      callFunc();
                    }
                  });
                  _context.next = 14;
                  break;
                case 10:
                  _context.prev = 10;
                  _context.t0 = _context["catch"](3);
                  console.error("加载动画帧失败:", _context.t0);
                  this.isPlaying = false;
                case 14:
                case "end":
                  return _context.stop();
              }
            }, _callee, this, [[3, 10]]);
          }));
          function playWithResource(_x, _x2, _x3, _x4) {
            return _playWithResource.apply(this, arguments);
          }
          return playWithResource;
        }();
        _proto.stop = function stop() {
          FrameUtil.stop(this.action);
          this.isPlaying = false;
        };
        _proto.pause = function pause() {
          FrameUtil.pause(this.action);
        };
        _proto.resume = function resume() {
          FrameUtil.resume(this.action);
        };
        _proto.setFrames = function setFrames(frames) {
          this.frames = frames;
        };
        _proto.setFrameRate = function setFrameRate(rate) {
          this.frameRate = rate;
        };
        _proto.setLoop = function setLoop(loop) {
          this.loop = loop;
        };
        _proto.onDestroy = function onDestroy() {
          if (this.action) {
            this.isPlaying = false;
            FrameUtil.stop(this.action);
          }
        };
        _proto.clearAllResources = function clearAllResources() {
          FrameUtil.clearAllResources();
        };
        _proto.clearBundleResources = function clearBundleResources(bundleName) {
          FrameUtil.clearBundleResources(bundleName);
        };
        return ActionFramesItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "action", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "frames", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "frameRate", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 10;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "loop", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "autoPlay", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ActionShadow.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './env'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, CCInteger, Node, UIOpacity, Sprite, sp, Animation, instantiate, UIRenderer, isValid, Component, color, DEV;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCInteger = module.CCInteger;
      Node = module.Node;
      UIOpacity = module.UIOpacity;
      Sprite = module.Sprite;
      sp = module.sp;
      Animation = module.Animation;
      instantiate = module.instantiate;
      UIRenderer = module.UIRenderer;
      isValid = module.isValid;
      Component = module.Component;
      color = module.color;
    }, function (module) {
      DEV = module.DEV;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class2, _class3, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "6c744BX3AZH6ogmvOgCzXnX", "ActionShadow", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property,
        executeInEditMode = _decorator.executeInEditMode,
        playOnFocus = _decorator.playOnFocus,
        menu = _decorator.menu;
      var ShadowData = function ShadowData() {
        this.x = 0;
        this.y = 0;
        this.angle = 0;
        this.scaleX = 1;
        this.scaleY = 1;
        this.scale = 1;
        this.actionName = "";
        this.animationName = "";
        this.trackIndex = 0;
      };
      var ActionShadow = exports('ActionShadow', (_dec = ccclass("ActionShadow"), _dec2 = property({
        displayName: DEV,
        tooltip: DEV
      }), _dec3 = property({
        type: CCInteger,
        displayName: DEV
      }), _dec4 = property({
        type: CCInteger,
        displayName: DEV
      }), _dec5 = property({
        displayName: DEV
      }), _dec6 = property({
        min: 0,
        max: 1,
        step: 0.1,
        slide: true,
        displayName: DEV
      }), _dec7 = property({
        type: CCInteger,
        min: 0,
        max: 255,
        slide: true,
        displayName: DEV
      }), _dec(_class2 = executeInEditMode(_class2 = playOnFocus(_class2 = (_class3 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ActionShadow, _Component);
        function ActionShadow() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "_active", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "_shadowNum", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "_deltTime", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "_shadowColor", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "_shadowScale", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "_opacity", _descriptor6, _assertThisInitialized(_this));
          _this.nodeOpacity = 255;
          _this.model = null;
          _this.shadowNode = null;
          _this.shadowData = [];
          _this.isSpine = false;
          return _this;
        }
        var _proto = ActionShadow.prototype;
        _proto.start = function start() {
          var _this$node$getCompone;
          var shadowNodeName = this.node.name + "<ActionShadow>";
          this.shadowNode = this.node.parent.getChildByName(shadowNodeName);
          if (!this.shadowNode) {
            console.log("shadowNode new");
            this.shadowNode = new Node(shadowNodeName);
            this.shadowNode.addComponent(UIOpacity);
            this.shadowNode.addComponent(Sprite);
            this.shadowNode.setParent(this.node.parent);
            this.shadowNode.setSiblingIndex(this.node.getSiblingIndex());
          }
          this.nodeOpacity = (_this$node$getCompone = this.node.getComponent(UIOpacity)) == null ? void 0 : _this$node$getCompone.opacity;
          this.model = this.node.getComponent(sp.Skeleton);
          if (!this.model) {
            this.model = this.node.getComponent(Animation);
            this.isSpine = false;
          } else {
            this.isSpine = true;
          }
          this.node.updateWorldTransform();
          this.updateShadowNum();
          this.updateDeltTime();
          this.updateShadowData();
          this.updateColor();
          this.updateOpacity();
        };
        _proto.onEnable = function onEnable() {
          if (this.active && this.shadowNode) {
            this.shadowNode.active = true;
            this.shadowData.length && this.updateShadowData();
          }
        };
        _proto.onDisable = function onDisable() {
          this.shadowNode.active = false;
        };
        _proto.update = function update() {
          var _this$node$getCompone2;
          if (this.nodeOpacity !== ((_this$node$getCompone2 = this.node.getComponent(UIOpacity)) == null ? void 0 : _this$node$getCompone2.opacity)) {
            var _this$node$getCompone3;
            this.nodeOpacity = (_this$node$getCompone3 = this.node.getComponent(UIOpacity)) == null ? void 0 : _this$node$getCompone3.opacity;
            this.updateOpacity();
          }
          for (var i = this.shadowNum * this.deltTime; i > 0; --i) {
            var cur = this.shadowData[i];
            var prev = this.shadowData[i - 1];
            cur.x = prev.x;
            cur.y = prev.y;
            cur.scaleX = prev.scaleX;
            cur.scaleY = prev.scaleY;
            cur.angle = prev.angle;
            cur.actionName = prev.actionName;
            cur.animationName = prev.animationName;
            cur.trackIndex = prev.trackIndex;
          }
          var data = this.shadowData[0];
          var matrix = this.node.worldMatrix;
          data.x = matrix.m12;
          data.y = matrix.m13;
          data.scaleX = this.node.scale.x;
          data.scaleY = this.node.scale.y;
          data.angle = this.node.angle;
          if (this.model) {
            if (this.isSpine) {
              var spineModel = this.model;
              var state = spineModel.getState();
              if (state && state.tracks.length > 0) {
                var track = state.tracks[0];
                if (track && track.animation) {
                  data.animationName = track.animation.name;
                  data.trackIndex = 0;
                }
              }
            } else {
              var _defaultClip;
              data.actionName = ((_defaultClip = this.model.defaultClip) == null ? void 0 : _defaultClip.name) || "";
            }
          }
          this.shadowNode.updateWorldTransform();
          matrix = this.shadowNode.worldMatrix;
          for (var _i = this.shadowNum - 1; _i >= 0; --_i) {
            var node = this.shadowNode.children[_i];
            data = this.shadowData[this.deltTime * (_i + 1)];
            var x = data.x - matrix.m12;
            var y = data.y - matrix.m13;
            node.setPosition(x, y);
            node.setScale(data.scaleX * data.scale, data.scaleY * data.scale);
            node.angle = data.angle;
            if (this.isSpine) {
              var spineComp = node.getComponent(sp.Skeleton);
              if (spineComp && data.animationName) {
                spineComp.setAnimation(data.trackIndex, data.animationName, true);
              }
            } else {
              var animComp = node.getComponent(Animation);
              if (animComp && data.actionName) {
                animComp.play(data.actionName);
              }
            }
          }
        };
        _proto.updateShadowNum = function updateShadowNum() {
          this.shadowNode.removeAllChildren();
          this.shadowNode.destroyAllChildren();
          for (var i = 0, len = this.shadowNum; i < len; ++i) {
            var node = instantiate(this.node);
            node.name = this.node.name + i;
            var cmps = node["_components"];
            for (var j = cmps.length - 1; j >= 0; --j) {
              if (cmps[j] instanceof UIRenderer) continue;
              if (cmps[j] instanceof Animation) continue;
              if (cmps[j] instanceof sp.Skeleton) continue;
              cmps[j].destroy();
            }
            node.setParent(this.shadowNode);
          }
        };
        _proto.updateDeltTime = function updateDeltTime() {
          this.shadowData = [];
          for (var i = this.shadowNum * this.deltTime; i >= 0; --i) {
            this.shadowData[i] = new ShadowData();
          }
        };
        _proto.updateShadowData = function updateShadowData() {
          var scaleDelt = (1 - this.shadowScale) / (this.shadowNum * this.deltTime);
          var matrix = this.node.worldMatrix;
          for (var i = this.shadowNum * this.deltTime; i >= 0; --i) {
            var data = this.shadowData[i];
            data.x = matrix.m12;
            data.y = matrix.m13;
            data.scaleX = this.node.scale.x;
            data.scaleY = this.node.scale.y;
            data.scale = 1 - i * scaleDelt;
            data.angle = this.node.angle;
            if (this.model) {
              if (this.isSpine) {
                var spineModel = this.model;
                var state = spineModel.getState();
                if (state && state.tracks.length > 0) {
                  var track = state.tracks[0];
                  if (track && track.animation) {
                    data.animationName = track.animation.name;
                    data.trackIndex = 0;
                  }
                }
              } else {
                var _defaultClip2;
                data.actionName = ((_defaultClip2 = this.model.defaultClip) == null ? void 0 : _defaultClip2.name) || "";
              }
            }
          }
        };
        _proto.updateColor = function updateColor() {
          for (var index = 0; index < this.shadowNode.children.length; index++) {
            var element = this.shadowNode.children[index];
            if (this.isSpine) {
              var spineComp = element.getComponent(sp.Skeleton);
              if (spineComp) {
                spineComp.color = this.shadowColor;
              }
            } else {
              var spriteComp = element.getComponentInChildren(Sprite);
              if (spriteComp) {
                spriteComp.color = this.shadowColor;
              }
            }
          }
        };
        _proto.updateOpacity = function updateOpacity() {
          var component = this.shadowNode.getComponent(UIOpacity);
          if (component) {
            component.opacity = this.opacity;
          }
        };
        _proto.onDestroy = function onDestroy() {
          if (isValid(this.shadowNode)) {
            this.shadowNode.removeFromParent();
            this.shadowNode.destroy();
          }
        };
        _createClass(ActionShadow, [{
          key: "active",
          get: function get() {
            return this._active;
          },
          set: function set(value) {
            this._active = value;
            if (value) {
              if (this.node.active && this.shadowNode) {
                this.shadowNode.active = true;
                this.shadowData.length && this.updateShadowData();
              }
            } else {
              this.shadowNode.active = false;
            }
          }
        }, {
          key: "shadowNum",
          get: function get() {
            return this._shadowNum;
          },
          set: function set(value) {
            this._shadowNum = Math.max(value, 0);
            this.updateShadowNum();
            this.updateDeltTime();
            this.updateShadowData();
            this.updateColor();
          }
        }, {
          key: "deltTime",
          get: function get() {
            return this._deltTime;
          },
          set: function set(value) {
            this._deltTime = Math.max(value, 1);
            this.updateDeltTime();
            this.updateShadowData();
          }
        }, {
          key: "shadowColor",
          get: function get() {
            return this._shadowColor;
          },
          set: function set(value) {
            this._shadowColor = value;
            this.updateColor();
          }
        }, {
          key: "shadowScale",
          get: function get() {
            return this._shadowScale;
          },
          set: function set(value) {
            this._shadowScale = value;
            this.updateShadowData();
          }
        }, {
          key: "opacity",
          get: function get() {
            return this._opacity;
          },
          set: function set(value) {
            this._opacity = value;
            this.updateOpacity();
          }
        }]);
        return ActionShadow;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class3.prototype, "_active", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      }), _applyDecoratedDescriptor(_class3.prototype, "active", [_dec2], Object.getOwnPropertyDescriptor(_class3.prototype, "active"), _class3.prototype), _descriptor2 = _applyDecoratedDescriptor(_class3.prototype, "_shadowNum", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 5;
        }
      }), _applyDecoratedDescriptor(_class3.prototype, "shadowNum", [_dec3], Object.getOwnPropertyDescriptor(_class3.prototype, "shadowNum"), _class3.prototype), _descriptor3 = _applyDecoratedDescriptor(_class3.prototype, "_deltTime", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 4;
        }
      }), _applyDecoratedDescriptor(_class3.prototype, "deltTime", [_dec4], Object.getOwnPropertyDescriptor(_class3.prototype, "deltTime"), _class3.prototype), _descriptor4 = _applyDecoratedDescriptor(_class3.prototype, "_shadowColor", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return color(255, 255, 255);
        }
      }), _applyDecoratedDescriptor(_class3.prototype, "shadowColor", [_dec5], Object.getOwnPropertyDescriptor(_class3.prototype, "shadowColor"), _class3.prototype), _descriptor5 = _applyDecoratedDescriptor(_class3.prototype, "_shadowScale", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0.1;
        }
      }), _applyDecoratedDescriptor(_class3.prototype, "shadowScale", [_dec6], Object.getOwnPropertyDescriptor(_class3.prototype, "shadowScale"), _class3.prototype), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, "_opacity", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 100;
        }
      }), _applyDecoratedDescriptor(_class3.prototype, "opacity", [_dec7], Object.getOwnPropertyDescriptor(_class3.prototype, "opacity"), _class3.prototype)), _class3)) || _class2) || _class2) || _class2));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ADMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './MonitorType.ts', './DBRecord.ts', './Prompt.ts', './UtilGame.ts'], function (exports) {
  var _createClass, cclegacy, App, MonitorType, DBRecord, Prompt, UtilGame;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      cclegacy._RF.push({}, "d4402PtJ6hBHZQI8/oohsdn", "ADMgr", undefined);
      var ADMgr = exports('ADMgr', /*#__PURE__*/function () {
        function ADMgr() {
          //------------------------------------------------------------         声明变量         --------------------------------------------------------------------------------------------
          this.cur_guanka_cnt_ad = 0;
          //  今日看广告双倍关卡结算奖励领取当前次数
          this._total_guanka_cnt_ad = 0;
          this.cur_xybx_cnt_ad = 0;
          //  今日看广告双倍关卡结算奖励领取当前次数
          this._total_xybx_cnt_ad = 0;
          this.xybx_cnt_ad = 0;
        }
        var _proto = ADMgr.prototype;
        //  今日看广告领取幸运宝箱次数
        //-------------------------------------------------------------         初始化         --------------------------------------------------------------------------------------------
        _proto.init = function init() {
          App.monitorMgr.addEventListener(MonitorType.web_ad_140001, this.sc_watch_ad_140001, this);
          App.monitorMgr.addEventListener(MonitorType.web_ad_146001, this.sc_get_ad_times_146001, this);
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.removeEventListener(MonitorType.web_ad_140001, this.sc_watch_ad_140001, this);
          App.monitorMgr.removeEventListener(MonitorType.web_ad_146001, this.sc_get_ad_times_146001, this);
        }

        //---------------------------------------------------------         华丽分割线(协议部分)         --------------------------------------------------------------------------------------------
        /**
         * 获取广告次数
         */;
        _proto.sc_get_ad_times_146001 = function sc_get_ad_times_146001(obj) {
          console.log("广告 sc_get_ad_times_146001", obj);
          this.cur_guanka_cnt_ad = obj.guanka_cnt_ad;
          this.xybx_cnt_ad = obj.guanka_cnt_ad;
          this.cur_xybx_cnt_ad = obj.xybx_cnt_ad;
        };
        _proto.sc_watch_ad_140001 = function sc_watch_ad_140001(obj) {
          console.log("广告 sc_watch_ad_140001", obj);
          if (obj.err_code === 0) {
            this.cur_guanka_cnt_ad = obj.guanka_cnt_ad;
            var vAward = App.bagMgr.rplOpsrcLoc(12811, obj.item_list);
            App.bagMgr.sortAward(vAward);
            // let isAutoJump = App.autoFightManager.isAutoJumpRunning() && App.autoFightManager.sendWebAd140001;
            var isAutoJump = false;
            UtilGame.showCommonAward(vAward, function () {
              console.warn(">>>>>>>>>> AutoFight sc_watch_ad_140001 isAutoJump", isAutoJump);
              if (!isAutoJump) {
                App.battleMgr.onExit(null, function () {
                  // App.bagMgr.auto_decompose_equip(); //自动分解装备
                });
              }
            });
          } else {
            Prompt.popTip("双倍视频错误, error code is :" + obj.err_code);
          }
        };
        _createClass(ADMgr, [{
          key: "total_guanka_cnt_ad",
          get:
          //  今日看广告双倍关卡结算奖励领取总次数
          function get() {
            return Number(DBRecord.fetchId("ShuoMingQuanJu", 1001).value);
          }
        }, {
          key: "total_xybx_cnt_ad",
          get:
          //  今日看广告双倍关卡结算奖励领取总次数
          function get() {
            return Number(DBRecord.fetchId("ShuoMingQuanJu", 1000).value);
          }
        }]);
        return ADMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/AdsorptionBullet.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletBase.ts', './BattleDefine.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, game, Vec3, v3, BulletBase, GameBattle, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      game = module.game;
      Vec3 = module.Vec3;
      v3 = module.v3;
    }, function (module) {
      BulletBase = module.BulletBase;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "b1b2eJ9CalIw6f4LGzB+/rJ", "AdsorptionBullet", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      /**
       * 吸附子弹
       */
      var AdsorptionBullet = exports('AdsorptionBullet', (_dec = ccclass("AdsorptionBullet"), _dec(_class = /*#__PURE__*/function (_BulletBase) {
        _inheritsLoose(AdsorptionBullet, _BulletBase);
        function AdsorptionBullet() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BulletBase.call.apply(_BulletBase, [this].concat(args)) || this;
          // 吸附作用目标
          _this.targets = [];
          /**
           * 吸附强度
           */
          _this.attractionStrength = 0;
          /**
           * 吸附半径
           */
          _this.crashRadius = 0;
          /**
           * 检测帧率
           */
          _this.frameCounter = 0;
          _this.tempVector = new Vec3(0.01, 0.01, 0);
          // 方向
          _this.tempDirection = new Vec3();
          // 偏移
          _this.tempOffset = new Vec3();
          // 位置
          _this.tempPos = new Vec3();
          return _this;
        }
        var _proto = AdsorptionBullet.prototype;
        _proto.init = function init() {
          _BulletBase.prototype.init.call(this);
          this._type = GameBattle.BulletType.Adsorption;
        };
        _proto.reuse = function reuse() {
          _BulletBase.prototype.reuse.call(this);
        };
        _proto.recovery = function recovery() {
          this.targets = [];
          _BulletBase.prototype.recovery.call(this);
        };
        _proto.launch = function launch(bulletLauncherData) {
          _BulletBase.prototype.launch.call(this, bulletLauncherData);
          this.crashRadius = this.bulletVO.crash_box[0] * this.bulletVO.volume;
          this.attractionStrength = this.bulletVO.type_param[0] / Number(game.frameRate);
          // this.attractionStrength = 50 / Number(game.frameRate); // 测试吸力
        };

        _proto.getTargets = function getTargets() {
          var _this2 = this;
          this.targets = [];
          App.battleMgr.roleCtrl.foreachEntity(this, function (v) {
            if (!_this2.checkTargetType(v)) return false;
            if (v.immuneDrag()) return false;
            var distance = Vec3.distance(_this2.node.worldPosition, v.node.worldPosition);
            if (distance <= _this2.crashRadius) {
              _this2.targets.push(v);
            }
            return false;
          });
          return this.targets;
        };
        _proto.onUpdate = function onUpdate(dt) {
          var _this3 = this;
          _BulletBase.prototype.onUpdate.call(this, dt);
          this.frameCounter++;
          if (this.frameCounter >= 5) {
            this.frameCounter = 0;
            this.getTargets();
          }
          this.targets.forEach(function (target) {
            Vec3.subtract(_this3.tempDirection, _this3.node.worldPosition, target.node.worldPosition);
            Vec3.normalize(_this3.tempDirection, _this3.tempDirection);
            if (_this3.tempDirection.x === 0 && _this3.tempDirection.y === 0) return;
            Vec3.multiplyScalar(_this3.tempOffset, _this3.tempDirection, _this3.attractionStrength);
            if (Vec3.distance(target.node.worldPosition, _this3.node.worldPosition) < _this3.tempOffset.length()) {
              return;
            }
            Vec3.copy(_this3.tempPos, target.node.worldPosition);
            var isBoss = target.isBoss();
            var flag = isBoss;
            var x = _this3.tempOffset.x;
            var y = _this3.tempOffset.y;
            if (!App.mapMgr.checkCanMove(v3(_this3.tempPos.x + x, _this3.tempPos.y + y, 0), flag)) {
              if (App.mapMgr.checkCanMove(v3(_this3.tempPos.x + x, _this3.tempPos.y, 0), flag)) {
                y = 0;
              } else if (App.mapMgr.checkCanMove(v3(_this3.tempPos.x, _this3.tempPos.y + y, 0), flag)) {
                x = 0;
              } else {
                x = 0;
                y = 0;
              }
            }
            _this3.tempPos.x += x;
            _this3.tempPos.y += y;
            target.node.worldPosition = _this3.tempPos;
            target.moveDirection.set(_this3.tempVector);
          });
        };
        return AdsorptionBullet;
      }(BulletBase)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/AIFollow.ts", ['cc', './Monster.ts', './AxingManager.ts', './App.ts', './BaseAi.ts'], function (exports) {
  var cclegacy, Monster, FindPathDeepType, App, AI_BEHAVIOR;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      FindPathDeepType = module.FindPathDeepType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      AI_BEHAVIOR = module.AI_BEHAVIOR;
    }],
    execute: function () {
      cclegacy._RF.push({}, "9d9f5mHqrpLpIlXji/HOgYE", "AIFollow", undefined);

      /**
       * 跟随AI
       */
      var AIFollow = exports('AIFollow', /*#__PURE__*/function () {
        function AIFollow() {
          /** 跟随目标 */
          this.followTarget = void 0;
          /** 跟随者 */
          this._owner = void 0;
          /** 跟随距离 */
          this.followDistanceX = 150;
          this.followDistanceY = 80;
          /**跟随时忽略目标：宠物（没有追击、普攻，优先跟随） */
          this.ignoreTarget = false;
        }
        var _proto = AIFollow.prototype;
        /**
         * 设置跟随距离
         * @param disX
         * @param disY
         */
        _proto.setFollowDistance = function setFollowDistance(disX, disY) {
          this.followDistanceX = disX;
          this.followDistanceY = disY;
        }

        /**
         * 检查跟随
         * @returns
         */;
        _proto.checkFollow = function checkFollow() {
          if (!this.followTarget) {
            return false;
          }
          var target = this._owner.lockTargetCtrl.target;
          if (target && target.node.active && target.checkValid) {
            if (!this.ignoreTarget) {
              return false;
            }
          }
          if (this._owner.atkSkill.checkRange()) {
            return false;
          }
          var distanceX = this.followTarget.node.worldPosition.x - this._owner.node.worldPosition.x;
          var distanceY = this.followTarget.node.worldPosition.y - this._owner.node.worldPosition.y;
          var disX = this.followDistanceX;
          var disY = this.followDistanceY;
          var behavior = this._owner instanceof Monster ? this._owner._monsterAI._curBehavior : null;
          if (behavior !== null && behavior !== AI_BEHAVIOR.GENSUI) {
            disX += 25;
            disY += 25;
          }
          if (Math.abs(distanceX) > disX || Math.abs(distanceY) > disY) {
            return true;
          }
          return false;
        }

        /**
         * 执行跟随
         */;
        _proto.doFollow = function doFollow() {
          if (this.followTarget) {
            var pos = App.mapMgr.getMoveVector(this._owner.node.worldPosition, this.followTarget.node.worldPosition, true, FindPathDeepType.Boss);
            if (pos.x === 0 && pos.y === 0) {
              this._owner.exitMove();
              return;
            }
            this._owner.move(pos);
          }
        };
        return AIFollow;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Animal.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './MoneyTips.ts', './ActionFramesItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Component, ModuleDef, MoneyTips, ActionFramesItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MoneyTips = module.MoneyTips;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "6a7b82Q6rFJ7JXdSket3fLP", "Animal", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Animal = exports('Animal', (_dec = ccclass("Animal"), _dec2 = property(ActionFramesItem), _dec3 = property({
        type: MoneyTips
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(Animal, _Component);
        function Animal() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "actionFrames", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "moneyTips", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Animal.prototype;
        _proto.show = function show(animalType, rewards) {
          var _this2 = this;
          this.node.active = true;
          // let resNaqme = "";
          // if (animalType === AnimalType.CHICKEN) {
          //     resNaqme = "npc_1001";
          // } else if (animalType === AnimalType.DUCK) {
          //     resNaqme = "npc_1001";
          // } else if (animalType === AnimalType.GOOSE) {
          //     resNaqme = "npc_1001";
          // }
          this.actionFrames.playWithResource(ModuleDef.NPC, "npc_xiaoji", "Idle", function () {
            _this2.shuoMoneyTip(rewards[0]);
          });
        }

        /**
         * 展示金币
         * @param money
         */;
        _proto.shuoMoneyTip = function shuoMoneyTip(itemArr) {
          if (itemArr && itemArr.length > 0) {
            this.moneyTips.shuoMoneyTip(itemArr[0], itemArr[1]);
          }
        };
        _proto.hide = function hide() {
          this.node.active = false;
        };
        return Animal;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "actionFrames", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "moneyTips", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/AnimationResourceManager.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, assetManager, SpriteFrame, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      assetManager = module.assetManager;
      SpriteFrame = module.SpriteFrame;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "e84f3L++VxEfKInaTYa8Oam", "AnimationResourceManager", undefined);
      var ccclass = _decorator.ccclass;

      // 动画资源键

      // 帧回调接口

      // 动画配置

      var AnimationResourceManager = exports('AnimationResourceManager', (_dec = ccclass("AnimationResourceManager"), _dec(_class = (_class2 = /*#__PURE__*/function () {
        function AnimationResourceManager() {
          // 资源缓存池
          this.resourcePool = new Map();
          // 加载中的资源
          this.loadingResources = new Map();
          // Bundle 缓存
          this.bundleCache = new Map();
        }
        AnimationResourceManager.getInstance = function getInstance() {
          if (!this.instance) {
            this.instance = new AnimationResourceManager();
          }
          return this.instance;
        }

        /**
         * 获取Bundle
         * @param bundleName Bundle文件夹名称
         * @returns Bundle
         */;
        var _proto = AnimationResourceManager.prototype;
        _proto.asyncGetBundle = /*#__PURE__*/
        function () {
          var _asyncGetBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bundleName, _cb) {
            var _this = this;
            var bundle;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  bundle = assetManager.getBundle(bundleName);
                  if (!bundle) {
                    _context.next = 4;
                    break;
                  }
                  this.bundleCache.set(bundleName, bundle);
                  return _context.abrupt("return", bundle);
                case 4:
                  App.log.logBusiness("Bundle文件夹名称: " + bundleName);
                  return _context.abrupt("return", new Promise(function (resolve) {
                    assetManager.loadBundle(bundleName, null, function (err, loadedBundle) {
                      console.log("------module:<" + bundleName + ">loaded.---sub_ui");
                      if (err) {
                        console.log(err);
                        resolve(null);
                      } else {
                        _this.bundleCache.set(bundleName, loadedBundle);
                        resolve(loadedBundle);
                        _cb == null || _cb();
                      }
                    });
                  }));
                case 6:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function asyncGetBundle(_x, _x2) {
            return _asyncGetBundle.apply(this, arguments);
          }
          return asyncGetBundle;
        }()
        /**
         * 预加载多个角色资源
         */;

        _proto.preloadBattleResources = /*#__PURE__*/
        function () {
          var _preloadBattleResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resourceList, _cb) {
            var _this2 = this;
            var bundleNames, bundlePromises, bundles, failedBundles, loadPromises, _iterator, _step, resource, _loop, _iterator2, _step2;
            return _regeneratorRuntime().wrap(function _callee2$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  // 先预加载所有需要的 Bundle
                  bundleNames = [].concat(new Set(resourceList.map(function (resource) {
                    return resource.bundle;
                  })));
                  bundlePromises = bundleNames.map(function (bundleName) {
                    return _this2.asyncGetBundle(bundleName, _cb);
                  });
                  _context3.prev = 2;
                  _context3.next = 5;
                  return Promise.all(bundlePromises);
                case 5:
                  bundles = _context3.sent;
                  failedBundles = bundles.filter(function (bundle) {
                    return bundle === null;
                  });
                  if (!(failedBundles.length > 0)) {
                    _context3.next = 10;
                    break;
                  }
                  console.error("Some bundles failed to load");
                  return _context3.abrupt("return", false);
                case 10:
                  // 加载所有动画资源
                  loadPromises = [];
                  _iterator = _createForOfIteratorHelperLoose(resourceList);
                case 12:
                  if ((_step = _iterator()).done) {
                    _context3.next = 24;
                    break;
                  }
                  resource = _step.value;
                  _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
                    var action, animationKey, loadPromise;
                    return _regeneratorRuntime().wrap(function _loop$(_context2) {
                      while (1) switch (_context2.prev = _context2.next) {
                        case 0:
                          action = _step2.value;
                          animationKey = _this2.getAnimationKey(resource.bundle, resource.name, action); // 如果已经加载或正在加载，跳过
                          if (!(_this2.resourcePool.has(animationKey) || _this2.loadingResources.has(animationKey))) {
                            _context2.next = 4;
                            break;
                          }
                          return _context2.abrupt("return", 1);
                        case 4:
                          loadPromise = _this2.loadAnimationFramesFromBundle(resource.bundle, resource.name, action).then(function (frames) {
                            _this2.resourcePool.set(animationKey, frames);
                            _this2.loadingResources["delete"](animationKey);
                          })["catch"](function (error) {
                            console.error("Failed to preload: " + animationKey, error);
                            _this2.loadingResources["delete"](animationKey);
                          });
                          _this2.loadingResources.set(animationKey, loadPromise);
                          loadPromises.push(loadPromise);
                        case 7:
                        case "end":
                          return _context2.stop();
                      }
                    }, _loop);
                  });
                  _iterator2 = _createForOfIteratorHelperLoose(resource.actions);
                case 16:
                  if ((_step2 = _iterator2()).done) {
                    _context3.next = 22;
                    break;
                  }
                  return _context3.delegateYield(_loop(), "t0", 18);
                case 18:
                  if (!_context3.t0) {
                    _context3.next = 20;
                    break;
                  }
                  return _context3.abrupt("continue", 20);
                case 20:
                  _context3.next = 16;
                  break;
                case 22:
                  _context3.next = 12;
                  break;
                case 24:
                  _context3.next = 26;
                  return Promise.all(loadPromises);
                case 26:
                  console.log("All battle resources preloaded successfully");
                  return _context3.abrupt("return", true);
                case 30:
                  _context3.prev = 30;
                  _context3.t1 = _context3["catch"](2);
                  console.error("Failed to preload battle resources", _context3.t1);
                  return _context3.abrupt("return", false);
                case 34:
                case "end":
                  return _context3.stop();
              }
            }, _callee2, null, [[2, 30]]);
          }));
          function preloadBattleResources(_x3, _x4) {
            return _preloadBattleResources.apply(this, arguments);
          }
          return preloadBattleResources;
        }()
        /**
         * 从 Bundle 加载动画帧
         */;

        _proto.loadAnimationFramesFromBundle = /*#__PURE__*/
        function () {
          var _loadAnimationFramesFromBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(bundleName, name, action) {
            var _this3 = this;
            var bundle, path;
            return _regeneratorRuntime().wrap(function _callee3$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  _context4.next = 2;
                  return this.asyncGetBundle(bundleName);
                case 2:
                  bundle = _context4.sent;
                  if (bundle) {
                    _context4.next = 5;
                    break;
                  }
                  throw new Error("Bundle not found: " + bundleName);
                case 5:
                  path = name + "/" + action;
                  return _context4.abrupt("return", new Promise(function (resolve, reject) {
                    bundle.loadDir(path, SpriteFrame, function (err, assets) {
                      if (err) {
                        reject(err);
                        return;
                      }
                      if (assets.length === 0) {
                        reject(new Error("No frames found at path: " + path));
                        return;
                      }
                      var frames = _this3.sortFrames(assets);
                      resolve(frames);
                    });
                  }));
                case 7:
                case "end":
                  return _context4.stop();
              }
            }, _callee3, this);
          }));
          function loadAnimationFramesFromBundle(_x5, _x6, _x7) {
            return _loadAnimationFramesFromBundle.apply(this, arguments);
          }
          return loadAnimationFramesFromBundle;
        }()
        /**
         * 获取动画帧
         */;

        _proto.getAnimationFrames = /*#__PURE__*/
        function () {
          var _getAnimationFrames = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(bundleName, name, action) {
            var animationKey, frames;
            return _regeneratorRuntime().wrap(function _callee4$(_context5) {
              while (1) switch (_context5.prev = _context5.next) {
                case 0:
                  animationKey = this.getAnimationKey(bundleName, name, action); // 从缓存中获取
                  if (!this.resourcePool.has(animationKey)) {
                    _context5.next = 3;
                    break;
                  }
                  return _context5.abrupt("return", this.resourcePool.get(animationKey));
                case 3:
                  if (!this.loadingResources.has(animationKey)) {
                    _context5.next = 7;
                    break;
                  }
                  _context5.next = 6;
                  return this.loadingResources.get(animationKey);
                case 6:
                  return _context5.abrupt("return", _context5.sent);
                case 7:
                  _context5.next = 9;
                  return this.loadAnimationFramesFromBundle(bundleName, name, action);
                case 9:
                  frames = _context5.sent;
                  this.resourcePool.set(animationKey, frames);
                  return _context5.abrupt("return", frames);
                case 12:
                case "end":
                  return _context5.stop();
              }
            }, _callee4, this);
          }));
          function getAnimationFrames(_x8, _x9, _x10) {
            return _getAnimationFrames.apply(this, arguments);
          }
          return getAnimationFrames;
        }()
        /**
         * 对帧进行排序并调整偏移（模拟锚点 y=0 的效果）
         */;

        _proto.sortFrames = function sortFrames(frames) {
          var sortedFrames = frames.sort(function (a, b) {
            var getFrameNumber = function getFrameNumber(name) {
              var match = name.match(/(\d+)$/);
              return match ? parseInt(match[1]) : 0;
            };
            var numA = getFrameNumber(a.name || "");
            var numB = getFrameNumber(b.name || "");
            return numA - numB;
          });

          // 找到所有帧中的最大高度
          var maxHeight = 0;
          sortedFrames.forEach(function (frame) {
            if (frame && frame.rect) {
              maxHeight = Math.max(maxHeight, frame.rect.height);
            }
          });

          // 使用统一的最大高度调整所有帧的偏移，使其底部对齐
          // 这样可以避免不同高度的帧导致的上下偏移
          sortedFrames.forEach(function (frame) {
            if (frame && frame.rect) {
              // 计算当前帧与最大高度的差值
              var heightDiff = maxHeight - frame.rect.height;
              // 调整offset.y，使所有帧底部对齐
              // offset.y 正值向上偏移，所以需要向上偏移差值的一半
              frame.offset.y = heightDiff / 2;
            }
          });
          return sortedFrames;
        }

        /**
         * 生成动画键
         */;
        _proto.getAnimationKey = function getAnimationKey(bundleName, name, action) {
          return bundleName + "/" + name + "/" + action;
        }

        /**
         * 检查资源是否已加载
         */;
        _proto.isResourceLoaded = function isResourceLoaded(bundleName, name, action) {
          var animationKey = this.getAnimationKey(bundleName, name, action);
          return this.resourcePool.has(animationKey);
        }

        /**
         * 清理指定 Bundle 的资源
         */;
        _proto.clearBundleResources = function clearBundleResources(bundleName) {
          var _this4 = this;
          var keysToDelete = [];
          for (var _iterator3 = _createForOfIteratorHelperLoose(this.resourcePool.keys()), _step3; !(_step3 = _iterator3()).done;) {
            var key = _step3.value;
            if (key.startsWith(bundleName + "/")) {
              keysToDelete.push(key);
            }
          }
          keysToDelete.forEach(function (key) {
            _this4.resourcePool["delete"](key);
            _this4.loadingResources["delete"](key);
          });
          this.bundleCache["delete"](bundleName);
          var bundle = this.bundleCache.get(bundleName);
          if (bundle) {
            assetManager.removeBundle(bundle);
          }
        }

        /**
         * 清理所有资源
         */;
        _proto.clearAllResources = function clearAllResources() {
          this.resourcePool.clear();
          this.loadingResources.clear();
          this.bundleCache.clear();
        }

        /**
         * 获取所有已加载的资源键
         */;
        _proto.getLoadedResourceKeys = function getLoadedResourceKeys() {
          return Array.from(this.resourcePool.keys());
        };
        return AnimationResourceManager;
      }(), _class2.instance = null, _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/App.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorMgr.ts', './ResMgr.ts', './NodePoolMgr.ts', './RoleMgr.ts', './LoginMgr.ts', './RedPointMgr.ts', './EmailMgr.ts', './SoundMgr.ts', './SaveDataMgr.ts', './ChatMgr.ts', './MixMgr.ts', './BattleProprMgr.ts', './LanguageMgr.ts', './MapMgr.ts', './SpineMgr.ts', './SkillMgr.ts', './PlatformMgr.ts', './BagMgr.ts', './LockMgr.ts', './ADMgr.ts', './GameStateMgr.ts', './ScheduleMgr.ts', './BroadcastMgr.ts', './GameShareMgr.ts', './SubscribeMgr.ts', './NetChannelMgr.ts', './UIMgr.ts', './Logger.ts', './BattleNewMgr.ts', './DungeonBattleMgr.ts', './AnimationResourceManager.ts', './PlaceGameMgr.ts', './TeamMgr.ts', './EventType.ts', './SingletonRegistry.ts', './GameBoot.ts'], function (exports) {
  var _createClass, cclegacy, MonitorMgr, ResMgr, NodePoolMgr, RoleMgr, LoginMgr, RedPointMgr, EmailMgr, SoundMgr, SaveDataMgr, ChatMgr, MixMgr, BattleProprMgr, LanguageMgr, MapMgr, SpineMgr, SkillMgr, PlatformMgr, BagMgr, LockMgr, ADMgr, GameStateMgr, ScheduleMgr, BroadcastMgr, GameShareMgr, SubscribeMgr, netChannel, UIMgr, Logger, BattleNewMgr, DungeonBattleMgr, AnimationResourceManager, PlaceGameMgr, TeamMgr, EventType, singletonRegistry, GameBoot;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorMgr = module.MonitorMgr;
    }, function (module) {
      ResMgr = module.ResMgr;
    }, function (module) {
      NodePoolMgr = module.NodePoolMgr;
    }, function (module) {
      RoleMgr = module.RoleMgr;
    }, function (module) {
      LoginMgr = module.LoginMgr;
    }, function (module) {
      RedPointMgr = module.RedPointMgr;
    }, function (module) {
      EmailMgr = module.EmailMgr;
    }, function (module) {
      SoundMgr = module.SoundMgr;
    }, function (module) {
      SaveDataMgr = module.SaveDataMgr;
    }, function (module) {
      ChatMgr = module.ChatMgr;
    }, function (module) {
      MixMgr = module.MixMgr;
    }, function (module) {
      BattleProprMgr = module.BattleProprMgr;
    }, function (module) {
      LanguageMgr = module.LanguageMgr;
    }, function (module) {
      MapMgr = module.MapMgr;
    }, function (module) {
      SpineMgr = module.SpineMgr;
    }, function (module) {
      SkillMgr = module.SkillMgr;
    }, function (module) {
      PlatformMgr = module.PlatformMgr;
    }, function (module) {
      BagMgr = module.BagMgr;
    }, function (module) {
      LockMgr = module.LockMgr;
    }, function (module) {
      ADMgr = module.ADMgr;
    }, function (module) {
      GameStateMgr = module.GameStateMgr;
    }, function (module) {
      ScheduleMgr = module.ScheduleMgr;
    }, function (module) {
      BroadcastMgr = module.BroadcastMgr;
    }, function (module) {
      GameShareMgr = module.GameShareMgr;
    }, function (module) {
      SubscribeMgr = module.SubscribeMgr;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      UIMgr = module.UIMgr;
    }, function (module) {
      Logger = module.Logger;
    }, function (module) {
      BattleNewMgr = module.BattleNewMgr;
    }, function (module) {
      DungeonBattleMgr = module.DungeonBattleMgr;
    }, function (module) {
      AnimationResourceManager = module.AnimationResourceManager;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      singletonRegistry = module.singletonRegistry;
    }, function (module) {
      GameBoot = module.GameBoot;
    }],
    execute: function () {
      cclegacy._RF.push({}, "614f0eHfj5FmKdZhQkRakCI", "App", undefined);
      var App = exports('App', /*#__PURE__*/function () {
        function App() {}
        /** 启动 */
        App.launch = function launch(boot) {
          if (!this.boot && boot) {
            this.boot = boot;
          }
          this.initBaseManagers();
          this.initModuleManagers();
        }

        /**
         * 初始化基础管理器
         * @param boot
         */;
        App.initBaseManagers = function initBaseManagers() {
          var _this$resMgr, _this$soundMgr, _this$scheduleMgr, _this$monitorMgr, _this$nodePoolMgr, _this$saveDataMgr, _this$languageMgr, _this$platformMgr;
          this.log.resetTags();
          (_this$resMgr = this.resMgr) == null || _this$resMgr.init(); // 资源管理
          (_this$soundMgr = this.soundMgr) == null || _this$soundMgr.init(this.boot); // 音乐管理
          (_this$scheduleMgr = this.scheduleMgr) == null || _this$scheduleMgr.init(); // 全局schedule管理类
          (_this$monitorMgr = this.monitorMgr) == null || _this$monitorMgr.init(); // 事件系统
          (_this$nodePoolMgr = this.nodePoolMgr) == null || _this$nodePoolMgr.init(); // 节点池管理
          (_this$saveDataMgr = this.saveDataMgr) == null || _this$saveDataMgr.init(); // 存储管理
          (_this$languageMgr = this.languageMgr) == null || _this$languageMgr.init(); // 多语言
          (_this$platformMgr = this.platformMgr) == null || _this$platformMgr.init(); // 广告相关
          this.spineMgr.init(); // 骨骼管理
        }

        /**
         * 初始化模块管理器
         * @param boot
         */;
        App.initModuleManagers = function initModuleManagers() {
          this.loginMgr.init(); // 区服管理
          this.redPointMgr.init(); // 红点管理
          this.roleMgr.init(); // 角色管理
          this.emailMgr.init(); // 邮件管理
          this.chatMgr.init(); // 聊天管理
          this.battleMgr.init(); // 战斗管理
          this.dungeonBattleMgr.initPool();
          this.battleProprMgr.init(); // 属性系统
          this.skillMgr.init(); // 技能系统
          this.bagMgr.init(); // 背包管理
          this.adMgr.init(); // 广告相关
          this.lockMgr.init(); // 解锁条件检测
          this.gameStateMgr.init(); // 游戏状态
          this.broadcastMgr.init(); // 广播
          this.gameShareMgr.init(); // 微信分享
          this.subscribeMgr.init(); // 微信订阅
          this.mapMgr.init(); // 地图管理
          this.mixMgr.init(); // 杂项管理

          PlaceGameMgr.inst.init();
          TeamMgr.inst.init();
        }

        /** 重置 */;
        App.dispose = function dispose() {
          this.monitorMgr.dispose(); // 事件系统
          this.loginMgr.dispose(); // 区服管理
          this.redPointMgr.dispose(); // 红点管理
          this.emailMgr.dispose(); // 邮件管理
          this.chatMgr.dispose(); // 聊天管理
          this.battleMgr.dispose(); // 战斗管理
          this.dungeonBattleMgr.dispose();
          this.resourceManager.clearAllResources();
          this.skillMgr.dispose(); // 技能系统
          this.battleProprMgr.dispose(); // 属性系统
          this.roleMgr.dispose(); // 角色管理
          this.bagMgr.dispose(); // 背包管理
          this.platformMgr.dispose(); // 广告相关
          this.adMgr.dispose(); // 广告相关
          this.lockMgr.dispose(); // 解锁条件检测
          this.gameStateMgr.dispose(); // 游戏状态
          this.scheduleMgr.dispose(); // 全局schedule管理类
          this.broadcastMgr.dispose(); // 广播
          this.gameShareMgr.dispose(); // 微信分享
          this.subscribeMgr.dispose(); // 微信订阅
          this.mapMgr.dispose(); // 地图管理

          // 清理资源
          this._monitorMgr = null;
          this._resMgr = null;
          this._nodePoolMgr = null;
          this._roleMgr = null;
          this._battleMgr = null;
          this._dungeonBattleMgr = null;
          this._loginMgr = null;
          this._redPointMgr = null;
          this._saveDataMgr = null;
          this._soundMgr = null;
          this._emailMgr = null;
          this._chatMgr = null;
          this._mixMgr = null;
          this._spineMgr = null;
          this._mapMgr = null;
          this._languageMgr = null;
          this._battleProprMgr = null;
          this._skillMgr = null;
          this._bagMgr = null;
          this._platformMgr = null;
          this._lockMgr = null;
          this._adMgr = null;
          this._gameStateMgr = null;
          this._scheduleMgr = null;
          this._broadcastMgr = null;
          this._gameShareMgr = null;
          this._subscribeMgr = null;
          PlaceGameMgr.inst.dispose();
          TeamMgr.inst.dispose();
        };
        App.update = function update(dt) {
          this.monitorMgr.dispatchEvent(EventType.manager_to_view_update, dt);
        }

        //------------------------------------------------------
        //other
        ;

        App.goToLoginMain = function goToLoginMain() {
          if (App.battleMgr.isInBattle()) {
            App.battleMgr.onExit(0, undefined, false);
          }
          netChannel.gameClose();
          this.dispose();
          netChannel.game.rejectReconnect(); //拒绝重新连接
          this.launch();
          UIMgr.inst.closeAllPanel();
          GameBoot.Instance.gotoGame();
          // 添加延迟确保UI系统完全初始化
          // setTimeout(() => {
          //     GameBoot.Instance.gotoGame();
          // }, 1000);
        }

        /**
         * 退出程序
         */;
        App.exitApp = function exitApp() {
          console.log("App exitApp");
        }

        /** 重新回到游戏 */;
        App.reloadApp = function reloadApp() {
          console.log("App reloadApp");
        };
        _createClass(App, null, [{
          key: "log",
          get:
          //微信订阅

          function get() {
            return this._log || (this._log = new Logger());
          }
        }, {
          key: "monitorMgr",
          get: function get() {
            return this._monitorMgr || (this._monitorMgr = new MonitorMgr());
          }
        }, {
          key: "resMgr",
          get: function get() {
            return this._resMgr || (this._resMgr = new ResMgr());
          }
        }, {
          key: "nodePoolMgr",
          get: function get() {
            return this._nodePoolMgr || (this._nodePoolMgr = new NodePoolMgr());
          }
        }, {
          key: "roleMgr",
          get: function get() {
            return this._roleMgr || (this._roleMgr = new RoleMgr());
          }
        }, {
          key: "battleMgr",
          get: function get() {
            return this._battleMgr || (this._battleMgr = new BattleNewMgr());
          }
        }, {
          key: "dungeonBattleMgr",
          get: function get() {
            return this._dungeonBattleMgr || DungeonBattleMgr.getInstance();
          }
        }, {
          key: "resourceManager",
          get: function get() {
            return this._resourceManager || AnimationResourceManager.getInstance();
          }
        }, {
          key: "loginMgr",
          get: function get() {
            return this._loginMgr || (this._loginMgr = new LoginMgr());
          }
        }, {
          key: "redPointMgr",
          get: function get() {
            return this._redPointMgr || (this._redPointMgr = new RedPointMgr());
          }
        }, {
          key: "saveDataMgr",
          get: function get() {
            return this._saveDataMgr || (this._saveDataMgr = new SaveDataMgr());
          }
        }, {
          key: "soundMgr",
          get: function get() {
            return this._soundMgr || (this._soundMgr = new SoundMgr());
          }
        }, {
          key: "emailMgr",
          get: function get() {
            return this._emailMgr || (this._emailMgr = new EmailMgr());
          }
        }, {
          key: "chatMgr",
          get: function get() {
            return this._chatMgr || (this._chatMgr = new ChatMgr());
          }
        }, {
          key: "mixMgr",
          get: function get() {
            return this._mixMgr || (this._mixMgr = new MixMgr());
          }
        }, {
          key: "spineMgr",
          get: function get() {
            return this._spineMgr || (this._spineMgr = new SpineMgr());
          }
        }, {
          key: "mapMgr",
          get: function get() {
            return this._mapMgr || (this._mapMgr = new MapMgr());
          }
        }, {
          key: "languageMgr",
          get: function get() {
            return this._languageMgr || (this._languageMgr = new LanguageMgr());
          }
        }, {
          key: "battleProprMgr",
          get: function get() {
            return this._battleProprMgr || (this._battleProprMgr = new BattleProprMgr());
          }
        }, {
          key: "skillMgr",
          get: function get() {
            return this._skillMgr || (this._skillMgr = new SkillMgr());
          }
        }, {
          key: "bagMgr",
          get: function get() {
            return this._bagMgr || (this._bagMgr = new BagMgr());
          }
        }, {
          key: "platformMgr",
          get: function get() {
            return this._platformMgr || (this._platformMgr = new PlatformMgr());
          }
        }, {
          key: "lockMgr",
          get: function get() {
            return this._lockMgr || (this._lockMgr = new LockMgr());
          }
        }, {
          key: "adMgr",
          get: function get() {
            return this._adMgr || (this._adMgr = new ADMgr());
          }
        }, {
          key: "gameStateMgr",
          get: function get() {
            return this._gameStateMgr || (this._gameStateMgr = new GameStateMgr());
          }
        }, {
          key: "scheduleMgr",
          get: function get() {
            return this._scheduleMgr || (this._scheduleMgr = new ScheduleMgr());
          }
        }, {
          key: "broadcastMgr",
          get: function get() {
            return this._broadcastMgr || (this._broadcastMgr = new BroadcastMgr());
          }
        }, {
          key: "gameShareMgr",
          get: function get() {
            return this._gameShareMgr || (this._gameShareMgr = new GameShareMgr());
          }
        }, {
          key: "subscribeMgr",
          get: function get() {
            return this._subscribeMgr || (this._subscribeMgr = new SubscribeMgr());
          }
        }]);
        return App;
      }());
      App.insMap = singletonRegistry;
      App.boot = void 0;
      App._log = new Logger();
      App._monitorMgr = void 0;
      //事件系统
      App._resMgr = void 0;
      // 资源管理
      App._nodePoolMgr = void 0;
      // 节点池管理
      App._roleMgr = void 0;
      // 角色管理
      App._battleMgr = void 0;
      // 战斗管理
      App._dungeonBattleMgr = void 0;
      App._resourceManager = void 0;
      App._loginMgr = void 0;
      //区服管理
      App._redPointMgr = void 0;
      //红点管理
      App._saveDataMgr = void 0;
      //存储管理
      App._soundMgr = void 0;
      //音乐管理
      App._emailMgr = void 0;
      //邮件管理
      App._chatMgr = void 0;
      //聊天管理
      App._mixMgr = void 0;
      App._spineMgr = void 0;
      // 骨骼管理
      App._mapMgr = void 0;
      // 地图管理
      App._languageMgr = void 0;
      // 多语言;
      App._battleProprMgr = void 0;
      // 属性系统;
      App._skillMgr = void 0;
      // 技能系统;
      App._bagMgr = void 0;
      // 背包管理
      App._platformMgr = void 0;
      // 广告相关
      App._lockMgr = void 0;
      // 解锁条件检测
      App._adMgr = void 0;
      //  广告相关
      App._gameStateMgr = void 0;
      //游戏状态
      App._scheduleMgr = void 0;
      // 全局schedule管理类
      App._broadcastMgr = void 0;
      // 广播
      App._gameShareMgr = void 0;
      //微信分享
      App._subscribeMgr = void 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/AttrItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ModuleDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, Component, App, ModuleDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "40814Jeu8hKVISSf3DG3yrQ", "AttrItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var AttrItem = exports('AttrItem', (_dec = ccclass("AttrItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Label
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(AttrItem, _Component);
        function AttrItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 背景 */
          _initializerDefineProperty(_this, "bgSp", _descriptor, _assertThisInitialized(_this));
          /** 属性图标 */
          _initializerDefineProperty(_this, "icon", _descriptor2, _assertThisInitialized(_this));
          /** 属性名称 */
          _initializerDefineProperty(_this, "nameLab", _descriptor3, _assertThisInitialized(_this));
          /** 属性值 */
          _initializerDefineProperty(_this, "typeLab", _descriptor4, _assertThisInitialized(_this));
          /** 属性+值 */
          _initializerDefineProperty(_this, "addLab", _descriptor5, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = AttrItem.prototype;
        _proto.show = function show(data) {
          if (!data) return;

          // 设置属性图标
          if (this.icon && data.icon) {
            App.resMgr.loadImage(this.icon, ModuleDef.BASE_COMMON, "/texture/new_common/" + data.icon);
          }

          // 设置属性名称
          if (this.nameLab) {
            this.nameLab.string = data.name || "";
          }

          // 设置当前属性值
          if (this.typeLab) {
            this.typeLab.string = "" + data.value;
          }

          // 设置下一级属性增加值
          if (this.addLab) {
            var addValue = data.nextValue - data.value;
            this.addLab.string = addValue > 0 ? "+" + addValue : "";
          }
        };
        return AttrItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bgSp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "icon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "typeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "addLab", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/AutoBattleMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './Singleton.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, v3, GameBattle, Singleton;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      v3 = module.v3;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Singleton = module.Singleton;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "6c517oWq2NPGqc7qV1UlTGb", "AutoBattleMgr", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 自动战斗管理器
       * 负责控制英雄的自动释放技能和自动出击功能
       */
      var AutoBattleMgr = exports('AutoBattleMgr', (_dec = ccclass("AutoBattleMgr"), _dec(_class = /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(AutoBattleMgr, _Singleton);
        function AutoBattleMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          // 是否启用自动战斗
          _this._isAutoBattleEnabled = false;
          // 所有可出战的英雄
          _this._availableHeroes = new Map();
          // 所有活跃的英雄
          _this._activeHeroes = new Map();
          // 所有活跃的怪物
          _this._activeMonsters = [];
          // 检查间隔（秒）
          _this._checkInterval = 0.5;
          // 上次检查时间
          _this._lastCheckTime = 0;
          // 技能释放距离阈值
          _this._skillCastDistanceThreshold = 300;
          return _this;
        }
        var _proto = AutoBattleMgr.prototype;
        /**
         * 初始化自动战斗管理器
         */
        _proto.init = function init() {
          this._availableHeroes.clear();
          this._activeHeroes.clear();
          this._activeMonsters = [];
          this._isAutoBattleEnabled = false;
          this._lastCheckTime = 0;
        }

        /**
         * 开启自动战斗
         */;
        _proto.enableAutoBattle = function enableAutoBattle() {
          this._isAutoBattleEnabled = true;
          console.log("Auto battle enabled");

          // 立即执行一次检查
          this._lastCheckTime = 0;
        }

        /**
         * 关闭自动战斗
         */;
        _proto.disableAutoBattle = function disableAutoBattle() {
          this._isAutoBattleEnabled = false;
          console.log("Auto battle disabled");
        }

        /**
         * 切换自动战斗状态
         */;
        _proto.toggleAutoBattle = function toggleAutoBattle() {
          this._isAutoBattleEnabled = !this._isAutoBattleEnabled;
          console.log("Auto battle " + (this._isAutoBattleEnabled ? "enabled" : "disabled"));
          if (this._isAutoBattleEnabled) {
            this._lastCheckTime = 0;
          }
          return this._isAutoBattleEnabled;
        }

        /**
         * 获取自动战斗状态
         */;
        /**
         * 添加可用英雄
         */
        _proto.addAvailableHero = function addAvailableHero(hero) {
          if (hero) {
            this._availableHeroes.set(hero.uid, hero);
            console.log("Hero " + hero.uid + " added to available heroes");
          }
        }

        /**
         * 移除可用英雄
         */;
        _proto.removeAvailableHero = function removeAvailableHero(heroUid) {
          this._availableHeroes["delete"](heroUid);
          this._activeHeroes["delete"](heroUid);
          console.log("Hero " + heroUid + " removed from available heroes");
        }

        /**
         * 更新活跃的怪物列表
         */;
        _proto.updateActiveMonsters = function updateActiveMonsters(monsters) {
          this._activeMonsters = monsters.filter(function (monster) {
            return !monster.isDead;
          });
        }

        /**
         * 英雄进入战场
         */;
        _proto.onHeroEnterBattle = function onHeroEnterBattle(hero) {
          if (hero) {
            this._activeHeroes.set(hero.uid, hero);
            this._availableHeroes["delete"](hero.uid);
            console.log("Hero " + hero.uid + " entered battle");
          }
        }

        /**
         * 英雄离开战场
         */;
        _proto.onHeroLeaveBattle = function onHeroLeaveBattle(heroUid) {
          this._activeHeroes["delete"](heroUid);
          console.log("Hero " + heroUid + " left battle");
        }

        /**
         * 更新
         */;
        _proto.update = function update(deltaTime) {
          if (!this._isAutoBattleEnabled) {
            return;
          }
          this._lastCheckTime += deltaTime;

          // 按间隔执行检查
          if (this._lastCheckTime >= this._checkInterval) {
            this._lastCheckTime = 0;

            // 自动释放技能
            this.autoCastSkills();

            // 自动派遣英雄
            this.autoDeployHeroes();
          }
        }

        /**
         * 自动释放技能
         */;
        _proto.autoCastSkills = function autoCastSkills() {
          var _this2 = this;
          this._activeHeroes.forEach(function (hero) {
            if (hero.isDead || !hero.isFullRage) {
              return;
            }

            // 查找技能范围内的目标
            var target = _this2.findBestSkillTarget(hero);
            if (target) {
              // 释放技能
              hero.castSkill(0); // 假设0是主要技能ID
              console.log("Hero " + hero.uid + " auto cast skill at target " + target.uid);
            }
          });
        }

        /**
         * 自动派遣英雄
         */;
        _proto.autoDeployHeroes = function autoDeployHeroes() {
          if (this._availableHeroes.size === 0 || this._activeMonsters.length === 0) {
            return;
          }

          // 找到怪物最多的兵线
          var laneMonsterCount = this.countMonstersByLane();
          var busiestLane = this.findBusiestLane(laneMonsterCount);

          // 如果找到兵线且有可用英雄
          if (busiestLane !== null) {
            // 获取第一个可用的英雄
            var availableHero = this._availableHeroes.values().next().value;
            if (availableHero && !availableHero.isDead && availableHero.canDeploy) {
              // 部署到最繁忙的兵线
              this.deployHeroToLane(availableHero, busiestLane);
            }
          }
        }

        /**
         * 计算各兵线的怪物数量
         */;
        _proto.countMonstersByLane = function countMonstersByLane() {
          var laneCount = new Map();

          // 初始化兵线计数
          Object.values(GameBattle.LanePosition).forEach(function (lane) {
            if (typeof lane === "number") {
              laneCount.set(lane, 0);
            }
          });

          // 统计各兵线怪物数量
          this._activeMonsters.forEach(function (monster) {
            var lane = monster.lane;
            if (lane !== null && laneCount.has(lane)) {
              laneCount.set(lane, (laneCount.get(lane) || 0) + 1);
            }
          });
          return laneCount;
        }

        /**
         * 找到怪物最多的兵线
         */;
        _proto.findBusiestLane = function findBusiestLane(laneCount) {
          var busiestLane = null;
          var maxCount = 0;
          laneCount.forEach(function (count, lane) {
            if (count > maxCount) {
              maxCount = count;
              busiestLane = lane;
            }
          });
          return busiestLane;
        }

        /**
         * 将英雄部署到指定兵线
         */;
        _proto.deployHeroToLane = function deployHeroToLane(hero, lane) {
          // 根据兵线计算部署位置
          var deployPositions = [v3(-300, -500, 0),
          // 左路
          v3(0, -500, 0),
          // 中路
          v3(300, -500, 0) // 右路
          ];

          var deployPosition = deployPositions[lane];
          if (deployPosition) {
            // 部署英雄
            hero.deployToLane(lane, deployPosition);

            // 更新状态
            this._activeHeroes.set(hero.uid, hero);
            this._availableHeroes["delete"](hero.uid);
            console.log("Hero " + hero.uid + " auto deployed to lane " + lane);
          }
        }

        /**
         * 查找最佳技能目标
         */;
        _proto.findBestSkillTarget = function findBestSkillTarget(hero) {
          var _this3 = this;
          if (!hero || this._activeMonsters.length === 0) {
            return null;
          }
          var heroPos = hero.node.position;
          var bestTarget = null;
          var closestDistance = this._skillCastDistanceThreshold;

          // 优先选择距离最近且在技能范围内的敌人
          this._activeMonsters.forEach(function (monster) {
            var distance = _this3.calculateDistance(heroPos, monster.node.position);

            // 如果在技能范围内且距离更近
            if (distance <= _this3._skillCastDistanceThreshold && distance < closestDistance) {
              closestDistance = distance;
              bestTarget = monster;
            }
          });
          return bestTarget;
        }

        /**
         * 计算两点之间的距离
         */;
        _proto.calculateDistance = function calculateDistance(pos1, pos2) {
          var dx = pos1.x - pos2.x;
          var dy = pos1.y - pos2.y;
          return Math.sqrt(dx * dx + dy * dy);
        }

        /**
         * 设置技能释放距离阈值
         */;
        _proto.setSkillCastDistanceThreshold = function setSkillCastDistanceThreshold(threshold) {
          this._skillCastDistanceThreshold = threshold;
        }

        /**
         * 设置检查间隔
         */;
        _proto.setCheckInterval = function setCheckInterval(interval) {
          this._checkInterval = interval;
        }

        /**
         * 重置管理器
         */;
        _proto.reset = function reset() {
          this.disableAutoBattle();
          this._availableHeroes.clear();
          this._activeHeroes.clear();
          this._activeMonsters = [];
          this._lastCheckTime = 0;
        }

        /**
         * 获取活跃英雄数量
         */;
        _createClass(AutoBattleMgr, [{
          key: "isAutoBattleEnabled",
          get: function get() {
            return this._isAutoBattleEnabled;
          }
        }, {
          key: "activeHeroCount",
          get: function get() {
            return this._activeHeroes.size;
          }

          /**
           * 获取可用英雄数量
           */
        }, {
          key: "availableHeroCount",
          get: function get() {
            return this._availableHeroes.size;
          }
        }]);
        return AutoBattleMgr;
      }(Singleton())) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/AxingManager.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleBigMap.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Vec3, v3, BattleBigMap;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      v3 = module.v3;
    }, function (module) {
      BattleBigMap = module.BattleBigMap;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "3c0b7n3T2JAtqyQzjDnQIo7", "AxingManager", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /** 寻路深度类型 */
      var FindPathDeepType = exports('FindPathDeepType', /*#__PURE__*/function (FindPathDeepType) {
        FindPathDeepType[FindPathDeepType["Normal"] = 80] = "Normal";
        FindPathDeepType[FindPathDeepType["Boss"] = 200] = "Boss";
        FindPathDeepType[FindPathDeepType["AutoFightFindEnemy"] = 300] = "AutoFightFindEnemy";
        FindPathDeepType[FindPathDeepType["AutoFightFindWayPoint"] = 500] = "AutoFightFindWayPoint";
        return FindPathDeepType;
      }({}));

      /**
       * 任务结构体
       */

      var AxingManagerNew = exports('AxingManagerNew', (_dec = ccclass("AxingManagerNew"), _dec(_class = (_class2 = /*#__PURE__*/function () {
        function AxingManagerNew() {
          this._pathFindingQueue = [];
          this._isProcessing = false;
          this._maxTasksPerFrame = 3;
          // 每帧最多处理的任务数
          this._frameInterval = 1 / 60;
          // 帧间隔时间
          this._lastProcessTime = 0;
          this._defaultMaxDepth = 200;
          // 默认最大寻路深度
          this.useFrameQueue = false;
          this._mapArray = new Array();
          // 地图数据
          this.map2d = void 0;
          this._mapCache = {};
        }
        AxingManagerNew.getInstance = function getInstance() {
          if (this._instance == undefined) {
            this._instance = new this();
          }
          return this._instance;
        }

        /**使用新的物理层数据 */;
        var _proto = AxingManagerNew.prototype;
        // 是否使用帧队列
        _proto.setUseFrameQueue = function setUseFrameQueue(flag) {
          this.useFrameQueue = flag;
        }

        // 添加任务到队列
        ;

        _proto.addPathFindingTask = function addPathFindingTask(startPoint, endPoint, callback, maxDepth) {
          var task = {
            startPoint: startPoint,
            endPoint: endPoint,
            callback: callback,
            maxDepth: maxDepth || this._defaultMaxDepth
          };
          if (this.useFrameQueue) {
            this._pathFindingQueue.push(task);
            if (!this._isProcessing) {
              this.processPathFindingQueue();
            }
          } else {
            // 直接执行寻路，不加入队列
            var _result = this.Astar_use(startPoint, endPoint, maxDepth);
            callback(_result);
            return _result;
          }
        }

        // 处理队列中的任务
        ;

        _proto.processPathFindingQueue = /*#__PURE__*/
        function () {
          var _processPathFindingQueue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var _this = this;
            var currentTime, processedTasks, task, _result2;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!(this._pathFindingQueue.length === 0)) {
                    _context.next = 3;
                    break;
                  }
                  this._isProcessing = false;
                  return _context.abrupt("return");
                case 3:
                  this._isProcessing = true;
                  currentTime = Date.now();
                  if (!(currentTime - this._lastProcessTime < this._frameInterval * 1000)) {
                    _context.next = 8;
                    break;
                  }
                  setTimeout(function () {
                    return _this.processPathFindingQueue();
                  }, this._frameInterval * 1000);
                  return _context.abrupt("return");
                case 8:
                  processedTasks = 0;
                  while (this._pathFindingQueue.length > 0 && processedTasks < this._maxTasksPerFrame) {
                    task = this._pathFindingQueue.shift();
                    if (task) {
                      _result2 = this.Astar_use(task.startPoint, task.endPoint, task.maxDepth);
                      task.callback(_result2);
                      processedTasks++;
                    }
                  }
                  this._lastProcessTime = currentTime;

                  // 如果队列中还有任务，在下一帧继续处理
                  if (this._pathFindingQueue.length > 0) {
                    setTimeout(function () {
                      return _this.processPathFindingQueue();
                    }, this._frameInterval * 1000);
                  } else {
                    this._isProcessing = false;
                  }
                case 12:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function processPathFindingQueue() {
            return _processPathFindingQueue.apply(this, arguments);
          }
          return processPathFindingQueue;
        }() // 清空寻路队列
        ;

        _proto.clearPathFindingQueue = function clearPathFindingQueue() {
          this._pathFindingQueue = [];
          this._isProcessing = false;
        }

        // 获取当前队列长度
        ;

        _proto.getQueueLength = function getQueueLength() {
          return this._pathFindingQueue.length;
        };
        _proto.init = function init() {};
        _proto.Array2D = function Array2D(w, h, num) {
          var data = [];
          var default_num = num || 0;
          for (var x = 0; x < h; x++) {
            var temp = [];
            for (var y = 0; y < w; y++) {
              temp.push(default_num);
            }
            data.push(temp);
          }
          return {
            w: w,
            h: h,
            data: data,
            showArray2D: function showArray2D() {
              var s = "";
              for (var y = 0; y < this.h; y++) {
                for (var x = 0; x < this.w; x++) {
                  s += this.data[x][y] + " ";
                }
                s += "\n";
              }
              console.log(s);
            }
          };
        }

        //点结构
        ;

        _proto.Point = function Point(x, y) {
          return {
            x: x,
            y: y,
            eq: function eq(other) {
              return this.x === other.x && this.y === other.y;
            }
          };
        }

        //节点结构
        ;

        _proto.Node = function Node(point, endPoint, g) {
          var tG = g || 0;
          return {
            point: point,
            father: null,
            g: tG,
            h: (Math.abs(endPoint.x - point.x) + Math.abs(endPoint.y - point.y)) * 10
          };
        }

        /**
         * 创建AStar对象，进行寻路
         * @param map2d 地图数据
         * @param startPoint 寻路起点
         * @param endPoint 寻路终点
         * @param passTag 可行走标记
         * @param self 寻路管理器
         * @returns
         */;
        _proto.AStar = function AStar(map2d, startPoint, endPoint, passTag, self) {
          return {
            map2d: map2d,
            startPoint: startPoint,
            endPoint: endPoint,
            passTag: passTag,
            openList: [],
            //开启表
            closeList: [],
            //关闭表
            // 计算节点的F值
            getF: function getF(node) {
              return node.g + node.h;
            },
            // 优化：二分查找插入位置
            findInsertPosition: function findInsertPosition(node) {
              var nodeF = this.getF(node);
              var left = 0;
              var right = this.openList.length - 1;
              while (left <= right) {
                var mid = Math.floor((left + right) / 2);
                var midF = this.getF(this.openList[mid]);
                if (midF < nodeF) {
                  right = mid - 1;
                } else {
                  left = mid + 1;
                }
              }
              return left;
            },
            // 优化：添加节点到openList
            addToOpenList: function addToOpenList(node) {
              var pos = this.findInsertPosition(node);
              this.openList.splice(pos, 0, node);
            },
            // 优化：更新openList中的节点
            updateOpenListNode: function updateOpenListNode(node, newG, newFather) {
              // 先从openList中移除节点
              var index = this.openList.indexOf(node);
              if (index !== -1) {
                this.openList.splice(index, 1);
              }

              // 更新节点的g值和父节点
              node.g = newG;
              node.father = newFather;

              // 重新插入到正确的位置
              this.addToOpenList(node);
            },
            // 修改搜索周围节点的逻辑
            searchNear: function searchNear(minF, offsetX, offsetY) {
              var newX = minF.point.x + offsetX;
              var newY = minF.point.y + offsetY;

              //检测是否可通行
              if (!this.checkCanPass(newX, newY)) {
                return null;
              }

              // 如果在关闭表中就忽略
              var currentPoint = self.Point(newX, newY);
              if (this.pointInCloseList(currentPoint)) {
                return null;
              }

              // 计算新的g值
              var step = offsetX === 0 || offsetY === 0 ? 10 : 14;
              var newG = minF.g + step;

              // 检查是否在开启列表中
              var currentNode = this.pointInOpenList(currentPoint);
              if (!currentNode) {
                // 如果不在开启列表中，创建新节点并添加
                var newNode = self.Node(currentPoint, this.endPoint, newG);
                newNode.father = minF;
                this.addToOpenList(newNode);
              } else if (newG < currentNode.g) {
                // 如果新路径更好，使用 updateOpenListNode 更新节点
                this.updateOpenListNode(currentNode, newG, minF);
              }
            },
            //检测是否可通行
            checkCanPass: function checkCanPass(newX, newY) {
              if (AxingManagerNew.USE_NEW_DATA) {
                return !BattleBigMap.getInstance().isBlock(newX, newY);
              } else {
                // 边界检查
                if (newX < 0 || newX >= this.map2d.w || newY < 0 || newY >= this.map2d.h) {
                  return false;
                }

                // 障碍检查 (0表示可通行)
                if (this.map2d.data[newY][newX] !== 0) {
                  return false;
                }
                return true;
              }
            },
            //判断point是否在关闭表中
            pointInCloseList: function pointInCloseList(point) {
              for (var _iterator = _createForOfIteratorHelperLoose(this.closeList), _step; !(_step = _iterator()).done;) {
                var node = _step.value;
                if (node.point.eq(point)) return true;
              }
              return false;
            },
            //判断point是否在开启表中
            pointInOpenList: function pointInOpenList(point) {
              for (var _iterator2 = _createForOfIteratorHelperLoose(this.openList), _step2; !(_step2 = _iterator2()).done;) {
                var node = _step2.value;
                if (node.point.eq(point)) return node;
              }
              return null;
            },
            //判断终点是否在闭表中
            endPointInCloseList: function endPointInCloseList() {
              for (var _iterator3 = _createForOfIteratorHelperLoose(this.closeList), _step3; !(_step3 = _iterator3()).done;) {
                var node = _step3.value;
                if (node.point.eq(this.endPoint)) return node;
              }
              return null;
            },
            //开始寻路
            start: function start(maxDepth) {
              this.openList = [];
              this.closeList = [];
              var startNode = self.Node(this.startPoint, this.endPoint);
              this.addToOpenList(startNode);
              while (this.openList.length > 0) {
                if (maxDepth && this.closeList.length >= maxDepth) {
                  console.log("达到最大深度限制:", maxDepth);
                  return null;
                }
                var minF = this.getMinNode();
                if (!minF) break;
                this.closeList.push(minF);
                this.openList.pop();

                // 先检查是否到达终点
                if (minF.point.eq(this.endPoint)) {
                  //console.log('找到路径，总迭代次数:', iterations,this.closeList.length);
                  return this.buildPath(minF);
                }

                // 搜索八个方向
                this.searchNear(minF, 0, -1);
                this.searchNear(minF, 0, 1);
                this.searchNear(minF, -1, 0);
                this.searchNear(minF, 1, 0);
                this.searchNear(minF, -1, -1);
                this.searchNear(minF, -1, 1);
                this.searchNear(minF, 1, -1);
                this.searchNear(minF, 1, 1);
              }
              // console.log('未找到路径，总迭代次数:', iterations);
              return null;
            },
            // 添加 buildPath 方法
            buildPath: function buildPath(endNode) {
              var path = [];
              var current = endNode;
              while (current.father) {
                path.push(current.point);
                current = current.father;
              }
              return path.reverse();
            },
            getMinNode: function getMinNode() {
              if (this.openList.length === 0) return null;
              return this.openList[this.openList.length - 1];
            }
          };
        };
        _proto.initMapData_zhangaiwu = function initMapData_zhangaiwu(width, height, mapData) {
          this.map2d = this.Array2D(width, height, 0);
          for (var i = 0; i < height; i++) {
            for (var j = 0; j < width; j++) {
              //this.map2d.data[i][j] = mapData[i * width + j]
              this.map2d.data[i][j] = mapData[i * width + j] == 0 ? 1 : 0;
            }
          }
        }

        /**
         * tiledMap地图数据转换为二维数组
         * @param width 地图宽度
         * @param height
         * @param mapData
         * @returns
         */;
        _proto.tilesToMapData = function tilesToMapData(width, height, mapData) {
          var data = [];
          var default_num = 0;
          for (var x = 0; x < height; x++) {
            var temp = [];
            for (var y = 0; y < width; y++) {
              temp.push(default_num);
            }
            data.push(temp);
          }
          for (var i = 0; i < height; i++) {
            for (var j = 0; j < width; j++) {
              data[i][j] = mapData[i * width + j] == 0 ? 1 : 0;
            }
          }
          return data;
        };
        // 缓存寻路结果
        // 修改 Astar_use 方法
        _proto.Astar_use = function Astar_use(start_point, to_point, maxDepth) {
          if (maxDepth === void 0) {
            maxDepth = this._defaultMaxDepth;
          }
          // console.log(
          //   '开始寻路:',
          //   '起点:',
          //   start_point,
          //   '终点:',
          //   to_point,
          //   '地图大小:',
          //   this.map2d.w,
          //   'x',
          //   this.map2d.h
          // );

          // 查点是否有效
          if (!this.isValidPoint(start_point)) {
            // console.log('起点无效');
            return Vec3.ZERO;
          }
          if (!this.isValidPoint(to_point)) {
            // console.log('终点无效');
            return Vec3.ZERO;
          }

          // 检查缓存
          var cacheKey = start_point.x + "," + start_point.y + "," + to_point.x + "," + to_point.y;
          if (this._mapCache[cacheKey]) {
            return this._mapCache[cacheKey];
          }
          var start_row = Math.floor(start_point.x);
          var start_column = Math.floor(start_point.y);
          var to_row = Math.floor(to_point.x);
          var to_column = Math.floor(to_point.y);

          // 创建 AStar 实例并寻路
          var aStar = this.AStar(this.map2d, this.Point(start_row, start_column), this.Point(to_row, to_column), 0, this);
          var pathList = aStar.start(maxDepth);
          if (!pathList || pathList.length === 0) {
            return Vec3.ZERO;
          }
          if (BattleBigMap.SHOW_PATH_SPRITE) {
            //TODOO
            if (maxDepth == FindPathDeepType.AutoFightFindEnemy || maxDepth == FindPathDeepType.AutoFightFindWayPoint) {
              BattleBigMap.getInstance().showDebugPath(pathList);
            }
          }

          // 计算移动向量
          var firstPoint = v3(pathList[0].x, pathList[0].y, 0);
          //const moveVector = firstPoint.subtract(v3(start_row, start_column, 0));
          var result;
          if (AxingManagerNew.USE_NEW_DATA) {
            result = firstPoint.subtract(v3(start_point.x, start_point.y, 0));
          } else {
            var moveVector = v3(start_point.x, start_point.y, 0).subtract(firstPoint);
            result = v3(moveVector.x * -1, moveVector.y, 0);
          }

          // 缓存结果
          this._mapCache[cacheKey] = result;
          return result;
        }

        // 添加点检查方法
        ;

        _proto.isValidPoint = function isValidPoint(point) {
          if (AxingManagerNew.USE_NEW_DATA) {
            if (BattleBigMap.getInstance().isBlock(point.x, point.y)) {
              return false;
            }
            return true;
          } else {
            if (!this.map2d || !this.map2d.data) {
              console.log("地图数据未初始化");
              return false;
            }
            var row = Math.floor(point.y);
            var col = Math.floor(point.x);

            // 检查边界
            if (row < 0 || row >= this.map2d.h || col < 0 || col >= this.map2d.w) {
              console.log("\u70B9 (" + row + ", " + col + ") \u8D85\u51FA\u8FB9\u754C");
              return false;
            }

            // 检查是否可通行（0表示可通行）
            var isPassable = this.map2d.data[row][col] === 0;
            if (!isPassable) {
              console.log("\u70B9 (" + row + ", " + col + ") \u662F\u969C\u788D\u7269");
            }
            return isPassable;
          }
        }

        /**
         * 使用A*算法寻路
         * @param start 起点
         * @param end 终点
         * @returns
         */;
        _proto.findPath = function findPath(start, end) {
          var _this2 = this;
          return new Promise(function (resolve) {
            _this2.addPathFindingTask(start, end, function (result) {
              resolve(result);
            });
          });
        }

        /**
         * 使用A*算法寻路,立即返回结果
         * @param start 起点
         * @param end 终点
         * @returns
         */;
        _proto.findPathImmediately = function findPathImmediately(start, end, maxDepthValue) {
          var maxDepth = maxDepthValue ? maxDepthValue : AxingManagerNew.DEEP_LIMIT;
          return this.addPathFindingTask(start, end, function () {}, maxDepth) || Vec3.ZERO;
        }

        // 清除缓存方法
        ;

        _proto.clearCache = function clearCache() {
          this._mapCache = {};
        };
        _proto.dispose = function dispose() {};
        return AxingManagerNew;
      }(), _class2._instance = new _class2(), _class2.USE_NEW_DATA = true, _class2.DEEP_LIMIT = 80, _class2.DEEP_LIMIT_BOSS = 200, _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BagMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './DBRecord.ts', './Prompt.ts', './ModuleDef.ts', './App.ts', './NetChannelMgr.ts', './EventType.ts', './UIUtil.ts', './UIMgr.ts', './UI_ItemSourceView.ts', './Layout_UI_ItemSourceView.ts', './UI_GetRewardView.ts', './Layout_UI_GetRewardView.ts', './UI_ItemDetailView.ts', './Layout_UI_ItemDetailView.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, MonitorType, ModType, DBRecord, Prompt, ModuleDef, App, netChannel, EventType, UIUtil, UIMgr, LayerType, UI_ItemSourceView, Layout_UI_ItemSourceView, UI_GetRewardView, Layout_UI_GetRewardView, UI_ItemDetailView, Layout_UI_ItemDetailView;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_ItemSourceView = module.UI_ItemSourceView;
    }, function (module) {
      Layout_UI_ItemSourceView = module.Layout_UI_ItemSourceView;
    }, function (module) {
      UI_GetRewardView = module.UI_GetRewardView;
    }, function (module) {
      Layout_UI_GetRewardView = module.Layout_UI_GetRewardView;
    }, function (module) {
      UI_ItemDetailView = module.UI_ItemDetailView;
    }, function (module) {
      Layout_UI_ItemDetailView = module.Layout_UI_ItemDetailView;
    }],
    execute: function () {
      cclegacy._RF.push({}, "08f8b5iTEhLfal6tOFR40mV", "BagMgr", undefined);

      /**
       * 背包类型
       */
      var BagType = exports('BagType', /*#__PURE__*/function (BagType) {
        BagType[BagType["prop"] = 1] = "prop";
        BagType[BagType["libao"] = 2] = "libao";
        BagType[BagType["suipian"] = 3] = "suipian";
        BagType[BagType["equip"] = 4] = "equip";
        return BagType;
      }({}));

      /**
       * 道具类型
       */
      var ItemType = exports('ItemType', /*#__PURE__*/function (ItemType) {
        ItemType[ItemType["none"] = 0] = "none";
        ItemType[ItemType["assets"] = 1] = "assets";
        ItemType[ItemType["prop"] = 2] = "prop";
        ItemType[ItemType["hero"] = 3] = "hero";
        ItemType[ItemType["equip"] = 4] = "equip";
        ItemType[ItemType["zhuangban"] = 5] = "zhuangban";
        return ItemType;
      }({}));

      /**道具子类型 */
      var ItemSubType = exports('ItemSubType', /*#__PURE__*/function (ItemSubType) {
        ItemSubType[ItemSubType["none"] = 0] = "none";
        ItemSubType[ItemSubType["xhcl"] = 1] = "xhcl";
        ItemSubType[ItemSubType["cglb"] = 2] = "cglb";
        ItemSubType[ItemSubType["kxlb"] = 3] = "kxlb";
        ItemSubType[ItemSubType["suipian"] = 4] = "suipian";
        ItemSubType[ItemSubType["yxzk"] = 5] = "yxzk";
        ItemSubType[ItemSubType["yxsp"] = 6] = "yxsp";
        ItemSubType[ItemSubType["equip"] = 7] = "equip";
        ItemSubType[ItemSubType["head"] = 8] = "head";
        ItemSubType[ItemSubType["title"] = 9] = "title";
        return ItemSubType;
      }({}));
      var BagMgr = exports('BagMgr', /*#__PURE__*/function () {
        function BagMgr() {
          /**背包道具 */
          this._bag_items = [];
          /**装备 */
          this._bag_equips = [];
        }
        var _proto = BagMgr.prototype;
        //========================================== 配置获取方法 ===========================================
        /**
         * 获取物品配置
         * @param itemid 物品ID
         * @returns 物品配置
         */
        _proto.getItemConfig = function getItemConfig(itemid) {
          return DBRecord.fetchId("Item", itemid);
        }

        /**
         * 获取背包分类配置
         * @param bagType 背包类型
         * @returns 背包分类配置
         */;
        _proto.getItemBagConfig = function getItemBagConfig(bagType) {
          return DBRecord.fetchId("Item_Bag", bagType);
        }

        /**
         * 获取物品获取途径配置
         * @param gainId 获取途径ID
         * @returns 获取途径配置
         */;
        _proto.getItemGainConfig = function getItemGainConfig(gainId) {
          return DBRecord.fetchId("Item_Gain", gainId);
        }
        //========================================== 配置获取方法 ===========================================

        /**
         * 根据物品ID判断属于哪个背包类型
         * @param itemid 道具ID
         * @returns 背包类型
         */;
        _proto.getItemBagType = function getItemBagType(itemid) {
          var itemConfig = this.getItemConfig(itemid);
          if (!itemConfig) {
            App.log.logError("\u7269\u54C1\u914D\u7F6E\u4E0D\u5B58\u5728: itemid=" + itemid);
            return BagType.prop;
          }
          for (var bagType = BagType.prop; bagType <= BagType.equip; bagType++) {
            var bagConfig = this.getItemBagConfig(bagType);
            if (bagConfig && bagConfig.itemtype) {
              for (var _iterator = _createForOfIteratorHelperLoose(bagConfig.itemtype), _step; !(_step = _iterator()).done;) {
                var itemTypePair = _step.value;
                if (itemConfig.type === itemTypePair[0] && itemConfig.subtype === itemTypePair[1]) {
                  return bagType;
                }
              }
            }
          }
          return BagType.prop;
        }

        /**
         * 重置数据
         */;
        _proto._resetData = function _resetData() {
          this._bag_equips = [];
          this._bag_items = [];
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserLoadBag, this.recResUserLoadBag, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserbagchange, this.recResUserbagchange, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAKeyUseGift, this.recResAKeyUseGift, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUseOptionalGift, this.recResUseOptionalGift, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResFragmentCombine, this.recResFragmentCombine, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUseItem, this.resUseItem, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResRewardPopup, this.resRewardPopup, this);
        }

        /**
         * 初始化背包管理器
         */;
        _proto.init = /*#__PURE__*/
        function () {
          var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  this._resetData();
                  this.addEventListener();
                  _context.next = 4;
                  return App.nodePoolMgr.createPoolByPath(ModuleDef.BASE_COMMON, "prefab/item/itemProp", {
                    preloadCount: 50,
                    maxSize: 60,
                    autoExpand: true
                  });
                case 4:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function init() {
            return _init.apply(this, arguments);
          }
          return init;
        }()
        /**
         * 释放资源
         */;

        _proto.dispose = function dispose() {
          this._resetData();
          App.monitorMgr.offTarget(this);
          App.nodePoolMgr.clearPoolByPath(ModuleDef.BASE_COMMON, "prefab/item/itemProp");
        }

        /**
         * 查找装备物品
         * @param itemuid 物品唯一ID
         * @returns 装备物品
         */;
        _proto.findEquipItem = function findEquipItem(itemuid) {
          return App.bagMgr.getBagItemByItemuid(itemuid) || App.bagMgr.getWearEquipDataByItemuid(itemuid);
        }

        /**
         * 获取穿戴的装备数据
         * @param type 装备类型
         * @returns 装备数据
         */;
        _proto.getWearEquipData = function getWearEquipData(type) {
          if (type < 0 || type >= this._bag_equips.length) return null;
          return this._bag_equips[type];
        }

        /**
         * 检查指定物品唯一ID的装备是否已经穿戴
         * @param itemuid 物品唯一ID
         * @returns 是否已经穿戴
         */;
        _proto.isEquipWorn = function isEquipWorn(itemuid) {
          for (var i = 0; i < this._bag_equips.length; i++) {
            if (this._bag_equips[i] && this._bag_equips[i].itemUid === itemuid) {
              return true;
            }
          }
          return false;
        }

        /**
         * 获取穿戴的装备列表
         * @returns 装备列表
         */;
        _proto.getWearEquipList = function getWearEquipList() {
          var list = [];
          for (var i = 0; i < this._bag_equips.length; i++) {
            if (this._bag_equips[i]) list.push(this._bag_equips[i]);
          }
          return list;
        }

        /**
         * 根据物品唯一ID获取穿戴的装备数据
         * @param itemuid 物品唯一ID
         * @returns 装备数据
         */;
        _proto.getWearEquipDataByItemuid = function getWearEquipDataByItemuid(itemuid) {
          for (var i = 0; i < this._bag_equips.length; i++) {
            if (this._bag_equips[i] && this._bag_equips[i].itemUid === itemuid) return this._bag_equips[i];
          }
        }

        /**
         * 根据物品ID获取穿戴的装备数据
         * @param itemid 物品ID
         * @returns 装备数据
         */;
        _proto.getWearEquipDataByItemId = function getWearEquipDataByItemId(itemid) {
          for (var i = 0; i < this._bag_equips.length; i++) {
            if (this._bag_equips[i] && this._bag_equips[i].itemid === itemid) return this._bag_equips[i];
          }
        }

        /**
         * 检查指定物品ID的装备是否已经穿戴
         * @param itemid 物品ID
         * @returns 是否已经穿戴
         */;
        _proto.checkWearByItemId = function checkWearByItemId(itemid, vEquip) {
          vEquip = vEquip || this._bag_equips;
          for (var dx0 = 0; dx0 < vEquip.length; dx0++) if (vEquip[dx0] && vEquip[dx0].itemid === itemid) return true;
          return false;
        }

        /**
         * 获取穿戴装备的战力
         * @returns 战力值
         */;
        _proto.getWearEquipPower = function getWearEquipPower() {
          var power = 0;
          // for (let i = 0; i < this._bag_equips.length; i++) {
          //     if (this._bag_equips[i]) power += this._bag_equips[i].equipment.fighting;
          // }
          return power;
        }

        /**
         * 获取背包物品映射
         * @param bag_type 背包类型
         * @returns 物品映射
         */;
        _proto.getBagItemsMap = function getBagItemsMap(bag_type) {
          if (bag_type >= 0 && bag_type < this._bag_items.length) return this._bag_items[bag_type];
        }

        /**
         * 获取背包物品列表
         * @param bag_type 背包类型
         * @returns 物品列表
         */;
        _proto.getBagItemList = function getBagItemList(bag_type) {
          var mapItems = this.getBagItemsMap(bag_type);
          if (!mapItems || mapItems.size <= 0) return [];
          var list = [];
          for (var _iterator2 = _createForOfIteratorHelperLoose(mapItems), _step2; !(_step2 = _iterator2()).done;) {
            var _step2$value = _step2.value,
              k = _step2$value[0],
              v = _step2$value[1];
            list.push(v);
          }
          return list;
        }

        /**
         * 根据物品唯一ID获取物品
         * @param itemuid 物品唯一ID
         * @param bag_type 背包类型
         * @returns 物品
         */;
        _proto.getBagItemByItemuid = function getBagItemByItemuid(itemuid, bag_type) {
          if (bag_type === void 0) {
            bag_type = -1;
          }
          for (var i = 0; i < this._bag_items.length; i++) {
            if (bag_type >= 0 && i !== bag_type) continue;
            var mapItems = this._bag_items[i];
            if (!mapItems) continue;
            var item = mapItems.get(itemuid);
            if (item) return item;
          }
        }

        /**
         * 根据物品ID获取背包物品
         * @param itemid 物品ID
         * @returns 物品
         */;
        _proto.getBagItemByItemid = function getBagItemByItemid(itemid) {
          var cfg = this.getItemConfig(itemid);
          if (cfg && cfg.type === ItemType.assets) {
            return null;
          }
          for (var i = 0; i < this._bag_items.length; i++) {
            var mapItems = this._bag_items[i];
            if (!mapItems) continue;
            for (var _iterator3 = _createForOfIteratorHelperLoose(mapItems), _step3; !(_step3 = _iterator3()).done;) {
              var _step3$value = _step3.value,
                k = _step3$value[0],
                v = _step3$value[1];
              if (v.itemid === itemid) return v;
            }
          }
          return null;
        }

        /**
         * 获取物品数量（统一接口）
         * @param itemid 道具ID
         * @returns 物品数量
         */;
        _proto.getItemCount = function getItemCount(itemid) {
          var cfg = this.getItemConfig(itemid);
          if (!cfg) return 0;
          if (cfg.type === ItemType.assets) {
            return App.roleMgr.getPlayerResCount(itemid);
          }
          var bagType = this.getItemBagType(itemid);
          var mapItems = this._bag_items[bagType];
          if (!mapItems) return 0;
          var count = 0;
          for (var _iterator4 = _createForOfIteratorHelperLoose(mapItems), _step4; !(_step4 = _iterator4()).done;) {
            var _step4$value = _step4.value,
              k = _step4$value[0],
              v = _step4$value[1];
            if (v.itemid === itemid) count += v.num;
          }
          return count;
        }

        /**
         * 更新单个背包物品
         * @param bag_item 物品数据
         * @param bNew 是否是新物品
         */;
        _proto.updateBagItem = function updateBagItem(bag_item, bNew) {
          if (bNew === void 0) {
            bNew = false;
          }
          if (!bag_item || !bag_item.itemid) {
            App.log.logError("\u65E0\u6548\u7684\u7269\u54C1\u6570\u636E: " + JSON.stringify(bag_item));
            return;
          }
          var itemConfig = this.getItemConfig(bag_item.itemid);
          if (!itemConfig) {
            App.log.logError("\u7269\u54C1\u914D\u7F6E\u4E0D\u5B58\u5728: itemid=" + bag_item.itemid);
            return;
          }
          if (itemConfig.type === ItemType.assets) {
            return;
          }
          var bagType = this.getItemBagType(bag_item.itemid);
          if (bagType === BagType.equip) {
            if (this._bag_equips.some(function (equip) {
              return equip && equip.itemUid === bag_item.itemUid;
            })) {
              var equipIndex = this._bag_equips.findIndex(function (equip2) {
                return equip2 && equip2.itemUid === bag_item.itemUid;
              });
              if (equipIndex !== -1) {
                this._bag_equips[equipIndex] = bag_item;
              }
              if (!bNew) {
                return;
              }
            }
          }
          if (!this._bag_items[bagType]) {
            this._bag_items[bagType] = new Map();
          }
          this._bag_items[bagType].set(bag_item.itemUid, bag_item);
        }

        /**
         * 背包奖励排序
         * @param vData 背包物品数组
         * @returns 排序后的物品数组
         */;
        _proto.sortAward = function sortAward(vData) {
          var _this = this;
          if (!Array.isArray(vData)) {
            App.log.logError("sortAward\u65B9\u6CD5\u53C2\u6570\u9519\u8BEF: " + JSON.stringify(vData));
            return [];
          }
          vData.sort(function (itemA, itemB) {
            var nMoneyA = itemA.itemid <= 100 ? 1 : 0;
            var nMoneyB = itemB.itemid <= 100 ? 1 : 0;
            if (nMoneyA !== nMoneyB) {
              return nMoneyB - nMoneyA;
            }
            var itemAConfig = _this.getItemConfig(itemA.itemid);
            var itemBConfig = _this.getItemConfig(itemB.itemid);
            var colorA = (itemAConfig == null ? void 0 : itemAConfig.color) || 0;
            var colorB = (itemBConfig == null ? void 0 : itemBConfig.color) || 0;
            return colorB - colorA;
          });
          return vData;
        }

        /**
         * 检查背包是否有该物品
         * @param item_id 物品ID
         * @returns 是否有
         */;
        _proto.checkHaveEquipByItemId = function checkHaveEquipByItemId(item_id) {
          if (this.getBagItemByItemid(item_id)) return true;
          if (this.getWearEquipDataByItemId(item_id)) return true;
          return false;
        }

        /**
         * 检查背包是否已满
         * @param bag_type 背包类型
         * @returns 是否已满
         */;
        _proto.checkBagfull = function checkBagfull(bag_type) {
          if (bag_type === BagType.equip) {
            var map = this.getBagItemsMap(bag_type);
            if (!map) return false;
          }
          return false;
        }

        /**
         * 检查物品消耗列表是否足够
         * @param vCost 消耗列表 [[物品ID, 数量], ...]
         * @param andOr true=AND模式, false=OR模式
         * @returns 是否足够
         */;
        _proto.checkItemCost = function checkItemCost(vCost, andOr) {
          if (vCost === void 0) {
            vCost = [];
          }
          if (andOr === void 0) {
            andOr = true;
          }
          if (andOr) {
            // AND 模式：所有道具都必须足够
            for (var dx0 = 0; dx0 < vCost.length; dx0++) {
              var oCost = vCost[dx0];
              if (this.getItemCount(oCost[0]) < oCost[1]) {
                return false;
              }
            }
            return true;
          } else {
            // OR 模式：至少一个道具足够即可
            for (var _dx = 0; _dx < vCost.length; _dx++) {
              var _oCost = vCost[_dx];
              if (this.getItemCount(_oCost[0]) >= _oCost[1]) {
                return true;
              }
            }
            return false;
          }
        }

        /**
         * 检查物品是否足够 统一弹窗
         * @param itemid 物品ID
         * @param cost 数量
         * @param sTips 提示
         * @param popPanel 是否弹窗
         * @returns 是否足够
         */;
        _proto.checkPropEnough = function checkPropEnough(itemid, cost, sTips, popPanel) {
          if (sTips === void 0) {
            sTips = undefined;
          }
          if (popPanel === void 0) {
            popPanel = false;
          }
          var resCount = App.roleMgr.getPlayerResCount(itemid);
          var count = this.getItemCount(itemid);
          if (resCount >= cost || count >= cost) return true;
          if (sTips) {
            Prompt.popTip(sTips);
          }
          if (popPanel) {
            this.propNotEnough(itemid, cost);
          }
          return false;
        }

        /**
         * 检查物品消耗列表是否足够 统一弹窗
         * @param costList 消耗列表 [[物品ID, 数量], ...]
         * @param sTips 提示：true=默认提示，false=不提示，string=自定义提示
         * @param popPanel 是否打开获取途径弹窗
         * @returns 是否足够
         */;
        _proto.checkPropEnoughList = function checkPropEnoughList(costList, sTips, popPanel) {
          var _this2 = this;
          if (sTips === void 0) {
            sTips = false;
          }
          if (popPanel === void 0) {
            popPanel = false;
          }
          var _loop = function _loop() {
              var _step5$value = _step5.value,
                itemid = _step5$value[0],
                cost = _step5$value[1];
              if (_this2.getItemCount(itemid) >= cost) return 0; // continue
              var tipText = typeof sTips === "string" ? sTips : function () {
                var cfg = _this2.getItemConfig(itemid);
                return cfg ? "<b>" + cfg.name + " \u4E0D\u8DB3</b>" : "";
              }();
              if (sTips && tipText) UIUtil.showTip(tipText);
              if (popPanel) _this2.propNotEnough(itemid, cost);
              return {
                v: false
              };
            },
            _ret;
          for (var _iterator5 = _createForOfIteratorHelperLoose(costList), _step5; !(_step5 = _iterator5()).done;) {
            _ret = _loop();
            if (_ret === 0) continue;
            if (_ret) return _ret.v;
          }
          return true;
        }

        /**
         * 检查物品是否足够 统一弹窗
         * @param itemid 物品ID
         * @param cost 数量
         */;
        _proto.propNotEnough = function propNotEnough(itemid, cost) {
          var cfg = this.getItemConfig(itemid);
          if (!cfg || !cfg.getAccess) return;
          var itemData = {};
          itemData.itemid = itemid;
          UIMgr.inst.open(UI_ItemSourceView, LayerType.panel, Layout_UI_ItemSourceView, [itemData]);
        }

        /**
         * 道具不足弹窗
         * @param item_id 物品ID
         */;
        _proto.showItemDetailView = function showItemDetailView(item_id) {
          if (item_id) {
            var itemData = {};
            itemData.itemid = item_id;
            UIMgr.inst.open(UI_ItemDetailView, LayerType.panel, Layout_UI_ItemDetailView, [itemData]);
          }
        }
        /**
         * 道具来源弹窗
         * @param item_id 物品ID
         */;
        _proto.showItemResources = function showItemResources(item_id) {
          if (item_id) {
            var itemData = {};
            itemData.itemid = item_id;
            UIMgr.inst.open(UI_ItemSourceView, LayerType.panel, Layout_UI_ItemSourceView, [itemData]);
          }
        }

        /**
         * 批量更新背包物品
         * @param items 物品数组
         */;
        _proto.updateBagItemList = function updateBagItemList(items) {
          if (!items || items.length === 0) return;
          var hasAssetsChange = false;
          App.roleMgr.updatePlayerAsset(items);
          for (var _iterator6 = _createForOfIteratorHelperLoose(items), _step6; !(_step6 = _iterator6()).done;) {
            var item = _step6.value;
            if (!item || !item.itemid) continue;
            var itemConfig = this.getItemConfig(item.itemid);
            if (itemConfig && itemConfig.type === ItemType.assets) {
              hasAssetsChange = true;
              continue;
            }
            this.updateBagItem(item);
          }
          if (hasAssetsChange) {
            App.monitorMgr.dispatchEvent(EventType.web_player_assets_info);
          }
        }

        /**
         * 整理背包数据 - 清空并重新初始化所有背包数据
         * @param items 服务器返回的物品数组
         */;
        _proto.makeBagData = function makeBagData(items) {
          this._bag_items = [];
          if (!items || items.length === 0) return;
          this.updateBagItemList(items);
        }

        /**
         * 加载背包数据
         */;
        _proto.reqLoadBag = function reqLoadBag() {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUserLoadBag, {});
        }

        /**
         * 一键使用礼包
         */;
        _proto.reqAKeyUseGift = function reqAKeyUseGift() {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqAKeyUseGift, {});
        }

        /**
         * 使用可选礼包
         * @param giftId 礼包ID
         */;
        _proto.reqUseOptionalGift = function reqUseOptionalGift(giftId) {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUseOptionalGift, {
            gift_id: giftId
          });
        }

        /**
         * 碎片合成
         * @param fragmentId 碎片ID
         * @param count 合成数量
         */;
        _proto.reqFragmentCombine = function reqFragmentCombine(fragmentId, count) {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqFragmentCombine, {
            fragment_id: fragmentId,
            count: count
          });
        }

        /**
         * 请求使用道具
         * @param uid
         */;
        _proto.reqUseItem = function reqUseItem(uid) {
          var msg = {};
          msg.item_uid = uid;
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUseItem, msg);
        }

        /**
         * 请求使用道具返回
         * @param msg
         */;
        _proto.resUseItem = function resUseItem(msg) {
          if (msg.code !== 200) {
            App.log.logError(msg);
          }
        }

        /**
         * 通用奖励弹窗
         * @param msg
         * @returns
         */;
        _proto.resRewardPopup = function resRewardPopup(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6253\u5F00\u5956\u52B1\u5F39\u7A97\u5931\u8D25: code=" + msg.code);
            return;
          }
          UIMgr.inst.open(UI_GetRewardView, LayerType.panel, Layout_UI_GetRewardView, [msg.items]);
        }

        /**
         * 接收玩家背包数据
         */;
        _proto.recResUserLoadBag = function recResUserLoadBag(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u52A0\u8F7D\u80CC\u5305\u5931\u8D25: code=" + msg.code);
            return;
          }
          this.makeBagData(msg.items);
          App.monitorMgr.dispatchEvent(EventType.bag_update_list);
        }

        /**
         * 接收玩家背包数据变化通知
         */;
        _proto.recResUserbagchange = function recResUserbagchange(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u80CC\u5305\u6570\u636E\u53D8\u5316\u5931\u8D25: code=" + msg.code);
            return;
          }
          this.updateBagItemList(msg.items);
          App.monitorMgr.dispatchEvent(EventType.bag_update_list);
        };
        _proto.recResAKeyUseGift = function recResAKeyUseGift(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u4E00\u952E\u4F7F\u7528\u793C\u5305\u5931\u8D25: code=" + msg.code);
            return;
          }
          App.log.logBusiness("一键使用礼包成功");
        };
        _proto.recResUseOptionalGift = function recResUseOptionalGift(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u4F7F\u7528\u53EF\u9009\u793C\u5305\u5931\u8D25: code=" + msg.code);
            return;
          }
          App.log.logBusiness("使用可选礼包成功");
        };
        _proto.recResFragmentCombine = function recResFragmentCombine(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u788E\u7247\u5408\u6210\u5931\u8D25: code=" + msg.code);
            return;
          }
          App.log.logBusiness("碎片合成成功");
        };
        return BagMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BaseAi.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './BattleProprMgr.ts', './App.ts'], function (exports) {
  var _createClass, cclegacy, Vec3, DBRecord, BattlePropertyName, App;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "7299f7yTKNKMbLJWa9xq+P4", "BaseAi", undefined);
      var AI_BEHAVIOR = exports('AI_BEHAVIOR', /*#__PURE__*/function (AI_BEHAVIOR) {
        AI_BEHAVIOR[AI_BEHAVIOR["DAIJI"] = 0] = "DAIJI";
        AI_BEHAVIOR[AI_BEHAVIOR["YUHUI"] = 1] = "YUHUI";
        AI_BEHAVIOR[AI_BEHAVIOR["TUOZHAN"] = 2] = "TUOZHAN";
        AI_BEHAVIOR[AI_BEHAVIOR["GENSUI"] = 3] = "GENSUI";
        AI_BEHAVIOR[AI_BEHAVIOR["ZHUIJI"] = 4] = "ZHUIJI";
        AI_BEHAVIOR[AI_BEHAVIOR["GONGJI"] = 5] = "GONGJI";
        AI_BEHAVIOR[AI_BEHAVIOR["SKILL"] = 6] = "SKILL";
        AI_BEHAVIOR[AI_BEHAVIOR["CHASECHEST"] = 7] = "CHASECHEST";
        AI_BEHAVIOR[AI_BEHAVIOR["OPENCHEST"] = 8] = "OPENCHEST";
        AI_BEHAVIOR[AI_BEHAVIOR["UNDERATTACK"] = 9] = "UNDERATTACK";
        AI_BEHAVIOR[AI_BEHAVIOR["XUNLUO"] = 10] = "XUNLUO";
        AI_BEHAVIOR[AI_BEHAVIOR["SIWANG"] = 11] = "SIWANG";
        return AI_BEHAVIOR;
      }({}));

      // 0	无AI条件
      // 101	查找技能范围内是否有血量不满的友军
      // 102	查找自己的召唤物数量是否未超过上限		填写召唤物数量
      // 201	自己的血量万分比是否低于配置值		填写血量万分比
      // 202	自己的血量万分比是否高于配置值		填写血量万分比
      // 301	主动技能施放次数是否到达上限		填写上限值，施放后上限值清0
      // 302	自己身上是否有配置BUFF		填写BUFFID
      // 303	自己身上是否没有配置BUFF		填写BUFFID
      // 304	自己身上是否有配置BUFF组的任意BUFF		填写BUFF组ID
      // 305	自己身上是否没有配置BUFF组的任意BUFF		填写BUFF组ID
      // 306	检测上一个技能ID		填写技能ID
      // 307	目标身上是否有配置BUFF		填写BUFFID
      // 308	目标身上是否没有配置BUFF		填写BUFFID
      // 309	目标身上是否有配置BUFF组的任意BUFF		填写BUFF组ID
      // 310	目标身上是否没有配置BUFF组的任意BUFF		填写BUFF组ID
      // 311	普攻施放次数是否到达上限		填写上限值，施放后上限值清0
      // 312	场上有某种子弹		填写子弹id
      // 313	释放某个技能几秒后		填写技能id,秒数

      var BaseAi = exports('BaseAi', /*#__PURE__*/function () {
        function BaseAi() {
          this._owner = null;
          this.lastSkillId = 0;
          this._condtion = [];
          /** 技能使用次数 */
          this._skillUseTime = void 0;
          /** 普攻使用次数 */
          this._atkUseTime = void 0;
        }
        var _proto = BaseAi.prototype;
        _proto.init = function init(owner) {
          this._owner = owner;
          this._condtion = this.getAIByType(owner.roleVO.AIType);
          this._skillUseTime = 0;
          this.lastSkillId = 0;
          this._atkUseTime = 0;
        };
        _proto.getAIByType = function getAIByType(type) {
          var ai = DBRecord._getRes("AI");
          var list = [];
          for (var i in ai) {
            var data = ai[i];
            if (data.type === type) {
              list.push(data);
            }
          }
          // 测试用
          // return [];
          return list;
        };
        _proto.check = function check(skillVo) {
          if (this._condtion.length === 0) {
            return true;
          }
          var index = this._owner.roleVO.skillIDList.indexOf(skillVo.skillID);
          for (var i = 0; i < 3; i++) {
            var condtion = this._condtion[index]["AI_group" + (i + 1)];
            if (!condtion) continue;
            if (!this.checkCondtion(skillVo, condtion)) {
              return false;
            }
          }
          return true;
        };
        _proto.checkCondtion = function checkCondtion(skillVo, condtion) {
          for (var i = 0; i < condtion.length; i++) {
            var _condtion$i = condtion[i],
              id = _condtion$i[0],
              arg = _condtion$i[1],
              arg2 = _condtion$i[2];
            var func = this["_check_" + id];
            if (!func.call(this, skillVo, arg, arg2)) {
              return false;
            }
          }
          return true;
        }

        //检测无条件
        ;

        _proto._check_0 = function _check_0() {
          return true;
        }
        //检测友军血量
        ;

        _proto._check_101 = function _check_101(skillVo) {
          var range = skillVo.distance[1];
          var roles = App.battleMgr.roleCtrl.getRolesByType(this._owner.type);
          for (var i in roles) {
            var role = roles[i];
            var distance = Vec3.distance(this._owner.node.worldPosition, role.node.worldPosition);
            if (distance < range && role.roleVO.curHP < role.roleVO.getRoleAttr(BattlePropertyName.shengming)) {
              return true;
            }
          }
          return false;
        }

        //检测召唤物数量
        ;

        _proto._check_102 = function _check_102(skillVo, max) {
          var count = 0;
          var roles = App.battleMgr.roleCtrl.getRolesByType(this._owner.type);
          for (var i in roles) {
            var role = roles[i];
            if (role.masterId === this._owner.uid) {
              count++;
            }
          }
          return count < max;
        }

        //201	自己的血量万分比是否低于配置值		填写血量万分比
        ;

        _proto._check_201 = function _check_201(skillVo, max) {
          var count = this._owner.roleVO.curHP / this._owner.roleVO.getRoleAttr(BattlePropertyName.shengming) * 10000;
          return count < max;
        }

        //202	自己的血量万分比是否高于配置值		填写血量万分比
        ;

        _proto._check_202 = function _check_202(skillVo, max) {
          var count = this._owner.roleVO.curHP / this._owner.roleVO.getRoleAttr(BattlePropertyName.shengming) * 10000;
          return count > max;
        }

        // 301	主动技能施放次数是否到达上限		填写上限值，施放后上限值清0
        ;

        _proto._check_301 = function _check_301(skillVo, max) {
          return this._skillUseTime > 0 && this._skillUseTime % max === 0;
        }

        // 302	自己身上是否有配置BUFF		填写BUFFID
        ;

        _proto._check_302 = function _check_302(skillVo, buffID) {
          return this._owner._buffBox.getBuffById(buffID) !== null;
        }

        // 303	自己身上是否没有配置BUFF		填写BUFFID
        ;

        _proto._check_303 = function _check_303(skillVo, buffID) {
          return this._owner._buffBox.getBuffById(buffID) === null;
        }

        // 304	自己身上是否有配置BUFF组的任意BUFF		填写BUFF组ID
        ;

        _proto._check_304 = function _check_304(skillVo, groupID) {
          return this._owner._buffBox.getBuffGroupById(groupID) !== null;
        }

        // 305	自己身上是否没有配置BUFF组的任意BUFF		填写BUFF组ID
        ;

        _proto._check_305 = function _check_305(skillVo, groupID) {
          return this._owner._buffBox.getBuffGroupById(groupID) === null;
        }

        // 306	检测上一个技能ID		填写技能ID
        ;

        _proto._check_306 = function _check_306(skillVo, skillId) {
          // console.log('aiaiaiai  check', this.lastSkillId , skillId )
          var ret = this.lastSkillId === skillId;
          if (ret) {
            this._owner.publicSkillCd = 0;
          }
          return ret;
        }

        // 307	目标身上是否有配置BUFF		填写BUFFID
        ;

        _proto._check_307 = function _check_307(skillVo, buffID) {
          var _skillVo$getTarget;
          return ((_skillVo$getTarget = skillVo.getTarget()) == null ? void 0 : _skillVo$getTarget._buffBox.getBuffById(buffID)) !== null;
        }

        // 308	目标身上是否没有配置BUFF		填写BUFFID
        ;

        _proto._check_308 = function _check_308(skillVo, buffID) {
          var _skillVo$getTarget2;
          return ((_skillVo$getTarget2 = skillVo.getTarget()) == null ? void 0 : _skillVo$getTarget2._buffBox.getBuffById(buffID)) === null;
        }

        // 309	目标身上是否有配置BUFF组的任意BUFF		填写BUFF组ID
        ;

        _proto._check_309 = function _check_309(skillVo, groupID) {
          var _skillVo$getTarget3;
          return ((_skillVo$getTarget3 = skillVo.getTarget()) == null ? void 0 : _skillVo$getTarget3._buffBox.getBuffGroupById(groupID)) !== null;
        }

        // 310	目标身上是否没有配置BUFF组的任意BUFF		填写BUFF组ID
        ;

        _proto._check_310 = function _check_310(skillVo, groupID) {
          var _skillVo$getTarget4;
          return ((_skillVo$getTarget4 = skillVo.getTarget()) == null ? void 0 : _skillVo$getTarget4._buffBox.getBuffGroupById(groupID)) === null;
        }

        // 311	目标身上是否没有配置BUFF组的任意BUFF		填写BUFF组ID
        ;

        _proto._check_311 = function _check_311(skillVo, max) {
          return this._atkUseTime > 0 && this._atkUseTime % max === 0;
        }

        //312	场上有某种子弹		填写子弹id
        ;

        _proto._check_312 = function _check_312(skillVo, bulletId) {
          var bullets = App.battleMgr.bulletCtrl.getBulletsByBullId(bulletId);
          return bullets.length > 0;
        }

        // 313	释放某个技能几秒后		填写技能id,秒数
        ;

        _proto._check_313 = function _check_313(skillVo, skillId, second) {
          var skillTimeStamp = this._owner.useSkillTimeStamp[skillId];
          var now = Date.now();
          return skillTimeStamp && now - skillTimeStamp >= second * 1000;
        }

        // 314——
        ;

        _proto._check_314 = function _check_314(skillVo, skillId, second) {
          var skillTimeStamp = this._owner.useSkillTimeStamp[skillId];
          var now = Date.now();
          return skillTimeStamp && now - skillTimeStamp <= second * 1000;
        };
        _createClass(BaseAi, [{
          key: "condtion",
          get: function get() {
            return this._condtion;
          },
          set: function set(value) {
            this._condtion = value;
          }
        }, {
          key: "skillUseTime",
          get: function get() {
            return this._skillUseTime;
          },
          set: function set(value) {
            this._skillUseTime = value;
          }
        }, {
          key: "atkUseTime",
          get: function get() {
            return this._atkUseTime;
          },
          set: function set(value) {
            this._atkUseTime = value;
          }
        }]);
        return BaseAi;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BaseSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './Item_BattleMap.ts', './UIMgr.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, sp, UITransform, UIOpacity, builtinResMgr, Material, Color, Component, ModuleDef, Item_BattleMap, UIMgr, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      sp = module.sp;
      UITransform = module.UITransform;
      UIOpacity = module.UIOpacity;
      builtinResMgr = module.builtinResMgr;
      Material = module.Material;
      Color = module.Color;
      Component = module.Component;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      Item_BattleMap = module.Item_BattleMap;
    }, function (module) {
      UIMgr = module.UIMgr;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "e536d7crf5JopUu4stqrzXE", "BaseSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /** spine基类 */
      var BaseSpine = exports('BaseSpine', (_dec = ccclass("BaseSpine"), _dec2 = property({
        type: sp.Skeleton
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BaseSpine, _Component);
        function BaseSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 骨骼对象 */
          _initializerDefineProperty(_this, "skeleton", _descriptor, _assertThisInitialized(_this));
          _this._partId = 0;
          //0-通常；11-翅膀
          /** 透明度 */
          _this._alpha = void 0;
          /** 缩放 */
          _this._sacle = void 0;
          /** 是否翻转 */
          _this._isFlipX = false;
          /** 是否置灰 */
          _this._isGray = false;
          /** 是否阴影化 */
          _this._isShadow = false;
          /** 当前Spine动画使用的皮肤 */
          _this._skinName = "";
          return _this;
        }
        var _proto = BaseSpine.prototype;
        _proto.start = function start() {};
        _proto.onDestroy = function onDestroy() {};
        _proto.reset = function reset() {
          this.clearAllAnimation();
          this.clearAllHandler();
          this.stopAllTrack();
          this._skinName = "";
          this.playRate = 1;
          this.isGray = false;
          this.isShadow = false;
          this.isFlipX = false;
          this.pause = false;
          this.skeleton.skeletonData = null;
          // this.skeleton.setSkin('')
        }

        /** 当前正在播放的动画名 */;
        /**
         * 加载骨骼数据
         * @param path 目录
         * @param onCompleted 成功回调
         * @param onFaild 失败回调
         */
        _proto.loadSkeletonData = function loadSkeletonData(path, onCompleted, onFaild, bundleName) {
          var _this2 = this;
          this.skeleton.skeletonData = null;
          if (typeof path !== "string" || path === "") {
            var _err = new Error();
            _err.message = "path:" + path;
            onFaild == null || onFaild(_err);
            return;
          }
          var bundleStr = bundleName ? bundleName : ModuleDef.SPINE;
          App.resMgr.loadAsset(bundleStr, path, sp.SkeletonData, null, function (err, res) {
            if (err) {
              onFaild == null || onFaild(err);
              return;
            }
            if (_this2 && _this2.skeleton) {
              _this2.skeleton.skeletonData = res;
              _this2.skeleton.setAnimationCacheMode(sp.AnimationCacheMode.REALTIME);
            }
            onCompleted == null || onCompleted();
          });
        }

        /**
         * 加载英雄骨骼数据
         * @param path 目录
         * @param onCompleted 成功回调
         * @param onFaild 失败回调
         */;
        _proto.loadHeroSkeletonData = /*#__PURE__*/
        function () {
          var _loadHeroSkeletonData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, onCompleted, onFaild) {
            var _this3 = this;
            var _err2, bundle;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  this.skeleton.skeletonData = null;
                  if (!(typeof path !== "string" || path === "")) {
                    _context.next = 6;
                    break;
                  }
                  _err2 = new Error();
                  _err2.message = "path:" + path;
                  onFaild == null || onFaild(_err2);
                  return _context.abrupt("return");
                case 6:
                  if (!(this && this.skeleton)) {
                    _context.next = 17;
                    break;
                  }
                  if (!Item_BattleMap.heroAsset[path]) {
                    _context.next = 12;
                    break;
                  }
                  this.skeleton.skeletonData = Item_BattleMap.heroAsset[path];
                  onCompleted == null || onCompleted();
                  _context.next = 17;
                  break;
                case 12:
                  console.log("============================>> loadHeroSkeletonData:", path, "没有资源，重新加载");
                  _context.next = 15;
                  return UIMgr.inst.asyncGetBundle(ModuleDef.HERO);
                case 15:
                  bundle = _context.sent;
                  bundle.load(path + "/" + path, sp.SkeletonData, null, function (err, res) {
                    if (err) {
                      onFaild == null || onFaild(err);
                      return;
                    }
                    Item_BattleMap.heroAsset[path] = res;
                    if (_this3 && _this3.skeleton) {
                      _this3.skeleton.skeletonData = res;
                      _this3.skeleton.setAnimationCacheMode(sp.AnimationCacheMode.REALTIME);
                    }
                    onCompleted == null || onCompleted();
                  });
                case 17:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function loadHeroSkeletonData(_x, _x2, _x3) {
            return _loadHeroSkeletonData.apply(this, arguments);
          }
          return loadHeroSkeletonData;
        }()
        /**
         * 加载士兵骨骼数据
         * @param path 目录
         * @param onCompleted 成功回调
         * @param onFaild 失败回调
         */;

        _proto.loadSoldierSkeletonData = /*#__PURE__*/
        function () {
          var _loadSoldierSkeletonData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(path, onCompleted, onFaild) {
            var _this4 = this;
            var _err3, bundle;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  this.skeleton.skeletonData = null;
                  if (!(typeof path !== "string" || path === "")) {
                    _context2.next = 6;
                    break;
                  }
                  _err3 = new Error();
                  _err3.message = "path:" + path;
                  onFaild == null || onFaild(_err3);
                  return _context2.abrupt("return");
                case 6:
                  if (!(this && this.skeleton)) {
                    _context2.next = 17;
                    break;
                  }
                  if (!Item_BattleMap.soldierAsset[path]) {
                    _context2.next = 12;
                    break;
                  }
                  this.skeleton.skeletonData = Item_BattleMap.soldierAsset[path];
                  onCompleted == null || onCompleted();
                  _context2.next = 17;
                  break;
                case 12:
                  console.log("============================>> loadHeroSkeletonData:", path, "没有资源，重新加载");
                  _context2.next = 15;
                  return UIMgr.inst.asyncGetBundle(ModuleDef.SOLDIER);
                case 15:
                  bundle = _context2.sent;
                  bundle.load(path + "/" + path, sp.SkeletonData, null, function (err, res) {
                    if (err) {
                      onFaild == null || onFaild(err);
                      return;
                    }
                    Item_BattleMap.soldierAsset[path] = res;
                    if (_this4 && _this4.skeleton) {
                      _this4.skeleton.skeletonData = res;
                      _this4.skeleton.setAnimationCacheMode(sp.AnimationCacheMode.REALTIME);
                    }
                    onCompleted == null || onCompleted();
                  });
                case 17:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function loadSoldierSkeletonData(_x4, _x5, _x6) {
            return _loadSoldierSkeletonData.apply(this, arguments);
          }
          return loadSoldierSkeletonData;
        }()
        /**
         * 加载怪物骨骼数据
         * @param path 目录
         * @param onCompleted 成功回调
         * @param onFaild 失败回调
         */;

        _proto.loadMonsterSkeletonData = /*#__PURE__*/
        function () {
          var _loadMonsterSkeletonData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(path, onCompleted, onFaild) {
            var _this5 = this;
            var _err4, bundle;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  this.skeleton.skeletonData = null;
                  if (!(typeof path !== "string" || path === "")) {
                    _context3.next = 6;
                    break;
                  }
                  _err4 = new Error();
                  _err4.message = "path:" + path;
                  onFaild == null || onFaild(_err4);
                  return _context3.abrupt("return");
                case 6:
                  if (!(this && this.skeleton)) {
                    _context3.next = 16;
                    break;
                  }
                  if (!Item_BattleMap.monsterAsset[path]) {
                    _context3.next = 12;
                    break;
                  }
                  this.skeleton.skeletonData = Item_BattleMap.monsterAsset[path];
                  onCompleted == null || onCompleted();
                  _context3.next = 16;
                  break;
                case 12:
                  _context3.next = 14;
                  return UIMgr.inst.asyncGetBundle(ModuleDef.MONSTER);
                case 14:
                  bundle = _context3.sent;
                  bundle.load(path + "/" + path, sp.SkeletonData, null, function (err, res) {
                    if (err) {
                      onFaild == null || onFaild(err);
                      return;
                    }
                    Item_BattleMap.monsterAsset[path] = res;
                    if (_this5 && _this5.skeleton) {
                      _this5.skeleton.skeletonData = res;
                      _this5.skeleton.setAnimationCacheMode(sp.AnimationCacheMode.REALTIME);
                    }
                    onCompleted == null || onCompleted();
                  });
                case 16:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this);
          }));
          function loadMonsterSkeletonData(_x7, _x8, _x9) {
            return _loadMonsterSkeletonData.apply(this, arguments);
          }
          return loadMonsterSkeletonData;
        }()
        /**
         * 加载怪物骨骼数据
         * @param path 目录
         * @param onCompleted 成功回调
         * @param onFaild 失败回调
         */;

        _proto.loadMonsterSkeletonData2 = function loadMonsterSkeletonData2(path, onCompleted, onFaild) {
          var _this6 = this;
          this.skeleton.skeletonData = null;
          if (typeof path !== "string" || path === "") {
            var _err5 = new Error();
            _err5.message = "path:" + path;
            onFaild == null || onFaild(_err5);
            return;
          }
          App.resMgr.loadAsset("HuoBan", path + "/" + path, sp.SkeletonData, null, function (err, res) {
            if (err) {
              onFaild == null || onFaild(err);
              return;
            }
            if (_this6 && _this6.skeleton) {
              _this6.skeleton.skeletonData = res;
              _this6.skeleton.setAnimationCacheMode(sp.AnimationCacheMode.REALTIME);
            }
            onCompleted == null || onCompleted();
          });
        }

        /** 设置皮肤 */;
        _proto.setSkin = function setSkin(skinName) {
          this._skinName = skinName;
          if (this._skinName !== null && this._skinName !== "") {
            var _this$skeleton$_skele;
            var skins = this.skeleton.skeletonData.getSkinsEnum();
            if (skins !== null && skins[skinName] !== null && this.skeleton._skeleton !== null && ((_this$skeleton$_skele = this.skeleton._skeleton.skin) == null ? void 0 : _this$skeleton$_skele.name) !== skinName) {
              this.skeleton.setSkin(this._skinName);
            }
          }
        }

        /**
         * 播放默认动画（排序第一的动画）
         * @param loop 是否循环
         */;
        _proto.playDefault = function playDefault(loop) {
          this.playByIndex(1, loop, 0);
        }

        /**
         * 播放动画
         * @param animationIndex 动画名称索引
         * @param loop 是否循环
         * @param trackIndex 队列索引
         */;
        _proto.playByIndex = function playByIndex(animationIndex, loop, trackIndex) {
          if (trackIndex === void 0) {
            trackIndex = 0;
          }
          if (!this.skeleton || !this.skeleton.skeletonData) return;
          var animsEnum = this.skeleton.skeletonData.getAnimsEnum();
          var name = String(animsEnum[animationIndex]);
          this.play(name, loop, trackIndex);
        }

        /**
         * 播放动画
         * @param animationName 动画名
         * @param loop 是否循环
         * @param _trackIndex 队列
         */;
        _proto.play = function play(animationName, loop, _trackIndex) {
          // if (this._partId == WINGS_PART) {
          //     //翅膀不能与动作融合
          //     if (animationName.endsWith('_Move')) {
          //         animationName = 'Move';
          //     } else if (animationName.endsWith('_Idle')) {
          //         animationName = 'Idle';
          //     }
          // }
          // if (!this.skeleton.getComponent(sp.Skeleton).findAnimation(animationName)) return;
          if (!this.skeleton.findAnimation(animationName)) return;
          if (this.skeleton.paused) {
            this.skeleton.paused = false;
          }
          this.clearAllAnimation();
          this.skeleton.setAnimation(0, animationName, loop);
        }

        /** 停止播放 */;
        _proto.stop = function stop(trackIndex) {
          if (trackIndex === void 0) {
            trackIndex = 0;
          }
          this.skeleton.clearTrack(trackIndex);
        }

        /** 停止所有的动画轨道 */;
        _proto.stopAllTrack = function stopAllTrack() {
          this.skeleton.clearTracks();
        }

        /**
         * 添加融合动画
         * @param animationName 动画名称
         * @param loop 是否循环，默认为true
         * @param trackIndex 轨道索引，默认为0
         */;
        _proto.addAnimation = function addAnimation(animationName, loop, trackIndex) {
          if (loop === void 0) {
            loop = true;
          }
          // if (!this.skeleton.getComponent(sp.Skeleton).findAnimation(animationName)) return;

          // if (this._partId == WINGS_PART) {
          //     //翅膀不能与动作融合
          //     if (animationName.endsWith('_Move')) {
          //         animationName = 'Move';
          //     } else if (animationName.endsWith('_Idle')) {
          //         animationName = 'Idle';
          //     }
          //     if (this.skeleton.findAnimation(animationName)) {
          //         this.skeleton.setAnimation(0, animationName, loop);
          //     }
          //     return;
          // }
          // 添加的通道索引
          if (!this.skeleton.findAnimation(animationName)) {
            return;
          }
          var state = this.skeleton.getState();
          if (!state) {
            return;
          }
          var index = trackIndex !== undefined ? trackIndex : state.tracks.length;
          this.skeleton.addAnimation(index, animationName, loop);
        }

        /**
         * 清除单一动画
         * @param animationName 清除的动画名称
         */;
        _proto.clearAnimation = function clearAnimation(animationName) {
          var state = this.skeleton.getState();
          if (!state) {
            return;
          }
          var tracks = state.tracks;
          //console.log('清除动画', animationName, '轨道', tracks.length);
          for (var _iterator = _createForOfIteratorHelperLoose(tracks), _step; !(_step = _iterator()).done;) {
            var value = _step.value;
            if (!!value && value.animation.name === animationName) {
              this.skeleton.clearAnimation(value.trackIndex);
              break;
            }
          }
        }

        /**
         * 清除所有动画
         */;
        _proto.clearAllAnimation = function clearAllAnimation() {
          this.skeleton.clearAnimations();
        }

        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.skeleton.getComponent(UITransform).getBoundingBoxToWorld();
        }

        /**
         * 清理所有回调函数
         */;
        _proto.clearAllHandler = function clearAllHandler() {
          this.setStartHandler(null);
          this.setCompleteHandler(null);
          this.setInterruptHandler(null);
          this.setFrameEventHandler(null);
        }

        /**
         * 用来设置开始播放动画的事件监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setStartHandler = function setStartHandler(handler) {
          if (typeof handler !== "function") {
            this.skeleton.setStartListener(null);
            return;
          }
          this.skeleton.setStartListener(function (trace) {
            handler(trace);
          });
        }

        /**
         * 用来设置动画播放一次循环结束后的事件监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setCompleteHandler = function setCompleteHandler(handler) {
          if (typeof handler !== "function") {
            this.skeleton.setCompleteListener(null);
            return;
          }
          this.skeleton.setCompleteListener(function (trace) {
            handler(trace);
          });
        }

        /**
         * 用来设置动画被打断的事件监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setInterruptHandler = function setInterruptHandler(handler) {
          var _this7 = this;
          if (typeof handler !== "function") {
            this.skeleton.setInterruptListener(null);
            return;
          }
          this.skeleton.setInterruptListener(function () {
            handler(_this7);
          });
        }

        /**
         * 用来设置动画播放过程中帧事件的监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setFrameEventHandler = function setFrameEventHandler(handler) {
          if (typeof handler !== "function") {
            this.skeleton.setEventListener(null);
            return;
          }
          this.skeleton.setEventListener(function (trackEntry, event) {
            handler(trackEntry, event);
          });
        }

        /**
         * @param skinName 要替换的部件皮肤名称
         * @param slotName 要替换的部件的插槽名称
         * @param targetAttaName  Spine中皮肤占位符的名字
         */;
        _proto.changeSlot = function changeSlot(skinName, slotName, targetAttaName) {
          //查找局部皮肤
          var skeletonData = this.skeleton.skeletonData.getRuntimeData();
          var targetSkin = skeletonData.findSkin(skinName);

          //查找局部皮肤下的插槽与附件
          var targetSkinSlotIndex = skeletonData.findSlotIndex(slotName);
          if (targetSkin && targetSkinSlotIndex > -1) {
            var atta = targetSkin.getAttachment(targetSkinSlotIndex, targetAttaName);

            //查找全身皮肤下的插槽
            var curSlot = this.skeleton.findSlot(slotName);

            //替换全身皮肤插槽的附件
            curSlot && curSlot.setAttachment(atta);
          }
        };
        _proto.setTimeScale = function setTimeScale(timeScale) {
          this.skeleton.timeScale = timeScale;
        }

        /**
         * 获取当前正在播放的动画
         * @returns
         */;
        _proto.getAllPlayingAnimation = function getAllPlayingAnimation() {
          var animations = [];
          var state = this.skeleton.getState();
          if (state && state.tracks) {
            // 遍历所有轨道获取正在播放的动画
            for (var i = 0; i < state.tracks.length; i++) {
              var track = state.tracks[i];
              if (track && track.animation) {
                animations.push(track.animation.name);
              }
            }
          }
          console.log("当前正在播放的动画：", animations);
          return animations;
        }

        /**
         * 检查太刀玩家是否正在攻击、技能动作，此时隐藏背后的武器模型
         * @returns
         */;
        _proto.checkPlayerAttack = function checkPlayerAttack() {
          return true;
          ////this.getAllPlayingAnimation();
          // const state = this.skeleton.getState();
          // if (state && state.tracks) {
          //     for (let i = 0; i < state.tracks.length; i++) {
          //         const track = state.tracks[i];
          //         if (
          //             track &&
          //             track.animation &&
          //             (track.animation.name == 'TaiDao_Skill' ||
          //                 track.animation.name == 'TaiDao_Skill2' ||
          //                 track.animation.name == 'TaiDao_Skill3' ||
          //                 track.animation.name == 'TaiDao_Buff' ||
          //                 track.animation.name == 'TaiDao_Attack')
          //         ) {
          //             return true;
          //         }
          //     }
          // }
          // return false;
        };

        _createClass(BaseSpine, [{
          key: "animation",
          get: function get() {
            return this.skeleton.animation;
          }

          /** 当前动作时长 */
        }, {
          key: "duration",
          get: function get() {
            return this.skeleton.getCurrent(0).animation.duration;
          }

          /** 当前动作播放了多久 */
        }, {
          key: "playTime",
          get: function get() {
            return this.skeleton.getCurrent(0).trackTime;
          }

          /** 暂停 */
        }, {
          key: "pause",
          get: function get() {
            return this.skeleton.paused;
          },
          set: function set(v) {
            this.skeleton.paused = v;
          }
        }, {
          key: "partId",
          set: function set(v) {
            this._partId = v;
          }

          /** 播放速率 */
        }, {
          key: "playRate",
          get: function get() {
            return this.skeleton.timeScale;
          },
          set: function set(v) {
            this.skeleton.timeScale = v;
          }

          /** 宽度 */
        }, {
          key: "width",
          get: function get() {
            return this.skeleton.getComponent(UITransform).width;
          }

          /** 高度 */
        }, {
          key: "height",
          get: function get() {
            return this.skeleton.getComponent(UITransform).height;
          }

          /** 设置透明度（0-1） */
        }, {
          key: "alpha",
          get: function get() {
            return this._alpha;
          },
          set: function set(v) {
            this._alpha = v;
            var opacity = this.node.getComponent(UIOpacity);
            if (!opacity) {
              opacity = this.node.addComponent(UIOpacity);
            }
            opacity.opacity = v * 255;
          }

          /** 设置缩放 */
        }, {
          key: "scale",
          get: function get() {
            return this._sacle;
          },
          set: function set(v) {
            if (this._sacle === v) return;
            this._sacle = v;
            this.node.setScale(this._sacle, this._sacle, this.node.scale.z);
          }

          /** 设置置灰 */
        }, {
          key: "isGray",
          set: function set(v) {
            v = !!v;
            if (this._isGray === v) return;
            this._isGray = v;
            if (this._isGray) {
              var srcMat = builtinResMgr.get("ui-sprite-gray-material");
              var mat = new Material();
              mat.copy(srcMat);
              this.skeleton.customMaterial = mat;
            } else {
              if (this.skeleton.customMaterial) {
                this.skeleton.customMaterial.destroy();
              }
              this.skeleton.customMaterial = null;
            }
          }

          /** 是否镜像翻转 */
        }, {
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-this.node.scale.x, this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }

          /**
           * 设置阴影化
           */
        }, {
          key: "isShadow",
          get: function get() {
            return this._isShadow;
          },
          set: function set(isShadow) {
            isShadow = !!isShadow;
            if (this._isShadow === isShadow) return;
            this._isShadow = isShadow;
            this.skeleton.color = new Color(this._isShadow ? "#000000CC" : "#FFFFFF");
          }
        }]);
        return BaseSpine;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "skeleton", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleBigMap.ts", ['cc'], function (exports) {
  var cclegacy, v2, UITransform, v3, instantiate, Label, Sprite, color;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      v2 = module.v2;
      UITransform = module.UITransform;
      v3 = module.v3;
      instantiate = module.instantiate;
      Label = module.Label;
      Sprite = module.Sprite;
      color = module.color;
    }],
    execute: function () {
      var _class;
      cclegacy._RF.push({}, "4299aPC4gVKSq/XYkZaH49W", "BattleBigMap", undefined);

      /**
       * 整个关卡的物理层数据
       */
      var BattleBigMap = exports('BattleBigMap', /*#__PURE__*/function () {
        function BattleBigMap() {
          /**
           * 物理层数据,只保存可行走的格子行列值：{列,行}。
           * 一个{列,行}数据存储为一个string。
           * 允许负数行列值，方便和怪物的实际坐标转换。
           */
          this.bigMapPhysicsData = new Set();
          /** 格子大小 */
          this.tileSize = void 0;
          /**调试路径用的贴图 */
          this.debugPathSprite = void 0;
          /**调试物理层用的贴图 */
          this.debugPhysicsSprite = void 0;
          /**调试路径用的层 */
          this.debugLayer = void 0;
          /**贴图列表 */
          this.debugSpriteList = [];
          /**物理层key temp */
          this.phyKeyStrTemp = "";
        }
        BattleBigMap.getInstance = function getInstance() {
          if (this._instance === undefined) {
            this._instance = new this();
          }
          return this._instance;
        };
        var _proto = BattleBigMap.prototype;
        /**
         * 添加单个地块的物理层数据到bigMapPhysicsData中
         * @param x
         * @param y
         * @param tiledMap
         */
        _proto.addMapPhysicsData = function addMapPhysicsData(x, y, tiledMap, mapName) {
          var mapHeight = tiledMap.getMapSize().height;
          var mapWidth = tiledMap.getMapSize().width;
          var tiles = tiledMap.getLayer("physicalLayer").tiles;
          var tileSize = tiledMap.getTileSize().width;
          this.tileSize = tileSize;
          var startRow = Math.trunc(y / tileSize);
          var startColumn = Math.trunc(x / tileSize);
          var debugPhysicsList = [];
          //从地块底部逐行遍历
          for (var row = mapHeight - 1; row >= 0; row--) {
            for (var column = 0; column < mapWidth; column++) {
              if (tiles[row * mapWidth + column] > 0) {
                var columnInBigMap = startColumn + column;
                //TiledMap的Y坐标向下，行数需要倒序
                var rowInBigMap = startRow + mapHeight - 1 - row;
                var pyhKey = columnInBigMap + "_" + rowInBigMap;
                this.bigMapPhysicsData.add(pyhKey);
                debugPhysicsList.push([startColumn + column, startRow + mapHeight - 1 - row]);
              }
            }
          }
          this.showDebugPhysics(debugPhysicsList);
          //log("-------->addMapPhysicsData,x,y,w,h,startRow,startColumn",mapName,x,y,mapWidth,mapHeight,startRow,startColumn,this.bigMapPhysicsData.size);
        }

        /**
         * 清除大地图物理层数据
         */;
        _proto.clearMapPhysicsData = function clearMapPhysicsData() {
          this.bigMapPhysicsData.clear();
        }

        /**
         * 修改物理层数据
         * @param column y 世界坐标
         * @param val 0不可行走 1可行走
         */;
        _proto.modifyMapPhysicsData = function modifyMapPhysicsData(column, row, tiledMap, val) {
          if (val === void 0) {
            val = 0;
          }
          var pos = this.tileGridToBigMapGrid(column, row, tiledMap);
          var phyKeyStr = pos.x + "_" + pos.y;
          //console.log('------------> modifyMapPhysicsData:', val == 0 ? '阻挡' : '可行走', this.bigMapPhysicsData.has(key), pos.x, pos.y);
          if (val == 0) {
            this.bigMapPhysicsData["delete"](phyKeyStr);
            // this.setTestPhysicsTile(pos.x*this.tileSize,pos.y*this.tileSize,"#ffffff")
          } else {
            this.bigMapPhysicsData.add(phyKeyStr);
            // this.setTestPhysicsTile(pos.x*this.tileSize,pos.y*this.tileSize,"#ff0000")
          }
        }

        /**大地图坐标转成大地图的行列 */;
        _proto.pointToBigMapGrid = function pointToBigMapGrid(point) {
          var x = Math.trunc(point.x / this.tileSize);
          if (point.x < 0 && Math.abs(point.x) % this.tileSize != 0) {
            x -= 1;
          }
          var y = Math.trunc(point.y / this.tileSize);
          if (point.y < 0 && Math.abs(point.y) % this.tileSize != 0) {
            y -= 1;
          }
          return v2(x, y);
        }

        /**格子是否阻挡 */;
        _proto.isBlock = function isBlock(x, y) {
          this.phyKeyStrTemp = x + "_" + y;
          return !this.bigMapPhysicsData.has(this.phyKeyStrTemp);
        }

        /**
         * tileMap的行列转成大地图的行列
         * @param column
         * @param row
         * @param tiledMap
         * @returns
         */;
        _proto.tileGridToBigMapGrid = function tileGridToBigMapGrid(column, row, tiledMap) {
          row = tiledMap.getMapSize().height - row - 1;
          var x = column * this.tileSize;
          var y = row * this.tileSize;
          var pos = tiledMap.getComponent(UITransform).convertToWorldSpaceAR(v3(x, y, 0));
          var grid = this.pointToBigMapGrid(pos);
          return grid;
        };
        _proto.initDebugPathSprite = function initDebugPathSprite(debugSprite) {
          this.debugPathSprite = debugSprite;
        };
        _proto.initDebugPhysicsSprite = function initDebugPhysicsSprite(debugSprite) {
          this.debugPhysicsSprite = debugSprite;
        };
        _proto.initDebugLayer = function initDebugLayer(layer) {
          this.debugLayer = layer;
        }

        /**
         * 显示路径
         * @param path
         */;
        _proto.showDebugPath = function showDebugPath(path) {
          if (!this.debugPathSprite || !this.debugPathSprite.isValid || !this.debugLayer || !this.debugLayer.isValid) {
            return;
          }
          var angleMap = {
            "1_0": 0,
            "1_1": 45,
            "0_1": 90,
            "-1_1": 135,
            "-1_0": 180,
            "-1_-1": 225,
            "0_-1": 270,
            "1_-1": 315
          };
          var colorNum;
          // for (const element of this.debugSpriteList) {
          //     element.removeFromParent();
          // }
          var debugSpriteList = [];
          for (var index = 0; index < path.length; index++) {
            var xDir = 2;
            var yDir = 2;
            if (index < path.length - 1) {
              xDir = path[index + 1].x > path[index].x ? 1 : path[index + 1].x < path[index].x ? -1 : 0;
              yDir = path[index + 1].y > path[index].y ? 1 : path[index + 1].y < path[index].y ? -1 : 0;
            }
            colorNum = index == 0 ? 0x3fca33 : index == path.length - 1 ? 0xffff7f : 0x202e00;
            var key = xDir.toString() + "_" + yDir.toString();
            this.addDebugPathGrid(path[index].x, path[index].y, path.length, "#" + colorNum.toString(16), angleMap[key], debugSpriteList);
          }
          setTimeout(function () {
            for (var _i = 0, _debugSpriteList = debugSpriteList; _i < _debugSpriteList.length; _i++) {
              var element = _debugSpriteList[_i];
              element.removeFromParent();
            }
            debugSpriteList.length = 0;
          }, 1500);
        }

        /**
         * 添加路径格子贴图
         * @param x
         * @param y
         * @param len 路径长度
         * @param colorStr
         * @param angle 箭头朝向
         * @param list
         */;
        _proto.addDebugPathGrid = function addDebugPathGrid(x, y, len, colorStr, angle, list) {
          var spriteNode = instantiate(this.debugPathSprite);
          spriteNode.active = true;
          spriteNode.parent = this.debugLayer;
          spriteNode.setPosition(x * this.tileSize, y * this.tileSize, 0);
          spriteNode.getChildByName("Label").getComponent(Label).string = len.toString();
          spriteNode.getComponent(Sprite).color = color(colorStr);
          if (angle == undefined) {
            spriteNode.getChildByName("Sprite").active = false;
          } else {
            spriteNode.getChildByName("Sprite").angle = angle;
          }
          this.debugSpriteList.push(spriteNode);
          list.push(spriteNode);
        }

        /**
         * 显示物理层
         */;
        _proto.showDebugPhysics = function showDebugPhysics(list) {
          if (!BattleBigMap.SHOW_PHYSICS_SPRITE) {
            return;
          }
          if (!this.debugPhysicsSprite || !this.debugPhysicsSprite.isValid || !this.debugLayer || !this.debugLayer.isValid) {
            return;
          }
          for (var index = 0; index < list.length; index++) {
            var x = list[index][0];
            var y = list[index][1];
            var spriteNode = instantiate(this.debugPhysicsSprite);
            spriteNode.active = true;
            spriteNode.parent = this.debugLayer;
            spriteNode.setPosition(x * this.tileSize, y * this.tileSize, 0);
            if (BattleBigMap.SHOW_PHYSICS_ROW_COL) {
              spriteNode.getChildByName("row").getComponent(Label).string = y.toString();
              spriteNode.getChildByName("col").getComponent(Label).string = x.toString();
            } else {
              spriteNode.getChildByName("row").active = false;
              spriteNode.getChildByName("col").active = false;
            }
          }
        }

        /**
         * 锁住当前地图块的四周出口，boss战时调用
         */;
        _proto.lockCurMap = function lockCurMap(tiledMap) {
          var _mapHeight = tiledMap.getMapSize().height;
          var _mapWidth = tiledMap.getMapSize().width;
          for (var row = 0; row < _mapHeight; row++) {
            this.modifyMapPhysicsData(0, row, tiledMap, 0);
            this.modifyMapPhysicsData(_mapWidth - 1, row, tiledMap, 0);
          }
          for (var col = 0; col < _mapWidth; col++) {
            this.modifyMapPhysicsData(col, 0, tiledMap, 0);
            this.modifyMapPhysicsData(col, _mapHeight - 1, tiledMap, 0);
          }
        };
        return BattleBigMap;
      }());
      _class = BattleBigMap;
      BattleBigMap._instance = new _class();
      /**显示路径贴图 */
      BattleBigMap.SHOW_PATH_SPRITE = false;
      /**显示物理层贴图 */
      BattleBigMap.SHOW_PHYSICS_SPRITE = false;
      /**显示物理层行列 */
      BattleBigMap.SHOW_PHYSICS_ROW_COL = false;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleCtrlView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './JoystickItem.ts', './BattleDefine.ts', './App.ts', './EventType.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, UITransform, View, Vec3, Component, JoystickItem, GameBattle, App, EventType;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      UITransform = module.UITransform;
      View = module.View;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      JoystickItem = module.JoystickItem;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "99a78qUZDhGeK+0gHNFqfdL", "BattleCtrlView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleCtrlView = exports('BattleCtrlView', (_dec = ccclass("BattleCtrlView"), _dec2 = property({
        type: JoystickItem
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleCtrlView, _Component);
        function BattleCtrlView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "joystickItem", _descriptor, _assertThisInitialized(_this));
          _this._onTouchNPC = false;
          return _this;
        }
        var _proto = BattleCtrlView.prototype;
        _proto.onLoad = function onLoad() {
          this.node.on(Node.EventType.TOUCH_START, this._onTouchStart, this);
          this.node.on(Node.EventType.TOUCH_MOVE, this._onTouchMove, this);
          this.node.on(Node.EventType.TOUCH_END, this._onTouchEnd, this);
          this.node.on(Node.EventType.TOUCH_CANCEL, this._onTouchCancel, this);
          var vJoyPos = new Array();
          var uitrans = this.node.getComponent(UITransform);
          var screenHeight = View.instance.getVisibleSize().height;
          var baseY = -(screenHeight / 2) + 350;
          vJoyPos[0] = uitrans.convertToWorldSpaceAR(new Vec3(0, baseY, 0));
          vJoyPos[1] = uitrans.convertToWorldSpaceAR(new Vec3(-200, baseY, 0));
          vJoyPos[2] = uitrans.convertToWorldSpaceAR(new Vec3(0, baseY, 0));
          vJoyPos[3] = uitrans.convertToWorldSpaceAR(new Vec3(200, baseY, 0));
          this.joystickItem.initJoyPos(vJoyPos);
          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
            this.node.active = false;
          }
        };
        _proto.onDestroy = function onDestroy() {
          this.node.off(Node.EventType.TOUCH_START, this._onTouchStart, this);
          this.node.off(Node.EventType.TOUCH_MOVE, this._onTouchMove, this);
          this.node.off(Node.EventType.TOUCH_END, this._onTouchEnd, this);
          this.node.off(Node.EventType.TOUCH_CANCEL, this._onTouchCancel, this);
        };
        _proto._onTouchStart = function _onTouchStart(event) {
          var uitrans = this.node.getComponent(UITransform);
          var uiPos = event.getUILocation();
          var worldPos = uitrans.convertToNodeSpaceAR(new Vec3(uiPos.x, uiPos.y));
          worldPos = uitrans.convertToWorldSpaceAR(worldPos);
          App.monitorMgr.dispatchEvent(EventType.joystick_touch_start);
          this.joystickItem.onStart(worldPos);
        };
        _proto._onTouchMove = function _onTouchMove(event) {
          if (this._onTouchNPC) {
            this._onTouchNPC = false;
            return;
          }
          var uitrans = this.node.getComponent(UITransform);
          var uiPos = event.getUILocation();
          var worldPos = uitrans.convertToNodeSpaceAR(new Vec3(uiPos.x, uiPos.y));
          worldPos = uitrans.convertToWorldSpaceAR(worldPos);
          this.joystickItem.onMove(event.getDelta(), worldPos);
        };
        _proto._onTouchEnd = function _onTouchEnd(event) {
          this.joystickItem.onEnd();
        };
        _proto._onTouchCancel = function _onTouchCancel(event) {
          this.joystickItem.onEnd();
        };
        return BattleCtrlView;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "joystickItem", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleDebugNewView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './GameConfig.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Component, GameConfig;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      GameConfig = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
      cclegacy._RF.push({}, "a2ff5mu/BJPkZIQAefXQz9G", "BattleDebugNewView", undefined);

      // import { Monster } from '../../game_battle_b/monster/Monster';
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleDebugNewView = exports('BattleDebugNewView', (_dec = ccclass("BattleDebugNewView"), _dec2 = property({
        type: Button
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Button
      }), _dec5 = property({
        type: Button
      }), _dec6 = property({
        type: Button
      }), _dec7 = property({
        type: Button
      }), _dec8 = property({
        type: Button
      }), _dec9 = property({
        type: Button
      }), _dec10 = property({
        type: Button
      }), _dec11 = property({
        type: Button
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleDebugNewView, _Component);
        function BattleDebugNewView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "gmBtn", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "debugPanel", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "allHitBtn", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroHitBtn", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "soldierHitBtn", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "monsterHitBtn", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "allBoxBtn", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroBoxBtn", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "soldierBoxBtn", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "monsterBoxBtn", _descriptor10, _assertThisInitialized(_this));
          _this.flag = false;
          _this._lastBtnName = "";
          return _this;
        }
        var _proto = BattleDebugNewView.prototype;
        _proto.start = function start() {
          this.flag = false;
          this.debugPanel.active = false;
          {
            this.allHitBtn.interactable = GameConfig.DebugInfo.showBulletBox;
            this.heroHitBtn.interactable = GameConfig.DebugInfo.showHeroHit;
            this.soldierHitBtn.interactable = GameConfig.DebugInfo.showSoldierHit;
            this.monsterHitBtn.interactable = GameConfig.DebugInfo.showMonsterHit;
            this.allBoxBtn.interactable = GameConfig.DebugInfo.showAllBox;
            this.heroBoxBtn.interactable = GameConfig.DebugInfo.showHeroBox;
            this.soldierBoxBtn.interactable = GameConfig.DebugInfo.showSoldierBox;
            this.monsterBoxBtn.interactable = GameConfig.DebugInfo.showMonsterBox;
          }
          this._registerEvent();
        };
        _proto.onEnable = function onEnable() {
          if (GameConfig.DebugInfo.closeGm) {
            this.node.active = false;
          }
        };
        _proto.onDestroy = function onDestroy() {
          this._unregisterEvent();
        }

        /**
         * 注册事件
         */;
        _proto._registerEvent = function _registerEvent() {
          {
            this.gmBtn && this.gmBtn.node.on(Node.EventType.TOUCH_END, this.onGM, this);
            this.allHitBtn && this.allHitBtn.node.on(Node.EventType.TOUCH_END, this.onAllHit, this);
            this.heroHitBtn && this.heroHitBtn.node.on(Node.EventType.TOUCH_END, this.onHeroHit, this);
            this.soldierHitBtn && this.soldierHitBtn.node.on(Node.EventType.TOUCH_END, this.onSoldierHit, this);
            this.monsterHitBtn && this.monsterHitBtn.node.on(Node.EventType.TOUCH_END, this.onMonsterHit, this);
            this.allBoxBtn && this.allBoxBtn.node.on(Node.EventType.TOUCH_END, this.onAllBox, this);
            this.heroBoxBtn && this.heroBoxBtn.node.on(Node.EventType.TOUCH_END, this.onHeroBox, this);
            this.soldierBoxBtn && this.soldierBoxBtn.node.on(Node.EventType.TOUCH_END, this.onSoldierBox, this);
            this.monsterBoxBtn && this.monsterBoxBtn.node.on(Node.EventType.TOUCH_END, this.onMonsterBox, this);
          }
        }

        /**
         * 注销事件
         */;
        _proto._unregisterEvent = function _unregisterEvent() {
          if (this.gmBtn && this.gmBtn.node && this.gmBtn.node.isValid) {
            this.gmBtn && this.gmBtn.node.off(Node.EventType.TOUCH_END, this.onGM, this);
            this.allHitBtn && this.allHitBtn.node.off(Node.EventType.TOUCH_END, this.onAllHit, this);
            this.heroHitBtn && this.heroHitBtn.node.off(Node.EventType.TOUCH_END, this.onHeroHit, this);
            this.soldierHitBtn && this.soldierHitBtn.node.off(Node.EventType.TOUCH_END, this.onSoldierHit, this);
            this.monsterHitBtn && this.monsterHitBtn.node.off(Node.EventType.TOUCH_END, this.onMonsterHit, this);
            this.allBoxBtn && this.allBoxBtn.node.off(Node.EventType.TOUCH_END, this.onAllBox, this);
            this.heroBoxBtn && this.heroBoxBtn.node.off(Node.EventType.TOUCH_END, this.onHeroBox, this);
            this.soldierBoxBtn && this.soldierBoxBtn.node.off(Node.EventType.TOUCH_END, this.onSoldierBox, this);
            this.monsterBoxBtn && this.monsterBoxBtn.node.off(Node.EventType.TOUCH_END, this.onMonsterBox, this);
          }
        };
        _proto.onGM = function onGM() {
          this.flag = !this.flag;
          this.debugPanel.active = this.flag;
        };
        _proto.init = function init() {}

        // 点击事件实现
        ;

        _proto.onAllHit = function onAllHit() {
          GameConfig.DebugInfo.showBulletBox = !GameConfig.DebugInfo.showBulletBox;
          this.allHitBtn.interactable = GameConfig.DebugInfo.showBulletBox;
        };
        _proto.onHeroHit = function onHeroHit() {
          GameConfig.DebugInfo.showHeroHit = !GameConfig.DebugInfo.showHeroHit;
          this.heroHitBtn.interactable = GameConfig.DebugInfo.showHeroHit;
        };
        _proto.onSoldierHit = function onSoldierHit() {
          GameConfig.DebugInfo.showSoldierHit = !GameConfig.DebugInfo.showSoldierHit;
          this.soldierHitBtn.interactable = GameConfig.DebugInfo.showSoldierHit;
        };
        _proto.onMonsterHit = function onMonsterHit() {
          GameConfig.DebugInfo.showMonsterHit = !GameConfig.DebugInfo.showMonsterHit;
          this.monsterHitBtn.interactable = GameConfig.DebugInfo.showMonsterHit;
        };
        _proto.onAllBox = function onAllBox() {
          GameConfig.DebugInfo.showAllBox = !GameConfig.DebugInfo.showAllBox;
          this.allBoxBtn.interactable = GameConfig.DebugInfo.showAllBox;
        };
        _proto.onHeroBox = function onHeroBox() {
          GameConfig.DebugInfo.showHeroBox = !GameConfig.DebugInfo.showHeroBox;
          this.heroBoxBtn.interactable = GameConfig.DebugInfo.showHeroBox;
        };
        _proto.onSoldierBox = function onSoldierBox() {
          GameConfig.DebugInfo.showSoldierBox = !GameConfig.DebugInfo.showSoldierBox;
          this.soldierBoxBtn.interactable = GameConfig.DebugInfo.showSoldierBox;
        };
        _proto.onMonsterBox = function onMonsterBox() {
          GameConfig.DebugInfo.showMonsterBox = !GameConfig.DebugInfo.showMonsterBox;
          this.monsterBoxBtn.interactable = GameConfig.DebugInfo.showMonsterBox;
        };
        return BattleDebugNewView;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "gmBtn", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "debugPanel", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "allHitBtn", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "heroHitBtn", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "soldierHitBtn", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "monsterHitBtn", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "allBoxBtn", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "heroBoxBtn", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "soldierBoxBtn", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "monsterBoxBtn", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleDebugView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './MonitorType.ts', './ModuleDef.ts', './UIMgr.ts', './DBRecord.ts', './GameConfig.ts', './Item_BattleMap.ts', './uiGameLoading.ts', './BattleMainView.ts', './Prompt.ts', './App.ts', './BattleProprMgr.ts', './BattleUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, EditBox, input, Input, KeyCode, Label, Vec3, find, Camera, tween, v3, Component, GameBattle, MonitorType, ModuleDef, UIMgr, LayerType, DBRecord, GameConfig, Item_BattleMap, uiGameLoading, BattleMainView, Prompt, App, BattlePropertyName, BattleUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      EditBox = module.EditBox;
      input = module.input;
      Input = module.Input;
      KeyCode = module.KeyCode;
      Label = module.Label;
      Vec3 = module.Vec3;
      find = module.find;
      Camera = module.Camera;
      tween = module.tween;
      v3 = module.v3;
      Component = module.Component;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      Item_BattleMap = module.Item_BattleMap;
    }, function (module) {
      uiGameLoading = module.uiGameLoading;
    }, function (module) {
      BattleMainView = module.BattleMainView;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "7778flRmYpPGb3VlN1qHQdE", "BattleDebugView", undefined);

      // import { Monster } from '../../game_battle_b/monster/Monster';
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleDebugView = exports('BattleDebugView', (_dec = ccclass("BattleDebugView"), _dec2 = property([EditBox]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleDebugView, _Component);
        function BattleDebugView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "eb", _descriptor, _assertThisInitialized(_this));
          _this.flag = false;
          _this._lastBtnName = "";
          return _this;
        }
        var _proto = BattleDebugView.prototype;
        _proto.start = function start() {
          this._registerEvent();
          this._refreshHP();
          this._refreshMP();
          // const player = App.battleMgr.roleCtrl.player;
          // player.view.setCompleteHandler((trace:sp.spine.TrackEntry)=>{
          //     console.log('动画完成', trace, trace.animation.name)
          //     if(trace.animation.name === 'Attack'){
          //         player.state.exitType(GameBattle.ActionState.Attack)
          //         console.log('xxxxxxxxxxxxxxxxxxx')
          //     }
          // })
        };

        _proto.onEnable = function onEnable() {
          if (GameConfig.DebugInfo.closeGm) {
            this.node.active = false;
          }
          var pop = this.node.getChildByName("pop");
          pop.active = false;
          this._lastBtnName = "";
          var buttonBar = this.node.getChildByName("buttonBar");
          buttonBar.active = false;
          var bg = this.node.getChildByName("bg");
          bg.active = buttonBar.active;
          var panelTab = this.node.getChildByName("panelTab");
          panelTab.active = false;
        };
        _proto.onDestroy = function onDestroy() {
          this._unregisterEvent();
        }

        /**
         * 注册事件
         */;
        _proto._registerEvent = function _registerEvent() {
          App.monitorMgr.addEventListener(MonitorType.battle_player_update_hp, this._refreshHP, this);
          App.monitorMgr.addEventListener(MonitorType.battle_player_update_nengliang, this._refreshMP, this);
          {
            input.on(Input.EventType.KEY_DOWN, function (eve) {
              switch (eve.keyCode) {
                case KeyCode.F1:
                  // UIMgr.inst.open(uiKuangChall, LayerType.panel, undefined, []);
                  break;
                case KeyCode.F2:
                  UIMgr.inst.closeAllPanel(["uiMain"]);
                  break;
                case KeyCode.F3:
                  // UIMgr.inst.openOnce(uiResult11, undefined, undefined, [{}]);
                  break;
              }
            }, this);
          }
        }

        /**
         * 注销事件
         */;
        _proto._unregisterEvent = function _unregisterEvent() {
          App.monitorMgr.removeEventListener(MonitorType.battle_player_update_hp, this._refreshHP, this);
          App.monitorMgr.removeEventListener(MonitorType.battle_player_update_nengliang, this._refreshMP, this);
        };
        _proto.init = function init() {};
        _proto.onSelectTab = function onSelectTab(event) {
          this.selectTab(event.target.name);
        };
        _proto.selectTab = function selectTab(tabName) {
          //console.log(">>>>>>>>>>>>>>>>>  on tab:",tabName);
          var list = this.node.getChildByName("buttonBar").children;
          for (var index = 0; index < list.length; index++) {
            var element = list[index];
            element.active = element.name === tabName;
          }
        };
        _proto._refreshHP = function _refreshHP() {
          var player = App.battleMgr.roleCtrl.player;
          if (!player) {
            return;
          }
          var roleVO = player.roleVO;
          var lab_hp = this.node.getChildByPath("lab_hp").getComponent(Label);
          // lab_hp.string = `${roleVO.curHP}/${roleVO.hp}`;
          lab_hp.string = roleVO.curHP + "/" + roleVO.getRoleAttr(BattlePropertyName.shengming);
        };
        _proto._refreshMP = function _refreshMP() {
          var player = App.battleMgr.roleCtrl.player;
          if (!player) {
            return;
          }
          var roleVO = player.roleVO;
          var lab_mp = this.node.getChildByPath("lab_mp").getComponent(Label);
          // lab_mp.string = `${roleVO.curNengLiiang}/${roleVO.hp}`;
          lab_mp.string = roleVO.curNengLiiang + "/" + roleVO.getRoleAttr(BattlePropertyName.nengliang);
        };
        _proto.onBtnIdle = function onBtnIdle() {
          var player = App.battleMgr.roleCtrl.player;
          if (!player) {
            return;
          }
          // player.view.spine_leftHand.skeleton.setAnimation(0, 'Attack', false)
          // player.view.play("Idle", true);;
          // App.monitorMgr.dispatchEvent(MonitorType.battle_monster_die, 10000000);
          App.battleMgr.roleCtrl.recoveryAllMonster();
          var pos = [1330.40437, 1359.815555];
          var comp = App.battleMgr.roleCtrl.createMonster({
            id: 11006,
            position: new Vec3(pos[0], pos[1])
          });

          // App.chatMgr.cs_chat_gm_2001(`add_item 509022 1 1 `);
          // App.chatMgr.cs_chat_gm_2001(`add_item 504026 1 1 `);
          // App.chatMgr.cs_chat_gm_2001(`add_item 503022 1 1 `);
        };

        _proto.onBtnMove = function onBtnMove() {
          var player = App.battleMgr.roleCtrl.player;
          if (!player) {
            return;
          }
          // player.view.play("Move", true);;

          /**
           * 
           * 掉落装备测试
              let node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp)
              let com = node.getComponent(ItemFallingProp)
              com.init(1,6, player.node.worldPosition.clone().add3f(200,0,0))
              com.flyTo(player.node)
           * 
          */

          /**
           *  经验飞行测试
              let parent = this.node.parent.getChildByPath('miniMap/imgBattleProgressBg/imgBattleProgress')
              let node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemExpMotionSteak)
                  let pos = player.node.worldPosition.clone().add3f(200,0,0)
              // 获取战斗相机
              const playerCamera = App.battleMgr.battleMainViewCtrl.playerCamera
              // 将世界坐标转换为屏幕坐标
              const screenPosition = playerCamera.camera.worldToScreen(pos);
              let uiCamera = find('Canvas/Camera').getComponent(Camera)
              // 将屏幕坐标转换为 UI 相机下的坐标
              const uiPosition = uiCamera.screenToWorld(screenPosition);
              
              node.parent = parent
              node.setWorldPosition(uiPosition)
                  console.log('player.node pos',player.node.worldPosition.x, player.node.worldPosition.y, player.node.x, player.node.y)
                  */
          // EffectManager.flyTo(player.node, node, 0.4)
          // node.setWorldPosition(player.node.worldPosition.clone())
        };

        _proto.onBtnAttack = function onBtnAttack() {
          var player = App.battleMgr.roleCtrl.player;
          // player.view.play("Attack", true);;
          player.state.animationType = GameBattle.ActionState.Attack;
          console.log("onBtnAttack", player.view);
        };
        _proto.onBtnAddAttack = function onBtnAddAttack() {
          var player = App.battleMgr.roleCtrl.player;
          player.view.addAnimation("Attack", false);
        };
        _proto.onBtnAddMove = function onBtnAddMove() {
          var player = App.battleMgr.roleCtrl.player;
          player.view.addAnimation("Move", true);
        };
        _proto.onBtnClearAllMonster = function onBtnClearAllMonster() {
          var player = App.battleMgr.roleCtrl.player;
          App.battleMgr.roleCtrl.recoveryAllMonster();
        };
        _proto.onBtnAddMonster = function onBtnAddMonster() {
          var cfg = DBRecord.fetchId("ShuoMingQuanJu", 32);

          //获取palyer坐标
          var player = App.battleMgr.roleCtrl.player;
          var playerLocalPos = player.node.position;
          var comp = App.battleMgr.roleCtrl.createMonster({
            id: 999999,
            position: playerLocalPos
          });

          // const comp = App.battleMgr.roleCtrl.createSummon({
          //     id: 1000000,
          //     position: playerLocalPos,
          //     masterId:player.uid
          // });
        };

        _proto.onBtnCloseAtk = function onBtnCloseAtk() {
          var player = App.battleMgr.roleCtrl.player;
          player.openAtk = false;
        };
        _proto.onBtnOpenAtk = function onBtnOpenAtk() {
          var player = App.battleMgr.roleCtrl.player;
          player.openAtk = true;
        };
        _proto.onBtnXsyd = function onBtnXsyd() {
          // Utils.findManager('_xinShouManager').skipStory();
        };
        _proto.onBtnGmDmg = function onBtnGmDmg() {
          // App.mixMgr.setGmDmg(10000000000000);
        };
        _proto.onBtnDqsx = function onBtnDqsx() {
          var player = App.battleMgr.roleCtrl.player;
          // if (player && player.roleVO) UIMgr.inst.openOnce(gmRoleAttr, null, null, [player.roleVO.getFullAttr()]);
        };

        _proto.onBtnGmRoleSkill = function onBtnGmRoleSkill() {
          var player = App.battleMgr.roleCtrl.player;
          // if (player && player.roleVO) UIMgr.inst.openOnce(uiGmRoleSkill, null, null);
        };

        _proto.onBtnOpenAllGuanqia = function onBtnOpenAllGuanqia() {
          App.battleMgr.curGuanQiaId = 15050;
        }

        /**玩家只受一点伤害 */;
        _proto.onBtnplayerDmgReduce = function onBtnplayerDmgReduce() {
          GameConfig.DebugInfo.playerDmgReduce = !GameConfig.DebugInfo.playerDmgReduce;
          Prompt.popTip("玩家只受一点伤害:" + GameConfig.DebugInfo.playerDmgReduce);
        }

        /**怪物只受一点伤害 */;
        _proto.onBtnMonsteDmgReduce = function onBtnMonsteDmgReduce() {
          GameConfig.DebugInfo.monsterDmgReduce = !GameConfig.DebugInfo.monsterDmgReduce;
          Prompt.popTip("怪物只受一点伤害:" + GameConfig.DebugInfo.monsterDmgReduce);
        }

        /**玩家加buff飘字 */;
        _proto.onBtnShowPlayerAddBuff = function onBtnShowPlayerAddBuff() {
          GameConfig.DebugInfo.showPlayerAddBuffTips = !GameConfig.DebugInfo.showPlayerAddBuffTips;
          Prompt.resetTipsCount();
          Prompt.popTip("玩家加buff飘字:" + GameConfig.DebugInfo.showPlayerAddBuffTips);
        }

        /**战斗是否创建怪物 */;
        _proto.onBtnNoMonster = function onBtnNoMonster() {
          GameConfig.DebugInfo.noMonster = !GameConfig.DebugInfo.noMonster;
          Prompt.popTip("战斗中不创建怪物:" + GameConfig.DebugInfo.noMonster);
        }

        /**
         * 事件消息： 战斗 —— 主角 —— 更新血量
         */;
        _proto._onEventBattlePlayerUpdateHP = function _onEventBattlePlayerUpdateHP() {
          this._refreshHP();
        }

        // onPlayerInfoDebug(data: m_proto.SC_10021): void {

        //     //更新玩家信息
        //     console.log(`获取玩家info10021`);
        //     console.log(`获取玩家info10021：${JSON.stringify([data])}`);

        //     this.dianfengDengjiNumber = data.peak_level;
        //     this._dianfengDengji.string = data.peak_level.toString();

        //     // this._touruDianshu.string = data.peak_level.toString();
        //     this._shengYUDianshu.string = Math.abs(this.dianfengDengjiNumber - this.touruNumber).toString();
        // }
        ;

        _proto.onDianFengTouruDebug = function onDianFengTouruDebug(data) {
          //更新玩家信息
          console.log("\u5DC5\u5CF0\u5DF2\u6295\u516520021");
          console.log("\u5DC5\u5CF0\u5DF2\u6295\u516520021\uFF1A" + JSON.stringify([data]));
          this.scheduleOnce(function () {
            // UIMgr.inst.open(Ui_peakLevel, LayerType.panel, Layout_uiPeakLevel, [data]);
          }, 2);
        };
        _proto.onBtnLvMax = function onBtnLvMax() {
          //测试增加经验
          App.chatMgr.cs_chat_gm_2001("add_item 3 14000000");
        }

        /**
         * 事件消息： 战斗 —— 主角 —— 更新能量
         */;
        _proto._onEventBattlePlayerUpdateNengLiang = function _onEventBattlePlayerUpdateNengLiang() {
          var player = App.battleMgr.roleCtrl.player;
          if (!player) {
            return;
          }
          var roleVO = player.roleVO;
          var lab_mp = this.node.getChildByPath("lab_mp").getComponent(Label);
          // lab_mp.string = `${roleVO.curNengLiiang}/${roleVO.nengLiang}`;
          lab_mp.string = roleVO.curNengLiiang + "/" + roleVO.getRoleAttr(BattlePropertyName.nengliang);
        };
        _proto.onBtnShowBtns = function onBtnShowBtns() {
          // let play = App.battleMgr.roleCtrl.player
          // play.view.addAnimation('Move', true)
          // play.view.addAnimation('Skill', false)
          // return

          var buttonBar = this.node.getChildByName("buttonBar");
          buttonBar.active = !buttonBar.active;
          var bg = this.node.getChildByName("bg");
          bg.active = buttonBar.active;
          var pop = this.node.getChildByName("pop");
          pop.active = false;
          var panelTab = this.node.getChildByName("panelTab");
          panelTab.active = !panelTab.active;
          if (panelTab.active) {
            this.selectTab("battle");
          }
        };
        _proto.onBtnShowMonsterBox = function onBtnShowMonsterBox() {
          GameConfig.DebugInfo.showMonsterBox = true;
          console.log("onBtnShowMonsterBox");
        };
        _proto.onBtnShowBulletBox = function onBtnShowBulletBox() {
          GameConfig.DebugInfo.showBulletBox = true;
        };
        _proto.onBtnQuick = function onBtnQuick() {
          // Utils.guideManager.finishAll();
          App.chatMgr.cs_chat_gm_2001("add_item 1 1000000");
          App.chatMgr.cs_chat_gm_2001("add_item 2 1000000");
          App.chatMgr.cs_chat_gm_2001("add_item 6 1000000");
          App.chatMgr.cs_chat_gm_2001("tg_zdgk 21001");
        };
        _proto.onBtnShowPop = function onBtnShowPop(event) {
          var name = event.target.name;
          var pop = this.node.getChildByName("pop");
          pop.active = true;
          console.log("onBtnShowPop", event);
          if (name === "btn_addItem") {
            for (var i = 0; i < this.eb.length; i++) {
              this.eb[i].node.active = true;
              this.eb[i].placeholder = ["请输入道具ID", "请输入道具数量", "请输入道具品质"][i];
            }
          } else if (name === "btn_subItem") {
            for (var _i = 0; _i < this.eb.length; _i++) {
              this.eb[_i].node.active = true;
              this.eb[_i].placeholder = ["请输入道具ID", "请输入道具数量", "请输入道具品质"][_i];
            }
          } else if (name === "btn_pause") {
            App.battleMgr.setPause(true);
          } else if (name === "btn_resume") {
            App.battleMgr.setPause(false);
            for (var _i2 = 1; _i2 < this.eb.length; _i2++) {
              this.eb[_i2].node.active = false;
              this.eb[_i2].placeholder = ["请输入道具ID", "请输入道具数量", "请输入道具品质"][_i2];
            }
          } else if (name === "btn_addSkill") {
            for (var _i3 = 1; _i3 < this.eb.length; _i3++) {
              this.eb[_i3].node.active = false;
            }
            this.eb[0].node.active = true;
            this.eb[0].placeholder = "请输入技能ID,多个技能用,分隔";
          } else if (name === "btn_test_buff") {
            for (var _i4 = 1; _i4 < this.eb.length; _i4++) {
              this.eb[_i4].node.active = false;
            }
            this.eb[0].node.active = true;
            this.eb[0].placeholder = "请输入buffID,多个buff用,分隔";
            // let player: Player = App.battleMgr.roleCtrl.player;
            // let monster = player.atkSkill.getTarget();
            // let effect = new BuffEffect(99999990, player._buffBox, 0, monster);
            // effect.trigger();
            // let buttonBar = this.node.getChildByName('buttonBar');
            // buttonBar.active = false;
            // let bg = this.node.getChildByName('bg');
            // bg.active = false;
            // let pop = this.node.getChildByName('pop');
            // pop.active = false;
          } else if (name === "btn_test") {
            var parent = this.node.parent.getChildByPath("miniMap/imgBattleProgressBg/imgBattleProgress");
            var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemExpMotionSteak);
            var player = App.battleMgr.roleCtrl.player;
            var pos = player.node.worldPosition.clone().add3f(200, 0, 0);
            // 获取战斗相机
            var playerCamera = App.battleMgr.battleMainViewCtrl.playerCamera;
            // 将世界坐标转换为屏幕坐标
            var screenPosition = playerCamera.camera.worldToScreen(pos);
            var uiCamera = find("Canvas/Camera").getComponent(Camera);
            // 将屏幕坐标转换为 UI 相机下的坐标
            var uiPosition = uiCamera.screenToWorld(screenPosition);
            node.parent = parent;
            node.setWorldPosition(uiPosition);
            tween(node).by(5, {
              position: v3(200, 200, 1)
            }).start();
          } else if (name === "btn_showBoss") {
            App.battleMgr.battleMainViewCtrl.showBoss();
            pop.active = false;
          } else if (name === "btn_gm") {
            for (var _i5 = 0; _i5 < this.eb.length; _i5++) {
              this.eb[_i5].string = "";
              this.eb[_i5].node.active = false;
            }
            this.eb[0].node.active = true;
            this.eb[0].placeholder = "请输入道具GM命令";
          } else if (name === "btn_guide") {
            for (var _i6 = 0; _i6 < this.eb.length; _i6++) {
              this.eb[_i6].string = "";
              this.eb[_i6].node.active = false;
            }
            this.eb[0].node.active = true;
            this.eb[0].placeholder = "请输入引导组Id";
          } else if (name === "btn_addMonster") {
            for (var _i7 = 0; _i7 < this.eb.length; _i7++) {
              this.eb[_i7].node.active = true;
              this.eb[_i7].placeholder = ["请输入怪物ID", "请输入相对玩家的X坐标", "请输入相对玩家的Y坐标"][_i7];
            }
            //App.battleMgr.roleCtrl.recoveryAllMonster();
          } else if (name === "btn_send") {
            if (this._lastBtnName === "btn_addMonster") {
              //获取palyer坐标
              var _player = App.battleMgr.roleCtrl.player;
              var playerLocalPos = _player.node.position;
              var _cmd = "" + this.eb[0].string;
              var data = _cmd.split(",").map(function (part) {
                return Number(part.trim());
              });
              var monsterId = data[0],
                buffId = data[1],
                flag = data[2];
              var offsetX = this.eb[1].string ? Number(this.eb[1].string) : 0;
              var offsetY = this.eb[2].string ? Number(this.eb[2].string) : 0;
              var x = playerLocalPos.x + offsetX;
              var y = playerLocalPos.y + offsetY;
              var monster = App.battleMgr.roleCtrl.createMonster({
                id: monsterId,
                // position: new Vec3(pos[0], pos[1]),
                position: v3(x, y)
              });
              if (buffId) {
                if (flag) {
                  monster._buffBox.addBuff(buffId, _player);
                } else {
                  monster._buffBox.addBuff(buffId, monster);
                }
              }
              return;
            } else if (this._lastBtnName === "btn_addSkill") {
              GameConfig.DebugInfo.debugSkillList = [];
              var _cmd2 = "" + this.eb[0].string;
              var _data = _cmd2.split(",").map(function (part) {
                return part.trim();
              });
              for (var _iterator = _createForOfIteratorHelperLoose(_data), _step; !(_step = _iterator()).done;) {
                var id = _step.value;
                GameConfig.DebugInfo.debugSkillList.push(Number(id));
              }
              return;
            } else if (this._lastBtnName === "btn_test_buff") {
              var _cmd3 = "" + this.eb[0].string;
              var _data2 = _cmd3.split(",").map(function (part) {
                return part.trim();
              });
              var _player2 = App.battleMgr.roleCtrl.player;
              for (var _iterator2 = _createForOfIteratorHelperLoose(_data2), _step2; !(_step2 = _iterator2()).done;) {
                var _id = _step2.value;
                _player2._buffBox.addBuff(Number(_id), _player2);

                // player.summonBuff[id] = [Number(id)];
              }

              return;
            } else if (this._lastBtnName === "btn_test_buff_monster") {
              var _cmd4 = "" + this.eb[0].string;
              var _data3 = _cmd4.split(",").map(function (part) {
                return part.trim();
              });
              var _player3 = App.battleMgr.roleCtrl.player;
              for (var _iterator3 = _createForOfIteratorHelperLoose(_data3), _step3; !(_step3 = _iterator3()).done;) {
                var _id2 = _step3.value;
                _player3._buffBox.addBuff(Number(_id2), _player3);

                // player.summonBuff[id] = [Number(id)];
              }

              return;
            }
            var cmd = "add_item " + this.eb[0].string + " " + this.eb[1].string + " " + this.eb[2].string;
            if (this._lastBtnName === "btn_gm") cmd = "" + this.eb[0].string;
            if (this._lastBtnName === "btn_subItem") cmd = "sub_item " + this.eb[0].string + " " + this.eb[1].string;
            if (this._lastBtnName === "btn_guide") ;else {
              App.chatMgr.cs_chat_gm_2001(cmd);
            }
          }
          if (name !== "btn_send") {
            this._lastBtnName = name;
          }
        };
        _proto.onBtnChangeProp = function onBtnChangeProp() {
          var _player$roleVO$addLoc;
          console.log("onBtnChangeProp");
          var player = App.battleMgr.roleCtrl.player;
          if (player === undefined || player.roleVO === undefined) {
            return;
          }
          player.roleVO.addLockAttr(BattlePropertyName.yisu, (_player$roleVO$addLoc = {}, _player$roleVO$addLoc[BattlePropertyName.yisu] = 500, _player$roleVO$addLoc));
        };
        _proto.onBtnReduceProp = function onBtnReduceProp() {
          console.log("onBtnReduceProp");
          var player = App.battleMgr.roleCtrl.player;
          if (player === undefined || player.roleVO === undefined) {
            return;
          }
          player.roleVO.delLockAttr(BattlePropertyName.yisu);
        }

        /**
         * 结束当前boss aciton
         */;
        _proto.onBtnEndBossAction = function onBtnEndBossAction() {
          var enMAp = App.battleMgr.roleCtrl.entityMap;
          var _map = new Map(enMAp.entries());
          for (var _iterator4 = _createForOfIteratorHelperLoose(_map), _step4; !(_step4 = _iterator4()).done;) {
            var _step4$value = _step4.value,
              k = _step4$value[0],
              v = _step4$value[1];
            if (v.type === GameBattle.RoleType.Monster) {
              var monsterRole = v;
              if (monsterRole.roleVO.quality === GameBattle.MonsterQuality.Boss) {
                monsterRole.curSkill.endAction();
                // monsterRole.roleVO.curHP = 0
                // monsterRole.state.type = GameBattle.ActionState.Dead
                // App.battleMgr.skillCtrl.getSkills(monsterRole.uid);
                // monsterRole.curSkill.end()
                // monsterRole._monsterAI.pause = false
                // const skills = App.battleMgr.skillCtrl.getSkills(monsterRole.uid);
                // let skill: SkillVO;
                // for (const it of skills) {
                //     it.CD = 100000000
                //     it.curCD = 10000000
                // }
              }
            }
          }
        };

        _proto.onBtnDrawGrid = function onBtnDrawGrid() {
          console.log("onBtnDrawGrid");
          GameConfig.DebugInfo.drawCollisionGrid = !GameConfig.DebugInfo.drawCollisionGrid;
        };
        _proto.onBtnttttttttttttttttttttttttttttttttt = /*#__PURE__*/function () {
          var _onBtnttttttttttttttttttttttttttttttttt = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var guanQiaId, cfg, diMao, ui;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  // UIMgr.inst.open(uiTimeActivitySign, LayerType.panel);
                  // UIMgr.inst.open(Ui_zhigoulibao, LayerType.panel, Layout_zhigoulibao, [{ openType: OpenType.MainUi }])
                  guanQiaId = 17001;
                  App.battleMgr._isInBattle = true;
                  App.battleMgr.challengeGuanQiaId = guanQiaId;
                  cfg = DBRecord.fetchId("GuanQia", guanQiaId);
                  diMao = BattleUtil.getValueByProbability(cfg.random_map);
                  App.battleMgr.diMao = diMao;
                  App.battleMgr.fallingPropCtrl.initFallingByGuanQiaId(App.battleMgr.challengeGuanQiaId, null);
                  App.battleMgr.battleNpcCtrl.setZhuangBeiJiaData([], []);
                  _context.next = 10;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 10:
                  ui = _context.sent;
                  ui.setCloseByHand(true);
                  _context.next = 14;
                  return Item_BattleMap.loadMap(diMao, ui.onProgress.bind(ui));
                case 14:
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout_uiCommonGet, [guanQiaId], function () {
                    ui.onClose();
                    UIMgr.inst.closeAllPanel(["BattleMainView"]);
                  });
                case 15:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          }));
          function onBtnttttttttttttttttttttttttttttttttt() {
            return _onBtnttttttttttttttttttttttttttttttttt.apply(this, arguments);
          }
          return onBtnttttttttttttttttttttttttttttttttt;
        }();
        _proto.onBtn22222222222222222222222 = function onBtn22222222222222222222222() {
          // UIMgr.inst.asyncOpen(uiDoubleCard, LayerType.panel);
          // UIMgr.inst.asyncOpen(Ui_uiPromptWarn, LayerType.panel, Layout_uiPromptWarn);
          // UIMgr.inst.asyncOpen(uiFashionCard, LayerType.panel);
          // UIMgr.inst.asyncOpen(uiPetCard, LayerType.panel);
          // UIMgr.inst.asyncOpen(uiJingJiChang, LayerType.panel);
          // App.battleMgr.roleCtrl.createEnemy({
          //     id: 10000,
          //     job: 1,
          //     parent: App.battleMgr.battleMainViewCtrl.roleLayer,
          //     position: App.battleMgr.roleCtrl.player.node.worldPosition
          // });
          this.node.active = false;
          GameConfig.DebugInfo.closeGm = true;
          // UIMgr.inst.openOnce(uiPaTaRank, LayerType.panel, Layout_uiPaTaRank);
          // UIMgr.inst.openOnce(uiVictoryPaTa, LayerType.panel, null);
          // UIMgr.inst.openOnce(uiPaTaBuffSelect, LayerType.panel, Layout_uiPaTaBuffSelect);
        };

        _proto.onBtnTemp0 = function onBtnTemp0() {
          // UIMgr.inst.openOnce(uiFuShiCard, LayerType.panel);
          //  UIMgr.inst.open(uiGouYu)
        };
        _proto.onBtnTempFuShi = function onBtnTempFuShi() {
          // UIMgr.inst.openOnce(uiCZSC, LayerType.panel);
        };
        return BattleDebugView;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "eb", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleDefine.ts", ['cc'], function (exports) {
  var cclegacy, v3;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      v3 = module.v3;
    }],
    execute: function () {
      exports('GameBattle', void 0);
      cclegacy._RF.push({}, "40902NyHc9L7qf2cOIUx023", "BattleDefine", undefined);
      /** 游戏战斗模块 */
      var GameBattle;
      (function (_GameBattle, _GameBattle$BattleSco, _GameBattle$RolePrefa, _GameBattle$BulletPre) {
        var BattleTweenTag = _GameBattle.BattleTweenTag = 99999999999;

        // 战斗配置

        // 奖励配置
        /**
         * 敌我关系
         */
        var BattleSide = /*#__PURE__*/function (BattleSide) {
          BattleSide[BattleSide["Player"] = 0] = "Player";
          BattleSide[BattleSide["Enemy"] = 1] = "Enemy";
          return BattleSide;
        }({});
        _GameBattle.BattleSide = BattleSide;
        var RoleType = /*#__PURE__*/function (RoleType) {
          RoleType[RoleType["None"] = 0] = "None";
          RoleType[RoleType["Hero"] = 1] = "Hero";
          RoleType[RoleType["Soldier"] = 2] = "Soldier";
          RoleType[RoleType["Monster"] = 3] = "Monster";
          return RoleType;
        }({});
        _GameBattle.RoleType = RoleType;
        var SoldierType = /*#__PURE__*/function (SoldierType) {
          SoldierType[SoldierType["None"] = 0] = "None";
          SoldierType[SoldierType["Infantry"] = 1] = "Infantry";
          SoldierType[SoldierType["Archer"] = 2] = "Archer";
          SoldierType[SoldierType["Cavalry"] = 3] = "Cavalry";
          SoldierType[SoldierType["Mage"] = 4] = "Mage";
          SoldierType[SoldierType["Shield"] = 5] = "Shield";
          return SoldierType;
        }({});
        _GameBattle.SoldierType = SoldierType;
        var LanePosition = /*#__PURE__*/function (LanePosition) {
          LanePosition[LanePosition["None"] = 0] = "None";
          LanePosition[LanePosition["Left"] = 1] = "Left";
          LanePosition[LanePosition["Middle"] = 2] = "Middle";
          LanePosition[LanePosition["Right"] = 3] = "Right";
          return LanePosition;
        }({});
        _GameBattle.LanePosition = LanePosition;
        var HeroPoints = _GameBattle.HeroPoints = new Map([[GameBattle.LanePosition.Left, v3(187, 300, 0)], [GameBattle.LanePosition.Middle, v3(360, 300, 0)], [GameBattle.LanePosition.Right, v3(533, 300, 0)]]);
        var BattleScope = _GameBattle.BattleScope = (_GameBattle$BattleSco = {}, _GameBattle$BattleSco["min_x"] = 100, _GameBattle$BattleSco["big_x"] = 620, _GameBattle$BattleSco);
        var BattleState = /*#__PURE__*/function (BattleState) {
          BattleState[BattleState["None"] = 0] = "None";
          BattleState[BattleState["Preparing"] = 1] = "Preparing";
          BattleState[BattleState["Battling"] = 2] = "Battling";
          BattleState[BattleState["Ended"] = 3] = "Ended";
          return BattleState;
        }({});
        _GameBattle.BattleState = BattleState;
        var BattleResult = /*#__PURE__*/function (BattleResult) {
          BattleResult[BattleResult["None"] = 0] = "None";
          BattleResult[BattleResult["Victory"] = 1] = "Victory";
          BattleResult[BattleResult["Defeat"] = 2] = "Defeat";
          BattleResult[BattleResult["Draw"] = 3] = "Draw";
          return BattleResult;
        }({});
        _GameBattle.BattleResult = BattleResult;
        var GuanQiaType = /*#__PURE__*/function (GuanQiaType) {
          GuanQiaType[GuanQiaType["None"] = 0] = "None";
          GuanQiaType[GuanQiaType["MainLine"] = 1] = "MainLine";
          GuanQiaType[GuanQiaType["Elite"] = 2] = "Elite";
          GuanQiaType[GuanQiaType["Dungeon"] = 3] = "Dungeon";
          GuanQiaType[GuanQiaType["JingJiChang"] = 4] = "JingJiChang";
          return GuanQiaType;
        }({});
        _GameBattle.GuanQiaType = GuanQiaType;
        var BulletType = /*#__PURE__*/function (BulletType) {
          BulletType[BulletType["None"] = 0] = "None";
          BulletType[BulletType["Remote"] = 1] = "Remote";
          BulletType[BulletType["Melee"] = 2] = "Melee";
          BulletType[BulletType["Follow"] = 3] = "Follow";
          BulletType[BulletType["NoAngle"] = 4] = "NoAngle";
          BulletType[BulletType["ShiZhu"] = 5] = "ShiZhu";
          BulletType[BulletType["LockNoSame"] = 6] = "LockNoSame";
          BulletType[BulletType["Circular"] = 7] = "Circular";
          BulletType[BulletType["Adsorption"] = 8] = "Adsorption";
          BulletType[BulletType["LockNoSame2"] = 10] = "LockNoSame2";
          BulletType[BulletType["LockNoSame3"] = 11] = "LockNoSame3";
          BulletType[BulletType["Affected"] = 12] = "Affected";
          return BulletType;
        }({});
        _GameBattle.BulletType = BulletType;
        var BulletMoveType = /*#__PURE__*/function (BulletMoveType) {
          BulletMoveType[BulletMoveType["None"] = 0] = "None";
          BulletMoveType[BulletMoveType["Line"] = 1] = "Line";
          BulletMoveType[BulletMoveType["Follow"] = 2] = "Follow";
          BulletMoveType[BulletMoveType["Bezier"] = 3] = "Bezier";
          BulletMoveType[BulletMoveType["Round"] = 4] = "Round";
          BulletMoveType[BulletMoveType["FollowOwner"] = 5] = "FollowOwner";
          BulletMoveType[BulletMoveType["FollowWeapon"] = 6] = "FollowWeapon";
          BulletMoveType[BulletMoveType["Arrow"] = 7] = "Arrow";
          BulletMoveType[BulletMoveType["ShiBi"] = 8] = "ShiBi";
          BulletMoveType[BulletMoveType["InCreator"] = 9] = "InCreator";
          BulletMoveType[BulletMoveType["TanTiao"] = 10] = "TanTiao";
          BulletMoveType[BulletMoveType["RoundBullet"] = 11] = "RoundBullet";
          BulletMoveType[BulletMoveType["Lock"] = 12] = "Lock";
          BulletMoveType[BulletMoveType["onTarget"] = 13] = "onTarget";
          BulletMoveType[BulletMoveType["yanZHan"] = 14] = "yanZHan";
          BulletMoveType[BulletMoveType["Warning"] = 15] = "Warning";
          BulletMoveType[BulletMoveType["AngularFollow"] = 16] = "AngularFollow";
          BulletMoveType[BulletMoveType["HuiXuan"] = 17] = "HuiXuan";
          BulletMoveType[BulletMoveType["HanBingJiGuang"] = 18] = "HanBingJiGuang";
          BulletMoveType[BulletMoveType["ZhiXianFenLie"] = 19] = "ZhiXianFenLie";
          BulletMoveType[BulletMoveType["ToPlayer"] = 20] = "ToPlayer";
          BulletMoveType[BulletMoveType["HuoYanTuXi"] = 21] = "HuoYanTuXi";
          BulletMoveType[BulletMoveType["TanLiQiu"] = 22] = "TanLiQiu";
          BulletMoveType[BulletMoveType["GuangMangSheXian"] = 23] = "GuangMangSheXian";
          BulletMoveType[BulletMoveType["ToOwnerLine"] = 24] = "ToOwnerLine";
          BulletMoveType[BulletMoveType["LeiTingWanJun"] = 25] = "LeiTingWanJun";
          BulletMoveType[BulletMoveType["FeiWuLeiHuan"] = 26] = "FeiWuLeiHuan";
          BulletMoveType[BulletMoveType["WorldBossTuXi"] = 27] = "WorldBossTuXi";
          BulletMoveType[BulletMoveType["DistanceOffset"] = 28] = "DistanceOffset";
          BulletMoveType[BulletMoveType["InCreatorTaiDao"] = 29] = "InCreatorTaiDao";
          BulletMoveType[BulletMoveType["HugeBullet"] = 30] = "HugeBullet";
          BulletMoveType[BulletMoveType["FollowMoveDir"] = 31] = "FollowMoveDir";
          BulletMoveType[BulletMoveType["FollowMoveDir2"] = 32] = "FollowMoveDir2";
          return BulletMoveType;
        }({});
        _GameBattle.BulletMoveType = BulletMoveType;
        var BulletHitShape = /*#__PURE__*/function (BulletHitShape) {
          BulletHitShape[BulletHitShape["Round"] = 1] = "Round";
          BulletHitShape[BulletHitShape["Rect"] = 2] = "Rect";
          return BulletHitShape;
        }({});
        _GameBattle.BulletHitShape = BulletHitShape;
        var ActionState = /*#__PURE__*/function (ActionState) {
          ActionState[ActionState["Idle"] = 0] = "Idle";
          ActionState[ActionState["Move"] = 2] = "Move";
          ActionState[ActionState["Attack"] = 4] = "Attack";
          ActionState[ActionState["UnderAttack"] = 8] = "UnderAttack";
          ActionState[ActionState["Skill"] = 16] = "Skill";
          ActionState[ActionState["Celebrate"] = 128] = "Celebrate";
          ActionState[ActionState["Run"] = 32] = "Run";
          ActionState[ActionState["Affected"] = 64] = "Affected";
          ActionState[ActionState["MIDDLE"] = 1024] = "MIDDLE";
          ActionState[ActionState["Stun"] = 1048576] = "Stun";
          ActionState[ActionState["Slowed"] = 16384] = "Slowed";
          ActionState[ActionState["Rooted"] = 65536] = "Rooted";
          ActionState[ActionState["Feared"] = 32768] = "Feared";
          ActionState[ActionState["Bewitch"] = 16384] = "Bewitch";
          ActionState[ActionState["Dead"] = 524288] = "Dead";
          ActionState[ActionState["Rebirth"] = 262144] = "Rebirth";
          ActionState[ActionState["GoldenBody"] = 196608] = "GoldenBody";
          ActionState[ActionState["Stealth"] = 229376] = "Stealth";
          return ActionState;
        }({});
        _GameBattle.ActionState = ActionState;
        var MonsterAIState = /*#__PURE__*/function (MonsterAIState) {
          MonsterAIState[MonsterAIState["Idle"] = 0] = "Idle";
          MonsterAIState[MonsterAIState["Homing"] = 1] = "Homing";
          MonsterAIState[MonsterAIState["Patrol"] = 2] = "Patrol";
          MonsterAIState[MonsterAIState["Pursuit"] = 3] = "Pursuit";
          return MonsterAIState;
        }({});
        _GameBattle.MonsterAIState = MonsterAIState;
        var RoleStateChangeTime = /*#__PURE__*/function (RoleStateChangeTime) {
          RoleStateChangeTime[RoleStateChangeTime["None"] = 0] = "None";
          RoleStateChangeTime[RoleStateChangeTime["Start"] = 1] = "Start";
          RoleStateChangeTime[RoleStateChangeTime["Course"] = 2] = "Course";
          RoleStateChangeTime[RoleStateChangeTime["End"] = 3] = "End";
          return RoleStateChangeTime;
        }({});
        _GameBattle.RoleStateChangeTime = RoleStateChangeTime;
        var Direction = /*#__PURE__*/function (Direction) {
          Direction[Direction["None"] = 0] = "None";
          Direction[Direction["Up"] = 1] = "Up";
          Direction[Direction["Down"] = 2] = "Down";
          Direction[Direction["Left"] = 3] = "Left";
          Direction[Direction["Right"] = 4] = "Right";
          Direction[Direction["LeftUp"] = 5] = "LeftUp";
          Direction[Direction["LeftDown"] = 6] = "LeftDown";
          Direction[Direction["RightUp"] = 7] = "RightUp";
          Direction[Direction["RightDown"] = 8] = "RightDown";
          return Direction;
        }({});
        _GameBattle.Direction = Direction;
        var MonsterQuality = /*#__PURE__*/function (MonsterQuality) {
          MonsterQuality[MonsterQuality["None"] = 0] = "None";
          MonsterQuality[MonsterQuality["Normal"] = 1] = "Normal";
          MonsterQuality[MonsterQuality["Boss"] = 2] = "Boss";
          return MonsterQuality;
        }({});
        _GameBattle.MonsterQuality = MonsterQuality;
        var SkillApplyTarget = /*#__PURE__*/function (SkillApplyTarget) {
          SkillApplyTarget[SkillApplyTarget["None"] = 0] = "None";
          SkillApplyTarget[SkillApplyTarget["Self"] = 1] = "Self";
          SkillApplyTarget[SkillApplyTarget["Enemy"] = 2] = "Enemy";
          SkillApplyTarget[SkillApplyTarget["Friends"] = 3] = "Friends";
          SkillApplyTarget[SkillApplyTarget["SelfAndFriends"] = 4] = "SelfAndFriends";
          SkillApplyTarget[SkillApplyTarget["All"] = 5] = "All";
          return SkillApplyTarget;
        }({});
        _GameBattle.SkillApplyTarget = SkillApplyTarget;
        var SkillEffectType = /*#__PURE__*/function (SkillEffectType) {
          SkillEffectType[SkillEffectType["None"] = 0] = "None";
          SkillEffectType[SkillEffectType["Damage"] = 1] = "Damage";
          SkillEffectType[SkillEffectType["Damage2"] = 102] = "Damage2";
          SkillEffectType[SkillEffectType["Damage3"] = 103] = "Damage3";
          SkillEffectType[SkillEffectType["Damage4"] = 8] = "Damage4";
          SkillEffectType[SkillEffectType["Damage5"] = 9] = "Damage5";
          SkillEffectType[SkillEffectType["AddBuff"] = 2] = "AddBuff";
          SkillEffectType[SkillEffectType["RemoveBuff"] = 3] = "RemoveBuff";
          SkillEffectType[SkillEffectType["CreateBullet"] = 4] = "CreateBullet";
          SkillEffectType[SkillEffectType["CreateBullet360"] = 41] = "CreateBullet360";
          SkillEffectType[SkillEffectType["TarGetMove"] = 5] = "TarGetMove";
          SkillEffectType[SkillEffectType["Summon"] = 6] = "Summon";
          SkillEffectType[SkillEffectType["Heal"] = 7] = "Heal";
          return SkillEffectType;
        }({});
        _GameBattle.SkillEffectType = SkillEffectType;
        var BattleNpcType = /*#__PURE__*/function (BattleNpcType) {
          BattleNpcType[BattleNpcType["TuTeng"] = 1] = "TuTeng";
          BattleNpcType[BattleNpcType["ZhuangBeiJia"] = 2] = "ZhuangBeiJia";
          BattleNpcType[BattleNpcType["BaoXiang"] = 3] = "BaoXiang";
          BattleNpcType[BattleNpcType["BaoXiangMoon"] = 4] = "BaoXiangMoon";
          BattleNpcType[BattleNpcType["NpcMoon"] = 5] = "NpcMoon";
          return BattleNpcType;
        }({});
        _GameBattle.BattleNpcType = BattleNpcType;
        var BuffType = /*#__PURE__*/function (BuffType) {
          BuffType[BuffType["Normal"] = 0] = "Normal";
          return BuffType;
        }({});
        _GameBattle.BuffType = BuffType;
        var BuffDurationType = /*#__PURE__*/function (BuffDurationType) {
          BuffDurationType[BuffDurationType["Timer"] = 1] = "Timer";
          BuffDurationType[BuffDurationType["Battle"] = 2] = "Battle";
          BuffDurationType[BuffDurationType["Forever"] = 3] = "Forever";
          BuffDurationType[BuffDurationType["SpineTimer"] = 4] = "SpineTimer";
          return BuffDurationType;
        }({});
        _GameBattle.BuffDurationType = BuffDurationType;
        var BuffCondition = /*#__PURE__*/function (BuffCondition) {
          BuffCondition[BuffCondition["monster_count"] = 1] = "monster_count";
          BuffCondition[BuffCondition["skill_id"] = 2] = "skill_id";
          BuffCondition[BuffCondition["death_count"] = 3] = "death_count";
          return BuffCondition;
        }({});
        _GameBattle.BuffCondition = BuffCondition;
        var BuffAddType = /*#__PURE__*/function (BuffAddType) {
          BuffAddType[BuffAddType["None"] = 0] = "None";
          BuffAddType[BuffAddType["Replace"] = 1] = "Replace";
          BuffAddType[BuffAddType["Add"] = 2] = "Add";
          BuffAddType[BuffAddType["Exclusive"] = 3] = "Exclusive";
          BuffAddType[BuffAddType["Overlap"] = 4] = "Overlap";
          return BuffAddType;
        }({});
        _GameBattle.BuffAddType = BuffAddType;
        var BuffTargetType = /*#__PURE__*/function (BuffTargetType) {
          BuffTargetType[BuffTargetType["enemy"] = 1] = "enemy";
          BuffTargetType[BuffTargetType["self"] = 2] = "self";
          BuffTargetType[BuffTargetType["partner"] = 3] = "partner";
          BuffTargetType[BuffTargetType["selfAndSummon"] = 4] = "selfAndSummon";
          return BuffTargetType;
        }({});
        _GameBattle.BuffTargetType = BuffTargetType;
        var BuffEffectCalculate = /*#__PURE__*/function (BuffEffectCalculate) {
          BuffEffectCalculate[BuffEffectCalculate["none"] = 0] = "none";
          BuffEffectCalculate[BuffEffectCalculate["add"] = 1] = "add";
          BuffEffectCalculate[BuffEffectCalculate["mul"] = 2] = "mul";
          BuffEffectCalculate[BuffEffectCalculate["equ"] = 3] = "equ";
          BuffEffectCalculate[BuffEffectCalculate["append"] = 4] = "append";
          return BuffEffectCalculate;
        }({});
        _GameBattle.BuffEffectCalculate = BuffEffectCalculate;
        var EventBuffId = /*#__PURE__*/function (EventBuffId) {
          EventBuffId[EventBuffId["allBall"] = 1] = "allBall";
          EventBuffId[EventBuffId["reborn"] = 2] = "reborn";
          EventBuffId[EventBuffId["shanBi"] = 3] = "shanBi";
          EventBuffId[EventBuffId["attack"] = 4] = "attack";
          EventBuffId[EventBuffId["underAttack"] = 5] = "underAttack";
          EventBuffId[EventBuffId["enterBattle"] = 6] = "enterBattle";
          EventBuffId[EventBuffId["userSkill"] = 7] = "userSkill";
          EventBuffId[EventBuffId["hpBall"] = 8] = "hpBall";
          EventBuffId[EventBuffId["bulletLaunch"] = 9] = "bulletLaunch";
          EventBuffId[EventBuffId["geDang"] = 10] = "geDang";
          EventBuffId[EventBuffId["TuTeng"] = 11] = "TuTeng";
          EventBuffId[EventBuffId["MiaoSha"] = 12] = "MiaoSha";
          EventBuffId[EventBuffId["HitEnemy"] = 13] = "HitEnemy";
          return EventBuffId;
        }({});
        _GameBattle.EventBuffId = EventBuffId;
        var BuffEffectType = /*#__PURE__*/function (BuffEffectType) {
          BuffEffectType[BuffEffectType["removeBuff"] = 4] = "removeBuff";
          BuffEffectType[BuffEffectType["removeGroupBuff"] = 5] = "removeGroupBuff";
          BuffEffectType[BuffEffectType["Hurt"] = 101] = "Hurt";
          BuffEffectType[BuffEffectType["Hurt2"] = 102] = "Hurt2";
          BuffEffectType[BuffEffectType["Hurt3"] = 103] = "Hurt3";
          BuffEffectType[BuffEffectType["Hurt4"] = 8] = "Hurt4";
          BuffEffectType[BuffEffectType["Hurt5"] = 9] = "Hurt5";
          BuffEffectType[BuffEffectType["AddBuffByOdds"] = 202] = "AddBuffByOdds";
          BuffEffectType[BuffEffectType["XuanYun"] = 204] = "XuanYun";
          BuffEffectType[BuffEffectType["Round"] = 205] = "Round";
          BuffEffectType[BuffEffectType["MaBi"] = 206] = "MaBi";
          BuffEffectType[BuffEffectType["Bewitch"] = 208] = "Bewitch";
          BuffEffectType[BuffEffectType["RemoveBuff"] = 301] = "RemoveBuff";
          BuffEffectType[BuffEffectType["CreateBullet"] = 401] = "CreateBullet";
          BuffEffectType[BuffEffectType["AddAttr1"] = 501] = "AddAttr1";
          BuffEffectType[BuffEffectType["AddAttr2"] = 502] = "AddAttr2";
          BuffEffectType[BuffEffectType["AddAttr3"] = 503] = "AddAttr3";
          BuffEffectType[BuffEffectType["ForcedAttr"] = 506] = "ForcedAttr";
          BuffEffectType[BuffEffectType["ZhiLiao"] = 801] = "ZhiLiao";
          BuffEffectType[BuffEffectType["XiuGaiShuXing"] = 901] = "XiuGaiShuXing";
          BuffEffectType[BuffEffectType["XiuGaiQuanJuShuXing"] = 902] = "XiuGaiQuanJuShuXing";
          BuffEffectType[BuffEffectType["AddSkillHurtByOdds"] = 903] = "AddSkillHurtByOdds";
          BuffEffectType[BuffEffectType["ConstantlyAttr"] = 904] = "ConstantlyAttr";
          BuffEffectType[BuffEffectType["KillSelf"] = 905] = "KillSelf";
          BuffEffectType[BuffEffectType["EventBuff"] = 906] = "EventBuff";
          BuffEffectType[BuffEffectType["Invulnerable"] = 907] = "Invulnerable";
          BuffEffectType[BuffEffectType["Scale"] = 909] = "Scale";
          return BuffEffectType;
        }({});
        _GameBattle.BuffEffectType = BuffEffectType;
        var MapWidht = _GameBattle.MapWidht = 3072;
        var MapHeight = _GameBattle.MapHeight = 3072;
        var PlayerCameraWidht = _GameBattle.PlayerCameraWidht = 760;
        var PlayerCameraHeight = _GameBattle.PlayerCameraHeight = 1334;
        var RolePrefabPath = _GameBattle.RolePrefabPath = (_GameBattle$RolePrefa = {}, _GameBattle$RolePrefa[GameBattle.RoleType.Monster] = "prefabs/scene/role/Monster", _GameBattle$RolePrefa[GameBattle.RoleType.Hero] = "prefabs/scene/role/Hero", _GameBattle$RolePrefa[GameBattle.RoleType.Soldier] = "prefabs/scene/role/Soldier", _GameBattle$RolePrefa);
        var BulletPrefabPath = _GameBattle.BulletPrefabPath = (_GameBattle$BulletPre = {}, _GameBattle$BulletPre[GameBattle.BulletType.Remote] = "prefabs/scene/bullet/RemoteBullet", _GameBattle$BulletPre[GameBattle.BulletType.Melee] = "prefabs/scene/bullet/MeleeBullet", _GameBattle$BulletPre[GameBattle.BulletType.Follow] = "prefabs/scene/bullet/FollowBullet", _GameBattle$BulletPre[GameBattle.BulletType.NoAngle] = "prefabs/scene/bullet/RemoteBullet", _GameBattle$BulletPre[GameBattle.BulletType.ShiZhu] = "prefabs/scene/bullet/MeleeBullet", _GameBattle$BulletPre[GameBattle.BulletType.LockNoSame] = "prefabs/scene/bullet/RemoteBullet", _GameBattle$BulletPre[GameBattle.BulletType.Circular] = "prefabs/scene/bullet/CircularBullet", _GameBattle$BulletPre[GameBattle.BulletType.Adsorption] = "prefabs/scene/bullet/AdsorptionBullet", _GameBattle$BulletPre[GameBattle.BulletType.LockNoSame2] = "prefabs/scene/bullet/RemoteBullet", _GameBattle$BulletPre[GameBattle.BulletType.LockNoSame3] = "prefabs/scene/bullet/RemoteBullet", _GameBattle$BulletPre[GameBattle.BulletType.Affected] = "prefabs/scene/effect/affected", _GameBattle$BulletPre);
        var OtherPrefabPath = _GameBattle.OtherPrefabPath = {
          /** 伤害提示 */
          DamageTips: "prefabs/scene/DamageTips",
          /** 掉落物品 */
          itemFallingProp: "prefabs/scene/itemFallingProp",
          /** 掉落金币 卡皮巴拉专用的 */
          itemFallingGold: "prefabs/scene/itemFallingGold",
          /** 经验飞行拖尾 */
          itemExpMotionSteak: "prefabs/scene/itemExpMotionSteak",
          /** 地图上的动态效果 */
          skillCastEffect: "prefabs/scene/skillCastEffect",
          /** 获取物品提示 */
          itemGetPropTips: "prefabs/scene/itemGetPropTips",
          /** BUFF图标 */
          itemBuffIcon: "prefabs/scene/itemBuffIcon",
          /** 技能预警图标 */
          skillWarning: "prefabs/scene/spineSkillYuJing",
          /** 肉钩 */
          // hook: 'skill/monster/Hook',

          /** 石壁 */
          shibi: "skill/monster/shibi",
          /** 掉落UI动画 */
          itemFallUi: "prefabs/scene/ItemFallUi"

          /** 血月模式副本NPC */
          // itemBattleMoonNPC: 'prefabs/scene/itemBattleMoonNPC',
        };

        var itemTMXGrass = _GameBattle.itemTMXGrass = "prefabs/scene/itemTMXGrass";
        var item_battleMap = _GameBattle.item_battleMap = "prefabs/scene/item_battleMap";
        var itemBattleNpc = _GameBattle.itemBattleNpc = "prefabs/scene/itemBattleNpc";
        var CommomUiTip = /*#__PURE__*/function (CommomUiTip) {
          CommomUiTip[CommomUiTip["hpBall"] = 0] = "hpBall";
          CommomUiTip[CommomUiTip["mpBall"] = 1] = "mpBall";
          CommomUiTip[CommomUiTip["skill"] = 2] = "skill";
          return CommomUiTip;
        }({});
        _GameBattle.CommomUiTip = CommomUiTip;
        var PlayerSkillTierNum = _GameBattle.PlayerSkillTierNum = 5;
      })(GameBattle || (GameBattle = exports('GameBattle', {})));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleGlobalData.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "aef35QLCJZD+q3qidKiyUHf", "BattleGlobalData", undefined);
      var BattleGlobalDataType = exports('BattleGlobalDataType', /*#__PURE__*/function (BattleGlobalDataType) {
        BattleGlobalDataType[BattleGlobalDataType["hpBallRatio"] = 1] = "hpBallRatio";
        BattleGlobalDataType[BattleGlobalDataType["skillCost"] = 2] = "skillCost";
        BattleGlobalDataType[BattleGlobalDataType["geDangRatio"] = 3] = "geDangRatio";
        BattleGlobalDataType[BattleGlobalDataType["maxBossHitRatio"] = 4] = "maxBossHitRatio";
        return BattleGlobalDataType;
      }({}));
      var BattleGlobalData = exports('BattleGlobalData', /*#__PURE__*/function () {
        function BattleGlobalData() {
          this._map = {};
        }
        var _proto = BattleGlobalData.prototype;
        _proto.init = function init() {
          this._map = {};
          this._map[BattleGlobalDataType.hpBallRatio] = 0;
          this._map[BattleGlobalDataType.skillCost] = 1;
          this._map[BattleGlobalDataType.geDangRatio] = 0;
          this._map[BattleGlobalDataType.maxBossHitRatio] = 0;
        };
        _proto.getData = function getData(type) {
          return this._map[type];
        };
        _proto.setData = function setData(type, value) {
          if (!this._map[type]) {
            this._map[type] = value;
          } else {
            this._map[type] += value;
          }
        };
        return BattleGlobalData;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleHeroHeadsItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './TeamMgr.ts', './ModuleDef.ts', './DBRecord.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, ProgressBar, Node, Color, Vec2, instantiate, UITransform, director, Canvas, v3, Component, App, TeamMgr, ModuleDef, DBRecord, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      ProgressBar = module.ProgressBar;
      Node = module.Node;
      Color = module.Color;
      Vec2 = module.Vec2;
      instantiate = module.instantiate;
      UITransform = module.UITransform;
      director = module.director;
      Canvas = module.Canvas;
      v3 = module.v3;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "0338aY0z9dLG6eo8ssahBzX", "BattleHeroHeadsItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleHeroHeadsItem = exports('BattleHeroHeadsItem', (_dec = ccclass("BattleHeroHeadsItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: ProgressBar
      }), _dec6 = property({
        type: Node
      }), _dec7 = property({
        type: Sprite
      }), _dec8 = property({
        type: Sprite
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleHeroHeadsItem, _Component);
        function BattleHeroHeadsItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 英雄特效-满怒气状态 */
          _initializerDefineProperty(_this, "effSp", _descriptor, _assertThisInitialized(_this));
          /** 英雄品质背景 */
          _initializerDefineProperty(_this, "headBg", _descriptor2, _assertThisInitialized(_this));
          /** 英雄头像 */
          _initializerDefineProperty(_this, "headIcon", _descriptor3, _assertThisInitialized(_this));
          /** 英雄怒气值进度条 */
          _initializerDefineProperty(_this, "rageBar", _descriptor4, _assertThisInitialized(_this));
          /** 技能节点node */
          _initializerDefineProperty(_this, "skillNode", _descriptor5, _assertThisInitialized(_this));
          /** 技能图标 */
          _initializerDefineProperty(_this, "skillIcon", _descriptor6, _assertThisInitialized(_this));
          /** 技能类型icon */
          _initializerDefineProperty(_this, "skillType", _descriptor7, _assertThisInitialized(_this));
          // 私有变量
          _this._heroData = null;
          // 英雄数据
          _this._heroEntity = null;
          // 英雄实体引用
          _this._rageGainPerSecond = 0;
          // 每秒怒气增长值
          _this._maxRage = 100;
          // 最大怒气值
          _this._isDead = false;
          // 是否死亡
          _this._isInBattle = false;
          // 是否在战场上
          _this._isRageFull = false;
          // 怒气是否已满
          _this._skillId = 0;
          // 技能ID
          _this._isDraggingSkill = false;
          // 是否正在拖拽技能
          _this._skillDragIcon = null;
          // 拖拽中的技能作用范围圈节点
          _this._touchEventListenerAdded = false;
          // 是否已注册触摸事件
          _this._dragStartPos = null;
          // 拖拽起始位置
          _this._dragThreshold = 10;
          // 拖拽阈值（像素），超过此距离视为拖拽
          _this._justReleasedSkill = false;
          return _this;
        }
        var _proto = BattleHeroHeadsItem.prototype;
        // 刚刚释放了技能（用于防止事件冒泡）
        _proto.onLoad = function onLoad() {
          // 注册点击事件
          this.node.on(Node.EventType.TOUCH_END, this.onHeroHeadClick, this);

          // 初始隐藏技能节点
          if (this.skillNode) {
            this.skillNode.active = false;
          }
        };
        _proto.onDestroy = function onDestroy() {
          // 移除点击事件
          if (this.node && this.node.isValid) {
            this.node.off(Node.EventType.TOUCH_END, this.onHeroHeadClick, this);
          }

          // 移除技能拖拽事件
          if (this.skillNode && this.skillNode.isValid) {
            this.skillNode.off(Node.EventType.TOUCH_START, this.onSkillDragStart, this);
            this.skillNode.off(Node.EventType.TOUCH_MOVE, this.onSkillDragMove, this);
            this.skillNode.off(Node.EventType.TOUCH_END, this.onSkillDragEnd, this);
            this.skillNode.off(Node.EventType.TOUCH_CANCEL, this.onSkillDragCancel, this);
          }

          // 清理拖拽图标
          if (this._skillDragIcon && this._skillDragIcon.isValid) {
            this._skillDragIcon.destroy();
            this._skillDragIcon = null;
          }

          // 重置标志
          this._touchEventListenerAdded = false;
        }

        /**
         * 显示英雄头像
         * @param data 英雄数据
         * @param heroEntity 英雄实体（可选）
         */;
        _proto.show = function show(data, heroEntity) {
          this.showEmpty();
          if (!data) return;
          this._heroData = data;
          this._heroEntity = heroEntity;
          this._isDead = false;
          this._isInBattle = false;
          this._isRageFull = false;

          // 显示背景
          if (this.headBg) {
            this.headBg.node.active = true;
          }

          // 显示头像
          var heroCfg = TeamMgr.inst.getHeroIdCfg(data.hero_id);
          if (heroCfg && this.headIcon) {
            this.headIcon.node.active = true;
            App.resMgr.loadImage(this.headIcon, ModuleDef.GAME_ICON, "/head_icon/" + heroCfg.icon + "_head");
          }

          // 获取怒气配置
          this.updateRageConfig();

          // 初始化怒气条为隐藏状态（未上战场）
          if (this.rageBar) {
            this.rageBar.node.active = false;
            this.rageBar.progress = 0;
          }

          // 隐藏满怒气特效
          if (this.effSp) {
            this.effSp.node.active = false;
          }

          // 恢复正常颜色
          this.setGrayScale(false);

          // 加载并显示技能图标
          this.loadSkillIcon();
        }

        /**
         * 显示空位置
         */;
        _proto.showEmpty = function showEmpty() {
          // 隐藏头像
          if (this.headIcon) {
            this.headIcon.node.active = false;
          }
          // 隐藏怒气条
          if (this.rageBar) {
            this.rageBar.node.active = false;
          }
          // 隐藏满怒气特效
          if (this.effSp) {
            this.effSp.node.active = false;
          }
          // 隐藏技能节点
          if (this.skillNode) {
            this.skillNode.active = false;
          }

          // 重置内部状态
          this._heroData = null;
          this._heroEntity = null;
          this._isDead = false;
          this._isInBattle = false;
          this._skillId = 0;
          this._isRageFull = false;
          this._touchEventListenerAdded = false;
        }

        /**
         * 更新怒气配置（从Hero_Stage配置读取）
         */;
        _proto.updateRageConfig = function updateRageConfig() {
          if (!this._heroData) return;
          var stageCfg = TeamMgr.inst.getHeroStageCfg(this._heroData.hero_id, this._heroData.stage);
          if (stageCfg && stageCfg.nuqi) {
            // nuqi格式: [每秒增长值, 增长间隔(秒), 最大值]
            // 例如: [5, 1, 100] 表示每1秒增长5点怒气，最大100
            var _stageCfg$nuqi = stageCfg.nuqi,
              gainAmount = _stageCfg$nuqi[0],
              gainInterval = _stageCfg$nuqi[1],
              maxRage = _stageCfg$nuqi[2];
            this._rageGainPerSecond = gainAmount / gainInterval; // 转换为每秒增长值
            this._maxRage = maxRage;
          } else {
            // 默认值
            this._rageGainPerSecond = 5;
            this._maxRage = 100;
          }
        }

        /**
         * 英雄部署到战场
         */;
        _proto.onHeroDeployed = function onHeroDeployed() {
          this._isInBattle = true;
          this._isDead = false;

          // 显示怒气条
          if (this.rageBar) {
            this.rageBar.node.active = true;
            this.rageBar.progress = 0;
          }

          // 恢复正常颜色
          this.setGrayScale(false);
        }

        /**
         * 英雄返回城墙（待命状态）
         */;
        _proto.onHeroReturnToWall = function onHeroReturnToWall() {
          this._isInBattle = false;

          // 隐藏怒气条
          if (this.rageBar) {
            this.rageBar.node.active = false;
            this.rageBar.progress = 0;
          }

          // 隐藏满怒气特效
          if (this.effSp) {
            this.effSp.node.active = false;
          }

          // 恢复正常颜色
          this.setGrayScale(false);
        }

        /**
         * 英雄死亡
         */;
        _proto.onHeroDead = function onHeroDead() {
          this._isDead = true;

          // 清空怒气条
          if (this.rageBar) {
            this.rageBar.progress = 0;
          }

          // 隐藏满怒气特效
          if (this.effSp) {
            this.effSp.node.active = false;
          }

          // 设置灰色显示
          this.setGrayScale(true);
        }

        /**
         * 英雄复活
         */;
        _proto.onHeroRevive = function onHeroRevive() {
          this._isDead = false;
          this._isInBattle = false;

          // 隐藏怒气条（复活后在城墙上）
          if (this.rageBar) {
            this.rageBar.node.active = false;
            this.rageBar.progress = 0;
          }

          // 恢复正常颜色
          this.setGrayScale(false);
        }

        /**
         * 更新英雄怒气值进度条
         * @param rage 当前怒气值
         */;
        _proto.updateRageBar = function updateRageBar(rage) {
          if (!this._isInBattle || this._isDead) {
            return;
          }

          // 更新进度条
          if (this.rageBar) {
            this.rageBar.progress = rage / this._maxRage;
          }

          // 更新怒气满状态
          this._isRageFull = rage >= this._maxRage;

          // 显示/隐藏满怒气特效（怒火燃烧特效）
          if (this.effSp) {
            this.effSp.node.active = this._isRageFull;
            this._justReleasedSkill = !this._isRageFull;
          }
        }

        /**
         * 每帧更新（从英雄实体同步怒气值）
         */;
        _proto.update = function update(_dt) {
          if (!this._heroEntity || !this._isInBattle || this._isDead) {
            return;
          }

          // 从英雄实体同步怒气值
          this.updateRageBar(this._heroEntity.rage);
        }

        /**
         * 设置灰度显示
         * @param isGray 是否灰度
         */;
        _proto.setGrayScale = function setGrayScale(isGray) {
          var grayColor = new Color(128, 128, 128, 255);
          var normalColor = new Color(255, 255, 255, 255);
          var targetColor = isGray ? grayColor : normalColor;
          if (this.headIcon) {
            this.headIcon.color = targetColor;
          }
          if (this.headBg) {
            this.headBg.color = targetColor;
          }
        }

        /**
         * 绑定英雄实体
         * @param heroEntity 英雄实体
         */;
        _proto.bindHeroEntity = function bindHeroEntity(heroEntity) {
          this._heroEntity = heroEntity;
        }

        /**
         * 加载技能图标
         */;
        _proto.loadSkillIcon = function loadSkillIcon() {
          if (!this._heroData || !this.skillNode) {
            return;
          }

          // 获取英雄星级配置中的技能ID
          var starCfg = TeamMgr.inst.getHeroStarCfg(this._heroData.hero_id, this._heroData.star);
          if (!starCfg || !starCfg.skill_id) {
            return;
          }
          this._skillId = starCfg.skill_id;

          // 获取技能配置
          var skillCfg = DBRecord.fetchId("Skill", this._skillId);
          if (!skillCfg) {
            return;
          }

          // 加载技能图标
          if (this.skillIcon && skillCfg.icon) {
            UtilGame.loadSkillIcon(this.skillIcon, skillCfg.id);
          }

          // 设置技能类型图标（根据技能类型设置不同图标）
          if (this.skillType) {
            // TODO: 根据技能类型加载对应图标
            UtilGame.loadSkillTypeIcon(this.skillType, skillCfg.type);
          }
          // 防止重复注册导致多次回调
          if (!this._touchEventListenerAdded) {
            this._touchEventListenerAdded = true;
            // 拖拽事件处理特殊，触发顺序: move -> end (手指在节点上抬起) 或 move -> cancel (手指移出节点外抬起)
            // 为避免拖拽在节点外抬起没有触发end，我们全局监听touch end/up事件
            this.skillNode.on(Node.EventType.TOUCH_START, this.onSkillDragStart, this);
            this.skillNode.on(Node.EventType.TOUCH_MOVE, this.onSkillDragMove, this);
            this.skillNode.on(Node.EventType.TOUCH_END, this.onSkillDragEnd, this);
            this.skillNode.on(Node.EventType.TOUCH_CANCEL, this.onSkillDragCancel, this);
          }
        }

        /**
         * 英雄头像点击事件处理
         */;
        _proto.onHeroHeadClick = function onHeroHeadClick() {
          // 如果刚刚释放了技能，忽略此次点击（防止事件冒泡）
          if (this._justReleasedSkill) {
            this._justReleasedSkill = false;
            return;
          }

          // 只有怒气满时才响应点击
          if (!this._isRageFull || !this._heroEntity || this._isDead || !this._isInBattle) {
            return;
          }
          if (!this._heroData || !this.skillNode) {
            return;
          }

          // 切换技能节点显示状态
          this.skillNode.active = !this.skillNode.active;
          if (this.skillNode.active) {
            // 显示英雄攻击范围
            var starCfg = TeamMgr.inst.getHeroStarCfg(this._heroData.hero_id, this._heroData.star);
            if (starCfg && starCfg.skill_id) {
              var skillCfg = DBRecord.fetchId("Skill", starCfg.skill_id);
              if (skillCfg && skillCfg.distance && skillCfg.distance.length >= 2) {
                var attackRange = skillCfg.distance[1];
                this._heroEntity.showAttackRange(attackRange);
              }
            }
          } else {
            // 隐藏攻击范围
            this._heroEntity.hideAttackRange();
          }
        }

        /**
         * 技能拖拽开始
         */;
        _proto.onSkillDragStart = function onSkillDragStart(event) {
          if (!this._isRageFull || !this._heroEntity || this._isDead || !this._isInBattle) {
            return;
          }

          // 阻止事件冒泡，防止触发英雄头像的点击事件
          event.propagationStopped = true;
          this._isDraggingSkill = true;

          // 记录拖拽起始位置
          this._dragStartPos = event.getUILocation();

          // 不在这里创建范围圈，等到TOUCH_MOVE时才创建（区分点击和拖拽）
        }

        /**
         * 技能拖拽移动
         */;
        _proto.onSkillDragMove = function onSkillDragMove(event) {
          if (!this._isDraggingSkill) {
            return;
          }

          // 如果范围圈还未创建，先检查是否移动距离足够（避免轻微抖动触发拖拽）
          if (!this._skillDragIcon && this.skillIcon && this._dragStartPos) {
            var currentPos = event.getUILocation();
            var moveDistance = Vec2.distance(this._dragStartPos, currentPos);

            // 移动距离小于阈值，不创建范围圈
            if (moveDistance < this._dragThreshold) {
              return;
            }
          }

          // 创建范围圈
          if (!this._skillDragIcon && this.skillIcon) {
            var _director$getScene;
            this._skillDragIcon = instantiate(this.skillIcon.node);

            // 获取技能范围
            var skillRange = 100; // 默认范围
            if (this._heroEntity.roleSkill && this._skillId) {
              var skill = this._heroEntity.roleSkill.getSkillById(this._skillId);
              if (skill && skill.distance && skill.distance.length > 0) {
                // 使用distance[1]（最大范围）作为圆圈半径
                skillRange = skill.distance[1] || skill.distance[0];
              }
            }

            // 替换Sprite资源为范围圆圈
            var sprite = this._skillDragIcon.getComponent(Sprite);
            if (sprite) {
              sprite.node.active = false;
              // 加载范围圆圈图片
              App.resMgr.loadImage(sprite, ModuleDef.GAME_BATTLE_B, "/images/new_battleUI/zd_img_fanwei", function () {
                sprite.node.active = true;
              });

              // 设置为完全不透明
              sprite.color = new Color(255, 255, 255, 255);

              // 获取Sprite的UITransform来设置实际尺寸
              var uiTransform = this._skillDragIcon.getComponent(UITransform);
              if (uiTransform) {
                // 直接设置内容尺寸为技能范围的直径
                var diameter = skillRange * 2;
                uiTransform.setContentSize(diameter, diameter);
                // 重置缩放为1
                this._skillDragIcon.setScale(1, 1, 1);
              }
            }
            var canvas = (_director$getScene = director.getScene()) == null ? void 0 : _director$getScene.getComponentInChildren(Canvas);
            if (canvas) {
              this._skillDragIcon.setParent(canvas.node);
              this._skillDragIcon.setSiblingIndex(9999);
            }
          }

          // 更新范围圈位置
          if (this._skillDragIcon) {
            var _director$getScene2;
            var _canvas = (_director$getScene2 = director.getScene()) == null ? void 0 : _director$getScene2.getComponentInChildren(Canvas);
            if (!_canvas) {
              return;
            }
            var uiPos = event.getUILocation();
            var uiPos3 = v3(uiPos.x, uiPos.y, 0);
            var uiTrans = _canvas.getComponent(UITransform);
            if (uiTrans) {
              var localPos = uiTrans.convertToNodeSpaceAR(uiPos3);
              this._skillDragIcon.setPosition(localPos);
            } else {
              this._skillDragIcon.setPosition(uiPos3);
            }
          }
        }

        /**
         * 技能拖拽结束
         * 必须保证拖拽状态 _isDraggingSkill 为 true 才进行操作
         */;
        _proto.onSkillDragEnd = function onSkillDragEnd(_event) {
          if (!this._isDraggingSkill) {
            return;
          }
          this._isDraggingSkill = false;

          // 判断是点击还是拖拽
          var isDrag = false;
          var targetWorldPos = null;

          // 如果拖拽图标存在，说明发生了拖拽（因为只有TOUCH_MOVE时才创建）
          if (this._skillDragIcon && this._skillDragIcon.isValid) {
            isDrag = true;
            // 获取拖拽图标的当前世界位置作为目标位置
            targetWorldPos = this._skillDragIcon.worldPosition.clone();
          }

          // 清理拖拽图标（范围圈）
          if (this._skillDragIcon) {
            if (this._skillDragIcon.isValid) {
              this._skillDragIcon.destroy();
            }
            this._skillDragIcon = null;
          }

          // 隐藏技能节点
          if (this.skillNode) {
            this.skillNode.active = false;
          }

          // 设置标志，防止事件冒泡触发头像点击
          this._justReleasedSkill = true;
          if (!this._heroEntity || !this._heroEntity.node || !this._heroEntity.node.isValid) {
            return;
          }

          // 如果是拖拽，英雄闪现到目标点
          if (isDrag && targetWorldPos) {
            this._heroEntity.node.setWorldPosition(targetWorldPos);
          }
          // 如果是点击，英雄在原地释放技能（不移动）

          // 释放技能
          if (this._heroEntity.roleSkill && this._skillId) {
            // 消耗怒气
            this._heroEntity.rage = 0;

            // 获取技能对象
            var skill = this._heroEntity.roleSkill.getSkillById(this._skillId);
            if (skill) {
              // 退出移动状态
              this._heroEntity.exitMove();

              // 设置当前技能（用于动画完成回调识别）
              this._heroEntity.useSkill(skill);

              // 标记为手动释放的技能（用于handleSkillComplete判断）
              this._heroEntity._isManualSkill = true;

              // 锁定AI状态，防止技能播放期间被打断
              if (this._heroEntity._heroAI) {
                this._heroEntity._heroAI.stateLock = true;
              }

              // 播放Skill动作（在帧事件中会执行skill.use()）
              this._heroEntity.state.setSkill(skill.arts_action, skill);

              // 注意：不要在这里取消手动控制，会在handleSkillComplete中自动恢复
              // this._heroEntity.isManualControl = false;
            }
          }

          // 隐藏攻击范围
          this._heroEntity.hideAttackRange();

          // 重置拖拽起始位置
          this._dragStartPos = null;
        }

        /**
         * 技能拖拽取消
         * 当手指拖拽到节点外部抬起时会触发此事件而不是TOUCH_END
         * 所以需要和TOUCH_END一样处理：释放技能
         */;
        _proto.onSkillDragCancel = function onSkillDragCancel(event) {
          // 直接调用 onSkillDragEnd 来处理
          this.onSkillDragEnd(event);
        }

        /**
         * 将UI屏幕坐标转换为世界坐标
         * @param uiPos UI屏幕坐标（getUILocation返回的坐标）
         * @returns 世界坐标
         */;
        _proto.convertToWorldPosition = function convertToWorldPosition(uiPos) {
          var _director$getScene3;
          var canvas = (_director$getScene3 = director.getScene()) == null ? void 0 : _director$getScene3.getComponentInChildren(Canvas);
          if (!canvas) {
            return null;
          }
          var uiTrans = canvas.getComponent(UITransform);
          if (!uiTrans) {
            return null;
          }

          // getUILocation() 返回的是UI坐标系（左下角为原点）
          // 直接转换为Canvas节点的本地坐标，然后转为世界坐标
          var uiPos3 = v3(uiPos.x, uiPos.y, 0);
          var localPos = uiTrans.convertToNodeSpaceAR(uiPos3);
          var worldPos = uiTrans.convertToWorldSpaceAR(localPos);
          return worldPos;
        };
        return BattleHeroHeadsItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "effSp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "headBg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "headIcon", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "rageBar", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "skillNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "skillIcon", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "skillType", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleHeroStancesItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Hero.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, cclegacy, _decorator, Sprite, Node, Label, color, Component, Hero, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      color = module.color;
      Component = module.Component;
    }, function (module) {
      Hero = module.Hero;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "4abca25u7dJRaptzyApTi/s", "BattleHeroStancesItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleHeroStancesItem = exports('BattleHeroStancesItem', (_dec = ccclass("BattleHeroStancesItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Label
      }), _dec5 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleHeroStancesItem, _Component);
        function BattleHeroStancesItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "yinying", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroNode", _descriptor2, _assertThisInitialized(_this));
          /** 英雄状态 */
          _initializerDefineProperty(_this, "stateLab", _descriptor3, _assertThisInitialized(_this));
          /** 复活时间 */
          _initializerDefineProperty(_this, "timeLab", _descriptor4, _assertThisInitialized(_this));
          _this._hero = null;
          _this._heroIndex = 0;
          return _this;
        }
        var _proto = BattleHeroStancesItem.prototype;
        // 英雄索引（1, 2, 3...）
        _proto.start = function start() {
          this.stateLab.node.active = false;
          this.timeLab.node.active = false;
          this.timeLab.string = "00:00";

          // 初始化时获取Hero组件
          this.initHero();
        }

        /**
         * 初始化Hero组件
         */;
        _proto.initHero = function initHero() {
          if (!this.heroNode) return;

          // 首先尝试从heroNode或其子节点获取Hero组件
          this._hero = this.heroNode.getComponent(Hero);
          if (!this._hero) {
            this._hero = this.heroNode.getComponentInChildren(Hero);
          }

          // 如果还是找不到，尝试从DungeonBattleMgr的待命列表中查找
          if (!this._hero && App.dungeonBattleMgr) {
            // 根据heroNode在City中的索引来确定英雄索引
            var city = App.dungeonBattleMgr.city;
            if (city) {
              var heroItems = city.heros;
              var index = heroItems.indexOf(this);
              if (index >= 0) {
                this._heroIndex = index + 1;
                // 从待命列表中查找对应索引的英雄
                var standbyHeros = App.dungeonBattleMgr.standbyHeros;
                for (var _iterator = _createForOfIteratorHelperLoose(standbyHeros.values()), _step; !(_step = _iterator()).done;) {
                  var _hero = _step.value;
                  if (_hero.citySlotIndex === this._heroIndex) {
                    this._hero = _hero;
                    break;
                  }
                }

                // 如果待命列表中没有，尝试从已部署列表中查找
                if (!this._hero) {
                  var deployedHeros = App.dungeonBattleMgr.deployedHeroes;
                  for (var _iterator2 = _createForOfIteratorHelperLoose(deployedHeros.values()), _step2; !(_step2 = _iterator2()).done;) {
                    var hero = _step2.value;
                    if (hero.citySlotIndex === this._heroIndex) {
                      this._hero = hero;
                      break;
                    }
                  }
                }
              }
            }
          }

          // 如果找到了Hero，设置其citySlotIndex（如果还没有设置）
          if (this._hero && this._heroIndex > 0 && this._hero.citySlotIndex === 0) {
            this._hero.citySlotIndex = this._heroIndex;
          }

          // 更新初始状态
          this.updateHeroState();
        };
        _proto.update = function update(deltaTime) {
          if (!this._hero) {
            // 如果还没有找到Hero，继续尝试查找
            if (this.heroNode) {
              this.initHero();
            }
            return;
          }

          // 更新英雄状态显示
          this.updateHeroState();

          // 如果英雄死亡，更新倒计时
          if (this._hero.isDead && this._hero.reviveCD > 0) {
            this.updateReviveCountdown(deltaTime);
          }
        }

        /**
         * 更新英雄状态显示
         */;
        _proto.updateHeroState = function updateHeroState() {
          if (!this._hero) {
            // 如果没有Hero，隐藏状态和时间
            this.stateLab.node.active = false;
            this.timeLab.node.active = false;
            return;
          }

          // 如果英雄已出战（不在待命状态），隐藏状态和时间
          if (!this._hero.isWaiting) {
            this.stateLab.node.active = false;
            this.timeLab.node.active = false;
            return;
          }

          // 英雄在待命状态，显示状态
          this.stateLab.node.active = true;

          // 检查英雄是否死亡且倒计时未结束
          if (this._hero.isDead && this._hero.reviveCD > 0) {
            // 英雄死亡且倒计时未结束：显示"休整中"，红色，显示倒计时
            this.stateLab.string = "休整中";
            this.stateLab.color = color(255, 62, 62); // #FF3E3E
            this.timeLab.node.active = true;
          } else {
            // 英雄未死亡或倒计时已结束：显示"可出战"，青色，隐藏倒计时
            this.stateLab.string = "可出战";
            this.stateLab.color = color(70, 255, 248); // #46FFF8
            this.timeLab.node.active = false;
          }
        }

        /**
         * 更新复活倒计时
         */;
        _proto.updateReviveCountdown = function updateReviveCountdown(_deltaTime) {
          if (!this._hero || !this._hero.isDead) {
            this.timeLab.node.active = false;
            return;
          }

          // Hero.onUpdate 已经在更新 reviveCD，这里只需要读取并显示
          var remainingTime = Math.max(0, this._hero.reviveCD);

          // 格式化时间显示（MM:SS）
          var minutes = Math.floor(remainingTime / 60);
          var seconds = Math.floor(remainingTime % 60);
          this.timeLab.string = minutes.toString().padStart(2, "0") + ":" + seconds.toString().padStart(2, "0");

          // 倒计时结束，英雄可以出战
          if (remainingTime <= 0) {
            // 更新状态显示（Hero.onUpdate 已经处理了 reviveCD 的更新）
            this.updateHeroState();
          }
        }

        /**
         * 设置Hero实例（外部调用）
         */;
        _proto.setHero = function setHero(hero) {
          this._hero = hero;
          if (hero) {
            this._heroIndex = hero.citySlotIndex || 0;
          }
          this.updateHeroState();
        }

        /**
         * 当英雄死亡时，将Hero节点移回heroNode
         */;
        _proto.onHeroDead = function onHeroDead() {
          if (!this._hero || !this.heroNode) return;

          // 将Hero节点移回heroNode
          if (this._hero.node && this._hero.node.parent !== this.heroNode) {
            var worldPos = this._hero.node.worldPosition.clone();
            this._hero.node.setParent(this.heroNode);
            this._hero.node.setWorldPosition(worldPos);
          }

          // 更新状态显示
          this.updateHeroState();
        };
        return BattleHeroStancesItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "yinying", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "heroNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "stateLab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleMainView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ModuleDef.ts', './MonitorType.ts', './ModuleContext.ts', './UIBase.ts', './BattleMainViewCtrl.ts'], function (exports) {
  var _inheritsLoose, cclegacy, App, ModuleDef, MonitorType, ModuleContext, UIBase, BattleMainViewCtrl;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      BattleMainViewCtrl = module.BattleMainViewCtrl;
    }],
    execute: function () {
      cclegacy._RF.push({}, "81d44K+XPBOT7p7d2FzBe2b", "BattleMainView", undefined);
      var BattleMainView = exports('BattleMainView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(BattleMainView, _UIBase);
        function BattleMainView() {
          return _UIBase.call(this, BattleMainView.custom) || this;
        }
        var _proto = BattleMainView.prototype;
        _proto.onCreated = function onCreated(guanqiaId, dungeonInfoOrCallback, callBack) {
          console.warn(">>>>>>>>>> AutoFight BattleMainView onCreated", guanqiaId, dungeonInfoOrCallback, callBack);
          _UIBase.prototype.onCreated.call(this);
          var comp = this.node.getComponent(BattleMainViewCtrl);

          // 处理参数兼容性：可能是 (dungeonId, callback) 或 (dungeonId, dungeonInfo, callback)
          var dungeonInfo = null;
          if (dungeonInfoOrCallback instanceof Function) ;else if (dungeonInfoOrCallback) {
            // 新格式：(dungeonId, dungeonInfo, callback)
            dungeonInfo = dungeonInfoOrCallback;
          }
          comp.init(guanqiaId, dungeonInfo);
          App.monitorMgr.addEventListener(MonitorType.battle_flow_back_home, this._onEventBattleFlowBackHome, this);
        };
        _proto.onDispose = function onDispose() {
          console.warn("######### AutoFight BattleMainView onDispose() ");
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.removeEventListener(MonitorType.battle_flow_back_home, this._onEventBattleFlowBackHome, this);
        }

        /**
         * 事件消息： 战斗 —— 流程 —— 返回主界面
         */;
        _proto._onEventBattleFlowBackHome = function _onEventBattleFlowBackHome() {
          App.battleMgr.onExit();
          // App.autoFightManager.exitAutoJump();
          this.onClose();
        };
        return BattleMainView;
      }(UIBase));
      BattleMainView.custom = {
        prefab: "prefabs/scene/BattleMainView",
        binding: {}
      };
      ModuleContext.attachModule(BattleMainView, ModuleDef.GAME_BATTLE_B);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleMainViewCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './BattleDefine.ts', './DBRecord.ts', './BattleMap.ts', './BattleMiniMapCtrl.ts', './BattleCtrlView.ts', './BattleUIView.ts', './PlayerCamera.ts', './App.ts', './City.ts', './TeamMgr.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Node, Sprite, sp, Label, tween, Component, MonitorType, GameBattle, DBRecord, BattleMap, BattleMiniMapCtrl, BattleCtrlView, BattleUIView, PlayerCamera, App, City, TeamMgr, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      sp = module.sp;
      Label = module.Label;
      tween = module.tween;
      Component = module.Component;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      BattleMap = module.BattleMap;
    }, function (module) {
      BattleMiniMapCtrl = module.BattleMiniMapCtrl;
    }, function (module) {
      BattleCtrlView = module.BattleCtrlView;
    }, function (module) {
      BattleUIView = module.BattleUIView;
    }, function (module) {
      PlayerCamera = module.PlayerCamera;
    }, function (module) {
      App = module.App;
    }, function (module) {
      City = module.City;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28;
      cclegacy._RF.push({}, "ccb1cw9AYdPEqiew7dyIOzE", "BattleMainViewCtrl", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleMainViewCtrl = exports('BattleMainViewCtrl', (_dec = ccclass("BattleMainViewCtrl"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Node
      }), _dec6 = property({
        type: Node
      }), _dec7 = property({
        type: Node
      }), _dec8 = property({
        type: PlayerCamera
      }), _dec9 = property({
        type: BattleCtrlView
      }), _dec10 = property({
        type: BattleMap
      }), _dec11 = property({
        type: BattleUIView
      }), _dec12 = property({
        type: City
      }), _dec13 = property({
        type: Node
      }), _dec14 = property({
        type: Node
      }), _dec15 = property({
        type: Sprite
      }), _dec16 = property({
        type: Node
      }), _dec17 = property({
        type: sp.Skeleton
      }), _dec18 = property({
        type: sp.Skeleton
      }), _dec19 = property({
        type: sp.Skeleton
      }), _dec20 = property({
        type: Node
      }), _dec21 = property({
        type: Node
      }), _dec22 = property({
        type: Node
      }), _dec23 = property({
        type: Node
      }), _dec24 = property({
        type: Node
      }), _dec25 = property({
        type: Node
      }), _dec26 = property({
        type: Node
      }), _dec27 = property({
        type: BattleMiniMapCtrl
      }), _dec28 = property({
        type: Node
      }), _dec29 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleMainViewCtrl, _Component);
        function BattleMainViewCtrl() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "monsterUiLayer", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "warningLayer", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "roleLayer", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bulletLayer", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "underBulletLayer", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "effectLayer", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "playerCamera", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "battleCtrlView", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "battleMap", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "battleUIView", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "battleCity", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spineWarning", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroWarning", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroBody", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "fallingLayer", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "effectBarLight", _descriptor16, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "effectEye", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spineXieShenKaiSa", _descriptor18, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nodeParticleBar", _descriptor19, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "battleBg", _descriptor20, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bossHpBarCurrent", _descriptor21, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bossHpBarCurrentParti", _descriptor22, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bossHpBarBG", _descriptor23, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bossHpTips", _descriptor24, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bossName", _descriptor25, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "miniMapCtrl", _descriptor26, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBattleProgressBg", _descriptor27, _assertThisInitialized(_this));
          /** 疲劳值 */
          _initializerDefineProperty(_this, "lbTired", _descriptor28, _assertThisInitialized(_this));
          /**自动战斗UI */
          // @property({ type: BattleAutoFightUI })
          // public battleAutoFightUI: BattleAutoFightUI = null;
          _this.boosHpList = [];
          _this._meiGuanNum = 0;
          _this._cur_progress_limit = 0;
          _this._total_progress_limit = 0;
          _this._imgBattleProgressWidth = 216;
          _this.dungeonId = 0;
          _this.dungeonType = 1;
          _this.imgPregressArray = ["10", "11", "12"];
          //['04', '05', '06', '08', '10', '11', '12'];
          _this._lastBGProgress = null;
          _this._hpDuration = 0.2;
          _this._hasBoss = false;
          _this._isPush = false;
          _this._currentMonster = void 0;
          /** 更新体力数值定时器 */
          _this.updateTiLiTimer = null;
          /** 初始体力值 */
          _this.initTili = 0;
          return _this;
        }
        var _proto = BattleMainViewCtrl.prototype;
        _proto.hasBoss = function hasBoss() {
          return this._hasBoss;
        };
        _proto.onLoad = function onLoad() {};
        _proto.start = function start() {
          // BattleBigMap.getInstance().initDebugPathSprite(this.node.getChildByName('DebugSprite'));
          // BattleBigMap.getInstance().initDebugPhysicsSprite(this.node.getChildByName('DebugSpritePhysics'));
          App.battleMgr.battleMainViewCtrl = this;
          // App.battleMgr.onEnter();
          // this.battleUIView.initSkillItems();
          // this.init()

          App.dungeonBattleMgr.battleMainViewCtrl = this;
          App.monitorMgr.addEventListener(MonitorType.battle_monster_die, this.onMonsterDie, this);
          App.monitorMgr.addEventListener(MonitorType.battle_update_buff_ui, this.onUpdateBuffUi, this);
          var fbr = App.battleMgr.getFbCfg(this.dungeonId);
          var spawnConfigs = App.battleMgr.initFbMonsterSpawnCfg(fbr.id);
          var config = {
            dungeonId: this.dungeonId,
            dungeonType: this.dungeonType,
            cityDurability: fbr.zhucheng_hp,
            militaryOrders: fbr.junling,
            heroes: TeamMgr.inst.currFormation.heros,
            soldiers: TeamMgr.inst.currFormation.soldiers,
            spawnConfigs: spawnConfigs
          };

          // this.spineWarning.setCompleteListener(() => {
          //     this.spineWarning.node.active = false;
          // });

          // const playerCamera = this.playerCamera.camera;
          // playerCamera.orthoHeight = 830;
          this.playerCamera.updateSet();
          if (!this._isPush) {
            App.dungeonBattleMgr.initBattle(config);
          }
        };
        _proto.onEnable = function onEnable() {
          // this.battleMiJingB = null;
          this.scheduleOnce(function () {
            // App.battleMgr.roleCtrl.player?._buffBox.triggerEventBuff(GameBattle.EventBuffId.enterBattle);
          }, 1.0);
        }

        /**
         * 初始化关卡
         * @param guanqiaId 关卡ID
         * @param dungeonInfo 推送的副本信息（可选）
         */;
        _proto.init = function init(guanqiaId, dungeonInfo) {
          App.dungeonBattleMgr.battleMainViewCtrl = this;
          this.dungeonId = guanqiaId;
          var dbr = DBRecord.fetchId("Fb", guanqiaId);
          this._total_progress_limit = dbr.zhucheng_hp;
          this.spineWarning.active = false;
          this._hasBoss = false;

          // 如果有推送的副本信息，使用推送的数据初始化战斗
          if (dungeonInfo) {
            this._isPush = true;
            this.initBattleWithPushInfo(dungeonInfo);
          }
        }

        /**
         * 使用推送的副本信息初始化战斗
         * @param dungeonInfo 推送的副本信息
         */;
        _proto.initBattleWithPushInfo = function initBattleWithPushInfo(dungeonInfo) {
          // 从推送信息中获取战斗数据
          var waveIndex = dungeonInfo.wave_times || 0;
          var moraleValue = dungeonInfo.shiqi_val || 0;
          var pushUnits = dungeonInfo.units || [];
          var pushSoldiers = dungeonInfo.soldiers || [];
          App.log.logBusiness("\u7EE7\u7EED\u6218\u6597\uFF1A\u526F\u672CID=" + dungeonInfo.dungeon_id + ", \u6CE2\u6570=" + waveIndex + ", \u58EB\u6C14=" + moraleValue);

          // 从当前编队获取英雄
          var currFormation = TeamMgr.inst.currFormation;
          var heroes = [];
          if (currFormation && currFormation.heros) {
            heroes = currFormation.heros;
          }

          // 从当前编队获取士兵
          var soldiers = [];
          if (currFormation && currFormation.soldiers) {
            soldiers = currFormation.soldiers;
          }

          // 获取怪物刷新配置
          var fbr = App.battleMgr.getFbCfg(dungeonInfo.dungeon_id);
          var spawnConfigs = App.battleMgr.initFbMonsterSpawnCfg(fbr.id);

          // 初始化战斗配置
          var config = {
            dungeonId: dungeonInfo.dungeon_id,
            dungeonType: GameBattle.GuanQiaType.MainLine,
            cityDurability: fbr.zhucheng_hp,
            militaryOrders: fbr.junling,
            heroes: heroes,
            soldiers: soldiers,
            spawnConfigs: spawnConfigs,
            // 继续战斗的特殊参数
            continueFromWave: waveIndex,
            initialMorale: moraleValue,
            pushUnits: pushUnits,
            pushSoldiers: pushSoldiers
          };

          // 保存推送的士兵信息到DungeonBattleMgr供后续使用
          App.dungeonBattleMgr.setPushSoldierInfo(pushSoldiers);

          // 初始化战斗
          App.dungeonBattleMgr.initBattle(config);
        }

        /**
         * 退出战场
         */;
        _proto.onExit = function onExit() {
          // if (this.battleMuZhuang) {
          //     this.battleMuZhuang = null;
          // }
          // if (this.battleJingJiChang) {
          //     this.battleJingJiChang = null;
          // }
          App.dungeonBattleMgr.reset();
          if (this.updateTiLiTimer) {
            App.scheduleMgr.unschedule(this.updateTiLiTimer);
            this.updateTiLiTimer = null;
          }
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.removeEventListener(MonitorType.battle_monster_die, this.onMonsterDie, this);
          App.monitorMgr.removeEventListener(MonitorType.battle_update_buff_ui, this.onUpdateBuffUi, this);
        };
        _proto.update = function update(deltaTime) {
          App.battleMgr.update(deltaTime);
          App.dungeonBattleMgr.update(deltaTime);
        };
        _proto.onMonsterDie = function onMonsterDie(monster, attrUser) {
          monster._monsterAI.pause = true;
          App.dungeonBattleMgr.handleMonsterDead(monster.uid, attrUser);
        };
        _proto.showBoss = /*#__PURE__*/function () {
          var _showBoss = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_bossPos) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!this._hasBoss) {
                    _context.next = 2;
                    break;
                  }
                  return _context.abrupt("return");
                case 2:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function showBoss(_x) {
            return _showBoss.apply(this, arguments);
          }
          return showBoss;
        }();
        _proto.onUpdateBuffUi = function onUpdateBuffUi(_ui_type, _buffId, _icon, _cd, _count, _remove) {};
        _proto.pauseAllAI = function pauseAllAI() {
          // boss._monsterAI.pause = true;
          // player.pause = true;
        };
        _proto.showBattleUI = function showBattleUI(val) {
          if (val === void 0) {
            val = true;
          }
          this.node.getChildByPath("BattleCtrlView").active = val;
          this.node.getChildByPath("BattleUIView/under/btnDrug").active = val;
        }
        /**
         *  播放出场动画
         * @param type hero、monster
         * @returns
         */;
        _proto.showSpineWarning = function showSpineWarning(type, hero_id) {
          var node = this.spineWarning;
          if (type === "monster") {
            this.spineWarning.active = true;
          } else {
            node = this.heroWarning;
            UtilGame.loadHeroHeadIcon(this.heroBody, hero_id, "_list");
          }

          //从左边出来，停留1秒后慢慢透明为0，然后隐藏掉
          if (!node) return;
          node.active = true;
          node.opacity = 255;
          node.setPosition(-720, node.position.y);

          // 移动到屏幕中央
          var targetX = 0;
          // 使用cc.Tween或Tween
          tween(node).to(0.3, {
            x: targetX
          }, {
            easing: "sineOut"
          }).delay(1).to(0.5, {
            opacity: 0
          }).call(function () {
            node.active = false;
            node.opacity = 255;
          }).start();
        };
        return BattleMainViewCtrl;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "monsterUiLayer", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "warningLayer", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "roleLayer", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "bulletLayer", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "underBulletLayer", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "effectLayer", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "playerCamera", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "battleCtrlView", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "battleMap", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "battleUIView", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "battleCity", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "spineWarning", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "heroWarning", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "heroBody", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "fallingLayer", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "effectBarLight", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "effectEye", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "spineXieShenKaiSa", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "nodeParticleBar", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "battleBg", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "bossHpBarCurrent", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "bossHpBarCurrentParti", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "bossHpBarBG", [_dec24], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "bossHpTips", [_dec25], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "bossName", [_dec26], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "miniMapCtrl", [_dec27], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "imgBattleProgressBg", [_dec28], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "lbTired", [_dec29], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleMap.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './Item_BattleMap.ts', './DBRecord.ts', './MonitorType.ts', './BattleDefine.ts', './BattleBigMap.ts', './ModuleDef.ts', './GameConfig.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Vec3, Component, Utils, Item_BattleMap, DBRecord, MonitorType, GameBattle, BattleBigMap, ModuleDef, GameConfig, App, AxingManager;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      Item_BattleMap = module.Item_BattleMap;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      BattleBigMap = module.BattleBigMap;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      AxingManager = module.AxingManager;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "37263d/r85Kbrfd+gSc2wy5", "BattleMap", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleMap = exports('BattleMap', (_dec = ccclass("BattleMap"), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleMap, _Component);
        function BattleMap() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this._owner = void 0;
          _this._curGrid = null;
          _this._gridWidth = 0;
          _this._gridHeight = 0;
          _this._mapData = {};
          return _this;
        }
        var _proto = BattleMap.prototype;
        _proto.getCurGridSize = function getCurGridSize() {
          return this._curGrid.tiledMap.getTileSize();
        };
        _proto.getCurMapSize = function getCurMapSize() {
          return this._curGrid.tiledMap.getMapSize();
        };
        _proto.start = function start() {};
        _proto.onDisable = function onDisable() {
          this._owner = null;
          this._curGrid = null;
          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.MiJingB) {
            var node = this.node.getChildByName("MijingBMap");
            if (node) {
              node.destroy();
            }
          }
          for (var _iterator = _createForOfIteratorHelperLoose(this.node.children), _step; !(_step = _iterator()).done;) {
            var _node = _step.value;
            var comp = _node.getComponent(Item_BattleMap);
            comp && (comp.tiledMap.tmxAsset = null);
          }
          this.node.removeAllChildren();
          Item_BattleMap.releaseMap();
        };
        _proto.init = function init(owner) {
          this.node.removeAllChildren();
          this._owner = owner;
          BattleBigMap.getInstance().initDebugLayer(this.node.parent.getChildByName("bgDebug"));
          var born_map = this.initMapData(App.battleMgr.diMao);
          var _this$getMapGrid = this.getMapGrid(born_map.res, born_map.id, true),
            bornGrid = _this$getMapGrid[0],
            comp = _this$getMapGrid[1];
          // bornGrid.setPosition(this.node.uiTransform.convertToWorldSpaceAR(v3(0,0,0)));
          bornGrid.setPosition(0, 0, 0);
          this._curGrid = bornGrid.getComponent(Item_BattleMap);
          var gridSize = this._curGrid.tiledMap.getTileSize();
          this._gridWidth = this._curGrid.map_width * gridSize.width;
          this._gridHeight = this._curGrid.map_height * gridSize.height;
          BattleBigMap.getInstance().clearMapPhysicsData();
          AxingManager.getInstance().clearCache();
          BattleBigMap.getInstance().addMapPhysicsData(0, 0, this._curGrid.tiledMap, born_map.res);
          App.mapMgr.setMap(this._curGrid.tiledMap, true, owner.node, born_map.id);
          App.battleMgr.battleNpcCtrl.enterNewMap(this._curGrid.node.uuid, this._curGrid.diKuaiId, this._curGrid.tiledMap);
          var worldPos = App.mapMgr.getBornPosition();
          this._owner.node.setWorldPosition(worldPos);
          App.battleMgr.setBattleBg(worldPos, App.battleMgr.diMao);
          console.log("this.node.uiTransform.convertToWorldSpaceAR(new Vec3(0,0,0))", this.node.uiTransform.convertToWorldSpaceAR(new Vec3(0, 0, 0)));
          //初始化小地图
          App.monitorMgr.dispatchEvent(MonitorType.battle_init_minimap, born_map.res, this._owner.node.worldPosition);
          this.scheduleOnce(function () {
            App.mapMgr.addMapWayPoint(comp.tiledMap, born_map.id);
          }, 0);
          this.setNextMapgrid();
        };
        _proto.lateUpdate = function lateUpdate(dt) {
          if (!this._owner || !this._curGrid) return;
          var pos = this._owner.node.worldPosition;
          if (pos.x > this._curGrid.node.worldPosition.x + this._gridWidth || pos.x < this._curGrid.node.worldPosition.x || pos.y > this._curGrid.node.worldPosition.y + this._gridHeight || pos.y < this._curGrid.node.worldPosition.y) {
            //进入到下一个地图块了
            for (var i = 0; i < this.node.children.length; i++) {
              var grid = this.node.children[i];
              var x = grid.worldPosition.x;
              var y = grid.worldPosition.y;
              if (pos.x >= x && pos.x <= x + this._gridWidth && pos.y >= y && pos.y <= y + this._gridHeight) {
                this._curGrid = grid.getComponent(Item_BattleMap);
                App.mapMgr.setMap(this._curGrid.tiledMap, true, this._owner.node, this._curGrid.diKuaiId);
                this.setNextMapgrid();
                App.battleMgr.battleNpcCtrl.enterNewMap(this._curGrid.node.uuid, this._curGrid.diKuaiId, this._curGrid.tiledMap);
                App.mapMgr.setAllWayPointArrivedCurDiKuai();
                App.mapMgr.curDiKuaiIndex = i;
                break;
              }
            }
          }
        };
        _proto.getMapGrid = function getMapGrid(tmxName, diKuaiId, is_born) {
          if (is_born === void 0) {
            is_born = false;
          }
          console.log(">>>>>>>>>>  BattleMap.getMapGrid:", tmxName);
          var mapgGrid = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.item_battleMap);
          this.node.addChild(mapgGrid);
          var comp = mapgGrid.getComponent(Item_BattleMap);
          comp.init(tmxName, is_born, diKuaiId);
          return [mapgGrid, comp];
        };
        _proto.initMapData = function initMapData(diMao) {
          var _App$battleMgr$getMap = App.battleMgr.getMapData(diMao),
            mapData = _App$battleMgr$getMap[0],
            bornMap = _App$battleMgr$getMap[1];
          this._mapData = {};
          this._mapData = mapData;
          var born_map = bornMap;
          var index = Math.floor(Math.random() * born_map.length);
          var map = born_map[index];
          if (GameConfig.DebugInfo.testMapList && GameConfig.DebugInfo.testMapList.length > 0) {
            map = DBRecord.fetchId("DiKuai", GameConfig.DebugInfo.testMapList[0]);
          }
          return map;
        };
        _proto.setNextMapgrid = function setNextMapgrid() {
          if (this._curGrid.hasNext) {
            console.log("战斗地图: 下一地块已生成完毕", this._curGrid.diKuaiId);
            return;
          }
          this._curGrid.hasNext = true;
          var next_in_direction = [0, 5, 8, 7, 6, 1, 4, 3, 2][this._curGrid.out_direction];
          var msps = this._mapData[next_in_direction];
          var index = Utils.GetRandomNum(0, msps.length - 1);
          var direction = [[1], [2, 3, 4], [5], [6, 7, 8]]; // 上 右 下 左
          // let dir_vector = [[0,1],[1,0],[0,-1],[-1,0]]
          var dir_vector = [];
          for (var i = 0; i < direction.length; i++) {
            if (direction[i].indexOf(this._curGrid.out_direction) > -1) {
              dir_vector = [[0, 1], [1, 0], [0, -1], [-1, 0]][i]; // 上 右 下 左
              break;
            }
          }

          // let rand_arr = []
          var pos = this._curGrid.node.getPosition();
          // let dir = rand_arr[Utils.GetRandomNum(0, rand_arr.length-1)]
          // let next_out_direction = direction[dir][Utils.GetRandomNum(0, direction[dir].length-1)]
          var targetMap = msps[index];
          if (GameConfig.DebugInfo.testMapList && GameConfig.DebugInfo.testMapList.length > 0 && BattleMap.testMapListIndex < GameConfig.DebugInfo.testMapList.length - 1) {
            targetMap = DBRecord.fetchId("DiKuai", GameConfig.DebugInfo.testMapList[++BattleMap.testMapListIndex]);
          }
          var tmxName = targetMap.res;
          var _this$getMapGrid2 = this.getMapGrid(tmxName, targetMap.id),
            grid = _this$getMapGrid2[0],
            comp = _this$getMapGrid2[1];
          var x = pos.x + dir_vector[0] * this._gridWidth;
          var y = pos.y + dir_vector[1] * this._gridHeight;
          grid.setPosition(x, y, 0);
          console.log("战斗地图: 下一块地图", tmxName);

          //增加小地图
          App.monitorMgr.dispatchEvent(MonitorType.battle_add_minimap, tmxName, dir_vector);
          BattleBigMap.getInstance().addMapPhysicsData(x, y, comp.tiledMap, tmxName);
          this.scheduleOnce(function () {
            App.mapMgr.addMapWayPoint(comp.tiledMap, targetMap.id);
          }, 0);
        }

        /**
         * 初始化导航
         * @param tiledMap
         */;
        _proto.initAXingData = function initAXingData(tiledMap) {
          var mapHeight = tiledMap.getMapSize().height;
          var mapWidth = tiledMap.getMapSize().width;
          var tiles = tiledMap.getLayer("physicalLayer").tiles;
          AxingManager.getInstance().initMapData_zhangaiwu(mapWidth, mapHeight, tiles);
        };
        _createClass(BattleMap, [{
          key: "curGrid",
          get: function get() {
            return this._curGrid;
          }
        }, {
          key: "gridWidth",
          get: function get() {
            return this._gridWidth;
          }
        }, {
          key: "gridHeight",
          get: function get() {
            return this._gridHeight;
          }
        }]);
        return BattleMap;
      }(Component), _class2.testMapListIndex = 0, _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleMapBg.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Sprite, NodePool, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      NodePool = module.NodePool;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "b5495imb3BMkqrKA4Qam5Uh", "BattleMapBg", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleMapBg = exports('BattleMapBg', (_dec = ccclass("BattleMapBg"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property(Sprite), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleMapBg, _Component);
        function BattleMapBg() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgYun", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nodeYunParent", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "fog", _descriptor3, _assertThisInitialized(_this));
          _this.spYun = [];
          _this._nodePool = new NodePool();
          _this._dt = 0;
          return _this;
        }
        var _proto = BattleMapBg.prototype;
        _proto.start = function start() {
          // let diMao = App.battleMgr.diMao;
          // this.spYun = [];
          // let index = 0;
          // for (var i = 0; i < 4; i++) {
          //     App.resMgr.loadSpriteFrame("battleMap", `map${diMao}/yun${i + 1}`, (err, sp) => {
          //         this._dt = -3;
          //         if (err) return;
          //         index++;
          //         this.spYun[index] && (this.spYun[index] = sp);
          //     });
          // }
          // this.fog.spriteFrame = null;
          // App.resMgr.loadImage(this.fog, "battleMap", `map${diMao}/fog`);
          // for (var i = 0; i < 4; i++) {
          //     var item: Node = instantiate(this.imgYun);
          //     this._nodePool.put(item);
          // }
          // this._nodePool.put(this.imgYun);
        };
        _proto.onDisable = function onDisable() {
          // Tween.stopAllByTag(11111);
          // for (let i = this.nodeYunParent.children.length; i--; ) {
          //     this._nodePool.put(this.nodeYunParent.children[i]);
          // }
        };
        _proto.createYun = function createYun() {
          // if (this._nodePool.size() === 0) {
          //     this._nodePool.put(instantiate(this.imgYun));
          // }
          // let node = this._nodePool.get();
          // let startPoint = v3(this.node.worldPosition.x + this.node.w, this.node.worldPosition.y + Math.random() * (this.node.h / 2));
          // let endPoint = v3(this.node.worldPosition.x, this.node.worldPosition.y + Math.random() * (this.node.h / 2) + this.node.h / 2);

          // this.nodeYunParent.addChild(node);
          // let len = this.spYun.length;
          // node.sprite.spriteFrame = this.spYun[Math.floor(Math.random() * len)];
          // node.setWorldPosition(startPoint);
          // tween(node)
          //     .tag(11111)
          //     .to(36.0, { worldPosition: endPoint })
          //     .call(() => {
          //         this._nodePool.put(node);
          //     })
          //     .start();
        };
        _proto.update = function update(dt) {
          // this._dt -= dt;
          // if (this._dt < 0) {
          //     this.createYun();
          //     this._dt = Math.random() * 10 + 5;
          // }
          // if (App.battleMgr.roleCtrl.player) {
          //     this.fog.node.setWorldPosition(App.battleMgr.roleCtrl.player.node.worldPosition);
          // }
        };
        return BattleMapBg;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgYun", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "nodeYunParent", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "fog", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BulletCtrl.ts', './DamageTips.ts', './BattleDefine.ts', './RoleCtrl.ts', './SkillCtrl.ts', './FallingPropCtrl.ts', './UIMgr.ts', './MonitorType.ts', './uiGameLoading.ts', './BattleNpcCtrl.ts', './DBRecord.ts', './GameStateMgr.ts', './BattleGlobalData.ts', './ui_Defeat.ts', './GameConfig.ts', './NetChannelMgr.ts', './Prompt.ts', './Item_BattleMap.ts', './UtilityPlatform.ts', './BattleMainView.ts', './App.ts', './BattleUtil.ts', './UI_MainView.ts', './Layout_UI_MainView.ts', './EventType.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _extends, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, Tween, TweenSystem, Node, view, ModuleDef, BulletCtrl, DamageTips, GameBattle, RoleCtrl, SkillCtrl, FallingPropCtrl, UIMgr, LayerType, MonitorType, uiGameLoading, BattleNpcCtrl, DBRecord, GameState, BattleGlobalData, ui_Defeat, GameConfig, netChannel, Prompt, Item_BattleMap, UtilityPlatform, BattleMainView, App, BattleUtil, UI_MainView, Layout_UI_MainView, EventType;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _extends = module.extends;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      TweenSystem = module.TweenSystem;
      Node = module.Node;
      view = module.view;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      BulletCtrl = module.BulletCtrl;
    }, function (module) {
      DamageTips = module.DamageTips;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleCtrl = module.RoleCtrl;
    }, function (module) {
      SkillCtrl = module.SkillCtrl;
    }, function (module) {
      FallingPropCtrl = module.FallingPropCtrl;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      uiGameLoading = module.uiGameLoading;
    }, function (module) {
      BattleNpcCtrl = module.BattleNpcCtrl;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameState = module.GameState;
    }, function (module) {
      BattleGlobalData = module.BattleGlobalData;
    }, function (module) {
      ui_Defeat = module.ui_Defeat;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      Item_BattleMap = module.Item_BattleMap;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      BattleMainView = module.BattleMainView;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }, function (module) {
      UI_MainView = module.UI_MainView;
    }, function (module) {
      Layout_UI_MainView = module.Layout_UI_MainView;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "60b98bByexNwJ+Wn8zLiSfm", "BattleMgr", undefined);
      var TypeGuanQia = exports('TypeGuanQia', /*#__PURE__*/function (TypeGuanQia) {
        TypeGuanQia[TypeGuanQia["Main"] = 1] = "Main";
        TypeGuanQia[TypeGuanQia["Guide"] = 99] = "Guide";
        return TypeGuanQia;
      }({}));

      /**通关宝箱领取状态 */
      var RewardReceiveState = exports('RewardReceiveState', /*#__PURE__*/function (RewardReceiveState) {
        RewardReceiveState[RewardReceiveState["Lock"] = 0] = "Lock";
        RewardReceiveState[RewardReceiveState["CanReceive"] = 1] = "CanReceive";
        RewardReceiveState[RewardReceiveState["Received"] = 2] = "Received";
        return RewardReceiveState;
      }({}));

      /**通关奖励宝箱类型 */
      var RewardChestType = exports('RewardChestType', /*#__PURE__*/function (RewardChestType) {
        RewardChestType[RewardChestType["Fast"] = 0] = "Fast";
        RewardChestType[RewardChestType["Normal"] = 1] = "Normal";
        return RewardChestType;
      }({}));

      /**血月宝箱状态 */
      var BloodMoonBoxState = exports('BloodMoonBoxState', /*#__PURE__*/function (BloodMoonBoxState) {
        BloodMoonBoxState[BloodMoonBoxState["Got"] = 1] = "Got";
        BloodMoonBoxState[BloodMoonBoxState["Lock"] = 2] = "Lock";
        BloodMoonBoxState[BloodMoonBoxState["Exchaged"] = 3] = "Exchaged";
        return BloodMoonBoxState;
      }({}));
      var BattleMgr = exports('BattleMgr', /*#__PURE__*/function () {
        function BattleMgr() {
          this._roleCtrl = new RoleCtrl();
          this._bulletCtrl = new BulletCtrl();
          this._skillCtrl = new SkillCtrl();
          this._battleMainViewCtrl = void 0;
          this._battleNpcCtrl = new BattleNpcCtrl();
          this._playerCamera = void 0;
          /** 伤害提示UI唯一id生成器 */
          this._damageTipsUIDCounter = 0;
          /** 伤害提示UI列表 */
          this._damgeTipsMap = new Map();
          this.fallingPropCtrl = new FallingPropCtrl();
          this.guanka_list = [];
          this._curGuanQiaId = 0;
          /** 挑战主线关卡ID */
          this.challengeGuanQiaId = 0;
          /** 挑战主线关卡ID 缓存, 用于进入其他副本后还原主线副本ID */
          this.challengeGuanQiaIdCatch = 0;
          this.guankaUnLock = false;
          //是否解锁关卡
          this.tongguanGuanQiaId = -1;
          //最新通关的关卡ID   新增-1的时候表示协议还没到
          this.lastTgGuanQiaId = 0;
          //上一次通关的关卡ID
          this.lastChallengeIsNewest = true;
          //上一次挑战的是否是最新主线关卡
          this.lastChallengeQuanQiaId = 0;
          //上一次挑战的主线关卡
          /** 所有关卡列表 */
          this.allGuanQiaList = void 0;
          /** 自动跳转挑战关卡双倍 */
          this._autoJumpShuangBei = false;
          /** 自动跳转挑战关卡倍数 */
          this._autoJumpBeishu = 0;
          this._pause = false;
          this.diMao = 0;
          this._runningActions = [];
          /** 装备副本ID */
          this.zbfb_id = 0;
          /** 装备副本次数 */
          this.zbfb_num = 0;
          /** 卡皮巴拉副本ID */
          this.kpblfb_id = 0;
          /** 卡皮巴拉副本次数 */
          this.kpblfb_num = 0;
          /** 土拨鼠副本次数 */
          this.fsfb_num = 0;
          /** 秘境B副本ID */
          this.miJingBfb_id = 0;
          /** 秘境A副本ID */
          this.miJingAfb_id = 0;
          this.globalData = new BattleGlobalData();
          this.guanQiaType = GameBattle.GuanQiaType.None;
          this.reviveCount = 0;
          this.data36012 = null;
          this.isTouZiDream = false;
          /** 幸运宝箱当前领取次数 */
          this.cur_xybx_times = 0;
          /** 幸运宝箱最大领取次数 */
          this.max_xybx_times = 0;
          /**战斗过关协议数据 */
          this.battle_end_msg = void 0;
          /** 最大同时存在的伤害提示数量 */
          this.MAX_DAMAGE_TIPS = 50;
          /** 当前活跃的伤害提示数量 */
          this._activeDamageTipsCount = 0;
          /**血月模式信息 */
          this.blood_moon_msg = void 0;
          /**血月模式宝箱 */
          this.blood_moon_box_list = [];
          /** 血月刷怪定时器 */
          this._blood_moon_monster_timer = null;
          /** 血月消耗的材料总数 */
          this._blood_moon_cost_count = 0;
          /** 血月耗材id */
          this._blood_moon_cost_item_id = 1031;
          // 帧管理相关
          this._frameCounter = 0;
          // 主线副本计时相关
          this._mainFBTimer = null;
          this.FB_TIME_INTERVAL = 1;
          this._bossIsDead = false;
          this._isInBattle = false;
          //图鉴加成
          this._mTuJianAttr = {};
          /** 进入过战斗 */
          this.enterBattleFlag = false;
          this.commomUiTimer = [false, false, false];
          /**
           * 本次战斗随机boss id
           */
          this.curRandomBossId = 0;
          this.allBulletIdList = [];
          /** 新手引导战斗子弹资源列表 */
          this.GuideBattleBulletResList = ["effect_bullet_fashi_shengguangrensuxuanfeng", "effect_Monster_YuanZhengJunGongNuShou_Bullet", "effect_bullet_fashi_luoleishu", "effect_dummy_leimingchuxiang", "effect_dummy_tiannushenfa"];
          /** 战斗子弹资源列表补漏 */
          this.BulletResList = {
            // [GameBattle.RoleJob.fashi]: [],
            // [GameBattle.RoleJob.taidao]: ["effect_bullet_taidao_dujianqi", "effect_bullet_taidao_chaogaosutuxi02"]
          };
          this.noLoadBulletIdList = new Set();
        }
        var _proto = BattleMgr.prototype;
        /**
         * 获取当前帧组(0或1)
         */
        _proto.getCurrentFrame = function getCurrentFrame() {
          return this._frameCounter;
        };
        _proto.init = function init() {
          // this._roleCtrl.init();
          // this._bulletCtrl.initPool();
          // this._roleCtrl.initPool();
          // this._skillCtrl.init();
          // this._bulletCtrl.init();
          // this._battleNpcCtrl.init();
          // this._runningActions = [];
          // this.challengeGuanQiaId = 0;
          // this.challengeGuanQiaIdCatch = -1;
          // this.tongguanGuanQiaId = -1;
          // App.monitorMgr.addEventListener(MonitorType.web_battle_pass_List, this.sc_battle_pass_List, this);
          // App.monitorMgr.addEventListener(MonitorType.web_battle_start, this.sc_battle_start, this);
          // App.monitorMgr.addEventListener(MonitorType.game_set, this._onGameSet, this);
          // App.monitorMgr.addEventListener(MonitorType.web_xybx_times_86001, this.sc_xybx_times_86001, this);
          // App.monitorMgr.addEventListener(MonitorType.web_blood_moon_info, this.sc_blood_moon, this);
          // App.monitorMgr.addEventListener(MonitorType.web_pass_reward, this.recGuanQiaAward0, this);
          // App.monitorMgr.addEventListener(MonitorType.web_battle_zhuangbei_fuben, this.sc_battle_zhuangbei_fuben_36011, this);
          // App.monitorMgr.addEventListener(MonitorType.web_battle_trial_ticket, this.sc_36012, this);
          // App.monitorMgr.addEventListener(MonitorType.rec_pass_data3, this.recPassData3, this);
          // // 预创建伤害提示对象池
          // App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.itemTMXGrass, {
          //     preloadCount: 10,
          //     maxSize: 20,
          //     autoExpand: true
          // });
          // App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.item_battleMap, {
          //     preloadCount: 10,
          //     maxSize: 20,
          //     autoExpand: true
          // });
          // App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.itemBattleNpc, {
          //     preloadCount: 10,
          //     maxSize: 20,
          //     autoExpand: true
          // });
        };
        _proto.dispose = function dispose() {
          Tween.stopAllByTag(GameBattle.BattleTweenTag);
          this._roleCtrl.dispose();
          this._skillCtrl.dispose();
          this._bulletCtrl.dispose();
          this._battleNpcCtrl.dispose();
          App.monitorMgr.offTarget(this);
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.itemTMXGrass);
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.item_battleMap);
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.itemBattleNpc);
          clearTimeout(this._blood_moon_monster_timer);
        };
        _proto._onGameSet = function _onGameSet(key, val) {
          if (key === "nView" && this._battleMainViewCtrl && this._battleMainViewCtrl.playerCamera) {
            this._battleMainViewCtrl.playerCamera.updateSet();
          }
          if (this._roleCtrl) {
            this._roleCtrl.updtNameShow();
          }
        };
        _proto.sc_battle_pass_List = function sc_battle_pass_List(obj) {
          //登录返回
          this.guanka_list = obj.guanka_list;
          this.tongguanGuanQiaId = 0;
          for (var i = obj.guanka_list.length; i--;) {
            if (this.tongguanGuanQiaId < obj.guanka_list[i].guanka_id) {
              this.tongguanGuanQiaId = obj.guanka_list[i].guanka_id;
            }
          }
          console.error("App.battleMgr.tongguanGuanQiaId;", this.tongguanGuanQiaId);
          if (this.guanka_list.length <= 0) {
            this.lastTgGuanQiaId = 11001;
          }
          if (this.lastTgGuanQiaId === 0) {
            this.lastTgGuanQiaId = this.tongguanGuanQiaId;
            this.guankaUnLock = false;
          } else {
            if (this.lastTgGuanQiaId === this.tongguanGuanQiaId) {
              this.guankaUnLock = false;
              if (this.lastTgGuanQiaId === 11001) {
                this.guankaUnLock = true;
              }
            } else if (this.lastTgGuanQiaId > this.tongguanGuanQiaId) {
              this.guankaUnLock = false;
            } else {
              this.guankaUnLock = true;
            }
          }
          this.curGuanQiaId = this.tongguanGuanQiaId;
          if (!this.allGuanQiaList) {
            this.allGuanQiaList = DBRecord.fetchAll("GuanQia");
          }

          // let temp = 999999999999;
          // let list = [];
          for (var _iterator = _createForOfIteratorHelperLoose(this.allGuanQiaList), _step; !(_step = _iterator()).done;) {
            var _GuanQia = _step.value;
            if (_GuanQia.type === TypeGuanQia.Main && _GuanQia.id > this.curGuanQiaId) {
              this.curGuanQiaId = _GuanQia.id;
              break;
            }
          }

          // for (let guanqia of list) {
          //     if (guanqia.id < temp) {
          //         temp = guanqia.id;
          //     }
          // }
          // this._curGuanQiaId = temp;
          console.log("已通关关卡信息列表===", this.curGuanQiaId);
          App.lockMgr.initItemFuncUnlock();

          //SOP上报
          var action_id = 0;
          if (this.tongguanGuanQiaId >= 18050) {
            action_id = 215;
          } else if (this.tongguanGuanQiaId >= 18001) {
            action_id = 214;
          } else if (this.tongguanGuanQiaId >= 17120) {
            //关卡到达地狱120
            action_id = 206;
          } else if (this.tongguanGuanQiaId === 17080) {
            action_id = 213;
          } else if (this.tongguanGuanQiaId === 17050) {
            action_id = 212;
          } else if (this.tongguanGuanQiaId === 17020) {
            action_id = 211;
          } else if (this.tongguanGuanQiaId >= 17001) {
            //关卡到达地狱1
            action_id = 205;
          } else if (this.tongguanGuanQiaId >= 16001) {
            //关卡到达托娅旧址1
            action_id = 204;
          } else if (this.tongguanGuanQiaId === 15001) {
            action_id = 210;
          } else if (this.tongguanGuanQiaId >= 14001) {
            //关卡到达不灭熔岩1
            action_id = 203;
          }
          if (action_id) {
            UtilityPlatform.getInstance().SOPInfo(action_id);
          }
          // App.autoFightManager.rec30011();
        }

        /**
         * 检查关卡是否解锁
         * @param guanQiaId 关卡id
         * @returns
         */;
        _proto.checkGuanQiaUnlock = function checkGuanQiaUnlock(guanQiaId) {
          return guanQiaId < this.curGuanQiaId;
        };
        _proto.sc_battle_start = function sc_battle_start(obj) {
          if (obj.err_code !== 0) {
            Prompt.popErrorCode(obj.err_code);
            return;
          }
          if (App.battleMgr.guanQiaType !== GameBattle.GuanQiaType.ZhuXian) {
            console.log("不是主线关卡 sc_battle_start===", obj);
            this.fallingPropCtrl.initFallingByGuanQiaId(this.challengeGuanQiaId, obj);
            this._battleNpcCtrl.setZhuangBeiJiaData(obj.guanka_award.equipment_rack_awards, obj.guanka_award.equipment2_rack_awards);
          } else if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.ZhuXian) {
            if (obj.c_num === 1) {
              this.fallingPropCtrl.initFallingByGuanQiaId(this.challengeGuanQiaId, obj);
              this._battleNpcCtrl.setZhuangBeiJiaData(obj.guanka_award.equipment_rack_awards, obj.guanka_award.equipment2_rack_awards);
            }
          }
        };
        _proto.initPool = function initPool() {
          App.mapMgr.clearMap();
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips, {
            preloadCount: 200,
            maxSize: 200,
            autoExpand: true
          });
          for (var _key in GameBattle.OtherPrefabPath) {
            App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath[_key], {
              preloadCount: 20,
              maxSize: 20,
              autoExpand: true
            });
          }
          for (var i = 3; i < 9; i++) {
            App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "images/effect_FallingProp_trail/effect_FallingProp_trail" + i, {
              preloadCount: 20,
              maxSize: 20,
              autoExpand: true
            });
          }
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/effect/damageNum", {
            preloadCount: 50,
            maxSize: 60,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/affected", {
            preloadCount: 50,
            maxSize: 60,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/buffEffect", {
            preloadCount: 50,
            maxSize: 60,
            autoExpand: true
          });
        };
        _proto.clearPool = function clearPool() {
          for (var _key2 in GameBattle.OtherPrefabPath) {
            App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath[_key2]);
          }
          for (var i = 3; i < 9; i++) {
            App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "images/effect_FallingProp_trail/effect_FallingProp_trail" + i);
          }
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/effect/damageNum");
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/affected");
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/buffEffect");
        };
        _proto.setPause = function setPause(v) {
          this._pause = v;
          if (v) {
            this._runningActions = TweenSystem.instance.ActionManager.pauseAllRunningActions();
            var popActions = [];
            for (var i = this._runningActions.length; i--;) {
              if (this._runningActions[i] instanceof Node && this._runningActions[i].name === "uiPrompt") {
                popActions.push(this._runningActions[i]);
                this._runningActions.splice(i, 1);
              }
            }
            if (popActions.length > 0) {
              TweenSystem.instance.ActionManager.resumeTargets(popActions);
            }
            if (this._battleMainViewCtrl && this._battleMainViewCtrl.battleMap) this.pauseNodeAndChildren(this._battleMainViewCtrl.battleMap.node.parent);
            App.scheduleMgr.pauseAll();
          } else {
            TweenSystem.instance.ActionManager.resumeTargets(this._runningActions);
            this._runningActions = [];
            if (this._battleMainViewCtrl && this._battleMainViewCtrl.battleMap) this.resumeNodeAndChildren(this._battleMainViewCtrl.battleMap.node.parent);
            App.scheduleMgr.resumeAll();
          }
        }

        /**
         * 暂停节点及其所有子节点
         * @param node
         */;
        _proto.pauseNodeAndChildren = function pauseNodeAndChildren(node) {
          var _this = this;
          // 暂停骨骼动画
          if (node.spine) {
            node.spine.paused = true;
          }
          node.children.forEach(function (child) {
            _this.pauseNodeAndChildren(child);
          });
        }

        /**
         * 恢复节点及其所有子节点
         * @param node
         */;
        _proto.resumeNodeAndChildren = function resumeNodeAndChildren(node) {
          var _this2 = this;
          // 恢复骨骼动画
          if (node.spine) {
            node.spine.paused = false;
          }

          // 遍历并恢复所有子节点
          node.children.forEach(function (child) {
            _this2.resumeNodeAndChildren(child);
          });
        }

        /**
         * 更新
         */;
        _proto.update = function update(dt) {
          if (this._pause) return;

          //console.time('roleCtrl.update');
          this._roleCtrl.update(dt);
          //console.timeEnd('roleCtrl.update');

          this._skillCtrl.update(dt);
          this._bulletCtrl.update(dt);
          this.fallingPropCtrl.update(dt);
          this._frameCounter = 1 - this._frameCounter;
        }

        /**
         * 开始主线副本计时
         */;
        _proto.startMainFBTimer = function startMainFBTimer() {
          var _this3 = this;
          this.bossIsDead = false;
          if (this._mainFBTimer) {
            App.scheduleMgr.unschedule(this._mainFBTimer);
            this._mainFBTimer = null;
          }
          this._mainFBTimer = App.scheduleMgr.schedule(function () {
            if (!_this3._pause && !_this3.bossIsDead) {
              var _this3$_battleMainVie;
              // 使用 BattleUIView 中的时间
              var battleUIView = (_this3$_battleMainVie = _this3._battleMainViewCtrl) == null ? void 0 : _this3$_battleMainVie.battleUIView;
              if (battleUIView) {
                var timeLimit = battleUIView.time_limit;
                var dbTime = battleUIView.time_limit_DB;
                var useTime = Math.floor(dbTime - timeLimit);
                var data = {
                  guanka_id: _this3.challengeGuanQiaId,
                  stay_second: useTime
                };
                netChannel.game.send(MonitorType.send_bt_toServer, data);
              }
            }
          }, this, this.FB_TIME_INTERVAL);
        }

        /**
         * 进入战场
         */;
        _proto.onEnter = function onEnter() {
          this.enterBattleFlag = true;
          this._isInBattle = true;
          this.setPause(false);
          UIMgr.inst.preloadUIBundle(ui_Defeat, function () {
            console.log("预加载战斗失败页面成功");
          });
          this.bossIsDead = false;
          // UIMgr.inst.preloadUIBundle(uiLuckBox, () => {
          //     console.log('预加载转盘页面');
          // });
          this.initPool();
          this.globalData.init();
          this._roleCtrl.onEnter();
          this._skillCtrl.onEnter();
          this._bulletCtrl.onEnter();
          this._battleNpcCtrl.onEnter(this.challengeGuanQiaId);
          this._battleMainViewCtrl.playerCamera.setLockTarget(this.roleCtrl.player.node);
          this._battleMainViewCtrl.playerCamera.updateSet();
          this._battleMainViewCtrl.battleCtrlView.joystickItem.owner = this.roleCtrl.player;
          this._battleMainViewCtrl.battleMap.init(this.roleCtrl.player);

          // 初始化碰撞网格调试渲染器
          if (GameConfig.DebugInfo.useCollisionGrid) {
            CollisionMgr.inst.initDebugRenderer(this._battleMainViewCtrl.node);
          }
          this.playerCamera = this._battleMainViewCtrl.playerCamera;
          App.gameStateMgr.state = GameState.Battle_ZhuxianGuanQia;
          this.playBattleMusic();
          this.reviveCount = 0;

          // 玩家初始化完成后，添加到网格中
          this.roleCtrl.player.initGridPosition();
          this._blood_moon_cost_count = 0;

          // 如果是主线副本,开始计时
          if (this.guanQiaType === GameBattle.GuanQiaType.ZhuXian) {
            this.startMainFBTimer();
          }
          this.roleCtrl.player.initFollowerPos();
          this.roleCtrl.player.initPetPos();
          this.initTuJianAttr();
          this.fallingPropCtrl.onEnter();
        }

        /**
         * 退出战场
         */;
        _proto.onExit = /*#__PURE__*/
        function () {
          var _onExit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, callFunc, openMain) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (callFunc === void 0) {
                    callFunc = null;
                  }
                  if (openMain === void 0) {
                    openMain = true;
                  }
                  this._isInBattle = false;
                  this.clearPool();
                  // ui.onProgress(0)
                  Tween.stopAllByTag(GameBattle.BattleTweenTag);
                  if (this._battleMainViewCtrl) {
                    if (this._battleMainViewCtrl.battleMap) {
                      this.resumeNodeAndChildren(this._battleMainViewCtrl.battleMap.node.parent);
                    }
                    this._battleMainViewCtrl.battleCtrlView.joystickItem.onEnd();
                    this._battleMainViewCtrl.onExit();
                  }
                  this.guanQiaType = GameBattle.GuanQiaType.None;
                  this._roleCtrl.onExit();
                  this._skillCtrl.onExit();
                  this._bulletCtrl.onExit();
                  this.recoveryAllDamageTips();
                  App.scheduleMgr.clear();
                  if (GameConfig.DebugInfo.useCollisionGrid) {
                    CollisionMgr.inst.clear();
                  }
                  this._battleMainViewCtrl = undefined;
                  this.isTouZiDream = false;
                  this.fallingPropCtrl.onExit();
                  App.soundMgr.clearAllBattleSound();
                  if (this.challengeGuanQiaIdCatch > 0) {
                    this.challengeGuanQiaId = this.challengeGuanQiaIdCatch;
                    this.challengeGuanQiaIdCatch = -1;
                  }
                  // 清理计时器
                  if (this._mainFBTimer) {
                    App.scheduleMgr.unschedule(this._mainFBTimer);
                    this._mainFBTimer = null;
                    this.bossIsDead = false;
                  }
                  this._mTuJianAttr = {};
                  this.curRandomBossId = 0;
                  App.mapMgr.clearMapWayPoint();
                  if (openMain) {
                    _context.next = 25;
                    break;
                  }
                  return _context.abrupt("return");
                case 25:
                  console.warn("######### AutoFight BattleManager.onExit()");
                  _context.next = 28;
                  return this.enterCity(function () {
                    console.warn("######### AutoFight BattleManager.onExit().enterCity().callBack closeAllPanel() ");
                    UIMgr.inst.closeAllPanel(["uiLoading", "uiFunctionUnlock"]);
                    if (callFunc) callFunc();
                  });
                case 28:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function onExit(_x, _x2, _x3) {
            return _onExit.apply(this, arguments);
          }
          return onExit;
        }()
        /**
         * 进入主城
         */;

        _proto.enterCity = /*#__PURE__*/
        function () {
          var _enterCity = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(callback) {
            var ui, progressValues, _loop, i;
            return _regeneratorRuntime().wrap(function _callee2$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  _context3.next = 2;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 2:
                  ui = _context3.sent;
                  if (callback) {
                    callback();
                  }
                  ui.setCloseByHand(true);
                  progressValues = [0.15, 0.25, 0.35, 0.55, 0.65, 0.75, 0.85, 0.92, 0.96, 1.0];
                  _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop(i) {
                    return _regeneratorRuntime().wrap(function _loop$(_context2) {
                      while (1) switch (_context2.prev = _context2.next) {
                        case 0:
                          setTimeout(function () {
                            ui.onProgress(progressValues[i]);
                            if (i === 9) {
                              ui.onClose();
                              console.warn("######### AutoFight BattleManager.onExit().enterCity() delay i === 9 closeAllPanel() ");
                              UIMgr.inst.closeAllPanel(["uiMain", "uiJingJiChang", "uiFunctionUnlock", "uiPrompt", "uiBlockLayer"]);
                              App.monitorMgr.dispatchEvent(EventType.loading_end_to_mainGame);
                              // App.autoFightManager.closeProgressBar();
                            }
                          }, 100 * i + Math.random() * 100 * i);
                        case 1:
                        case "end":
                          return _context2.stop();
                      }
                    }, _loop);
                  });
                  i = 0;
                case 8:
                  if (!(i < 10)) {
                    _context3.next = 13;
                    break;
                  }
                  return _context3.delegateYield(_loop(i), "t0", 10);
                case 10:
                  i++;
                  _context3.next = 8;
                  break;
                case 13:
                  _context3.next = 15;
                  return UIMgr.inst.openOnce(UI_MainView, LayerType.main, Layout_UI_MainView, null, function () {});
                case 15:
                case "end":
                  return _context3.stop();
              }
            }, _callee2);
          }));
          function enterCity(_x4) {
            return _enterCity.apply(this, arguments);
          }
          return enterCity;
        }()
        /**
         * 播放战斗音乐
         */;

        _proto.playBattleMusic = function playBattleMusic() {
          var soundId = App.soundMgr.getBattleMusicId(App.battleMgr.diMao);
          if (soundId) {
            App.soundMgr.playMusicById(soundId);
          }
        }

        /**
         * 创建伤害提示UI
         * @returns
         */;
        _proto.createDamageTips = function createDamageTips() {
          if (!this._battleMainViewCtrl) return;
          if (this._activeDamageTipsCount >= this.MAX_DAMAGE_TIPS) {
            return null;
          }
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips);
          if (!node) return null;
          var tips = node.getComponent(DamageTips);
          tips.node.parent = this._battleMainViewCtrl.effectLayer;
          tips.uid = ++this._damageTipsUIDCounter;
          this._damgeTipsMap.set(tips.uid, tips);
          this._activeDamageTipsCount++;
          return tips;
        }

        /**
         * 回收伤害提示
         */;
        _proto.recoveryDamageTips = function recoveryDamageTips(tips) {
          if (!tips) return;
          this._damgeTipsMap["delete"](tips.uid);
          tips.recovery();
          tips.uid = 0;
          this._activeDamageTipsCount--;
          App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips, tips.node);
        }

        /**
         * 回收所有伤害提示UI
         */;
        _proto.recoveryAllDamageTips = function recoveryAllDamageTips() {
          var _this4 = this;
          this._damgeTipsMap.forEach(function (v) {
            _this4.recoveryDamageTips(v);
          });
          this._damgeTipsMap.clear();
          this._activeDamageTipsCount = 0;
        };
        _proto.moveBattleBg = function moveBattleBg(x, y, playerPos) {
          var _this$_battleMainView;
          if ((_this$_battleMainView = this._battleMainViewCtrl) != null && _this$_battleMainView.battleBg) {
            var pos = this._battleMainViewCtrl.battleBg.position.clone();
            pos.add3f(x, y, 0);
            this._battleMainViewCtrl.battleBg.position = pos;
            //高填充了4倍 宽填充了10倍
            var size = view.getVisibleSize();
            if (playerPos.x > pos.x + this._battleMainViewCtrl.battleBg.w - size.width) {
              this._battleMainViewCtrl.battleBg.x += this._battleMainViewCtrl.battleBg.w * 0.6;
            }
            if (playerPos.x < pos.x + size.width) {
              this._battleMainViewCtrl.battleBg.x -= this._battleMainViewCtrl.battleBg.w * 0.6;
            }
            if (playerPos.y > pos.y + this._battleMainViewCtrl.battleBg.h - size.height / 2) {
              this._battleMainViewCtrl.battleBg.y += this._battleMainViewCtrl.battleBg.h * 0.5;
            }
            if (playerPos.y < pos.y + size.height / 2) {
              this._battleMainViewCtrl.battleBg.y -= this._battleMainViewCtrl.battleBg.h * 0.5;
            }
          }
        }

        /**
         * 更新小地图
         * @param x
         * @param y
         * @param playerPos
         */;
        _proto.moveMiniBattleBG = function moveMiniBattleBG(x, y, playerPos) {
          this._battleMainViewCtrl.updateMiniBGPos(x, y, playerPos);
        }

        /**
         * 设置战场背景
         * @param pos
         * @param diMao
         */;
        _proto.setBattleBg = function setBattleBg(pos, diMao) {
          var _this$_battleMainView2;
          var x = pos.x - this._battleMainViewCtrl.battleBg.w / 2;
          var y = pos.y - this._battleMainViewCtrl.battleBg.h / 2;
          this._battleMainViewCtrl.battleBg.setWorldPosition(x, y, 0);
          App.resMgr.loadImage((_this$_battleMainView2 = this._battleMainViewCtrl) == null || (_this$_battleMainView2 = _this$_battleMainView2.battleBg) == null ? void 0 : _this$_battleMainView2.sprite, "battleMap", "map" + diMao + "/background");
        };
        _proto.getGuankaList = function getGuankaList() {
          return this.guanka_list;
        }

        /**
         * 获取速通奖励领取状态
         * @param guanQiaId
         * @returns
         */;
        _proto.getGuanQiaSuTongType = function getGuanQiaSuTongType(guanQiaId) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              return this.guanka_list[i].receive1;
            }
          }
          return 0;
        }

        /**
         * 获取首通奖励领取状态
         * @param guanQiaId
         * @returns
         */;
        _proto.getGuanQiaShouTongType = function getGuanQiaShouTongType(guanQiaId) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              return this.guanka_list[i].receive;
            }
          }
          return 0;
        }

        /**
         * 获取关卡最快通关时间
         * @param guanQiaId
         * @returns
         */;
        _proto.getGuanQiaFastestPassTime = function getGuanQiaFastestPassTime(guanQiaId) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              return this.guanka_list[i].tg_second;
            }
          }
          return 0;
        };
        _proto.reqGuanQiaAwardAll = function reqGuanQiaAwardAll(tp) {
          var msg = {
            category: tp
          };
          netChannel.game.send(MonitorType.web_pass_reward, msg);
        };
        _proto.reqGuanQiaAwardOne = function reqGuanQiaAwardOne(id, tp) {
          var obj = {
            guanka_id: id,
            category: tp
          };
          netChannel.game.send(MonitorType.web_battle_fast_reward, obj);
        };
        _proto.recGuanQiaAward0 = function recGuanQiaAward0(msg) {
          // if (msg.category === RewardChestType.Fast) {
          //     this.settGuanQiaSuTongType(msg.guanka_id, RewardReceiveState.Received);
          // } else {
          //     this.settGuanQiaShouTongType(msg.guanka_id, RewardReceiveState.Received);
          // }
          // if (msg.category === RewardChestType.Normal) {
          //     for (let dx0 = 0; dx0 < this.guanka_list.length; dx0++) {
          //         let oData = this.guanka_list[dx0];
          //         if (oData.receive === AwardState.Able) {
          //             oData.receive = AwardState.Done;
          //         }
          //     }
          // } else if (msg.category === RewardChestType.Fast) {
          //     for (let dx0 = 0; dx0 < this.guanka_list.length; dx0++) {
          //         let oData = this.guanka_list[dx0];
          //         if (oData.receive1 === AwardState.Able) {
          //             oData.receive1 = AwardState.Done;
          //         }
          //     }
          // }
        };
        _proto.recPassData3 = function recPassData3(msg) {
          for (var dx0 = 0; dx0 < this.guanka_list.length; dx0++) {
            var oData = this.guanka_list[dx0];
            if (oData.id === msg.guanka_id) {
              oData.receive = msg.receive;
              oData.receive1 = msg.receive1;
            }
          }
        }

        /**
         * 设置速通宝箱领取状态
         * @param guanQiaId
         * @param type
         */;
        _proto.settGuanQiaSuTongType = function settGuanQiaSuTongType(guanQiaId, type) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              if (type > this.guanka_list[i].receive1) {
                this.guanka_list[i].receive1 = type;
              }
            }
          }
        }

        /**
         * 设置首通宝箱领取状态
         * @param guanQiaId
         * @param type
         */;
        _proto.settGuanQiaShouTongType = function settGuanQiaShouTongType(guanQiaId, type) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              if (type > this.guanka_list[i].receive) {
                this.guanka_list[i].receive = type;
              }
            }
          }
        };
        _proto.getPassIdMax = function getPassIdMax() {
          return this.tongguanGuanQiaId;
        };
        _proto.getGuanQiaCfg = function getGuanQiaCfg(type, difficulty, map_level) {
          var list = DBRecord.fetchAll("GuanQia");
          for (var i = 0; i < list.length; i++) {
            var cfg = list[i];
            if (cfg.type === type && cfg.difficulty === difficulty && cfg.map_level === map_level) return cfg;
          }
        }

        /**
         * 找出配置表GuanQia中，最大的关卡，也就是最大的ID
         * @returns 最大的关卡ID
         */;
        _proto.findMaxGuanQiaId = function findMaxGuanQiaId() {
          var maxId = 0;
          var guanQiaList = DBRecord.fetchAll("GuanQia");
          for (var i = 0; i < guanQiaList.length; i++) {
            if (guanQiaList[i].type === 1 && guanQiaList[i].id > maxId) {
              maxId = guanQiaList[i].id;
            }
          }
          return maxId;
        };
        _proto.sc_battle_zhuangbei_fuben_36011 = function sc_battle_zhuangbei_fuben_36011(data) {
          var _data$zbfb_id, _data$zbfb_num, _data$kpblfb_id, _data$kpblfb_num, _data$fsfb_num, _data$scfb_id, _data$dnfb_id;
          console.log("sc_battle_zhuangbei_fuben_36011", data);
          this.zbfb_id = (_data$zbfb_id = data.zbfb_id) != null ? _data$zbfb_id : 0;
          this.zbfb_num = (_data$zbfb_num = data.zbfb_num) != null ? _data$zbfb_num : 0;
          this.kpblfb_id = (_data$kpblfb_id = data.kpblfb_id) != null ? _data$kpblfb_id : 0;
          this.kpblfb_num = (_data$kpblfb_num = data.kpblfb_num) != null ? _data$kpblfb_num : 0;
          this.fsfb_num = (_data$fsfb_num = data.fsfb_num) != null ? _data$fsfb_num : 0;
          this.miJingBfb_id = (_data$scfb_id = data.scfb_id) != null ? _data$scfb_id : 0;
          this.miJingAfb_id = (_data$dnfb_id = data.dnfb_id) != null ? _data$dnfb_id : 0;
        };
        _proto.sc_36012 = function sc_36012(data) {
          if (!data) {
            this.data36012.kpbl_expire_time = 0;
            this.data36012.kpbl_times = 0;
            this.data36012.zb_expire_time = 0;
            this.data36012.zb_times = 0;
            this.data36012.fs_expire_time = 0;
            this.data36012.fs_times = 0;
          } else {
            this.data36012 = data;
          }
        };
        _proto.sc_xybx_times_86001 = function sc_xybx_times_86001(data) {
          var _data$bx_times, _data$max_times;
          this.cur_xybx_times = (_data$bx_times = data.bx_times) != null ? _data$bx_times : 0;
          this.max_xybx_times = (_data$max_times = data.max_times) != null ? _data$max_times : 0;
        };
        /**
         * 战斗飘字提示
         * @param str 提示内容
         */
        _proto.popTips = function popTips(str, type) {
          var _this5 = this;
          if (this.commomUiTimer[type]) {
            return;
          }
          this.commomUiTimer[type] = true;
          var tmIndex = [0, 0, 1]; //42 血瓶能量瓶  43 技能
          this._battleMainViewCtrl.battleUIView.popTips(str);
          var cfg = DBRecord.fetchId("ShuoMingQuanJu", 42 + tmIndex[type]);
          var tm = Number(cfg.value);
          setTimeout(function () {
            _this5.commomUiTimer[type] = false;
          }, tm);
        }

        /**
         * 血月模式信息
         * @param data
         */;
        _proto.sc_blood_moon = function sc_blood_moon(msg) {
          console.log(">>> sc_blood_moon,msg:", msg);
          this.blood_moon_msg = msg;
          App.monitorMgr.dispatchEvent(MonitorType.blood_moon_update);
        }

        /**
         * 是否血月关卡
         * @returns
         */;
        _proto.isBloodMoonGuanQia = function isBloodMoonGuanQia() {
          if (!this.isBloodMoonState()) {
            return false;
          }
          return App.battleMgr.guanQiaType === GameBattle.GuanQiaType.BloodMoon;
        }

        /**
         * 检查当前关卡是否为主线关卡
         * @returns
         */;
        _proto.isMainLineGuanQia = function isMainLineGuanQia() {
          return this.guanQiaType === GameBattle.GuanQiaType.ZhuXian;
        }

        /**
         * 是否血月状态
         * @returns
         */;
        _proto.isBloodMoonState = function isBloodMoonState() {
          return false;
        }

        /**
         *   血月拾取宝箱
         * @param boxId
         */;
        _proto.pickUpBox = function pickUpBox(boxId) {
          if (!boxId) return;
          for (var i = 0; i < this.blood_moon_box_list.length; i++) {
            if (this.blood_moon_box_list[i].id === boxId && this.blood_moon_box_list[i].state === BloodMoonBoxState.Lock) {
              this.blood_moon_box_list[i].state = BloodMoonBoxState.Got;
              break;
            }
          }
          App.monitorMgr.dispatchEvent(MonitorType.blood_moon_get_box, boxId);
        }

        /**
         * 血月检测是否拾取所有宝箱
         */;
        _proto.checkPickUpAllBox = function checkPickUpAllBox() {
          if (this.blood_moon_box_list.length <= 0) {
            return false;
          }
          for (var _iterator2 = _createForOfIteratorHelperLoose(this.blood_moon_box_list), _step2; !(_step2 = _iterator2()).done;) {
            var element = _step2.value;
            if (element.state === BloodMoonBoxState.Lock) {
              return false;
            }
          }
          return true;
        }

        /**
         * 血月兑换宝箱
         * @param boxId
         */;
        _proto.bloodMoonExchangeBox = function bloodMoonExchangeBox(boxId) {
          if (!boxId) return;
          for (var i = 0; i < this.blood_moon_box_list.length; i++) {
            if (this.blood_moon_box_list[i].id === boxId && this.blood_moon_box_list[i].state === BloodMoonBoxState.Got) {
              this.blood_moon_box_list[i].state = BloodMoonBoxState.Exchaged;
              break;
            }
          }
          var cfg = DBRecord.fetchId("XueYueBaoXiang", boxId);
          if (cfg.cost && cfg.cost.length >= 2) {
            this._blood_moon_cost_count += cfg.cost[1];
            console.log("bloodMoonExchangeBox,cost =", this._blood_moon_cost_count, cfg.cost[1]);
            App.monitorMgr.dispatchEvent(MonitorType.blood_moon_exchange_box_update);
          }
        }

        /**
         * 获取血月耗材数量
         */;
        _proto.getBloodMoonCostNum = function getBloodMoonCostNum() {
          var num = 0;
          var itemList = App.battleMgr.fallingPropCtrl.allItems;
          // let itemList: m_proto.IItem[] = App.bagMgr.getBagItemList(BagType.prop);
          for (var _iterator3 = _createForOfIteratorHelperLoose(itemList), _step3; !(_step3 = _iterator3()).done;) {
            var element = _step3.value;
            if (element.item_id === this._blood_moon_cost_item_id) {
              num += element.item_count;
            }
          }
          return Math.max(0, num - this._blood_moon_cost_count);
        }

        /**
         * 剩余材料是否还能兑换宝箱
         */;
        _proto.bloodMoonCanExchange = function bloodMoonCanExchange() {
          var num = this.getBloodMoonCostNum();
          for (var _iterator4 = _createForOfIteratorHelperLoose(this.blood_moon_box_list), _step4; !(_step4 = _iterator4()).done;) {
            var element = _step4.value;
            if (element.state === BloodMoonBoxState.Got) {
              var cfg = DBRecord.fetchId("XueYueBaoXiang", element.id);
              if (cfg.cost && cfg.cost.length >= 2) {
                if (num >= cfg.cost[1]) {
                  return true;
                }
              }
            }
          }
          return false;
        }

        /**
         * 血月刷怪
         */;
        _proto.bloodMoonRefreshMonster = function bloodMoonRefreshMonster() {
          //console.log("血月刷怪",Math.random());
          if (App.battleMgr.roleCtrl.getBoss() != null) {
            return;
          }
          var monsterBorn = App.mapMgr._tiledMap.getObjectGroup("monsterBorn");
          if (!monsterBorn) {
            return;
          }
          var born_list = monsterBorn.getObjects();
          var max = born_list[0]["maxLimit"] || 20;
          var count = 0;
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            if (entity.type === GameBattle.RoleType.Monster && !entity.isSummon()) {
              count++;
            }
            return false;
          });
          var self = this;
          var tm = born_list[0]["refresh"] || 7;
          this._blood_moon_monster_timer = setTimeout(function () {
            self.bloodMoonRefreshMonster();
          }, tm * 1000);
          if (count >= max) {
            return;
          }
          App.mapMgr.initMonsterData(undefined, true);
        }

        /**
         * 是否在战斗中
         */;
        _proto.isInBattle = function isInBattle() {
          return this._isInBattle;
        }

        //TODO_YK
        ;

        _proto.initTuJianAttr = function initTuJianAttr() {
          var _this6 = this;
          var mTuJianAttr = {};
          var vTuJianTaoZhuang = DBRecord.fetchAll("TuJianTaoZhuang");
          for (var dx0 = 0; dx0 < vTuJianTaoZhuang.length; dx0++) {
            var oTuJianTaoZhuang = vTuJianTaoZhuang[dx0];
            if ((oTuJianTaoZhuang.map || []).findIndex(function (ele) {
              return ele === _this6.diMao;
            }) < 0) {
              continue;
            }
            // if (App.instituteManager.getGroupLv(oTuJianTaoZhuang.group) < oTuJianTaoZhuang.condition) {
            //     continue;
            // }
            for (var dx1 = 0; dx1 < (oTuJianTaoZhuang.mon || []).length; dx1++) {
              mTuJianAttr[oTuJianTaoZhuang.mon[dx1]] = oTuJianTaoZhuang.attr;
            }
          }
          this._mTuJianAttr = mTuJianAttr;
        };
        _proto.getTuJianAttr = function getTuJianAttr(DeferVO) {
          var mAttr = {};
          if (this.guanQiaType === GameBattle.GuanQiaType.ZhuXian) {
            mAttr = this._mTuJianAttr[DeferVO.quality] || {};
          }
          return mAttr;
        }

        /**
         * 获取地图数据
         * @param diMao
         */;
        _proto.getMapData = function getMapData(diMao) {
          var _mapData = {};
          var guanQiaId = App.battleMgr.challengeGuanQiaId;
          var cfg = DBRecord.fetchId("GuanQia", guanQiaId);
          var random_map = cfg.random_map;
          var diMaoIndex = 0;
          for (var i = 0; i < random_map.length; i++) {
            if (diMao === random_map[i][0]) {
              diMaoIndex = i;
              break;
            }
          }
          var monster_density = cfg.monster_density[diMaoIndex];
          _mapData = {};
          var dbr = DBRecord.fetchAll("DiKuai");
          var born_map = [];
          for (var _iterator5 = _createForOfIteratorHelperLoose(dbr), _step5; !(_step5 = _iterator5()).done;) {
            var it = _step5.value;
            if (it.name === diMao && it.monster_density === monster_density) {
              if (!_mapData[it["in"]]) {
                _mapData[it["in"]] = [];
              }
              _mapData[it["in"]].push(it);
              if (it["in"] === 0) {
                born_map.push(it);
              }
            }
          }
          return [_mapData, born_map];
        }

        /**
         * 初始化当前章节所有怪物的资源名称
         */;
        _proto.initAllMonsterRes = function initAllMonsterRes(_mapData) {
          if (!_mapData) {
            console.warn("地图数据不存在，无法初始化怪物数据");
            return;
          }

          // 用于存储所有怪物ID，避免重复
          var monsterIds = new Set();

          // 遍历所有地图块
          for (var _key3 in _mapData) {
            if (!_mapData.hasOwnProperty(_key3)) continue;
            var mapItems = _mapData[_key3];
            if (!Array.isArray(mapItems)) continue;

            // 遍历数组中的每个地块信息
            for (var i = 0; i < mapItems.length; i++) {
              var mapItem = mapItems[i];
              if (!mapItem || !mapItem.id) continue;

              // 获取地块信息
              var _dbr = mapItem;
              if (!_dbr || !_dbr.moster_born) continue;

              // 遍历该地块的所有怪物出生点
              var monsterBornList = _dbr.moster_born;
              for (var j = 0; j < monsterBornList.length; j++) {
                var data = monsterBornList[j];
                if (!data || data.length < 2) continue;

                // 获取怪物组ID
                var monsterGroupId = data[1];
                var monsterGroup = DBRecord.fetchId("GuaiWuZu", monsterGroupId);
                if (!monsterGroup || !monsterGroup.probability) continue;

                // 从怪物组中获取所有可能的怪物ID
                for (var _iterator6 = _createForOfIteratorHelperLoose(monsterGroup.probability), _step6; !(_step6 = _iterator6()).done;) {
                  var element = _step6.value;
                  monsterIds.add(element[0]);
                }
              }
            }
          }
          var bossId = this.initRandomBossId();
          if (bossId) {
            monsterIds.add(bossId);
          }

          // 将怪物ID转换为怪物资源名称
          var monsterNameList = [];
          var monsterResSet = new Set();
          monsterIds.forEach(function (monsterId) {
            // 获取怪物配置
            var monsterConfig = DBRecord.fetchId("GuaiWu", monsterId);
            if (monsterConfig && monsterConfig.res) {
              // 使用Set确保资源名称不重复
              if (!monsterResSet.has(monsterConfig.res)) {
                monsterResSet.add(monsterConfig.res);
                monsterNameList.push(monsterConfig.res);
              }
            }
          });

          //console.log('================================>>当前章节所有怪物动画名称列表:', monsterNameList);
          var monsterIdList = Array.from(monsterIds);
          return [monsterNameList, monsterIdList];
        };
        /**
         * 先确定随机boss的id,方便laoding时加载boss资源
         */
        _proto.initRandomBossId = function initRandomBossId() {
          var dbr = DBRecord.fetchId("GuanQia", this.challengeGuanQiaId);
          if (dbr && dbr.bossid && dbr.bossid.length > 0) {
            this.curRandomBossId = BattleUtil.getValueByProbability(dbr.bossid);
          }
          //console.log('================================>>本次战斗随机boss id:', this.curRandomBossId);
          return this.curRandomBossId;
        };
        /**
         * 初始化当前章节所有子弹的资源名称
         */
        _proto.getAllBulletRes = function getAllBulletRes(monsterIdList) {
          var allBulletList = [];
          var allBuffs = [];
          //玩家英雄技能
          // let playerHeroBuffs = App.heroTavernManager.getAllHeroSkillBuff();
          // for (let i = 0; i < playerHeroBuffs.length; i++) {
          //     allBuffs.push(playerHeroBuffs[i]);
          // }
          //玩家装备buff
          var list_equip = App.bagMgr.getWearEquipList();
          for (var _iterator7 = _createForOfIteratorHelperLoose(list_equip), _step7; !(_step7 = _iterator7()).done;) {
            var _it = _step7.value;
            for (var _i9 = 0; _i9 < _it.equipment.skillid_list.length; _i9++) {
              var _cfg9 = DBRecord.fetchId("ZhuangBeiJiNeng", _it.equipment.skillid_list[_i9]);
              if (_cfg9.buff_id > 0) {
                allBuffs.push(_cfg9.buff_id);
              }
            }
          }
          //玩家勾玉buff
          var list_gouyu = App.bagMgr.getGouYuInlay();
          for (var key0 in list_gouyu) {
            var BaoShiShuXing = DBRecord.fetchId("BaoShiShuXing", list_gouyu[key0].gem.sx_id);
            if (BaoShiShuXing && BaoShiShuXing.buff) {
              for (var key1 in BaoShiShuXing.buff) {
                allBuffs.push(BaoShiShuXing.buff[key1]);
              }
            }
          }
          //玩家套装buff
          var list_suit = App.bagMgr.getWearEquipSuitBuff();
          for (var i = 0; i < list_suit.length; i++) {
            var _cfg = list_suit[i];
            if (_cfg.buff_id > 0) {
              allBuffs.push(_cfg.buff_id);
            }
          }
          // //玩家时装buff
          // let playerFashionBuffs = App.fashionManager.getAllFashionsSkillBuff();
          // for (let i = 0; i < playerFashionBuffs.length; i++) {
          //     allBuffs.push(playerFashionBuffs[i]);
          // }
          // //玩家翅膀buff
          // let wingsId = App.wingsManager.getWingsWear();
          // let playerWingsBuffs = App.wingsManager.getWingsBuff(wingsId);
          // for (let i = 0; i < playerWingsBuffs.length; i++) {
          //     allBuffs.push(playerWingsBuffs[i]);
          // }
          // //玩家圣坛词缀buff
          // let playerCiZuiBuffs = App.shengTanManager.initCiZuiSkills();
          // for (let i = 0; i < playerCiZuiBuffs.length; i++) {
          //     let config = DBRecord.fetchId('ZhuangBeiJiNeng', playerCiZuiBuffs[i]);
          //     if (config.buff_id > 0) {
          //         allBuffs.push(config.buff_id);
          //     }
          // }
          // //玩家随从buff
          // let playerFolloerBuffs = App.heroTavernManager.getHeroFollowerBuff() || [];
          // for (let i = 0; i < playerFolloerBuffs.length; i++) {
          //     allBuffs.push(playerFolloerBuffs[i]);
          // }
          // let petInfo = App.petManager.getPetById(App.petManager.getCurFightPetId());
          // if (petInfo) {
          //     for (let index = 0; index < petInfo.skills.length; index++) {
          //         const skill = petInfo.skills[index];
          //         let skillCfg: dbr.ChongWuJiNeng = DBRecord.fetchId('ChongWuJiNeng', skill.skill_id);
          //         let buffs = skillCfg.buff;
          //         if (buffs) {
          //             for (let i = 0; i < buffs.length; i++) {
          //                 allBuffs.push(buffs[i]);
          //             }
          //         }
          //     }
          // }

          //玩家学习的技能
          var playerSkills = App.skillMgr.getDirectSkill();
          var cfg = DBRecord.fetchId("ZhiYe", App.roleMgr.getRoleJob());
          playerSkills.push(cfg.atk_id);
          for (var _iterator8 = _createForOfIteratorHelperLoose(playerSkills), _step8; !(_step8 = _iterator8()).done;) {
            var _it2 = _step8.value;
            var _cfg10 = DBRecord.fetchId("Skill", _it2);
            if (_cfg10 && _cfg10.buff_id) {
              for (var _i10 = 0; _i10 < _cfg10.buff_id.length; _i10++) {
                allBuffs.push(_cfg10.buff_id[_i10]);
              }
            }
            if (_cfg10 && _cfg10.bullet_id) {
              for (var _i11 = 0; _i11 < _cfg10.bullet_id.length; _i11++) {
                allBulletList.push(_cfg10.bullet_id[_i11]);
              }
            }
          }
          // console.log('================================>>TEST BULLET 玩家技能列表:', playerSkills);
          var playerPassiveSkills = App.skillMgr.getLearnPassiveId();
          for (var _iterator9 = _createForOfIteratorHelperLoose(playerPassiveSkills), _step9; !(_step9 = _iterator9()).done;) {
            var _it3 = _step9.value;
            var _cfg11 = DBRecord.fetchId("Skill", _it3);
            if (_cfg11.buff_id && _cfg11.buff_id.length > 0) {
              for (var _i12 = 0; _i12 < _cfg11.buff_id.length; _i12++) {
                allBuffs.push(_cfg11.buff_id[_i12]);
              }
            }
            if (_cfg11.bullet_id) {
              for (var _i13 = 0; _i13 < _cfg11.bullet_id.length; _i13++) {
                allBulletList.push(_cfg11.bullet_id[_i13]);
              }
            }
          }

          //怪物
          //玩家随从id
          // let heroId = App.heroTavernManager.curHeroId;
          // if (heroId) {
          //     let cfg: dbr.YingXiongShengJi = App.heroTavernManager.getAllHeroSjByHid(heroId)[0];
          //     if (cfg && cfg.entourage) {
          //         monsterIdList.push(cfg.entourage);
          //     }
          // }
          //怪物技能id
          var monsterSkillList = [];
          for (var _i = 0; _i < monsterIdList.length; _i++) {
            var _cfg2 = DBRecord.fetchId("GuaiWu", monsterIdList[_i]);
            if (_cfg2) {
              if (_cfg2.init_buff_id) {
                for (var j = 0; j < _cfg2.init_buff_id.length; j++) {
                  allBuffs.push(_cfg2.init_buff_id[j]);
                }
              }
              if (_cfg2.skill_id) {
                for (var _j = 0; _j < _cfg2.skill_id.length; _j++) {
                  monsterSkillList.push(_cfg2.skill_id[_j]);
                }
              }
              if (_cfg2.atk_id) {
                monsterSkillList.push(_cfg2.atk_id);
              }
            }
          }
          //怪物技能buff、子弹
          for (var _i2 = 0, _monsterSkillList = monsterSkillList; _i2 < _monsterSkillList.length; _i2++) {
            var it = _monsterSkillList[_i2];
            var _cfg3 = DBRecord.fetchId("Skill", it);
            if (_cfg3 && _cfg3.buff_id && _cfg3.buff_id.length > 0) {
              for (var _i3 = 0; _i3 < _cfg3.buff_id.length; _i3++) {
                allBuffs.push(_cfg3.buff_id[_i3]);
              }
            }
            if (_cfg3 && _cfg3.bullet_id) {
              for (var _i4 = 0; _i4 < _cfg3.bullet_id.length; _i4++) {
                allBulletList.push(_cfg3.bullet_id[_i4]);
              }
            }
          }

          //子弹创建的buff、子弹
          var bulletSubBuff = [];
          var subBulletList = [];
          for (var index = 0; index < allBulletList.length; index++) {
            var element = allBulletList[index];
            var _cfg4 = DBRecord.fetchId("JiNengXiaoGuo", element);
            //添加buff
            if (_cfg4 && _cfg4.type === 2) {
              if (_cfg4.atr && _cfg4.atr.length > 0) {
                for (var _i5 = 0; _i5 < _cfg4.atr.length; _i5++) {
                  bulletSubBuff.push(_cfg4.atr[_i5]);
                }
              }
            }
            //添加子弹
            if (_cfg4 && _cfg4.type === 4) {
              if (_cfg4.atr && _cfg4.atr.length > 0) {
                for (var _i6 = 0; _i6 < _cfg4.atr.length; _i6++) {
                  subBulletList.push(_cfg4.atr[_i6]);
                }
              }
            }
          }
          allBuffs.push.apply(allBuffs, bulletSubBuff);
          allBulletList.push.apply(allBulletList, subBulletList);

          //buff创建的buff
          var subBuffList = [];
          //修改子弹效果
          var modifyBulletEffect = [];
          //修改buff效果
          var modifyBuffEffect = [];
          for (var _index = 0; _index < allBuffs.length; _index++) {
            var _element = allBuffs[_index];
            var _cfg5 = DBRecord.fetchId("JiNengBuff", _element);
            if (!_cfg5) {
              continue;
            }
            if (_cfg5.effect_ids) {
              for (var _index2 = 0; _index2 < _cfg5.effect_ids.length; _index2++) {
                var elementEff = _cfg5.effect_ids[_index2];
                var xiaoguoCfg = DBRecord.fetchId("JiNengBuffXiaoGuo", elementEff);
                if (xiaoguoCfg.type === GameBattle.BuffEffectType.AddBuffByOdds) {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0) {
                    for (var _index3 = 0; _index3 < xiaoguoCfg.atr.length; _index3++) {
                      subBuffList.push(xiaoguoCfg.atr[_index3]);
                    }
                  }
                }
                if (xiaoguoCfg.configuration === "buff_id") {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0) {
                    for (var _index4 = 0; _index4 < xiaoguoCfg.atr.length; _index4++) {
                      subBuffList.push(xiaoguoCfg.atr[_index4]);
                    }
                  }
                }
                if (xiaoguoCfg.type === GameBattle.BuffEffectType.EventBuff) {
                  if (xiaoguoCfg.value && xiaoguoCfg.value.length > 0) {
                    for (var _index5 = 0; _index5 < xiaoguoCfg.value.length; _index5++) {
                      subBuffList.push(xiaoguoCfg.value[_index5]);
                    }
                  }
                }
                //修改子弹效果
                if (xiaoguoCfg.grid_type === 2 && xiaoguoCfg.configuration === "effect_id") {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0 && xiaoguoCfg.value && xiaoguoCfg.value.length > 0) {
                    modifyBulletEffect[xiaoguoCfg.atr[0]] = xiaoguoCfg.value[0];
                  }
                }
                //修改buff效果
                if (xiaoguoCfg.grid_type === 4 && xiaoguoCfg.configuration === "effect_ids") {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0 && xiaoguoCfg.value && xiaoguoCfg.value.length > 0) {
                    for (var _index6 = 0; _index6 < xiaoguoCfg.value.length; _index6++) {
                      if (!modifyBuffEffect[xiaoguoCfg.atr[0]]) {
                        modifyBuffEffect[xiaoguoCfg.atr[0]] = [];
                      }
                      modifyBuffEffect[xiaoguoCfg.atr[0]].push(xiaoguoCfg.value[_index6]);
                    }
                  }
                }
              }
            }
          }
          allBuffs.push.apply(allBuffs, subBuffList);
          var allBulletResList = [];
          var allEffectResList = [];
          for (var _index7 = 0; _index7 < allBuffs.length; _index7++) {
            var _element2 = allBuffs[_index7];
            var _cfg6 = DBRecord.fetchId("JiNengBuff", _element2);
            if (_cfg6) {
              _cfg6 = _extends({}, _cfg6);
              if (_cfg6.effect_ids) {
                _cfg6.effect_ids = [].concat(_cfg6.effect_ids);
              }
            }
            if (_cfg6 && _cfg6.effect_ids) {
              if (modifyBuffEffect[_cfg6.id]) {
                var _cfg6$effect_ids;
                //console.log('================================>>TEST BULLET 修改buff效果:',cfg.id,modifyBuffEffect[cfg.id]);
                (_cfg6$effect_ids = _cfg6.effect_ids).push.apply(_cfg6$effect_ids, modifyBuffEffect[_cfg6.id]);
              }
              for (var _index8 = 0; _index8 < _cfg6.effect_ids.length; _index8++) {
                var effectElement = _cfg6.effect_ids[_index8];
                var _xiaoguoCfg = DBRecord.fetchId("JiNengBuffXiaoGuo", effectElement);
                if (_xiaoguoCfg.type === GameBattle.BuffEffectType.CreateBullet) {
                  if (_xiaoguoCfg.atr && _xiaoguoCfg.atr.length > 0) {
                    allBulletList.push(_xiaoguoCfg.atr[0]);
                  }
                }
                if (_xiaoguoCfg.configuration === "bullet_id") {
                  if (_xiaoguoCfg.value && _xiaoguoCfg.value.length > 0) {
                    allBulletList.push(_xiaoguoCfg.value[0]);
                  }
                } else if (_xiaoguoCfg.configuration === "res") {
                  if (_xiaoguoCfg.value) {
                    allBulletResList.push(_xiaoguoCfg.value);
                  }
                }
              }
            }
          }
          this.allBulletIdList = [].concat(allBulletList);
          //console.log('================================>>TEST BULLET 怪物列表:', monsterIdList);
          // console.log('================================>>TEST BULLET 子弹列表:', allBulletList);
          // console.log('================================>>TEST BULLET buff列表:', allBuffs);

          for (var _i7 = 0; _i7 < allBulletList.length; _i7++) {
            var _cfg7 = DBRecord.fetchId("JiNengZiDan", allBulletList[_i7]);
            if (_cfg7) {
              if (_cfg7.res) {
                allBulletResList.push(_cfg7.res);
              }
              if (_cfg7.hit_effect) {
                allEffectResList.push(_cfg7.hit_effect);
              }
            }
          }
          for (var _i8 = 0; _i8 < allBuffs.length; _i8++) {
            var _cfg8 = DBRecord.fetchId("JiNengBuff", allBuffs[_i8]);
            if (_cfg8) {
              if (_cfg8.vfx) {
                allEffectResList.push(_cfg8.vfx);
              }
            }
          }
          if (this.guanQiaType === GameBattle.GuanQiaType.XinShou) {
            var _allBulletResList;
            (_allBulletResList = allBulletResList).push.apply(_allBulletResList, this.GuideBattleBulletResList);
          } else {
            var _allBulletResList2;
            (_allBulletResList2 = allBulletResList).push.apply(_allBulletResList2, this.BulletResList[App.roleMgr.getRoleJob()]);
          }
          allEffectResList = Array.from(new Set(allEffectResList));
          allBulletResList = Array.from(new Set(allBulletResList));
          // console.log('================================>>TEST BULLET 子弹资源列表:', allBulletResList);
          // console.log('================================>>TEST EFFECT 特效资源列表:', allEffectResList);
          return [allBulletResList, allEffectResList];
        };
        /**
         * 检查子弹是否加载，测试用
         * @param bulletId
         */
        _proto.checkPreLoadBullet = function checkPreLoadBullet(bulletId) {
          {
            if (this.allBulletIdList.findIndex(function (item) {
              return item === bulletId;
            }) < 0) {
              if (!this.noLoadBulletIdList.has(bulletId)) {
                console.warn("****************** TEST BULLET 子弹没有加载：", bulletId);
                this.noLoadBulletIdList.add(bulletId);
              }
            }
          }
        }
        /**
         * 检测木桩副本是否开始战斗了
         */;
        _proto.checkBattleStart = function checkBattleStart() {
          if (!this.battleMainViewCtrl) {
            return false;
          }
          // if (this.guanQiaType === GameBattle.GuanQiaType.MuZhuang) {
          //     if (!this.battleMainViewCtrl.battleMuZhuang) {
          //         return false;
          //     }
          //     return this.battleMainViewCtrl.battleMuZhuang.startBattle;
          // }
          // if (this.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
          //     if (!this.battleMainViewCtrl.battleJingJiChang) {
          //         return false;
          //     }
          //     return this.battleMainViewCtrl.battleJingJiChang.startBattle;
          // }
          return true;
        }

        /**
         * 挑战主线关卡
         * @param guanQiaId 要挑战的关卡ID
         */;
        _proto.cs_challengeGuanQia = function cs_challengeGuanQia(guanQiaId, shuangbei, beishu) {
          console.warn(">>>>>>>>>> AutoFight cs_challengeGuanQia() guanQiaId, shuangbei, beishu ", guanQiaId, shuangbei, beishu);
          this.challengeGuanQiaId = guanQiaId;
          this.lastChallengeIsNewest = guanQiaId === this.curGuanQiaId;
          this.lastChallengeQuanQiaId = guanQiaId;
          this.guanQiaType = GameBattle.GuanQiaType.ZhuXian;
          this._autoJumpShuangBei = shuangbei;
          this._autoJumpBeishu = beishu;
          var obj = {
            guanka_id: guanQiaId,
            shuangbei: shuangbei,
            beishu: beishu
          };
          netChannel.game.send(MonitorType.web_battle_start, obj);
        }

        /**
         * 自动跳转挑战主线关卡
         */;
        _proto.cs_challengeGuanQia_auto_jump = function cs_challengeGuanQia_auto_jump(guanQiaId) {
          console.warn(">>>>>>>>>> AutoFight  cs_challengeGuanQia_auto_jump() ", guanQiaId);
          if (!guanQiaId) {
            return;
          }
          this.cs_challengeGuanQia(guanQiaId, this._autoJumpShuangBei, this._autoJumpBeishu);
        }

        /**
         * 获取卡皮巴拉关卡ID
         */;
        _proto.getKapiBalaGuanQiaId = function getKapiBalaGuanQiaId() {
          var guanqiaId = App.battleMgr.kpblfb_id;
          // if (App.trialManager.curTrialId != 0) {
          //     guanqiaId = App.trialManager.curTrialId;
          // }
          return guanqiaId;
        }

        /**
         * 挑战卡皮巴拉关卡
         * @param guanQiaId 要挑战的关卡ID
         * @param type 挑战类型（0：默认；1：消耗门票或骰子梦境）
         */;
        _proto.cs_challengeKaPiBaLa = /*#__PURE__*/
        function () {
          var _cs_challengeKaPiBaLa = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(guanQiaId, type) {
            var obj, cfg, diMao, ui;
            return _regeneratorRuntime().wrap(function _callee3$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  console.warn("========== AutoFight cs_challengeKaPiBaLa() guanQiaId, type ", guanQiaId, type);
                  App.battleMgr.guanQiaType = GameBattle.GuanQiaType.KaPiBaLa;
                  obj = {
                    guanka_id: guanQiaId,
                    c_type: type
                  };
                  netChannel.game.send(MonitorType.web_battle_start, obj);
                  if (App.battleMgr.challengeGuanQiaId > 0) {
                    App.battleMgr.challengeGuanQiaIdCatch = App.battleMgr.challengeGuanQiaId;
                  } else {
                    App.battleMgr.challengeGuanQiaIdCatch = App.battleMgr.curGuanQiaId;
                  }
                  App.battleMgr.challengeGuanQiaId = guanQiaId;
                  cfg = DBRecord.fetchId("GuanQia", guanQiaId);
                  diMao = cfg.random_map[0][0];
                  App.battleMgr.diMao = diMao;
                  _context4.next = 11;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 11:
                  ui = _context4.sent;
                  console.warn("========== AutoFight cs_challengeKaPiBaLa() guanQiaId, type,openLoading ", guanQiaId, type);
                  ui.setCloseByHand(true);
                  _context4.next = 16;
                  return Item_BattleMap.loadMap(diMao, ui.onProgress.bind(ui));
                case 16:
                  console.warn("========== AutoFight cs_challengeKaPiBaLa() guanQiaId, type,loadMap finish,open BattleMainView ", guanQiaId, type);
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout_uiCommonGet, [guanQiaId], function () {
                    ui.onClose();
                    console.warn("========== AutoFight cs_challengeKaPiBaLa() guanQiaId, type,closeAllPanel ", guanQiaId, type);
                    // App.autoFightManager.finishAutoJump();
                    UIMgr.inst.closeAllPanel(["BattleMainView"]);
                  });
                case 18:
                case "end":
                  return _context4.stop();
              }
            }, _callee3);
          }));
          function cs_challengeKaPiBaLa(_x5, _x6) {
            return _cs_challengeKaPiBaLa.apply(this, arguments);
          }
          return cs_challengeKaPiBaLa;
        }()
        /**
         * 获取装备宝库关卡ID
         */;

        _proto.getZhuangBeiBaoKuGuanQiaId = function getZhuangBeiBaoKuGuanQiaId() {
          var guanqiaId = App.battleMgr.zbfb_id;
          // if (App.trialManager.curTrialId != 0) {
          //     guanqiaId = App.trialManager.curTrialId;
          // }
          return guanqiaId;
        }

        /**
         * 挑战装备宝库关卡
         * @param guanQiaId 要挑战的关卡ID
         */;
        _proto.cs_challengeZhuangBeiBaoKu = /*#__PURE__*/
        function () {
          var _cs_challengeZhuangBeiBaoKu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(guanQiaId, type) {
            var obj, cfg, diMao, ui;
            return _regeneratorRuntime().wrap(function _callee4$(_context5) {
              while (1) switch (_context5.prev = _context5.next) {
                case 0:
                  if (type === void 0) {
                    type = 0;
                  }
                  console.warn("========== AutoFight cs_challengeZhuangBeiBaoKu() guanQiaId ", guanQiaId);
                  App.battleMgr.guanQiaType = GameBattle.GuanQiaType.ZhuangBeiBaoKu;
                  obj = {
                    guanka_id: guanQiaId,
                    c_type: type
                  };
                  netChannel.game.send(MonitorType.web_battle_start, obj);
                  if (App.battleMgr.challengeGuanQiaId > 0) {
                    App.battleMgr.challengeGuanQiaIdCatch = App.battleMgr.challengeGuanQiaId;
                  } else {
                    App.battleMgr.challengeGuanQiaIdCatch = App.battleMgr.curGuanQiaId;
                  }
                  App.battleMgr.challengeGuanQiaId = guanQiaId;
                  cfg = DBRecord.fetchId("GuanQia", guanQiaId);
                  diMao = cfg.random_map[0][0];
                  App.battleMgr.diMao = 2;
                  _context5.next = 12;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 12:
                  ui = _context5.sent;
                  ui.setCloseByHand(true);
                  _context5.next = 16;
                  return Item_BattleMap.loadMap(diMao, ui.onProgress.bind(ui));
                case 16:
                  console.warn("========== AutoFight cs_challengeZhuangBeiBaoKu() loadMap finish,open BattleMainView");
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout_uiCommonGet, [200], function () {
                    ui.onClose();
                    // App.autoFightManager.finishAutoJump();
                    console.warn("========== AutoFight cs_challengeZhuangBeiBaoKu() closeAllPanel");
                    UIMgr.inst.closeAllPanel(["BattleMainView"]);
                  });
                case 18:
                case "end":
                  return _context5.stop();
              }
            }, _callee4);
          }));
          function cs_challengeZhuangBeiBaoKu(_x7, _x8) {
            return _cs_challengeZhuangBeiBaoKu.apply(this, arguments);
          }
          return cs_challengeZhuangBeiBaoKu;
        }()
        /**
         * 获取骰子梦境关卡ID
         */;

        _proto.getTouZiDreamGuanQiaId = function getTouZiDreamGuanQiaId() {
          var guanqiaId = App.battleMgr.tongguanGuanQiaId;
          // if (App.trialManager.curTrialId != 0) {
          //     guanqiaId = App.trialManager.curTrialId;
          // }
          return guanqiaId;
        }

        /**
         * 挑战骰子梦境关卡
         * @param guanQiaId 要挑战的关卡ID
         */;
        _proto.cs_challengeTouZiDream = /*#__PURE__*/
        function () {
          var _cs_challengeTouZiDream = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(guanQiaId) {
            var guanka_id, obj, cfg, diMao, ui;
            return _regeneratorRuntime().wrap(function _callee5$(_context6) {
              while (1) switch (_context6.prev = _context6.next) {
                case 0:
                  console.warn("========== AutoFight cs_challengeTouZiDream() guanQiaId ", guanQiaId);
                  App.battleMgr.guanQiaType = GameBattle.GuanQiaType.ZhuXian;
                  guanka_id = guanQiaId;
                  App.battleMgr.challengeGuanQiaId = guanka_id;
                  obj = {
                    guanka_id: guanka_id,
                    c_type: 1,
                    c_num: 1
                  };
                  netChannel.game.send(MonitorType.web_battle_start, obj);
                  App.battleMgr.isTouZiDream = true;
                  cfg = DBRecord.fetchId("GuanQia", guanka_id);
                  diMao = BattleUtil.getValueByProbability(cfg.random_map);
                  App.battleMgr.diMao = diMao;
                  _context6.next = 12;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 12:
                  ui = _context6.sent;
                  ui.setCloseByHand(true);
                  _context6.next = 16;
                  return Item_BattleMap.loadMap(diMao, ui.onProgress.bind(ui));
                case 16:
                  console.warn("========== AutoFight cs_challengeTouZiDream() loadMap finish,open BattleMainView");
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout_uiCommonGet, [guanka_id], function () {
                    ui.onClose();
                    // App.autoFightManager.showTouZiDreamTip();
                    // App.autoFightManager.finishAutoJump();
                    console.warn("========== AutoFight cs_challengeTouZiDream() closeAllPanel");
                    UIMgr.inst.closeAllPanel(["BattleMainView", "uiPrompt"]);
                  });
                case 18:
                case "end":
                  return _context6.stop();
              }
            }, _callee5);
          }));
          function cs_challengeTouZiDream(_x9) {
            return _cs_challengeTouZiDream.apply(this, arguments);
          }
          return cs_challengeTouZiDream;
        }()
        /**
         * 挑战土拨鼠关卡
         * @param type 挑战类型（0：默认；1：消耗门票或骰子梦境）
         */;

        _proto.cs_challengeTuBoShu = /*#__PURE__*/
        function () {
          var _cs_challengeTuBoShu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(type) {
            var guanka_id, obj, cfg, diMao, ui;
            return _regeneratorRuntime().wrap(function _callee6$(_context7) {
              while (1) switch (_context7.prev = _context7.next) {
                case 0:
                  if (type === void 0) {
                    type = 0;
                  }
                  console.warn("========== AutoFight cs_challengeTuBoShu() guanQiaId ", type);
                  App.battleMgr.guanQiaType = GameBattle.GuanQiaType.TuBoshu;
                  guanka_id = 400;
                  if (App.battleMgr.challengeGuanQiaId > 0) {
                    App.battleMgr.challengeGuanQiaIdCatch = App.battleMgr.challengeGuanQiaId;
                  } else {
                    App.battleMgr.challengeGuanQiaIdCatch = App.battleMgr.curGuanQiaId;
                  }
                  App.battleMgr.challengeGuanQiaId = guanka_id;
                  obj = {
                    guanka_id: guanka_id,
                    c_type: type
                  };
                  netChannel.game.send(MonitorType.web_battle_start, obj);
                  cfg = DBRecord.fetchId("GuanQia", guanka_id);
                  diMao = BattleUtil.getValueByProbability(cfg.random_map);
                  App.battleMgr.diMao = diMao;
                  _context7.next = 13;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 13:
                  ui = _context7.sent;
                  ui.setCloseByHand(true);
                  _context7.next = 17;
                  return Item_BattleMap.loadMap(diMao, ui.onProgress.bind(ui));
                case 17:
                  console.warn("========== AutoFight cs_challengeTuBoShu() loadMap finish,open BattleMainView");
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout_uiCommonGet, [guanka_id], function () {
                    ui.onClose();
                    // App.autoFightManager.finishAutoJump();
                    console.warn("========== AutoFight cs_challengeTuBoShu() closeAllPanel");
                    UIMgr.inst.closeAllPanel(["BattleMainView"]);
                  });
                case 19:
                case "end":
                  return _context7.stop();
              }
            }, _callee6);
          }));
          function cs_challengeTuBoShu(_x10) {
            return _cs_challengeTuBoShu.apply(this, arguments);
          }
          return cs_challengeTuBoShu;
        }();
        _createClass(BattleMgr, [{
          key: "roleCtrl",
          get: function get() {
            return this._roleCtrl;
          }
        }, {
          key: "bulletCtrl",
          get: function get() {
            return this._bulletCtrl;
          }
        }, {
          key: "skillCtrl",
          get: function get() {
            return this._skillCtrl;
          }
        }, {
          key: "battleMainViewCtrl",
          get: function get() {
            return this._battleMainViewCtrl;
          },
          set: function set(v) {
            this._battleMainViewCtrl = v;
          }
        }, {
          key: "battleNpcCtrl",
          get: function get() {
            return this._battleNpcCtrl;
          }
        }, {
          key: "playerCamera",
          get: function get() {
            return this._playerCamera;
          },
          set: function set(val) {
            this._playerCamera = val;
          }
        }, {
          key: "pause",
          get: function get() {
            return this._pause;
          }
        }, {
          key: "curGuanQiaId",
          get: function get() {
            return this._curGuanQiaId;
          }

          /**
           * 获取boss是否已死亡
           * @returns
           */,
          set: function set(v) {
            this._curGuanQiaId = v;
          }
        }, {
          key: "bossIsDead",
          get: function get() {
            return this._bossIsDead;
          }

          /**
           * 设置boss是否已死亡
           * @param value
           */,
          set: function set(value) {
            this._bossIsDead = value;
          }
        }]);
        return BattleMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleMiniMapCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './MonitorType.ts', './ModuleDef.ts', './BattleDefine.ts', './DBRecord.ts', './ItemBattleNpc.ts', './ItemFallingProp.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Node, Label, NodePool, instantiate, UITransform, Sprite, Vec3, Component, Utils, MonitorType, ModuleDef, GameBattle, DBRecord, ItemBattleNpc, ItemFallingProp, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Label = module.Label;
      NodePool = module.NodePool;
      instantiate = module.instantiate;
      UITransform = module.UITransform;
      Sprite = module.Sprite;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ItemBattleNpc = module.ItemBattleNpc;
    }, function (module) {
      ItemFallingProp = module.ItemFallingProp;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
      cclegacy._RF.push({}, "151dakFZNFHE6fbKBZW5Ep2", "BattleMiniMapCtrl", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleMiniMapCtrl = exports('BattleMiniMapCtrl', (_dec = ccclass("BattleMiniMapCtrl"), _dec2 = property({
        type: Node,
        displayName: "小地图父节点"
      }), _dec3 = property({
        type: Node,
        displayName: "地图节点"
      }), _dec4 = property({
        type: Node,
        displayName: "小地图代表角色的点"
      }), _dec5 = property({
        type: Node,
        displayName: "小地图用来拷贝的节点"
      }), _dec6 = property({
        type: Node,
        displayName: "怪物icon节点"
      }), _dec7 = property({
        type: Node,
        displayName: "小地图根节点"
      }), _dec8 = property({
        type: Label,
        displayName: "关卡名"
      }), _dec9 = property({
        type: Node,
        displayName: "宝箱icon节点"
      }), _dec10 = property({
        type: Node,
        displayName: "图腾icon节点"
      }), _dec11 = property({
        type: Node,
        displayName: "武器架icon节点"
      }), _dec12 = property({
        type: Node,
        displayName: "装备品质icon节点>5品质"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleMiniMapCtrl, _Component);
        function BattleMiniMapCtrl() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "miniMapParent", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "miniMapImg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "miniRole", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "poolNode", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "monsterPoolNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "miniMapRoot", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbGuanQiuaName", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "baoxiangPoolNode", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "totemPoolNode", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "weaponRackPoolNode", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "equipQualityNode", _descriptor11, _assertThisInitialized(_this));
          _this._nodePool = new NodePool();
          _this._monsterNodePool = new NodePool();
          _this.baoXiangNodePool = new NodePool();
          _this.totemNodePool = new NodePool();
          _this.weaponRackNodePool = new NodePool();
          _this.initMapPromise = null;
          _this.equipNodePool = new NodePool();
          _this.mapWidth = void 0;
          // 真实地图宽度
          _this.mapHeight = void 0;
          // 真实地图高度
          _this.miniMapWidth = void 0;
          // 小地图宽度
          _this.miniMapHeight = void 0;
          // 小地图高度
          _this.MINI_MAP_SCALE = 3;
          // 活跃的怪物图标
          _this.activeMonsters = new Map();
          _this.activeBaoXiangs = new Map();
          _this.activeTotems = new Map();
          _this.activeWeaponRacks = new Map();
          _this.activeEquips = new Map();
          // 道具颜色品质对应
          _this.itemColorArr = [5, 6, 7, 8, 9, 10];
          return _this;
        }
        var _proto = BattleMiniMapCtrl.prototype;
        _proto.onEnable = function onEnable() {
          if (App.battleMgr.guanQiaType !== GameBattle.GuanQiaType.MainLine) {
            this.node.active = false;
            return;
          }
          this.initListener();
        };
        _proto.start = function start() {
          for (var i = 0; i < 4; i++) {
            this._nodePool.put(instantiate(this.poolNode));
            this._monsterNodePool.put(instantiate(this.monsterPoolNode));
            this.baoXiangNodePool.put(instantiate(this.baoxiangPoolNode));
          }
          for (var index = 0; index < 2; index++) {
            this.totemNodePool.put(instantiate(this.totemPoolNode));
            this.weaponRackNodePool.put(instantiate(this.weaponRackPoolNode));
            this.equipNodePool.put(instantiate(this.equipQualityNode));
          }
          var cfg = DBRecord.fetchId("GuanQia", App.battleMgr.challengeGuanQiaId);
          var difficulty = cfg.difficulty;
          var map_level = cfg.map_level;
          var diMaoDesc = DBRecord.fetchId("ShuoMingQuanJu", 146);
          var curDiMaoDesc = diMaoDesc.value.find(function (item) {
            return item[0] == App.battleMgr.diMao;
          });
          if (curDiMaoDesc) {
            this.lbGuanQiuaName.string = Utils.getGlobalTxt(curDiMaoDesc[1]) + "(" + Utils.getGlobalTxt(1000 + difficulty) + " " + map_level + ")";
          } else {
            this.lbGuanQiuaName.string = Utils.getGlobalTxt(1000 + difficulty) + " " + map_level;
          }
        };
        _proto.initListener = function initListener() {
          App.monitorMgr.addEventListener(MonitorType.battle_add_minimap, this.addAndCreateMiniMap, this);
          App.monitorMgr.addEventListener(MonitorType.battle_init_minimap, this.initMiniMap, this);
          App.monitorMgr.addEventListener(MonitorType.battle_player_get_falling_item, this.handleEquipmentGet, this);
        }

        /**
         * 初始化地图数据
         */;
        _proto.initMiniMapData = function initMiniMapData() {
          var mapSize = App.battleMgr.battleMainViewCtrl.battleMap.getCurMapSize();
          var gridSize = App.battleMgr.battleMainViewCtrl.battleMap.getCurGridSize();
          this.mapWidth = mapSize.width * gridSize.width;
          this.mapHeight = mapSize.height * gridSize.height;
          this.miniMapWidth = this.miniMapImg.getComponent(UITransform).width;
          this.miniMapHeight = this.miniMapImg.getComponent(UITransform).height;
        }

        /**
         * 初始化第一张小地图
         */;
        _proto.initMiniMap = function initMiniMap(dikuiId, bornPos) {
          var _this2 = this;
          this.initMiniMapData();
          this.initMapPromise = new Promise(function (resolve) {
            if (dikuiId > 10000) {
              dikuiId %= 10000;
            }
            console.log("Loading map:", dikuiId);
            App.resMgr.loadSpriteFrame(ModuleDef.GAME_BATTLE_B, "/images/miniMap/mapsTexture/" + dikuiId, function (err, spriteFrame) {
              if (!_this2.isValid) return;
              if (!_this2.miniMapImg.isValid) return;
              _this2.miniMapImg.getComponent(Sprite).spriteFrame = spriteFrame;
              var mapCenterX = _this2.mapWidth / 2;
              var mapCenterY = _this2.mapHeight / 2;
              var playerOffsetX = bornPos.x - mapCenterX;
              var playerOffsetY = bornPos.y - mapCenterY;
              var scaleRatio = _this2.miniMapWidth / _this2.mapWidth;
              var offsetX = -playerOffsetX * scaleRatio;
              var offsetY = -playerOffsetY * scaleRatio;
              var finalX = 130 + offsetX * _this2.MINI_MAP_SCALE;
              var finalY = 83 + offsetY * _this2.MINI_MAP_SCALE;
              if (_this2.miniMapParent.isValid) {
                _this2.miniMapParent.setPosition(finalX, finalY);
              }
              resolve();
            });
          });
        }

        /**
         * 添加新的小地图
         */;
        _proto.addAndCreateMiniMap = /*#__PURE__*/
        function () {
          var _addAndCreateMiniMap = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dikuiId, dir) {
            var _this3 = this;
            var node, referencePos, newPosition;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _context.next = 2;
                  return this.initMapPromise;
                case 2:
                  if (this._nodePool.size() == 0) {
                    this._nodePool.put(instantiate(this.miniMapImg));
                  }
                  node = this._nodePool.get();
                  referencePos = {
                    x: this.miniMapImg.position.x,
                    y: this.miniMapImg.position.y
                  };
                  if (dir[0] !== 0) {
                    newPosition = new Vec3(referencePos.x + dir[0] * this.miniMapWidth, referencePos.y, 0);
                  } else {
                    newPosition = new Vec3(referencePos.x, referencePos.y + dir[1] * this.miniMapHeight, 0);
                  }

                  // 加载并设置新地图
                  _context.next = 8;
                  return new Promise(function (resolve) {
                    if (dikuiId > 10000) {
                      dikuiId %= 10000;
                    }
                    console.log("Loading map:", dikuiId);
                    App.resMgr.loadSpriteFrame(ModuleDef.GAME_BATTLE_B, "/images/miniMap/mapsTexture/" + dikuiId, function (err, spriteFrame) {
                      if (!_this3.isValid) return;
                      node.getComponent(Sprite).spriteFrame = spriteFrame;
                      node.active = true;
                      node.name = "" + dikuiId;
                      node.setPosition(newPosition);
                      _this3.miniMapParent.addChild(node);
                      _this3.miniMapImg = node;
                      console.log("Final map position:", node.position);
                      resolve();
                    });
                  });
                case 8:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function addAndCreateMiniMap(_x, _x2) {
            return _addAndCreateMiniMap.apply(this, arguments);
          }
          return addAndCreateMiniMap;
        }()
        /**
         * 显示小地图上的所有图标（宝箱、图腾、武器架等）
         */;

        _proto.showMapIcons = function showMapIcons() {
          var roleLayer = App.battleMgr.battleMainViewCtrl.roleLayer;
          var player = App.battleMgr.roleCtrl.player;
          if (!(player != null && player.roleVO)) {
            return;
          }
          var playerWorldPos = player.node.worldPosition;
          var scaleRatio = this.miniMapWidth / this.mapWidth;
          var entityMap = roleLayer.children;
          for (var i = 0; i < entityMap.length; i++) {
            var child = entityMap[i];
            if (!child.name.startsWith("itemBattleNpc")) continue;
            var comp = child.getComponent(ItemBattleNpc);
            var worldPos = child.worldPosition;
            var distance = Vec3.distance(playerWorldPos, worldPos);
            if (distance > 1000) continue;
            var iconNode = null;
            var iconPool = null;
            var activeMap = null;
            var id = -1;

            // 根据NPC类型选择对应的图标池和激活Map
            if (comp.isBaoxiang()) {
              iconPool = this.baoXiangNodePool;
              activeMap = this.activeBaoXiangs;
              id = comp.getBaoxiangId();
            } else if (comp.isTotem()) {
              iconPool = this.totemNodePool;
              activeMap = this.activeTotems;
              id = comp.getTotemId();
            } else if (comp.isWeaponRack()) {
              iconPool = this.weaponRackNodePool;
              activeMap = this.activeWeaponRacks;
              id = comp.getRackId();
            } else {
              continue;
            }

            // 获取或创建图标节点
            iconNode = activeMap.get(id);
            if (!iconNode) {
              if (iconPool.size() === 0) {
                var template = comp.isBaoxiang() ? this.baoxiangPoolNode : comp.isTotem() ? this.totemPoolNode : this.weaponRackPoolNode;
                iconPool.put(instantiate(template));
              }
              if (!comp.isUsed()) {
                iconNode = iconPool.get();
                activeMap.set(id, iconNode);
                this.miniMapRoot.addChild(iconNode);
              }
            } else if (comp.isUsed()) {
              iconPool.put(iconNode);
              activeMap["delete"](id);
              continue;
            }
            if (!iconNode) continue;

            // 计算图标位置
            var offsetX = (worldPos.x - playerWorldPos.x) * scaleRatio * this.MINI_MAP_SCALE;
            var offsetY = (worldPos.y - playerWorldPos.y) * scaleRatio * this.MINI_MAP_SCALE;
            var finalPos = new Vec3(this.miniRole.position.x + offsetX, this.miniRole.position.y + offsetY, 0);
            var halfWidth = this.miniMapRoot.uiTransform.width / 2;
            var halfHeight = this.miniMapRoot.uiTransform.height / 2;

            // 设置图标显示状态
            if (finalPos.x > halfWidth || finalPos.y > halfHeight || finalPos.x < -halfWidth || finalPos.y < -halfHeight) {
              if (iconNode && iconNode.isValid) iconNode.active = false;
            } else {
              if (iconNode && iconNode.isValid) {
                iconNode.active = true;
                iconNode.setPosition(finalPos);
              }
            }
          }
        }

        /**
         * 处理装备拾取事件
         * @param item
         */;
        _proto.handleEquipmentGet = function handleEquipmentGet(item) {
          var iconNode = this.activeEquips.get(item.item_id);
          if (iconNode) {
            this.equipNodePool.put(iconNode);
            this.activeEquips["delete"](item.item_id);
          }
        }

        /**
         * 处理装备掉落事件
         */;
        _proto.handleEquipmentDrop = function handleEquipmentDrop() {
          var _this4 = this;
          var fallingLayer = App.battleMgr.battleMainViewCtrl.fallingLayer;
          var player = App.battleMgr.roleCtrl.player;
          if (!(player != null && player.node)) return;
          var playerWorldPos = player.node.worldPosition;
          var scaleRatio = this.miniMapWidth / this.mapWidth;
          var currentFallingItemIds = new Set();
          fallingLayer.children.forEach(function (child) {
            if (child instanceof Node) {
              var itemComp = child.getComponent(ItemFallingProp);
              if (itemComp) {
                if (!itemComp || itemComp.item_color < 5 || itemComp.item_id < 500000) return;
                var distance = Vec3.distance(child.worldPosition, playerWorldPos);
                if (distance > 1000) return;

                // Add this item ID to the set of current falling items
                currentFallingItemIds.add(itemComp.item_id);

                // 复用已存在的图标或创建新的图标
                var iconNode = _this4.activeEquips.get(itemComp.item_id);
                if (!iconNode) {
                  if (_this4.equipNodePool.size() === 0) {
                    _this4.equipNodePool.put(instantiate(_this4.equipQualityNode));
                  }
                  iconNode = _this4.equipNodePool.get();
                  iconNode.name = "equip_" + itemComp.item_id;
                  var sprite = iconNode.getComponent(Sprite);
                  var maxIndex = _this4.itemColorArr.length - 1;
                  var index = itemComp.item_color - 5 > maxIndex ? maxIndex : itemComp.item_color - 5;
                  index = Math.max(0, index);
                  if (sprite) {
                    App.resMgr.loadImage(sprite, ModuleDef.GAME_BATTLE_B, "/images/battleUI/icon_zhuangbei_0" + (index + 1));
                  }
                  _this4.activeEquips.set(itemComp.item_id, iconNode);
                  _this4.miniMapRoot.addChild(iconNode);
                }

                // 计算图标位置
                var offsetX = (child.worldPosition.x - playerWorldPos.x) * scaleRatio * _this4.MINI_MAP_SCALE;
                var offsetY = (child.worldPosition.y - playerWorldPos.y) * scaleRatio * _this4.MINI_MAP_SCALE;
                var finalPos = new Vec3(_this4.miniRole.position.x + offsetX, _this4.miniRole.position.y + offsetY, 0);
                var halfWidth = _this4.miniMapRoot.getComponent(UITransform).width / 2;
                var halfHeight = _this4.miniMapRoot.getComponent(UITransform).height / 2;

                // 设置图标显示状态
                if (finalPos.x > halfWidth || finalPos.y > halfHeight || finalPos.x < -halfWidth || finalPos.y < -halfHeight) {
                  iconNode.active = false;
                } else {
                  iconNode.active = true;
                  iconNode.setPosition(finalPos);
                }
              }
            }
          });

          // 回收不再活跃的装备图标
          for (var _iterator = _createForOfIteratorHelperLoose(this.activeEquips.entries()), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              itemId = _step$value[0],
              iconNode = _step$value[1];
            if (!currentFallingItemIds.has(itemId)) {
              this.equipNodePool.put(iconNode);
              this.activeEquips["delete"](itemId);
            }
          }
        }

        /**
         * 显示怪物
         */;
        _proto.showMonster = function showMonster() {
          var _this5 = this;
          var player = App.battleMgr.roleCtrl.player;
          if (!(player != null && player.roleVO)) {
            return;
          }
          var playerWorldPos = player.node.worldPosition;
          var entityMap = App.battleMgr.roleCtrl.entityMap;
          var scaleRatio = this.miniMapWidth / this.mapWidth;

          // 遍历所有实体
          for (var _iterator2 = _createForOfIteratorHelperLoose(entityMap), _step2; !(_step2 = _iterator2()).done;) {
            var _step2$value = _step2.value,
              uid = _step2$value[0],
              entity = _step2$value[1];
            if (entity.type === GameBattle.RoleType.Monster) {
              var monsterRole = entity;
              if (monsterRole.roleVO.quality === GameBattle.MonsterQuality.Elite) {
                var monsterWorldPos = monsterRole.node.worldPosition;
                var distance = Vec3.distance(playerWorldPos, monsterWorldPos);
                if (distance > 1000) {
                  continue;
                }
                var monsterNode = this.activeMonsters.get(uid);
                if (!monsterNode) {
                  if (this._monsterNodePool.size() === 0) {
                    this._monsterNodePool.put(instantiate(this.monsterPoolNode));
                  }
                  monsterNode = this._monsterNodePool.get();
                  this.activeMonsters.set(uid, monsterNode);
                  this.miniMapRoot.addChild(monsterNode);
                }
                var offsetX = (monsterWorldPos.x - playerWorldPos.x) * scaleRatio * this.MINI_MAP_SCALE;
                var offsetY = (monsterWorldPos.y - playerWorldPos.y) * scaleRatio * this.MINI_MAP_SCALE;
                var finalPos = new Vec3(this.miniRole.position.x + offsetX, this.miniRole.position.y + offsetY, 0);
                var halfWidth = this.miniMapRoot.uiTransform.width / 2;
                var halfHeight = this.miniMapRoot.uiTransform.height / 2;
                if (finalPos.x > halfWidth || finalPos.y > halfHeight || finalPos.x < -halfWidth || finalPos.y < -halfHeight) {
                  monsterNode.active = false;
                } else {
                  monsterNode.active = true;
                  monsterNode.setPosition(finalPos);
                }
              }
            }
          }
          // 回收不再活跃的怪物节点
          this.activeMonsters.forEach(function (node, uid) {
            if (!entityMap.has(uid)) {
              _this5._monsterNodePool.put(node);
              _this5.activeMonsters["delete"](uid);
            }
          });
        }

        /**
         * 更新小地图位置（当玩家移动时调用）
         */;
        _proto.updateMiniPos = function updateMiniPos(x, y, playerPos) {
          var mapCenterX = this.mapWidth / 2;
          var mapCenterY = this.mapHeight / 2;
          var playerOffsetX = playerPos.x - mapCenterX;
          var playerOffsetY = playerPos.y - mapCenterY;
          var scaleRatio = this.miniMapWidth / this.mapWidth;
          var offsetX = -playerOffsetX * scaleRatio;
          var offsetY = -playerOffsetY * scaleRatio;

          // 考虑父节点的缩放和初始位置
          var finalX = 130 + offsetX * this.MINI_MAP_SCALE;
          var finalY = 83 + offsetY * this.MINI_MAP_SCALE;
          this.miniMapParent.setPosition(finalX, finalY);
          this.showMapIcons();
          this.handleEquipmentDrop();
        };
        _proto.update = function update(dt) {
          this.showMonster();
        };
        _proto.onDestroy = function onDestroy() {
          var _this6 = this;
          this.activeMonsters.forEach(function (node) {
            _this6._monsterNodePool.put(node);
          });
          this.activeMonsters.clear();
          this.activeBaoXiangs.forEach(function (node) {
            _this6.baoXiangNodePool.put(node);
          });
          this.activeBaoXiangs.clear();
          this.activeTotems.forEach(function (node) {
            _this6.totemNodePool.put(node);
          });
          this.activeTotems.clear();
          this.activeWeaponRacks.forEach(function (node) {
            _this6.weaponRackNodePool.put(node);
          });
          this.activeWeaponRacks.clear();

          // 清理装备图标对象池
          this.equipNodePool.clear();
          this.activeEquips.forEach(function (node) {
            _this6.equipNodePool.put(node);
          });
          this.activeEquips.clear();
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
        };
        return BattleMiniMapCtrl;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "miniMapParent", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "miniMapImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "miniRole", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "poolNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "monsterPoolNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "miniMapRoot", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lbGuanQiuaName", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "baoxiangPoolNode", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "totemPoolNode", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "weaponRackPoolNode", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "equipQualityNode", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleNewMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BulletCtrl.ts', './DamageTips.ts', './BattleDefine.ts', './RoleCtrl.ts', './SkillCtrl.ts', './FallingPropCtrl.ts', './UIMgr.ts', './uiGameLoading.ts', './BattleNpcCtrl.ts', './DBRecord.ts', './GameStateMgr.ts', './BattleGlobalData.ts', './ui_Defeat.ts', './App.ts', './BattleUtil.ts', './UI_MainView.ts', './Layout_UI_MainView.ts', './TeamMgr.ts', './EventType.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _extends, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, Tween, TweenSystem, Node, ModuleDef, BulletCtrl, DamageTips, GameBattle, RoleCtrl, SkillCtrl, FallingPropCtrl, UIMgr, LayerType, uiGameLoading, BattleNpcCtrl, DBRecord, GameState, BattleGlobalData, ui_Defeat, App, BattleUtil, UI_MainView, Layout_UI_MainView, TeamMgr, EventType;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _extends = module.extends;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      TweenSystem = module.TweenSystem;
      Node = module.Node;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      BulletCtrl = module.BulletCtrl;
    }, function (module) {
      DamageTips = module.DamageTips;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleCtrl = module.RoleCtrl;
    }, function (module) {
      SkillCtrl = module.SkillCtrl;
    }, function (module) {
      FallingPropCtrl = module.FallingPropCtrl;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      uiGameLoading = module.uiGameLoading;
    }, function (module) {
      BattleNpcCtrl = module.BattleNpcCtrl;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameState = module.GameState;
    }, function (module) {
      BattleGlobalData = module.BattleGlobalData;
    }, function (module) {
      ui_Defeat = module.ui_Defeat;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }, function (module) {
      UI_MainView = module.UI_MainView;
    }, function (module) {
      Layout_UI_MainView = module.Layout_UI_MainView;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "bd4cbQDPmpGg7r4v0QNIVvf", "BattleNewMgr", undefined);
      var TypeGuanQia = exports('TypeGuanQia', /*#__PURE__*/function (TypeGuanQia) {
        TypeGuanQia[TypeGuanQia["Main"] = 1] = "Main";
        TypeGuanQia[TypeGuanQia["Guide"] = 99] = "Guide";
        return TypeGuanQia;
      }({}));

      /**通关宝箱领取状态 */
      var RewardReceiveState = exports('RewardReceiveState', /*#__PURE__*/function (RewardReceiveState) {
        RewardReceiveState[RewardReceiveState["Lock"] = 0] = "Lock";
        RewardReceiveState[RewardReceiveState["CanReceive"] = 1] = "CanReceive";
        RewardReceiveState[RewardReceiveState["Received"] = 2] = "Received";
        return RewardReceiveState;
      }({}));

      /**通关奖励宝箱类型 */
      var RewardChestType = exports('RewardChestType', /*#__PURE__*/function (RewardChestType) {
        RewardChestType[RewardChestType["Fast"] = 0] = "Fast";
        RewardChestType[RewardChestType["Normal"] = 1] = "Normal";
        return RewardChestType;
      }({}));
      var BattleNewMgr = exports('BattleNewMgr', /*#__PURE__*/function () {
        function BattleNewMgr() {
          this._roleCtrl = new RoleCtrl();
          this._bulletCtrl = new BulletCtrl();
          this._skillCtrl = new SkillCtrl();
          this._battleMainViewCtrl = void 0;
          this._battleNpcCtrl = new BattleNpcCtrl();
          this._playerCamera = void 0;
          /** 伤害提示UI唯一id生成器 */
          this._damageTipsUIDCounter = 0;
          /** 伤害提示UI列表 */
          this._damgeTipsMap = new Map();
          this.fallingPropCtrl = new FallingPropCtrl();
          this.guanka_list = [];
          this._curGuanQiaId = 0;
          /** 挑战主线关卡ID */
          this.challengeGuanQiaId = 0;
          /** 挑战主线关卡ID 缓存, 用于进入其他副本后还原主线副本ID */
          this.challengeGuanQiaIdCatch = 0;
          this.guankaUnLock = false;
          //是否解锁关卡
          this.tongguanGuanQiaId = -1;
          //最新通关的关卡ID   新增-1的时候表示协议还没到
          this.lastTgGuanQiaId = 0;
          //上一次通关的关卡ID
          this.lastChallengeIsNewest = true;
          //上一次挑战的是否是最新主线关卡
          this.lastChallengeQuanQiaId = 0;
          //上一次挑战的主线关卡
          /** 所有关卡列表 */
          this.allGuanQiaList = void 0;
          /** 自动跳转挑战关卡双倍 */
          this._autoJumpShuangBei = false;
          /** 自动跳转挑战关卡倍数 */
          this._autoJumpBeishu = 0;
          this._pause = false;
          this.diMao = 0;
          this._runningActions = [];
          this.globalData = new BattleGlobalData();
          this.guanQiaType = GameBattle.GuanQiaType.None;
          this.reviveCount = 0;
          /** 幸运宝箱当前领取次数 */
          this.cur_xybx_times = 0;
          /** 幸运宝箱最大领取次数 */
          this.max_xybx_times = 0;
          /** 最大同时存在的伤害提示数量 */
          this.MAX_DAMAGE_TIPS = 50;
          /** 当前活跃的伤害提示数量 */
          this._activeDamageTipsCount = 0;
          // 帧管理相关
          this._frameCounter = 0;
          // 主线副本计时相关
          this._mainFBTimer = null;
          this.FB_TIME_INTERVAL = 1;
          this._bossIsDead = false;
          this._isInBattle = false;
          //图鉴加成
          this._mTuJianAttr = {};
          /** 进入过战斗 */
          this.enterBattleFlag = false;
          this.commomUiTimer = [false, false, false];
          /**
           * 本次战斗随机boss id
           */
          this.curRandomBossId = 0;
          this.allBulletIdList = [];
          /** 新手引导战斗子弹资源列表 */
          this.GuideBattleBulletResList = ["effect_bullet_fashi_shengguangrensuxuanfeng", "effect_Monster_YuanZhengJunGongNuShou_Bullet", "effect_bullet_fashi_luoleishu", "effect_dummy_leimingchuxiang", "effect_dummy_tiannushenfa"];
          /** 战斗子弹资源列表补漏 */
          this.BulletResList = {
            // [GameBattle.RoleJob.fashi]: [],
            // [GameBattle.RoleJob.taidao]: ["effect_bullet_taidao_dujianqi", "effect_bullet_taidao_chaogaosutuxi02"]
          };
          this.noLoadBulletIdList = new Set();
        }
        var _proto = BattleNewMgr.prototype;
        /**
         * 获取当前帧组(0或1)
         */
        _proto.getCurrentFrame = function getCurrentFrame() {
          return this._frameCounter;
        };
        _proto.init = function init() {
          // this._roleCtrl.init();
        };
        _proto.dispose = function dispose() {
          Tween.stopAllByTag(GameBattle.BattleTweenTag);
          this._roleCtrl.dispose();
        }

        /**
         * 检查关卡是否解锁
         * @param guanQiaId 关卡id
         * @returns
         */;
        _proto.checkGuanQiaUnlock = function checkGuanQiaUnlock(guanQiaId) {
          return guanQiaId < this.curGuanQiaId;
        };
        _proto.initPool = function initPool() {
          // App.mapMgr.clearMap();
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Hero], {
            preloadCount: 200,
            maxSize: 200,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips, {
            preloadCount: 200,
            maxSize: 200,
            autoExpand: true
          });
          for (var _key in GameBattle.OtherPrefabPath) {
            App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath[_key], {
              preloadCount: 20,
              maxSize: 20,
              autoExpand: true
            });
          }
          for (var i = 3; i < 9; i++) {
            App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "images/effect_FallingProp_trail/effect_FallingProp_trail" + i, {
              preloadCount: 20,
              maxSize: 20,
              autoExpand: true
            });
          }
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/effect/damageNum", {
            preloadCount: 50,
            maxSize: 60,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/affected", {
            preloadCount: 50,
            maxSize: 60,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/buffEffect", {
            preloadCount: 50,
            maxSize: 60,
            autoExpand: true
          });
        };
        _proto.clearPool = function clearPool() {
          for (var _key2 in GameBattle.OtherPrefabPath) {
            App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath[_key2]);
          }
          for (var i = 3; i < 9; i++) {
            App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "images/effect_FallingProp_trail/effect_FallingProp_trail" + i);
          }
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/effect/damageNum");
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/affected");
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, "prefabs/scene/effect/buffEffect");
        };
        _proto.setPause = function setPause(v) {
          this._pause = v;
          if (v) {
            this._runningActions = TweenSystem.instance.ActionManager.pauseAllRunningActions();
            var popActions = [];
            for (var i = this._runningActions.length; i--;) {
              if (this._runningActions[i] instanceof Node && this._runningActions[i].name === "uiPrompt") {
                popActions.push(this._runningActions[i]);
                this._runningActions.splice(i, 1);
              }
            }
            if (popActions.length > 0) {
              TweenSystem.instance.ActionManager.resumeTargets(popActions);
            }
            if (this._battleMainViewCtrl && this._battleMainViewCtrl.battleMap) this.pauseNodeAndChildren(this._battleMainViewCtrl.battleMap.node.parent);
            App.scheduleMgr.pauseAll();
          } else {
            TweenSystem.instance.ActionManager.resumeTargets(this._runningActions);
            this._runningActions = [];
            if (this._battleMainViewCtrl && this._battleMainViewCtrl.battleMap) this.resumeNodeAndChildren(this._battleMainViewCtrl.battleMap.node.parent);
            App.scheduleMgr.resumeAll();
          }
        }

        /**
         * 暂停节点及其所有子节点
         * @param node
         */;
        _proto.pauseNodeAndChildren = function pauseNodeAndChildren(node) {
          var _this = this;
          // 暂停骨骼动画
          if (node.spine) {
            node.spine.paused = true;
          }
          node.children.forEach(function (child) {
            _this.pauseNodeAndChildren(child);
          });
        }

        /**
         * 恢复节点及其所有子节点
         * @param node
         */;
        _proto.resumeNodeAndChildren = function resumeNodeAndChildren(node) {
          var _this2 = this;
          // 恢复骨骼动画
          if (node.spine) {
            node.spine.paused = false;
          }

          // 遍历并恢复所有子节点
          node.children.forEach(function (child) {
            _this2.resumeNodeAndChildren(child);
          });
        }

        /**
         * 更新
         */;
        _proto.update = function update(dt) {
          if (this._pause) return;

          //console.time('roleCtrl.update');
          this._roleCtrl.update(dt);
          //console.timeEnd('roleCtrl.update');

          this._skillCtrl.update(dt);
          this._bulletCtrl.update(dt);
          this.fallingPropCtrl.update(dt);
          this._frameCounter = 1 - this._frameCounter;
        }

        /**
         * 开始主线副本计时
         */;
        _proto.startMainFBTimer = function startMainFBTimer() {
          this.bossIsDead = false;
        }

        /**
         * 进入战场
         */;
        _proto.onEnter = function onEnter() {
          this.enterBattleFlag = true;
          this._isInBattle = true;
          this.setPause(false);
          UIMgr.inst.preloadUIBundle(ui_Defeat, function () {
            console.log("预加载战斗失败页面成功");
          });
          this.bossIsDead = false;
          // UIMgr.inst.preloadUIBundle(uiLuckBox, () => {
          //     console.log('预加载转盘页面');
          // });
          this.initPool();
          this.globalData.init();
          this._roleCtrl.onEnter();
          this._skillCtrl.onEnter();
          this._bulletCtrl.onEnter();
          this._battleNpcCtrl.onEnter(this.challengeGuanQiaId);

          // 初始化碰撞网格调试渲染器
          // if (GameConfig.DebugInfo.useCollisionGrid) {
          //     CollisionMgr.inst.initDebugRenderer(this._battleMainViewCtrl.node);
          // }
          this.playerCamera = this._battleMainViewCtrl.playerCamera;
          App.gameStateMgr.state = GameState.Battle_ZhuxianGuanQia;
          this.playBattleMusic();
          this.reviveCount = 0;

          // 如果是主线副本,开始计时
          if (this.guanQiaType === GameBattle.GuanQiaType.MainLine) {
            this.startMainFBTimer();
          }
          this.fallingPropCtrl.onEnter();
        }

        /**
         * 退出战场
         */;
        _proto.onExit = /*#__PURE__*/
        function () {
          var _onExit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_type, callFunc, openMain) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (callFunc === void 0) {
                    callFunc = null;
                  }
                  if (openMain === void 0) {
                    openMain = true;
                  }
                  this._isInBattle = false;
                  this._pause = false;
                  this.clearPool();
                  // ui.onProgress(0)
                  Tween.stopAllByTag(GameBattle.BattleTweenTag);
                  if (this._battleMainViewCtrl) {
                    if (this._battleMainViewCtrl.battleMap) {
                      this.resumeNodeAndChildren(this._battleMainViewCtrl.battleMap.node.parent);
                    }
                    // this._battleMainViewCtrl.battleCtrlView.joystickItem.onEnd();
                    this._battleMainViewCtrl.onExit();
                  }
                  this.guanQiaType = GameBattle.GuanQiaType.None;
                  this._roleCtrl.onExit();
                  this._skillCtrl.onExit();
                  this._bulletCtrl.onExit();
                  this.recoveryAllDamageTips();
                  App.dungeonBattleMgr.dispose();
                  App.scheduleMgr.clear();
                  this._battleMainViewCtrl = undefined;
                  this.fallingPropCtrl.onExit();
                  App.soundMgr.clearAllBattleSound();
                  if (this.challengeGuanQiaIdCatch > 0) {
                    this.challengeGuanQiaId = this.challengeGuanQiaIdCatch;
                    this.challengeGuanQiaIdCatch = -1;
                  }
                  // 清理计时器
                  if (this._mainFBTimer) {
                    App.scheduleMgr.unschedule(this._mainFBTimer);
                    this._mainFBTimer = null;
                    this.bossIsDead = false;
                  }
                  this._mTuJianAttr = {};
                  this.curRandomBossId = 0;
                  App.mapMgr.clearMapWayPoint();
                  if (openMain) {
                    _context.next = 25;
                    break;
                  }
                  return _context.abrupt("return");
                case 25:
                  console.warn("######### AutoFight BattleManager.onExit()");
                  _context.next = 28;
                  return this.enterCity(function () {
                    console.warn("######### AutoFight BattleManager.onExit().enterCity().callBack closeAllPanel() ");
                    UIMgr.inst.closeAllPanel(["uiLoading", "uiFunctionUnlock"]);
                    if (callFunc) callFunc();
                  });
                case 28:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function onExit(_x, _x2, _x3) {
            return _onExit.apply(this, arguments);
          }
          return onExit;
        }()
        /**
         * 进入主城
         */;

        _proto.enterCity = /*#__PURE__*/
        function () {
          var _enterCity = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(callback) {
            var ui, progressValues, _loop, i;
            return _regeneratorRuntime().wrap(function _callee2$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  _context3.next = 2;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 2:
                  ui = _context3.sent;
                  ui.setCloseByHand(true);
                  progressValues = [0.15, 0.25, 0.35, 0.55, 0.65, 0.75, 0.85, 0.92, 0.96, 1.0];
                  _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop(i) {
                    return _regeneratorRuntime().wrap(function _loop$(_context2) {
                      while (1) switch (_context2.prev = _context2.next) {
                        case 0:
                          setTimeout(function () {
                            ui.onProgress(progressValues[i]);
                            if (i === 9) {
                              ui.onClose();
                              console.warn("######### AutoFight BattleManager.onExit().enterCity() delay i === 9 closeAllPanel() ");
                              UIMgr.inst.closeAllPanel(["uiMain", "uiJingJiChang", "uiFunctionUnlock", "uiPrompt", "uiBlockLayer"]);
                              App.monitorMgr.dispatchEvent(EventType.loading_end_to_mainGame);
                              // App.autoFightManager.closeProgressBar();
                              if (callback) {
                                callback();
                              }
                            }
                          }, 100 * i + Math.random() * 100 * i);
                        case 1:
                        case "end":
                          return _context2.stop();
                      }
                    }, _loop);
                  });
                  i = 0;
                case 7:
                  if (!(i < 10)) {
                    _context3.next = 12;
                    break;
                  }
                  return _context3.delegateYield(_loop(i), "t0", 9);
                case 9:
                  i++;
                  _context3.next = 7;
                  break;
                case 12:
                  _context3.next = 14;
                  return UIMgr.inst.openOnce(UI_MainView, LayerType.main, Layout_UI_MainView, null, function () {});
                case 14:
                case "end":
                  return _context3.stop();
              }
            }, _callee2);
          }));
          function enterCity(_x4) {
            return _enterCity.apply(this, arguments);
          }
          return enterCity;
        }()
        /**
         * 播放战斗音乐
         */;

        _proto.playBattleMusic = function playBattleMusic() {
          var soundId = App.soundMgr.getBattleMusicId(App.battleMgr.diMao);
          if (soundId) {
            App.soundMgr.playMusicById(soundId);
          }
        }

        /**
         * 创建伤害提示UI
         * @returns
         */;
        _proto.createDamageTips = function createDamageTips() {
          if (!this._battleMainViewCtrl) return;
          if (this._activeDamageTipsCount >= this.MAX_DAMAGE_TIPS) {
            return null;
          }
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips);
          if (!node) return null;
          var tips = node.getComponent(DamageTips);
          tips.node.parent = this._battleMainViewCtrl.effectLayer;
          tips.uid = ++this._damageTipsUIDCounter;
          this._damgeTipsMap.set(tips.uid, tips);
          this._activeDamageTipsCount++;
          return tips;
        }

        /**
         * 回收伤害提示
         */;
        _proto.recoveryDamageTips = function recoveryDamageTips(tips) {
          if (!tips) return;
          this._damgeTipsMap["delete"](tips.uid);
          tips.recovery();
          tips.uid = 0;
          this._activeDamageTipsCount--;
          App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips, tips.node);
        }

        /**
         * 回收所有伤害提示UI
         */;
        _proto.recoveryAllDamageTips = function recoveryAllDamageTips() {
          var _this3 = this;
          this._damgeTipsMap.forEach(function (v) {
            _this3.recoveryDamageTips(v);
          });
          this._damgeTipsMap.clear();
          this._activeDamageTipsCount = 0;
        }

        /**
         * 设置战场背景
         * @param pos
         * @param diMao
         */;
        _proto.setBattleBg = function setBattleBg(pos, diMao) {
          var _this$_battleMainView;
          var x = pos.x - this._battleMainViewCtrl.battleBg.w / 2;
          var y = pos.y - this._battleMainViewCtrl.battleBg.h / 2;
          this._battleMainViewCtrl.battleBg.setWorldPosition(x, y, 0);
          App.resMgr.loadImage((_this$_battleMainView = this._battleMainViewCtrl) == null || (_this$_battleMainView = _this$_battleMainView.battleBg) == null ? void 0 : _this$_battleMainView.sprite, "battleMap", "map" + diMao + "/background");
        };
        _proto.getGuankaList = function getGuankaList() {
          return this.guanka_list;
        }

        /**
         * 获取速通奖励领取状态
         * @param guanQiaId
         * @returns
         */;
        _proto.getGuanQiaSuTongType = function getGuanQiaSuTongType(guanQiaId) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              return this.guanka_list[i].receive1;
            }
          }
          return 0;
        }

        /**
         * 获取首通奖励领取状态
         * @param guanQiaId
         * @returns
         */;
        _proto.getGuanQiaShouTongType = function getGuanQiaShouTongType(guanQiaId) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              return this.guanka_list[i].receive;
            }
          }
          return 0;
        }

        /**
         * 获取关卡最快通关时间
         * @param guanQiaId
         * @returns
         */;
        _proto.getGuanQiaFastestPassTime = function getGuanQiaFastestPassTime(guanQiaId) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              return this.guanka_list[i].tg_second;
            }
          }
          return 0;
        }

        /**
         * 设置速通宝箱领取状态
         * @param guanQiaId
         * @param type
         */;
        _proto.settGuanQiaSuTongType = function settGuanQiaSuTongType(guanQiaId, type) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              if (type > this.guanka_list[i].receive1) {
                this.guanka_list[i].receive1 = type;
              }
            }
          }
        }

        /**
         * 设置首通宝箱领取状态
         * @param guanQiaId
         * @param type
         */;
        _proto.settGuanQiaShouTongType = function settGuanQiaShouTongType(guanQiaId, type) {
          for (var i = this.guanka_list.length; i--;) {
            if (guanQiaId === this.guanka_list[i].guanka_id) {
              if (type > this.guanka_list[i].receive) {
                this.guanka_list[i].receive = type;
              }
            }
          }
        };
        _proto.getPassIdMax = function getPassIdMax() {
          return this.tongguanGuanQiaId;
        };
        _proto.getFbCfg = function getFbCfg(fbid) {
          var cfg = DBRecord.fetchId("Fb", fbid);
          if (!cfg) return null;
          return cfg;
        }

        /**
         * 找出配置表GuanQia中，最大的关卡，也就是最大的ID
         * @returns 最大的关卡ID
         */;
        _proto.findMaxGuanQiaId = function findMaxGuanQiaId() {
          var maxId = 0;
          var guanQiaList = DBRecord.fetchAll("GuanQia");
          for (var i = 0; i < guanQiaList.length; i++) {
            if (guanQiaList[i].type === 1 && guanQiaList[i].id > maxId) {
              maxId = guanQiaList[i].id;
            }
          }
          return maxId;
        };
        /**
         * 战斗飘字提示
         * @param str 提示内容
         */
        _proto.popTips = function popTips(str, type) {
          var _this4 = this;
          if (this.commomUiTimer[type]) {
            return;
          }
          this.commomUiTimer[type] = true;
          var tmIndex = [0, 0, 1]; //42 血瓶能量瓶  43 技能
          this._battleMainViewCtrl.battleUIView.popTips(str);
          var cfg = DBRecord.fetchId("ShuoMingQuanJu", 42 + tmIndex[type]);
          var tm = Number(cfg.value);
          setTimeout(function () {
            _this4.commomUiTimer[type] = false;
          }, tm);
        }

        /**
         * 检查当前关卡是否为主线关卡
         * @returns
         */;
        _proto.isMainLineGuanQia = function isMainLineGuanQia() {
          return this.guanQiaType === GameBattle.GuanQiaType.MainLine;
        }

        /**
         * 是否在战斗中
         */;
        _proto.isInBattle = function isInBattle() {
          return this._isInBattle;
        }

        /**
         * 获取地图数据
         * @param diMao
         */;
        _proto.getMapData = function getMapData(diMao) {
          var _mapData = {};
          var guanQiaId = App.battleMgr.challengeGuanQiaId;
          var cfg = DBRecord.fetchId("GuanQia", guanQiaId);
          var random_map = cfg.random_map;
          var diMaoIndex = 0;
          for (var i = 0; i < random_map.length; i++) {
            if (diMao === random_map[i][0]) {
              diMaoIndex = i;
              break;
            }
          }
          var monster_density = cfg.monster_density[diMaoIndex];
          _mapData = {};
          var dbr = DBRecord.fetchAll("DiKuai");
          var born_map = [];
          for (var _iterator = _createForOfIteratorHelperLoose(dbr), _step; !(_step = _iterator()).done;) {
            var it = _step.value;
            if (it.name === diMao && it.monster_density === monster_density) {
              if (!_mapData[it["in"]]) {
                _mapData[it["in"]] = [];
              }
              _mapData[it["in"]].push(it);
              if (it["in"] === 0) {
                born_map.push(it);
              }
            }
          }
          return [_mapData, born_map];
        };
        _proto.initFbMonsterSpawnCfg = function initFbMonsterSpawnCfg(fbId) {
          // 优化后的怪物出生配置初始化函数，修复空对象赋值以及对象初始化的问题，避免空指针、脏数据等

          var list = [];
          var fb_monsters = DBRecord.fetchKvs("Fb_Monster", {
            fbid: fbId
          });

          // 提前判断
          if (!Array.isArray(fb_monsters) || fb_monsters.length === 0) {
            return list;
          }
          for (var _iterator2 = _createForOfIteratorHelperLoose(fb_monsters), _step2; !(_step2 = _iterator2()).done;) {
            var cfg = _step2.value;
            if (!cfg || !Array.isArray(cfg.monster) || cfg.monster.length === 0) continue;

            // 初始化spCfg，不能直接null
            var spCfg = {
              waveId: cfg.wave,
              spawnTime: cfg.time,
              waveCfg: []
            };
            for (var j = 0; j < cfg.monster.length; j++) {
              var mCfg = cfg.monster[j];
              if (Array.isArray(mCfg) && mCfg.length > 2) {
                var monsterId = mCfg[1];
                var gwCfg = DBRecord.fetchId("GuaiWu", monsterId);

                // 初始化waveCfg
                var waveCfg = {
                  lane: mCfg[0],
                  monsterId: monsterId,
                  count: mCfg[2],
                  monsterType: gwCfg ? gwCfg.type : 0,
                  monsterQuality: 1,
                  interval: 0.2,
                  isBoss: gwCfg ? gwCfg.type === 2 : false
                };
                spCfg.waveCfg.push(waveCfg);
              }
            }
            // 只添加有怪物的波次
            if (spCfg.waveCfg.length > 0) {
              list.push(spCfg);
            }
          }
          return list;
        }

        /**
         * 初始化当前章节所有怪物的资源名称
         */;
        _proto.initAllMonsterRes = function initAllMonsterRes(fb_monsters) {
          if (!fb_monsters) {
            console.warn("无怪物，无法初始化怪物数据");
            return;
          }

          // 用于存储所有怪物ID，避免重复
          var monsterIds = new Set();
          var monsterResSet = new Set();
          var monsterNameList = [];
          var mosnterResList = [];

          // 遍历数组中的怪物信息
          for (var i = 0; i < fb_monsters.length; i++) {
            var cfg = fb_monsters[i];
            if (!cfg || cfg.monster.length <= 0) continue;

            // 遍历该地块的所有怪物出生点
            var monsterBornList = cfg.monster;
            for (var j = 0; j < monsterBornList.length; j++) {
              var data = monsterBornList[j];
              if (!data || data.length < 2) continue;

              // 获取怪物组ID
              var monsterId = data[1];
              var monsterCfg = DBRecord.fetchId("GuaiWu", monsterId);
              if (!monsterCfg) continue;
              if (!monsterIds.has(monsterCfg.id)) {
                monsterIds.add(monsterCfg.id);
              }
              if (!monsterResSet.has(monsterCfg.res)) {
                monsterResSet.add(monsterCfg.res);
                monsterNameList.push(monsterCfg.res);
                mosnterResList.push({
                  bundle: ModuleDef.MONSTER,
                  name: monsterCfg.res,
                  actions: ["Idle", "Move", "Attack", "Dead"]
                });
              }
            }
          }

          //console.log('================================>>当前章节所有怪物动画名称列表:', monsterNameList);
          var monsterIdList = Array.from(monsterIds);
          return [mosnterResList, monsterIdList];
        }
        /**
         * 初始化英雄和士兵资源
         * @returns [{bundle: ModuleDef.HERO, name: heroCfg.res, actions: [ "Idle", "Move", "Attack", "Dead", "Skill"]}]
         */;
        _proto.initHeroAndSoldierRes = function initHeroAndSoldierRes() {
          var formation = TeamMgr.inst.currFormation;
          var heros = formation.heros;
          var soldiers = formation.soldiers;
          var resList = [];
          var heroIdsIds = new Set();
          var heroIdsResSet = new Set();
          heros.forEach(function (hero) {
            if (hero.id > 0) {
              var heroCfg = TeamMgr.inst.getHeroIdCfg(hero.id);
              if (heroCfg) {
                if (!heroIdsIds.has(heroCfg.id)) {
                  heroIdsIds.add(heroCfg.id);
                }
                if (!heroIdsResSet.has(heroCfg.res)) {
                  heroIdsResSet.add(heroCfg.res);
                  resList.push({
                    bundle: ModuleDef.HERO,
                    name: heroCfg.res,
                    actions: ["Idle", "Move", "Attack", "Dead", "Skill"]
                  });
                }
              }
            }
          });
          soldiers.forEach(function (soldier) {
            if (soldier.id > 0) {
              var soldierCfg = TeamMgr.inst.getSoldierIdCfg(soldier.id);
              if (soldierCfg) {
                resList.push({
                  bundle: ModuleDef.SOLDIER,
                  name: soldierCfg.res,
                  actions: ["Idle", "Move", "Attack", "Dead"]
                });
              }
            }
          });
          return resList;
        };
        /**
         * 先确定随机boss的id,方便laoding时加载boss资源
         */
        _proto.initRandomBossId = function initRandomBossId() {
          var dbr = DBRecord.fetchId("GuanQia", this.challengeGuanQiaId);
          if (dbr && dbr.bossid && dbr.bossid.length > 0) {
            this.curRandomBossId = BattleUtil.getValueByProbability(dbr.bossid);
          }
          //console.log('================================>>本次战斗随机boss id:', this.curRandomBossId);
          return this.curRandomBossId;
        };
        /**
         * 初始化当前章节所有子弹的资源名称
         */
        _proto.getAllBulletRes = function getAllBulletRes(monsterIdList) {
          var allBulletList = [];
          var allBuffs = [];

          //怪物技能id
          var monsterSkillList = [];
          for (var i = 0; i < monsterIdList.length; i++) {
            var cfg = DBRecord.fetchId("GuaiWu", monsterIdList[i]);
            if (cfg) {
              if (cfg.init_buff_id) {
                for (var j = 0; j < cfg.init_buff_id.length; j++) {
                  allBuffs.push(cfg.init_buff_id[j]);
                }
              }
              if (cfg.skill_id) {
                for (var _j = 0; _j < cfg.skill_id.length; _j++) {
                  monsterSkillList.push(cfg.skill_id[_j]);
                }
              }
              if (cfg.atk_id) {
                monsterSkillList.push(cfg.atk_id);
              }
            }
          }
          //怪物技能buff、子弹
          for (var _i = 0, _monsterSkillList = monsterSkillList; _i < _monsterSkillList.length; _i++) {
            var it = _monsterSkillList[_i];
            var _cfg = DBRecord.fetchId("Skill", it);
            if (_cfg && _cfg.buff_id && _cfg.buff_id.length > 0) {
              for (var _i2 = 0; _i2 < _cfg.buff_id.length; _i2++) {
                allBuffs.push(_cfg.buff_id[_i2]);
              }
            }
            if (_cfg && _cfg.bullet_id) {
              for (var _i3 = 0; _i3 < _cfg.bullet_id.length; _i3++) {
                allBulletList.push(_cfg.bullet_id[_i3]);
              }
            }
          }

          //子弹创建的buff、子弹
          var bulletSubBuff = [];
          var subBulletList = [];
          for (var index = 0; index < allBulletList.length; index++) {
            var element = allBulletList[index];
            var _cfg2 = DBRecord.fetchId("JiNengXiaoGuo", element);
            //添加buff
            if (_cfg2 && _cfg2.type === 2) {
              if (_cfg2.atr && _cfg2.atr.length > 0) {
                for (var _i4 = 0; _i4 < _cfg2.atr.length; _i4++) {
                  bulletSubBuff.push(_cfg2.atr[_i4]);
                }
              }
            }
            //添加子弹
            if (_cfg2 && _cfg2.type === 4) {
              if (_cfg2.atr && _cfg2.atr.length > 0) {
                for (var _i5 = 0; _i5 < _cfg2.atr.length; _i5++) {
                  subBulletList.push(_cfg2.atr[_i5]);
                }
              }
            }
          }
          allBuffs.push.apply(allBuffs, bulletSubBuff);
          allBulletList.push.apply(allBulletList, subBulletList);

          //buff创建的buff
          var subBuffList = [];
          //修改子弹效果
          var modifyBulletEffect = [];
          //修改buff效果
          var modifyBuffEffect = [];
          for (var _index = 0; _index < allBuffs.length; _index++) {
            var _element = allBuffs[_index];
            var _cfg3 = DBRecord.fetchId("JiNengBuff", _element);
            if (!_cfg3) {
              continue;
            }
            if (_cfg3.effect_ids) {
              for (var _index2 = 0; _index2 < _cfg3.effect_ids.length; _index2++) {
                var elementEff = _cfg3.effect_ids[_index2];
                var xiaoguoCfg = DBRecord.fetchId("JiNengBuffXiaoGuo", elementEff);
                if (xiaoguoCfg.type === GameBattle.BuffEffectType.AddBuffByOdds) {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0) {
                    for (var _index3 = 0; _index3 < xiaoguoCfg.atr.length; _index3++) {
                      subBuffList.push(xiaoguoCfg.atr[_index3]);
                    }
                  }
                }
                if (xiaoguoCfg.configuration === "buff_id") {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0) {
                    for (var _index4 = 0; _index4 < xiaoguoCfg.atr.length; _index4++) {
                      subBuffList.push(xiaoguoCfg.atr[_index4]);
                    }
                  }
                }
                if (xiaoguoCfg.type === GameBattle.BuffEffectType.EventBuff) {
                  if (xiaoguoCfg.value && xiaoguoCfg.value.length > 0) {
                    for (var _index5 = 0; _index5 < xiaoguoCfg.value.length; _index5++) {
                      subBuffList.push(xiaoguoCfg.value[_index5]);
                    }
                  }
                }
                //修改子弹效果
                if (xiaoguoCfg.grid_type === 2 && xiaoguoCfg.configuration === "effect_id") {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0 && xiaoguoCfg.value && xiaoguoCfg.value.length > 0) {
                    modifyBulletEffect[xiaoguoCfg.atr[0]] = xiaoguoCfg.value[0];
                  }
                }
                //修改buff效果
                if (xiaoguoCfg.grid_type === 4 && xiaoguoCfg.configuration === "effect_ids") {
                  if (xiaoguoCfg.atr && xiaoguoCfg.atr.length > 0 && xiaoguoCfg.value && xiaoguoCfg.value.length > 0) {
                    for (var _index6 = 0; _index6 < xiaoguoCfg.value.length; _index6++) {
                      if (!modifyBuffEffect[xiaoguoCfg.atr[0]]) {
                        modifyBuffEffect[xiaoguoCfg.atr[0]] = [];
                      }
                      modifyBuffEffect[xiaoguoCfg.atr[0]].push(xiaoguoCfg.value[_index6]);
                    }
                  }
                }
              }
            }
          }
          allBuffs.push.apply(allBuffs, subBuffList);
          var allBulletResList = [];
          var allEffectResList = [];
          for (var _index7 = 0; _index7 < allBuffs.length; _index7++) {
            var _element2 = allBuffs[_index7];
            var _cfg4 = DBRecord.fetchId("JiNengBuff", _element2);
            if (_cfg4) {
              _cfg4 = _extends({}, _cfg4);
              if (_cfg4.effect_ids) {
                _cfg4.effect_ids = [].concat(_cfg4.effect_ids);
              }
            }
            if (_cfg4 && _cfg4.effect_ids) {
              if (modifyBuffEffect[_cfg4.id]) {
                var _cfg4$effect_ids;
                //console.log('================================>>TEST BULLET 修改buff效果:',cfg.id,modifyBuffEffect[cfg.id]);
                (_cfg4$effect_ids = _cfg4.effect_ids).push.apply(_cfg4$effect_ids, modifyBuffEffect[_cfg4.id]);
              }
              for (var _index8 = 0; _index8 < _cfg4.effect_ids.length; _index8++) {
                var effectElement = _cfg4.effect_ids[_index8];
                var _xiaoguoCfg = DBRecord.fetchId("JiNengBuffXiaoGuo", effectElement);
                if (_xiaoguoCfg.type === GameBattle.BuffEffectType.CreateBullet) {
                  if (_xiaoguoCfg.atr && _xiaoguoCfg.atr.length > 0) {
                    allBulletList.push(_xiaoguoCfg.atr[0]);
                  }
                }
                if (_xiaoguoCfg.configuration === "bullet_id") {
                  if (_xiaoguoCfg.value && _xiaoguoCfg.value.length > 0) {
                    allBulletList.push(_xiaoguoCfg.value[0]);
                  }
                } else if (_xiaoguoCfg.configuration === "res") {
                  if (_xiaoguoCfg.value) {
                    allBulletResList.push(_xiaoguoCfg.value);
                  }
                }
              }
            }
          }
          this.allBulletIdList = [].concat(allBulletList);
          //console.log('================================>>TEST BULLET 怪物列表:', monsterIdList);
          // console.log('================================>>TEST BULLET 子弹列表:', allBulletList);
          // console.log('================================>>TEST BULLET buff列表:', allBuffs);

          for (var _i6 = 0; _i6 < allBulletList.length; _i6++) {
            var _cfg5 = DBRecord.fetchId("JiNengZiDan", allBulletList[_i6]);
            if (_cfg5) {
              if (_cfg5.res) {
                allBulletResList.push(_cfg5.res);
              }
              if (_cfg5.hit_effect) {
                allEffectResList.push(_cfg5.hit_effect);
              }
            }
          }
          for (var _i7 = 0; _i7 < allBuffs.length; _i7++) {
            var _cfg6 = DBRecord.fetchId("JiNengBuff", allBuffs[_i7]);
            if (_cfg6) {
              if (_cfg6.vfx) {
                allEffectResList.push(_cfg6.vfx);
              }
            }
          }

          // if (this.guanQiaType === GameBattle.GuanQiaType.XinShou) {
          //     allBulletResList.push(...this.GuideBattleBulletResList);
          // } else {
          //     allBulletResList.push(...this.BulletResList[App.roleMgr.getRoleJob()]);
          // }
          allEffectResList = Array.from(new Set(allEffectResList));
          allBulletResList = Array.from(new Set(allBulletResList));
          // console.log('================================>>TEST BULLET 子弹资源列表:', allBulletResList);
          // console.log('================================>>TEST EFFECT 特效资源列表:', allEffectResList);
          return [allBulletResList, allEffectResList];
        };
        /**
         * 检查子弹是否加载，测试用
         * @param bulletId
         */
        _proto.checkPreLoadBullet = function checkPreLoadBullet(bulletId) {
          {
            if (this.allBulletIdList.findIndex(function (item) {
              return item === bulletId;
            }) < 0) {
              if (!this.noLoadBulletIdList.has(bulletId)) {
                console.warn("****************** TEST BULLET 子弹没有加载：", bulletId);
                this.noLoadBulletIdList.add(bulletId);
              }
            }
          }
        }
        /**
         * 检测木桩副本是否开始战斗了
         */;
        _proto.checkBattleStart = function checkBattleStart() {
          if (!this.battleMainViewCtrl) {
            return false;
          }
          // if (this.guanQiaType === GameBattle.GuanQiaType.MuZhuang) {
          //     if (!this.battleMainViewCtrl.battleMuZhuang) {
          //         return false;
          //     }
          //     return this.battleMainViewCtrl.battleMuZhuang.startBattle;
          // }
          // if (this.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
          //     if (!this.battleMainViewCtrl.battleJingJiChang) {
          //         return false;
          //     }
          //     return this.battleMainViewCtrl.battleJingJiChang.startBattle;
          // }
          return true;
        };
        _createClass(BattleNewMgr, [{
          key: "roleCtrl",
          get: function get() {
            return this._roleCtrl;
          }
        }, {
          key: "bulletCtrl",
          get: function get() {
            return this._bulletCtrl;
          }
        }, {
          key: "skillCtrl",
          get: function get() {
            return this._skillCtrl;
          }
        }, {
          key: "battleMainViewCtrl",
          get: function get() {
            return this._battleMainViewCtrl;
          },
          set: function set(v) {
            this._battleMainViewCtrl = v;
          }
        }, {
          key: "battleNpcCtrl",
          get: function get() {
            return this._battleNpcCtrl;
          }
        }, {
          key: "playerCamera",
          get: function get() {
            return this._playerCamera;
          },
          set: function set(val) {
            this._playerCamera = val;
          }
        }, {
          key: "pause",
          get: function get() {
            return this._pause;
          }
        }, {
          key: "curGuanQiaId",
          get: function get() {
            return this._curGuanQiaId;
          }

          /**
           * 获取boss是否已死亡
           * @returns
           */,
          set: function set(v) {
            this._curGuanQiaId = v;
          }
        }, {
          key: "bossIsDead",
          get: function get() {
            return this._bossIsDead;
          }

          /**
           * 设置boss是否已死亡
           * @param value
           */,
          set: function set(value) {
            this._bossIsDead = value;
          }
        }]);
        return BattleNewMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleNpcCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './Utils.ts', './ModuleDef.ts', './BattleDefine.ts', './ItemBattleNpc.ts', './MonitorType.ts', './CommonCfgUtil.ts', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, _decorator, DBRecord, Utils, ModuleDef, GameBattle, ItemBattleNpc, MonitorType, CommonCfgUtil, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      ItemBattleNpc = module.ItemBattleNpc;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      CommonCfgUtil = module.CommonCfgUtil;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "dc460QcalVABI1r01s2ZXKM", "BattleNpcCtrl", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      // ghjgjuy:
      // 1-图腾
      // 2-装备架
      // 3-宝箱

      var BattleNpcCtrl = exports('BattleNpcCtrl', /*#__PURE__*/function () {
        function BattleNpcCtrl() {
          this._npcCount = [0, 0, 0, 0];
          this._npcs = {};
          this._zhuangBeiJiaData = {};
          this._bxIndex = 1;
          this._flag = {};
          this._bxOpend = false;
          this._bxItems = [];
          /** 所有战斗npc */
          this.allBattleNpcList = [];
          this._curBaoXiangOdss = 10000;
        }
        var _proto = BattleNpcCtrl.prototype;
        _proto.init = function init() {
          this._npcCount = [0, 0, 0, 0];
          this._zhuangBeiJiaData = {};
          this._flag = {};
          this.resetData();
        };
        _proto.resetData = function resetData() {
          this._npcs = {};
          this._flag = {};
          this._bxIndex = 1;
        };
        _proto.dispose = function dispose() {
          this.onExit();
        };
        _proto.enterNewMap = function enterNewMap(uuid, diKuaiId, map) {
          if (this._flag[uuid]) return;
          this._flag[uuid] = true;
          var roleLayer = App.battleMgr.battleMainViewCtrl.roleLayer;
          var cfg = DBRecord.fetchId("DiKuai", diKuaiId);
          if (!cfg.totem_weight) return;
          //let count = BattleUtil.getValueByProbability(cfg.totem_weight);
          // this.initBloodMoon(map);
          var npcObj = map.getObjectGroup("npc");
          if (npcObj) {
            var data = npcObj.getObjects();
            for (var i = 0; i < data.length; i++) {
              if (Math.random() > 0.5) {
                // data[i].type = 3
                var npc = this.getNpcByType(data[i].type);
                if (npc) {
                  if (npc.type === GameBattle.BattleNpcType.BaoXiang) {
                    //宝箱次数到达上限
                    if (App.battleMgr.cur_xybx_times >= App.battleMgr.max_xybx_times) {
                      continue;
                    }
                    //当前副本开过宝箱了
                    if (this._bxOpend) {
                      continue;
                    }
                    //未通过宝箱的概率衰减
                    var odds = Math.random() * 10000;
                    if (odds > this._curBaoXiangOdss) {
                      console.log("宝箱 未通过宝箱的概率衰减 当前宝箱出现概率", this._curBaoXiangOdss);
                      continue;
                    }
                  }
                  var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.itemBattleNpc);
                  roleLayer.addChild(node);
                  var world_pos = App.mapMgr.mapPointToWorldPostion(data[i].x, data[i].y);
                  node.setWorldPosition(world_pos);
                  var comp = node.getComponent(ItemBattleNpc);
                  if (npc.type === GameBattle.BattleNpcType.BaoXiang) {
                    comp.init(npc, this._bxIndex++, data[i]);
                    this._bxItems.push(comp);
                  } else {
                    comp.init(npc, -1, data[i]);
                  }
                  if (npc.type === GameBattle.BattleNpcType.ZhuangBeiJia) {
                    comp.setZhuangBei(this.getZhuangBeiJiaItem(npc.id));
                  }
                  this.allBattleNpcList.push(comp);
                }
              }
            }
          }
          App.monitorMgr.dispatchEvent(MonitorType.battle_enter_new_map, {
            uuid: uuid,
            diKuaiId: diKuaiId
          });
        };
        _proto.onEnter = function onEnter(guanQiaId) {
          this.resetData();
          var GuanQiaCfg = DBRecord.fetchId("GuanQia", guanQiaId);
          this._npcCount[1] = GuanQiaCfg.totem_max;
          this._npcCount[3] = GuanQiaCfg.box_max;
          var cfg = DBRecord.fetchAll("NpcSuiJi");
          for (var i = 0; i < cfg.length; i++) {
            var type = cfg[i].type;
            if (!this._npcs[type]) {
              this._npcs[type] = [];
            }
            this._npcs[type].push(Utils.deepCopy(cfg[i]));
          }
          this._curBaoXiangOdss = 10000;
          var odds = CommonCfgUtil.getValue(81) / 10000;
          for (var _i = 0; _i < App.battleMgr.cur_xybx_times; _i++) {
            this._curBaoXiangOdss *= odds;
          }
          this._bxOpend = false;
          this._bxItems = [];
          this.allBattleNpcList = [];
          console.log("宝箱 onEnter", this._npcCount, this._curBaoXiangOdss);
        };
        _proto.onExit = function onExit() {
          this._bxItems = [];
          this.allBattleNpcList = [];
        }

        /**
         * 通过NPC类型获取NPC
         * @param type
         * @returns
         */;
        _proto.getNpcByType = function getNpcByType(type) {
          var npcs = this._npcs[type];
          if (!npcs) return;
          if (this._npcCount[type] <= 0) return null;
          this._npcCount[type]--;
          if (type === GameBattle.BattleNpcType.ZhuangBeiJia) {
            if (this._zhuangBeiJiaData[2001].length === 0) {
              npcs[0].weight = 0;
            }
            if (this._zhuangBeiJiaData[2002].length === 0) {
              npcs[1].weight = 0;
            }
          }
          var weights = [];
          var sum = 0;
          for (var i = 0; i < npcs.length; i++) {
            sum += npcs[i].weight;
            weights[i] = sum;
          }
          var index = 0;
          var temp = Math.random() * sum;
          for (var _i2 = 0; _i2 < weights.length; _i2++) {
            index = _i2;
            if (weights[_i2] > temp) break;
          }
          // index = 1
          npcs[index].weight -= npcs[index].weight_low;
          return npcs[index];
        };
        _proto.setZhuangBeiJiaData = function setZhuangBeiJiaData(wuQiJia, fangJuJia) {
          this._zhuangBeiJiaData = {
            2001: wuQiJia,
            2002: fangJuJia
          };
          this._npcCount[2] = wuQiJia.length + fangJuJia.length;
        };
        _proto.getZhuangBeiJiaItem = function getZhuangBeiJiaItem(key) {
          var item = this._zhuangBeiJiaData[key].shift();
          return item;
        }
        /** 宝箱开奖后要清除地图上的其他宝箱 */;
        _proto.setBxOpend = function setBxOpend() {
          this._bxOpend = true;
          for (var _iterator = _createForOfIteratorHelperLoose(this._bxItems), _step; !(_step = _iterator()).done;) {
            var comp = _step.value;
            comp.used = true;
            comp.spine.setAnimation(0, "Play", false);
            comp.uifBar.node.parent.active = false;
            comp.bg.active = false;
            comp.bg.parent = comp.node;
            comp.imgYingZi.active = false;
          }
          this._bxItems = [];
        };
        return BattleNpcCtrl;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleProprMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './BattleUISysDef.ts', './DBRecord.ts', './MonitorType.ts', './MonsterVO.ts', './BattleDefine.ts', './UtilGame.ts', './App.ts'], function (exports) {
  var _createClass, _createForOfIteratorHelperLoose, cclegacy, _decorator, randomRangeInt, Utils, BattleUISysDef, DBRecord, MonitorType, MonsterVO, GameBattle, UtilGame, App;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      randomRangeInt = module.randomRangeInt;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      BattleUISysDef = module.BattleUISysDef;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      MonsterVO = module.MonsterVO;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "18339U3DihIs4yRZNjNax9F", "BattleProprMgr", undefined);
      var ccclass = _decorator.ccclass;
      var PlayerTimerFuncsDef = exports('PlayerTimerFuncsDef', /*#__PURE__*/function (PlayerTimerFuncsDef) {
        PlayerTimerFuncsDef[PlayerTimerFuncsDef["None"] = 0] = "None";
        PlayerTimerFuncsDef[PlayerTimerFuncsDef["RecoveryLife"] = 1] = "RecoveryLife";
        PlayerTimerFuncsDef[PlayerTimerFuncsDef["RecoveryNengLiang"] = 2] = "RecoveryNengLiang";
        return PlayerTimerFuncsDef;
      }({}));
      var FormulaResultItem = exports('FormulaResultItem', /*#__PURE__*/function (FormulaResultItem) {
        FormulaResultItem[FormulaResultItem["_none"] = 0] = "_none";
        FormulaResultItem[FormulaResultItem["_sanbi"] = 1] = "_sanbi";
        FormulaResultItem[FormulaResultItem["_baoji"] = 2] = "_baoji";
        FormulaResultItem[FormulaResultItem["_zhiliao"] = 4] = "_zhiliao";
        return FormulaResultItem;
      }({}));
      var EleType = exports('EleType', /*#__PURE__*/function (EleType) {
        EleType[EleType["None"] = 0] = "None";
        EleType[EleType["Wuli"] = 1] = "Wuli";
        EleType[EleType["Huoyan"] = 2] = "Huoyan";
        EleType[EleType["Binghan"] = 3] = "Binghan";
        EleType[EleType["Shandian"] = 4] = "Shandian";
        EleType[EleType["Shensheng"] = 5] = "Shensheng";
        EleType[EleType["Dusu"] = 6] = "Dusu";
        EleType[EleType["Anyin"] = 7] = "Anyin";
        EleType[EleType["All"] = 99] = "All";
        return EleType;
      }({}));

      /**
       * 排行榜属性类型(数组从0开始)
       */
      var PlayModelType = exports('PlayModelType', /*#__PURE__*/function (PlayModelType) {
        PlayModelType[PlayModelType["toukui"] = 1] = "toukui";
        PlayModelType[PlayModelType["yifu"] = 2] = "yifu";
        PlayModelType[PlayModelType["zhuwuqi"] = 3] = "zhuwuqi";
        PlayModelType[PlayModelType["fuwuqi"] = 4] = "fuwuqi";
        PlayModelType[PlayModelType["hujian"] = 5] = "hujian";
        PlayModelType[PlayModelType["kuzi"] = 6] = "kuzi";
        PlayModelType[PlayModelType["xie"] = 7] = "xie";
        PlayModelType[PlayModelType["shouzhuo"] = 8] = "shouzhuo";
        PlayModelType[PlayModelType["shiping"] = 9] = "shiping";
        PlayModelType[PlayModelType["jiezhi"] = 10] = "jiezhi";
        return PlayModelType;
      }({}));
      //不稀释属性
      var MLT_ATTR_ID1 = exports('MLT_ATTR_ID1', {
        10039: true,
        10040: true,
        10041: true,
        10042: true,
        10044: true,
        10046: true,
        10047: true,
        10048: true,
        10049: true,
        10050: true,
        10051: true,
        10052: true,
        10053: true
      });
      //减伤式属性
      var MLT_ATTR_ID2 = exports('MLT_ATTR_ID2', {
        10005: true,
        //暴击
        10008: true,
        //减伤
        10015: true,
        //全元素减伤
        10043: true,
        //技能减伤
        10045: true,
        //全元素减伤2
        10056: true //竞技抵御
      });
      // //需要反转的属性
      // export const MLT_ATTR_ID3 = {
      //     10043: true,//技能减伤
      //     10045: true, //全元素减伤2
      // }
      //伤害相关属性
      var DMG_ATTR_ID = exports('DMG_ATTR_ID', {
        1: true,
        2: true,
        3: true,
        5: true,
        1001: true,
        //攻击
        1002: true,
        //防御
        1003: true,
        //生命
        1005: true,
        //能量

        2001: true,
        //攻击
        2002: true,
        //防御
        2003: true,
        //生命
        2005: true,
        //能量

        10001: true,
        //移速
        10002: true,
        //攻速
        // 10003: true, //暴击
        10004: true,
        //暴伤
        10005: true,
        //暴击
        10006: true,
        //闪避
        10007: true,
        //增伤
        10008: true,
        //减伤
        10009: true,
        //生命回复
        10011: true,
        //能量回复
        10012: true,
        //生命球回复

        10013: true,
        //易伤
        10032: 1,
        //物理易伤
        10033: 2,
        //火焰易伤
        10034: 3,
        //冰寒易伤
        10035: 4,
        //闪电易伤
        10036: 5,
        //神圣易伤
        10037: 6,
        //毒素易伤
        10038: 7,
        //暗影易伤

        10014: true,
        //全元素增害
        10015: true,
        //全元素减伤
        10016: 1,
        //物理增伤
        10017: 2,
        //火焰增伤
        10018: 3,
        //冰寒增伤
        10019: 4,
        //闪电增伤
        10020: 5,
        //神圣增伤
        10021: 6,
        //毒素增伤
        10022: 7,
        //暗影增伤

        10023: true,
        //全怪物伤害
        10024: 2,
        //对精英伤害
        10025: 9,
        //对首领伤害
        10026: 1,
        //对小怪伤害

        10027: 1,
        //基础技能伤害
        10028: 2,
        //法术技能伤害
        10029: 3,
        //主宰技能伤害
        10030: 4,
        //驾驭技能伤害
        10031: 5,
        //终极技能伤害

        10039: true,
        10040: true,
        10041: true,
        10042: true,
        //增伤乘区3
        10043: true,
        //减伤乘区3

        10044: true,
        //全元素增伤2
        10045: true,
        //全元素减伤2
        10046: true,
        //物理2
        10047: true,
        //火焰2
        10048: true,
        //冰寒2
        10049: true,
        //闪电2
        10050: true,
        //神圣2
        10051: true,
        //毒素2
        10052: true,
        //暗影2

        10053: true,
        //独立易伤

        10055: true,
        //竞技压制
        10056: true,
        //竞技抵御

        20001: true //神力
      });
      //万分比对应属性
      var PERCENT_VIT_ID = exports('PERCENT_VIT_ID', {
        3004: [4, 3],
        3006: [6, 5]
      });
      //当前值属性
      var CURRENT_VIT_ID = exports('CURRENT_VIT_ID', {
        4: 4,
        2004: 4,
        6: 6,
        2006: 6
      });
      //元素增伤1
      var ATK_ELE_DMG1 = exports('ATK_ELE_DMG1', {
        1: 10016,
        2: 10017,
        3: 10018,
        4: 10019,
        5: 10020,
        6: 10021,
        7: 10022
      });
      //元素增伤2
      var ATK_ELE_DMG2 = exports('ATK_ELE_DMG2', {
        1: 10046,
        2: 10047,
        3: 10048,
        4: 10049,
        5: 10050,
        6: 10051,
        7: 10052
      });
      //元素易伤1
      var DEF_ELE_DMG1 = exports('DEF_ELE_DMG1', {
        1: 10032,
        2: 10033,
        3: 10034,
        4: 10035,
        5: 10036,
        6: 10037,
        7: 10038
      });
      //怪物类型对应增伤属性
      var MST_TYPE_ATTR = exports('MST_TYPE_ATTR', {
        2: 10024,
        3: 10026,
        4: 10026,
        9: 10025,
        1: 10026
      });
      //技能类型对应增伤属性
      var SKILL_TYPE_ATTR = exports('SKILL_TYPE_ATTR', {
        1: 10027,
        2: 10028,
        3: 10029,
        4: 10030,
        5: 10031
      });
      var BattlePropertyName = exports('BattlePropertyName', {
        gongji: 1,
        fangyu: 2,
        shengming: 3,
        dangqianshengming: 4,
        nengliang: 5,
        dangqiangnengliang: 6,
        lock_yisu: 7,
        //锁定移速
        lock_gongsu: 8,
        //锁定攻速

        abs_gongji: 1001,
        abs_fangyu: 1002,
        abs_shengming: 1003,
        abs_curShengming: 1004,
        abs_nengLiang: 1005,
        abs_dangQianNengLiang: 1006,
        wfb_gongji: 2001,
        wfb_fangyu: 2002,
        wfb_shengming: 2003,
        wfb_curShengming: 2004,
        wfb_nengliang1: 2005,
        wfb_nengliang2: 2006,
        wfb_danqianShengMing: 2007,
        wfb_danqianNengLiang: 2008,
        buff_gongji: 3001,
        buff_fangyu: 3002,
        buff_shengming: 3003,
        yisu: 10001,
        gongsu: 10002,
        baoji: 10003,
        baoshang: 10004,
        baojilv: 10005,
        sanbilv: 10006,
        zengshang: 10007,
        jianshang: 10008,
        //减伤乘区1(面板)
        meimiaoShengMinghuifu: 10009,
        jinengZengShang: 10010,
        meiMiaoNengLiangHuiFu: 10011,
        shengMingQiuHuiFu: 10012,
        yishang: 10013,
        eleAdd: 10014,
        //全元素增伤
        eleDel: 10015,
        //全元素减伤
        eleWuli: 10016,
        //物理
        eleHuoyan: 10017,
        //火焰
        eleBinghan: 10018,
        //冰寒
        eleShandian: 10019,
        //闪电
        eleShensheng: 10020,
        //神圣
        eleDusu: 10021,
        //毒素
        eleAnyin: 10022,
        //暗影

        mstAll: 10023,
        //全怪物增伤
        mstJingYing: 10024,
        //精英
        mstShouLing: 10025,
        //首领
        mstXiaoGuai: 10026,
        //小怪

        skillJiChu: 10027,
        //基础
        skillFaShu: 10028,
        //法术
        skillZhuZai: 10029,
        //主宰
        skillJiaYu: 10030,
        //驾驭
        skillZhongJi: 10031,
        //终级

        wfb_gongji2: 10039,
        //攻击乘区2
        wfb_fangyu2: 10040,
        //防御乘区2
        zengshang2: 10041,
        //伤害乘区2

        zengshang3: 10042,
        //增伤乘区3
        jianshang3: 10043,
        //减伤乘区3(技能)

        eleAdd2: 10044,
        //全元素增伤2
        eleDel2: 10045,
        //全元素减伤2
        eleWuli2: 10046,
        //物理2
        eleHuoyan2: 10047,
        //火焰2
        eleBinghan2: 10048,
        //冰寒2
        eleShandian2: 10049,
        //闪电2
        eleShensheng2: 10050,
        //神圣2
        eleDusu2: 10051,
        //毒素2
        eleAnyin2: 10052,
        //暗影2

        yishang2: 10053,
        //独立易伤

        jingjiYaZhi: 10055,
        //竞技压制
        jingjiDiYu: 10056,
        //竞技抵御
        HuiXueJiangDi: 10058,
        //回血效果降低
        shenli: 20001,
        //  神力（爬塔）

        ac2KeyObj: {},
        init: function init() {
          for (var key in BattlePropertyName) {
            var ac = BattlePropertyName[key];
            if (typeof ac !== "number") {
              continue;
            }
            BattlePropertyName.ac2KeyObj[ac] = key;
          }
        }
      });
      var BattleProprMgr = exports('BattleProprMgr', (_dec = ccclass("BattleProprMgr"), _dec(_class = (_class2 = /*#__PURE__*/function () {
        function BattleProprMgr() {
          this._leftPoint = void 0;
          this._hitType = FormulaResultItem._none;
          this._roleVONativeProps = [1, 2, 3, 4, 5, 6, 10001, 10002];
          this._lastAttrMap = new Map();
          /**
           * 战斗属性
           */
          this._lastAttr = void 0;
          /**
           * 战斗属性
           */
          this.lastAttProtodata = void 0;
          //改变值
          this._sysPropMapTemp = new Map();
          /**
           * 玩家初始vo
           */
          this._playerInitVo = null;
          this._maxShanBi = 0;
        }
        var _proto = BattleProprMgr.prototype;
        _proto.getSysPropMapTemp = function getSysPropMapTemp(name) {
          return this._sysPropMapTemp.get(name);
        };
        _proto.init = function init() {
          this._sysPropMapTemp.set(BattleUISysDef.DianFengUISys, new Map());
        };
        _proto.dispose = function dispose() {
          this._sysPropMapTemp.clear();
          this._lastAttrMap.clear();
          this._lastAttr = null;
        }

        /**
         * 设置默认值
         */;
        _proto.setDefaultAtti = function setDefaultAtti() {
          var _this = this;
          var ShuXing = DBRecord.fetchAll("ShuXing");
          Utils.forArr(ShuXing, function (row) {
            _this._lastAttrMap.set(row.id, 0);
          });
        }

        /**
         *
         * @param id 获取属性值
         * @returns
         */;
        _proto.featchValueById = function featchValueById(id, roleVO) {
          if (DMG_ATTR_ID[id]) {
            return roleVO.getRoleAttr(id);
          }
          var lib = PERCENT_VIT_ID[id];
          if (lib) {
            return roleVO.getTempAttr(lib[0]) / roleVO.getRoleAttr(lib[1]) * 10000;
          }
          switch (id) {
            case BattlePropertyName.dangqianshengming:
              return roleVO.curHP;
            case BattlePropertyName.dangqiangnengliang:
              return roleVO.curNengLiiang;
          }
          return roleVO.lastAttrMap.get(id) || 0;
        }

        /**
         * 修改数值值
         * @param id
         * @param changeVal
         * @param roleBaseVO
         * @param notifyUI
         */;
        _proto.changeValueById = function changeValueById(id, changeVal, roleBaseVO, notifyUI) {
          // let noExist = true;
          // console.log(`修改属性id:${id},changeVal:${changeVal} notifyUI:${notifyUI}`)

          if (this._roleVONativeProps.findIndex(function (value) {
            return value == id;
          }) != -1) {
            //本地
            this.checkChangeNativeProp(id, changeVal, roleBaseVO, notifyUI);
          } else {
            Utils.forArr(roleBaseVO.battleAttrList, function (item, index) {
              if (item.id == id) {
                item.value += changeVal;
                console.log("\u4FEE\u6539\u5C5E\u6027\u6218\u6597\u516C\u5F0Fid:" + id + ",changeVal:" + changeVal + " notifyUI:" + notifyUI);
                return true; //break
              }
            });
          }

          roleBaseVO.battleAttrList = roleBaseVO.battleAttrList;
        }

        /**
         * 检查修改本地属性
         * @param id
         * @param changeVal
         * @param roleBaseVO
         * @param notifyUI
         */;
        _proto.checkChangeNativeProp = function checkChangeNativeProp(id, changeVal, roleBaseVO, _notifyUI) {
          var notifyEnum = MonitorType.battle_player_none;
          var data = {};
          switch (id) {
            case BattlePropertyName.gongji:
              // roleBaseVO.updateCurAtk(changeVal);

              break;
            case BattlePropertyName.fangyu:
              // roleBaseVO.updateDef(changeVal);
              break;
            case BattlePropertyName.shengming:
              // roleBaseVO.updateHp(changeVal);
              break;
            case BattlePropertyName.dangqianshengming:
              var maxHp = roleBaseVO.getRoleAttr(BattlePropertyName.shengming);
              if (roleBaseVO.curHP + changeVal > maxHp) {
                roleBaseVO.updateCurHP(maxHp, true);
              } else {
                roleBaseVO.updateCurHP(changeVal);
              }
              notifyEnum = MonitorType.battle_player_update_hp;
              break;
            case BattlePropertyName.nengliang:
              // roleBaseVO.updateNengLiang(changeVal);
              break;
            case BattlePropertyName.dangqiangnengliang:
              var maxMp = roleBaseVO.getRoleAttr(BattlePropertyName.nengliang);
              if (roleBaseVO.curNengLiiang + changeVal > maxMp) {
                roleBaseVO.updateCurNengLiang(maxMp, true);
              } else {
                roleBaseVO.updateCurNengLiang(changeVal);
              }
              notifyEnum = MonitorType.battle_player_update_nengliang;
              break;
          }
          // console.log(`修改属性native完成id:${id},changeVal:${changeVal} notifyUI:${notifyUI}`)
          //通知
          if (notifyEnum !== MonitorType.battle_player_none) {
            App.monitorMgr.dispatchEvent(notifyEnum, data);
          }
        };
        _proto.execBattleFormula = function execBattleFormula(Atker, Defer, exInfo, bullet, buff) {
          if (bullet === void 0) {
            bullet = null;
          }
          if (buff === void 0) {
            buff = null;
          }
          var result = [0, FormulaResultItem._none];
          var DeferVO = Defer.roleVO;
          var AtkerVO = Atker.roleVO;
          if (exInfo.dmgType === GameBattle.BuffEffectType.Hurt2) {
            //真实伤害（直接数值）
            result[0] = exInfo.mltDmg1;
            return result;
          } else if (exInfo.dmgType === GameBattle.BuffEffectType.Hurt3) {
            //真实伤害（等级相关）
            result[0] = exInfo.mltDmg1;
            return result;
          } else if (exInfo.dmgType === GameBattle.BuffEffectType.Hurt4) {
            //真实伤害（总量百分比）
            var _DeferVO = Defer.roleVO;
            var _mDefAttr = Utils.covVitM(Utils.addVitM(Utils.copyObj(_DeferVO.getFullAttr()), Defer._buffBox.getConstantlyAttrBuff(Atker)), _DeferVO.getLockAttr());
            result[0] = Math.ceil(_mDefAttr[BattlePropertyName.shengming] * exInfo.mltDmg0 / 10000);
            return result;
          } else if (exInfo.dmgType === GameBattle.BuffEffectType.Hurt5) {
            //真实伤害（当前百分比）
            result[0] = Math.ceil(Defer.roleVO.curHP * exInfo.mltDmg0 / 10000);
            return result;
          }
          var mAtkAttr = UtilGame.cloneS(AtkerVO.getFullAttr());
          var mAtkLock = UtilGame.cloneS(AtkerVO.getLockAttr());
          var mDefAttr = UtilGame.cloneS(DeferVO.getFullAttr());
          //子弹owner被回收后重用成别的怪物，使用备份属性
          if (bullet && bullet.checkOwnerError()) {
            mAtkAttr = bullet.initOwnerFullAttr || {};
            mAtkLock = bullet.initOwnerLockAttr || {};
            //console.warn('>>>>>>>>>>>>>>>>>>>>>>>>> BULLET_OWNER_ERROR execBattleFormula , bullet use backUpAttr', bullet.bulletVO.bulletID);
          } else if (Defer.type === GameBattle.RoleType.Monster && buff && buff.checkSourceError()) {
            mAtkAttr = buff.initSourceFullAttr || {};
            mAtkLock = buff.initSourceLockAttr || {};
            //console.warn('>>>>>>>>>>>>>>>>>>>>>>>>> BULLET_OWNER_ERROR execBattleFormula ,buffuse backUpAttr', bullet.bulletVO.bulletID);
          }

          //临时buff加成
          Utils.addVitM(mAtkAttr, Atker._buffBox.getConstantlyAttrBuff(Defer));
          Utils.addVitM(mDefAttr, Defer._buffBox.getConstantlyAttrBuff(Atker));

          //物品图鉴加成
          // let vTuJianAttr = App.battleMgr.getTuJianAttr(DeferVO);
          // Utils.addVitA(mAtkAttr, vTuJianAttr);

          //标准化属性（放在加成最后）
          // Utils.stdVitM(mAtkAttr);
          // Utils.stdVitM(mDefAttr);
          Utils.covVitM(mAtkAttr, mAtkLock);
          Utils.covVitM(mDefAttr, DeferVO.getLockAttr());

          //闪避
          var global_83 = DBRecord.fetchId("ShuoMingQuanJu", 83);
          var evade = Math.min(mDefAttr[BattlePropertyName.sanbilv], global_83.value);
          if (randomRangeInt(0, 10001) < evade) {
            result[1] = FormulaResultItem._sanbi;
            return result;
          }

          //防御乘区
          // let def = mDefAttr[BattlePropertyName.abs_fangyu] * (10000 + (mDefAttr[BattlePropertyName.wfb_fangyu] || 0)) / 10000
          // let defMlt = 1 - (def * 0.7) / (2000 + def);

          //技能附加伤害(系数1)
          var exMlt1 = (exInfo.mltDmg0 || 10000) / 10000;

          //技能附加伤害(系数2)
          var exMlt0 = (exInfo.mltDmg1 || 10000) / 10000;

          //易伤乘区
          var eleAdd0 = mDefAttr[BattlePropertyName.yishang]; //全属性易伤1
          if (exInfo.eleType === EleType.All) {
            //各属性易伤1
            eleAdd0 += mDefAttr[DEF_ELE_DMG1[EleType.Huoyan]] + mDefAttr[DEF_ELE_DMG1[EleType.Binghan]] + mDefAttr[DEF_ELE_DMG1[EleType.Shandian]] + mDefAttr[DEF_ELE_DMG1[EleType.Shensheng]] + mDefAttr[DEF_ELE_DMG1[EleType.Dusu]] + mDefAttr[DEF_ELE_DMG1[EleType.Anyin]];
          } else {
            //单属性易伤1
            eleAdd0 += mDefAttr[DEF_ELE_DMG1[exInfo.eleType]] || 0;
          }
          var addMlt0 = (10000 + eleAdd0) / 10000;

          //易伤乘区2
          var addMlt4 = (10000 + mDefAttr[BattlePropertyName.yishang2]) / 10000;

          //增伤乘区1
          var global_31 = DBRecord.fetchId("ShuoMingQuanJu", 31);
          var addMlt1 = (10000 + mAtkAttr[BattlePropertyName.zengshang]) / 10000;
          //减伤乘区1
          var delMlt1 = (10000 - Math.min(mDefAttr[BattlePropertyName.jianshang], global_31.value)) / 10000;

          //增伤乘区2
          var addMlt2 = (10000 + mAtkAttr[BattlePropertyName.zengshang2]) / 10000;

          //增伤乘区3
          var addMlt3 = (10000 + mAtkAttr[BattlePropertyName.zengshang3]) / 10000;

          //减伤乘区3
          var delMlt3 = Math.max(0, 10000 - mDefAttr[BattlePropertyName.jianshang3]) / 10000;

          //元素乘区
          var eleMlt1 = 1; //属性乘区1
          var eleMlt2 = 1; //属性乘区2
          if (exInfo.eleType && exInfo.eleType !== BattlePropertyName.eleWuli) {
            //元素增伤1（加算）
            var eleAdd1 = mAtkAttr[BattlePropertyName.eleAdd]; //全属性增伤1
            if (exInfo.eleType === EleType.All) {
              //各属性增伤1
              eleAdd1 += mAtkAttr[ATK_ELE_DMG1[EleType.Huoyan]] + mAtkAttr[ATK_ELE_DMG1[EleType.Binghan]] + mAtkAttr[ATK_ELE_DMG1[EleType.Shandian]] + mAtkAttr[ATK_ELE_DMG1[EleType.Shensheng]] + mAtkAttr[ATK_ELE_DMG1[EleType.Dusu]] + mAtkAttr[ATK_ELE_DMG1[EleType.Anyin]];
            } else {
              //单属性增伤1
              eleAdd1 += mAtkAttr[ATK_ELE_DMG1[exInfo.eleType]];
            }
            var eleDel1 = mDefAttr[BattlePropertyName.eleDel]; //全属性减伤1
            var global_36 = DBRecord.fetchId("ShuoMingQuanJu", 36);
            eleMlt1 = Math.max(10000 + (eleAdd1 - eleDel1), 10000 - global_36.value) / 10000;

            //元素增伤2（乘算）
            var eleAdd2 = mAtkAttr[BattlePropertyName.eleAdd2]; //全属性增伤2
            if (exInfo.eleType === EleType.All) {
              //各属性增伤2
              eleAdd2 = (10000 + eleAdd2) * (10000 + mAtkAttr[ATK_ELE_DMG2[EleType.Huoyan]]) / 10000 * (10000 + mAtkAttr[ATK_ELE_DMG2[EleType.Binghan]]) / 10000 * (10000 + mAtkAttr[ATK_ELE_DMG2[EleType.Shandian]]) / 10000 * (10000 + mAtkAttr[ATK_ELE_DMG2[EleType.Shensheng]]) / 10000 * (10000 + mAtkAttr[ATK_ELE_DMG2[EleType.Dusu]]) / 10000 * (10000 + mAtkAttr[ATK_ELE_DMG2[EleType.Anyin]]) / 10000;
            } else {
              //单属性增伤2
              eleAdd2 = (10000 + eleAdd2) * (10000 + mAtkAttr[ATK_ELE_DMG2[exInfo.eleType]]) / 10000;
            }
            var eleDel2 = Math.min(9999, mDefAttr[BattlePropertyName.eleDel2]); //全属性减伤2
            eleMlt2 = eleAdd2 * (10000 - eleDel2) / (10000 * 10000);
          }

          //技能乘区
          var skillMlt1 = 1;
          var skillKind = App.skillMgr.getSkillKind(exInfo.skillId);
          if (SKILL_TYPE_ATTR[skillKind]) skillMlt1 = (10000 + mAtkAttr[SKILL_TYPE_ATTR[skillKind]]) / 10000;

          //技能乘区2
          var vSkillMlt = [0, 0];
          //精英乘区
          // let mstMlt = (10000 + AtkerVO.getExDmgAttr(MST_TYPE_ATTR[(DeferVO as MonsterVO).quality], BattlePropertyName.mstAll)) / 10000
          var mstMlt = 1;
          if (DeferVO instanceof MonsterVO) {
            mstMlt = (10000 + mAtkAttr[MST_TYPE_ATTR[DeferVO.quality]] + mAtkAttr[BattlePropertyName.mstAll]) / 10000;
            vSkillMlt = Atker._buffBox.getConstantlySkillBuff(exInfo.skillId, DeferVO.quality);
          }
          vSkillMlt[1] += 1;

          //暴击乘区
          var critMlt = 1;
          var crit = mAtkAttr[BattlePropertyName.baojilv]; //baojilv为实际使用属性
          if (randomRangeInt(0, 10001) <= crit) {
            critMlt = (10000 + mAtkAttr[BattlePropertyName.baoshang]) / 10000;
            result[1] = FormulaResultItem._baoji;
          }
          // let valA = DBRecord.fetchId("ShuoMingQuanJu", 25).value
          // let valB = DBRecord.fetchId("ShuoMingQuanJu", 26).value
          // let crit0 = mAtkAttr[BattlePropertyName.baoji]
          // let crit1 = mAtkAttr[BattlePropertyName.baojilv]
          // let playerLv = App.roleMgr.getRoleLv()
          // let cirt2 = (crit0 / (valA * (1 - Math.pow(valA, playerLv)) / (1 - valA) * valB)) * 10000 + crit1

          //结算
          var atk = mAtkAttr[BattlePropertyName.gongji]; //攻击
          // (mAtkAttr[BattlePropertyName.abs_gongji] * (10000 + (mAtkAttr[BattlePropertyName.wfb_gongji] || 0)) * (10000 + (mAtkAttr[BattlePropertyName.wfb_gongji2] || 0))) /
          // 100000000; //mAtkAttr[BattlePropertyName.gongji]; //攻击
          var def = mDefAttr[BattlePropertyName.abs_fangyu] * (10000 + (mDefAttr[BattlePropertyName.wfb_fangyu] || 0)) * (10000 + (mDefAttr[BattlePropertyName.wfb_fangyu2] || 0)) / 100000000;
          result[0] = 1 + atk * atk / (atk + 2 * def) * exMlt1 * exMlt0 * addMlt0 * addMlt1 * delMlt1 * addMlt2 * addMlt3 * addMlt4 * delMlt3 * eleMlt1 * eleMlt2 * mstMlt * skillMlt1 * critMlt * vSkillMlt[1] + vSkillMlt[0];

          // console.log(`结算伤害>>${Atker.type}>>${Defer.type}伤害:${Math.round(result[0])}, 攻击:${atk}, 防御:${def}
          // , 技能附加伤害0:${exMlt0}, 技能附加伤害1:${exMlt1}
          // , 易伤1:${addMlt0}, 易伤2:${addMlt4}
          // , 增伤1:${addMlt1}, 增伤2:${addMlt2},增伤3:${addMlt3}
          // , 减伤1:${delMlt1}, 减伤3:${delMlt3},
          // , 属性乘区1:${eleMlt1}, 属性乘区2:${eleMlt2}, 精英乘区:${mstMlt}, 技能乘区1:${skillMlt1}, 技能乘区2_1:${vSkillMlt[1]}, 技能乘区2_0:${vSkillMlt[0]}
          // , 暴击伤害:${critMlt}`);

          //竞技场修正
          // if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.JingJiChang) {
          //     //JJC战力压缩
          //     let pvpYaSuo = AtkerVO.tongGuan <= DeferVO.tongGuan ? AtkerVO.pvpYaSuo : DeferVO.pvpYaSuo;
          //     //JJC战力修正
          //     let powerRate = Math.max(1, AtkerVO.pvpPower / DeferVO.pvpPower);
          //     const global_142 = UtilGame.getGlobalVal(142);
          //     powerRate = Math.pow(powerRate, global_142);
          //     //JJC修正
          //     let jjcRate = ((10000 + mAtkAttr[BattlePropertyName.jingjiYaZhi]) * (10000 - mDefAttr[BattlePropertyName.jingjiDiYu])) / (10000 * 10000);
          //     //JJC增辐
          //     let jjcZengFu = App.trialManager.getJJCZenFu();
          //     result[0] = Math.pow(result[0], 10000 / pvpYaSuo) * powerRate * jjcRate * jjcZengFu;
          //     console.log(
          //         `JJC>>${Atker.type}>>${Defer.type}战力压缩:${pvpYaSuo}, 战力修正:${powerRate}, JJC修正:${jjcRate},JJC增辐:${jjcZengFu}, 竞技场修正后伤害${Math.round(result[0])}`
          //     );
          //     console.log(`Atker>${Atker.type}>~~>`, Atker.roleVO.getBuffGroup(), mAtkAttr);
          //     console.log(`Defer>${Defer.type}>~~>`, Defer.roleVO.getBuffGroup(), mDefAttr);
          // }

          result[0] = Math.floor(result[0]);

          // 爬塔模式下应用神力增幅
          // if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.PaTa && Atker.type == GameBattle.RoleType.Player && App.battleMgr.battleMainViewCtrl.battlePaTa) {
          //     result[0] = App.battleMgr.battleMainViewCtrl.battlePaTa.calculateShenliDamage(result[0], mAtkAttr[BattlePropertyName.shenli]);
          // }

          // if (DEBUG) {
          //     let gmDmg = App.mixMgr.getGmDmg();
          //     if (gmDmg != 1) {
          //         if (Defer.type == GameBattle.RoleType.Player) {
          //             result[0] = 1;
          //         } else {
          //             result[0] = Math.floor(result[0] * gmDmg);
          //         }
          //     }
          // }
          // result[0] = 1 + gongji * (1 - mianshanglv) * jiaceng1 * jiaceng2 * jiaceng3 * eleMulty * mstMulty * skillMulty;
          // if (isNaN(result[0]) || Math.abs(result[0]) == 1) {
          //     console.error('>>>>>>>>>>>>>>>>>>>>>>>>> execBattleFormula result[0] is NaN', result[0], exInfo, Atker, bullet);
          // }
          return result;
        }

        /**
         * 生命求恢复
         * @returns
         */;
        _proto.shengMingQiuZhiLiaoFormula = function shengMingQiuZhiLiaoFormula() {
          var player = App.battleMgr.roleCtrl.player;
          if (player == undefined || player.roleVO == undefined) {
            return 0;
          }
          var playerVo = player.roleVO;
          //  生命球治疗=Int[总生命*20%*(1+生命球恢复)]
          var _curHP = playerVo.curHP;
          var maxHP = playerVo.getRoleAttr(BattlePropertyName.shengming);
          var shengmingqiu = playerVo.getRoleAttr(BattlePropertyName.shengMingQiuHuiFu);
          // let arr = playerVo.battleAttrList;
          // arr.forEach((item) => {
          //     if (item.id == BattlePropertyName.shengMingQiuHuiFu) {
          //         shengmingqiu = item.value;
          //     }
          // });
          var huifuZhi = maxHP * 0.2 * (1 + shengmingqiu / 10000);
          return huifuZhi;
        }

        /**
         * 更新玩家战斗属性
         * @param data
         * @returns
         */
        // public updatePlayerAttributes(player: Player): void {

        //     this.updatePlayerBattleAttributes(this.lastAttProtodata, player);

        // }
        /**
         * 更新玩家战斗属性
         * @param data
         * @returns
         */;
        _proto.updatePlayerBattleAttributes = function updatePlayerBattleAttributes(data, player) {
          if (player && player.roleVO) {
            player.roleVO.udtInitAttr(data.attr.attr_list);
          }
        };
        _createClass(BattleProprMgr, [{
          key: "leftPoint",
          get: function get() {
            return this._leftPoint;
          },
          set: function set(dianshu) {
            this._leftPoint = dianshu;
          }
        }, {
          key: "lastAttrMap",
          get: function get() {
            return this._lastAttrMap;
          }
        }, {
          key: "lastAttr",
          get: function get() {
            return this._lastAttr;
          },
          set: function set(value) {
            this._lastAttr = value;
            //转成map
            this.setDefaultAtti();
            for (var _iterator = _createForOfIteratorHelperLoose(value), _step; !(_step = _iterator()).done;) {
              var element = _step.value;
              this._lastAttrMap.set(element.id, element.value);
            }
          }
        }]);
        return BattleProprMgr;
      }(), _class2._instance = void 0, _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleProps.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Component, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "6263flpdnpOULDPaP5dfAe7", "BattleProps", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattlePropTypeEnum = exports('BattlePropTypeEnum', /*#__PURE__*/function (BattlePropTypeEnum) {
        BattlePropTypeEnum[BattlePropTypeEnum["INT"] = 0] = "INT";
        BattlePropTypeEnum[BattlePropTypeEnum["PERCENT"] = 1] = "PERCENT";
        return BattlePropTypeEnum;
      }({}));

      // export type BattleShuxing = {  //属性id
      // id:number,
      // client:number
      // type:number,
      // limit:number,
      // name:number
      // des:number
      // default:number
      // coefficient:number
      // coefficient_fight:number
      // formula:number
      // }
      var BattleProps = exports('BattleProps', (_dec = ccclass("BattleProps"), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleProps, _Component);
        BattleProps.getInstance = function getInstance() {
          if (!this._instance) {
            this._instance = new BattleProps();
          }
          return this._instance;
        };
        function BattleProps() {
          var _this;
          _this = _Component.call(this) || this;
          // this._player = App.battleMgr.roleCtrl.player;
          _this._player = App.battleMgr.roleCtrl.player;
          _this._damage = {
            perId: 1,
            perTypeDesc: BattlePropTypeEnum.INT,
            value: 3,
            defalut: 3,
            maxLimit: Number.MAX_SAFE_INTEGER,
            isWork: true,
            cal: function cal(hp) {
              _this._damage.value += hp;
              return _this._damage.value;
            },
            add: function add(intVal) {
              //修改战斗中Player属性
              var player = App.battleMgr.roleCtrl.player;
              player.roleVO.updateCurAtk(intVal);
              return _this._damage.value += intVal;
            },
            ext: null
          };
          _this._phyDefence = {
            perId: 2,
            perTypeDesc: BattlePropTypeEnum.INT,
            value: 0,
            defalut: 0,
            maxLimit: Number.MAX_SAFE_INTEGER,
            isWork: true,
            cal: function cal(hp) {
              _this._phyDefence.value += hp;
              return _this._phyDefence.value;
            },
            add: function add(intVal) {
              _this._phyDefence.value += intVal;
              var player = App.battleMgr.roleCtrl.player;
              player.roleVO.updateDef(intVal);
              return _this._phyDefence.value;
            },
            ext: null
          };
          _this._maxHp = {
            perId: 3,
            perTypeDesc: BattlePropTypeEnum.INT,
            value: 396,
            defalut: 396,
            maxLimit: Number.MAX_SAFE_INTEGER,
            isWork: true,
            cal: function cal(hp) {
              _this._maxHp.value += hp;
              return _this._maxHp.value;
            },
            add: function add(intVal) {
              _this._maxHp.value += intVal;
              var player = App.battleMgr.roleCtrl.player;
              player.roleVO.updateHp(intVal);
              return _this._maxHp.value;
            },
            ext: null
          };
          _this._nowHp = {
            perId: 4,
            perTypeDesc: BattlePropTypeEnum.INT,
            value: 0,
            defalut: 0,
            maxLimit: Number.MAX_SAFE_INTEGER,
            isWork: true,
            cal: function cal(hp) {
              _this._nowHp.value += hp;
              return _this._nowHp.value;
            },
            add: function add(intVal) {
              _this._nowHp.value += intVal;
              return _this._nowHp.value;
            },
            ext: null
          };
          /****************************************************二级属性**************************** */
          //攻击百分比
          _this._attackPer = {
            perId: 5,
            perTypeDesc: BattlePropTypeEnum.PERCENT,
            value: 0,
            defalut: 0,
            maxLimit: 50000,
            isWork: true,
            cal: function cal(hp) {
              return _this._attackPer.value;
            },
            add: function add(intVal) {
              //百分比立马加到攻击数值
              _this._damage.add(Math.floor(intVal / 10000 * _this._attackPer.value));
              _this._attackPer.value += intVal / 10000;
              return _this._attackPer.value;
            },
            ext: null
          };
          _this._hpPer = {
            perId: 6,
            perTypeDesc: BattlePropTypeEnum.PERCENT,
            value: 0,
            defalut: 0,
            maxLimit: 50000,
            isWork: true,
            cal: function cal(hp) {
              _this._hpPer.value += hp / 10000;
              return _this._hpPer.value;
            },
            add: function add(intVal) {
              _this._hpPer.value += intVal / 10000;
              return _this._hpPer.value;
            },
            ext: null
          };
          /*****************************************特殊属性**************************** */
          /**
           * 攻速
           */
          _this._attackSpace = void 0;
          /**
           * 冷却缩减
           */
          _this.cooldownRed = void 0;
          /**
           * 暴击率
           */
          _this.critical = void 0;
          /**
           * 暴击伤害
           */
          _this.criticalHurt = void 0;
          /**
           * 闪避
           */
          _this.dodge = void 0;
          /**
           * 伤害加成
           */
          _this.increaseDamage = void 0;
          /**
           * 伤害减免
           */
          _this.damageRed = void 0;
          /**
           * 当前剩余能量
           */
          _this.currentEnergy = void 0;
          /**
           * 能量上限提高
           */
          _this.energyLimitIncreas = void 0;
          /**
           * 移速
           */
          _this.moveSpd = void 0;
          /**
           * 每秒生命恢复
           */
          _this.lifeRecoveryPerSec = void 0;
          /**
           * 生命球恢复
           */
          _this.lifeBallRecovery = void 0;
          /**
           * 每秒能量回复
           */
          _this.energyRecoveryPerSec = void 0;
          /**
           * 对精英伤害
           */
          _this.damage2Elites = void 0;
          /**
           * 精英伤害减免
           */
          _this.eliteDamageRed = void 0;
          /**
           * 范围伤害
           */
          _this.areaDamage = void 0;
          /**
           * 远程伤害
           */
          _this.rangedDamage = void 0;
          /**
           * 近战伤害
           */
          _this.meleeDamage = void 0;
          /**
           * 范围伤害减免
           */
          _this.areaDamageRed = void 0;
          /**
           * 远程伤害减免
           */
          _this.rangedDamageRed = void 0;
          /**
           * 近战伤害减免
           */
          _this.meleedamageRed = void 0;
          /**
           * 物理伤害
           */
          _this.physicalDamage = void 0;
          /**
           * 火焰伤害
           */
          _this.fireDamage = void 0;
          /**
           * 冰寒伤害
           */
          _this.coldDamage = void 0;
          /**
           * 闪电伤害
           */
          _this.lightningDamage = void 0;
          /**
           * 神圣伤害
           */
          _this.godDamage = void 0;
          /**
           * 毒素伤害
           */
          _this.toxinDamage = void 0;
          /**
           * 物理伤害减免
           */
          _this.physicalDamageRed = void 0;
          /**
           * 火焰伤害减免
           */
          _this.firedamageRed = void 0;
          /**
           * 冰寒伤害减免
           */
          _this.coldDamageRed = void 0;
          /**
           * 闪电伤害减免
           */
          _this.LightningDamageRed = void 0;
          /**
           * 神圣伤害减免
           */
          _this.HolyDamageRed = void 0;
          /**
           * 毒素伤害减免
           */
          _this.toxinDamageRed = void 0;
          /**
           * 全元素伤害
           */
          _this.allElementalDamage = void 0;
          /**
           * Buff伤害
           */
          _this.buffDamage = void 0;
          /**
           * Buff伤害
           */
          _this.buffDamageRed = void 0;
          /**
           * 结果伤害
           */
          _this.resultDamage = void 0;
          /**
           * 结果减伤
           */
          _this.resultDamageRed = void 0;
          /**
           * 对首领伤害
           */
          _this.damage2Boss = void 0;
          /**
           * 首领伤害减免
           */
          _this.damage2BossRed = void 0;
          /**
           * 对小怪伤害
           */
          _this.damage2Monsters = void 0;
          /**
           * 小怪伤害减免
           */
          _this.damage2MonstersRed = void 0;
          /**
           * 基础技能伤害
           */
          _this.basicSkillDamage = void 0;
          /**
           * 法术技能伤害
           */
          _this.spellSkillDamage = void 0;
          /**
           * 主宰技能伤害
           */
          _this.dominationSkillDamage = void 0;
          /**
           * 驾驭技能伤害
           */
          _this.controlSkillDamage = void 0;
          /**
           * 终极技能伤害
           */
          _this.ultimateSkillDamage = void 0;
          return _this;
        }
        return BattleProps;
      }(Component), _class2._instance = void 0, _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattlePropsSec.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleProps.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, BattleProps;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      BattleProps = module.BattleProps;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "69be5ALkm5Fw5K6bHcwJWY2", "BattlePropsSec", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattlePropsSec = exports('BattlePropsSec', (_dec = ccclass("BattlePropsSec"), _dec(_class = /*#__PURE__*/function (_BattleProps) {
        _inheritsLoose(BattlePropsSec, _BattleProps);
        function BattlePropsSec() {
          return _BattleProps.call(this) || this;
        }
        return BattlePropsSec;
      }(BattleProps)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattlePropsSpecial.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattlePropsSec.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, BattlePropsSec;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      BattlePropsSec = module.BattlePropsSec;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "2a458IRdmpKTI2jsl7JcITh", "BattlePropsSpecial", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattlePropsSpecial = exports('BattlePropsSpecial', (_dec = ccclass("BattlePropsSpecial"), _dec(_class = /*#__PURE__*/function (_BattlePropsSec) {
        _inheritsLoose(BattlePropsSpecial, _BattlePropsSec);
        function BattlePropsSpecial() {
          return _BattlePropsSec.call(this) || this;
        }
        return BattlePropsSpecial;
      }(BattlePropsSec)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleSettingView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './MonitorType.ts', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './Item_prop.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Node, App, MonitorType, UIBase, ModuleContext, ModuleDef, Item_prop;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      Item_prop = module.Item_prop;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "4fb30aqTFpK04g87U6TgHOC", "BattleSettingView", undefined);
      var ccclass = _decorator.ccclass;
      var BattleSettingView = exports('BattleSettingView', (_dec = ccclass("BattleSettingView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(BattleSettingView, _UIBase);
        function BattleSettingView() {
          var _this;
          _this = _UIBase.call(this, BattleSettingView.custom) || this;
          _this.layoutObj = null;
          _this._isProcessing = false;
          _this._onHideCallback = null;
          return _this;
        }
        var _proto = BattleSettingView.prototype;
        _proto.onCreated = function onCreated(data) {
          var _this$layoutObj$imgBa;
          _UIBase.prototype.onCreated.call(this);
          if (data && data.cb) {
            this._onHideCallback = data.cb;
          }
          this.layoutObj = this.layout;
          this.initUi();
          this.initItemScroll(data.msg);
          (_this$layoutObj$imgBa = this.layoutObj.imgBack) == null || (_this$layoutObj$imgBa = _this$layoutObj$imgBa.node) == null || _this$layoutObj$imgBa.on(Node.EventType.TOUCH_END, this.onClickBackground, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResReTry, this.onResReTry, this);
          // App.monitorMgr.addEventListener(MonitorType.CMD_ResEnterDungeon, this.onEnterDungeon, this);
        };

        _proto.onDispose = function onDispose() {
          var _this$layoutObj$imgBa2;
          _UIBase.prototype.onDispose.call(this);
          (_this$layoutObj$imgBa2 = this.layoutObj.imgBack) == null || (_this$layoutObj$imgBa2 = _this$layoutObj$imgBa2.node) == null || _this$layoutObj$imgBa2.off(Node.EventType.TOUCH_END, this.onClickBackground, this);
          App.monitorMgr.removeEventListener(MonitorType.CMD_ResReTry, this.onResReTry, this);
          // App.monitorMgr.removeEventListener(MonitorType.CMD_ResEnterDungeon, this.onEnterDungeon, this);
          App.monitorMgr.offTarget(this);
        };
        _proto.initUi = function initUi() {
          this.layoutObj.titleLab.string = "暂停";
        };
        _proto.initItemScroll = function initItemScroll(data) {
          this.layoutObj.itemScroll.content.removeAllChildren();
          this.layoutObj.itemScroll.onItemRender = this.onItemRender.bind(this);
          // this.layoutObj.itemScroll.onItemClick = this.onItemClick.bind(this);

          var itemList = data.items;
          this.layoutObj.itemScroll.array = itemList;
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.itemScroll.array[index];
          var cellComp = item.getComponent(Item_prop);
          cellComp.onItemRender(data);
        }

        /**
         * 背景点击关闭页面
         */;
        _proto.onClickBackground = function onClickBackground() {
          this.closeSelf();
        }

        /**
         * 点击继续按钮
         */;
        _proto.onClickContinue = function onClickContinue() {
          this.closeSelf();
        }

        /**
         * 点击退出按钮
         */;
        _proto.onClickExitBattle = function onClickExitBattle() {
          this.exitBattleToMain();
        }

        /**
         * 点击重战按钮
         */;
        _proto.onClickRestartBattle = function onClickRestartBattle() {
          App.dungeonBattleMgr.reqReTry();
        };
        _proto.onResReTry = function onResReTry(msg) {
          if (msg && msg.code !== 200) {
            return;
          }
          this.restartBattle();
        };
        _proto.exitBattleToMain = /*#__PURE__*/function () {
          var _exitBattleToMain = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!this._isProcessing) {
                    _context.next = 2;
                    break;
                  }
                  return _context.abrupt("return");
                case 2:
                  this._isProcessing = true;
                  this.closeSelf(false);
                  try {
                    App.dungeonBattleMgr.reqBattleSettle(App.dungeonBattleMgr.dungeonId, App.dungeonBattleMgr.battleResult);
                  } catch (error) {
                    console.error("退出战斗失败:", error);
                  } finally {
                    this._isProcessing = false;
                  }
                case 5:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function exitBattleToMain() {
            return _exitBattleToMain.apply(this, arguments);
          }
          return exitBattleToMain;
        }();
        _proto.restartBattle = /*#__PURE__*/function () {
          var _restartBattle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
            var currentGuanQiaId;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  if (!this._isProcessing) {
                    _context2.next = 2;
                    break;
                  }
                  return _context2.abrupt("return");
                case 2:
                  currentGuanQiaId = App.battleMgr.challengeGuanQiaId;
                  if (!(!currentGuanQiaId || currentGuanQiaId <= 0)) {
                    _context2.next = 7;
                    break;
                  }
                  console.warn("当前没有有效的关卡ID，无法重新进入战斗");
                  this.closeSelf();
                  return _context2.abrupt("return");
                case 7:
                  this._isProcessing = true;
                  this.closeSelf(false);
                  _context2.prev = 9;
                  _context2.next = 12;
                  return App.battleMgr.onExit(0, function () {}, false);
                case 12:
                  _context2.next = 14;
                  return new Promise(function (resolve) {
                    return setTimeout(resolve, 1000);
                  });
                case 14:
                  // 4. 重新请求进入副本
                  App.dungeonBattleMgr.ReqEnterDungeon(currentGuanQiaId);
                  console.log("\u91CD\u65B0\u8FDB\u5165\u5173\u5361: " + currentGuanQiaId);
                  _context2.next = 22;
                  break;
                case 18:
                  _context2.prev = 18;
                  _context2.t0 = _context2["catch"](9);
                  console.error("重新进入战斗失败:", _context2.t0);
                  // 失败时返回主城
                  App.monitorMgr.dispatchEvent(MonitorType.battle_flow_back_home);
                case 22:
                  _context2.prev = 22;
                  this._isProcessing = false;
                  return _context2.finish(22);
                case 25:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this, [[9, 18, 22, 25]]);
          }));
          function restartBattle() {
            return _restartBattle.apply(this, arguments);
          }
          return restartBattle;
        }();
        _proto.closeSelf = function closeSelf(resumeBattle) {
          if (resumeBattle === void 0) {
            resumeBattle = true;
          }
          if (this._onHideCallback) {
            if (resumeBattle) {
              this._onHideCallback();
            }
            this._onHideCallback = null;
          }
          this.onClose();
        };
        return BattleSettingView;
      }(UIBase), _class2.custom = {
        prefab: "prefabs/ui/BattleSettingView",
        binding: (_binding = {}, _binding["btnBackBat"] = {
          method: "onClickExitBattle"
        }, _binding["btnRest"] = {
          method: "onClickRestartBattle"
        }, _binding["btnContinue"] = {
          method: "onClickContinue"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(BattleSettingView, ModuleDef.GAME_BATTLE_B);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleSkillProps.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "9e249GhF35DjLdsvFvZ7m+g", "BattleSkillProps", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleSkillProps = exports('BattleSkillProps', (_dec = ccclass("BattleSkillProps"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleSkillProps, _Component);
        function BattleSkillProps() {
          return _Component.call(this) || this;
        }
        var _proto = BattleSkillProps.prototype;
        _proto.start = function start() {};
        _proto.update = function update(deltaTime) {};
        return BattleSkillProps;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleSoldierHeadItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './TeamMgr.ts', './App.ts', './ModuleDef.ts', './MonitorType.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Node, Label, Color, Component, TeamMgr, App, ModuleDef, MonitorType, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      Color = module.Color;
      Component = module.Component;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
      cclegacy._RF.push({}, "5b632qHsNtB5IJbp/Mwsejc", "BattleSoldierHeadItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleSoldierHeadItem = exports('BattleSoldierHeadItem', (_dec = ccclass("BattleSoldierHeadItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Label
      }), _dec7 = property({
        type: Node
      }), _dec8 = property({
        type: Sprite
      }), _dec9 = property({
        type: Sprite
      }), _dec10 = property({
        type: Label
      }), _dec11 = property({
        type: Node
      }), _dec12 = property({
        type: Sprite
      }), _dec13 = property({
        type: Node
      }), _dec14 = property({
        type: Label
      }), _dec15 = property({
        type: Label
      }), _dec16 = property({
        type: Node
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleSoldierHeadItem, _Component);
        function BattleSoldierHeadItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 士兵头像 */
          _initializerDefineProperty(_this, "headIcon", _descriptor, _assertThisInitialized(_this));
          /** 士兵品质背景 */
          _initializerDefineProperty(_this, "headBg", _descriptor2, _assertThisInitialized(_this));
          /** 阶级节点 */
          _initializerDefineProperty(_this, "stageNode", _descriptor3, _assertThisInitialized(_this));
          /** 士兵阶级 */
          _initializerDefineProperty(_this, "stageLabel", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "levelLabel", _descriptor5, _assertThisInitialized(_this));
          /** 上限节点node */
          _initializerDefineProperty(_this, "maxNode", _descriptor6, _assertThisInitialized(_this));
          /** 士兵上限显是状态icon */
          _initializerDefineProperty(_this, "iconSp", _descriptor7, _assertThisInitialized(_this));
          /** 士兵上限锁定状态icon */
          _initializerDefineProperty(_this, "lockSp", _descriptor8, _assertThisInitialized(_this));
          /** 士兵上限显示文本 */
          _initializerDefineProperty(_this, "limitLabel", _descriptor9, _assertThisInitialized(_this));
          /** 可升阶、激活遮罩节点 */
          _initializerDefineProperty(_this, "mask", _descriptor10, _assertThisInitialized(_this));
          /** 遮罩Sprite组件（用于扇形填充） */
          _initializerDefineProperty(_this, "maskSprite", _descriptor11, _assertThisInitialized(_this));
          /** 可升阶、激活节点 */
          _initializerDefineProperty(_this, "canLvNode", _descriptor12, _assertThisInitialized(_this));
          /** 可升阶、激活文本 */
          _initializerDefineProperty(_this, "canLab", _descriptor13, _assertThisInitialized(_this));
          /** 升阶、激活消耗文本 */
          _initializerDefineProperty(_this, "needLab", _descriptor14, _assertThisInitialized(_this));
          /** 选择框 */
          _initializerDefineProperty(_this, "selNode", _descriptor15, _assertThisInitialized(_this));
          // 私有变量
          _this._soldierType = 0;
          // 当前士兵类型
          _this._recruitCD = 0;
          // 招募CD（秒）
          _this._currentCD = 0;
          // 当前倒计时
          _this._currentCount = 0;
          // 当前数量
          _this._maxCount = 0;
          // 最大数量
          _this._soldierInfo = null;
          // 当前士兵信息
          _this._soldierPos = 0;
          // 士兵在编队中的位置
          _this._canUpgrade = false;
          // 是否可以升阶
          _this._itemType = 0;
          return _this;
        }
        var _proto = BattleSoldierHeadItem.prototype;
        // 列表类型 1右边，2左边
        _proto.onLoad = function onLoad() {
          // 注册点击事件
          this.node.on(Node.EventType.TOUCH_END, this.onItemClick, this);
          // 监听士气更新事件
          App.monitorMgr.addEventListener(MonitorType.battle_monster_dead_update_morale, this._onUpdateMorale, this);

          // 获取遮罩的Sprite组件
          if (this.maskSprite) {
            // 设置为扇形填充模式
            this.maskSprite.type = Sprite.Type.FILLED;
            this.maskSprite.fillType = Sprite.FillType.RADIAL;
            this.maskSprite.fillCenter.set(0.5, 0.5); // 中心点
            this.maskSprite.fillStart = 0.25; // 从顶部开始（12点方向）
            this.maskSprite.fillRange = 0; // 初始填充范围为0
          }
        };

        _proto.onDestroy = function onDestroy() {
          // 移除点击事件
          this.node.off(Node.EventType.TOUCH_END, this.onItemClick, this);
          // 移除士气更新监听
          App.monitorMgr.removeEventListener(MonitorType.battle_monster_dead_update_morale, this._onUpdateMorale, this);
        }

        /**
         * 士气更新事件处理
         */;
        _proto._onUpdateMorale = function _onUpdateMorale(morale) {
          // 士气更新后，重新检查是否可以升阶
          if (this._soldierInfo && this._itemType === 2) {
            this.updateUpgradeStatus(morale);
          }
        }

        /**
         *
         * @param data 士兵Unit数据
         * @param type 界面显示的列表；1右边，2左边（左边可进阶、激活）
         * @param battleData 战斗内士兵数据（等级、阶级、激活状态）
         */;
        _proto.show = function show(data, type, battleData) {
          // 如果没有数据或没有id，说明这个位置是空的
          if (!data || !data.id) {
            this.showEmpty();
            if (!data) {
              this.lockSp.node.active = true;
            }
            return;
          }
          this._itemType = type;

          // 获取士兵配置信息
          var soldierInfo = TeamMgr.inst.getSoldierById(data.id);
          if (!soldierInfo) {
            this.showEmpty();
            return;
          }

          // 保存士兵信息和位置
          this._soldierInfo = soldierInfo;
          this._soldierPos = data.pos || 0;
          var soldierCfg = TeamMgr.inst.getSoldierIdCfg(soldierInfo.soldier_id);
          if (!soldierCfg) {
            this.showEmpty();
            return;
          }
          this.selNode.active = false;

          // 显示所有元素
          this.showAllElements();

          // 设置士兵头像
          if (this.headIcon) {
            UtilGame.loadSoldierHeadIcon(this.headIcon, soldierInfo.soldier_id);
          }

          // 使用战斗内数据或默认数据
          var currentStage = battleData ? battleData.stage : soldierInfo.stage;
          var currentLevel = battleData ? battleData.level : soldierInfo.level;
          var isActivated = battleData ? battleData.activated : true;

          // 设置士兵阶级
          if (this.stageLabel) {
            this.stageLabel.string = currentStage + "\u9636";
          }
          this.levelLabel.string = currentLevel + "\u7EA7";

          // 获取士兵战斗相关数据 [cd, membernum, population]
          var _TeamMgr$inst$getSold = TeamMgr.inst.getSoldierBattle(soldierInfo.soldier_id),
            _cd = _TeamMgr$inst$getSold[0],
            membernum = _TeamMgr$inst$getSold[1],
            population = _TeamMgr$inst$getSold[2];

          // 设置人口上限显示
          if (this.limitLabel) {
            this.limitLabel.string = membernum + "/" + population;
          }
          if (this.lockSp) {
            this.lockSp.node.active = false;
          }

          // 如果是左边列表（type === 2），显示可升阶/激活相关信息
          if (type === 2) {
            this.maxNode.active = false;
            this.levelLabel.node.active = true;
            this.showUpgradeInfo(soldierInfo, isActivated, currentStage);
            this._onUpdateMorale(App.dungeonBattleMgr.morale);
          } else {
            // 右边列表显示出兵数量和倒计时
            this.mask.active = false;
            this.canLvNode.active = false;
            this.levelLabel.node.active = false;
            this.stageNode.active = true;
            this.maxNode.active = true;
            // 显示右边列表的招募倒计时
            this.showRecruitCD(soldierInfo.soldier_id);
          }
        }

        /**
         * 显示空位置（只显示背景）
         */;
        _proto.showEmpty = function showEmpty() {
          // 显示背景
          if (this.headBg) {
            this.headBg.node.active = true;
          }

          // 隐藏其他所有元素
          if (this.headIcon) {
            this.headIcon.node.active = false;
          }
          if (this.stageNode) {
            this.stageNode.active = false;
          }
          if (this.maxNode) {
            this.maxNode.active = false;
          }
          if (this.lockSp) {
            this.lockSp.node.active = false; // 显示锁定图标
          }

          if (this.mask) {
            this.mask.active = false;
          }
          if (this.canLvNode) {
            this.canLvNode.active = false;
          }
          this.levelLabel.node.active = false;
          this.selNode.active = false;
          this.maskSprite.node.active = false;
        }

        /**
         * 显示所有元素
         */;
        _proto.showAllElements = function showAllElements() {
          if (this.headBg) {
            this.headBg.node.active = true;
          }
          if (this.headIcon) {
            this.headIcon.node.active = true;
          }
          if (this.stageNode) {
            this.stageNode.active = true;
          }
          if (this.maxNode) {
            this.maxNode.active = true;
          }
        }

        /**
         * 显示升阶/激活信息（左边列表使用）
         * @param soldierInfo 士兵信息
         * @param isActivated 是否已激活
         * @param currentStage 当前阶级
         */;
        _proto.showUpgradeInfo = function showUpgradeInfo(soldierInfo, isActivated, currentStage) {
          this.levelLabel.node.active = true;
          this.maxNode.active = false;

          // 获取对应位置的编队士兵阶级上限
          var soldierUnit = TeamMgr.inst.getPosIUnit(this._soldierPos, 2); // 2 = 士兵编队
          var maxStage = 0; // 默认最高阶级为0（未激活）
          if (soldierUnit) {
            var formationSoldierInfo = TeamMgr.inst.getSoldierById(soldierUnit.id);
            if (formationSoldierInfo) {
              maxStage = formationSoldierInfo.stage;
            }
          }

          // 如果未激活（stage=0），显示激活信息
          if (!isActivated || currentStage === 0) {
            // 激活到1阶，获取1阶的配置
            var targetStage = 1;
            var stageCfg = TeamMgr.inst.getSoldierStageCfg(soldierInfo.soldier_id, targetStage);
            if (stageCfg) {
              var currentMorale = this.getCurrentMorale();
              var requiredMorale = stageCfg.cost_shiqi || 0;
              var hasEnoughMorale = currentMorale >= requiredMorale;
              // 检查激活阶级是否超过编队士兵阶级
              var canActivate = hasEnoughMorale && targetStage <= maxStage;

              // 设置可升级状态
              this._canUpgrade = canActivate;

              // 总是显示遮罩和激活信息
              if (this.mask) {
                this.mask.active = true;
              }
              if (this.canLvNode) {
                this.canLvNode.active = true;
              }
              if (this.canLab) {
                this.canLab.string = "可激活";
                // 士气足够且不超过编队士兵阶级显示绿色，否则显示红色
                this.canLab.color = canActivate ? new Color(0, 255, 0, 255) : new Color(255, 0, 0, 255);
              }
              if (this.needLab) {
                this.needLab.string = "" + requiredMorale;
              }

              // 只有可激活时才显示选中框
              this.selNode.active = canActivate;
            }
            return;
          }

          // 已激活，检查是否可以升阶
          var nextStage = currentStage + 1;
          var nextStageCfg = TeamMgr.inst.getSoldierStageCfg(soldierInfo.soldier_id, nextStage);

          // 检查升阶后是否超过编队士兵阶级
          if (nextStage > maxStage) {
            // 已达到编队士兵阶级上限，不能继续升阶，隐藏遮罩和升阶信息
            this._canUpgrade = false;
            if (this.mask) {
              this.mask.active = false;
            }
            if (this.canLvNode) {
              this.canLvNode.active = false;
            }
            this.selNode.active = false;
            return;
          }
          if (nextStageCfg) {
            // 检查当前士气是否足够
            var _currentMorale = this.getCurrentMorale();
            var _requiredMorale = nextStageCfg.cost_shiqi || 0;
            var _hasEnoughMorale = _currentMorale >= _requiredMorale;

            // 设置可升级状态
            this._canUpgrade = _hasEnoughMorale;

            // 总是显示遮罩和升阶信息
            if (this.mask) {
              this.mask.active = true;
            }
            if (this.canLvNode) {
              this.canLvNode.active = true;
            }
            if (this.canLab) {
              this.canLab.string = "可升阶";
              // 士气足够显示绿色，不足显示红色
              this.canLab.color = _hasEnoughMorale ? new Color(0, 255, 0, 255) : new Color(255, 0, 0, 255);
            }
            if (this.needLab) {
              this.needLab.string = "" + _requiredMorale;
            }

            // 只有士气足够才显示选中框
            this.selNode.active = _hasEnoughMorale;
          } else {
            // 已满阶，隐藏遮罩和升阶信息
            this._canUpgrade = false;
            if (this.mask) {
              this.mask.active = false;
            }
            if (this.canLvNode) {
              this.canLvNode.active = false;
            }
            this.selNode.active = false;
          }
        }

        /**
         * 更新升阶状态（士气变化时调用）
         */;
        _proto.updateUpgradeStatus = function updateUpgradeStatus(_morale) {
          if (!this._soldierInfo) {
            return;
          }

          // 获取战斗内士兵数据
          var battleData = App.dungeonBattleMgr.getBattleSoldierData(this._soldierInfo.soldier_id);
          if (!battleData) {
            return;
          }

          // 获取对应位置的编队士兵阶级上限
          var soldierUnit = TeamMgr.inst.getPosIUnit(this._soldierPos, 2);
          var maxStage = 0;
          if (soldierUnit) {
            var formationSoldierInfo = TeamMgr.inst.getSoldierById(soldierUnit.id);
            if (formationSoldierInfo) {
              maxStage = formationSoldierInfo.stage;
            }
          }

          // 如果未激活（stage=0），更新激活状态
          if (!battleData.activated || battleData.stage === 0) {
            var targetStage = 1;
            var stageCfg = TeamMgr.inst.getSoldierStageCfg(this._soldierInfo.soldier_id, targetStage);
            if (stageCfg) {
              var _currentMorale2 = this.getCurrentMorale();
              var _requiredMorale2 = stageCfg.cost_shiqi || 0;
              var _hasEnoughMorale2 = _currentMorale2 >= _requiredMorale2;
              var canActivate = _hasEnoughMorale2 && targetStage <= maxStage;
              this._canUpgrade = canActivate;
              this.mask.active = true;
              this.canLvNode.active = true;
              this.canLab.string = "可激活";
              this.canLab.color = canActivate ? new Color(0, 255, 0, 255) : new Color(255, 0, 0, 255);
              this.selNode.active = canActivate;
            }
            return;
          }

          // 已激活，更新升阶状态
          var nextStage = battleData.stage + 1;

          // 检查是否超过编队士兵阶级上限
          if (nextStage > maxStage) {
            this._canUpgrade = false;
            this.mask.active = false;
            this.canLvNode.active = false;
            this.selNode.active = false;
            return;
          }
          var nextStageCfg = TeamMgr.inst.getSoldierStageCfg(this._soldierInfo.soldier_id, nextStage);
          if (!nextStageCfg) {
            // 已满阶
            this._canUpgrade = false;
            this.mask.active = false;
            this.canLvNode.active = false;
            this.selNode.active = false;
            return;
          }

          // 检查当前士气是否足够
          var currentMorale = this.getCurrentMorale();
          var requiredMorale = nextStageCfg.cost_shiqi || 0;
          var hasEnoughMorale = currentMorale >= requiredMorale;

          // 更新可升阶状态
          this._canUpgrade = hasEnoughMorale;

          // 更新UI显示
          this.mask.active = true;
          this.canLvNode.active = true;
          this.canLab.string = hasEnoughMorale ? "可升阶" : "";
          this.canLab.color = hasEnoughMorale ? new Color(0, 255, 0, 255) : new Color(255, 0, 0, 255);
          this.selNode.active = hasEnoughMorale;
        }

        /**
         * 获取当前战斗中的士气值
         */;
        _proto.getCurrentMorale = function getCurrentMorale() {
          if (App.dungeonBattleMgr) {
            return App.dungeonBattleMgr.currentMorale;
          }
          return 0;
        }

        /**
         * 显示招募倒计时（右边列表使用）
         */;
        _proto.showRecruitCD = function showRecruitCD(soldierType) {
          this._soldierType = soldierType;

          // 从 SoldierSpawnMgr 获取实时数据
          var soldierSpawnMgr = App.dungeonBattleMgr.soldierSpawnMgr;
          if (soldierSpawnMgr) {
            // 获取当前CD
            this._currentCD = soldierSpawnMgr.getSoldierCd(soldierType);
            // 获取当前数量
            this._currentCount = soldierSpawnMgr.getSoldierCount(soldierType);
            // 获取最大数量
            this._maxCount = soldierSpawnMgr.getSoldierMaxCount(soldierType);

            // 获取基础CD配置（用于重置）
            var _TeamMgr$inst$getSold2 = TeamMgr.inst.getSoldierBattle(soldierType),
              cd = _TeamMgr$inst$getSold2[0],
              _membernum = _TeamMgr$inst$getSold2[1],
              _population = _TeamMgr$inst$getSold2[2];
            this._recruitCD = cd;
          } else {
            // 降级方案：从配置获取
            var _TeamMgr$inst$getSold3 = TeamMgr.inst.getSoldierBattle(soldierType),
              _cd2 = _TeamMgr$inst$getSold3[0],
              _membernum2 = _TeamMgr$inst$getSold3[1],
              population = _TeamMgr$inst$getSold3[2];
            this._recruitCD = _cd2;
            this._maxCount = population;
            this._currentCount = this.getCurrentSoldierCount(soldierType);
          }

          // 更新显示
          this.updateRecruitDisplay();
        }

        /**
         * 获取当前士兵数量（降级方案，从战斗管理器获取）
         */;
        _proto.getCurrentSoldierCount = function getCurrentSoldierCount(soldierType) {
          // 优先从 SoldierSpawnMgr 获取
          var soldierSpawnMgr = App.dungeonBattleMgr.soldierSpawnMgr;
          if (soldierSpawnMgr) {
            return soldierSpawnMgr.getSoldierCount(soldierType);
          }

          // 降级方案：从 DungeonBattleMgr 获取
          if (App.dungeonBattleMgr) {
            var populationMap = App.dungeonBattleMgr.soldierPopulation;
            if (populationMap && populationMap.has(soldierType)) {
              return populationMap.get(soldierType) || 0;
            }
          }
          return 0;
        }

        /**
         * 更新招募显示
         */;
        _proto.updateRecruitDisplay = function updateRecruitDisplay() {
          if (this._itemType !== 1) {
            return;
          }
          // 更新数量显示
          if (this.limitLabel) {
            this.limitLabel.string = this._currentCount + "/" + this._maxCount;
          }

          // 如果未达到上限，显示倒计时
          if (this._currentCount < this._maxCount) {
            this.limitLabel.color = Color.WHITE;
            App.resMgr.loadImage(this.iconSp, ModuleDef.GAME_BATTLE_B, "/images/new_battleUI/zd_bingzhong00");
            if (this.maskSprite) {
              this.maskSprite.node.active = true;
              if (this.maskSprite) {
                // 计算倒计时进度（1到0，从满到空）
                var remainingRatio = this._currentCD / this._recruitCD; // 剩余时间比例（1到0）

                // 设置扇形填充范围（顺时针填充，从1到0表示从满圆到空）
                this.maskSprite.fillRange = remainingRatio;
              }
            }
          } else {
            // 已达到上限，隐藏倒计时
            if (this.maskSprite) {
              this.maskSprite.node.active = false;
            }
            this.limitLabel.color = Color.RED;
            App.resMgr.loadImage(this.iconSp, ModuleDef.GAME_BATTLE_B, "/images/new_battleUI/zd_bingzhong01");
          }
        }

        /**
         * 每帧更新（用于倒计时）
         */;
        _proto.update = function update(_dt) {
          if (App.battleMgr.pause) return;
          // 如果是右边列表（显示招募倒计时），从 SoldierSpawnMgr 获取实时数据
          if (this._itemType === 1 && this._soldierType > 0) {
            var soldierSpawnMgr = App.dungeonBattleMgr.soldierSpawnMgr;
            if (soldierSpawnMgr) {
              // 获取实时CD
              this._currentCD = soldierSpawnMgr.getSoldierCd(this._soldierType);
              // 获取实时数量
              var newCount = soldierSpawnMgr.getSoldierCount(this._soldierType);
              if (newCount !== this._currentCount) {
                this._currentCount = newCount;
              }
              // 获取实时最大数量（可能因升级而变化）
              var newMaxCount = soldierSpawnMgr.getSoldierMaxCount(this._soldierType);
              if (newMaxCount !== this._maxCount) {
                this._maxCount = newMaxCount;
              }
              this.updateRecruitDisplay();
            }
          }
        }

        /**
         * 设置当前倒计时（外部调用，用于同步倒计时）
         */;
        _proto.setCurrentCD = function setCurrentCD(cd) {
          this._currentCD = cd;
          this.updateRecruitDisplay();
        }

        /**
         * 更新士兵数量（外部调用）
         */;
        _proto.updateSoldierCount = function updateSoldierCount(count) {
          this._currentCount = count;
          this.updateRecruitDisplay();
        }

        /**
         * 点击事件处理
         */;
        _proto.onItemClick = function onItemClick() {
          if (this._itemType === 1) {
            App.dungeonBattleMgr.refreshSoldierWithOrder(this._soldierInfo.soldier_id, 2);
            return;
          }
          // 只有左边列表（type === 2）且可以升阶/激活时才响应点击
          if (!this._canUpgrade || !this._soldierInfo) {
            return;
          }

          // 获取战斗内士兵数据
          var battleData = App.dungeonBattleMgr.getBattleSoldierData(this._soldierInfo.soldier_id);
          if (!battleData) {
            return;
          }

          // 获取当前阶级配置（用于激活或升阶）
          var targetStage = battleData.activated ? battleData.stage + 1 : battleData.stage;

          // 获取对应位置的编队士兵阶级上限
          var soldierUnit = TeamMgr.inst.getPosIUnit(this._soldierPos, 2); // 2 = 士兵编队
          var maxStage = 0; // 默认最高阶级为0（未激活）
          if (soldierUnit) {
            var formationSoldierInfo = TeamMgr.inst.getSoldierById(soldierUnit.id);
            if (formationSoldierInfo) {
              maxStage = formationSoldierInfo.stage;
            }
          }

          // 检查士兵升阶是否超过编队士兵阶级
          if (targetStage > maxStage) {
            console.log("\u58EB\u5175\u5347\u9636\u5931\u8D25\uFF1A\u58EB\u5175\u76EE\u6807\u9636\u7EA7" + targetStage + "\u4E0D\u80FD\u8D85\u8FC7\u7F16\u961F\u58EB\u5175\u9636\u7EA7" + maxStage);
            return;
          }
          var stageCfg = TeamMgr.inst.getSoldierStageCfg(this._soldierInfo.soldier_id, targetStage);
          if (!stageCfg) {
            return;
          }

          // 再次检查士气是否足够
          var currentMorale = this.getCurrentMorale();
          var requiredMorale = stageCfg.cost_shiqi || 0;
          if (currentMorale < requiredMorale) {
            console.log("\u58EB\u6C14\u4E0D\u8DB3\uFF0C\u65E0\u6CD5" + (battleData.activated ? "升阶" : "激活") + ": \u5F53\u524D=" + currentMorale + ", \u9700\u8981=" + requiredMorale);
            return;
          }
          App.dungeonBattleMgr.sendBattleHeart();
          // 发送战斗内升阶请求
          App.dungeonBattleMgr.reqBattleUpStage(this._soldierInfo.soldier_id);
          console.log("\u8BF7\u6C42\u6218\u6597\u5185\u58EB\u5175" + (battleData.activated ? "升阶" : "激活") + ": soldier_id=" + this._soldierInfo.soldier_id + ", " + ("\u5F53\u524D\u9636\u7EA7=" + battleData.stage + ", \u76EE\u6807\u9636\u7EA7=" + targetStage + ", \u7F16\u961F\u58EB\u5175\u4E0A\u9650=" + maxStage + ", \u6D88\u8017\u58EB\u6C14=" + requiredMorale));
        }

        /**
         * 刷新显示（外部调用，用于升阶成功后更新UI）
         */;
        _proto.refresh = function refresh(data, type) {
          var battleData = data ? App.dungeonBattleMgr.getBattleSoldierData(data.id) : null;
          this.show(data, type, battleData);
        };
        return BattleSoldierHeadItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "headIcon", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "headBg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "stageNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "stageLabel", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "levelLabel", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "maxNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "iconSp", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "lockSp", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "limitLabel", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "mask", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "maskSprite", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "canLvNode", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "canLab", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "needLab", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "selNode", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleTipsItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './BattleUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, v3, UITransform, Component, App, BattleUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      v3 = module.v3;
      UITransform = module.UITransform;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "86a85AKp0BFrbN/e7sKCt+2", "BattleTipsItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleTipsItem = exports('BattleTipsItem', (_dec = ccclass("BattleTipsItem"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleTipsItem, _Component);
        function BattleTipsItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "img_icon", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "img_arrow", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = BattleTipsItem.prototype;
        _proto.start = function start() {};
        _proto.update = function update(deltaTime) {
          this.img_icon.active = false;
          this.img_arrow.active = false;
          var boss = App.battleMgr.roleCtrl.getBoss();
          if (!boss) return;
          var entranceNode = boss.node;
          if (!entranceNode) return;
          var endPos1 = entranceNode.worldPosition;
          var playerCamera = App.battleMgr.battleMainViewCtrl.playerCamera;
          var playerPos = playerCamera.node.worldPosition;
          var endPos = v3(endPos1.x, endPos1.y + boss.hitPos.y, endPos1.z);
          var halfHN = this.node.parent.getComponent(UITransform).height / 2;
          var halfW = 350; // ui.getComponent(UITransform).width / 2;
          var halfH = 600; //ui.getComponent(UITransform).height / 2;
          var reduceX = Math.abs(endPos.x - playerPos.x);
          var reduceY = Math.abs(endPos.y - playerPos.y);
          if (reduceX < halfW && reduceY < halfH) {
            return;
          }
          this.img_arrow.active = true;
          this.img_icon.active = true;
          // const halfW11 = this.node.parent.getComponent(UITransform).width / 2;
          // const halfH11 = this.node.parent.getComponent(UITransform).height / 2;
          var startPos = playerPos; // App.battleMgr.roleCtrl.player.node.worldPosition;
          var angle = BattleUtil.get2DAngleByPoint(startPos, endPos);

          // let lockPos_start = this.node.parent.getComponent(UITransform).convertToNodeSpaceAR(startPos);
          // let lockPos_end = this.node.parent.getComponent(UITransform).convertToNodeSpaceAR(endPos);

          this.node.angle = angle;
          this.img_icon.angle = -angle;
          // this.node.worldPosition = pos;
          this.node.setPosition(endPos.x - startPos.x, endPos.y - startPos.y);
          var halfW22 = 300;
          var halfH22 = 550;
          halfH22 = Math.min(halfH22, halfHN - 180);
          var x = this.node.position.x;
          var y = this.node.position.y;
          x = x < -halfW22 ? -halfW22 : x;
          x = x > halfW22 ? halfW22 : x;
          y = y < -halfH22 ? -halfH22 : y;
          y = y > halfH22 + 180 ? halfH22 + 180 : y;
          this.node.setPosition(x, y);
        };
        return BattleTipsItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "img_icon", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "img_arrow", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleUISkillItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './ModuleDef.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Sprite, Node, Label, Component, DBRecord, ModuleDef, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      Component = module.Component;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "432baMzRRZODJD9iWr7Bmpq", "BattleUISkillItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 战斗场景技能栏item
       */
      var BattleUISkillItem = exports('BattleUISkillItem', (_dec = ccclass("BattleUISkillItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleUISkillItem, _Component);
        function BattleUISkillItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "img_view", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cdPart", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "img_cd", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lab_cd", _descriptor4, _assertThisInitialized(_this));
          _this._fClick0 = void 0;
          _this._fClick1 = void 0;
          /** 技能数据对象 */
          _this._skillVO = void 0;
          return _this;
        }
        var _proto = BattleUISkillItem.prototype;
        _proto.start = function start() {
          var _this2 = this;
          this.node.on(Node.EventType.TOUCH_START, function () {
            if (_this2._fClick0) {
              _this2._fClick0();
            }
          });
          this.node.on(Node.EventType.TOUCH_END, function () {
            // this.use()
            if (_this2._fClick1) {
              _this2._fClick1();
            }
          });
          this.node.on(Node.EventType.TOUCH_CANCEL, function () {
            if (_this2._fClick1) {
              _this2._fClick1();
            }
          });
          // this.node.on(Node.EventType.TOUCH_START, () => {
          //     if (this._fClick0) {
          //         this._fClick0()
          //     }
          // })
          // this.node.on(Node.EventType.TOUCH_MOVE, () => { this.unschedule(this._onClick1) })
        };

        _proto.update = function update(deltaTime) {
          this._updateCDPart();
        }

        /**
         * 初始化
         */;
        _proto.init = function init(skill) {
          this.cdPart.active = false;
          this._skillVO = skill;
          var cfg = DBRecord.fetchId("Skill", skill.skillID);
          App.resMgr.loadImage(this.img_view, ModuleDef.GAME_SKILL, "/texture/" + cfg.icon);
        }

        /**
         * 使用技能
         */;
        _proto.use = function use() {
          this.cdPart.active = true;
          this._updateCDPart();
        }

        /**
         * 更新CD相关UI
         * @returns
         */;
        _proto._updateCDPart = function _updateCDPart() {
          if (!this._skillVO) return;
          if (!this.cdPart.active) {
            if (this._skillVO.CD !== this._skillVO.curCD) {
              this.cdPart.active = true;
            } else {
              return;
            }
          }
          var cur = this._skillVO.curCD;
          var max = this._skillVO.CD;
          var progress = max === 0 ? 0 : cur / max;
          this.lab_cd.string = cur.toFixed(1);
          this.img_cd.fillRange = progress;
          this.cdPart.active = cur !== 0;
        };
        _proto.setClick0 = function setClick0(_fClick0) {
          this._fClick0 = _fClick0;
        };
        _proto.setClick1 = function setClick1(_fClick1) {
          this._fClick1 = _fClick1;
        };
        _createClass(BattleUISkillItem, [{
          key: "skillVO",
          get: function get() {
            return this._skillVO;
          }
        }]);
        return BattleUISkillItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "img_view", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "cdPart", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "img_cd", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "lab_cd", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleUISysDef.ts", ['cc'], function (exports) {
  var cclegacy, _decorator;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "c8cfcZxGCJPPYtbVdYRoLOG", "BattleUISysDef", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleUISysDef = exports('BattleUISysDef', (_dec = ccclass("BattleUISysDef"), _dec(_class = (_class2 = function BattleUISysDef() {}, _class2.DianFengUISys = "DianFengUISys", _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleUIView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './MonitorType.ts', './BattleUISkillItem.ts', './UIUtil.ts', './DBRecord.ts', './UIMgr.ts', './ModuleDef.ts', './BattleDefine.ts', './SoundDef.ts', './SkillVO.ts', './GameConfig.ts', './App.ts', './BattleSoldierHeadItem.ts', './BattleSettingView.ts', './Layout_BattleSettingView.ts', './TeamMgr.ts', './ScrollList.ts', './Item_prop.ts', './BattleDebugNewView.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, Prefab, Button, Label, Sprite, Tween, instantiate, UITransform, tween, v3, Component, Utils, MonitorType, BattleUISkillItem, UIUtil, DBRecord, UIMgr, LayerType, ModuleDef, GameBattle, SoundDef, SkillVO, GameConfig, App, BattleSoldierHeadItem, BattleSettingView, Layout_BattleSettingView, TeamMgr, ScrollList, Item_prop, BattleDebugNewView;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Prefab = module.Prefab;
      Button = module.Button;
      Label = module.Label;
      Sprite = module.Sprite;
      Tween = module.Tween;
      instantiate = module.instantiate;
      UITransform = module.UITransform;
      tween = module.tween;
      v3 = module.v3;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      BattleUISkillItem = module.BattleUISkillItem;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      SkillVO = module.SkillVO;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleSoldierHeadItem = module.BattleSoldierHeadItem;
    }, function (module) {
      BattleSettingView = module.BattleSettingView;
    }, function (module) {
      Layout_BattleSettingView = module.Layout_BattleSettingView;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      BattleDebugNewView = module.BattleDebugNewView;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27;
      cclegacy._RF.push({}, "3543f2+J2tBT558Sup1e6tJ", "BattleUIView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BattleUIView = exports('BattleUIView', (_dec = ccclass("BattleUIView"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Node
      }), _dec6 = property({
        type: Node
      }), _dec7 = property({
        type: Prefab
      }), _dec8 = property({
        type: Node
      }), _dec9 = property({
        type: Button
      }), _dec10 = property({
        type: Label
      }), _dec11 = property({
        type: Label
      }), _dec12 = property({
        type: Label
      }), _dec13 = property({
        type: Button
      }), _dec14 = property({
        type: Node
      }), _dec15 = property({
        type: Label
      }), _dec16 = property({
        type: Node
      }), _dec17 = property([BattleSoldierHeadItem]), _dec18 = property({
        type: Node
      }), _dec19 = property([BattleSoldierHeadItem]), _dec20 = property({
        type: Label
      }), _dec21 = property({
        type: Button
      }), _dec22 = property({
        type: Button
      }), _dec23 = property({
        type: Node
      }), _dec24 = property({
        type: Sprite
      }), _dec25 = property({
        type: Label
      }), _dec26 = property({
        type: Label
      }), _dec27 = property({
        type: ScrollList
      }), _dec28 = property(BattleDebugNewView), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BattleUIView, _Component);
        function BattleUIView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "skillItemContainer", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "tempSkillItem", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "battleTipsItem", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "win", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "tip", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemTips", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bloodMooon", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBoxInfo", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbMorale", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbBoxInfo", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTime", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btn_setting", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nameNode", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nameLabel", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "leftNode", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "leftSoldierHeads", _descriptor16, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "rightNode", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "rightSoldierHeads", _descriptor18, _assertThisInitialized(_this));
          /** 军令值 */
          _initializerDefineProperty(_this, "mOValue", _descriptor19, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnLeftHide", _descriptor20, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnRightHide", _descriptor21, _assertThisInitialized(_this));
          /** 显示波数node */
          _initializerDefineProperty(_this, "waveLayer", _descriptor22, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "waveBg", _descriptor23, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "waveLabel", _descriptor24, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nextTimeLab", _descriptor25, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "rewardScroll", _descriptor26, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "debugView", _descriptor27, _assertThisInitialized(_this));
          // @property({ type: BattleSettingView })
          // public battleSettingView: BattleSettingView;
          _this._skillItemMap = new Map();
          _this._time_limit = 0;
          _this._dt = 0;
          _this._battleEnd = false;
          //战斗结束标志
          _this._leftHidden = false;
          //左侧面板是否隐藏
          _this._rightHidden = false;
          _this._time_limit_DB = 0;
          _this.fbCfg = null;
          /**危险血量计时*/
          _this._dtDangerousHp = -1;
          //等待结算倒计时
          _this._backTime = 0;
          _this._showVictorying = false;
          _this._drugCD = 0;
          _this._useTime = 0;
          _this._heros = [];
          _this._skillData = [];
          _this._settingPaused = false;
          // 波次倒计时计时器
          _this._waveCountdownTimer = 0;
          // 波次倒计时相关
          _this._waveCountdown = 0;
          _this._waveCallback = null;
          _this._drugDt = 0;
          return _this;
        }
        var _proto = BattleUIView.prototype;
        _proto.start = function start() {
          this._registerEvent();
          this._initTime();
          this._initBossTips();
          // App.roleMgr.reqPlayerInfo();

          this._updtView();
          if (this.debugView) {
            this.debugView.node.active = true;
          }
        };
        _proto._updtView = function _updtView() {
          var _this2 = this;
          this.updateLeftSoldier();
          this.initRewardScroll();
          this.mOValue.string = App.dungeonBattleMgr.militaryOrders.toString();
          setTimeout(function () {
            _this2.nameNode.active = false;
          }, 3000);
        };
        _proto.onEnable = function onEnable() {
          this.win.active = false;
          this._backTime = 0;
          this._showVictorying = false;
          this._battleEnd = false;
        };
        _proto.onDisable = function onDisable() {
          var parent = this.node.getChildByName("battleTips");
          parent.removeAllChildren();
          for (var i = this._skillData.length; i--;) {
            if (this._skillData[i]) {
              // this._skillData[i].destroy();
              this._skillData[i] = null;
            }
          }
          this._skillData = [];

          // 清理波次倒计时
          this._waveCountdown = 0;
          this._waveCallback = null;
          this._waveCountdownTimer = 0;
        };
        _proto.onDestroy = function onDestroy() {
          this._unregisterEvent();

          // 清理战斗后处理
          this._battleEnd = true;
          this._showVictorying = false;
          this._backTime = 0;
          this.unscheduleAllCallbacks();
          this.fbCfg = null;

          // 清理波次倒计时
          this._waveCountdown = 0;
          this._waveCallback = null;
          this._waveCountdownTimer = 0;
        };
        _proto.update = function update(dt) {
          this._updateTime(dt);
          this._updateWaveCountdown(dt);
        }
        /**
         * 初始化奖励滚动列表
         * @param _data 奖励数据
         */;
        _proto.initRewardScroll = function initRewardScroll(_data) {
          this.rewardScroll.content.removeAllChildren();
          this.rewardScroll.onItemRender = this.onItemRender.bind(this);
          // this.rewardScroll.onItemClick = this.onItemClick.bind(this);
        };

        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.rewardScroll.array[index];
          var cellComp = item.getComponent(Item_prop);
          cellComp.onItemRender(data);
        }

        /**
         * 更新波次倒计时
         */;
        _proto._updateWaveCountdown = function _updateWaveCountdown(dt) {
          if (this._waveCountdown <= 0) {
            return;
          }
          this._waveCountdownTimer += dt;

          // 每秒更新一次
          if (this._waveCountdownTimer >= 1.0) {
            this._waveCountdownTimer = 0;
            this._waveCountdown--;
            if (this._waveCountdown > 0) {
              // 更新显示
              if (this.nextTimeLab) {
                this.nextTimeLab.string = this._waveCountdown + "S";
              }
            } else {
              // 倒计时结束
              this.setSettingPaused(false);
              if (this.waveLayer) {
                this.waveLayer.active = false;
              }
              App.dungeonBattleMgr.waveStop = false;
              // 执行回调
              if (this._waveCallback) {
                var callback = this._waveCallback;
                this._waveCallback = null;
                callback();
              }
            }
          }
        }

        /**
         * 注册事件
         */;
        _proto._registerEvent = function _registerEvent() {
          App.monitorMgr.addEventListener(MonitorType.battle_player_use_skill, this._onEventBattlePlayerUseSkill, this);
          App.monitorMgr.addEventListener(MonitorType.battle_player_use_junling, this.updateMilitaryOrders, this);
          App.monitorMgr.addEventListener(MonitorType.battle_player_get_falling_item, this._onEventBattleGetFallingItem, this);
          App.monitorMgr.addEventListener(MonitorType.battle_monster_dead_update_morale, this._onEventBattleMonsterDeadUpdateMorale, this);

          // 监听士兵升阶成功事件
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBattleUpStage, this._onManagerToViewUpdate, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBattleHeart, this._onResBattleHeart, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBattleRewardInfo, this.onResBattleRewardInfo, this);
          App.monitorMgr.addEventListener(MonitorType.battle_monster_die, this._onEventMonsterDie, this);

          // 添加btn_setting点击事件，点击显示BattleSettingView
          if (this.btn_setting) {
            this.btn_setting.node.on("click", this._onBtnSettingClicked, this);
          }

          // 添加左右隐藏按钮点击事件
          if (this.btnLeftHide) {
            this.btnLeftHide.node.on("click", this._onBtnLeftHideClicked, this);
          }
          if (this.btnRightHide) {
            this.btnRightHide.node.on("click", this._onBtnRightHideClicked, this);
          }
          if (this.waveBg) {
            this.waveBg.node.on("click", this._onBtnWaveBgClicked, this);
          }
          this.tip.removeAllChildren();
        }

        /**
         * 注销事件
         */;
        _proto._unregisterEvent = function _unregisterEvent() {
          var _this$btn_setting, _this$btnLeftHide, _this$btnRightHide, _this$waveBg;
          // 移除btn_setting点击事件
          (_this$btn_setting = this.btn_setting) == null || (_this$btn_setting = _this$btn_setting.node) == null || _this$btn_setting.off("click", this._onBtnSettingClicked, this);

          // 移除左右隐藏按钮点击事件
          (_this$btnLeftHide = this.btnLeftHide) == null || (_this$btnLeftHide = _this$btnLeftHide.node) == null || _this$btnLeftHide.off("click", this._onBtnLeftHideClicked, this);
          (_this$btnRightHide = this.btnRightHide) == null || (_this$btnRightHide = _this$btnRightHide.node) == null || _this$btnRightHide.off("click", this._onBtnRightHideClicked, this);
          (_this$waveBg = this.waveBg) == null || (_this$waveBg = _this$waveBg.node) == null || _this$waveBg.off("click", this._onBtnWaveBgClicked, this);
          App.monitorMgr.offTarget(this);
          Tween.stopAllByTag(99999988);
        };
        _proto.updateLeftSoldier = function updateLeftSoldier() {
          var index = 1;
          this.leftSoldierHeads.forEach(function (item) {
            var info = TeamMgr.inst.getPosIUnit(index, 2);
            // 获取战斗内士兵数据
            var battleData = info ? App.dungeonBattleMgr.getBattleSoldierData(info.id) : null;
            item.show(info, 2, battleData);
            index++;
          });
          index = 1;
          this.rightSoldierHeads.forEach(function (item) {
            var info = TeamMgr.inst.getPosIUnit(index, 2);
            // 获取战斗内士兵数据
            var battleData = info ? App.dungeonBattleMgr.getBattleSoldierData(info.id) : null;
            item.show(info, 1, battleData);
            index++;
          });
          if (App.dungeonBattleMgr.pushDungeonInfo) {
            this.lbMorale.string = App.dungeonBattleMgr.pushDungeonInfo.shiqi_val.toString();
          }
          this.fbCfg = DBRecord.fetchId("Fb", App.dungeonBattleMgr.dungeonId);
          this.nameLabel.string = this.fbCfg.name;
        }
        /**
         * 战斗心跳
         * @param msg 战斗心跳返回信息
         */;
        _proto._onResBattleHeart = function _onResBattleHeart(msg) {
          if (msg && msg.code !== 200) {
            return;
          }
          this.lbMorale.string = msg.shiqi_val.toString();
        };
        _proto.onResBattleRewardInfo = function onResBattleRewardInfo(msg) {
          var _this3 = this;
          if (msg && msg.code !== 200) {
            return;
          }
          if (App.dungeonBattleMgr.waveStop) {
            // this.initRewardScroll(msg.items);
            this.rewardScroll.array = msg.items;
            this.rewardScroll.updateAllItems();
          } else {
            this.waveLayer.active = false;
            if (!this._settingPaused) {
              this.setSettingPaused(true);
            }
            UIMgr.inst.open(BattleSettingView, LayerType.panel, Layout_BattleSettingView, [{
              msg: msg,
              cb: function cb() {
                if (_this3._settingPaused) {
                  _this3.setSettingPaused(false);
                }
              }
            }]);
          }
        };
        _proto.setSettingPaused = function setSettingPaused(flag) {
          this._settingPaused = flag;
          App.battleMgr.setPause(flag);
        };
        _proto.updateMilitaryOrders = function updateMilitaryOrders(militaryOrders) {
          this.mOValue.string = militaryOrders.toString();
        }

        /**
         * 处理管理器到视图的更新事件
         */;
        _proto._onManagerToViewUpdate = function _onManagerToViewUpdate(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u6218\u6597\u58EB\u5175\u5347\u9636 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this.lbMorale.string = "" + msg.shiqi_val;

          // 搜索检测升阶的士兵
          var upgradedSoldier = this.findAndUpdateUpgradedSoldier(msg.soldier_id, msg.stage);
          if (upgradedSoldier) {
            App.log.logBusiness("\u58EB\u5175\u5347\u9636\u6210\u529F\uFF0C\u5DF2\u66F4\u65B0UI: soldier_id=" + msg.soldier_id + ", stage=" + msg.stage);
          } else {
            App.log.logError("\u58EB\u5175\u5347\u9636\u5931\u8D25: \u672A\u627E\u5230\u5347\u9636\u7684\u58EB\u5175 soldier_id=" + msg.soldier_id);
          }

          // 刷新左侧士兵列表
          this.updateLeftSoldier();
        }

        /**
         * 查找并更新升阶的士兵
         * @param soldierId 士兵ID
         * @param newStage 新的阶级
         * @returns 是否找到并更新成功
         */;
        _proto.findAndUpdateUpgradedSoldier = function findAndUpdateUpgradedSoldier(soldierId, newStage) {
          // 在左侧士兵列表中查找
          for (var i = 0; i < this.leftSoldierHeads.length; i++) {
            var item = this.leftSoldierHeads[i];
            var info = TeamMgr.inst.getPosIUnit(i + 1, 2);
            if (info && info.id === soldierId) {
              // 更新战斗内士兵数据
              App.dungeonBattleMgr.battleSoldierUpStage(soldierId, newStage);

              // 获取更新后的战斗数据
              var battleData = App.dungeonBattleMgr.getBattleSoldierData(soldierId);

              // 重新赋值并显示
              item.show(info, 2, battleData);
              App.log.logBusiness("\u5DE6\u4FA7\u58EB\u5175\u5347\u9636\u663E\u793A\u66F4\u65B0: index=" + i + ", soldier_id=" + soldierId + ", stage=" + newStage);
              return true;
            }
          }

          // 在右侧士兵列表中查找
          for (var _i = 0; _i < this.rightSoldierHeads.length; _i++) {
            var _item = this.rightSoldierHeads[_i];
            var _info = TeamMgr.inst.getPosIUnit(_i + 1, 1);
            if (_info && _info.id === soldierId) {
              // 更新战斗内士兵数据
              App.dungeonBattleMgr.battleSoldierUpStage(soldierId, newStage);

              // 获取更新后的战斗数据
              var _battleData = App.dungeonBattleMgr.getBattleSoldierData(soldierId);

              // 重新赋值并显示
              _item.show(_info, 1, _battleData);
              App.log.logBusiness("\u53F3\u4FA7\u58EB\u5175\u5347\u9636\u663E\u793A\u66F4\u65B0: index=" + _i + ", soldier_id=" + soldierId + ", stage=" + newStage);
              return true;
            }
          }
          return false;
        }

        /**
         * 左侧隐藏/展开按钮点击
         */;
        _proto._onBtnLeftHideClicked = function _onBtnLeftHideClicked() {
          this._leftHidden = !this._leftHidden;
          if (this.leftNode) {
            this.leftNode.active = !this._leftHidden;
          }

          // 使用 scaleX 翻转按钮：隐藏时翻转（scaleX = -1），展开时正常（scaleX = 1）
          if (this.btnLeftHide) {
            var scaleX = this._leftHidden ? 1 : -1;
            this.btnLeftHide.node.setScale(scaleX, 1);
          }
        }

        /**
         * 右侧隐藏/展开按钮点击
         */;
        _proto._onBtnRightHideClicked = function _onBtnRightHideClicked() {
          this._rightHidden = !this._rightHidden;
          if (this.rightNode) {
            this.rightNode.active = !this._rightHidden;
          }

          // 使用 scaleX 翻转按钮：隐藏时翻转（scaleX = -1），展开时正常（scaleX = 1）
          if (this.btnRightHide) {
            var scaleX = this._rightHidden ? -1 : 1;
            this.btnRightHide.node.setScale(scaleX, 1, 1);
          }
        }

        /**
         * 初始化技能
         */;
        _proto.initSkillItems = function initSkillItems() {
          var _this4 = this;
          var skills = App.battleMgr.skillCtrl.getPlayerSkills();
          var dData = App.skillMgr.getSkillData();
          var vData = [];
          for (var dx0 = 1; dx0 <= 5; dx0++) {
            var oTemp = (dData[dx0] || [])[0];
            var oData = undefined;
            if (oTemp) {
              for (var dx1 = 0; dx1 < skills.length; dx1++) {
                var oSkill = skills[dx1];
                if (oTemp.jineng_id === oSkill.skillID) {
                  oData = oSkill;
                  break;
                }
              }
              if (!oData) {
                var oSkillVO = new SkillVO();
                var JiNeng = DBRecord.fetchId("Skill", oTemp.jineng_id);
                oSkillVO.init(JiNeng);
                oData = oSkillVO;
              }
            }
            vData.push(oData);
          }
          this._skillData = vData;
          UIUtil.updateContainer(vData, this.skillItemContainer, this.tempSkillItem, function (data, node) {
            if (!data) return;
            var item = node.getComponent(BattleUISkillItem);
            item.init(data);
            _this4._skillItemMap.set(data.skillID, item);
            item.setClick0(function () {
              var worldPos = node.worldPosition.clone();
              worldPos.y += 50;
              // this.skillDesc.node.setWorldPosition(worldPos);
              // this.skillDesc.setPreData(data.skillID);
            });

            item.setClick1(function () {
              // this.skillDesc.setPreData(-1);
            });
          });
        }

        /**
         * 初始化时间UI
         */;
        _proto._initTime = function _initTime() {
          // let dbr: dbr.GuanQia = DBRecord.fetchId("GuanQia", App.battleMgr.challengeGuanQiaId);

          // dbr.time_limit = 150; //测试
          this._time_limit = 0; //dbr.time_limit + nExNum;
          if (GameConfig.DebugInfo.noTimeLimit) {
            this._time_limit *= 1000;
          }
          this._time_limit_DB = this._time_limit;
          this.lbTime.string = Utils.TimeFormat(this._time_limit, "m:s");
          this._dt = 0;
        }

        /**
         * 更新时间UI
         * @param dt
         */;
        _proto._updateTime = function _updateTime(dt) {
          if (App.battleMgr.pause) return;
          if (this._dtDangerousHp > 0) {
            this._dtDangerousHp -= dt;
            if (this._dtDangerousHp < 0) {
              // this.spine_DangerousHp.node.active = true;
              // this.spine_DangerousHp.setAnimation(0, "animation", false);
              if (!this._battleEnd) ;
              this._dtDangerousHp = -1;
            }
          }
          if (this._backTime > 0) {
            this._backTime -= dt;
            if (this._backTime <= 0) ;
          }
          if (this._battleEnd) return;
          this._dt += dt;
          if (this._time_limit !== undefined && this._dt > 1 && !this.win.active) {
            this._time_limit += this._dt;
            this._dt = 0;
            if (!App.battleMgr.bossIsDead) {
              this.lbTime.string = Utils.TimeFormat(Math.floor(this._time_limit), "m:s");
            }
          }
          this.updateDrugCD(dt);
        }

        /**
         * 初始化boss提示UI
         */;
        _proto._initBossTips = function _initBossTips() {
          this.battleTipsItem.active = false;
        }

        /**
         * 当boss出现时
         */;
        _proto.onShowBoss = function onShowBoss() {
          this.battleTipsItem.active = true;
        };
        /**
         * 显示波次提示层（带倒计时）
         * @param waveId 当前波次ID
         * @param totalWaves 总波次数
         * @param callback 倒计时结束后的回调
         */
        _proto.showWaveLayer = function showWaveLayer(waveId, totalWaves, callback) {
          if (!this.waveLayer) {
            if (callback) callback();
            return;
          }

          // 显示波次层
          this.waveLayer.active = true;
          // 先暂停展示获得奖励
          this.setSettingPaused(true);

          // 显示波次信息
          if (this.waveLabel) {
            this.waveLabel.string = "\u987A\u5229\u901A\u8FC7\u7B2C " + waveId + " / " + totalWaves + " \u6CE2";
          }

          // 设置倒计时（3秒）
          this._waveCountdown = 3;
          this._waveCallback = callback;
          if (this.nextTimeLab) {
            this.nextTimeLab.string = this._waveCountdown + "S";
          }
        };
        _proto._onBtnWaveBgClicked = function _onBtnWaveBgClicked() {
          this._waveCountdown = 1;
          this._updateWaveCountdown(1);
          // this._waveCountdown = 0;
        }

        /**
         * 按钮事件： 设置
         * @param _event
         * @param _customEventData
         */;
        _proto.onBtnEventSetting = function onBtnEventSetting(_event, _customEventData) {
          // console.log('onBtnEventSetting');
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
          // UIMgr.inst.openOnce(uiGameSet, LayerType.panel);
        }
        /**
         * btn_setting点击处理函数
         */;
        _proto._onBtnSettingClicked = function _onBtnSettingClicked() {
          // if (!this.battleSettingView) return;
          App.dungeonBattleMgr.reqBattleRewardInfo();
        }

        /**
         * 按钮事件： 退出
         * @param _event
         * @param _customEventData
         */;
        _proto.onBtnEventQuit = function onBtnEventQuit(_event, _customEventData) {
          console.log("onBtnEventQuit");
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
          App.monitorMgr.dispatchEvent(MonitorType.battle_flow_back_home);
          // App.roleMgr.reqPlayerInfo();
        };

        _proto._onEventBattleMonsterDeadUpdateMorale = function _onEventBattleMonsterDeadUpdateMorale(morale) {
          this.lbMorale.string = morale.toString();
        }

        /**
         * 怪物死亡事件处理
         * @param monster 死亡的怪物
         */;
        _proto._onEventMonsterDie = function _onEventMonsterDie(monster) {
          var _App$battleMgr$battle,
            _this5 = this;
          if (!monster || !monster.node) return;

          // 获取 fallingLayer
          var fallingLayer = (_App$battleMgr$battle = App.battleMgr.battleMainViewCtrl) == null ? void 0 : _App$battleMgr$battle.fallingLayer;
          if (!fallingLayer) {
            console.error("fallingLayer 不存在");
            return;
          }

          // 获取怪物死亡位置（世界坐标）
          var monsterWorldPos = monster.node.worldPosition.clone();

          // 加载并创建 ItemFallUi 节点
          App.resMgr.loadAsset(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallUi, Prefab, null, function (err, prefab) {
            if (err) {
              console.error("加载 ItemFallUi 预制体失败:", err);
              return;
            }

            // 实例化节点
            var itemFallNode = instantiate(prefab);
            if (!itemFallNode) {
              console.error("实例化 ItemFallUi 节点失败");
              return;
            }

            // 将节点添加到 fallingLayer
            itemFallNode.setParent(fallingLayer);

            // 转换怪物世界坐标到 fallingLayer 的本地坐标
            var localPos = fallingLayer.getComponent(UITransform).convertToNodeSpaceAR(monsterWorldPos);
            itemFallNode.setPosition(localPos);

            // 获取 btn_setting 的世界坐标并转换到 fallingLayer 的本地坐标
            var btnWorldPos = _this5.btn_setting.node.worldPosition.clone();
            var btnLocalPos = fallingLayer.getComponent(UITransform).convertToNodeSpaceAR(btnWorldPos);

            // 1秒后飞向 btn_setting，0.5秒飞行时间
            tween(itemFallNode).delay(0.6).to(0.5, {
              position: v3(btnLocalPos.x, btnLocalPos.y, 0),
              scale: v3(0.5, 0.5, 0)
            }, {
              easing: "sineInOut"
            }).call(function () {
              // 到达后删除节点
              itemFallNode.destroy();
            }).start();
          });
        }

        /**
         * 事件消息： 战斗 —— 主角 —— 使用技能
         * @param skillID 技能ID
         */;
        _proto._onEventBattlePlayerUseSkill = function _onEventBattlePlayerUseSkill(skillID) {
          var skillItem = this._skillItemMap.get(skillID);
          if (skillItem) {
            skillItem.use();
          }
        }

        /**
         * 事件消息： 战斗 —— 主角 —— 获得道具
         */;
        _proto._onEventBattleGetFallingItem = function _onEventBattleGetFallingItem(data) {
          for (var i = 0; i < this.tip.children.length; i++) {
            this.tip.children[i].y = (this.tip.children.length - i) * 50;
          }
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemGetPropTips);
          var lbName = node.getChildByPath("Node/lbItemName").getComponent(Label);
          var lbNum = node.getChildByPath("Node/lbNum").getComponent(Label);
          lbName.string = data.name;
          lbName.color = data.color;
          lbNum.string = "X" + String(data.count);
          node.setParent(this.tip);
          node.setPosition(0, 0, 0);
          tween(node).tag(99999988).delay(1.5).by(0.5, {
            position: v3(-200, 0, 0)
          }).call(function () {
            App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemGetPropTips, node);
          }).start();
        };
        _proto.hideOtherUI = function hideOtherUI() {
          //播放boss出场动画
          var _BattleUIView = this.node; //UIMgr.inst.getLayerNode(LayerType.panel).getChildByPath('BattleMainView/BattleUIView');
          _BattleUIView.children.forEach(function (node) {
            if (node.name !== "win") {
              node.active = false;
            } else {
              node.active = true;
            }
          });
          // BattleUIView.active = false;
          var BattleDebugView = this.node.parent.getChildByPath("BattleDebugView");
          BattleDebugView.active = false;
          // let BattleCtrlView = this.node.parent.getChildByPath('BattleCtrlView');
          // BattleCtrlView.active = false;
          var miniMap = this.node.parent.getChildByPath("miniMap");
          miniMap.active = false;
          // let bossHP = this.node.parent.getChildByPath('bossHP');
        };

        _proto.updateDrugCD = function updateDrugCD(dt) {
          this._drugDt += dt;
          if (this._drugDt < 1) return;
          this._drugDt = 0;
          this._drugCD--;
          if (this._drugCD <= 0) {
            this._drugCD = 0;
            return;
          }
        }

        /**
         * 战斗飘字提示
         * @param str 提示内容
         */;
        _proto.popTips = function popTips(str) {
          var node = instantiate(this.itemTips);
          var lb = node.getChildByName("lb").getComponent(Label);
          lb.string = str;
          var parent = this.node.getChildByName("battleTips");
          node.parent = parent;
          var y = -parent.children.length * 50;
          node.setPosition(0, y);
          tween(node).tag(GameBattle.BattleTweenTag).by(0.5, {
            y: 100
          }).call(function () {
            node.destroy();
          }).start();
        };
        _createClass(BattleUIView, [{
          key: "time_limit",
          get:
          //战斗剩余时间
          function get() {
            return this._time_limit;
          },
          set: function set(value) {
            this._time_limit = value;
          }
        }, {
          key: "battleEnd",
          get: function get() {
            return this._battleEnd;
          },
          set:
          //右侧面板是否隐藏
          function set(value) {
            this._battleEnd = value;
          }
        }, {
          key: "time_limit_DB",
          get: function get() {
            return this._time_limit_DB;
          },
          set: function set(value) {
            this._time_limit_DB = value;
          }
        }]);
        return BattleUIView;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "skillItemContainer", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "tempSkillItem", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "battleTipsItem", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "win", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "tip", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "itemTips", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "bloodMooon", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "btnBoxInfo", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "lbMorale", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "lbBoxInfo", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "lbTime", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "btn_setting", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "nameNode", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "nameLabel", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "leftNode", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "leftSoldierHeads", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "rightNode", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "rightSoldierHeads", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "mOValue", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "btnLeftHide", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "btnRightHide", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "waveLayer", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "waveBg", [_dec24], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "waveLabel", [_dec25], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "nextTimeLab", [_dec26], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "rewardScroll", [_dec27], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "debugView", [_dec28], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BattleUtil.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './BattleBigMap.ts', './AxingManager.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, Vec3, GameBattle, BattleBigMap, AxingManagerNew;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      BattleBigMap = module.BattleBigMap;
    }, function (module) {
      AxingManagerNew = module.AxingManagerNew;
    }],
    execute: function () {
      var _class;
      cclegacy._RF.push({}, "e3629kjlj1GCKJ6d/w4FYSc", "BattleUtil", undefined);

      /**
       * 战斗模块工具类
       */
      var BattleUtil = exports('BattleUtil', /*#__PURE__*/function () {
        function BattleUtil() {}
        /**
         * 分析方向
         * @param directionVector 方向向量
         * @returns
         */
        BattleUtil.analysisDirection = function analysisDirection(directionVector) {
          var dir = GameBattle.Direction.None;
          if (directionVector.x > 0) {
            if (directionVector.y > 0) {
              dir = GameBattle.Direction.RightUp;
            } else if (directionVector.y < 0) {
              dir = GameBattle.Direction.RightDown;
            } else {
              dir = GameBattle.Direction.Right;
            }
          } else if (directionVector.x < 0) {
            if (directionVector.y > 0) {
              dir = GameBattle.Direction.LeftUp;
            } else if (directionVector.y < 0) {
              dir = GameBattle.Direction.LeftDown;
            } else {
              dir = GameBattle.Direction.Left;
            }
          } else {
            if (directionVector.y > 0) {
              dir = GameBattle.Direction.Up;
            } else if (directionVector.y < 0) {
              dir = GameBattle.Direction.Down;
            } else {
              dir = GameBattle.Direction.None;
            }
          }
          return dir;
        };
        BattleUtil.get2DAngleByPoint = function get2DAngleByPoint(p1, p2) {
          return 180 / Math.PI * Math.atan2(p2.y - p1.y, p2.x - p1.x);
        }
        /**
         * 根据权重返回结果
         */;
        BattleUtil.getValueByProbability = function getValueByProbability(data) {
          //[90001,5000],[91001,5000]
          var total = 0;
          var list = [];
          for (var i = 0; i < data.length; i++) {
            total += data[i][1];
            list.push(total);
          }
          var num = Math.random() * total;
          for (var _i = 0; _i < list.length; _i++) {
            if (num < list[_i]) {
              return data[_i][0];
            }
          }
        };
        return BattleUtil;
      }());
      var AxingManager = exports('AxingManager', /*#__PURE__*/function () {
        function AxingManager() {
          //初始化寻路障碍物  w ,h- 地图宽与高
          this.map2d = void 0;
          this._mapCatch = {};
          this._tempV3_1 = new Vec3();
          this._tempV3_2 = new Vec3();
        }
        AxingManager.getInstance = function getInstance() {
          if (this._instance === undefined) {
            this._instance = new this();
          }
          return this._instance;
        };
        var _proto = AxingManager.prototype;
        _proto.init = function init() {
          // if (WECHAT) {
          //     AxingManager.USE_NEW_DATA=true;
          // } else {
          //     AxingManager.USE_NEW_DATA=true;
          // }
          // AxingManagerNew.USE_NEW_DATA=AxingManager.USE_NEW_DATA;
        }

        //二维数组
        ;

        _proto.Array2D = function Array2D(w, h, num) {
          var data = [];
          var default_num = num || 0;
          for (var x = 0; x < w; x++) {
            var temp = [];
            for (var y = 0; y < h; y++) {
              temp.push(default_num);
            }
            data.push(temp);
          }
          return {
            w: w,
            h: h,
            data: data,
            showArray2D: function showArray2D() {
              var s = "";
              for (var y = 0; y < this.h; y++) {
                for (var x = 0; x < this.w; x++) {
                  s += this.data[x][y] + " ";
                }
                s += "\n";
              }
              console.log(s);
            }
          };
        }

        //点
        ;

        _proto.Point = function Point(x, y) {
          return {
            x: x,
            y: y,
            eq: function eq(other) {
              return this.x === other.x && this.y === other.y;
            }
          };
        };
        _proto.Node = function Node(point, endPoint, g) {
          //描述AStar中的节点
          var tG = g || 0;
          return {
            point: point,
            //节点的坐标
            father: null,
            //父节点
            g: tG,
            //G值，g值在用到的时候会重新算
            h: (Math.abs(endPoint.x - point.x) + Math.abs(endPoint.y - point.y)) * 10 //计算H值
          };
        }

        /*
            功能：
                创建AStar对象，进行寻路
            参数：
                map2d:Array2D类型的地图数组
                startPoint:Point类型的寻路起点
                endPoint:Point类型的寻路终点
                passTag:int类型的可行走标记（若地图数据!=passTag即为障碍）
         */;
        _proto.AStar = function AStar(map2d, startPoint, endPoint, passTag, self) {
          var tag = passTag || 0;
          return {
            map2d: map2d,
            startPoint: startPoint,
            endPoint: endPoint,
            passTag: tag,
            openList: [],
            //开启表
            closeList: [],
            //关闭表
            deepCount: 0,
            isBoss: false,
            //获得openList中F值最小的节点
            getMinNode: function getMinNode() {
              var currentNode = this.openList[0];
              for (var _iterator = _createForOfIteratorHelperLoose(this.openList), _step; !(_step = _iterator()).done;) {
                var node = _step.value;
                if (node.g + node.h < currentNode.g + currentNode.h) currentNode = node;
              }
              return currentNode;
            },
            //判断point是否在关闭表中
            pointInCloseList: function pointInCloseList(point) {
              for (var _iterator2 = _createForOfIteratorHelperLoose(this.closeList), _step2; !(_step2 = _iterator2()).done;) {
                var node = _step2.value;
                if (node.point.eq(point)) return true;
              }
              return false;
            },
            //判断point是否在开启表中
            pointInOpenList: function pointInOpenList(point) {
              for (var _iterator3 = _createForOfIteratorHelperLoose(this.openList), _step3; !(_step3 = _iterator3()).done;) {
                var node = _step3.value;
                if (node.point.eq(point)) return node;
              }
              return null;
            },
            //判断终点是否在关闭表中
            endPointInCloseList: function endPointInCloseList() {
              for (var _iterator4 = _createForOfIteratorHelperLoose(this.closeList), _step4; !(_step4 = _iterator4()).done;) {
                var node = _step4.value;
                if (node.point.eq(this.endPoint)) return node;
              }
              return null;
            },
            //搜索节点周围的点
            searchNear: function searchNear(minF, offsetX, offsetY) {
              if (!AxingManager.USE_NEW_DATA) {
                //越界检测
                if (minF.point.x + offsetX < 0 || minF.point.x + offsetX > this.map2d.w - 1 || minF.point.y + offsetY < 0 || minF.point.y + offsetY > this.map2d.h - 1) return null;
                //如果是障碍就忽略
                if (this.map2d.data[minF.point.x + offsetX][minF.point.y + offsetY] !== this.passTag) return null;
              } else {
                if (BattleBigMap.getInstance().isBlock(minF.point.x + offsetX, minF.point.y + offsetY)) return null;
              }
              //如果在关闭表中就忽略
              var currentPoint = self.Point(minF.point.x + offsetX, minF.point.y + offsetY);
              if (this.pointInCloseList(currentPoint)) return null;
              this.deepCount++;
              //设置单位花费
              var step = 0;
              if (offsetX === 0 || offsetY === 0) step = 10;else step = 14;
              //如果不在openList中，就把它加入openList
              var currentNode = this.pointInOpenList(currentPoint);
              if (currentNode === null) {
                currentNode = self.Node(currentPoint, this.endPoint, minF.g + step);
                currentNode.father = minF;
                this.openList.push(currentNode);
                return null;
              }
              //如果在openList中，判断minF到当前点的G是否更小
              if (minF.g + step < currentNode.g) {
                currentNode.g = minF.g + step;
                currentNode.father = minF;
              }
            },
            //开始寻路
            start: function start() {
              //1.将起点放入开启列表
              var startNode = self.Node(this.startPoint, this.endPoint);
              this.openList.push(startNode);
              //2.主循环逻辑
              while (true) {
                //找到F值最小的节点
                var minF = this.getMinNode();
                //把这个点加入closeList中，并且在openList中删除它
                this.closeList.push(minF);
                var index = this.openList.indexOf(minF);
                this.openList.splice(index, 1);
                //搜索这个节点的上下左右节点
                this.searchNear(minF, 0, -1);
                this.searchNear(minF, 0, 1);
                this.searchNear(minF, -1, 0);
                this.searchNear(minF, 1, 0);
                this.searchNear(minF, -1, -1);
                this.searchNear(minF, -1, 1);
                this.searchNear(minF, 1, -1);
                this.searchNear(minF, 1, 1);
                // 判断是否终止
                var point = this.endPointInCloseList();
                if (point) {
                  //如果终点在关闭表中，就返回结果
                  var cPoint = point;
                  var pathList = [];
                  while (true) {
                    if (cPoint.father) {
                      pathList.push(cPoint.point);
                      cPoint = cPoint.father;
                    } else {
                      return pathList.reverse();
                    }
                  }
                }
                //开启表为空
                if (this.openList.length === 0) {
                  return null;
                }
                var limit = this.isBoss ? AxingManager.DEEP_LIMIT_BOSS : AxingManager.DEEP_LIMIT;
                if (this.deepCount > limit) {
                  //console.log("+++++++++++++++++++++++  count limit");
                  return null;
                }
              }
            }
          };
        };
        _proto.initMapData_zhangaiwu = function initMapData_zhangaiwu(h, w, mapData) {
          AxingManagerNew.getInstance().initMapData_zhangaiwu(h, w, mapData);
          // console.log("initMapData_zhangaiwu", mapData)
          this.map2d = this.Array2D(w, h, 0);
          // let index = 0
          // for (let i = 0  ; i < w; i++) {
          //     for ( let j = 0 ; j < h ; j++){
          //         this.map2d.data[j][i] = (mapData[i*w+j] === 0 ? 1: 0 );
          //     }
          // }
          for (var i = 0; i < w; i++) {
            for (var j = 0; j < h; j++) {
              this.map2d.data[i][j] = mapData[j * h + i] === 0 ? 1 : 0;
              //     this.map2d.data[i][j] = (mapData[i * w + j] === 0 ? 1 : 0);
            }
          }
        };

        _proto.Astar_use = function Astar_use(start_point, to_point, isInCity, isBoss) {
          if (AxingManager.USE_NEW_ALG) {
            return AxingManagerNew.getInstance().findPathImmediately(start_point, to_point);
          }
          var key = start_point.x + "," + start_point.y + "," + to_point.x + "," + to_point.y;
          if (this._mapCatch[key]) {
            return this._mapCatch[key];
          }
          var aStar = this.AStar(this.map2d, this.Point(start_point.x, start_point.y), this.Point(to_point.x, to_point.y), 0, this);
          aStar.isBoss = isBoss;
          var pathList = aStar.start();
          //log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>= old deepCount", aStar.deepCount);
          if (!pathList || pathList.length === 0) {
            console.log("没找到行走的路径 ");
            // return start_point.copyAsVec3()//Vec3.ZERO
            return Vec3.ZERO;
          }
          // console.log("行走的路径= ", pathList, start_point, to_point);
          if (BattleBigMap.SHOW_PATH_SPRITE) {
            BattleBigMap.getInstance().showDebugPath(pathList);
          }
          this._tempV3_1.set(pathList[0].x, pathList[0].y, 0);
          this._tempV3_2.set(start_point.x, start_point.y, 0);
          this._tempV3_2.subtract(this._tempV3_1);
          this._tempV3_2.x *= -1;
          this._mapCatch[key] = this._tempV3_2;
          return this._tempV3_2;
        };
        _proto.Astar_use_new = function Astar_use_new(start_point_pixel, to_point_pixel, isInCity, maxDepthValue) {
          var start_point = BattleBigMap.getInstance().pointToBigMapGrid(start_point_pixel);
          var to_point = BattleBigMap.getInstance().pointToBigMapGrid(to_point_pixel);
          return AxingManagerNew.getInstance().findPathImmediately(start_point, to_point, maxDepthValue);
        }

        //地图数据转换为二维数组
        ;

        _proto.tilesToMapData = function tilesToMapData(width, height, mapData) {
          var data = [];
          var default_num = 0;
          for (var x = 0; x < height; x++) {
            var temp = [];
            for (var y = 0; y < width; y++) {
              temp.push(default_num);
            }
            data.push(temp);
          }
          for (var i = 0; i < height; i++) {
            for (var j = 0; j < width; j++) {
              data[i][j] = mapData[i * width + j] === 0 ? 1 : 0;
            }
          }
          return data;
        }

        //----------寻路test
        ;

        _proto.fineTest = function fineTest() {
          var map2d = this.Array2D(10, 10, 0);
          map2d.data[4][0] = 1;
          map2d.data[4][1] = 1;
          map2d.data[4][2] = 1;
          map2d.data[4][3] = 1;
          map2d.data[4][4] = 1;
          map2d.data[4][5] = 1;
          map2d.data[4][6] = 1;
          map2d.data[0][9] = 1;
          map2d.data[0][8] = 1;
          map2d.showArray2D();
          // console.log(map2d.data[4][0]);
          var aStar = this.AStar(map2d, this.Point(0, 0), this.Point(9, 9), 0, this);
          var pathList = aStar.start();
          for (var _iterator5 = _createForOfIteratorHelperLoose(pathList), _step5; !(_step5 = _iterator5()).done;) {
            var point = _step5.value;
            map2d.data[point.x][point.y] = 8;
          }
          map2d.showArray2D();
          console.log("输出=***********************= ");
        };
        _proto.test = function test(pathList) {
          // console.log("test=***********************= ", this.map2d.data[12][18], this.map2d.data);
          // this.map2d.showArray2D();
          // for (var point of pathList) {
          //     this.map2d.data[point.x][point.y] += 2;
          // }
          // this.map2d.showArray2D();
        };
        _proto.dispose = function dispose() {}

        // 清除缓存方法
        ;

        _proto.clearCache = function clearCache() {
          this._mapCatch = {};
          AxingManagerNew.getInstance().clearCache();
        };
        return AxingManager;
      }());
      _class = AxingManager;
      /**使用新的物理层数据 */
      AxingManager.USE_NEW_DATA = true;
      /**深度限制 */
      AxingManager.DEEP_LIMIT = 300;
      AxingManager.DEEP_LIMIT_BOSS = 1200;
      /**使用新算法 */
      AxingManager.USE_NEW_ALG = true;
      AxingManager._instance = new _class();
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BingLiCell.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './PlaceGameMgr.ts', './UtilGame.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, ProgressBar, Node, Component, PlaceGameMgr, UtilGame, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      ProgressBar = module.ProgressBar;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "4f8e2vOqbVOTKVkyBYwnFhB", "BingLiCell", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BingLiCell = exports('BingLiCell', (_dec = ccclass("BingLiCell"), _dec2 = property(Sprite), _dec3 = property(Sprite), _dec4 = property(Label), _dec5 = property(ProgressBar), _dec6 = property(Label), _dec7 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BingLiCell, _Component);
        function BingLiCell() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "bg", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgIcon", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbName", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "progressBar", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbProgress", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "gouImg", _descriptor6, _assertThisInitialized(_this));
          _this._data = null;
          _this._index = -1;
          return _this;
        }
        var _proto = BingLiCell.prototype;
        /**
         * 设置数据并渲染
         * @param data 兵力数据
         * @param index 在列表中的索引
         */
        _proto.setData = function setData(data, index) {
          if (index === void 0) {
            index = -1;
          }
          this._data = data;
          this._index = index;
          this.updateView();
        }

        /**
         * 获取当前数据
         */;
        _proto.getData = function getData() {
          return this._data;
        }

        /**
         * 获取当前索引
         */;
        _proto.getIndex = function getIndex() {
          return this._index;
        };
        _proto.updateView = function updateView() {
          if (!this._data) return;

          // 更新兵种图标
          if (this.imgIcon) {
            UtilGame.loadSoldierIcon(this.imgIcon, this._data[0]);
          }

          // 更新兵种名称
          if (this.lbName) {
            var showName = PlaceConfigMgr.inst.getSoldierName(this._data[0]);
            this.lbName.string = showName || "";
          }
          var current = PlaceGameMgr.inst.getSoldierCount(this._data[0]);
          var total = this._data[1] || 1;
          if (this.progressBar && this.lbProgress) {
            this.progressBar.progress = Math.min(current / total, 1);
            this.lbProgress.string = current + "/" + total;
          }
          if (this.gouImg) {
            if (current >= total) {
              this.gouImg.active = true;
            } else {
              this.gouImg.active = false;
            }
          }
          this.updateBgDisplay();
        };
        _proto.updateBgDisplay = function updateBgDisplay() {
          if (!this.bg) return;
          if (this._index === -1) {
            this.bg.node.active = true;
            return;
          }
          var col = this._index % 2;
          this.bg.node.active = col === 1;
        };
        return BingLiCell;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgIcon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lbName", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "lbProgress", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "gouImg", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BingYingModel.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingModel.ts', './App.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, cclegacy, BuildingModel, App, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      BuildingModel = module.BuildingModel;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      cclegacy._RF.push({}, "7d82f5d0IlMSqRyZI/GdTbn", "BingYingModel", undefined);

      /**
       * 训练队列信息接口
       */

      /**
       * 兵营数据模型基类
       */
      var BingYingModel = exports('BingYingModel', /*#__PURE__*/function (_BuildingModel) {
        _inheritsLoose(BingYingModel, _BuildingModel);
        /**
         * 构造函数
         */
        function BingYingModel(buildingUid, buildType, buildIndex, level, owner) {
          var _this;
          if (level === void 0) {
            level = 0;
          }
          _this = _BuildingModel.call(this, buildIndex, buildType, buildingUid, level, owner) || this;
          /**
           * 剩余建造时间(秒)
           */
          _this._remainingBuildTime = 0;
          /**
           * 总建造时间
           */
          _this._totalBuildTime = 0;
          /**
           * 当前训练中的队列
           */
          _this.xlQueues = [];
          /**
           * 最大训练队列数
           */
          _this._maxXLSlots = 1;
          _this.updateMaxXLSlots();
          return _this;
        }
        var _proto = BingYingModel.prototype;
        _proto.getRemainBuildTime = function getRemainBuildTime() {
          return this._remainingBuildTime;
        };
        _proto.getToTalBuildTime = function getToTalBuildTime() {
          return this._totalBuildTime;
        }

        /**
         * 开始建造升级
         * @param buildTime 建造时间（毫秒）
         * @param targetLevel 目标等级
         */;
        _proto.startBuildingUpgrade = function startBuildingUpgrade(buildTime, totalTime) {
          this._remainingBuildTime = buildTime;
          this._totalBuildTime = totalTime;
        }

        /**
         * 减少剩余建造时间
         * @param milliseconds 减少的秒
         * @returns 剩余建造时间
         */;
        _proto.decreaseBuildTime = function decreaseBuildTime(time) {
          this._remainingBuildTime = Math.max(0, this._remainingBuildTime - time);
          return this._remainingBuildTime;
        }

        /**
         * 获取建造进度
         * @returns 进度值 (0-1)
         */;
        _proto.getBuildProgress = function getBuildProgress() {
          if (this._totalBuildTime <= 0) return 0;
          return Math.max(0, (this._totalBuildTime - this._remainingBuildTime) / this._totalBuildTime);
        }

        /**
         * 完成建造，执行升级
         */;
        _proto.completeBuilding = function completeBuilding() {
          this._remainingBuildTime = 0;
          this._totalBuildTime = 0;
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged(newLevel) {
          if (PlaceConfigMgr.inst.getBingYingLevelConfig(this.buildType, newLevel)) {
            this.updateMaxXLSlots();
          }
        }

        /**
         * 更新最大训练位置数
         */;
        _proto.updateMaxXLSlots = function updateMaxXLSlots() {
          if (this.level <= 0) {
            this._maxXLSlots = 0;
            return;
          }
          var maxSlots = PlaceConfigMgr.inst.getBingYingTrainMax(this.buildType, this.level);
          if (maxSlots === undefined) {
            this._maxXLSlots = 0;
            return;
          }
          this._maxXLSlots = maxSlots;
        }

        /**
         * 计算设备提供的训练时间减少
         */;
        _proto.calcXLTimeReduction = function calcXLTimeReduction() {
          if (!this.serverData || !this.serverData.shebeis) return 0;
          var reduction = 0;
          for (var _iterator = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step; !(_step = _iterator()).done;) {
            var sb = _step.value;
            var cfg = PlaceConfigMgr.inst.getBingYingSheBeiConfig(sb.shebei_id, sb.shebei_level);
            if (cfg && cfg.xunliantime) {
              reduction += cfg.xunliantime;
            }
          }
          return reduction;
        }

        /**
         * 计算设备提供的食物消耗减少
         */;
        _proto.calcFoodCostReduction = function calcFoodCostReduction() {
          if (!this.serverData || !this.serverData.shebeis) return 0;
          var reduction = 0;
          for (var _iterator2 = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step2; !(_step2 = _iterator2()).done;) {
            var sb = _step2.value;
            var cfg = PlaceConfigMgr.inst.getBingYingSheBeiConfig(sb.shebei_id, sb.shebei_level);
            if (cfg && cfg.food_cost) {
              reduction += cfg.food_cost;
            }
          }
          return reduction;
        }

        /**
         * 计算设备提供的额外训练位置
         */;
        _proto.calcExtraXLSlots = function calcExtraXLSlots() {
          if (!this.serverData || !this.serverData.shebeis) return 0;
          var extra = 0;
          for (var _iterator3 = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step3; !(_step3 = _iterator3()).done;) {
            var sb = _step3.value;
            var cfg = PlaceConfigMgr.inst.getBingYingSheBeiConfig(sb.shebei_id, sb.shebei_level);
            if (cfg && cfg.xunlianmax) {
              extra += cfg.xunlianmax;
            }
          }
          return extra;
        }

        /**
         * 计算设备提供的训练奖励
         */;
        _proto.calcXLRewardBonus = function calcXLRewardBonus() {
          if (!this.serverData || !this.serverData.shebeis) return [];
          var rewards = [];
          for (var _iterator4 = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step4; !(_step4 = _iterator4()).done;) {
            var sb = _step4.value;
            var cfg = PlaceConfigMgr.inst.getBingYingSheBeiConfig(sb.shebei_id, sb.shebei_level);
            if (cfg && cfg.xunlian_reward) {
              rewards.push.apply(rewards, cfg.xunlian_reward);
            }
          }
          return rewards;
        }

        /**
         * 获取预备兵数量（从服务器数据读取）
         */;
        /**
         * 获取当前可用训练槽数量
         */
        _proto.getAvailableXLSlots = function getAvailableXLSlots() {
          App.log.logBusiness("默认配置数量", "", this._maxXLSlots);
          App.log.logBusiness("额外的训练位置", "", this.calcExtraXLSlots());
          return this._maxXLSlots + this.calcExtraXLSlots();
        }

        /**
         * 获取最大可训练的士兵数量
         */;
        _proto.getMaxTrainCount = function getMaxTrainCount() {
          var maxSlotNum = this.getAvailableXLSlots();
          var trainCount = this.trainingCount;
          return maxSlotNum - trainCount;
        };
        _createClass(BingYingModel, [{
          key: "reserveCount",
          get: function get() {
            var _this$serverData;
            return ((_this$serverData = this.serverData) == null ? void 0 : _this$serverData.reserve_count) || 0;
          }

          /**
           * 获取训练中的士兵数量（从服务器数据读取）
           */
        }, {
          key: "trainingCount",
          get: function get() {
            var _this$serverData2;
            return ((_this$serverData2 = this.serverData) == null ? void 0 : _this$serverData2.train_count) || 0;
          }
        }]);
        return BingYingModel;
      }(BuildingModel));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BossAI.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonsterAI.ts', './BattleDefine.ts', './GameConfig.ts', './SkillVO.ts', './BaseAi.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Vec3, MonsterAI, GameBattle, GameConfig, SkillType, AI_BEHAVIOR;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
    }, function (module) {
      MonsterAI = module.MonsterAI;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      SkillType = module.SkillType;
    }, function (module) {
      AI_BEHAVIOR = module.AI_BEHAVIOR;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "e3beaJiGvBEToaOEIiD7QNO", "BossAI", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * BossAI 管理类
       */
      var BossAI = exports('BossAI', (_dec = ccclass("BossAI"), _dec(_class = /*#__PURE__*/function (_MonsterAI) {
        _inheritsLoose(BossAI, _MonsterAI);
        function BossAI() {
          return _MonsterAI.apply(this, arguments) || this;
        }
        var _proto = BossAI.prototype;
        _proto.onUpdate = function onUpdate(dt) {
          if (this.pursuitTime > 0) {
            this.pursuitTime -= dt;
            return;
          }
          if (this.stateLock) {
            return;
          }
          if (this.pause) {
            this.doDaiji();
            return;
          }
          var type = AI_BEHAVIOR.DAIJI;
          for (var i = this._behaviors.length; i--;) {
            var behavior = this._behaviors[i];
            var checkFunc = this._checkTypeFuncMap[behavior];
            if (checkFunc() && behavior >= this._curBehavior) {
              type = behavior;
              break;
            }
          }
          if (type !== this._curBehavior) {
            if (GameConfig.DebugInfo.showMonsterBehaviorLog) {
              console.log("curtype is ", this.testname[type]);
            }
            this._curBehavior = type;
          }
          this._doTypeFuncMap[type]();
        }

        /**
         * 释放技能
         * @returns
         */;
        _proto.doSkill = function doSkill() {
          // 测试用
          // return false;
          if (this._owner.state.isSkilling()) {
            //已经在放技能了
            return;
          }
          if (this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.type === GameBattle.ActionState.Skill) {
            return;
          }
          this.stateLock = true;
          var skill = this._owner.getUsableSkill();
          if (GameConfig.DebugInfo.showMonsterSkillLog) {
            console.log("怪物释放技能", skill.skillID);
          }
          if (skill.type === SkillType.YuHui) {
            skill.use();
          } else if (skill.checkUpdateUseTime()) {
            this.skillUseTime++;
          }
          this._owner.useSkill(skill);
          this._owner.exitMove();
          this.lastSkillId = skill.skillID;
          this._owner.state.setSkill(skill.arts_action, skill);
        }

        /**
         * 检测能否攻击
         */;
        _proto.checkAttack = function checkAttack() {
          // 测试用
          // return false;
          if (this._owner.state.isAttacking()) {
            return true;
          }
          if (this._owner.state.isSkilling()) {
            //已经在放技能了
            return false;
          }
          var ret = this._owner.checkAttack();
          return ret;
        }

        /**
         * 检测能否追击
         */;
        _proto.checkPursuit = function checkPursuit() {
          var target = this._owner.lockTargetCtrl.target;
          if (!target) return false;
          var distance = Vec3.distance(target.node.worldPosition, this._owner.node.worldPosition);

          // 判定条件 1大于最小索敌范围  2小于追击范围 3不能攻击 4 不在攻击动作中
          var ret = !this._owner.checkCanUseSkill() && !this._owner.state.isAttacking() && distance > this._owner.roleVO.pursuerange;
          // console.log('checkPursuit', ret, distance, lockrange[0], lockrange[1], !this._owner.checkAttack(), !this._owner.state.isAttacking())

          if (ret) {
            this.pursuitTime = 0.1;
          } else {
            this._owner.exitMove();
          }
          return ret;
        }

        /**
         * 检测脱战
         * @returns
         */;
        _proto.checkExitBattle = function checkExitBattle() {
          var target = this._owner.lockTargetCtrl.target;
          var homeDistance = this._owner.node.worldPosition.clone().subtract(this._homePoint).length();
          // if (homeDistance > this._homeDistance) { //不在锁敌范围里 脱战
          //     return true
          // }
          if (!target) {
            //没有目标， 又离开了出生地 脱战
            return true;
          }
          // if (target) {
          //有目标, 但超出了攻击范围 脱战
          // const targetDistance = target.node.worldPosition.clone().subtract(this._owner.node.worldPosition).length();
          // if (targetDistance > this._targetDistance) {
          //     return true;
          // }
          // }
          return false;
          // return false;
        };

        return BossAI;
      }(MonsterAI)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BroadcastMgr.ts", ['cc', './App.ts', './uiBroadcast.ts', './DBRecord.ts', './UtilGame.ts', './Utils.ts', './UIMgr.ts', './GameStateMgr.ts'], function (exports) {
  var cclegacy, App, uiBroadcast, DBRecord, UtilGame, Utils, UIMgr, LayerType, GameState;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      uiBroadcast = module.uiBroadcast;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      GameState = module.GameState;
    }],
    execute: function () {
      cclegacy._RF.push({}, "343979MqGRPQYGUiQ032uJk", "BroadcastMgr", undefined);
      var BroadcastMgr = exports('BroadcastMgr', /*#__PURE__*/function () {
        function BroadcastMgr() {
          /** 游戏内部 */
          this.gameMsgList = [];
          /** 后台广播 */
          this.backMsgList = [];
          this.isPlaying = false;
        }
        var _proto = BroadcastMgr.prototype;
        _proto.init = function init() {
          // App.monitorMgr.addEventListener(MonitorType.web_broadcast_106002, this.sc_web_broadcast_106002, this);
          this.resetData();
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
          this.resetData();
        };
        _proto.resetData = function resetData() {
          this.gameMsgList = [];
          this.backMsgList = [];
          this.isPlaying = false;
        };
        _proto.sc_web_broadcast_106002 = function sc_web_broadcast_106002(data) {
          var msg = "";
          if (data.type === 1) {
            //  类型1-游戏内部 2-后台广播
            if (Utils) msg = this.dealMsg(data);
            if (msg) {
              this.gameMsgList.push(msg);
              if (App.gameStateMgr.state === GameState.City) {
                this.show();
              }
            }
          } else if (data.type === 3) {
            msg = this.dealMsg(data);
            if (msg) {
              for (var i = 0; i < 5; i++) {
                this.backMsgList.unshift(msg);
              }
              if (App.gameStateMgr.state === GameState.City) {
                this.show();
              }
            }
          } else {
            //系统公告 需要优先播放
            msg = data.msg;
            this.backMsgList.push(msg);
            this.show();
          }
        };
        _proto.dealMsg = function dealMsg(data) {
          if ([5406, 5407, 5408].indexOf(data.template_id) !== -1) ;
          var str = App.languageMgr.getTextById(data.template_id);
          if (str.length > 0) {
            if (data.item_list.length === 0) {
              return str;
            }
            var roleName = "<color=#65baf1>" + data.params[0] + "</color>";
            var id = data.item_list[0].item_id;
            var count = data.item_list[0].item_count;
            var cfg = DBRecord.fetchId("DaoJu", id);
            var name = App.languageMgr.getTextById(cfg.name);
            var color = Utils.getQualityColor(cfg.rarity);
            var hex = color.toHEX();
            var itemStr = "<color=" + hex + ">" + (name + "×" + count) + "<color>";
            console.log(hex);
            var msg = UtilGame.formateStr(str, roleName, itemStr);
            console.log(msg);
            return msg;
          }
          return null;
        };
        _proto.show = function show() {
          if (!this.isPlaying) {
            this.isPlaying = true;
            UIMgr.inst.openOnce(uiBroadcast, LayerType.touchTip);
          }
        };
        return BroadcastMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuBingYing.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './BingYingModel.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './App.ts', './MovingSoldierNPC.ts', './MonitorType.ts', './EventType.ts', './TrainingMgr.ts', './Utils.ts', './ActionFramesItem.ts', './ModuleDef.ts', './DBRecord.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, Prefab, Vec3, BuildingBase, SoldierType, BuildingType, BuildingStatus, BingYingModel, PlaceGameMgr, PlaceConfigMgr, App, MovingSoldierNPC, MonitorType, EventType, TrainingMgr, Utils, ActionFramesItem, ModuleDef, DBRecord;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
      Prefab = module.Prefab;
      Vec3 = module.Vec3;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingType = module.BuildingType;
      BuildingStatus = module.BuildingStatus;
    }, function (module) {
      BingYingModel = module.BingYingModel;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MovingSoldierNPC = module.MovingSoldierNPC;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      TrainingMgr = module.TrainingMgr;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
      cclegacy._RF.push({}, "a35b1VT+/xONIeaUB+RVlWz", "BuBingYing", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 步兵营建筑类
       */
      var BuBingYing = exports('BuBingYing', (_dec = ccclass("BuBingYing"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "建造进度条",
        tooltip: "建造进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "建造时间",
        tooltip: "建造时间"
      }), _dec6 = property(Node), _dec7 = property({
        type: ActionFramesItem,
        displayName: "英雄模型",
        tooltip: "英雄模型"
      }), _dec8 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "可升级图标"
      }), _dec9 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec10 = property({
        type: Label,
        displayName: "升级时间",
        tooltip: "升级时间"
      }), _dec11 = property({
        type: Node,
        displayName: "进入路线",
        tooltip: "NPC进入步兵营路线规划"
      }), _dec12 = property({
        type: Node,
        displayName: "出门路线",
        tooltip: "NPC离开步兵营到指挥部路线规划"
      }), _dec13 = property(Node), _dec14 = property(Label), _dec15 = property(Node), _dec16 = property(Node), _dec17 = property(Prefab), _dec18 = property(Vec3), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(BuBingYing, _BuildingBase);
        function BuBingYing() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jiaImg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildProgress", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildTimeLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroAni", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "timeLab", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "inLine", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "outLine", _descriptor11, _assertThisInitialized(_this));
          /**
           * 训练中的NPC父容器节点
           */
          _initializerDefineProperty(_this, "trainingNPCParent", _descriptor12, _assertThisInitialized(_this));
          /**
           * 预备兵数量显示节点
           */
          _initializerDefineProperty(_this, "reserveCountLab", _descriptor13, _assertThisInitialized(_this));
          /**
           * 兵营按钮组合
           */
          _initializerDefineProperty(_this, "btnNode", _descriptor14, _assertThisInitialized(_this));
          /**
           * 所有设备节点父容器
           */
          _initializerDefineProperty(_this, "xlShebeiParent", _descriptor15, _assertThisInitialized(_this));
          /**
           * 移动士兵NPC预制体
           */
          _initializerDefineProperty(_this, "movingSoldierPrefab", _descriptor16, _assertThisInitialized(_this));
          /**
           * NPC到达兵营的目标位置
           */
          _initializerDefineProperty(_this, "npcArrivePos", _descriptor17, _assertThisInitialized(_this));
          /**
           * 数据模型
           */
          _this._dataModel = null;
          /**
           * 训练定时器
           */
          _this._xlTimer = null;
          /**
           * 建造定时器
           */
          _this._buildTimer = null;
          /**
           * 升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 训练设备管理器
           */
          _this.trainingMgr = null;
          /**
           * 当前移动中的NPC列表
           */
          _this._movingNPCs = [];
          /**
           * 预备役NPC创建定时器ID列表
           */
          _this._reserveNPCTimers = [];
          /**
           * 前端记录的训练完成数量
           */
          _this._frontendReserveCount = 0;
          /**
           * 总训练数量（本次训练）
           */
          _this._totalTrainingCount = 0;
          /**
           * 每个NPC的训练时长
           */
          _this._trainingDuration = 0;
          /**
           * 转向对应关系
           */
          _this.inFaceMap = new Map([[1, 1], [2, 1], [3, 2], [4, 2]]);
          /**
           * 出门路线对应关系
           */
          _this.outFaceMap = new Map([[1, 2], [2, 2], [3, 1], [4, 1], [5, 2], [6, 2], [8, 2], [9, 2]]);
          _this.poolName = "MovingSoldierNPC_BB";
          return _this;
        }
        var _proto = BuBingYing.prototype;
        /**
         * 组件启用时的初始化
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
          this.initTrainingMgr();

          // 初始化对象池
          if (this.movingSoldierPrefab) {
            App.nodePoolMgr.createPool(this.poolName, this.movingSoldierPrefab, {
              preloadCount: 10,
              maxSize: 20,
              autoExpand: true
            });
          }
        }

        /**
         * 初始化训练设备管理器
         */;
        _proto.initTrainingMgr = function initTrainingMgr() {
          var _this2 = this;
          this.trainingMgr = new TrainingMgr();
          this.trainingMgr.initialize(this.xlShebeiParent, this.trainingNPCParent, SoldierType.BuBing, BuildingType.BuBingYing, function (npcId) {
            return _this2.onSingleTrainingComplete(npcId);
          });
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrain, this.resTrain, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrainFinish, this.resTrainFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.BuildingBtnClick, this.buildingBtnClick, this);
          App.monitorMgr.addEventListener(EventType.Close_Build_XunLianBtns, this.closeBuildXunLianBtns, this);
          App.monitorMgr.addEventListener(EventType.ui_open, this.closeBuildXunLianBtns, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopBuildTimer();
          this.stopUpgradeTimer();
          this.stopXLTimer();
          this.clearReserveNPCTimers();
          this.unscheduleAllCallbacks();
          for (var _iterator = _createForOfIteratorHelperLoose(this._movingNPCs), _step; !(_step = _iterator()).done;) {
            var npc = _step.value;
            if (npc && npc.node && npc.node.isValid) {
              npc.stopAndDestroy(this.poolName);
            }
          }
          this._movingNPCs = [];
          if (this.trainingMgr) {
            this.trainingMgr.destroy();
            this.trainingMgr = null;
          }
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.startUpgradeTimer();
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 训练协议响应
         */;
        _proto.resTrain = function resTrain(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this._totalTrainingCount = msg.train_count;
          this._trainingDuration = msg.training_duration;
          App.log.logBusiness("\u670D\u52A1\u5668\u8FD4\u56DE \u6B65\u5175\u8425\u8BAD\u7EC3\u5F00\u59CB - \u65B0\u589E\u6570\u91CF: " + msg.count + ", \u7D2F\u8BA1\u603B\u6570: " + this._totalTrainingCount + ", \u65F6\u957F: " + msg.training_duration + "\u6BEB\u79D2");
          this.createMovingNPCs(msg.count, this._trainingDuration);
          this.startXLTimer();
          this.updateView();
        }

        /**
         * 从路径节点中获取路径点数组
         * @param pathNode 路径节点，包含多个point子节点
         * @param npcLayer NPC父容器节点
         * @returns 路径点数组（世界坐标转换为父容器本地坐标）
         */;
        _proto.getPathPoints = function getPathPoints(pathNode, npcLayer) {
          var pathPoints = [];
          if (!pathNode) {
            return pathPoints;
          }

          // 获取所有子节点，按名称排序（point1, point2, ...）
          var pointNodes = pathNode.children.sort(function (a, b) {
            var aNum = parseInt(a.name.replace("point", "")) || 0;
            var bNum = parseInt(b.name.replace("point", "")) || 0;
            return aNum - bNum;
          });

          // 转换路径点为世界坐标
          for (var _iterator2 = _createForOfIteratorHelperLoose(pointNodes), _step2; !(_step2 = _iterator2()).done;) {
            var pointNode = _step2.value;
            var worldPos = pointNode.getWorldPosition();
            var localPos = npcLayer.inverseTransformPoint(new Vec3(), worldPos);
            pathPoints.push(localPos);
          }
          return pathPoints;
        }

        /**
         * 创建移动中的士兵NPC
         * @param count 士兵数量
         * @param trainingDuration 训练时长
         */;
        _proto.createMovingNPCs = function createMovingNPCs(count, trainingDuration) {
          var _this3 = this;
          if (!this.movingSoldierPrefab) {
            App.log.logError("步兵营：移动NPC预制体未设置");
            return;
          }
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            return;
          }
          var pathPoints = this.getPathPoints(this.inLine, npcLayer);
          var startPos = pathPoints[0];
          for (var i = 0; i < count; i++) {
            (function (npcId) {
              _this3.scheduleOnce(function () {
                var npcNode = App.nodePoolMgr.getNode(_this3.poolName);
                if (!npcNode) {
                  App.log.logError("\u521B\u5EFA\u79FB\u52A8NPC\u5931\u8D25: " + npcId);
                  return;
                }
                npcLayer.addChild(npcNode);
                npcNode.setPosition(startPos);
                var movingNPC = npcNode.getComponent(MovingSoldierNPC);
                if (!movingNPC) {
                  App.nodePoolMgr.putNode(_this3.poolName, npcNode);
                  return;
                }
                var faceDirection = _this3.inFaceMap.get(1) || 1;
                movingNPC.setFaceDirection(faceDirection);
                _this3._movingNPCs.push(movingNPC);

                // 开始沿路径点移动
                var resourceConfig = {
                  module: ModuleDef.NPC,
                  name: "npc_xiaoji",
                  action: "Move"
                };
                movingNPC.startMoveAlongPath(pathPoints, function (id, npc) {
                  _this3.onNPCArriveCallFunc(id, npc, trainingDuration);
                }, npcId, _this3.inFaceMap, resourceConfig);
              }, npcId * 0.5);
            })(i);
          }
        }

        /**
         * 创建模型移动到指挥部
         * @param count
         * @returns
         */;
        _proto.createMovingNPCsFromReserve = function createMovingNPCsFromReserve(count) {
          var _this4 = this;
          if (!this.movingSoldierPrefab) {
            App.log.logError("步兵营：移动NPC预制体未设置");
            return;
          }
          this.clearReserveNPCTimers();
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            return;
          }
          var pathPoints = this.getPathPoints(this.outLine, npcLayer);
          for (var i = 0; i < count; i++) {
            (function (npcId) {
              var timerId = _this4.scheduleOnce(function () {
                var npcNode = App.nodePoolMgr.getNode(_this4.poolName);
                if (!npcNode) {
                  App.log.logError("\u521B\u5EFA\u79FB\u52A8NPC\u5931\u8D25: " + npcId);
                  return;
                }
                npcLayer.addChild(npcNode);
                var startWorldPos = _this4.node.getWorldPosition();
                var localStartPos = npcLayer.inverseTransformPoint(new Vec3(), startWorldPos);
                npcNode.setPosition(localStartPos);
                var movingNPC = npcNode.getComponent(MovingSoldierNPC);
                if (!movingNPC) {
                  App.nodePoolMgr.putNode(_this4.poolName, npcNode);
                  return;
                }

                // 设置NPC朝向
                var faceDirection = _this4.outFaceMap.get(1) || 1;
                movingNPC.setFaceDirection(faceDirection);
                _this4._movingNPCs.push(movingNPC);

                // 开始沿路径点移动
                var resourceConfig = {
                  module: ModuleDef.SOLDIER,
                  name: "daodunbing",
                  action: "Move"
                };
                movingNPC.startMoveAlongPath(pathPoints, function (id, npc) {
                  App.log.logBusiness("\u9884\u5907\u5F79NPC " + id + " \u5230\u8FBE\u76EE\u7684\u5730");
                  var index = _this4._movingNPCs.indexOf(npc);
                  if (index !== -1) {
                    _this4._movingNPCs.splice(index, 1);
                  }
                  npc.stopAndDestroy(_this4.poolName);
                }, npcId, _this4.outFaceMap, resourceConfig);
              }, npcId * 0.7);
              _this4._reserveNPCTimers.push(timerId);
            })(i);
          }
        }

        /**
         * NPC到达兵营回调（第一阶段）
         * @param npcId NPC ID
         * @param npc NPC组件
         * @param trainingDuration 训练时长
         */;
        _proto.onNPCArriveCallFunc = function onNPCArriveCallFunc(npcId, npc, trainingDuration) {
          App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5230\u8FBE\u5175\u8425\uFF0C\u68C0\u67E5\u7A7A\u95F2\u8BBE\u5907");
          if (!this.trainingMgr) {
            var index = this._movingNPCs.indexOf(npc);
            if (index !== -1) {
              this._movingNPCs.splice(index, 1);
            }
            npc.stopAndDestroy(this.poolName);
            return;
          }
          var trainingNPCNode = this.trainingMgr.getFreeEquipmentNode();
          if (trainingNPCNode) {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u83B7\u53D6\u5230\u7A7A\u95F2\u8BBE\u5907\uFF08\u5DF2\u9884\u5360\u7528\uFF09\uFF0C\u7EE7\u7EED\u79FB\u52A8\u5230\u8BBE\u5907\u4F4D\u7F6E");
            this.moveToEquipment(npc, npcId, trainingNPCNode, trainingDuration);
          } else {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u65E0\u7A7A\u95F2\u8BBE\u5907\uFF0C\u76F4\u63A5\u9500\u6BC1");
            // 没有空闲设备，直接销毁
            var _index = this._movingNPCs.indexOf(npc);
            if (_index !== -1) {
              this._movingNPCs.splice(_index, 1);
            }
            npc.stopAndDestroy(this.poolName);
          }
        }

        /**
         * NPC移动到训练设备（第二阶段）
         * @param npc NPC组件
         * @param npcId NPC ID
         * @param trainingNPCNode 目标设备的TrainingNPC节点
         * @param trainingDuration 训练时长
         */;
        _proto.moveToEquipment = function moveToEquipment(npc, npcId, trainingNPCNode, trainingDuration) {
          var _this5 = this;
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            npc.stopAndDestroy(this.poolName);
            return;
          }
          var targetWorldPos = trainingNPCNode.getWorldPosition();
          var localTargetPos = npcLayer.inverseTransformPoint(new Vec3(), targetWorldPos);
          var resourceConfig = {
            module: ModuleDef.NPC,
            name: "npc_xiaoji",
            action: "Move"
          };
          npc.startMoveTo(localTargetPos, function (id, npcObj) {
            _this5.onNPCArriveEquipment(id, npcObj, trainingNPCNode, trainingDuration);
          }, npcId, resourceConfig);
        }

        /**
         * NPC到达训练设备回调（第二阶段）
         * @param npcId NPC ID
         * @param npc NPC组件
         * @param trainingNPCNode 目标设备的TrainingNPC节点
         * @param trainingDuration 训练时长
         */;
        _proto.onNPCArriveEquipment = function onNPCArriveEquipment(npcId, npc, trainingNPCNode, trainingDuration) {
          App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5230\u8FBE\u8BAD\u7EC3\u8BBE\u5907\u4F4D\u7F6E");
          var index = this._movingNPCs.indexOf(npc);
          if (index !== -1) {
            this._movingNPCs.splice(index, 1);
          }
          npc.stopAndDestroy(this.poolName);
          if (!this.trainingMgr) {
            App.log.logError("\u6B65\u5175\u8425: trainingMgr\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F00\u59CB\u8BAD\u7EC3");
            return;
          }
          var started = this.trainingMgr.occupyEquipmentByNode(trainingNPCNode, npcId, trainingDuration);
          if (started) {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5F00\u59CB\u5728\u8BBE\u5907\u4E0A\u8BAD\u7EC3");
          } else {
            App.log.logError("\u6B65\u5175\u8425: NPC " + npcId + " \u65E0\u6CD5\u5F00\u59CB\u8BAD\u7EC3\uFF0C\u8BBE\u5907\u72B6\u6001\u5F02\u5E38");
          }
        }

        /**
         * 单个训练完成回调（由设备管理器调用）
         * 这是停止训练定时器的统一出口
         * @param npcId 完成训练的NPC ID
         */;
        _proto.onSingleTrainingComplete = function onSingleTrainingComplete(npcId) {
          App.log.logBusiness("NPC " + npcId + " \u5B8C\u6210\u8BAD\u7EC3");
          this.playTrainingCompleteAnimation(npcId);
          this._frontendReserveCount++;
          App.log.logBusiness("\u8BAD\u7EC3\u8FDB\u5EA6: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
          if (this._frontendReserveCount >= this._totalTrainingCount) {
            App.log.logBusiness("\u6240\u6709NPC\u90FD\u5B8C\u6210\u4E86\u8BAD\u7EC3\uFF0C\u524D\u7AEF\u8BB0\u5F55: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
            this.stopXLTimer();
            this._frontendReserveCount = 0;
            this._totalTrainingCount = 0;
          }
        }

        /**
         * 播放训练完成动画
         * @param npcId NPC ID
         */;
        _proto.playTrainingCompleteAnimation = function playTrainingCompleteAnimation(npcId) {
          if (!this.movingSoldierPrefab) {
            return;
          }
          // 移除移动 直接消失即可
        }

        /**
         * 训练完成协议响应
         */;
        _proto.resTrainFinish = function resTrainFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          if (this._dataModel.serverData) {
            this._dataModel.serverData.reserve_count = msg.reserve_count;
            this._dataModel.serverData.train_count = msg.train_count;
          }
          this.updateReserveCount();
          App.log.logBusiness("\u540E\u7AEF\u6B65\u5175\u8425\u8BAD\u7EC3\u5B8C\u6210 - \u9884\u5907\u5F79: " + msg.reserve_count + ", \u8BAD\u7EC3\u4E2D: " + msg.train_count + ", \u524D\u7AEF\u8BB0\u5F55: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
        }

        /**
         * 当建筑数据更新时调用
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 启动建造倒计时
         */;
        _proto.startBuildTimer = function startBuildTimer() {
          var _this6 = this;
          if (this.dataModel.status !== BuildingStatus.BUILDING) {
            this.buildProgress.node.active = false;
            return;
          }
          if (this._buildTimer) {
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("出错 还没解锁");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.buildProgress.node.active = true;
          this.jiaImg.active = false;
          this.buildProgress.progress = this.dataModel.getBuildProgress();
          if (this.buildTimeLab) {
            this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          }
          this._buildTimer = setInterval(function () {
            _this6.onBuildTimerUpdate();
          }, 1000);
        }

        /**
         * 停止建造倒计时
         */;
        _proto.stopBuildTimer = function stopBuildTimer() {
          this.dataModel.completeBuilding();
          if (this.buildProgress.node) {
            this.buildProgress.node.active = false;
          }
          if (this._buildTimer) {
            clearInterval(this._buildTimer);
            this._buildTimer = null;
          }
        }

        /**
         * 建造更新
         */;
        _proto.onBuildTimerUpdate = function onBuildTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.buildProgress.progress = this.dataModel.getBuildProgress();
            if (this.buildTimeLab) {
              this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
            }
          } else {
            this.stopBuildTimer();
          }
        }

        /**
         * 启动升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this7 = this;
          if (!this.dataModel.isUpgrading) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("步兵营建筑已经达到最高级");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          if (remainTime <= 0) {
            this.stopUpgradeTimer();
            this.upgradeProgressBar.node.active = false;
            return;
          }
          if (this._upgradeTimer && Math.abs(this.dataModel.getRemainBuildTime() - remainTime) < 0.5) {
            return;
          }
          this.stopUpgradeTimer();
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.upgradeProgressBar.node.active = true;
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this7.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 升级计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = this.dataModel.getBuildProgress();
            this.timeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          } else {
            this.stopUpgradeTimer();
          }
        }

        /**
         * 开始训练定时器
         */;
        _proto.startXLTimer = function startXLTimer() {
          var _this8 = this;
          if (this._xlTimer) {
            App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u8BAD\u7EC3\u5B9A\u65F6\u5668\u5DF2\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u542F\u52A8");
            return;
          }
          App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u542F\u52A8\u8BAD\u7EC3\u5B9A\u65F6\u5668\uFF0C\u95F4\u9694100ms");
          this._xlTimer = setInterval(function () {
            _this8.updateXLProgress();
          }, 100);
        }

        /**
         * 停止训练定时器
         */;
        _proto.stopXLTimer = function stopXLTimer() {
          if (this._xlTimer) {
            App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u505C\u6B62\u8BAD\u7EC3\u5B9A\u65F6\u5668");
            clearInterval(this._xlTimer);
            this._xlTimer = null;
          }
        }

        /**
         * 更新训练进度
         */;
        _proto.updateXLProgress = function updateXLProgress() {
          if (!this.trainingMgr) return;
          this.trainingMgr.updateProgress(100);
          this.updateReserveCount();
        };
        _proto.closeBuildXunLianBtns = function closeBuildXunLianBtns() {
          this.btnNode.active = false;
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this._dataModel) return;
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.buildProgress.node.active = false;
            this.jiaImg.active = true;
            return;
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.jiaImg.active = false;
            this.startBuildTimer();
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateReserveCount();
          this.updateBuildImg();
          this.updateLevUpImg();
          if (this.dataModel.isUpgrading) {
            this.startUpgradeTimer();
          } else {
            this.upgradeProgressBar.node.active = false;
          }
          if (this.dataModel.serverData.entry_hero > 0) {
            this.heroAni.node.active = true;
            var heroCfg = DBRecord.fetchId("Hero", this.dataModel.serverData.entry_hero);
            if (heroCfg) {
              this.heroAni.playWithResource(ModuleDef.HERO, heroCfg.res, "Idle");
            }
          } else {
            this.heroAni.node.active = false;
          }
        }

        /**
         * 更新可升级图片显示
         * @returns
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this.dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 更新预备役士兵数量显示
         * 只显示服务器数据
         */;
        _proto.updateReserveCount = function updateReserveCount() {
          if (!this.reserveCountLab || !this._dataModel) return;
          this.reserveCountLab.string = "" + (this._dataModel.reserveCount || 0);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.btnNode.active) {
            this.btnNode.active = false;
            return;
          }
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            this.btnNode.active = true;
            App.monitorMgr.dispatchEvent(EventType.BuildingBtnClick, this.dataModel.buildingUid);
          }
        };
        _proto.buildingBtnClick = function buildingBtnClick(buildingUid) {
          if (!this.dataModel) return;
          if (this.dataModel.buildingUid === buildingUid) {
            return;
          }
          this.btnNode.active = false;
        }

        /**
         * 升级按钮点击
         */;
        _proto.onBtnUpgradeClick = function onBtnUpgradeClick() {
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            return;
          }
          if (this.dataModel.isUpgrading) {
            PlaceGameMgr.inst.showBuildUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          }
        }

        /**
         * 训练按钮点击
         */;
        _proto.onBtnXunLianClick = function onBtnXunLianClick() {
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            return;
          }
          PlaceGameMgr.inst.showTrainingView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
        }

        /**
         * 领取预备役士兵
         * @returns 领取预备役士兵
         */;
        _proto.onCangKuClick = function onCangKuClick() {
          var reserveCount = this._dataModel.reserveCount || 0;
          if (reserveCount <= 0) {
            App.log.logBusiness("没有预备役士兵可以领取");
            return;
          }
          this.createMovingNPCsFromReserve(reserveCount);
          PlaceGameMgr.inst.reqGetReserve(this.dataModel.buildingUid, this.dataModel.buildType);
        };
        _proto.clearReserveNPCTimers = function clearReserveNPCTimers() {
          var _this9 = this;
          this._reserveNPCTimers.forEach(function (timerId) {
            _this9.unschedule(timerId);
          });
          this._reserveNPCTimers = [];
        }

        //==============================子类方法重载=======================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          App.log.logBusiness("\u6B65\u5175\u8425: \u521D\u59CB\u5316\u6570\u636E\u6A21\u578B - \u5E8F\u5217\u53F7: " + this.buildIndex);
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.BuBingYing;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new BingYingModel(buildingUid, buildingType, buildingIndex, buildingLevel, this);
          this._dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            this.dataModel.status = BuildingStatus.IDLE;
          }
          if (data) {
            if (data.building_level !== oldLevel) {
              this.dataModel.level = data.building_level;
            }
            if (data.building_level <= 0 && data.upgrade_duration > 0) {
              this.dataModel.status = BuildingStatus.BUILDING;
              this.dataModel.isUpgrading = false;
            } else if (data.building_level > 0 && data.upgrade_duration > 0) {
              this.dataModel.isUpgrading = true;
            } else {
              this.dataModel.isUpgrading = false;
              this.dataModel.completeBuilding();
            }
          } else {
            this.dataModel.isUpgrading = false;
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        }

        /**
         * 播放升级动画
         */;
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("步兵营播放升级动画");
          // TODO: 播放升级动画
        }
        //==============================子类方法重载=======================================
        ;

        _createClass(BuBingYing, [{
          key: "dataModel",
          get:
          /**
           * 获取数据模型
           */
          function get() {
            return this._dataModel;
          }
        }]);
        return BuBingYing;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "jiaImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildProgress", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "buildTimeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "heroAni", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "inLine", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "outLine", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "trainingNPCParent", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "reserveCountLab", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "btnNode", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "xlShebeiParent", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "movingSoldierPrefab", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "npcArrivePos", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return new Vec3(0, 0, 0);
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Buff.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './DBRecord.ts', './BattleDefine.ts', './Monster.ts', './BuffEffect.ts', './GameConfig.ts', './App.ts'], function (exports) {
  var _createClass, cclegacy, Vec3, MonitorType, DBRecord, GameBattle, Monster, BuffEffect, GameConfig, App;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      BuffEffect = module.BuffEffect;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "1ab25ckLWJEZ5z3z9Bh+IuJ", "Buff", undefined);
      var Buff = exports('Buff', /*#__PURE__*/function () {
        var _proto = Buff.prototype;
        /**
         * buff source是否被回收后重用成别的怪物
         * @returns
         */
        _proto.checkSourceError = function checkSourceError() {
          if (!this.source || !this.initSourceId) {
            return false;
          }
          var vo = this.source.roleVO;
          if (vo && this.initSourceId !== vo.id) {
            return true;
          }
          return false;
        };
        function Buff(buff_id, owner, source, skillId) {
          if (skillId === void 0) {
            skillId = 0;
          }
          this.vo = null;
          this.effects = null;
          // buff效果组
          this.source = null;
          //buff 的源头, 施法者
          this._owner = null;
          this._buffId = 0;
          this._skillId = 0;
          this._triggerTimes = 0;
          //堆叠次数
          this._needUpdateUI = false;
          //是否通知UI更新
          this.maxTime = 0;
          this.curTime = 0;
          this._uid = 0;
          this._tiggered = false;
          this.guanghuanCd = 0;
          //扩展属性, 非配表的属性
          this.ex = null;
          this.target = {};
          this.newTargets = {};
          /**初始sourceId */
          this.initSourceId = 0;
          /** 初始source的属性 */
          this.initSourceFullAttr = {};
          /** 初始source的属性 */
          this.initSourceLockAttr = {};
          this._uid = Buff.uid++;
          this._owner = owner;
          this.source = source;
          this._buffId = buff_id;
          this._skillId = skillId;
          var deepCopy = function deepCopy(obj) {
            return JSON.parse(JSON.stringify(obj));
          };
          var buff_cfg = DBRecord.fetchId("JiNengBuff", buff_id);
          if (!buff_cfg) return;
          this.vo = deepCopy(buff_cfg);
          this.guanghuanCd = 3;
          this.ex = {
            interval: this.vo.interval,
            timeList: [this.vo.time],
            intervalTime: [this.vo.interval]
          };
          this.target = {};
          this.newTargets = {};
          this.setBuffData();
          if (this.vo.icon && this.vo.icon.length > 0) {
            var role = owner.owner;
            if (role instanceof Monster && role.roleVO.quality === GameBattle.MonsterQuality.Boss) {
              this._needUpdateUI = true;
            }
          }
        }
        _proto.setBuffData = function setBuffData() {
          this.effects = [];
          for (var i = 0; i < this.vo.effect_ids.length; i++) {
            this.effects[i] = new BuffEffect(this.vo.effect_ids[i], this._owner, this._buffId, this.source, this._skillId);
          }
          if (this.vo.duration === GameBattle.BuffDurationType.Battle || this.vo.duration === GameBattle.BuffDurationType.Forever) {
            this.vo.time = Number.MAX_SAFE_INTEGER;
          }
          if (this.vo.condition_num === -1) {
            this.vo.condition_num = Number.MAX_SAFE_INTEGER;
          }
          this._triggerTimes = 0;
          this.curTime = this.vo.time;
          if (GameConfig.DebugInfo.showBuffLog) {
            console.log("setBuffData test buff", this._triggerTimes, this._uid);
          }
        }

        //触发生效
        ;

        _proto.trigger = function trigger() {
          // if (this._triggerTimes < this.vo.add_num) {
          // if ([5000191,5000192,5000193].indexOf(this._buffId) > -1) {
          //     if (this.guanghuanCd > 0) {
          //         return;
          //     }
          // }
          // this.guanghuanCd = 3
          for (var i = 0; i < this.effects.length; i++) {
            this.effects[i].trigger();
          }
          this._triggerTimes++;
          // }
          if (GameConfig.DebugInfo.showBuffLog) {
            console.log("触发 test buff", this._triggerTimes, this._uid);
          }
          this.updateBuffUi(false);
          this._tiggered = true;
        };
        _proto.setBufVfx = function setBufVfx() {
          if (!this.vo.vfx) return;
          var target = this._owner.owner;
          var guaWorld = target.getMountPoint(this.vo.dummy_point, Vec3.ZERO);
          var gzNode = target.getBuffNode(this.vo.hierarchy);
          var localPos = target.getBuffLocationPos(this.vo.hierarchy, guaWorld);
          if (guaWorld.x === 0 && guaWorld.y === 0) {
            localPos.set(0, 0, 0);
          }
          var time = 0;
          if (this.vo.duration === GameBattle.BuffDurationType.Timer) {
            time = this.vo.time / 1000 || 0;
          }
          App.monitorMgr.dispatchEvent(MonitorType.battle_buff_attack_effect, {
            node: gzNode,
            effect: this.vo.vfx,
            hit_pos: localPos,
            size: 1,
            duration: this.vo.duration,
            time: time
          });
        }

        // 删除buff
        // 只有增加属性的buff才会扣除增益的属性, 或者返还减益的属性.
        // 伤害类或者移除类的buff不需要处理
        ;

        _proto.remove = function remove() {
          if (!this._tiggered) return; //没有触发过，则不删除
          this.effects.forEach(function (v, index) {
            v.remove();
          });
          this._triggerTimes--;
          // console.log('删除 test buff', this._triggerTimes, this._uid);
          this.updateBuffUi(true);
        };
        _proto.init = function init(buff_id) {};
        _proto.checkCondition = function checkCondition(count, death_count, target) {
          var _this = this;
          var v = this.vo;
          var self = this;
          var checkFunc = {
            1: function _(v1, v2) {
              return v1 >= v2;
            },
            2: function _(v1, v2) {
              // if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
              //     let player = self.owner.owner as Player;
              //     if (!player.isMyself) {
              //         let list = App.battleMgr.battleMainViewCtrl.battleJingJiChang.enemySkills
              //         return list.indexOf(v2) > -1;
              //     }
              // }
              var skills = App.skillMgr.getAllLearnedSkill();
              return skills.indexOf(v2) > -1;
            },
            3: function _(v1, v2) {
              return v1 >= v2;
            },
            4: function _(v1, v2) {
              return v1 === v2;
            },
            5: function _(v1, v2) {
              return self.source._buffBox.getBuffById(v2) !== null;
            },
            6: function _(v1, v2) {
              return self._owner.getBuffById(v2) !== null;
            },
            7: function _(v1, v2) {
              return v1 <= v2;
            },
            8: function _(v1, v2) {
              //判断身上某个buff的堆叠层数是否满足
              var buffs = target._buffBox.getBuffGroupById(_this.vo.buff_group);
              for (var id in buffs) {
                var buff = buffs[id];
                if (buff._buffId === _this._buffId) {
                  continue;
                }
                if (buff.vo.add_type !== 4) {
                  //不是堆叠buff
                  continue;
                }
                var ret = buff.ex.intervalTime.length >= v2;
                if (ret) {
                  target._buffBox.removeBuff(buff);
                  if (self.target[target.uid]) {
                    delete self.target[target.uid];
                  }
                  self.trigger();
                }
                return ret;
              }
              return false;
            },
            9: function _(v1, v2) {
              //判断元素是否高于其他元素伤害
              var vo = self._owner.owner.roleVO;
              var v = App.battleProprMgr.featchValueById(v2[0], vo);
              for (var i = 1; i < v2.length; i++) {
                if (v <= App.battleProprMgr.featchValueById(v2[i], vo)) {
                  return false;
                }
              }
              return true;
            },
            10: function _(v1, v2) {
              return self._owner.getBuffById(v2) === null;
            },
            //指定种族
            11: function _(v1, v2) {
              // const heroId = App.heroTavernManager.curHeroId;
              // let cfg: dbr.YingXiong = App.heroTavernManager.getHeroConfig(heroId);
              // if (cfg) {
              //     return v2 === cfg.race;
              // }
              return false;
            },
            13: function _(v1, v2) {
              var buffs = self._owner.getBuffGroupById(v2);
              return buffs && Object.keys(buffs).length > 0;
            },
            14: function _(v1, v2) {
              var buffs = self.source._buffBox.getBuffGroupById(v2);
              return buffs && Object.keys(buffs).length > 0;
            },
            15: function _(v1, v2) {
              return self._owner.owner.isBoss();
            }
          };
          var args = [0, count, 0, death_count, count, 0, 0, count, 0];
          if (!v.condition || !Array.isArray(v.condition)) return false;
          for (var i = 0; i < v.condition.length; i++) {
            if (!checkFunc[v.condition[i]](args[v.condition[i]], v.condition_val[i])) {
              return false;
            }
          }
          return true;
        };
        _proto.updateBuffUi = function updateBuffUi(remove) {
          if (!this._needUpdateUI) return;
          var type = this._owner.owner.type;
          App.monitorMgr.dispatchEvent(MonitorType.battle_update_buff_ui, type, this._buffId, this.vo.icon, this.vo.time, this.ex.timeList.length, remove);
        };
        _createClass(Buff, [{
          key: "owner",
          get: function get() {
            return this._owner;
          }
        }, {
          key: "buffId",
          get: function get() {
            return this._buffId;
          }
        }, {
          key: "skillId",
          get: function get() {
            return this._skillId;
          }
        }]);
        return Buff;
      }());
      Buff.uid = 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuffBox.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Buff.ts', './BattleDefine.ts', './MonitorType.ts', './BattleProprMgr.ts', './DBRecord.ts', './BulletEffect.ts', './BulletVO.ts', './MyBulletLauncher.ts', './GameConfig.ts', './BuffEffect.ts', './Utils.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, Vec3, UITransform, Buff, GameBattle, MonitorType, BattlePropertyName, DBRecord, BulletEffect, BulletVO, MyBulletLauncher, GameConfig, BuffEffect, Utils, App, BattleUtil;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
      UITransform = module.UITransform;
    }, function (module) {
      Buff = module.Buff;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      BulletEffect = module.BulletEffect;
    }, function (module) {
      BulletVO = module.BulletVO;
    }, function (module) {
      MyBulletLauncher = module.MyBulletLauncher;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      BuffEffect = module.BuffEffect;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      cclegacy._RF.push({}, "663bap65WJCab0tq9ANvrvq", "BuffBox", undefined);
      var BuffBox = exports('BuffBox', /*#__PURE__*/function () {
        function BuffBox() {
          this._allBuffs = {};
          //buff列表
          this._monsterDieCount = {};
          //怪物死亡个数
          this.subBulletBuff = {};
          //次级子弹buff
          this.subBulletEffectBuff = {};
          //次级子弹effect buff
          this.catchBuff = {};
          //缓存buff
          this.catchBuffEffect = {};
          //缓存buff
          this.constantlySkillBuff = {};
          //实时技能buff
          this.constantlyAttrBuff = {};
          //实时属性buff
          this.eventBuff = {};
          //事件触发buff
          /** 持有者 */
          this.owner = void 0;
        }
        var _proto = BuffBox.prototype;
        _proto.init = function init(owner) {
          this.owner = owner;
          this._allBuffs = {};
          this._monsterDieCount = {};
          this.subBulletBuff = {};
          this.subBulletEffectBuff = {};
          this.catchBuff = {};
          this.catchBuffEffect = {};
          this.constantlySkillBuff = {};
          this.constantlyAttrBuff = {};
          this.eventBuff = {};
        };
        _proto.dispose = function dispose() {
          this.owner = null;
          this._allBuffs = null;
          this._monsterDieCount = null;
          this.subBulletBuff = null;
          this.subBulletEffectBuff = null;
          this.catchBuff = null;
          this.catchBuffEffect = null;
          this.constantlySkillBuff = null;
          this.constantlyAttrBuff = null;
          this.eventBuff = null;
        }

        /**
         * 添加buff到buff列表
         * @param buff_id
         * @param source buff来源
         * @param skillId buff来源技能
         * @param force 是否强制添加
         * @returns
         */;
        _proto.addBuff = function addBuff(buff_id, source, skillId, force, bullet) {
          if (bullet === void 0) {
            bullet = null;
          }
          //console.log('添加buff', buff_id, source.uid);
          var buff = new Buff(buff_id, this, source, skillId);
          // if (!buff.vo) return;

          var catchBuff = this.catchBuff[buff_id];
          if (catchBuff) {
            for (var i = 0; i < catchBuff.length; i++) {
              BuffEffect.setValue(buff.vo, catchBuff[i]);
              buff.curTime = buff.vo.time;
              if (catchBuff[i].grid_type === 4 && catchBuff[i].configuration === "effect_ids") {
                buff.effects = [];
                for (var _i = 0; _i < buff.vo.effect_ids.length; _i++) {
                  buff.effects[_i] = new BuffEffect(buff.vo.effect_ids[_i], buff.owner, buff.buffId, buff.source, buff.skillId);
                }
              }
            }
          }
          if (bullet && bullet.owner && bullet.owner.type === GameBattle.RoleType.Monster) {
            buff.initSourceId = bullet.initOwnerId;
            buff.initSourceFullAttr = Utils.copyObj(bullet.initOwnerFullAttr);
            buff.initSourceLockAttr = Utils.copyObj(bullet.initOwnerLockAttr);
            //console.warn('>>>>>>>>>>>>>>>>>>>>>>>>> BULLET_OWNER_ERROR addBuff ,', bullet.bulletVO.bulletID, buff.initSourceId, buff.buffId);
          }

          var groupId = buff.vo.buff_group;
          var group = this._allBuffs[groupId];
          if (buff.vo.type === GameBattle.BuffType.Normal) {
            buff.target = this.owner;
          }
          if (group) {
            if (buff.vo.add_type === GameBattle.BuffAddType.Replace) {
              // 替换
              var oldBuff = null;
              var keys = Object.keys(group);
              if (keys.length > 0) {
                oldBuff = group[keys[0]];
              } else {
                this.addBuffToMap(buff);
              }
              if (oldBuff /** && oldBuff.vo.desc <= buff.vo.desc */) {
                this.removeBuff(oldBuff);
                this.addBuffToMap(buff);
              }
            } else if (buff.vo.add_type === GameBattle.BuffAddType.Add) {
              //添加
              if (group[buff_id]) {
                //是同一个buff 则替换时间
                group[buff_id].vo.time = buff.vo.time;
                group[buff_id].curTime = group[buff_id].vo.time;
              } else {
                //不是同一个buff 则添加
                this.addBuffToMap(buff);
              }
            } else if (buff.vo.add_type === GameBattle.BuffAddType.Exclusive) ;else if (buff.vo.add_type === GameBattle.BuffAddType.Overlap) {
              //堆叠
              if (!group[buff_id]) {
                this.addBuffToMap(buff);
                group[buff_id].vo.time = buff.vo.time;
              } else {
                if (group[buff_id].ex.timeList.length >= group[buff_id].vo.add_num) {
                  group[buff_id].ex.timeList.shift();
                  group[buff_id].ex.intervalTime.shift();
                  group[buff_id].remove();
                }
                group[buff_id].ex.timeList.push(group[buff_id].vo.time);
                group[buff_id].ex.intervalTime.push(group[buff_id].vo.interval);
                this.trigger(group[buff_id]);
                group[buff_id].vo.time = group[buff_id].vo.time;
              }
              group[buff_id].curTime = group[buff_id].vo.time;
            }
          } else {
            this.addBuffToMap(buff);
          }
          return buff;
        };
        _proto.addBuffToMap = function addBuffToMap(buff) {
          if (GameConfig.DebugInfo.showBuffLog) {
            console.log("添加buff id = ", buff.vo.id);
          }
          var groupId = buff.vo.buff_group;
          var buff_id = buff.vo.id;
          if (!this._allBuffs[groupId]) {
            this._allBuffs[groupId] = {};
          }
          this._allBuffs[groupId][buff_id] = buff;
          this.trigger(buff);
          // buff.setBufVfx()
        };

        _proto.trigger = function trigger(buff) {
          if (buff.vo.condition) {
            if (buff.vo.condition_num > 0) {
              var count = this._getEnemiesCountInRange(buff);
              if (buff.checkCondition(count, 0, this.owner)) {
                buff.vo.condition_num--;
                buff.trigger();
              }
            }
          } else {
            buff.trigger();
          }
        };
        _proto.removeBuff = function removeBuff(buff) {
          //console.log('删除 buff', buff.vo.id);
          var groupId = buff.vo.buff_group;
          var buff_id = buff.vo.id;
          if (buff.vo.add_type === 4) {
            var count = buff.ex.timeList.length;
            for (var i = 0; i < count; i++) {
              //叠加的BUFF根据叠加的次数来删除
              buff.remove();
            }
          } else {
            buff.remove();
          }
          buff = null;
          delete this._allBuffs[groupId][buff_id];
          delete this._monsterDieCount[buff_id];
        };
        _proto.removeBuffById = function removeBuffById(buffId) {
          console.log("删除 id buff");
          for (var _k2 in this._allBuffs) {
            for (var id in this._allBuffs[_k2]) {
              if (Number(id) === buffId) {
                var buff = this._allBuffs[_k2][id];
                buff.remove();
                delete this._allBuffs[_k2][id];
                buff = null;
                break;
              }
            }
          }
        };
        _proto.removeGroupBuff = function removeGroupBuff(gourpId) {
          console.log("删除 buff 组");
          for (var i in this._allBuffs[gourpId]) {
            this.removeBuff(this._allBuffs[gourpId][i]);
          }
          this._allBuffs[gourpId] = {};
        };
        _proto.getBuffById = function getBuffById(buff_id) {
          for (var i in this._allBuffs) {
            var group = this._allBuffs[i];
            for (var j in group) {
              if (group[j].vo.id === buff_id) {
                return group[j];
              }
            }
          }
          return null;
        };
        _proto.getBuffGroupById = function getBuffGroupById(groupID) {
          return this._allBuffs[groupID];
        }

        // 光环Buff后面删除
        ;

        _proto.getGuanHuanBuffTargetType = function getGuanHuanBuffTargetType(_target) {
          return GameBattle.RoleType.Monster;
          //光环的监听目标暂时改为监听敌人
          // if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
          //     if (this.owner.type === GameBattle.RoleType.Player) {
          //         return GameBattle.RoleType.Enemy;
          //     } else {
          //         return GameBattle.RoleType.Player;
          //     }
          // }
          // if (this.owner.type === GameBattle.RoleType.Player) {
          //     return GameBattle.RoleType.Monster;
          // } else {
          //     return GameBattle.RoleType.Player;
          // }
          // if (target === GameBattle.BuffTargetType.enemy) {
          //     if (this.owner.type === GameBattle.RoleType.Player) {
          //         return GameBattle.RoleType.Monster;
          //     } else {
          //         return GameBattle.RoleType.Player;
          //     }
          // } else if (target === GameBattle.BuffTargetType.self || target === GameBattle.BuffTargetType.partner) {
          //     return this.owner.type;
          // } else if (target === GameBattle.BuffTargetType.mainRole) {
          //     return GameBattle.RoleType.Player;
          // }
        };

        _proto._getEnemiesCountInRange = function _getEnemiesCountInRange(buff) {
          var count = 0;
          var targetType = this.getGuanHuanBuffTargetType(buff.vo.target);
          var _map = App.battleMgr.roleCtrl.entityMap;
          for (var _iterator = _createForOfIteratorHelperLoose(_map), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              _k = _step$value[0],
              v = _step$value[1];
            if (v.type === targetType) {
              var distance = Vec3.distance(v.node.worldPosition, this.owner.node.worldPosition);
              if (count > buff.vo.affect_quantity) break; //超出光环影响的数量
              if (distance < buff.vo.range) {
                count++;
              }
            }
          }
          return count;
        };
        _proto.onUpdate = function onUpdate(dt) {
          for (var _key in this._allBuffs) {
            var group = this._allBuffs[_key];
            for (var key2 in group) {
              var buff = group[key2];
              var vo = buff.vo;
              var tm = dt * 1000;
              // if (buff.vo.type === GameBattle.BuffType.GuangHuan) {
              //     let _map = App.battleMgr.roleCtrl.entityMap;
              //     let curTargetMap = {};
              //     let count = 0;
              //     let targetType = this.getGuanHuanBuffTargetType(buff.vo.target);
              //     for (const [k, v] of _map) {
              //         if (v.type === targetType) {
              //             if (count > buff.vo.affect_quantity) break; //超出光环影响的数量
              //             // if (this.owner.type === GameBattle.RoleType.Player && v.masterId === this.owner.uid) continue;
              //             const distance = Vec3.distance(v.node.worldPosition, this.owner.node.worldPosition);
              //             if (distance < buff.vo.range) {
              //                 curTargetMap[v.uid] = v;
              //                 count++;
              //             }
              //         }
              //     }
              //     buff.newTargets = {};
              //     for (const monster_id in buff.target) {
              //         if (!curTargetMap[monster_id]) {
              //             // console.log('目标离开了光环范围');
              //             if (buff.vo.target === GameBattle.BuffTargetType.enemy) {
              //                 //对敌人生效的光环
              //                 let role = buff.target[monster_id] as RoleBase;
              //                 for (let effect of buff.effects) {
              //                     if (effect.vo.type === GameBattle.BuffEffectType.AddBuffByOdds) {
              //                         let bid = Number(effect.vo.atr[0]);
              //                         role._buffBox.removeBuffById(bid);
              //                     }
              //                 }
              //             }
              //             delete buff.target[monster_id];
              //         }
              //     }

              //     for (const key in curTargetMap) {
              //         if (!buff.target[key]) {
              //             // console.log('新目标进入了光环范围');
              //             buff.target[key] = curTargetMap[key];
              //             buff.newTargets[key] = buff.target[key];
              //         }
              //     }
              //     if (buff.vo.condition_num > 0) {
              //         if (buff.vo.target === GameBattle.BuffTargetType.enemy) {
              //             //对敌人生效的光环
              //             for (const key in buff.newTargets) {
              //                 let role = buff.newTargets[key] as RoleBase;
              //                 if (buff.checkCondition(count, 0, role)) {
              //                     buff.vo.condition_num--;
              //                     for (let effect of buff.effects) {
              //                         if (effect.vo.type === GameBattle.BuffEffectType.AddBuffByOdds) {
              //                             let bid = Number(effect.vo.atr[0]);
              //                             role._buffBox.addBuff(bid, buff.source);
              //                         }
              //                     }
              //                 } else {
              //                     if (curTargetMap[key]) {
              //                         delete curTargetMap[key];
              //                     }
              //                     if (buff.target[key]) {
              //                         delete buff.target[key];
              //                     }
              //                 }
              //             }
              //         } else {
              //             if (buff.checkCondition(count, 0, this.owner)) {
              //                 buff.vo.condition_num--;
              //                 buff.trigger();
              //             }
              //         }
              //     } else {
              //         if (buff.vo.target === GameBattle.BuffTargetType.enemy) {
              //             //对敌人生效的光环
              //             for (const key in buff.target) {
              //                 let role = buff.target[key] as RoleBase;
              //                 if (!buff.checkCondition(count, 0, role)) {
              //                     buff.vo.condition_num++;
              //                     for (let effect of buff.effects) {
              //                         if (effect.vo.type === GameBattle.BuffEffectType.AddBuffByOdds) {
              //                             let bid = Number(effect.vo.atr[0]);
              //                             role._buffBox.removeBuffById(bid);
              //                         }
              //                     }
              //                 }
              //             }
              //         } else {
              //             //宠物释放吸怪子弹做成了光环，利用这个计数器清cd,不执行出区域清除buff流程，只按时间。
              //             if (vo.effect_interval) {
              //                 buff.ex.effect_interval -= tm;
              //                 if (buff.ex.effect_interval < 0) {
              //                     buff.vo.condition_num++;
              //                     buff.ex.effect_interval = buff.vo.effect_interval;
              //                     buff.remove();
              //                 }
              //             } else {
              //                 if (!buff.checkCondition(count, 0, this.owner)) {
              //                     buff.vo.condition_num++;
              //                     buff.remove();
              //                 }
              //             }
              //         }
              //         // console.log('光环失效');
              //     }

              //     // const distance = Vec3.distance(target.node.worldPosition, this._owner.node.worldPosition);
              // } else {
              if (vo.interval && buff.vo.add_type !== 4) {
                //周期性buff
                buff.ex.interval -= tm;
                if (buff.ex.interval < 0) {
                  //触发一次周期
                  buff.ex.interval = buff.vo.interval;
                  this.trigger(buff);
                  // buff.trigger();
                }
              }

              if (buff.vo.add_type === 4) {
                //堆叠buff
                for (var i = 0; i < buff.ex.timeList.length; i++) {
                  buff.ex.timeList[i] -= tm;
                  buff.ex.intervalTime[i] -= tm;
                }
                if (buff.ex.timeList[0] < 0) {
                  console.log("移除第一层堆叠buff", buff.vo.id);
                  buff.ex.timeList.shift();
                  buff.ex.intervalTime.shift();
                  buff.remove();
                }
                for (var _i2 = 0; _i2 < buff.ex.intervalTime.length; _i2++) {
                  if (buff.ex.intervalTime[_i2] < 0) {
                    //console.log('触发buff 第', i, '层');
                    this.trigger(buff);
                    // buff.trigger();
                    buff.ex.intervalTime[_i2] = buff.vo.interval;
                  }
                }
              }
              // }
              buff.curTime -= tm;
              buff.guanghuanCd -= dt;
              if (buff.curTime <= 0) {
                //移除BUFF
                if (GameConfig.DebugInfo.showBuffLog) {
                  console.log("移除BUFF", buff.vo.id, this._allBuffs);
                }

                // if (buff.vo.type === GameBattle.BuffType.GuangHuan && buff.vo.target === GameBattle.BuffTargetType.enemy) {
                //     //对敌人生效的光环
                //     for (const key in buff.target) {
                //         let role = buff.target[key] as RoleBase;
                //         for (let effect of buff.effects) {
                //             if (effect.vo.type === GameBattle.BuffEffectType.AddBuffByOdds) {
                //                 let bid = Number(effect.vo.atr[0]);
                //                 role._buffBox.removeBuffById(bid);
                //             }
                //         }
                //     }
                // } else {
                this.removeBuff(buff);
                // }
                delete group[key2];
                buff = null;
              }
            }
          }
        };
        _proto.addCatchBuff = function addCatchBuff(buff_id, vo) {
          if (!this.catchBuff[buff_id]) {
            this.catchBuff[buff_id] = [];
          }
          this.catchBuff[buff_id].push(vo);
        };
        _proto.addCatchBuffEffect = function addCatchBuffEffect(buff_effect_id, vo) {
          if (!this.catchBuffEffect[buff_effect_id]) {
            this.catchBuffEffect[buff_effect_id] = [];
          }
          this.catchBuffEffect[buff_effect_id].push(vo);
        };
        _proto.monsterDie = function monsterDie(diePos) {
          for (var i in this._monsterDieCount) {
            var buff = this._monsterDieCount[i].buff;
            var distance = Vec3.distance(diePos, this.owner.node.worldPosition);
            if (distance < buff.vo.range) {
              this._monsterDieCount[i].count++;
              if (buff.vo.condition_num > 0) {
                if (buff.checkCondition(0, this._monsterDieCount[i].count, this.owner)) {
                  buff.trigger();
                  console.log("光环 怪物死亡 buff 生效");
                  buff.vo.condition_num--;
                  this._monsterDieCount[i].count -= buff.vo.condition_val[0];
                }
              }
            }
          }
        };
        _proto.addConstantlySkillBuff = function addConstantlySkillBuff(skillId, cfg) {
          this.constantlySkillBuff[skillId] = cfg;
        };
        _proto.removeConstantlySkillBuff = function removeConstantlySkillBuff(skillId) {
          this.constantlySkillBuff[skillId] = null;
          delete this.constantlySkillBuff[skillId];
        }

        /**
         * 获取技能buff属性值
         * @param skillId
         * @param monsterType
         * @returns
         */;
        _proto.getConstantlySkillBuff = function getConstantlySkillBuff(skillId, monsterType) {
          if (!this.constantlySkillBuff || !this.constantlySkillBuff[skillId]) {
            return [0, 0];
          }
          var vo = this.constantlySkillBuff[skillId];
          var _vo$value = vo.value,
            ratio = _vo$value[0],
            value = _vo$value[1],
            mType = _vo$value[2];
          if (Math.random() * 10000 > ratio) {
            return [0, 0];
          }
          if (mType && monsterType) {
            if (mType !== -1 && monsterType !== mType) {
              return [0, 0];
            }
          }
          if (value > 10000) {
            this.triggerEventBuff(GameBattle.EventBuffId.MiaoSha);
          }
          if (vo.calculate === GameBattle.BuffEffectCalculate.add) {
            return [value, 0];
          } else {
            return [0, value];
          }
        }

        /**
         * 增加属性buff属性
         * @param attrId
         * @param cfg
         */;
        _proto.addConstantlyAttrBuff = function addConstantlyAttrBuff(attrId, cfg) {
          this.constantlyAttrBuff[attrId] = cfg;
        };
        _proto.removeConstantlyAttrBuff = function removeConstantlyAttrBuff(attrId) {
          this.constantlySkillBuff[attrId] = null;
          delete this.constantlyAttrBuff[attrId];
        }

        /**
         * 获取buff属性值
         * @returns
         */;
        _proto.getConstantlyAttrBuff = function getConstantlyAttrBuff(target) {
          var map = {};
          for (var _key2 in this.constantlyAttrBuff) {
            var id = Number(_key2);
            var vo = this.constantlyAttrBuff[id];
            var _vo$value2 = vo.value,
              attrId = _vo$value2[0],
              ratio = _vo$value2[1],
              value = _vo$value2[2];
            if (!map[attrId]) {
              map[attrId] = 0;
            }
            var attr = App.battleProprMgr.featchValueById(id, this.owner.roleVO);
            var pass = false;
            if (vo.algorithm === 8) {
              //检测属性高于某个值
              if (attr > ratio) {
                pass = true;
              }
            } else if (vo.algorithm === 9) {
              //检测属性低于某个值
              if (attr < ratio) {
                pass = true;
              }
            } else if (vo.algorithm === 6) {
              //背水一战
              var maxHp = this.owner.roleVO.getRoleAttr(BattlePropertyName.shengming);
              var r = attr / maxHp * 10000;
              value *= Math.floor((10000 - r) / ratio);
              pass = true;
              // console.log(`背水一战 curhp = ${attr} maxhp=${maxHp} 属性id = ${attrId}, 增加值 ${value}`);
            } else if (vo.algorithm === 10) {
              //移动中
              if (this.owner.moveDirection.x !== 0 || this.owner.moveDirection.y !== 0) {
                pass = true;
              }
            } else if (vo.algorithm === 11) {
              if (target.isBoss()) {
                //BOSS血量低于某个比率
                var wfbHp = target.roleVO.getCurWfbHp();
                // console.log('检测属性变化buff', wfbHp);
                if (wfbHp < ratio) pass = true;
              }
            } else if (vo.algorithm === 12) ;else if (vo.algorithm === 13) ;else if (vo.algorithm === 14) {
              //检测目标身上是否有某个buff组
              if (target._buffBox.getBuffGroupById(vo.atr[0])) {
                pass = true;
              }
            } else if (vo.algorithm === 15) {
              //检测自己身上是否有某个buff组
              if (this.owner._buffBox.getBuffGroupById(vo.atr[0])) {
                pass = true;
              }
            } else if (vo.algorithm === 16) {
              //检测自己身上是否有某个buff
              if (this.owner._buffBox.getBuffById(vo.atr[0])) {
                pass = true;
              }
            }
            if (pass) {
              map[attrId] += value;
            }
          }
          // console.log('检测属性变化buff', map);
          return map;
        }

        /**
         * 增加buff
         * @param eventId
         * @param cfg
         */;
        _proto.addEventBuff = function addEventBuff(eventId, cfg) {
          if (!this.eventBuff[eventId]) {
            this.eventBuff[eventId] = [];
          }
          this.eventBuff[eventId].push(cfg);
        }

        /**
         * 移除buff
         * @param eventId
         */;
        _proto.removeEventBuff = function removeEventBuff(eventId) {
          this.eventBuff[eventId] = null;
          delete this.eventBuff[eventId];
        }

        /**
         * 事件触发BUFF
         * @param eventId 事件id
         * @param triggerId 触发ID(技能ID或者子弹ID)
         * @returns
         */;
        _proto.triggerEventBuff = function triggerEventBuff(eventId, triggerId, hitTarget) {
          if (triggerId === void 0) {
            triggerId = 0;
          }
          if (hitTarget === void 0) {
            hitTarget = null;
          }
          if (!this.eventBuff || !this.eventBuff[eventId]) {
            return;
          }
          if (eventId === GameBattle.EventBuffId.HitEnemy) {
            if (hitTarget) {
              for (var _iterator2 = _createForOfIteratorHelperLoose(this.eventBuff[eventId]), _step2; !(_step2 = _iterator2()).done;) {
                var vo = _step2.value;
                for (var i = 0; i < vo.value.length; i++) {
                  var buffId = vo.value[i];
                  if (vo.target === GameBattle.BuffTargetType.enemy) {
                    hitTarget._buffBox.addBuff(buffId, this.owner);
                  } else if (vo.target === GameBattle.BuffTargetType.self) {
                    this.addBuff(buffId, this.owner);
                  }
                }
              }
            }
          } else if (eventId === GameBattle.EventBuffId.allBall) {
            for (var _iterator3 = _createForOfIteratorHelperLoose(this.eventBuff[eventId]), _step3; !(_step3 = _iterator3()).done;) {
              var _vo = _step3.value;
              for (var _i3 = 0; _i3 < _vo.value.length; _i3++) {
                var _buffId = _vo.value[_i3];
                this.addBuff(_buffId, this.owner);
              }
            }
          } else if (eventId === GameBattle.EventBuffId.hpBall) {
            for (var _iterator4 = _createForOfIteratorHelperLoose(this.eventBuff[eventId]), _step4; !(_step4 = _iterator4()).done;) {
              var _vo2 = _step4.value;
              for (var _i4 = 0; _i4 < _vo2.value.length; _i4++) {
                var _buffId2 = _vo2.value[_i4];
                this.addBuff(_buffId2, this.owner);
              }
            }
          } else if (eventId === GameBattle.EventBuffId.reborn) {
            if (this.owner.roleVO.curHP <= 0) {
              for (var index = 0; index < this.eventBuff[eventId].length; index++) {
                var _vo3$__buff_cd__;
                var _vo3 = this.eventBuff[eventId][index];
                var last_tm = (_vo3$__buff_cd__ = _vo3["__buff_cd__"]) != null ? _vo3$__buff_cd__ : 0;
                var cd = _vo3.value[1];
                var now = Date.now() / 1000;
                if (now - last_tm < cd) {
                  return false;
                }
                _vo3["__buff_cd__"] = now;
                var maxHp = this.owner.roleVO.getRoleAttr(BattlePropertyName.shengming);
                var hp = Math.floor(Number(_vo3.value[0]) / 10000 * maxHp);
                var buff_id = _vo3.value[2];
                if (buff_id > 0) {
                  this.addBuff(buff_id, this.owner);
                }
                this.owner.roleVO.updateCurHP(hp);
                var target = this.owner;
                if (_vo3.vfx) {
                  var guaWorld = target.getMountPoint(_vo3.dummy_point, new Vec3(0, 0, 0));
                  var localPos = target.getComponent(UITransform).convertToNodeSpaceAR(guaWorld);
                  var duration = GameBattle.BuffDurationType.Timer;
                  var time = 0;
                  if (_vo3.vfx_time === -1) {
                    duration = GameBattle.BuffDurationType.Forever;
                  } else if (_vo3.vfx_time > 0) {
                    duration = GameBattle.BuffDurationType.Timer;
                    time = _vo3.vfx_time;
                  } else if (_vo3.vfx_time === -2) {
                    duration = GameBattle.BuffDurationType.SpineTimer;
                    time = 0;
                  }
                  App.monitorMgr.dispatchEvent(MonitorType.battle_buff_attack_effect, {
                    node: target.node,
                    effect: _vo3.vfx,
                    hit_pos: localPos,
                    size: 1,
                    duration: duration,
                    time: time
                  });
                }
              }
            }
          } else if (eventId === GameBattle.EventBuffId.shanBi) {
            var vos = this.eventBuff[eventId];
            for (var _iterator5 = _createForOfIteratorHelperLoose(vos), _step5; !(_step5 = _iterator5()).done;) {
              var _vo4 = _step5.value;
              for (var _i5 = 0; _i5 < _vo4.value.length; _i5++) {
                var _buffId3 = _vo4.value[_i5];
                this.addBuff(_buffId3, this.owner);
              }
            }
          } else if (eventId === GameBattle.EventBuffId.attack) {
            for (var _iterator6 = _createForOfIteratorHelperLoose(this.eventBuff[eventId]), _step6; !(_step6 = _iterator6()).done;) {
              var _vo5 = _step6.value;
              var _vo5$value = _vo5.value,
                id = _vo5$value[0],
                _buffId4 = _vo5$value[1],
                ratio = _vo5$value[2];
              if (id === triggerId) {
                if (Math.random() * 10000 < ratio) {
                  this.addBuff(_buffId4, this.owner);
                }
              }
            }
          } else if (eventId === GameBattle.EventBuffId.underAttack) {
            var _vo6 = this.eventBuff[eventId][0];
            var _vo6$value = _vo6.value,
              _buffId5 = _vo6$value[0],
              _ratio = _vo6$value[1];
            if (Math.random() * 10000 < _ratio) {
              this.addBuff(_buffId5, this.owner);
            }
          } else if (eventId === GameBattle.EventBuffId.enterBattle) {
            var _vo7 = this.eventBuff[eventId][0];
            var _index = Math.floor(Math.random() * _vo7.value.length);
            var _buffId6 = _vo7.value[_index];
            this.addBuff(_buffId6, this.owner);
          } else if (eventId === GameBattle.EventBuffId.userSkill) {
            var _vo8 = this.eventBuff[eventId][0];
            var _vo8$value = _vo8.value,
              bullet_id = _vo8$value[0],
              _ratio2 = _vo8$value[1],
              theta = _vo8$value[2];
            if (Math.random() * 10000 > _ratio2) return;
            var cfg = DBRecord.fetchId("JiNengZiDan", bullet_id);
            var bulletVo = new BulletVO();
            bulletVo.load(cfg);
            bulletVo.bulletEffect = {};
            for (var j = 0; j < bulletVo.effect_id.length; j++) {
              var effect_id = bulletVo.effect_id[j];
              bulletVo.bulletEffect[effect_id] = new BulletEffect();
              var cfg2 = DBRecord.fetchId("JiNengXiaoGuo", effect_id);
              bulletVo.bulletEffect[effect_id].load(cfg2);
            }
            var atkSkill = App.battleMgr.skillCtrl.getAtkSkill(this.owner.uid);
            var _target2 = atkSkill.getTarget();
            if (!_target2) return;
            var hit_point = null;
            if (_vo8.target === 2) {
              hit_point = this.owner.node.worldPosition;
            } else {
              hit_point = atkSkill.getTarget().getHitWorldPosition();
            }
            var angle = BattleUtil.get2DAngleByPoint(this.owner.node.worldPosition, _target2.node.worldPosition);
            var count = Number(_vo8.algorithm);
            MyBulletLauncher.addSubBullet(bulletVo, atkSkill, hit_point, count, angle, theta);
          } else if (eventId === GameBattle.EventBuffId.bulletLaunch) {
            for (var _iterator7 = _createForOfIteratorHelperLoose(this.eventBuff[eventId]), _step7; !(_step7 = _iterator7()).done;) {
              var _vo9 = _step7.value;
              var _vo9$value = _vo9.value,
                _id = _vo9$value[0],
                _buffId7 = _vo9$value[1],
                _ratio3 = _vo9$value[2];
              if (_id === triggerId) {
                if (Math.random() * 10000 < _ratio3) {
                  this.addBuff(_buffId7, this.owner);
                }
              }
            }
          } else if (eventId === GameBattle.EventBuffId.geDang) {
            var _vos = this.eventBuff[eventId];
            for (var _iterator8 = _createForOfIteratorHelperLoose(_vos), _step8; !(_step8 = _iterator8()).done;) {
              var _vo10 = _step8.value;
              for (var _i6 = 0; _i6 < _vo10.value.length; _i6++) {
                var _buffId8 = _vo10.value[_i6];
                this.addBuff(_buffId8, this.owner);
              }
            }
          } else if (eventId === GameBattle.EventBuffId.TuTeng) {
            for (var _iterator9 = _createForOfIteratorHelperLoose(this.eventBuff[eventId]), _step9; !(_step9 = _iterator9()).done;) {
              var _vo11 = _step9.value;
              var _vo11$value = _vo11.value,
                _id2 = _vo11$value[0],
                _buffId9 = _vo11$value[1],
                _ratio4 = _vo11$value[2];
              if (_id2 === triggerId) {
                if (Math.random() * 10000 < _ratio4) {
                  this.addBuff(_buffId9, this.owner);
                }
              }
            }
          } else if (eventId === GameBattle.EventBuffId.MiaoSha) {
            var _vos2 = this.eventBuff[eventId];
            for (var _iterator10 = _createForOfIteratorHelperLoose(_vos2), _step10; !(_step10 = _iterator10()).done;) {
              var _vo12 = _step10.value;
              for (var _i7 = 0; _i7 < _vo12.value.length; _i7++) {
                var _buffId10 = _vo12.value[_i7];
                this.addBuff(_buffId10, this.owner);
              }
            }
          }
        };
        return BuffBox;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuffEffect.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './Utils.ts', './BattleProprMgr.ts', './BulletVO.ts', './BulletEffect.ts', './MyBulletLauncher.ts', './BattleDefine.ts', './MonitorType.ts', './Monster.ts', './GameConfig.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, _decorator, Vec3, tween, v3, DBRecord, Utils, BattlePropertyName, FormulaResultItem, BulletVO, BulletEffect, MyBulletLauncher, GameBattle, MonitorType, Monster, GameConfig, App, BattleUtil;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      tween = module.tween;
      v3 = module.v3;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
      FormulaResultItem = module.FormulaResultItem;
    }, function (module) {
      BulletVO = module.BulletVO;
    }, function (module) {
      BulletEffect = module.BulletEffect;
    }, function (module) {
      MyBulletLauncher = module.MyBulletLauncher;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "9b8e5h5sXlJaK/z1km9itrS", "BuffEffect", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      // ghjgjuy:

      var BuffEffect = exports('BuffEffect', (_dec = ccclass("BuffEffect"), _dec(_class = /*#__PURE__*/function () {
        //效果动作
        function BuffEffect(buffEffectId, owner, buffId, source, skillId) {
          if (skillId === void 0) {
            skillId = 0;
          }
          this.vo = null;
          this._owner = null;
          this._buffId = 0;
          this._skillId = null;
          //源技能
          this._source = null;
          //buff 的源头, 施法者
          this._tween = null;
          var deepCopy = function deepCopy(obj) {
            return JSON.parse(JSON.stringify(obj));
          };
          this._source = source;
          this._buffId = buffId;
          this._skillId = skillId;
          this._owner = owner;
          var vo = DBRecord.fetchId("JiNengBuffXiaoGuo", buffEffectId);
          if (vo) {
            this.vo = deepCopy(vo);
            var catchBuffEffect = source._buffBox.catchBuffEffect[buffEffectId];
            if (catchBuffEffect) {
              for (var i = 0; i < catchBuffEffect.length; i++) {
                BuffEffect.setValue(this.vo, catchBuffEffect[i]);
              }
            }
          }
        }

        /**
         * 强制增加锁定属性
         * @param target
         * @param vo
         */
        var _proto = BuffEffect.prototype;
        _proto.forcedAttr = function forcedAttr(target, vo) {
          var attrDt = {};
          for (var i = 0; i < vo.atr.length; i++) attrDt[vo.atr[i]] = vo.value[i];
          target.roleVO.addLockAttr(this._buffId, attrDt);
        }

        /**
         * 移除锁定属性
         */;
        _proto.removeForcedAttr = function removeForcedAttr() {
          this._owner.owner.roleVO.delLockAttr(this._buffId);
        };
        _proto._dealDamage = function _dealDamage(type) {
          if (type === void 0) {
            type = GameBattle.BuffEffectType.Hurt;
          }
          var target = this._owner.owner;
          var exInfo = {
            dmgType: type,
            mltDmg0: this.vo.value[0],
            eleType: this.vo.element,
            skillId: this._skillId
          };
          if (type === GameBattle.BuffEffectType.Hurt2) {
            exInfo.mltDmg1 = exInfo.mltDmg0;
          } else if (type === GameBattle.BuffEffectType.Hurt3) {
            exInfo.mltDmg1 = exInfo.mltDmg0 * (this._owner.owner.roleVO.curLvl1 || 1);
          }
          //支持固定比例伤害类型
          if (type === GameBattle.BuffEffectType.Hurt) {
            if (this.vo.algorithm !== 1) {
              exInfo.dmgType = this.vo.algorithm;
            }
          }
          var FResult;
          FResult = App.battleProprMgr.execBattleFormula(this._source, target, exInfo, null, this._owner.getBuffById(this._buffId));
          var atkF = Number(FResult[0].toFixed(0));
          atkF = atkF < 0 ? 0 : -atkF;
          target.underAttack(atkF, this.vo.element, null, FResult[1]);
        }

        //触发生效
        ;

        _proto.trigger = function trigger() {
          var v = this.vo;
          if (v.type === GameBattle.BuffEffectType.Hurt || v.type === GameBattle.BuffEffectType.Hurt2 || v.type === GameBattle.BuffEffectType.Hurt3) {
            this._dealDamage(v.type);
            // } else if (v.type === GameBattle.BuffEffectType.Hurt2) {
            //     this._dealDamage(GameBattle.BuffEffectType.Hurt2);
            // } else if (v.type === GameBattle.BuffEffectType.Hurt3) {
            //     this._dealDamage(GameBattle.BuffEffectType.Hurt3);
          } else if (v.type === GameBattle.BuffEffectType.AddAttr1) {
            this._addAttr(this._owner.owner, this.vo);
          } else if (v.type === GameBattle.BuffEffectType.AddAttr2) {
            this._addAttr(this._owner.owner, this.vo, this._owner.owner.roleVO.curLvl1 || 1);
          } else if (v.type === GameBattle.BuffEffectType.AddAttr3) {
            this._addAttr(this._owner.owner, this.vo, this._owner.owner.roleVO.curLvl0 || 1);
          } else if (v.type === GameBattle.BuffEffectType.ForcedAttr) {
            this.forcedAttr(this._owner.owner, this.vo);
          } else if (v.type === GameBattle.BuffEffectType.removeBuff) {
            var buff_id = v.value[0];
            this._owner.removeBuffById(buff_id);
            this._owner.owner.roleVO.clrEffcAttr();
          } else if (v.type === GameBattle.BuffEffectType.removeGroupBuff) {
            var group_id = v.value[0];
            this._owner.removeGroupBuff(group_id);
            this._owner.owner.roleVO.clrEffcAttr();
          } else if (v.type === GameBattle.BuffEffectType.AddBuffByOdds) {
            var odds = Number(v.value[0]);
            if (Math.random() * 10000 < odds) {
              // let buff: Buff = this._owner.getBuffById(this._buffId);
              // //对敌光环
              // if (buff.vo.target === GameBattle.BuffTargetType.enemy && buff.vo.type === GameBattle.BuffType.GuangHuan) {
              //     let targets = buff.newTargets;
              //     for (let uid in targets) {
              //         targets[uid]._buffBox.addBuff(Number(v.atr[0]), this._source, this._skillId);
              //     }
              // } else {
              var target = this._owner.owner;
              if (v.target === 2) {
                target = this._source;
              }
              target._buffBox.addBuff(Number(v.atr[0]), this._source, this._skillId);
              // }
            }
          } else if (v.type === GameBattle.BuffEffectType.XiuGaiShuXing) {
            var role = this._owner.owner;
            // 1-技能id 2-子弹id 3-子弹效果id  4-buffid 5-buff效果id
            if (v.grid_type === 1) {
              for (var k = 0; k < v.atr.length; k++) {
                var skill_id = Number(v.atr[k]);
                var skill = App.battleMgr.skillCtrl.getSkill(role.uid, skill_id);
                if (!skill) {
                  skill = App.battleMgr.skillCtrl.getAtkSkill(role.uid);
                  if (skill.skillID !== Number(skill_id)) {
                    continue;
                  }
                }
                if (!skill) continue;
                BuffEffect.setValue(skill, v);
                if (GameConfig.DebugInfo.showBattleReportLog) {
                  console.log("add skill buff", skill, v.configuration);
                }
              }
            } else if (v.grid_type === 2) {
              var skills = App.battleMgr.skillCtrl.getSkills(role.uid);
              var atkSkill = App.battleMgr.skillCtrl.getAtkSkill(role.uid);
              var allSkills = [].concat(skills, [atkSkill]);
              for (var _k = 0; _k < v.atr.length; _k++) {
                var bullet_id = Number(v.atr[_k]);
                for (var i = 0; i < allSkills.length; i++) {
                  var bullet = allSkills[i].bulletVo[bullet_id];
                  if (bullet) {
                    BuffEffect.setValue(bullet, v);
                    if (GameConfig.DebugInfo.showBattleReportLog) {
                      console.log("add bullet buff", allSkills);
                    }
                    return;
                  }
                }
                if (!this._owner.subBulletBuff[bullet_id]) {
                  this._owner.subBulletBuff[bullet_id] = [];
                }
                this._owner.subBulletBuff[bullet_id].push(v);
              }
            } else if (v.grid_type === 3) {
              var _skills = App.battleMgr.skillCtrl.getSkills(role.uid);
              var _atkSkill = App.battleMgr.skillCtrl.getAtkSkill(role.uid);
              var _allSkills = [].concat(_skills, [_atkSkill]);
              //console.log('add bullet 11 effect buff', allSkills);

              for (var _k2 = 0; _k2 < v.atr.length; _k2++) {
                var effect_id = Number(v.atr[_k2]);
                var flag = false;
                for (var _i = 0; _i < _allSkills.length; _i++) {
                  var bullets = _allSkills[_i].bulletVo;
                  for (var key in bullets) {
                    var effect = bullets[key].bulletEffect[effect_id];
                    if (effect) {
                      BuffEffect.setValue(effect, v);
                      //console.log('add bullet 22 effect buff', allSkills);
                      flag = true;
                      break;
                    }
                  }
                }
                if (!flag) {
                  if (!this._owner.subBulletEffectBuff[effect_id]) {
                    this._owner.subBulletEffectBuff[effect_id] = [];
                  }
                  this._owner.subBulletEffectBuff[effect_id].push(v);
                }
              }
            } else if (v.grid_type === 4) {
              var buffBox = role._buffBox;
              for (var _k3 = 0; _k3 < v.atr.length; _k3++) {
                var _buff_id = Number(v.atr[_k3]);
                var _buff = buffBox.getBuffById(_buff_id);
                if (_buff) {
                  BuffEffect.setValue(_buff.vo, v);
                } else {
                  buffBox.addCatchBuff(_buff_id, v);
                }
              }
            } else if (v.grid_type === 5) {
              var buffEffectId = Number(v.atr[0]);
              var _buffBox = role._buffBox;
              _buffBox.addCatchBuffEffect(buffEffectId, v);
              // let allBuffs = buffBox._allBuffs
              // for(let group in allBuffs){
              //     let buffs = allBuffs[group]
              //     for(let buffId in buffs){
              //         let buff = buffs[buffId]
              //         buff.effects.forEach((effect)=>{
              //             if(effect.vo.effectid === buffEffectId){
              //                 BuffEffect.setValue(effect.vo, v);
              //             }
              //         })
              //     }
              // }
            }
          } else if (v.type === GameBattle.BuffEffectType.XuanYun) {
            //目标眩晕
            var _target = this._owner.owner;
            var _buff_id2 = this._buffId;
            var _buff2 = _target._buffBox.getBuffById(_buff_id2);
            _target.roleSkill.XuanYun(_buff2, this);
          } else if (v.type === GameBattle.BuffEffectType.Round) {
            //目标缠绕
            var _target2 = this._owner.owner;
            var _buff_id3 = this._buffId;
            var _buff3 = _target2._buffBox.getBuffById(_buff_id3);
            _target2.roleSkill.Round(_buff3, this);
          } else if (v.type === GameBattle.BuffEffectType.XiuGaiQuanJuShuXing) {
            this.xiuGaiQUanJuShuXing();
          } else if (v.type === GameBattle.BuffEffectType.AddSkillHurtByOdds) {
            this.addSkillHurtByOdds();
          } else if (v.type === GameBattle.BuffEffectType.ConstantlyAttr) {
            this.addConstantlyAttr();
          } else if (v.type === GameBattle.BuffEffectType.KillSelf) {
            this.killSelf();
          } else if (v.type === GameBattle.BuffEffectType.EventBuff) {
            this.addEventBuff();
          } else if (v.type === GameBattle.BuffEffectType.CreateBullet) {
            this.newBullet();
          } else if (v.type === GameBattle.BuffEffectType.ZhiLiao) {
            this.zhiLiao();
          } else if (v.type === GameBattle.BuffEffectType.Bewitch) {
            this.Bewitch();
          } else if (v.type === GameBattle.BuffEffectType.Invulnerable) {
            this.Invulnerable();
          } else if (v.type === GameBattle.BuffEffectType.Scale) {
            this.scaleMonster();
          } else if (v.type === GameBattle.BuffEffectType.RemoveBuff) {
            for (var _iterator = _createForOfIteratorHelperLoose(this.vo.value), _step; !(_step = _iterator()).done;) {
              var _buff_id4 = _step.value;
              this._owner.removeBuffById(_buff_id4);
            }
          } else if (v.type === GameBattle.BuffEffectType.MaBi) {
            var view = this._owner.owner.view;
            var timeScale = this.vo.value[0];
            view.setTimeScale(timeScale);
          }
          var buff = this._owner.getBuffById(this._buffId);
          // target_role.roleSkill.buffEffect(buff, this)
          if (buff && buff.vo.vfx) {
            buff.setBufVfx();
          } else {
            // TODOO 单体治疗buff特效，不影响其他buff，写死
            if (this.vo.vfx === "effect_common_buff_dantizhiliao") {
              this.setBufVfx();
            }
          }
        };
        _proto._addAttr = function _addAttr(target, vo, rate) {
          if (rate === void 0) {
            rate = 1;
          }
          var attrDt = {};
          for (var i = 0; i < vo.atr.length; i++) {
            //501、502两种效果如果是算法2，则在参数的上下限范围内随机
            if (vo.algorithm === 2) {
              var randomRange = Utils.GetRandomNum(vo.value[2 * i], vo.value[2 * i + 1]);
              console.log("buff特效501,增加属性的随机范围:", randomRange);
              attrDt[vo.atr[i]] = randomRange * rate;
            } else {
              attrDt[vo.atr[i]] = vo.value[i] * rate;
            }
          }

          // target.roleVO.addEffcAttr(this.vo.effectid, attrDt);
          //console.log('添加属性', this.vo.atr, this.vo);
          var buff = this._owner.getBuffById(this._buffId);
          if (buff.vo.target === GameBattle.BuffTargetType.self || buff.vo.target === GameBattle.BuffTargetType.selfAndSummon) {
            target.roleVO.addEffcAttr(this.vo.effectid, attrDt);
          }
        };
        _proto.setBufVfx = function setBufVfx() {
          var vo = this.vo;
          if (vo.vfx) {
            var target = this._owner.owner;
            var localPos = target.getLocalMountPoint(vo.dummy_point, Vec3.ZERO);
            var duration = GameBattle.BuffDurationType.Timer;
            var time = 0;
            if (vo.vfx_time === -1) {
              duration = GameBattle.BuffDurationType.Forever;
            } else if (vo.vfx_time > 0) {
              duration = GameBattle.BuffDurationType.Timer;
              time = vo.vfx_time;
            } else if (vo.vfx_time === -2) {
              duration = GameBattle.BuffDurationType.SpineTimer;
              time = 0;
            }
            var gzNode = target.getBuffNode(1);
            App.monitorMgr.dispatchEvent(MonitorType.battle_buff_attack_effect, {
              node: gzNode,
              effect: vo.vfx,
              hit_pos: localPos,
              size: 1,
              duration: duration,
              time: time
            });
          }
        };
        BuffEffect.setValue = function setValue(data, v) {
          var key = v.configuration;
          var calculate = v.calculate;
          var value = v.value;
          if (calculate === GameBattle.BuffEffectCalculate.add) {
            //加法
            if (Array.isArray(data[key])) {
              var temp = data[key];
              for (var i = 0; i < temp.length; i++) {
                temp[i] += Number(value[i]);
              }
              data[key] = temp;
            } else {
              if (Array.isArray(value[key])) {
                data[key] += Number(value[0]);
              } else {
                data[key] += Number(value);
              }
            }
          } else if (calculate === GameBattle.BuffEffectCalculate.mul) {
            //乘法
            if (Array.isArray(data[key])) {
              var _temp = data[key];
              for (var _i2 = 0; _i2 < _temp.length; _i2++) {
                _temp[_i2] *= Number(value[_i2]);
              }
              data[key] = _temp;
            } else {
              if (Array.isArray(value[key])) {
                data[key] *= Number(value[0]);
              } else {
                data[key] *= Number(value);
              }
            }
          } else if (calculate === GameBattle.BuffEffectCalculate.equ) {
            //直接赋值
            if (Array.isArray(data[key])) {
              data[key] = value;
            } else {
              data[key] = value;
            }
          } else if (calculate === GameBattle.BuffEffectCalculate.append) {
            //追加
            if (Array.isArray(data[key])) {
              var _temp2 = data[key];
              _temp2.push.apply(_temp2, value);
              data[key] = _temp2;
            }
          }
        };
        BuffEffect.removeValue = function removeValue(data, v) {
          var key = v.configuration;
          var calculate = v.calculate;
          var value = v.value;
          if (calculate === GameBattle.BuffEffectCalculate.add) {
            //加法 变减法
            if (Array.isArray(data[key])) {
              var temp = data[key];
              for (var i = 0; i < temp.length; i++) {
                temp[i] -= Number(value[i]);
              }
              data[key] = temp;
            } else {
              if (Array.isArray(value[key])) {
                data[key] -= Number(value[0]);
              } else {
                data[key] -= Number(value);
              }
            }
          } else if (calculate === GameBattle.BuffEffectCalculate.mul) {
            //乘法 变除法
            if (Array.isArray(data[key])) {
              var _temp3 = data[key];
              for (var _i3 = 0; _i3 < _temp3.length; _i3++) {
                _temp3[_i3] /= Number(value[_i3]);
              }
              data[key] = _temp3;
            } else {
              if (Array.isArray(value[key])) {
                data[key] /= Number(value[0]);
              } else {
                data[key] /= Number(value);
              }
            }
          } else if (calculate === GameBattle.BuffEffectCalculate.equ) {
            //直接赋值 不能配置
            console.error("时效 buff 配置了直接赋值的类型");
          } else if (calculate === GameBattle.BuffEffectCalculate.append) {
            //追加
            if (Array.isArray(data[key])) {
              var _temp4 = data[key];
              _temp4.push.apply(_temp4, value);
              data[key] = _temp4;
            }
          }
        }

        //删除buff
        //只有增加属性的buff才会扣除增益的属性, 或者返还减益的属性 伤害类或者移除类的buff不需要处理
        ;

        _proto.remove = function remove() {
          var v = this.vo;
          if (v.type === GameBattle.BuffEffectType.AddAttr1) {
            // this._owner.owner.roleVO.delEffcAttr(v.effectid);
            // let attrv = App.battleProprMgr.featchValueById(this.vo.atr[0], this._owner.owner.roleVO);
            //console.log('删除属性', this.vo.atr, attrv, this.vo);

            var buff = this._owner.getBuffById(this._buffId);
            if (buff.vo.target === GameBattle.BuffTargetType.self || buff.vo.target === GameBattle.BuffTargetType.selfAndSummon) {
              this._owner.owner.roleVO.delEffcAttr(v.effectid);
            }
          } else if (v.type === GameBattle.BuffEffectType.AddAttr2) {
            this._owner.owner.roleVO.delEffcAttr(v.effectid);
          } else if (v.type === GameBattle.BuffEffectType.XiuGaiShuXing) {
            var role = this._owner.owner;
            // 1-技能id 2-子弹id 3-子弹效果id  4-buffid 5-buff效果id
            if (v.grid_type === 1) {
              for (var k = 0; k < v.atr.length; k++) {
                var skill_id = Number(v.atr[k]);
                var skill = App.battleMgr.skillCtrl.getSkill(role.uid, skill_id);
                if (!skill) {
                  skill = App.battleMgr.skillCtrl.getAtkSkill(role.uid);
                  if (!skill) continue;
                  if (skill.skillID !== Number(skill_id)) {
                    continue;
                  }
                }
                if (!skill) continue;
                BuffEffect.removeValue(skill, v);
                console.log("remove buff", skill, v.configuration);
              }
            } else if (v.grid_type === 3) {
              var skills = App.battleMgr.skillCtrl.getSkills(role.uid);
              var atkSkill = App.battleMgr.skillCtrl.getAtkSkill(role.uid);
              var allSkills = [].concat(skills, [atkSkill]);
              for (var _k4 = 0; _k4 < v.atr.length; _k4++) {
                var effect_id = Number(v.atr[_k4]);
                for (var i = 0; i < allSkills.length; i++) {
                  var bullets = allSkills[i].bulletVo;
                  for (var key in bullets) {
                    var effect = bullets[key].bulletEffect[effect_id];
                    if (effect) {
                      BuffEffect.removeValue(effect, v);
                      break;
                    }
                  }
                }
              }
            }
          } else if (v.type === GameBattle.BuffEffectType.XiuGaiQuanJuShuXing) {
            this.removeXiuGaiQUanJuShuXing();
          } else if (v.type === GameBattle.BuffEffectType.AddSkillHurtByOdds) {
            this.removeSkillHurtByOdds();
          } else if (v.type === GameBattle.BuffEffectType.ConstantlyAttr) {
            this.removeConstantlyAttr();
          } else if (v.type === GameBattle.BuffEffectType.EventBuff) {
            this.removeEventBuff();
          } else if (v.type === GameBattle.BuffEffectType.Bewitch) {
            this.removeBewitch();
          } else if (v.type === GameBattle.BuffEffectType.ForcedAttr) {
            this.removeForcedAttr();
          } else if (v.type === GameBattle.BuffEffectType.XuanYun) {
            this._owner.owner.pause = false;
            this._owner.owner.openAtk = true;
            this._owner.owner.state.exitType(GameBattle.ActionState.Stun);
            if (this._owner.owner instanceof Monster) {
              this._owner.owner._monsterAI.stateLock = false;
            }
          } else if (v.type === GameBattle.BuffEffectType.Invulnerable) {
            this.removeInvulnerable();
          } else if (v.type === GameBattle.BuffEffectType.Scale) {
            this.removeScaleMonster();
          } else if (v.type === GameBattle.BuffEffectType.MaBi) {
            var view = this._owner.owner.view;
            view.setTimeScale(1);
          }
        };
        _proto.xiuGaiQUanJuShuXing = function xiuGaiQUanJuShuXing() {
          var vo = this.vo;
          var globalData = App.battleMgr.globalData;
          for (var i = 0; i < vo.atr.length; i++) {
            globalData.setData(vo.atr[i], vo.value[i]);
          }
        };
        _proto.removeXiuGaiQUanJuShuXing = function removeXiuGaiQUanJuShuXing() {
          var vo = this.vo;
          var globalData = App.battleMgr.globalData;
          for (var i = 0; i < vo.atr.length; i++) {
            globalData.setData(vo.atr[i], -vo.value[i]);
          }
        };
        _proto.addSkillHurtByOdds = function addSkillHurtByOdds() {
          var vo = this.vo;
          var skillId = vo.atr[0];
          this._owner.addConstantlySkillBuff(skillId, vo);
        };
        _proto.removeSkillHurtByOdds = function removeSkillHurtByOdds() {
          var vo = this.vo;
          var skillId = vo.atr[0];
          this._owner.removeConstantlySkillBuff(skillId);
        };
        _proto.addConstantlyAttr = function addConstantlyAttr() {
          var vo = this.vo;
          var attrId = vo.atr[0];
          this._owner.addConstantlyAttrBuff(attrId, vo);
        };
        _proto.removeConstantlyAttr = function removeConstantlyAttr() {
          var vo = this.vo;
          var attrId = vo.atr[0];
          this._owner.removeConstantlyAttrBuff(attrId);
        };
        _proto.killSelf = function killSelf() {
          this._owner.owner.doDead();
        };
        _proto.addEventBuff = function addEventBuff() {
          var vo = this.vo;
          var eventId = vo.atr[0];
          this._owner.addEventBuff(eventId, vo);
        };
        _proto.removeEventBuff = function removeEventBuff() {
          var vo = this.vo;
          var eventId = vo.atr[0];
          this._owner.removeEventBuff(eventId);
        };
        _proto.newBullet = function newBullet() {
          var ratio = Number(this.vo.value[0]);
          if (Math.random() * 10000 > ratio) return;
          var bullet_id = Number(this.vo.atr[0]);
          var theta = Number(this.vo.value[1]) || 0;
          var count = Number(this.vo.algorithm);
          var cfg = DBRecord.fetchId("JiNengZiDan", bullet_id);
          var bulletVo = new BulletVO();
          bulletVo.load(cfg);
          bulletVo.bulletEffect = {};
          for (var j = 0; j < bulletVo.effect_id.length; j++) {
            var effect_id = bulletVo.effect_id[j];
            bulletVo.bulletEffect[effect_id] = new BulletEffect();
            var cfg2 = DBRecord.fetchId("JiNengXiaoGuo", effect_id);
            bulletVo.bulletEffect[effect_id].load(cfg2);
          }
          var atkSkill = App.battleMgr.skillCtrl.getAtkSkill(this._owner.owner.uid);
          //某些特殊怪物没有普攻（疯狂公牛），取第一个技能，否则创建的子弹没有_targetType
          if (!atkSkill || !atkSkill.skillID) {
            var monster = this._owner.owner;
            if (monster instanceof Monster && monster.roleVO.skillIDList && monster.roleVO.skillIDList.length > 0) {
              atkSkill = App.battleMgr.skillCtrl.getSkill(this._owner.owner.uid, monster.roleVO.skillIDList[0]);
            }
          }
          var hit_point = null;
          var angle = 0;
          if (this.vo.target === 2) {
            hit_point = this._owner.owner.node.worldPosition;
            if (this.vo.value[2]) {
              var target = atkSkill.getTarget();
              if (!target) return;
              var p = atkSkill.getTarget().getHitWorldPosition();
              var dummy_pos = this._owner.owner.getMountPoint(bulletVo.position, this._owner.owner.node.worldPosition);
              angle = BattleUtil.get2DAngleByPoint(dummy_pos, p);
            }
          } else {
            var _target3 = atkSkill.getTarget();
            if (!_target3) return;
            hit_point = atkSkill.getTarget().getHitWorldPosition();
            angle = BattleUtil.get2DAngleByPoint(this._owner.owner.node.worldPosition, hit_point);
          }
          MyBulletLauncher.addSubBullet(bulletVo, atkSkill, hit_point, count, angle, theta);
          this.setBufVfx();
        }

        /** 治疗 */;
        _proto.zhiLiao = function zhiLiao() {
          var value = this.vo.value[0];
          var roleVO = this._owner.owner.roleVO;
          var maxHp = roleVO.getRoleAttr(BattlePropertyName.shengming);
          if (this.vo.calculate === GameBattle.BuffEffectCalculate.mul) {
            value *= maxHp / 10000;
          }
          if (roleVO.curHP + value > maxHp) {
            value = maxHp - roleVO.curHP;
          }
          value = ~~value;
          roleVO.updateCurHP(value);
          this._owner.owner._showDamageTips(value, 0, FormulaResultItem._zhiliao);
          console.log("\u602A\u7269\u83B7\u5F97\u6CBB\u7597buff \u6CBB\u7597\u91CF\u4E3A " + value + " buffid\u4E3A " + this._buffId);
        }

        /**
         * 无敌
         */;
        _proto.Invulnerable = function Invulnerable() {
          var owner = this._owner.owner;
          owner.invulnerable = true;
          console.log("\u73A9\u5BB6\u83B7\u5F97\u65E0\u654Cbuff \u65E0\u654Cbuff\u65F6\u95F4\u4E3A " + this.vo.value + " buffid\u4E3A " + this._buffId);
        }

        /**
         * 移除无敌
         */;
        _proto.removeInvulnerable = function removeInvulnerable() {
          var owner = this._owner.owner;
          owner.invulnerable = false;
          console.log("\u73A9\u5BB6\u8EAB\u4E0A\u7684\u65E0\u654Cbuff\u65F6\u95F4\u7ED3\u675F\u3002\u65F6\u95F4\u4E3A " + this.vo.value + " buffid\u4E3A " + this._buffId);
        }

        /** 魅惑 */;
        _proto.Bewitch = function Bewitch() {
          var _this = this;
          var buff = this._owner.getBuffById(this._buffId);
          var tm = buff.vo.time / 1000;
          var targetPos = this._source.node.worldPosition.clone();
          var node = this._owner.owner.node;
          var self = this._owner.owner;
          self.state.type = GameBattle.ActionState.Bewitch;
          // eslint-disable-next-line @typescript-eslint/no-this-alias
          var that = this;
          var t = tween(node).to(tm, {
            scale_z: 1
          }, {
            onUpdate: function onUpdate(target, ratio) {
              var frameSpeed = self.getFrameSpeed();
              var moveDir = App.mapMgr.getMoveVector(node.worldPosition, targetPos);
              if (moveDir.x === 0 && moveDir.y === 0) {
                //同一个地图坐标格
                if (that._tween) {
                  that._tween = null;
                  self.view.play("Idle", true);
                }
                return;
              }
              var offset = moveDir.clone().multiplyScalar(frameSpeed);
              var pos = node.position.clone();
              var x = offset.x;
              var y = offset.y;
              // 检查新位置是否可移动
              if (!App.mapMgr.checkCanMove(v3(pos.x + x, pos.y + y, 0), true)) {
                if (App.mapMgr.checkCanMove(v3(pos.x + x, pos.y, 0), true)) {
                  y = 0;
                } else if (App.mapMgr.checkCanMove(v3(pos.x, pos.y + y, 0), true)) {
                  x = 0;
                } else {
                  x = 0;
                  y = 0;
                }
              }
              node.setPosition(pos.x + x, pos.y + y, pos.z);
            }
          }).call(function () {
            that._tween = null;
            _this._owner.owner.state.exitType(GameBattle.ActionState.Bewitch);
          }).start();
          this._tween = t;
        }
        /** 移除魅惑 */;
        _proto.removeBewitch = function removeBewitch() {
          if (this._tween) {
            this._tween.stop();
            this._tween = null;
          }
          this._owner.owner.state.exitType(GameBattle.ActionState.Bewitch);
        };
        _proto.scaleMonster = function scaleMonster() {
          var s = Number(this.vo.value[0]) / 10000;
          this._owner.owner.node.setScale(s, s, s);
        };
        _proto.removeScaleMonster = function removeScaleMonster() {
          var s = this._owner.owner.roleVO.size / 10000;
          this._owner.owner.node.setScale(s, s, s);
        };
        return BuffEffect;
      }()) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuildingBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './PlaceGameEnum.ts', './App.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Enum, Sprite, Vec2, Node, Vec3, Component, BuildingType, App, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Enum = module.Enum;
      Sprite = module.Sprite;
      Vec2 = module.Vec2;
      Node = module.Node;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "05326JAIglJ0qxecLFDTcVl", "BuildingBase", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var EditorBuildingType = Enum(BuildingType);

      /**
       * 建筑基类
       */
      var BuildingBase = exports('BuildingBase', (_dec = property({
        type: EditorBuildingType,
        displayName: "建筑类型"
      }), _dec2 = property({
        type: Sprite,
        displayName: "建筑图标"
      }), ccclass(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BuildingBase, _Component);
        function BuildingBase() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /**
           * 建筑序列号（在编辑器中设置）
           */
          _initializerDefineProperty(_this, "buildIndex", _descriptor, _assertThisInitialized(_this));
          /**
           * 建筑类型（在编辑器中设置）
           */
          _initializerDefineProperty(_this, "buildType", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildImg", _descriptor3, _assertThisInitialized(_this));
          /**
           * 建筑是否可点击
           */
          _this.clickable = true;
          /**
           * 触摸开始位置
           */
          _this._touchStartPos = new Vec2();
          /**
           * 是否正在拖动
           */
          _this._isDragging = false;
          /**
           * 拖动阈值
           */
          _this.DRAG_THRESHOLD = 10;
          return _this;
        }
        var _proto = BuildingBase.prototype;
        _proto.init = function init() {
          this.setupClickEvent();
        };
        _proto.setupClickEvent = function setupClickEvent() {
          this.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
          this.node.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
          this.node.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
          this.node.on(Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
        };
        _proto.onTouchStart = function onTouchStart(event) {
          var touchPos = event.getUILocation();
          this._touchStartPos.set(touchPos.x, touchPos.y);
          this._isDragging = false;
        };
        _proto.onTouchMove = function onTouchMove(event) {
          var touchPos = event.getUILocation();
          var deltaX = touchPos.x - this._touchStartPos.x;
          var deltaY = touchPos.y - this._touchStartPos.y;
          var distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
          if (distance > this.DRAG_THRESHOLD) {
            this._isDragging = true;
          }
        };
        _proto.onTouchEnd = function onTouchEnd(event) {
          var touchPos = event.getUILocation();
          var deltaX = touchPos.x - this._touchStartPos.x;
          var deltaY = touchPos.y - this._touchStartPos.y;
          var distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
          if (this._isDragging || distance > this.DRAG_THRESHOLD) {
            this._isDragging = false;
            return;
          }
          event.propagationStopped = true;
          this.onClick(event);
        }

        /**
         * 点击事件处理
         */;
        _proto.onClick = function onClick(event) {
          if (!this.clickable) return;
          if (this.buildImg && !this.isPointInTexture(event)) return;
          this.onBuildingClick();
        }

        /**
         * 检查点击位置是否在纹理的非透明区域内
         */;
        _proto.isPointInTexture = function isPointInTexture(event) {
          if (!this.buildImg || !this.buildImg.spriteFrame) return true;
          var touchPos = event.getUILocation();
          var touchPosInNode = this.node.uiTransform.convertToNodeSpaceAR(new Vec3(touchPos.x, touchPos.y, 0));
          var spriteSize = this.buildImg.node.uiTransform.contentSize;
          var anchor = this.buildImg.node.uiTransform.anchorPoint;
          var textureWidth = this.buildImg.spriteFrame.width;
          var textureHeight = this.buildImg.spriteFrame.height;
          var textureX = (touchPosInNode.x + anchor.x * spriteSize.width) / spriteSize.width;
          var textureY = (touchPosInNode.y + anchor.y * spriteSize.height) / spriteSize.height;
          if (textureX < 0 || textureX > 1 || textureY < 0 || textureY > 1) {
            return false;
          }
          var pixelX = Math.floor(textureX * textureWidth);
          var pixelY = Math.floor((1 - textureY) * textureHeight);
          return this.checkPixelAlpha(this.buildImg.spriteFrame, pixelX, pixelY);
        }

        /**
         * 检查指定像素位置的透明度
         * @param spriteFrame 精灵帧
         * @param x 像素X坐标
         * @param y 像素Y坐标
         * @returns 是否为非透明像素
         */;
        _proto.checkPixelAlpha = function checkPixelAlpha(spriteFrame, x, y) {
          try {
            var texture = spriteFrame.texture;
            var width = texture.width;
            var height = texture.height;
            var centerX = width / 2;
            var centerY = height / 2;
            var distance = Math.sqrt(Math.pow(x - centerX, 2) + Math.pow(y - centerY, 2));
            var maxDistance = Math.min(width, height) / 2;
            return distance < maxDistance * 1.2;
          } catch (error) {
            console.warn("Failed to check pixel:", error);
            return true;
          }
        }

        /**
         * 升级建筑
         * @param level 目标等级
         * @returns 是否升级成功
         */;
        _proto.upgrade = function upgrade(level) {
          if (this._dataModel) {
            this._dataModel.level = level;
            this.onLevelChanged();
            App.log.logBusiness("\u5EFA\u7B51\u5347\u7EA7: " + this._name + " \u5347\u7EA7\u5230 " + level + " \u7EA7");
            return true;
          }
          return false;
        };
        _proto.setClickable = function setClickable(clickable) {
          this.clickable = clickable;
        };
        _proto.getBuildName = function getBuildName() {
          return PlaceConfigMgr.inst.getJianZhuConfig(this._dataModel.getBuildType()).Name;
        };
        _proto.getPosition = function getPosition() {
          return this._dataModel ? this._dataModel.position : {
            x: 0,
            y: 0
          };
        }

        /**
         * 设置建筑位置
         * @param x x坐标
         * @param y y坐标
         */;
        _proto.setPosition = function setPosition(x, y) {
          if (this._dataModel) {
            this._dataModel.position = {
              x: x,
              y: y
            };
          }
          this.node.setPosition(x, y);
        }

        /**
         * 显示飘字效果
         * @param text 飘字内容
         * @param color 飘字颜色
         */;
        _proto.showPromptText = function showPromptText(text) {
          App.log.logBusiness("\u5EFA\u7B51\u98D8\u5B57: " + text + " (\u5EFA\u7B51: " + this._name + ")");
        }

        /**
         * 更新建筑图标
         */;
        _proto.updateBuildImg = function updateBuildImg() {
          if (this.buildImg) ;
        }

        /**
         * 播放建筑动画
         * @param animName 动画名称
         */;
        _proto.onDestroy = function onDestroy() {
          this.node.off(Node.EventType.TOUCH_START, this.onTouchStart, this);
          this.node.off(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
          this.node.off(Node.EventType.TOUCH_END, this.onTouchEnd, this);
          this.node.off(Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
        };
        return BuildingBase;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "buildIndex", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "buildType", [_dec], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return EditorBuildingType.FuHua;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildImg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuildingCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './FuHuaZhongXin.ts', './BuBingYing.ts', './DiBiao.ts', './MoFang.ts', './PlaceGameMgr.ts', './PlaceGameEnum.ts', './GongBingYing.ts', './QiBingYing.ts', './ZhiHuiBu.ts', './FaMuChang.ts', './CaiKuangChang.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Component, FuHuaZhongXin, BuBingYing, DiBiao, MoFang, PlaceGameMgr, BuildingType, GongBingYing, QiBingYing, ZhiHuiBu, FaMuChang, CaiKuangChang, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }, function (module) {
      FuHuaZhongXin = module.FuHuaZhongXin;
    }, function (module) {
      BuBingYing = module.BuBingYing;
    }, function (module) {
      DiBiao = module.DiBiao;
    }, function (module) {
      MoFang = module.MoFang;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      GongBingYing = module.GongBingYing;
    }, function (module) {
      QiBingYing = module.QiBingYing;
    }, function (module) {
      ZhiHuiBu = module.ZhiHuiBu;
    }, function (module) {
      FaMuChang = module.FaMuChang;
    }, function (module) {
      CaiKuangChang = module.CaiKuangChang;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
      cclegacy._RF.push({}, "bc3e0xLisFFBJZPl9viUPMD", "BuildingCtrl", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 建筑管理器
       * 负责管理所有建筑的创建、升级等操作
       */
      var BuildingCtrl = exports('BuildingCtrl', (_dec = ccclass("BuildingCtrl"), _dec2 = property({
        type: FuHuaZhongXin,
        tooltip: "孵化中心建筑"
      }), _dec3 = property({
        type: BuBingYing,
        tooltip: "步兵兵营建筑"
      }), _dec4 = property({
        type: GongBingYing,
        tooltip: "弓兵兵营建筑"
      }), _dec5 = property({
        type: QiBingYing,
        tooltip: "骑兵兵营建筑"
      }), _dec6 = property({
        type: ZhiHuiBu,
        tooltip: "指挥部建筑"
      }), _dec7 = property({
        type: DiBiao,
        tooltip: "地标建筑"
      }), _dec8 = property({
        type: MoFang,
        tooltip: "磨坊建筑"
      }), _dec9 = property({
        type: FaMuChang,
        tooltip: "伐木场建筑"
      }), _dec10 = property({
        type: CaiKuangChang,
        tooltip: "采矿场建筑"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BuildingCtrl, _Component);
        function BuildingCtrl() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "fuhuaComp", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bubingyingComp", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "gongbingyingComp", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "qibingyingComp", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "zhiHuiBuComp", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "dibiaoComp", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "mofangCompArr", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "famuchangCompArr", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "caikuangchangCompArr", _descriptor9, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = BuildingCtrl.prototype;
        _proto.onLoad = function onLoad() {
          PlaceGameMgr.inst.setBuildCtrl(this);
          this.initBuilds();
          PlaceGameMgr.inst.loadAutoTrainSettings();
          PlaceGameMgr.inst.moveToBuilding(BuildingType.FuHua, function () {}, false);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        };
        _proto.initBuilds = function initBuilds() {
          var _this2 = this;
          // 初始化所有建筑
          if (this.fuhuaComp) {
            var serverData = PlaceGameMgr.inst.buildings.find(function (build) {
              return build.building_id === _this2.fuhuaComp.buildType && build.sid === _this2.fuhuaComp.buildIndex;
            });
            this.fuhuaComp.initDataModel(serverData);
          }

          // 初始化步兵营建筑
          if (this.bubingyingComp) {
            var _serverData = PlaceGameMgr.inst.buildings.find(function (build) {
              return build.building_id === BuildingType.BuBingYing && build.sid === _this2.bubingyingComp.buildIndex;
            });
            this.bubingyingComp.initDataModel(_serverData);
          }

          // 初始化弓兵营建筑
          if (this.gongbingyingComp) {
            var serverData2 = PlaceGameMgr.inst.buildings.find(function (build) {
              return build.building_id === BuildingType.GongBingYing && build.sid === _this2.gongbingyingComp.buildIndex;
            });
            this.gongbingyingComp.initDataModel(serverData2);
          }

          // 初始化骑兵营建筑
          if (this.qibingyingComp) {
            var _serverData2 = PlaceGameMgr.inst.buildings.find(function (build) {
              return build.building_id === BuildingType.QiBingYing && build.sid === _this2.qibingyingComp.buildIndex;
            });
            this.qibingyingComp.initDataModel(_serverData2);
          }

          // 初始化指挥中心
          if (this.zhiHuiBuComp) {
            var _serverData3 = PlaceGameMgr.inst.buildings.find(function (build) {
              return build.building_id === BuildingType.ZhiHuiBu && build.sid === _this2.zhiHuiBuComp.buildIndex;
            });
            if (_serverData3) {
              this.zhiHuiBuComp.initDataModel(_serverData3);
            }
          }

          // 初始化地标建筑
          if (this.dibiaoComp) {
            var _serverData4 = PlaceGameMgr.inst.buildings.find(function (build) {
              return build.building_id === BuildingType.DiBiao && build.sid === _this2.dibiaoComp.buildIndex;
            });
            this.dibiaoComp.initDataModel(_serverData4);
          }

          // // 初始化磨坊建筑
          // if (this.mofangCompArr) {
          //     for (const comp of this.mofangCompArr) {
          //         let serverData = PlaceGameMgr.inst.buildings.find(build => build.building_id === BuildingType.MoFang && build.sid === comp.buildIndex);
          //         comp.initDataModel(serverData);
          //     }
          // }

          // // 初始化伐木场建筑
          // if (this.famuchangCompArr) {
          //     for (const comp of this.famuchangCompArr) {
          //         let serverData = PlaceGameMgr.inst.buildings.find(build => build.building_id === BuildingType.FaMuChang && build.sid === comp.buildIndex);
          //         comp.initDataModel(serverData);
          //     }
          // }

          // // 初始化采矿场建筑
          // if (this.caikuangchangCompArr) {
          //     for (const comp of this.caikuangchangCompArr) {
          //         let serverData = PlaceGameMgr.inst.buildings.find(build => build.building_id === BuildingType.CaiKuangChang && build.sid === comp.buildIndex);
          //         comp.initDataModel(serverData);
          //     }
          // }
        }

        /**
         * 获取孵化中心节点
         * @returns
         */;
        _proto.getFuHuaComp = function getFuHuaComp() {
          if (!this.fuhuaComp) {
            return null;
          }
          return this.fuhuaComp;
        }

        /**
         * 获取步兵营建筑节点
         * @returns
         */;
        _proto.getBuBingYingComp = function getBuBingYingComp() {
          if (!this.bubingyingComp) {
            return null;
          }
          return this.bubingyingComp;
        }

        /**
         * 获取弓兵营建筑节点
         * @returns
         */;
        _proto.getGongBingYingComp = function getGongBingYingComp() {
          if (!this.gongbingyingComp) {
            return null;
          }
          return this.gongbingyingComp;
        };
        _proto.getQiBingYingComp = function getQiBingYingComp() {
          if (!this.qibingyingComp) {
            return null;
          }
          return this.qibingyingComp;
        }

        /**
         * 获取指挥部建筑节点
         * @returns
         */;
        _proto.getZhiHuiBuComp = function getZhiHuiBuComp() {
          if (!this.zhiHuiBuComp) {
            return null;
          }
          return this.zhiHuiBuComp;
        }

        /**
         * 获取地标建筑节点
         * @returns
         */;
        _proto.getDiBiaoComp = function getDiBiaoComp() {
          if (!this.dibiaoComp) {
            return null;
          }
          return this.dibiaoComp;
        }

        /**
         * 获取磨坊建筑组件
         */;
        _proto.getMoFangComp = function getMoFangComp(buildIndex) {
          if (!this.mofangCompArr || this.mofangCompArr.length === 0) {
            return null;
          }
          if (buildIndex < 1 || buildIndex > this.mofangCompArr.length) {
            return null;
          }
          var comp = this.mofangCompArr[buildIndex - 1];
          if (!comp) {
            return null;
          }
          return comp;
        }

        /**
         * 获取伐木场建筑组件
         */;
        _proto.getFaMuChangComp = function getFaMuChangComp(buildIndex) {
          if (!this.famuchangCompArr || this.famuchangCompArr.length === 0) {
            return null;
          }
          if (buildIndex < 1 || buildIndex > this.famuchangCompArr.length) {
            return null;
          }
          var comp = this.famuchangCompArr[buildIndex - 1];
          if (!comp) {
            return null;
          }
          return comp;
        }

        /**
         * 获取采矿场建筑组件
         */;
        _proto.getCaiKuangChangComp = function getCaiKuangChangComp(buildIndex) {
          if (!this.caikuangchangCompArr || this.caikuangchangCompArr.length === 0) {
            return null;
          }
          if (buildIndex < 1 || buildIndex > this.caikuangchangCompArr.length) {
            return null;
          }
          var comp = this.caikuangchangCompArr[buildIndex - 1];
          if (!comp) {
            return null;
          }
          return comp;
        }

        /**
         * 获取建筑组件
         * @param buildType 建筑类型
         * @param buildIndex 建筑索引
         */;
        _proto.getBuildingComp = function getBuildingComp(buildType, buildIndex) {
          var comp = null;
          switch (buildType) {
            case BuildingType.FuHua:
              // 孵化中心
              comp = this.getFuHuaComp();
              break;
            case BuildingType.ZhiHuiBu:
              // 指挥部
              comp = this.getZhiHuiBuComp();
              break;
            case BuildingType.DiBiao:
              // 地标
              comp = this.getDiBiaoComp();
              break;
            case BuildingType.BuBingYing:
              // 步兵营
              comp = this.getBuBingYingComp();
              break;
            case BuildingType.GongBingYing:
              // 弓兵营
              comp = this.getGongBingYingComp();
              break;
            case BuildingType.QiBingYing:
              // 骑兵营
              comp = this.getQiBingYingComp();
              break;
            case BuildingType.MoFang:
              // 磨坊
              comp = this.getMoFangComp(buildIndex);
              break;
            case BuildingType.FaMuChang:
              // 伐木场
              comp = this.getFaMuChangComp(buildIndex);
              break;
            case BuildingType.CaiKuangChang:
              // 采矿场
              comp = this.getCaiKuangChangComp(buildIndex);
              break;
            default:
              return null;
          }
          return comp;
        };
        return BuildingCtrl;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "fuhuaComp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "bubingyingComp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "gongbingyingComp", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "qibingyingComp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "zhiHuiBuComp", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "dibiaoComp", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "mofangCompArr", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "famuchangCompArr", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "caikuangchangCompArr", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuildingModel.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './PlaceGameEnum.ts'], function (exports) {
  var _createClass, _extends, cclegacy, BuildingStatus;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _extends = module.extends;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      BuildingStatus = module.BuildingStatus;
    }],
    execute: function () {
      cclegacy._RF.push({}, "d17d3aRUcVE4JJ1AGUOK2DL", "BuildingModel", undefined);

      /**
       * 建筑模型基类
       */
      var BuildingModel = exports('BuildingModel', /*#__PURE__*/function () {
        /**
         * 构造函数
         * @param buildingUid 建筑唯一ID（服务器生成）
         * @param level 初始等级
         */
        function BuildingModel(buildIndex, buildType, buildingUid, level, owner) {
          /**
           * 建筑序列号
           */
          this.buildIndex = 0;
          /**
           * 建筑类型
           */
          this.buildType = 0;
          /**
           * 建筑唯一ID（服务器生成）
           */
          this._buildingUid = 0;
          /**
           * 当前等级
           */
          this._level = 0;
          /**
           * 建筑状态
           */
          this._status = BuildingStatus.LOCK;
          /**
           * 建筑位置
           */
          this._position = {
            x: 0,
            y: 0
          };
          /**
           * 是否正在升级（独立于工作状态）
           */
          this._isUpgrading = false;
          /**
           * 服务器返回的建筑数据
           */
          this.serverData = null;
          /**
           * 拥有者
           */
          this.owner = null;
          this.buildIndex = buildIndex;
          this.buildType = buildType;
          this._buildingUid = buildingUid;
          this._level = level;
          this.owner = owner;
        }

        /**
         * 从服务器数据初始化模型
         * @param serverData 服务器返回的建筑数据
         */
        var _proto = BuildingModel.prototype;
        _proto.setServerData = function setServerData(serverData) {
          if (serverData) {
            this.serverData = serverData;
            this._buildingUid = serverData.building_uid;
            this._level = serverData.building_level;
          }
        }

        /**
         * 获取服务器返回的建筑数据
         * @returns 服务器返回的建筑数据
         */;
        _proto.getServerData = function getServerData() {
          return this.serverData;
        }

        /**
         * 获取建筑是否正在升级
         */;
        _proto.getBuildType = function getBuildType() {
          return this.buildType;
        };
        _proto.getBuildIndex = function getBuildIndex() {
          return this.buildIndex;
        }

        /**
         * 判断建筑是否已解锁
         */;
        /**
         * 等级改变时的回调（子类可覆盖）
         */
        _proto.onLevelChanged = function onLevelChanged(newLevel) {
          // 子类可覆盖此方法处理等级改变逻辑
        }

        /**
         * 获取建筑位置
         */;
        _createClass(BuildingModel, [{
          key: "isUpgrading",
          get: function get() {
            return this._isUpgrading;
          },
          set: function set(flag) {
            this._isUpgrading = flag;
          }
        }, {
          key: "isUnlocked",
          get: function get() {
            return this._buildingUid > 0;
          }

          /**
           * 获取建筑唯一ID
           */
        }, {
          key: "buildingUid",
          get: function get() {
            return this._buildingUid;
          }

          /**
           * 设置建筑唯一ID
           */,
          set: function set(value) {
            this._buildingUid = value;
          }

          /**
           * 获取当前等级
           */
        }, {
          key: "level",
          get: function get() {
            return this._level;
          }

          /**
           * 设置等级
           */,
          set: function set(value) {
            this._level = Math.max(0, value);
            this.onLevelChanged(this._level);
          }
        }, {
          key: "position",
          get: function get() {
            return _extends({}, this._position);
          }

          /**
           * 设置建筑位置
           */,
          set: function set(value) {
            this._position = {
              x: value.x,
              y: value.y
            };
          }

          /**
           * 获取建造信息
           */
        }, {
          key: "status",
          get:
          /**
           * 获取建筑状态
           */
          function get() {
            return this._status;
          },
          set: function set(value) {
            this._status = value;
          }
        }]);
        return BuildingModel;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BuildItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './PlaceConfigMgr.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Component, PlaceConfigMgr, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Component = module.Component;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "2c481N5auVDHbMY43WPiFmo", "BuildItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var BuildItem = exports('BuildItem', (_dec = ccclass("BuildItem"), _dec2 = property({
        type: Sprite,
        displayName: "建筑图标",
        tooltip: "建筑图标"
      }), _dec3 = property({
        type: Sprite,
        displayName: "新标识图标",
        tooltip: "新标识图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BuildItem, _Component);
        function BuildItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "icon", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "newImg", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = BuildItem.prototype;
        _proto.show = function show(buildType, isNew) {
          if (isNew === void 0) {
            isNew = true;
          }
          if (this.icon) {
            var icon = PlaceConfigMgr.inst.getBuildingIcon(buildType);
            UtilGame.loadBuildIcon(this.icon, icon);
          }
          if (this.newImg) {
            this.newImg.node.active = isNew;
          }
        };
        return BuildItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "icon", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "newImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletAttack.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts'], function (exports) {
  var _createClass, cclegacy, Vec3, App;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "65914aZ6P9LG7RG9piKVGOD", "BulletAttack", undefined);

      /** 无穷大数值 */
      var Infinity = -1;

      /**
       * 子弹攻击体类
       */
      var BulletAttack = exports('BulletAttack', /*#__PURE__*/function () {
        function BulletAttack() {
          // /** 形状 */
          // protected _shape: number = 0;
          // public get shape() { return this._shape; }
          // public set shape(v) { this._shape = v; }
          /** 持有者 */
          this._owner = void 0;
          /** 当前穿透数 */
          this._curPenetrateNum = 0;
          /** 当前弹射次数 */
          this._curCatapultNum = 0;
          /** 当前持续时间 */
          this._curDuration = 0;
          /** 是否已结束 */
          this._isEnd = false;
          this.init();
        }
        var _proto = BulletAttack.prototype;
        _proto.reset = function reset() {
          this._isEnd = false;
          this._curPenetrateNum = 0;
          this._curDuration = 0;
          this._curCatapultNum = 0;
        };
        _proto.init = function init() {};
        _proto.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          this._onDuration(dt);
        }

        /**
         * 发射
         */;
        _proto.launch = function launch() {}

        /**
         * 持续时间逻辑
         * @param dt
         * @returns
         */;
        _proto._onDuration = function _onDuration(dt) {
          if (this._checkDuration()) return;
          if (!this.owner.launchered) return;
          var maxNum = this._owner.bulletVO.holding_time;
          this._curDuration += dt;
          this._curDuration = this._curDuration > maxNum ? maxNum : this._curDuration;
          this._updateEnd();
        }

        /**
         * 击中时
         */;
        _proto.onHit = function onHit(target) {
          this._onPenetrate();
          this._updateEnd();
        }

        /**
         * 穿透
         * @returns
         */;
        _proto._onPenetrate = function _onPenetrate() {
          if (this._checkPenetrateNum()) return;
          var maxPenetrateNum = this._owner.bulletVO.penetrate_num;
          this._curPenetrateNum++;
          this._curPenetrateNum = this._curPenetrateNum > maxPenetrateNum ? maxPenetrateNum : this._curPenetrateNum;
        }

        /**
         * 寻找弹射目标
         * @param curTarget 当前作用目标
         * @returns
         */;
        _proto._findCatapultTarget = function _findCatapultTarget(curTarget) {
          var bullet = this._owner;
          var newTarget;
          App.battleMgr.roleCtrl.foreachEntity(this, function (v) {
            if (newTarget) return false;
            if (!bullet.bulletVO.repeat) {
              if (bullet.hitHistoryList.get(v.uid)) return false;
            }
            if (!bullet.checkTargetType(v)) return;
            var distance = Vec3.distance(curTarget.node.worldPosition, v.node.worldPosition);
            if (distance > bullet.bulletVO.catapult_srange) return false;
            newTarget = v;
            return true;
          });
          return newTarget;
        }

        /**
         * 是否持续时间到了
         * @returns
         */;
        _proto._checkDuration = function _checkDuration() {
          var result = true;
          var maxDuration = this._owner.bulletVO.holding_time;
          if (maxDuration === Infinity || maxDuration === -2) {
            // 永久持续时间
            result = false;
          } else {
            result = this._curDuration === maxDuration;
          }
          return result;
        }

        /**
         * 是否达到穿透数量
         * @returns
         */;
        _proto._checkPenetrateNum = function _checkPenetrateNum() {
          var result = true;
          var maxNum = this._owner.bulletVO.penetrate_num;
          if (maxNum === 0) {
            // 无此判定
            result = false;
          } else if (maxNum === Infinity) {
            // 无限数量
            result = false;
          } else {
            result = this._curPenetrateNum === maxNum;
          }
          return result;
        }

        /**
         * 是否达到弹射次数
         * @returns
         */;
        _proto._checkCatapultNum = function _checkCatapultNum() {
          var result = true;
          var maxNum = this._owner.bulletVO.catapults_num;
          if (maxNum === 0) {
            // 无此判定
            result = false;
          } else if (maxNum === Infinity) {
            // 无限数量
            result = false;
          } else {
            result = this._curCatapultNum === maxNum;
          }
          return result;
        };
        _proto._updateEnd = function _updateEnd() {
          this._isEnd = this._checkDuration() || this._checkPenetrateNum() || this._checkCatapultNum();
        };
        _createClass(BulletAttack, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "curPenetrateNum",
          get: function get() {
            return this._curPenetrateNum;
          },
          set: function set(v) {
            this._curPenetrateNum = v;
          }
        }, {
          key: "curCatapultNum",
          get: function get() {
            return this._curCatapultNum;
          },
          set: function set(v) {
            this._curCatapultNum = v;
          }
        }, {
          key: "curDuration",
          get: function get() {
            return this._curDuration;
          },
          set: function set(v) {
            this._curDuration = v;
          }
        }, {
          key: "isEnd",
          get: function get() {
            return this._isEnd;
          },
          set: function set(v) {
            this._isEnd = v;
          }
        }]);
        return BulletAttack;
      }());

      /**
       * 子弹攻击体类 —— 穿透功能
       */
      var BulletAttack_Penetrate = exports('BulletAttack_Penetrate', /*#__PURE__*/function () {
        function BulletAttack_Penetrate() {
          /** 持有者 */
          this._owner = void 0;
          /** 当前穿透数 */
          this._curPenetrateNum = 0;
        }
        var _proto2 = BulletAttack_Penetrate.prototype;
        _proto2.onHit = function onHit() {
          if (this._checkPenetrateNum()) return;
          var maxPenetrateNum = this._owner.bulletVO.penetrate_num;
          this._curPenetrateNum++;
          this._curPenetrateNum = this._curPenetrateNum > maxPenetrateNum ? maxPenetrateNum : this._curPenetrateNum;
        }

        /**
         * 是否达到穿透数量
         * @returns
         */;
        _proto2._checkPenetrateNum = function _checkPenetrateNum() {
          var result = true;
          var maxPenetrateNum = this._owner.bulletVO.penetrate_num;
          if (maxPenetrateNum === Infinity) {
            // 无限数量
            result = false;
          } else {
            result = this._curPenetrateNum === maxPenetrateNum;
          }
          return result;
        };
        _createClass(BulletAttack_Penetrate, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "curPenetrateNum",
          get: function get() {
            return this._curPenetrateNum;
          },
          set: function set(v) {
            this._curPenetrateNum = v;
          }
        }]);
        return BulletAttack_Penetrate;
      }());

      /**
       * 子弹攻击体类 —— 弹射功能
       */
      var BulletAttack_Catapult = exports('BulletAttack_Catapult', /*#__PURE__*/function () {
        function BulletAttack_Catapult() {
          /** 持有者 */
          this._owner = void 0;
          /** 当前弹射次数 */
          this._curCatapultNum = 0;
          /** 是否已结束 */
          this._isEnd = false;
        }
        var _proto3 = BulletAttack_Catapult.prototype;
        /**
         * 是否达到弹射次数
         * @returns
         */
        _proto3._checkCatapultNum = function _checkCatapultNum() {
          var result = true;
          var maxPenetrateNum = this._owner.bulletVO.catapults_num;
          if (maxPenetrateNum === Infinity) {
            // 无限数量
            result = false;
          } else {
            result = this._curCatapultNum === maxPenetrateNum;
          }
          return result;
        };
        _createClass(BulletAttack_Catapult, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "curCatapultNum",
          get: function get() {
            return this._curCatapultNum;
          },
          set: function set(v) {
            this._curCatapultNum = v;
          }
        }, {
          key: "isEnd",
          get: function get() {
            return this._isEnd;
          },
          set: function set(v) {
            this._isEnd = v;
          }
        }]);
        return BulletAttack_Catapult;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletAttack.ts', './BulletMovement.ts', './BattleDefine.ts', './Utils.ts', './BulletVO.ts', './BulletEffect.ts', './BaseSpine.ts', './GameConfig.ts', './ModuleDef.ts', './BulletMovement_Arrow.ts', './SpineUtils.ts', './MonitorType.ts', './Monster.ts', './Item_BattleMap.ts', './App.ts', './BattleProprMgr.ts', './Hero.ts', './Soldier.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, UITransform, Node, Vec2, Vec3, assetManager, sp, Component, Prefab, instantiate, ParticleSystem2D, BulletAttack, BulletMovement, BulletMovement_Line, BulletMovement_Follow, BulletMovement_Bezier, BulletMovement_Round, BulletMovement_FollowOwner, BulletMovement_FollowWeapon, BulletMovement_inCreator, BulletMovement_TanTiao, BulletMovement_RoundBullet, BulletMovement_Lock, BulletMovement_onTarget, BulletMovement_YanZhan, BulletMovement_Warning, BulletMovement_AngularFollow, BulletMovement_HuiXuan, BulletMovement_HanBingJiGuang, BulletMovement_ZhiXianFenLie, BulletMovement_ToPlayer, BulletMovement_HuoYanTuXi, BulletMovement_TanLiQiu, BulletMovement_GuangMangSheXian, BulletMovement_ToOwnerLine, BulletMovement_LeiTingWanJun, BulletMovement_FeiWuLeiHuan, BulletMovement_WorldBossTuXi, BulletMovement_DistanceOffset, BulletMovement_HugeBullet, BulletMovement_FollowMoveDir, BulletMovement_FollowMoveDir2, GameBattle, Utils, BulletVO, BulletEffect_Tigger_Time, BulletEffect, BaseSpine, GameConfig, ModuleDef, BulletMovement_Arrow, SpineUtils, MonitorType, Monster, Item_BattleMap, App, BattlePropertyName, Hero, Soldier;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
      Node = module.Node;
      Vec2 = module.Vec2;
      Vec3 = module.Vec3;
      assetManager = module.assetManager;
      sp = module.sp;
      Component = module.Component;
      Prefab = module.Prefab;
      instantiate = module.instantiate;
      ParticleSystem2D = module.ParticleSystem2D;
    }, function (module) {
      BulletAttack = module.BulletAttack;
    }, function (module) {
      BulletMovement = module.BulletMovement;
      BulletMovement_Line = module.BulletMovement_Line;
      BulletMovement_Follow = module.BulletMovement_Follow;
      BulletMovement_Bezier = module.BulletMovement_Bezier;
      BulletMovement_Round = module.BulletMovement_Round;
      BulletMovement_FollowOwner = module.BulletMovement_FollowOwner;
      BulletMovement_FollowWeapon = module.BulletMovement_FollowWeapon;
      BulletMovement_inCreator = module.BulletMovement_inCreator;
      BulletMovement_TanTiao = module.BulletMovement_TanTiao;
      BulletMovement_RoundBullet = module.BulletMovement_RoundBullet;
      BulletMovement_Lock = module.BulletMovement_Lock;
      BulletMovement_onTarget = module.BulletMovement_onTarget;
      BulletMovement_YanZhan = module.BulletMovement_YanZhan;
      BulletMovement_Warning = module.BulletMovement_Warning;
      BulletMovement_AngularFollow = module.BulletMovement_AngularFollow;
      BulletMovement_HuiXuan = module.BulletMovement_HuiXuan;
      BulletMovement_HanBingJiGuang = module.BulletMovement_HanBingJiGuang;
      BulletMovement_ZhiXianFenLie = module.BulletMovement_ZhiXianFenLie;
      BulletMovement_ToPlayer = module.BulletMovement_ToPlayer;
      BulletMovement_HuoYanTuXi = module.BulletMovement_HuoYanTuXi;
      BulletMovement_TanLiQiu = module.BulletMovement_TanLiQiu;
      BulletMovement_GuangMangSheXian = module.BulletMovement_GuangMangSheXian;
      BulletMovement_ToOwnerLine = module.BulletMovement_ToOwnerLine;
      BulletMovement_LeiTingWanJun = module.BulletMovement_LeiTingWanJun;
      BulletMovement_FeiWuLeiHuan = module.BulletMovement_FeiWuLeiHuan;
      BulletMovement_WorldBossTuXi = module.BulletMovement_WorldBossTuXi;
      BulletMovement_DistanceOffset = module.BulletMovement_DistanceOffset;
      BulletMovement_HugeBullet = module.BulletMovement_HugeBullet;
      BulletMovement_FollowMoveDir = module.BulletMovement_FollowMoveDir;
      BulletMovement_FollowMoveDir2 = module.BulletMovement_FollowMoveDir2;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      BulletVO = module.BulletVO;
    }, function (module) {
      BulletEffect_Tigger_Time = module.BulletEffect_Tigger_Time;
      BulletEffect = module.BulletEffect;
    }, function (module) {
      BaseSpine = module.BaseSpine;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      BulletMovement_Arrow = module.BulletMovement_Arrow;
    }, function (module) {
      SpineUtils = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      Item_BattleMap = module.Item_BattleMap;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      Hero = module.Hero;
    }, function (module) {
      Soldier = module.Soldier;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "e9e53pOmmVFhZu9bx9XPBXe", "BulletBase", undefined);
      var property = _decorator.property;

      /**
       * 子弹基类
       */
      var BulletBase = exports('BulletBase', (_dec = property({
        type: BaseSpine
      }), _dec2 = property(UITransform), _dec3 = property(Node), _dec4 = property(Node), (_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(BulletBase, _Component);
        function BulletBase() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 外观 */
          _initializerDefineProperty(_this, "view", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hitBox", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "splashRect", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "splashRound", _descriptor4, _assertThisInitialized(_this));
          /** 运动器 */
          _this._bulletMovement = new BulletMovement();
          /** 攻击体 */
          _this._bulletAttack = new BulletAttack();
          /** 子弹效果 */
          _this.bulletEffect = [];
          _this.bulletVO = new BulletVO();
          /** 当前击中的目标列表 */
          _this._curHitList = new Map();
          /** 已击中的目标列表 */
          _this._hitHistoryList = new Map();
          /** 子弹类型 */
          _this._type = GameBattle.BulletType.None;
          /** 唯一id */
          _this._uid = 0;
          /** 持有者 */
          _this._owner = void 0;
          /** 目标 */
          _this._target = void 0;
          /** 技能实体 */
          _this._skill = void 0;
          /** 速度(每秒移速) */
          _this._speed = 0;
          /** 是否已结束 */
          _this._isEnd = false;
          /** 发射时间 */
          _this._launcherTime = 0;
          /** 发坐标偏移 */
          _this._startPosOffset = Vec2.ZERO;
          /** 朝向偏移*/
          _this._orientationOffset = Vec2.ZERO;
          /** 发射方式 */
          _this._launcherType = 0;
          /** 子弹个数 */
          _this._bullteCount = 0;
          /** 延迟时间 */
          _this._launcherDelayTime = 0.2;
          /** 是否已经发射(新的子弹发射器需要延迟发射) */
          _this._launchered = false;
          _this._triggerMap = {};
          _this._targetType = 0;
          /** 起始位置 */
          _this._startPosition = new Vec3();
          _this.masterId = 0;
          //召唤物子弹的主人ID（召唤物在发射子弹后自身被回收后就无法从召唤物的实体中获取属性了， 所以在这缓存该属性）
          _this._total_Trigger_num = 0;
          //子弹的总生效次数
          _this._total_PenetrateNum = 0;
          //子弹的总穿透次数
          _this._endTigger = false;
          _this.defaultName = "";
          // 句柄分离 避免干扰
          _this._startTaskId = null;
          _this._loopTaskId = null;
          _this._endTaskId = null;
          _this._dt = 0;
          // 子弹碰撞降帧幅度
          _this._dtUpdateTime = 0.04;
          /**处于技能发射次数中的第几次 */
          _this.indexInSkill = 0;
          // 奇偶帧分组
          _this._bulletGroup = 0;
          /** 临时向量,用于update中的向量计算，避免频繁创建临时向量 */
          _this.tempVec = new Vec3();
          /** 临时向量,用于圆形碰撞检测，避免频繁创建临时向量 */
          _this.tempVecRound = new Vec3();
          /**初始ownerId */
          _this.initOwnerId = 0;
          /**是否玩家召唤物的子弹 */
          _this.isPlayerSummonBullet = false;
          /** 初始owner的属性 */
          _this.initOwnerFullAttr = {};
          /** 初始owner的属性 */
          _this.initOwnerLockAttr = {};
          return _this;
        }
        var _proto = BulletBase.prototype;
        /**
         * 额外的初始化，处理创建子弹后owner被回收重用的问题
         * @param owner
         * @returns
         */
        _proto.exendInit = function exendInit(owner) {
          if (!owner) {
            return;
          }
          if (owner.type === GameBattle.RoleType.Monster) {
            var vo = owner.roleVO;
            if (vo) {
              this.initOwnerId = vo.id;
              this.initOwnerFullAttr = Utils.copyObj(vo.getFullAttr());
              var lockAttr = vo.getLockAttr();
              if (lockAttr && typeof lockAttr === "object") {
                this.initOwnerLockAttr = Utils.copyObj(lockAttr);
              } else {
                this.initOwnerLockAttr = {};
              }
            }
            //console.log('>>>>>>>>>>>>>>>>>>>>>>>>> BULLET_OWNER_ERROR exendInit', this.bulletVO.bulletID, this.initOwnerId, this.isPlayerSummonBullet);
          }
        }

        /**
         * 子弹owner是否被回收后重用成别的怪物
         * @returns
         */;
        _proto.checkOwnerError = function checkOwnerError() {
          if (!this.owner || !this.initOwnerId) {
            return false;
          }
          var vo = this.owner.roleVO;
          if (vo && this.initOwnerId !== vo.id) {
            return true;
          }
          return false;
        };
        _proto.onUpdate = function onUpdate(dt) {
          if (!this.checkValid()) return;
          if (this.bulletVO.waiting_move_time > 0) {
            this.bulletVO.waiting_move_time -= dt;
          } else {
            this._bulletMovement.onUpdate(dt);
          }
          if (this.bulletVO.waiting_time > 0) {
            this.bulletVO.waiting_time -= dt;
            this.setHitBoxVisible(this.bulletVO.waiting_time <= 0);
          } else {
            if (this._checkEnd()) {
              if (this.bulletVO.holding_time !== -2) {
                this.end();
              }
            } else {
              this._dt += dt;
              this.updateScale(dt);
              // if (!this._endTigger && this._dt > this._dtUpdateTime) {
              if (App.battleMgr.getCurrentFrame() === this._bulletGroup) {
                this._bulletAttack.onUpdate(this._dt);
                this._updateHitListOld();
                this._updateHitHistory(this._dt);
                this._dt = 0;
                // }
              }
            }
          }
        }

        /**
         * 对象池再利用
         */;
        _proto.reuse = function reuse() {
          this.init();
        }

        /**
         * 对象池回收
         */;
        _proto.recovery = function recovery() {
          this.reset();
        };
        _proto.clearAllSchedules = function clearAllSchedules() {
          if (this._startTaskId) {
            App.scheduleMgr.unschedule(this._startTaskId);
            this._startTaskId = null;
          }
          if (this._loopTaskId) {
            App.scheduleMgr.unschedule(this._loopTaskId);
            this._loopTaskId = null;
          }
          if (this._endTaskId) {
            App.scheduleMgr.unschedule(this._endTaskId);
            this._endTaskId = null;
          }
        }

        /**
         * 结束
         */;
        _proto.end = function end() {
          var _this2 = this;
          if (this._endTaskId !== null && this._endTaskId !== "") {
            //console.log('已经有计时器存在,等待播放动画完成后回收节点');
            return;
          }
          for (var i = 0; i < this.bulletEffect.length; i++) {
            this.bulletEffect[i].launch(this._skill.getTarget(), 0, BulletEffect_Tigger_Time.end);
          }
          if (this.view.node.active) {
            var hadEnd = SpineUtils.checkAnimaionByName(this.view.skeleton, "End");
            if (hadEnd) {
              var endDuration = SpineUtils.getAnimationDuration(this.view.skeleton, "End");
              this._endTaskId = App.scheduleMgr.scheduleOnce(function () {
                var _this2$view;
                _this2._endTaskId = null;
                if (!((_this2$view = _this2.view) != null && _this2$view.isValid)) return;
                App.battleMgr.bulletCtrl.recovery(_this2);
              }, this, endDuration);
              this.view.play("End", false);
            } else {
              this.view.clearAllAnimation();
              this.view.node.active = false;
              App.battleMgr.bulletCtrl.recovery(this);
            }
          } else {
            App.battleMgr.bulletCtrl.recovery(this);
          }
        };
        _proto.init = function init() {
          this._bulletGroup = Math.floor(Math.random() * 2);
          this.defaultName = "";
          this.clearAllSchedules();
          if (this.view) {
            this.view.clearAllAnimation();
            this.view.node.active = false;
          }
          this.initOwnerId = 0;
          this.isPlayerSummonBullet = false;
          this.initOwnerFullAttr = {};
          this.initOwnerLockAttr = {};
        }

        // static bulletSpine = {};
        ;

        _proto.asyncLoadSpine = function asyncLoadSpine() {
          var _this3 = this;
          // if (BulletBase.bulletSpine[this.bulletVO.viewPath]) {
          //     return BulletBase.bulletSpine[this.bulletVO.viewPath];
          // }
          var bundle = assetManager.getBundle(ModuleDef.BULLET_EFFECT);
          // if (GameConfig.DebugInfo.showBulletAniLog) {
          //     console.log('加载子弹动画', this.bulletVO.viewPath);
          // }

          return new Promise(function (resolve, reject) {
            bundle.load(_this3.bulletVO.viewPath + "/" + _this3.bulletVO.viewPath, sp.SkeletonData, null, function (err, asset) {
              if (err) {
                reject(_this3.bulletVO.viewPath + " \u5B50\u5F39\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25");
                return;
              }
              // if (GameConfig.DebugInfo.showBulletAniLog) {
              //     console.log('子弹动画加载完成', this.bulletVO.viewPath);
              // }
              // BulletBase.bulletSpine[this.bulletVO.viewPath] = asset;
              resolve(asset);
            });
          });
        };
        _proto.load = /*#__PURE__*/function () {
          var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bulletVo) {
            var _this4 = this;
            var i, attachment, path;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  this.bulletVO.set(bulletVo);
                  if (this.bulletVO.moveType === GameBattle.BulletMoveType.Line) {
                    this._bulletMovement = new BulletMovement_Line();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.Follow) {
                    this._bulletMovement = new BulletMovement_Follow();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.Bezier) {
                    this._bulletMovement = new BulletMovement_Bezier();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.Round) {
                    this._bulletMovement = new BulletMovement_Round();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.FollowOwner) {
                    this._bulletMovement = new BulletMovement_FollowOwner();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.FollowWeapon) {
                    this._bulletMovement = new BulletMovement_FollowWeapon();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.Arrow) {
                    this._bulletMovement = new BulletMovement_Arrow();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.ShiBi) ;else if (this.bulletVO.moveType === GameBattle.BulletMoveType.InCreator || this.bulletVO.moveType === GameBattle.BulletMoveType.InCreatorTaiDao) {
                    this._bulletMovement = new BulletMovement_inCreator();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.TanTiao) {
                    this._bulletMovement = new BulletMovement_TanTiao();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.RoundBullet) {
                    this._bulletMovement = new BulletMovement_RoundBullet();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.Lock) {
                    this._bulletMovement = new BulletMovement_Lock();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.onTarget) {
                    this._bulletMovement = new BulletMovement_onTarget();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.yanZHan) {
                    this._bulletMovement = new BulletMovement_YanZhan();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.Warning) {
                    this._bulletMovement = new BulletMovement_Warning();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.AngularFollow) {
                    this._bulletMovement = new BulletMovement_AngularFollow();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.HuiXuan) {
                    this._bulletMovement = new BulletMovement_HuiXuan();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.HanBingJiGuang) {
                    this._bulletMovement = new BulletMovement_HanBingJiGuang();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.ZhiXianFenLie) {
                    this._bulletMovement = new BulletMovement_ZhiXianFenLie();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.ToPlayer) {
                    this._bulletMovement = new BulletMovement_ToPlayer();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.HuoYanTuXi) {
                    this._bulletMovement = new BulletMovement_HuoYanTuXi();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.TanLiQiu) {
                    this._bulletMovement = new BulletMovement_TanLiQiu();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.GuangMangSheXian) {
                    this._bulletMovement = new BulletMovement_GuangMangSheXian();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.ToOwnerLine) {
                    this._bulletMovement = new BulletMovement_ToOwnerLine();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.LeiTingWanJun) {
                    this._bulletMovement = new BulletMovement_LeiTingWanJun();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.FeiWuLeiHuan) {
                    this._bulletMovement = new BulletMovement_FeiWuLeiHuan();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.WorldBossTuXi) {
                    this._bulletMovement = new BulletMovement_WorldBossTuXi();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.DistanceOffset) {
                    this._bulletMovement = new BulletMovement_DistanceOffset();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.HugeBullet) {
                    this._bulletMovement = new BulletMovement_HugeBullet();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.FollowMoveDir) {
                    this._bulletMovement = new BulletMovement_FollowMoveDir();
                  } else if (this.bulletVO.moveType === GameBattle.BulletMoveType.FollowMoveDir2) {
                    this._bulletMovement = new BulletMovement_FollowMoveDir2();
                  }
                  // this._bulletLauncher.owner = this;
                  this._bulletMovement.owner = this;
                  this._bulletAttack.owner = this;
                  this.bulletEffect = [];
                  for (i = 0; i < bulletVo.effect_id.length; i++) {
                    this.bulletEffect[i] = new BulletEffect();
                    this.bulletEffect[i].set(bulletVo.bulletEffect[bulletVo.effect_id[i]]);
                    this.bulletEffect[i].owner = this;
                  }
                  if (!this.view) {
                    _context.next = 24;
                    break;
                  }
                  this.view.skeleton.skeletonData = null;
                  if (!(this.bulletVO.viewPath.length > 0)) {
                    _context.next = 23;
                    break;
                  }
                  this.view.clearAllHandler();
                  this.view.clearAllAnimation();
                  this.view.node.active = true;
                  if (!Item_BattleMap.bulletAsset[this.bulletVO.viewPath]) {
                    _context.next = 16;
                    break;
                  }
                  this.view.skeleton.skeletonData = Item_BattleMap.bulletAsset[this.bulletVO.viewPath];
                  _context.next = 20;
                  break;
                case 16:
                  _context.next = 18;
                  return this.asyncLoadSpine();
                case 18:
                  this.view.skeleton.skeletonData = _context.sent;
                  if (App.battleMgr.isInBattle() && this.view.skeleton.skeletonData && !Item_BattleMap.bulletAsset[this.bulletVO.viewPath]) {
                    console.log("================================>>TEST BULLET 子弹动画加载完成:", bulletVo.bulletID, this.bulletVO.viewPath);
                    Item_BattleMap.bulletAsset[this.bulletVO.viewPath] = this.view.skeleton.skeletonData;
                  }
                case 20:
                  this.view.skeleton.paused = false;
                  _context.next = 24;
                  break;
                case 23:
                  this.view.node.active = false;
                case 24:
                  this.hitBox.setAnchorPoint(bulletVo.angle_point[0], bulletVo.angle_point[1]);
                  if (this.bulletVO.crash_box_type === GameBattle.BulletHitShape.Round) {
                    this.hitBox.width = bulletVo.crash_box[0];
                    this.hitBox.height = bulletVo.crash_box[0];
                  } else {
                    this.hitBox.width = bulletVo.crash_box[0];
                    this.hitBox.height = bulletVo.crash_box[1];
                  }
                  {
                    this.splashRect.active = false;
                    this.splashRound.active = false;
                  }
                  // 测试用
                  {
                    if (GameConfig.DebugInfo.showBulletBox) {
                      this.hitBox.node.children[0].active = GameConfig.DebugInfo.showBulletBox;
                    } else {
                      if (this._owner instanceof Hero) {
                        this.hitBox.node.children[0].active = GameConfig.DebugInfo.showHeroHit;
                      } else if (this._owner instanceof Soldier) {
                        this.hitBox.node.children[0].active = GameConfig.DebugInfo.showSoldierHit;
                      } else if (this._owner instanceof Monster) {
                        this.hitBox.node.children[0].active = GameConfig.DebugInfo.showMonsterHit;
                      }
                    }
                  }
                  attachment = this.node.getChildByName("attachment");
                  if (this.bulletVO.attachment) {
                    attachment.active = true;
                    attachment.removeAllChildren();
                    path = "prefabs/scene/bullet/" + this.bulletVO.attachment;
                    App.resMgr.loadAsset(ModuleDef.GAME_BATTLE_B, path, Prefab, null, function (err, res) {
                      if (err) {
                        console.error(err);
                        return;
                      }
                      var node = instantiate(res);
                      _this4.node.getChildByName("attachment").addChild(node);
                      node.setPosition(0, 0, 0);
                      if (bulletVo.volume !== 1) {
                        var lizi = node.getChildByName("lz").getComponent(ParticleSystem2D);
                        lizi.startSize *= bulletVo.volume;
                        lizi.endSize *= bulletVo.volume;
                        lizi.speed *= bulletVo.volume;
                      }
                    });
                  } else {
                    attachment.active = false;
                  }
                  this.node.setScale(bulletVo.volume, bulletVo.volume, bulletVo.volume);
                  this._total_Trigger_num = bulletVo.Trigger_num;
                  this._total_PenetrateNum = bulletVo.penetrate_num;
                  if (bulletVo.penetrate_num === -1) {
                    this._total_PenetrateNum = Infinity;
                  }
                  this._endTigger = this.bulletEffect.length === 1 && this.bulletEffect[0].before_or_after === BulletEffect_Tigger_Time.end;
                  this.isEnd = false;
                case 36:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function load(_x2) {
            return _load.apply(this, arguments);
          }
          return load;
        }();
        _proto.reset = function reset() {
          var _this$_bulletMovement, _this$_bulletAttack, _this$bulletVO, _this$_curHitList, _this$_hitHistoryList;
          this.clearAllSchedules();
          if (this.view) {
            this.view.node.active = false;
          }
          this._skill = null;
          // this.view.skeleton.skeletonData = null;
          // this._bulletLauncher.reset();
          (_this$_bulletMovement = this._bulletMovement) == null || _this$_bulletMovement.reset();
          (_this$_bulletAttack = this._bulletAttack) == null || _this$_bulletAttack.reset();
          (_this$bulletVO = this.bulletVO) == null || _this$bulletVO.reset();
          (_this$_curHitList = this._curHitList) == null || _this$_curHitList.clear();
          (_this$_hitHistoryList = this._hitHistoryList) == null || _this$_hitHistoryList.clear();
          this._triggerMap = {};
          this.defaultName = "";
          this.isEnd = true;
          this.startPosition.set(0, 0, 0);
          this.node.position = new Vec3(0, 0, 0);
          this.initOwnerId = 0;
          this.isPlayerSummonBullet = false;
          this.initOwnerFullAttr = {};
          this.initOwnerLockAttr = {};
        }

        /**
         * 检测有效性
         * @returns
         */;
        _proto.checkValid = function checkValid() {
          var result = false;
          do {
            if (!this._launchered) break;
            if (this._isEnd) break;
            if (!this._owner) break;
            if (!this.node.parent) break;
            result = true;
          } while (false);
          return result;
        }

        /**
         * 发射
         */;
        _proto.launch = function launch(bulletLauncherData) {
          this._owner._buffBox.triggerEventBuff(GameBattle.EventBuffId.bulletLaunch, this.bulletVO.bulletID);
          // if (GameConfig.DebugInfo.showBulletBox) {
          //     console.log(`子弹[${this.node.name}] 初始化位置(${this.node.worldPosition.x.toFixed(2)}, ${this.node.worldPosition.y.toFixed(2)})`);
          //     console.log(`子弹[${this.node.name}] 碰撞盒大小: ${this.hitBox.width.toFixed(2)} x ${this.hitBox.height.toFixed(2)}`);
          // }
          // 设置持续时间和播放动画
          this.playStartAnim();
          this._targetType = this._skill.targetType;
          this._bulletMovement.launch(bulletLauncherData);
          this._bulletAttack.launch();
          for (var i = 0; i < this.bulletEffect.length; i++) {
            this.bulletEffect[i].launch(this._skill.getTarget(), 0, BulletEffect_Tigger_Time.before);
          }

          // let master = App.battleMgr.roleCtrl.getRole(this.owner.masterId);
          if (this.bulletVO.bulletID === 40010) {
            //没有索敌类型是自己的子弹, 暂时写死 生存模式用的
            this._targetType = GameBattle.SkillApplyTarget.Self;
          }
          this.startPosition.set(this.node.worldPosition);
          if (this.bulletVO.bullet_sound) {
            App.soundMgr.playEffect(this.bulletVO.bullet_sound);
          }
        }

        /**
         * 命中
         * @target 击中目标
         * @count 此次集中个数
         */;
        _proto.hit = function hit(target, count) {
          for (var i = 0; i < this.bulletEffect.length; i++) {
            this.bulletEffect[i].launch(target, count, BulletEffect_Tigger_Time.hit);
          }
          this._bulletAttack.onHit(target);
          this._bulletMovement.onHit(target);
          if (this.bulletVO.sound && this.bulletVO.sound !== "") {
            App.soundMgr.playEffect(this.bulletVO.sound);
          }
          if (this.bulletVO.hit_effect) {
            // 3、弹出伤害
            var pos = target.getHitPosition();
            var size = 1;
            if (target instanceof Monster) {
              var vo = target.roleVO;
              size = Math.max(vo.crash_box[0], vo.crash_box[1]) / 100;
            }
            App.monitorMgr.dispatchEvent(MonitorType.battle_gun_weapon_attack_affected, {
              node: target.affected,
              effect: this.bulletVO.hit_effect,
              hit_pos: pos,
              size: size
            });
          }
          //如果是弹射子弹只需要记录一个
          if (this.bulletVO.repeat) {
            this._hitHistoryList.clear();
            this._hitHistoryList.set(target.uid, target);
          }
          var owner = this.owner;
          if (owner && owner.checkValid() && !this.checkOwnerError() && owner._buffBox && App.battleMgr.isInBattle()) {
            owner._buffBox.triggerEventBuff(GameBattle.EventBuffId.HitEnemy, undefined, target);
          }
        }

        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.hitBox.getBoundingBoxToWorld();
        }

        /**
         * 获取世界坐标系下圆形碰撞盒的圆心和半径
         * @returns
         */;
        _proto.getRoundToWorld = function getRoundToWorld() {
          var anchorX = this.hitBox.anchorX;
          var anchorY = this.hitBox.anchorY;
          // 计算中心点相对于锚点的偏移
          var offsetX = (0.5 - anchorX) * this.hitBox.width;
          var offsetY = (0.5 - anchorY) * this.hitBox.height;
          // const localCenter = new Vec3(offsetX, offsetY, 0);
          // let center = this.hitBox.convertToWorldSpaceAR(localCenter,this.tempVec);
          this.tempVecRound.x = offsetX;
          this.tempVecRound.y = offsetY;
          this.hitBox.convertToWorldSpaceAR(this.tempVecRound, this.tempVecRound);
          var center = this.tempVecRound;
          return {
            center: center,
            radius: this.hitBox.width / 2
          };
        }

        /**
         * 检测圆形和矩形的碰撞
         * @param round
         * @param rect
         * @returns
         */;
        _proto.checkCollideRoundAndRect = function checkCollideRoundAndRect(round, rect) {
          var x = round.center.x;
          var y = round.center.y;
          // 快速检测1：AABB不相交
          if (x + round.radius < rect.x || x - round.radius > rect.x + rect.width || y + round.radius < rect.y || y - round.radius > rect.y + rect.height) {
            return false;
          }

          // 快速检测2：圆心在矩形内
          if (x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height) {
            return true;
          }

          // 找到矩形上离圆心最近的点
          var closestX = Math.max(rect.x, Math.min(x, rect.x + rect.width));
          var closestY = Math.max(rect.y, Math.min(y, rect.y + rect.height));

          // 计算圆心到最近点的距离
          var distanceX = x - closestX;
          var distanceY = y - closestY;

          //console.log("******===",round.radius,distanceX,distanceY,Math.sqrt(distanceX * distanceX + distanceY * distanceY));
          var result = distanceX * distanceX + distanceY * distanceY <= round.radius * round.radius;
          return result;
        }

        /**
         * 碰撞检测
         * @returns
         */;
        _proto.checkHit = function checkHit(target) {
          var selfBox = this.getBoundingBoxToWorld();
          this.tempVec.set(target.node.worldPosition.x, target.node.worldPosition.y, 0);
          var targetPos = new Vec2(target.node.worldPosition.x, target.node.worldPosition.y);
          var hitPos = target.getHitPosition();
          targetPos.add2f(hitPos.x, hitPos.y);

          // if (GameConfig.DebugInfo.showBulletBox) {
          //     console.log(`子弹[${this.node.name}] 碰撞检测:
          //         子弹碰撞盒: x=${selfBox.x.toFixed(2)}, y=${selfBox.y.toFixed(2)}, w=${selfBox.width.toFixed(2)}, h=${selfBox.height.toFixed(2)}
          //         目标位置: x=${targetPos.x.toFixed(2)}, y=${targetPos.y.toFixed(2)}
          //         目标偏移: x=${hitPos.x.toFixed(2)}, y=${hitPos.y.toFixed(2)}`);
          // }

          return selfBox.contains(targetPos);
        };
        _proto._updateHitListOld = function _updateHitListOld() {
          var _this5 = this;
          App.battleMgr.roleCtrl.foreachEntity(this, function (v) {
            if (_this5._hitHistoryList.get(v.uid)) return false;
            if (!_this5.checkTargetType(v)) return false;
            if (v.masterId === _this5._owner.uid || v.uid === _this5._owner.masterId) return false;
            // if (this._total_Trigger_num <= 0) return false;
            if (!_this5._triggerMap[v.uid]) _this5._triggerMap[v.uid] = [0, 0];
            if (_this5._triggerMap[v.uid][0] >= _this5.bulletVO.Trigger_num) return false;
            if (_this5.bulletVO.repeat && _this5._curHitList.size > 0) return false; //如果是弹射子弹只需要记录一个
            if (!_this5.checkHit(v)) return false;
            if (_this5.bulletAttack.curCatapultNum < _this5._total_PenetrateNum) {
              _this5._curHitList.set(v.uid, v);
              _this5._total_PenetrateNum--;
            }
            return false;
          });
          var count = this._curHitList.size;
          this._curHitList.forEach(function (v) {
            _this5._hitHistoryList.set(v.uid, v);
            _this5._curHitList["delete"](v.uid);
            _this5._triggerMap[v.uid][0]++;
            _this5._triggerMap[v.uid][1] = _this5.bulletVO.Trigger_time;
            // if (v.masterId !== this._owner.uid) {
            //     this.hit(v, count);
            // }
            _this5.hit(v, count);
            _this5._total_Trigger_num--;
          });
          this._checkCityCollision();
        };
        _proto._updateHitHistory = function _updateHitHistory(dt) {
          var _this6 = this;
          this._hitHistoryList.forEach(function (_v, k) {
            _this6._triggerMap[k][1] -= dt;
            if (_this6._total_Trigger_num > 0 && _this6._triggerMap[k][1] <= 0) {
              _this6._hitHistoryList["delete"](k);
            }
          });
        };
        _proto._checkCityCollision = function _checkCityCollision() {
          var _this$_skill;
          var dungeonMgr = App.dungeonBattleMgr;
          if (!dungeonMgr) {
            return;
          }
          var city = dungeonMgr.city;
          var owner = this.owner;
          if (!city || !(owner instanceof Monster)) {
            return;
          }
          var monsterOwner = owner;
          var maxDistance = ((_this$_skill = this._skill) == null ? void 0 : _this$_skill.distance[1]) || 0;
          if (typeof city.checkEnemyReachDefenseLine === "function" && !city.checkEnemyReachDefenseLine(monsterOwner, maxDistance)) {
            // 如果monster未到达城墙，则不结算伤害
            return;
          }
          var isHit = false;
          var cityRect = city.getBoundingBoxToWorld();
          if (!cityRect) {
            return;
          }
          if (this.bulletVO.crash_box_type === GameBattle.BulletHitShape.Round) {
            var round = this.getRoundToWorld();
            isHit = this.checkCollideRoundAndRect(round, cityRect);
          } else {
            var bulletRect = this.getBoundingBoxToWorld();
            isHit = cityRect.intersects(bulletRect);
          }
          if (!isHit) {
            return;
          }
          this._onCityHit(city, monsterOwner);
        };
        _proto._onCityHit = function _onCityHit(city, attacker) {
          var _attacker$roleVO;
          var baseAttack = (_attacker$roleVO = attacker.roleVO) != null && _attacker$roleVO.getRoleAttr ? attacker.roleVO.getRoleAttr(BattlePropertyName.gongji) : 0;
          var damage = Math.floor(baseAttack);
          if (damage > 0) {
            city.enemyStartAttack(attacker);
            city.takeDamage(damage, attacker);
          }
          this._bulletAttack.isEnd = true;
          this.end();
        }

        /**
         * 获取子弹的碰撞检测半径（使用碰撞盒的斜线为半径）
         */;
        _proto.getCollisionRadius = function getCollisionRadius() {
          var halfWidth = this.hitBox.width / 2;
          var halfHeight = this.hitBox.height / 2;
          return Math.sqrt(halfWidth * halfWidth + halfHeight * halfHeight);
        }

        /**
         * 检查子弹目标类型
         * @param role
         * @returns
         */;
        _proto.checkTargetType = function checkTargetType(role) {
          var result = false;
          var targetTyp = this._targetType;
          switch (targetTyp) {
            case GameBattle.SkillApplyTarget.Self:
              result = this._owner.uid === role.uid;
              break;
            case GameBattle.SkillApplyTarget.Enemy:
              result = !this._owner.isFriend(role.type);
              break;
            case GameBattle.SkillApplyTarget.Friends:
              result = this._owner.isFriend(role.type);
              break;
            case GameBattle.SkillApplyTarget.SelfAndFriends:
              result = this._owner.uid === role.uid || this._owner.isFriend(role.type);
              break;
            case GameBattle.SkillApplyTarget.All:
              result = true;
              break;
          }
          return result;
        }

        /**
         * 检查子弹是否结束
         * @returns
         */;
        _proto._checkEnd = function _checkEnd() {
          // 检查移动或攻击是否结束
          if (this._bulletMovement.isEnd || this._bulletAttack.isEnd) {
            return true;
          }
          return false;
        };
        _proto.playStartAnim = function playStartAnim() {
          var _this$view,
            _this7 = this;
          if (!((_this$view = this.view) != null && _this$view.skeleton)) return;
          this.view.skeleton.paused = false;
          if (GameConfig.DebugInfo.showBulletAniLog) {
            console.log("播放子弹动画:", this.bulletVO.viewPath);
          }
          if (this._startTaskId) {
            console.log(this.bulletVO.viewPath, "===已经有Start计时器在运行===", this._startTaskId);
            return;
          }
          var hasStartAnim = SpineUtils.checkAnimaionByName(this.view.skeleton, "Start");
          if (hasStartAnim) {
            var startDuration = SpineUtils.getAnimationDuration(this.view.skeleton, "Start");
            this._startTaskId = App.scheduleMgr.scheduleOnce(function () {
              var _this7$view;
              _this7._startTaskId = null;
              if (!((_this7$view = _this7.view) != null && _this7$view.isValid)) return;
              if (_this7.bulletVO.holding_time === -1) {
                _this7.view.play("Loop", true);
              } else if (_this7.bulletVO.holding_time === -2) {
                var loopDuration = SpineUtils.getAnimationDuration(_this7.view.skeleton, "Loop");
                _this7._loopTaskId = App.scheduleMgr.scheduleOnce(function () {
                  var _this7$view2;
                  _this7._loopTaskId = null;
                  if (!((_this7$view2 = _this7.view) != null && _this7$view2.isValid)) return;
                  _this7.end();
                }, _this7, loopDuration);
                _this7.view.play("Loop", false);
              } else if (_this7.bulletVO.holding_time > 0) {
                _this7.view.play("Loop", true);
              }
            }, this, startDuration);
            this.view.play("Start", false);
          } else {
            this.view.playDefault(true);
            if (this.bulletVO.holding_time === -2) {
              var defaultDuration = SpineUtils.getAnimationDuration(this.view.skeleton, this.defaultName);
              this._endTaskId = App.scheduleMgr.scheduleOnce(function () {
                var _this7$view3;
                _this7._endTaskId = null;
                if (!((_this7$view3 = _this7.view) != null && _this7$view3.isValid)) return;
                _this7.end();
              }, this, defaultDuration);
            }
          }
        }

        /**更新子弹缩放 */;
        _proto.updateScale = function updateScale(_dt) {
          var maxScale = this.bulletVO.volume_max;
          if (!maxScale) return;
          var scaleDiff = maxScale - this.bulletVO.volume;
          var curScale;
          if (this.bulletVO.holding_time > 0) {
            var timeRatio = this.bulletAttack.curDuration / this.bulletVO.holding_time;
            curScale = Math.min(this.bulletVO.volume + scaleDiff * timeRatio, maxScale);
            //console.log(">>>>>>>  scale:",this.bulletAttack.curDuration.toFixed(2),timeRatio.toFixed(2),curScale.toFixed(2));
          } else {
            //const distance = this.node.worldPosition.clone().subtract(this.startPosition).length();
            Vec3.subtract(this.tempVec, this.node.worldPosition, this.startPosition);
            var distance = this.tempVec.length();
            var disRatio = distance / this.bulletVO.distance;
            curScale = Math.min(this.bulletVO.volume + scaleDiff * disRatio, maxScale);
            //console.log(">>>>>>>>> maxDistance:",distance,disRatio.toFixed(2),curScale.toFixed(2));
          }

          if (curScale) {
            this.node.setScale(curScale, curScale, curScale);
          }
        }

        /**
         * 设置子弹碰撞盒和view的偏移,某些巨大子弹如果修改子弹node的偏移，子弹朝向会不准
         * @param _x 偏移x
         * @param _y 偏移y
         */;
        _proto.setViewAndHitBoxOffset = function setViewAndHitBoxOffset(_x, _y) {
          // console.log('setViewHitBoxOffset', this.hitBox.node.position, this.view.node.position, x, y);
          // this.hitBox.node.setPosition(x, y);
          // this.view.node.setPosition(x, y);
        }

        /**
         * 动态设置碰撞调试框，在wait_time时间后显示，
         * @param visible
         * @returns
         */;
        _proto.setHitBoxVisible = function setHitBoxVisible(visible) {
          if (this.bulletVO.crash_box_type === GameBattle.BulletHitShape.Round) {
            this.splashRound.active = GameConfig.DebugInfo.showBulletBox && visible;
          } else {
            this.splashRect.active = GameConfig.DebugInfo.showBulletBox && visible;
          }
        };
        _createClass(BulletBase, [{
          key: "bulletMovement",
          get: function get() {
            return this._bulletMovement;
          }
        }, {
          key: "bulletAttack",
          get: function get() {
            return this._bulletAttack;
          }
        }, {
          key: "hitHistoryList",
          get: function get() {
            return this._hitHistoryList;
          }
        }, {
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "uid",
          get: function get() {
            return this._uid;
          },
          set: function set(v) {
            this._uid = v;
          }
        }, {
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "target",
          get: function get() {
            return this._target;
          },
          set: function set(v) {
            this._target = v;
          }
        }, {
          key: "skill",
          get: function get() {
            return this._skill;
          },
          set: function set(v) {
            this._skill = v;
          }
        }, {
          key: "speed",
          get: function get() {
            return this._speed;
          },
          set: function set(v) {
            this._speed = v;
          }
        }, {
          key: "isEnd",
          get: function get() {
            return this._isEnd;
          },
          set: function set(v) {
            this._isEnd = v;
          }
        }, {
          key: "launcherTime",
          get: function get() {
            return this._launcherTime;
          },
          set: function set(v) {
            this._launcherTime = v;
          }
        }, {
          key: "startPosOffset",
          get: function get() {
            return this._startPosOffset;
          },
          set: function set(v) {
            this._startPosOffset = v;
          }
        }, {
          key: "orientationOffset",
          get: function get() {
            return this._orientationOffset;
          },
          set: function set(v) {
            this._orientationOffset = v;
          }
        }, {
          key: "launcherType",
          get: function get() {
            return this._launcherType;
          },
          set: function set(v) {
            this._launcherType = v;
          }
        }, {
          key: "bullteCount",
          get: function get() {
            return this._bullteCount;
          },
          set: function set(v) {
            this._bullteCount = v;
          }
        }, {
          key: "launcherDelayTime",
          get: function get() {
            return this._launcherDelayTime;
          },
          set: function set(v) {
            this._launcherDelayTime = v;
          }
        }, {
          key: "launchered",
          get: function get() {
            return this._launchered;
          },
          set: function set(v) {
            this._launchered = v;
          }
        }, {
          key: "targetType",
          get: function get() {
            return this._targetType;
          },
          set: function set(value) {
            this._targetType = value;
          }
        }, {
          key: "startPosition",
          get: function get() {
            return this._startPosition;
          },
          set: function set(value) {
            this._startPosition = value;
          }
        }]);
        return BulletBase;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "view", [_dec], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "hitBox", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "splashRect", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, "splashRound", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class)));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ModuleDef.ts', './BattleDefine.ts', './AdsorptionBullet.ts', './CircularBullet.ts', './MeleeBullet.ts', './RemoteBullet.ts', './MyBulletLauncher.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, App, ModuleDef, GameBattle, AdsorptionBullet, CircularBullet, MeleeBullet, RemoteBullet, MyBulletLauncher;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      AdsorptionBullet = module.AdsorptionBullet;
    }, function (module) {
      CircularBullet = module.CircularBullet;
    }, function (module) {
      MeleeBullet = module.MeleeBullet;
    }, function (module) {
      RemoteBullet = module.RemoteBullet;
    }, function (module) {
      MyBulletLauncher = module.MyBulletLauncher;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b9fa1Q2joxJIqdlf8jmv3kU", "BulletCtrl", undefined);

      /**
       * 子弹控制器
       */
      var BulletCtrl = exports('BulletCtrl', /*#__PURE__*/function () {
        function BulletCtrl() {
          /** 实体列表 */
          this._entityMap = new Map();
          /** 唯一id生成器 */
          this._uidCounter = 0;
        }
        var _proto = BulletCtrl.prototype;
        _proto.init = function init() {};
        _proto.dispose = function dispose() {
          this.onExit();
          this.clearPool();
        };
        _proto.initPool = function initPool() {
          // 为MeleeBullet单独设置更高的预加载数量
          var meleeBulletPath = GameBattle.BulletPrefabPath[GameBattle.BulletType.Melee];
          if (meleeBulletPath) {
            App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, meleeBulletPath, {
              preloadCount: 30,
              // 增加预加载数量
              maxSize: 100,
              // 增加最大容量
              autoExpand: true
            });
          }

          // 为其他子弹类型设置默认预加载数量
          for (var key in GameBattle.BulletPrefabPath) {
            var path = GameBattle.BulletPrefabPath[key];
            // 跳过已经单独设置的MeleeBullet
            if (path !== meleeBulletPath) {
              App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, path, {
                preloadCount: 20,
                maxSize: 50,
                autoExpand: true
              });
            }
          }
        };
        _proto.clearPool = function clearPool() {
          for (var key in GameBattle.BulletPrefabPath) {
            App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.BulletPrefabPath[key]);
          }
        };
        _proto.update = function update(dt) {
          MyBulletLauncher.onUpdate(dt);
          // console.log('当前有多少子弹', this._entityMap.size);

          for (var _iterator = _createForOfIteratorHelperLoose(this._entityMap.values()), _step; !(_step = _iterator()).done;) {
            var bullet = _step.value;
            bullet.onUpdate(dt);
          }
        }

        /**
         * 进入战场
         */;
        _proto.onEnter = function onEnter() {
          this.recoveryAll();
          MyBulletLauncher.clear();
        }

        /**
         * 退出战场
         */;
        _proto.onExit = function onExit() {
          this.recoveryAll();
          MyBulletLauncher.clear();
        }

        /**
         * 回收所有实体
         */;
        _proto.recoveryAll = function recoveryAll() {
          var _this = this;
          this._entityMap.forEach(function (v) {
            _this.recovery(v);
          });
          this._entityMap.clear();
        }

        /**
         * 回收实体
         * @param entity 实体对象
         * @returns
         */;
        _proto.recovery = function recovery(entity) {
          var path = GameBattle.BulletPrefabPath[entity.type];
          if (typeof path !== "string" || path === "") return;
          this._entityMap["delete"](entity.uid);
          entity.recovery();
          entity.node.parent = null;
          entity.uid = 0;
          App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, path, entity.node);
        }

        /**
         * 再利用实体
         * @param entity 实体对象
         */;
        _proto.reuse = function reuse(entity) {
          entity.reuse();
          entity.uid = this._uidCounter++;
          entity.node.name = GameBattle.BulletType[entity.type] + "\u3010" + entity.uid + "\u3011";
          this._entityMap.set(entity.uid, entity);
        }

        /**
         * 创建子弹
         * @param bulletVo 子弹数据
         * @returns 子弹实体
         */;
        _proto.createBullet = function createBullet(bulletVo) {
          var _map;
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.BulletPrefabPath[bulletVo.type]);
          if (bulletVo.hierarchy === 1) {
            var _App$battleMgr$battle;
            node.parent = (_App$battleMgr$battle = App.battleMgr.battleMainViewCtrl) == null ? void 0 : _App$battleMgr$battle.bulletLayer;
          } else {
            var _App$battleMgr$battle2;
            node.parent = (_App$battleMgr$battle2 = App.battleMgr.battleMainViewCtrl) == null ? void 0 : _App$battleMgr$battle2.underBulletLayer;
          }
          if (!node.parent) return;
          var map = (_map = {}, _map[GameBattle.BulletType.Remote] = RemoteBullet, _map[GameBattle.BulletType.Melee] = MeleeBullet, _map[GameBattle.BulletType.NoAngle] = RemoteBullet, _map[GameBattle.BulletType.ShiZhu] = MeleeBullet, _map[GameBattle.BulletType.LockNoSame] = RemoteBullet, _map[GameBattle.BulletType.Circular] = CircularBullet, _map[GameBattle.BulletType.Adsorption] = AdsorptionBullet, _map[GameBattle.BulletType.LockNoSame2] = RemoteBullet, _map[GameBattle.BulletType.LockNoSame3] = RemoteBullet, _map);
          var bullet = node.getComponent(map[bulletVo.type]);
          this.reuse(bullet);
          bullet.load(bulletVo);
          return bullet;
        }

        /**
         * 根据子弹bulletId获取子弹实体
         * @param bulletId
         * @returns
         */;
        _proto.getBulletsByBullId = function getBulletsByBullId(bulletId) {
          if (!this) {
            return;
          }
          var bullets = [];
          this._entityMap.forEach(function (v) {
            if (v.bulletVO.bulletID === bulletId) {
              bullets.push(v);
            }
          });
          return bullets;
        }

        /**
         * 根据子弹bulletId获取子弹实体
         * @param bulletId
         * @returns
         */;
        _proto.getBulletsByBullType = function getBulletsByBullType(type) {
          if (!this) {
            return;
          }
          var bullets = [];
          this._entityMap.forEach(function (v) {
            if (v.bulletVO.type === type) {
              bullets.push(v);
            }
          });
          return bullets;
        };
        return BulletCtrl;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletEffect.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleProprMgr.ts', './DBRecord.ts', './BattleDefine.ts', './BuffEffect.ts', './BulletVO.ts', './MyBulletLauncher.ts', './Monster.ts', './GameConfig.ts', './MonitorType.ts', './App.ts', './BattleUtil.ts', './Utils.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, Vec3, tween, v3, BattlePropertyName, FormulaResultItem, DBRecord, GameBattle, BuffEffect, BulletVO, MyBulletLauncher, Monster, GameConfig, MonitorType, App, BattleUtil, Utils;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
      tween = module.tween;
      v3 = module.v3;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
      FormulaResultItem = module.FormulaResultItem;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      BuffEffect = module.BuffEffect;
    }, function (module) {
      BulletVO = module.BulletVO;
    }, function (module) {
      MyBulletLauncher = module.MyBulletLauncher;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      cclegacy._RF.push({}, "edb94vszSxOE51lptDVnqth", "BulletEffect", undefined);

      // ghjgjuy:
      // 1-发射前
      // 2-命中时
      // 3-结束后
      // 4-击杀时
      // 5-孤立无援

      var BulletEffect_Tigger_Time = exports('BulletEffect_Tigger_Time', /*#__PURE__*/function (BulletEffect_Tigger_Time) {
        BulletEffect_Tigger_Time[BulletEffect_Tigger_Time["before"] = 1] = "before";
        BulletEffect_Tigger_Time[BulletEffect_Tigger_Time["hit"] = 2] = "hit";
        BulletEffect_Tigger_Time[BulletEffect_Tigger_Time["end"] = 3] = "end";
        BulletEffect_Tigger_Time[BulletEffect_Tigger_Time["kill"] = 4] = "kill";
        BulletEffect_Tigger_Time[BulletEffect_Tigger_Time["lone"] = 5] = "lone";
        return BulletEffect_Tigger_Time;
      }({}));

      /**
       * 子弹效果
       */
      var BulletEffect = exports('BulletEffect', /*#__PURE__*/function () {
        function BulletEffect() {
          /** 效果ID */
          this.effectid = 0;
          /** 作用目标类型 */
          this._target_type = GameBattle.SkillApplyTarget.None;
          /** 效果类型 */
          this._type = GameBattle.SkillEffectType.None;
          /** 作用时机 */
          this._applyTime = 0;
          /** 算法ID */
          this._algorithm = 0;
          /** 属性类型 */
          this._element = 0;
          /** 属性参数 */
          this._attrParam = [];
          /** 持有者 */
          this._owner = void 0;
          /** 目标 */
          this._target = void 0;
          /** 属性参数 */
          this._point_number = void 0;
          /** 触发时机 */
          this._before_or_after = 0;
          /** 召唤物上限 */
          this._upperlimit = 0;
          /** 威力倍率 */
          this._point_number2 = 10000;
          /** 激活条件 */
          this._active_if = [];
          /** 乘法属性参数 */
          this._multiplication_value = [];
          this.vo = null;
          this.atr = [];
        }
        var _proto = BulletEffect.prototype;
        _proto.load = function load(cfg) {
          // const cfg: dbr.JiNengXiaoGuo = DBRecord.fetchId("JiNengXiaoGuo", id);
          this.effectid = cfg.effectid;
          this._target_type = cfg.target_type;
          this._type = cfg.type;
          this._algorithm = cfg.algorithm;
          this._element = cfg.element;
          this._point_number = Utils.copyObj(cfg.point_number);
          this.before_or_after = cfg.before_or_after;
          this._upperlimit = cfg.upperlimit || 9999999;
          this.atr = [];
          cfg.atr && (this.atr = [].concat(cfg.atr));
          this._point_number2 = 10000;
          this._active_if = [];
          // cfg.active_if && (this._active_if = [...cfg.active_if]);
          this._multiplication_value = [];
          // cfg.multiplication_value && (this._multiplication_value = [...cfg.multiplication_value]);
        };

        _proto.set = function set(cfg) {
          this.effectid = cfg.effectid;
          this._target_type = cfg._target_type;
          this._type = cfg._type;
          this._algorithm = cfg._algorithm;
          this._element = cfg._element;
          this._point_number = cfg._point_number;
          this.before_or_after = cfg.before_or_after;
          this._upperlimit = cfg.upperlimit;
          cfg.atr && (this.atr = [].concat(cfg.atr));
          this._point_number2 = cfg._point_number2;
          this._active_if = cfg.active_if;
          this._multiplication_value = cfg.multiplication_value;
        };
        _proto.launch = function launch(target, count, tiggerTime) {
          // 触发时机匹配才生效  lone 也是击中时机
          if (this._before_or_after !== tiggerTime) return;
          if (!this._owner.owner) return;
          this._target = target;
          switch (this._type) {
            case GameBattle.SkillEffectType.Damage:
              this._dealDamage(GameBattle.SkillEffectType.Damage, count);
              break;
            case GameBattle.SkillEffectType.AddBuff:
              this._dealAddBuff();
              break;
            case GameBattle.SkillEffectType.RemoveBuff:
              this._dealRemoveBuff();
              break;
            case GameBattle.SkillEffectType.CreateBullet:
            case GameBattle.SkillEffectType.CreateBullet360:
              this._dealCreateBullet();
              break;
            case GameBattle.SkillEffectType.TarGetMove:
              this._targetMove();
              break;
            case GameBattle.SkillEffectType.Heal:
              this._heal();
              break;
          }
        }

        /**
         * 处理效果类型： 伤害
         */;
        _proto._dealDamage = function _dealDamage(type, count) {
          if (type === void 0) {
            type = GameBattle.SkillEffectType.Damage;
          }
          var battleProprManager = App.battleProprMgr;
          var atker = this.owner.owner;
          // if (this.owner.owner.isSummon()) {
          //     //召唤物
          //     let vo = this.owner.owner.roleVO as MonsterVO;
          //     if (vo.quality === GameBattle.MonsterQuality.SummonMaster) {
          //         let master = App.battleMgr.roleCtrl.getRole(this.owner.masterId);
          //         atker = master;
          //     }
          // }
          var point_number = this._point_number;
          if (Array.isArray(this.point_number)) {
            point_number = this.point_number[0];
          }
          if (this._active_if.length > 0 && this._active_if[0] === 1 && count === 1) {
            // 孤立无援
            point_number *= this._multiplication_value[0];
          }
          var exInfo = {
            dmgType: type,
            mltDmg0: point_number,
            mltDmg1: this._point_number2,
            eleType: this._element,
            skillId: this._owner.skill.skillID
          };
          if (type === GameBattle.SkillEffectType.Damage) {
            exInfo.dmgType = this._algorithm;
            if (this._algorithm === GameBattle.SkillEffectType.Damage2) {
              exInfo.mltDmg1 = exInfo.mltDmg0;
            } else if (this._algorithm === GameBattle.SkillEffectType.Damage3) {
              exInfo.mltDmg1 = exInfo.mltDmg0 * (this._owner.owner.roleVO.curLvl1 || 1);
            }
          }
          var FResult = battleProprManager.execBattleFormula(atker, this.target, exInfo, this._owner);
          var atkF = FResult[0],
            atkType = FResult[1];
          atkF = atkF < 0 ? 0 : -atkF;
          this.target.underAttack(atkF, this._element, this._owner.bulletVO.hit_effect, atkType, this._owner.owner);
          if (GameConfig.DebugInfo.showBattleReportLog) {
            if (this.target.type === GameBattle.RoleType.Hero || this.target.type === GameBattle.RoleType.Soldier) {
              var monster = this._owner.owner;
              if (monster instanceof Monster) {
                var vo = monster.roleVO;
                console.log("\u6218\u62A5 : \u602A\u7269 " + vo.name + " \u4F7F\u7528\u6280\u80FD " + this._owner.skill.name + " (\u5B50\u5F39id=" + this._owner.bulletVO.bulletID + ") \u653B\u51FBPlayer \u9020\u6210" + atkF + " \u4F24\u5BB3 atkType=" + atkType);
              } else {
                console.log("\u6218\u62A5 : player(\u5B50\u5F39id=" + this._owner.bulletVO.bulletID + ") \u653B\u51FBPlayer \u9020\u6210" + atkF + " \u4F24\u5BB3 atkType=" + atkType);
              }
            } else {
              var _vo = this.target.roleVO;
              // if (this.owner.owner.isSummon()) {
              //     console.log(
              //         `战报 : 召唤物[${this._owner.uid}]  \
              //         使用技能 ${this._owner.skill.name} \
              //         (子弹id=${this._owner.bulletVO.bulletID}) \
              //         攻击 怪物[${vo.name}][${this.target.uid}] \
              //         造成${atkF} 伤害\
              //         point_number2=${this._point_number2}`
              //     );
              // } else {
              // console.log(`战报 : 主角 使用技能 ${this._owner.skill.name} (子弹id=${this._owner.bulletVO.bulletID}) 攻击 怪物[${vo.name}][${this.target.uid}] 造成${atkF} 伤害`);
              // }
            }
          }
        }

        /**
         * 处理效果类型： 添加buff
         */;
        _proto._dealAddBuff = function _dealAddBuff() {
          var target = this.target;
          var buff_id = this.atr[0];
          if (this._target_type === 2) {
            target = this._owner.owner;
          }
          if (!target) {
            return;
          }
          var buff = target._buffBox.addBuff(buff_id, this._owner.owner, this.owner.skill.skillID, false, this._owner);
          var count = this.algorithm;
          if (count && count > 1) {
            for (var i = 1; i < count; i++) {
              target._buffBox.addBuff(buff_id, this._owner.owner, this.owner.skill.skillID, false, this._owner);
            }
          }

          // let catchBuff = target._buffBox.catchBuff[buff_id];
          // if (catchBuff) {
          //     for (let i = 0; i < catchBuff.length; i++) {
          //         BuffEffect.setValue(buff.vo, catchBuff[i]);
          //         buff.curTime = buff.vo.time;
          //     }
          // }
        }

        /**
         * 处理效果类型： 移除buff
         */;
        _proto._dealRemoveBuff = function _dealRemoveBuff() {}

        /**
         * 处理效果类型： 创建子弹
         */;
        _proto._dealCreateBullet = function _dealCreateBullet() {
          var bullet_id = Number(this.atr[0]);
          console.log(">>>>>>>>>>>>>>>>>>>>>>>>> _dealCreateBullet", bullet_id);
          var theta = Number(this.atr[1]) || 0;
          var count = Number(this.point_number);
          var cfg = DBRecord.fetchId("JiNengZiDan", bullet_id);
          var bulletVo = new BulletVO();
          bulletVo.load(cfg);
          var buff = this._owner.skill.owner._buffBox.subBulletBuff[bullet_id];
          if (buff) {
            for (var i = 0; i < buff.length; i++) {
              BuffEffect.setValue(bulletVo, buff[i]);
            }
          }
          bulletVo.bulletEffect = {};
          for (var j = 0; j < bulletVo.effect_id.length; j++) {
            var effect_id = bulletVo.effect_id[j];
            bulletVo.bulletEffect[effect_id] = new BulletEffect();
            var cfg2 = DBRecord.fetchId("JiNengXiaoGuo", effect_id);
            bulletVo.bulletEffect[effect_id].load(cfg2);
            var _buff = this._owner.skill.owner._buffBox.subBulletEffectBuff[effect_id];
            if (_buff) {
              for (var _i = 0; _i < _buff.length; _i++) {
                BuffEffect.setValue(bulletVo.bulletEffect[effect_id], _buff[_i]);
              }
            }
          }
          var hit_point = null;
          if (this.owner.skill.targetPos.x > 0) {
            //预警位置
            hit_point = this.owner.skill.targetPos.clone();
          } else {
            if ("motherBullet" === bulletVo.position) {
              hit_point = this._owner.node.worldPosition;
            } else {
              if (!this._target) return;
              hit_point = this._target.getHitWorldPosition();
            }
          }
          var angle = BattleUtil.get2DAngleByPoint(this._owner.owner.node.worldPosition, hit_point);
          if (this._type === GameBattle.SkillEffectType.CreateBullet360) {
            theta = 360 / count;
            angle = Math.random() * 360;
          }
          var subBulletList = MyBulletLauncher.addSubBullet(bulletVo, this._owner.skill, hit_point, count, angle, theta);
          //console.log('>>>>>>>>>>>>>>>>>>>>>>>>> BULLET_OWNER_ERROR _dealCreateBullet ------');
          for (var _i2 = 0; _i2 < subBulletList.length; _i2++) {
            var subBullet = subBulletList[_i2];
            subBullet.initOwnerId = this.owner.initOwnerId;
            subBullet.isPlayerSummonBullet = this.owner.isPlayerSummonBullet;
            subBullet.initOwnerFullAttr = Utils.copyObj(this.owner.initOwnerFullAttr);
            subBullet.initOwnerLockAttr = Utils.copyObj(this.owner.initOwnerLockAttr);
            //console.log('>>>>>>>>>>>>>>>>>>>>>>>>> BULLET_OWNER_ERROR _dealCreateBullet', subBullet.bulletVO.bulletID, subBullet.initOwnerId, subBullet.isPlayerSummonBullet);
          }
        }

        /**
         * 目标位移
         */;
        _proto._targetMove = function _targetMove() {
          this.target.node.setSiblingIndex(10000000);
          var moveDirection = this.owner.owner.node.worldPosition.clone().subtract(this.target.node.worldPosition);
          var node = this._target.node;
          var delayTime = this.point_number[0];
          var endTime = this.point_number[1] - delayTime;
          var distance = this.target.node.worldPosition.clone().subtract(this._owner.owner.getMountPoint("dummy_cast", new Vec3(0, 0, 0))).length();
          var frameSpeed = distance / endTime / 40; //Number(game.frameRate)
          var offset = moveDirection.normalize().multiplyScalar(frameSpeed);
          // eslint-disable-next-line @typescript-eslint/no-this-alias
          var that = this;
          tween(node).delay(0).to(0.1, {
            scale_z: 1
          }, {
            onUpdate: function onUpdate(target, ratio) {
              var pos = node.worldPosition.clone();
              var distance = pos.clone().subtract(that._owner.owner.getMountPoint("dummy_cast", new Vec3(0, 0, 0))).length();
              var dir = pos.clone().subtract(that._owner.owner.getMountPoint("dummy_cast", new Vec3(0, 0, 0))).normalize();
              var dir_f = BattleUtil.analysisDirection(dir);
              var restrictions = 150;
              if (dir_f === GameBattle.Direction.Up || dir_f === GameBattle.Direction.LeftUp || dir_f === GameBattle.Direction.RightUp) {
                restrictions = 50;
              }
              if (dir_f === GameBattle.Direction.Down || dir_f === GameBattle.Direction.LeftDown || dir_f === GameBattle.Direction.RightDown) {
                restrictions = 250;
              }
              //预判断是否靠近
              if (distance < restrictions) {
                return;
              }
              while (offset.length() > 150) {
                offset = offset.multiplyScalar(0.95);
              }
              var x = offset.x;
              var y = offset.y;

              // 检查下一步位置是否可行走
              var nextPos = v3(pos.x + x, pos.y + y, 0);
              if (!App.mapMgr.checkCanMove(nextPos)) {
                return; // 如果不可行走，直接停止
              }

              pos.add3f(x, y, 0);
              node.worldPosition = pos;
            }
          }).start();
        }

        /**
         * 治疗
         */;
        _proto._heal = function _heal() {
          var count = Number(this.point_number);
          var _targets = [];
          var ty = -1;
          switch (this.targetType) {
            case GameBattle.SkillApplyTarget.Self:
              ty = this._owner.owner.type;
              _targets.push(this.owner.owner);
              break;
            case GameBattle.SkillApplyTarget.Enemy:
              ty = this._owner.target.type;
              _targets = this._owner.owner.lockTargetCtrl.getTargetByType(ty, this.owner.bulletVO.crash_box);
              break;
            case GameBattle.SkillApplyTarget.Friends:
              ty = this._owner.owner.type;
              _targets = this._owner.owner.lockTargetCtrl.getTargetByType(ty, this.owner.bulletVO.crash_box);
              break;
            case GameBattle.SkillApplyTarget.SelfAndFriends:
              ty = this._owner.owner.type;
              _targets = this._owner.owner.lockTargetCtrl.getTargetByType(ty, this.owner.bulletVO.crash_box);
              _targets.push(this.owner.owner);
              break;
            case GameBattle.SkillApplyTarget.All:
              break;
          }
          for (var _iterator = _createForOfIteratorHelperLoose(_targets), _step; !(_step = _iterator()).done;) {
            var tar = _step.value;
            // tar.underAttack(0, this._attrType, this._owner.bulletVO.hit_effect, FormulaResultItem._none);
            var roleVO = tar.roleVO;
            var maxHp = roleVO.getRoleAttr(BattlePropertyName.shengming);
            var value = count;
            if (this.algorithm === 2) {
              //百分比回血
              value = Math.floor(maxHp * value / 10000);
            }
            count = value;
            if (roleVO.curHP + value > maxHp) {
              value = maxHp - roleVO.curHP;
            }
            // roleVO.curHP += value;
            roleVO.updateCurHP(value);
            if (this._owner.owner.type === GameBattle.RoleType.Hero || this._owner.owner.type === GameBattle.RoleType.Soldier) {
              // roleVO.updateCurHP(roleVO.curHP, true);
              this._owner.owner._showDamageTips(count, 0, FormulaResultItem._zhiliao);
              App.monitorMgr.dispatchEvent(MonitorType.battle_player_update_hp);
              console.log("\u73A9\u5BB6\u83B7\u5F97\u6CBB\u7597 \u6CBB\u7597\u91CF\u4E3A " + value + " ");
            } else {
              this._owner.owner._showDamageTips(value, 0, FormulaResultItem._zhiliao);
              console.log("\u602A\u7269\u83B7\u5F97\u6CBB\u7597 \u6CBB\u7597\u91CF\u4E3A " + value + " ");
            }
          }
        };
        _createClass(BulletEffect, [{
          key: "targetType",
          get: function get() {
            return this._target_type;
          },
          set: function set(v) {
            this._target_type = v;
          }
        }, {
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "applyTime",
          get: function get() {
            return this._applyTime;
          },
          set: function set(v) {
            this._applyTime = v;
          }
        }, {
          key: "algorithm",
          get: function get() {
            return this._algorithm;
          },
          set: function set(v) {
            this._algorithm = v;
          }
        }, {
          key: "element",
          get: function get() {
            return this._element;
          },
          set: function set(v) {
            this._element = v;
          }
        }, {
          key: "attrParam",
          get: function get() {
            return this._attrParam;
          },
          set: function set(v) {
            this._attrParam = v;
          }
        }, {
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "target",
          get: function get() {
            return this._target;
          },
          set: function set(v) {
            this._target = v;
          }
        }, {
          key: "point_number",
          get: function get() {
            return this._point_number;
          },
          set: function set(value) {
            this._point_number = value;
          }
        }, {
          key: "before_or_after",
          get: function get() {
            return this._before_or_after;
          },
          set: function set(v) {
            this._before_or_after = v;
          }
        }, {
          key: "upperlimit",
          get: function get() {
            return this._upperlimit;
          },
          set: function set(value) {
            this._upperlimit = value;
          }
        }, {
          key: "point_number2",
          get: function get() {
            return this._point_number2;
          },
          set: function set(v) {
            this._point_number2 = v;
          }
        }, {
          key: "active_if",
          get: function get() {
            return this._active_if;
          },
          set: function set(value) {
            this._active_if = value;
          }
        }, {
          key: "multiplication_value",
          get: function get() {
            return this._multiplication_value;
          },
          set: function set(value) {
            this._multiplication_value = value;
          }
        }]);
        return BulletEffect;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletMovement_Arrow.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MathUtils.ts', './BulletMovement.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, Tween, Node, Vec3, tween, MathUtils, BulletMovement, App, BattleUtil;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      Node = module.Node;
      Vec3 = module.Vec3;
      tween = module.tween;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      BulletMovement = module.BulletMovement;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      cclegacy._RF.push({}, "1c9a3qTdDREQqGzlYIYzj5C", "BulletMovement_Arrow", undefined);
      var ArrowState = /*#__PURE__*/function (ArrowState) {
        ArrowState[ArrowState["NONE"] = 0] = "NONE";
        ArrowState[ArrowState["INIT"] = 1] = "INIT";
        ArrowState[ArrowState["FLYING"] = 2] = "FLYING";
        ArrowState[ArrowState["FLYBACK"] = 3] = "FLYBACK";
        ArrowState[ArrowState["TWEENBACK"] = 4] = "TWEENBACK";
        return ArrowState;
      }(ArrowState || {});
      /**
       * 子弹运动器类型 —— 哨箭
       */
      var BulletMovement_Arrow = exports('BulletMovement_Arrow', /*#__PURE__*/function (_BulletMovement) {
        _inheritsLoose(BulletMovement_Arrow, _BulletMovement);
        function BulletMovement_Arrow() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BulletMovement.call.apply(_BulletMovement, [this].concat(args)) || this;
          _this.state = void 0;
          _this.time = void 0;
          _this.maxTime = void 0;
          _this.angleOffset = 5;
          //每帧偏转角度
          _this.target = void 0;
          _this.angle = void 0;
          _this.targetType = void 0;
          _this.last_angle = void 0;
          _this.startAngle = 90;
          _this.startDir = null;
          _this._parent = null;
          return _this;
        }
        var _proto = BulletMovement_Arrow.prototype;
        _proto.reset = function reset() {
          _BulletMovement.prototype.reset.call(this);
          Tween.stopAllByTarget(this.owner.node);
          BulletMovement_Arrow.allTargets = [];
        };
        _proto.getInitPos = function getInitPos() {
          return this._parent.worldPosition;
        };
        _proto.launch = function launch(bulletLauncherData) {
          console.log("bulletLauncherData", bulletLauncherData);
          this.angle = this.owner.node.angle = this.startAngle;
          this.last_angle = this.angle;
          this.state = ArrowState.INIT;
          Tween.stopAllByTarget(this.owner.node);
          this.resetData();
          var name = "__Arrow__" + bulletLauncherData.index;
          this._parent = this.owner.owner.node.getChildByName(name);
          if (!this._parent) {
            this._parent = new Node();
            this._parent.layer = this.owner.owner.node.layer;
            this._parent.setParent(this.owner.owner.node);
            this._parent.setPosition(-100 - 60 * bulletLauncherData.index, 150, 0);
            this._parent.name = name;
          }
          this.owner.node.setParent(this._parent);
          this.owner.node.setPosition(0, 0, 0);
        };
        _proto.getTarget = function getTarget() {
          var target = this._owner.skill.getTarget();
          for (var i = BulletMovement_Arrow.allTargets.length - 1; i >= 0; i--) {
            if (!BulletMovement_Arrow.allTargets[i].checkValid()) {
              BulletMovement_Arrow.allTargets.splice(i, 1);
            }
          }
          if (!target) {
            this.target = null;
            return;
          }
          var map = App.battleMgr.roleCtrl.getRolesByType(target.type);
          var targets = [];
          var range = this.owner.skill.distance[1];
          var curDistance = -1;
          for (var _i in map) {
            var role = map[_i];
            var distance = Vec3.distance(this.owner.owner.node.worldPosition, role.node.worldPosition);
            if (distance > range) {
              continue;
            }
            var flag = true;
            for (var _iterator = _createForOfIteratorHelperLoose(BulletMovement_Arrow.allTargets), _step; !(_step = _iterator()).done;) {
              var t1 = _step.value;
              if (t1.uid === role.uid) {
                flag = false;
                break;
              }
            }
            if (flag) {
              targets.push(role);
            }
            if (distance > curDistance) {
              curDistance = distance;
              target = role;
            }
          }
          curDistance = -1;
          if (targets.length > 0) {
            for (var _iterator2 = _createForOfIteratorHelperLoose(targets), _step2; !(_step2 = _iterator2()).done;) {
              var _role = _step2.value;
              var _distance = Vec3.distance(this.owner.owner.node.worldPosition, _role.node.worldPosition);
              if (_distance > curDistance) {
                curDistance = _distance;
                target = _role;
              }
            }
          }
          this.target = target;
          BulletMovement_Arrow.allTargets.push(target);
          if (this.target) {
            this.owner.node.opacity = 255;
          }
        };
        _proto.resetData = function resetData() {
          this.getTarget();
          if (this.target) {
            this.state = ArrowState.FLYING;
          } else if (this.state === ArrowState.FLYING) {
            this.state = ArrowState.FLYBACK;
            this.target = this.owner.owner;
          }
          this.time = 0;
          this.maxTime = 0.5;
          this.angleOffset = 1;
          this.angle = this.owner.node.angle;
          this.startDir = MathUtils.angleToDirection(this.owner.node.angle).normalize();
        };
        _proto.onUpdate = function onUpdate(dt) {
          var _this$target;
          if (this.state === ArrowState.TWEENBACK) return;
          var initPos = this.getInitPos();
          if (this.state === ArrowState.INIT) {
            var flip = this.owner.owner.isFaceRight();
            var x = Math.abs(this._parent.position.x);
            x = flip ? -x : x;
            this._parent.setPosition(x, this._parent.position.y, this._parent.position.z);
          }
          if (!((_this$target = this.target) != null && _this$target.checkValid())) {
            this.resetData();
          }
          if (!this.target) {
            return;
          }
          var targetPos = this.target.node.worldPosition.clone();
          if (this.state === ArrowState.FLYBACK) {
            targetPos = initPos;
          }
          var angle = BattleUtil.get2DAngleByPoint(this.owner.node.worldPosition, targetPos);
          // if(angle > 0){
          //     if(180-angle < 4){
          //         angle
          //     }
          // }

          this.time += dt;
          if (this.time >= this.maxTime) {
            this.time = this.maxTime;
          }
          var rate = this.time / this.maxTime;

          // let end_dir = targetPos.clone().subtract(this.owner.node.worldPosition).normalize()
          // let cur_dir = this.startDir.clone().lerp(end_dir.copyAsVec2(), rate)

          // // 使用 Math.atan2 计算与 x 轴的角度，并转换为度数
          // const cur_angle = Math.atan2(cur_dir.y, cur_dir.x) * (180 / Math.PI);
          // this.owner.node.angle = cur_angle
          // console.log(`当前角度 : ${end_dir},  上次角度: ${cur_dir}  this.startDir:${this.startDir}  angle :${angle}  rate: ${rate}, this.angle: ${this.angle.toFixed(2)},  angle - this.angle ${angle - this.angle}`)

          this.owner.node.angle = (angle - this.angle) * rate + this.angle;
          var dir = MathUtils.angleToDirection(this.owner.node.angle);
          var frameSpeed = this.getFrameSpeed();
          var offset = dir.multiplyScalar(frameSpeed);
          // console.log(`当前角度 : ${this.owner.node.angle.toFixed(2)},  上次角度: ${this.last_angle.toFixed(2)}  偏差:${(this.owner.node.angle-this.last_angle).toFixed(2)}  angle :${angle}  rate: ${rate}, this.angle: ${this.angle.toFixed(2)},  angle - this.angle ${angle - this.angle}`)
          this.last_angle = this.owner.node.angle;
          this.owner.node.x += offset.x;
          this.owner.node.y += offset.y;
          if (this.state === ArrowState.FLYBACK) {
            var distance = Vec3.distance(this.owner.node.worldPosition, targetPos);
            if (distance < Math.abs(offset.x) + Math.abs(offset.y)) {
              this.target = null;
              this.state = ArrowState.TWEENBACK;
              var self = this;
              tween(this.owner.node).to(0.2, {
                angle: 90,
                worldPosition: targetPos
              }).call(function () {
                self.state = ArrowState.INIT;
                if (self._owner.bulletVO.move_param.length > 0) {
                  self.owner.node.opacity = 0;
                }
              }).start();
            }
          } else {
            if (this.owner.checkHit(this.target) && rate === 1) {
              this.resetData();
            }
          }
        };
        return BulletMovement_Arrow;
      }(BulletMovement));
      BulletMovement_Arrow.allTargets = [];
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletMovement.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MathUtils.ts', './Utils.ts', './BattleDefine.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _createClass, _inheritsLoose, cclegacy, game, Vec3, v3, v2, sp, Size, tween, find, Camera, UITransform, MathUtils, Utils, GameBattle, App, BattleUtil;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      game = module.game;
      Vec3 = module.Vec3;
      v3 = module.v3;
      v2 = module.v2;
      sp = module.sp;
      Size = module.Size;
      tween = module.tween;
      find = module.find;
      Camera = module.Camera;
      UITransform = module.UITransform;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      cclegacy._RF.push({}, "ff297WKAVJLyIDVR+YFY7gA", "BulletMovement", undefined);

      /**
       * 子弹运动器类
       */
      var BulletMovement = exports('BulletMovement', /*#__PURE__*/function () {
        function BulletMovement() {
          /** 临时向量,用于update中的向量计算，避免频繁创建临时向量 */
          this.tempVec = new Vec3();
          /** 临时位置 ,用于update中的坐标转换，避免频繁创建临时向量*/
          this.tempPos = new Vec3();
          /** 持有者 */
          this._owner = void 0;
          /** 是否已结束 */
          this._isEnd = false;
          /** 子弹速度 */
          this.speed = void 0;
          /** 方向向量 */
          this._direction = new Vec3();
          this.lockAngle = false;
          this.init();
        }
        var _proto = BulletMovement.prototype;
        _proto.reset = function reset() {
          this._isEnd = false;
        };
        _proto.init = function init() {};
        _proto.onUpdate = function onUpdate(dt) {};
        _proto.onHit = function onHit(target) {}

        /**
         * 发射
         */;
        _proto.launch = function launch(bulletLauncherData) {}

        /**
         * 获取当前的移速
         */;
        _proto.getMoveSpeed = function getMoveSpeed() {
          this.speed += this._owner.bulletVO.acceleration / Number(game.frameRate);
          return this.speed;
        }

        /**
         * 获取当前移速的帧速度
         */;
        _proto.getFrameSpeed = function getFrameSpeed() {
          return this._owner.bulletVO.initialSpeed / Number(game.frameRate);
        }

        /**
         * 获取子弹的初始速度
         * @returns
         */;
        _proto.getInitialSpeed = function getInitialSpeed() {
          return this._owner.bulletVO.initialSpeed;
        };
        _createClass(BulletMovement, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "isEnd",
          get: function get() {
            return this._isEnd;
          },
          set: function set(v) {
            this._isEnd = v;
          }
        }, {
          key: "direction",
          get: function get() {
            return this._direction;
          },
          set: function set(v) {
            this._direction = v;
            console.log("set dir");
          }
        }]);
        return BulletMovement;
      }());

      /**
       * 子弹运动器类型 —— 跟随
       */
      var BulletMovement_Follow = exports('BulletMovement_Follow', /*#__PURE__*/function (_BulletMovement) {
        _inheritsLoose(BulletMovement_Follow, _BulletMovement);
        function BulletMovement_Follow() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BulletMovement.call.apply(_BulletMovement, [this].concat(args)) || this;
          /** 目标 */
          _this._target = void 0;
          return _this;
        }
        var _proto2 = BulletMovement_Follow.prototype;
        _proto2.reset = function reset() {
          this._target = null;
        };
        _proto2.init = function init() {};
        _proto2.launch = function launch(bulletLauncherData) {
          this.speed = this.getFrameSpeed();
          this.target = this._owner.target;
          if (this._owner.bulletVO.type === GameBattle.BulletType.NoAngle) {
            this._owner.node.angle = 0;
          }
        };
        _proto2.onUpdate = function onUpdate(dt) {
          if (!this._target) return;
          if (this.getFrameSpeed() === 0) return;
          var startPos = this._owner.node.worldPosition;
          var endPos = this.tempVec;
          Vec3.add(endPos, this._target.node.worldPosition, this._target.getHitPosition());
          var pos = endPos.subtract(startPos).normalize().multiplyScalar(this.speed);
          pos.add(startPos);
          this._owner.node.parent.uiTransform.convertToNodeSpaceAR(pos, pos);
          if (this._owner.bulletVO.type !== GameBattle.BulletType.NoAngle) {
            var angle = BattleUtil.get2DAngleByPoint(startPos, endPos);
            this._owner.node.angle = angle;
          }
          this._owner.node.position = pos;
          if (!this._target.checkValid()) {
            var dis = Vec3.distance(this._owner.node.worldPosition, this._target.node.worldPosition);
            if (dis < 200) {
              this.owner.end();
            }
          }
        };
        _createClass(BulletMovement_Follow, [{
          key: "target",
          get: function get() {
            return this._target;
          },
          set: function set(v) {
            this._target = v;
          }
        }]);
        return BulletMovement_Follow;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 直线
       */
      var BulletMovement_Line = exports('BulletMovement_Line', /*#__PURE__*/function (_BulletMovement2) {
        _inheritsLoose(BulletMovement_Line, _BulletMovement2);
        function BulletMovement_Line() {
          var _this2;
          for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
            args[_key2] = arguments[_key2];
          }
          _this2 = _BulletMovement2.call.apply(_BulletMovement2, [this].concat(args)) || this;
          /** 起始位置 */
          _this2._startPosition = new Vec3();
          return _this2;
        }
        var _proto3 = BulletMovement_Line.prototype;
        _proto3.reset = function reset() {
          _BulletMovement2.prototype.reset.call(this);
          this._direction.set(0, 0, 0);
          this._startPosition.set(0, 0, 0);
        };
        _proto3.init = function init() {};
        _proto3.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          var role = this._owner.owner;
          var target = this._owner.target;
          var startPos = this._owner.node.worldPosition;
          if (this._direction.x === 0 && this._direction.y === 0) {
            // const endPos = target.node.worldPosition.clone().add(target.getHitPosition());
            // Vec3.subtract(this._direction, endPos, startPos).normalize();
            // const angle = BattleUtil.get2DAngleByPoint(startPos, endPos);
            // this._owner.node.angle = angle;
            this._direction.x = 1;
          }
          this._startPosition.set(startPos);
          if (this._owner.bulletVO.type === GameBattle.BulletType.NoAngle) {
            this._owner.node.angle = 0;
          }
        };
        _proto3.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          if (this._checkDistance()) {
            this._isEnd = true;
            return;
          }
          if (this._direction.x === 0 && this._direction.y === 0) return;
          this.speed = this.getMoveSpeed();
          var frameSpeed = this.speed * dt;
          var offset = this.tempVec;
          Vec3.multiplyScalar(offset, this._direction, frameSpeed);

          // const frameSpeed = this.speed * dt;
          // const newPos = startPos.clone().add(moveDir.multiplyScalar(frameSpeed));

          Vec3.add(this.tempPos, this._owner.node.worldPosition, offset);
          this._owner.node.worldPosition = this.tempPos;
          if (this._owner.bulletVO.angle_speed && this._owner.bulletVO.type !== GameBattle.BulletType.NoAngle) {
            this._owner.node.angle += this._owner.bulletVO.angle_speed;
          }
        }

        /**
         * 检测是否达到设定距离
         * @returns
         */;
        _proto3._checkDistance = function _checkDistance() {
          var result = true;
          var maxDistance = this._owner.bulletVO.distance;
          if (maxDistance === -1) {
            // 无限距离
            result = false;
          } else {
            Vec3.subtract(this.tempVec, this._owner.node.worldPosition, this._startPosition);
            var distance = this.tempVec.length();
            result = distance >= maxDistance;
          }
          return result;
        };
        _createClass(BulletMovement_Line, [{
          key: "startPosition",
          get: function get() {
            return this._startPosition;
          }
        }]);
        return BulletMovement_Line;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 贝塞尔
       */
      var BulletMovement_Bezier = exports('BulletMovement_Bezier', /*#__PURE__*/function (_BulletMovement3) {
        _inheritsLoose(BulletMovement_Bezier, _BulletMovement3);
        function BulletMovement_Bezier() {
          var _this3;
          for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
            args[_key3] = arguments[_key3];
          }
          _this3 = _BulletMovement3.call.apply(_BulletMovement3, [this].concat(args)) || this;
          /** 计算贝塞尔时间 0-1 */
          _this3._t = void 0;
          /** 曲线点数组, 起点终点控制点 */
          _this3._startPos = new Vec3();
          _this3._endPos = new Vec3();
          _this3._ctrlPos = new Vec3();
          return _this3;
        }
        var _proto4 = BulletMovement_Bezier.prototype;
        _proto4.reset = function reset() {
          _BulletMovement3.prototype.reset.call(this);
        };
        _proto4.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          var role = this._owner.owner;
          var target = this._owner.target;
          if (!target) {
            return;
          }
          this._t = 0;
          var offset = this._owner.bulletVO.offset;
          if (offset && offset.length > 0) {
            var index = bulletLauncherData.index;
            if (offset[index]) {
              var pos = this._owner.owner.node.worldPosition;
              this._startPos.set(pos.x + offset[index][0], pos.y + offset[index][1], pos.z);
            } else {
              this._isEnd = true;
              return;
            }
          } else {
            this._startPos = this._owner.owner.node.worldPosition;
          }
          if (this.owner.skill.targetPos.x > 0) {
            this._endPos = this.owner.skill.targetPos;
          } else {
            Vec3.add(this._endPos, target.node.worldPosition, target.getHitPosition());
          }
          // this._ctrlPos = this.getCtrlPoint(this._startPos, this._endPos, Math.PI * -0.95).multiplyScalar(1.1); //0.6
          this.getMidPoint();
        };
        _proto4.getMidPoint = function getMidPoint() {
          Vec3.add(this._ctrlPos, this._startPos, this._endPos);
          this._ctrlPos.multiplyScalar(0.5);
          var hight = 0; //Utils.GetRandomNum(-400, 400)
          if (this._owner.bulletVO.move_param.length === 2) {
            hight = Utils.GetRandomNum(this._owner.bulletVO.move_param[0], this._owner.bulletVO.move_param[1]);
          } else {
            hight = this._owner.bulletVO.move_param[0];
          }
          this._ctrlPos.add3f(0, hight, 0);
        };
        _proto4.onUpdate = function onUpdate(dt) {
          if (!this._owner.target) {
            this.owner.end();
            return;
          }
          if (this._isEnd) return;
          this.speed = this.getFrameSpeed() / 8;
          this._t += dt * this.speed;
          if (this._t > 1) {
            this._t = 1;
            this._isEnd = true;
          }
          var point = MathUtils.bessel2eLevel(this._t, this._startPos, this._ctrlPos, this._endPos);
          this._owner.node.setPosition(point.x, point.y);
          var angle = BattleUtil.get2DAngleByPoint(this._owner.node.position, this._endPos);
          this._owner.node.angle = angle;
        };
        _proto4.getCtrlPoint = function getCtrlPoint(p1, p2, theta) {
          var Mx = (p1.x + p2.x) / 2;
          var My = (p1.y + p2.y) / 2;
          var dx = p2.x - p1.x;
          var dy = p2.y - p1.y;
          var d = Math.sqrt(dx * dx + dy * dy);
          var r = d / (2 * Math.sin(theta / 2));
          var h = Math.sqrt(r * r - d / 2 * (d / 2));
          var Ox1 = Mx + dy / d * h;
          var Oy1 = My - dx / d * h;
          var C1x = Ox1 + dy / d * r;
          var C1y = Oy1 - dx / d * r;
          return v3(C1x, C1y);
        };
        return BulletMovement_Bezier;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 弹射
       */
      var BulletMovement_Catapults = exports('BulletMovement_Catapults', /*#__PURE__*/function (_BulletMovement4) {
        _inheritsLoose(BulletMovement_Catapults, _BulletMovement4);
        function BulletMovement_Catapults() {
          var _this4;
          for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
            args[_key4] = arguments[_key4];
          }
          _this4 = _BulletMovement4.call.apply(_BulletMovement4, [this].concat(args)) || this;
          _this4._t = void 0;
          _this4._count = 4;
          return _this4;
        }
        var _proto5 = BulletMovement_Catapults.prototype;
        _proto5.reset = function reset() {
          _BulletMovement4.prototype.reset.call(this);
        };
        _proto5.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          var role = this._owner.owner;
          var target = this._owner.skill.getTarget();
        };
        _proto5.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          this._t += dt * this.speed;
          if (this._t > 1) {
            this._t = 1;
            this._isEnd = true;
          }
        };
        return BulletMovement_Catapults;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 环绕
       */
      var BulletMovement_Round = exports('BulletMovement_Round', /*#__PURE__*/function (_BulletMovement5) {
        _inheritsLoose(BulletMovement_Round, _BulletMovement5);
        function BulletMovement_Round() {
          var _this5;
          for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
            args[_key5] = arguments[_key5];
          }
          _this5 = _BulletMovement5.call.apply(_BulletMovement5, [this].concat(args)) || this;
          _this5._t = void 0;
          //初始与圆心的夹角
          _this5.angle = 0;
          // 圆周运动的半径
          _this5.radius = 60;
          // 圆周运动的半径扩散值
          _this5.radiusAdd = 2;
          // 运动的速度（角速度，单位：弧度每秒）
          _this5.angularSpeed = void 0;
          _this5._needSetAngle = false;
          return _this5;
        }
        var _proto6 = BulletMovement_Round.prototype;
        _proto6.reset = function reset() {
          _BulletMovement5.prototype.reset.call(this);
        };
        _proto6.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          this.radius = this._owner.bulletVO.distance;
          this.angularSpeed = this._owner.bulletVO.angle_speed;
          // 圆心坐标
          var pos = this._owner.owner.getMountPoint("dummy_body", this._owner.owner.node.worldPosition);
          this._needSetAngle = this._owner.type !== GameBattle.BulletType.NoAngle;
          if (!this._needSetAngle) {
            this.owner.node.angle = 0;
          }
          var cx = pos.x;
          var cy = pos.y;
          var i = bulletLauncherData.index + BulletMovement_Round.allIndex;
          var angle = i * (2 * Math.PI / (bulletLauncherData.count * (BulletMovement_Round.allIndex + 1)));
          var x = cx + this.radius * Math.cos(angle);
          var y = cy + this.radius * Math.sin(angle);
          this.angle = angle;
          this.owner.node.setWorldPosition(x, y, 0);
          this.radiusAdd = 0;
          if (this._owner.bulletVO.move_param && this._owner.bulletVO.move_param.length > 0) {
            this.radiusAdd = this._owner.bulletVO.move_param[0];
            if (this._owner.bulletVO.move_param[1] && bulletLauncherData.index === 0) {
              BulletMovement_Round.allIndex++;
              BulletMovement_Round.allCount++;
              if (BulletMovement_Round.allCount === this._owner.bulletVO.move_param[1]) {
                BulletMovement_Round.allCount = 0;
                BulletMovement_Round.allIndex = 0;
              }
            }
          }
        };
        _proto6.onUpdate = function onUpdate(dt) {
          if (this._isEnd) {
            return;
          }
          if (this.owner.owner.state.type === GameBattle.ActionState.Dead) {
            this._isEnd = true;
            return;
          }
          // 更新角度
          this.angle += this.angularSpeed * dt;
          var pos = this._owner.owner.getMountPoint("dummy_body", this._owner.owner.node.worldPosition);
          var centerX = pos.x;
          var centerY = pos.y;
          this.radius += this.radiusAdd;
          // 计算新的位置
          var x = centerX + this.radius * Math.cos(this.angle);
          var y = centerY + this.radius * Math.sin(this.angle);

          // 设置节点的新位置
          this.owner.node.setWorldPosition(x, y, 0);
          if (this._needSetAngle) {
            // 计算节点与中心点的方向向量
            var direction = v2(centerX - x, centerY - y);
            // 计算方向向量的角度（弧度）
            var angleRadians = Math.atan2(direction.y, direction.x);

            // 将弧度转换为角度，并设置节点的旋转角度
            var angleDegrees = angleRadians * (180 / Math.PI);
            this.owner.node.angle = angleDegrees - 180;
          }
        };
        return BulletMovement_Round;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 火焰喷射器
       * 后面也用在怪物身上（皇庭信使一闪）
       */
      BulletMovement_Round.allIndex = 0;
      BulletMovement_Round.allCount = 0;
      var BulletMovement_FollowOwner = exports('BulletMovement_FollowOwner', /*#__PURE__*/function (_BulletMovement6) {
        _inheritsLoose(BulletMovement_FollowOwner, _BulletMovement6);
        function BulletMovement_FollowOwner() {
          var _this6;
          for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
            args[_key6] = arguments[_key6];
          }
          _this6 = _BulletMovement6.call.apply(_BulletMovement6, [this].concat(args)) || this;
          _this6._step = 1;
          _this6._offsetAngle = 0;
          return _this6;
        }
        var _proto7 = BulletMovement_FollowOwner.prototype;
        _proto7.reset = function reset() {
          _BulletMovement6.prototype.reset.call(this);
        };
        _proto7.launch = function launch(bulletLauncherData) {
          var index = bulletLauncherData.index;
          var bulletowner = this.owner.owner;
          var attachment = bulletowner.node.getChildByName("attachment2");
          var pos = bulletowner.getLocalMountPoint(this._owner.bulletVO.position, v3(0, 0, 0));
          this._owner.node.setParent(attachment);
          this._owner.node.setPosition(pos);
          if (bulletowner.type !== GameBattle.RoleType.Hero) {
            //设置子弹朝向为怪物技能冲刺方向
            if (bulletowner.skillMoveDirVec) {
              var moveVec = bulletowner.skillMoveDirVec;
              var moveAngleRadians = Math.atan2(moveVec.y, moveVec.x);
              this._owner.node.angle = moveAngleRadians * (180 / Math.PI);
            }
            return;
          }
          var target = this._owner.skill.getTarget();
          if (target) {
            var endpos = this.tempPos;
            Vec3.add(endpos, target.node.worldPosition, target.getHitPosition());
            var angle = BattleUtil.get2DAngleByPoint(this._owner.node.worldPosition, endpos);
            var offset = this._owner.skill.launch_angle * 180 / 3.141592653;
            if (bulletLauncherData.count > 1) {
              this._offsetAngle = offset * Math.ceil(index / 2) * (index % 2 === 0 ? -1 : 1);
            }
            this._owner.node.angle = angle + this._offsetAngle;
          }
          this._step = this._owner.bulletVO.angle_speed;
        };
        _proto7.onUpdate = function onUpdate(dt) {
          var target = this._owner.skill.getTarget();
          if (!target) return;
          var bulletowner = this.owner.owner;
          var angle = BattleUtil.get2DAngleByPoint(this._owner.node.worldPosition, target.node.worldPosition) + this._offsetAngle;

          // 确保目标角度在 0 到 360 度之间
          var targetAngle = (angle + 360) % 360;
          var currentAngle = (this._owner.node.angle + 360) % 360;

          // 如果两者的角度差大于 180 度，说明跨越了 0 度的边界，需要调整
          if (Math.abs(targetAngle - currentAngle) > 180) {
            if (targetAngle > currentAngle) {
              targetAngle -= 360;
            } else {
              currentAngle -= 360;
            }
          }
          var difference = targetAngle - currentAngle;

          // 如果差值大于步长，继续平滑旋转
          if (Math.abs(difference) > this._step) {
            if (difference > 0) {
              this._owner.node.angle += this._step;
            } else {
              this._owner.node.angle -= this._step;
            }
          } else {
            this._owner.node.angle = angle; // 目标角度已足够接近，直接设置
          }
        };

        return BulletMovement_FollowOwner;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 跟随武器
       */
      var BulletMovement_FollowWeapon = exports('BulletMovement_FollowWeapon', /*#__PURE__*/function (_BulletMovement7) {
        _inheritsLoose(BulletMovement_FollowWeapon, _BulletMovement7);
        function BulletMovement_FollowWeapon() {
          var _this7;
          for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
            args[_key7] = arguments[_key7];
          }
          _this7 = _BulletMovement7.call.apply(_BulletMovement7, [this].concat(args)) || this;
          _this7.index = void 0;
          _this7.count = void 0;
          _this7.angle = void 0;
          return _this7;
        }
        var _proto8 = BulletMovement_FollowWeapon.prototype;
        _proto8.reset = function reset() {
          _BulletMovement7.prototype.reset.call(this);
        };
        _proto8.launch = function launch(bulletLauncherData) {
          this.index = bulletLauncherData.index;
        };
        _proto8.onUpdate = function onUpdate(dt) {
          var hookNode = this.owner.owner.node.getChildByPath("Weapons/Hook" + this.index);
          var ske = hookNode.getComponent(sp.Skeleton);
          var HookX_bone = ske.findBone("HookX");
          if (HookX_bone) {
            var _ske$node$uiTransform;
            // 获取骨骼的局部坐标（相对于Skeleton的坐标）
            var localPosition = v3(HookX_bone.worldX, HookX_bone.worldY, 0);
            (_ske$node$uiTransform = ske.node.uiTransform) == null || _ske$node$uiTransform.convertToWorldSpaceAR(localPosition, this.tempPos);
            this.owner.node.setWorldPosition(this.tempPos);
          }
        };
        return BulletMovement_FollowWeapon;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 石壁召唤
       */
      var BulletMovement_FollowZhaoHuan = exports('BulletMovement_FollowZhaoHuan', /*#__PURE__*/function (_BulletMovement8) {
        _inheritsLoose(BulletMovement_FollowZhaoHuan, _BulletMovement8);
        function BulletMovement_FollowZhaoHuan() {
          return _BulletMovement8.apply(this, arguments) || this;
        }
        return BulletMovement_FollowZhaoHuan;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 创建在施法者身上
       */
      var BulletMovement_inCreator = exports('BulletMovement_inCreator', /*#__PURE__*/function (_BulletMovement9) {
        _inheritsLoose(BulletMovement_inCreator, _BulletMovement9);
        function BulletMovement_inCreator() {
          return _BulletMovement9.apply(this, arguments) || this;
        }
        var _proto9 = BulletMovement_inCreator.prototype;
        _proto9.reset = function reset() {
          _BulletMovement9.prototype.reset.call(this);
        }

        /**
         * 重置子弹的本地位置
         * @param isRight 是否朝右
         */;
        _proto9.resetLocalPosition = function resetLocalPosition(isRight) {
          var x = 0;
          var y = 0;
          //加上初始偏移量
          if (this._owner.bulletVO.moveType === GameBattle.BulletMoveType.InCreatorTaiDao) {
            if (this._owner.bulletVO.offset[0] && this._owner.bulletVO.offset[0].length === 2) {
              x = isRight ? this._owner.bulletVO.offset[0][0] : -this._owner.bulletVO.offset[0][0];
              y = this._owner.bulletVO.offset[0][1];
            }
          }
          this.owner.node.setPosition(x, y);
        };
        _proto9.launch = function launch(bulletLauncherData) {
          this.owner.node.parent = this.owner.owner.node;
          var ownerDir = this.owner.owner.curDirection;
          var isRight = ownerDir === GameBattle.Direction.Right || ownerDir === GameBattle.Direction.RightUp || ownerDir === GameBattle.Direction.RightDown;
          this.resetLocalPosition(isRight);
          if (this._owner.bulletVO.hierarchy === 2) {
            this._owner.node.setSiblingIndex(0);
          }
          if (this._owner.bulletVO.type === GameBattle.BulletType.NoAngle) {
            // 非无角度子弹
            this.owner.node.angle = 0;
          }
        };
        _proto9.onUpdate = function onUpdate(dt) {
          //挂在施法者身上的近战刀光，需要根据施法者朝向翻转
          if (this._owner.bulletVO.moveType === GameBattle.BulletMoveType.InCreatorTaiDao) {
            var ownerDir = this.owner.owner.curDirection;
            var isRight = ownerDir === GameBattle.Direction.Right || ownerDir === GameBattle.Direction.RightUp || ownerDir === GameBattle.Direction.RightDown;
            if (isRight) {
              this.owner.node.setScale(Math.abs(this.owner.node.scale.x), this.owner.node.scale.y, this.owner.node.scale.z);
            } else {
              this.owner.node.setScale(-Math.abs(this.owner.node.scale.x), this.owner.node.scale.y, this.owner.node.scale.z);
            }
            this.resetLocalPosition(isRight);
          }
        };
        return BulletMovement_inCreator;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 弹跳子弹 (弹射)
       */
      var BulletMovement_TanTiao = exports('BulletMovement_TanTiao', /*#__PURE__*/function (_BulletMovement10) {
        _inheritsLoose(BulletMovement_TanTiao, _BulletMovement10);
        function BulletMovement_TanTiao() {
          var _this8;
          for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
            args[_key8] = arguments[_key8];
          }
          _this8 = _BulletMovement10.call.apply(_BulletMovement10, [this].concat(args)) || this;
          _this8.target = void 0;
          _this8.needClean = false;
          _this8.catchTargetList = [];
          _this8.catapults_num = 0;
          return _this8;
        }
        var _proto10 = BulletMovement_TanTiao.prototype;
        //弹跳次数
        _proto10.reset = function reset() {
          _BulletMovement10.prototype.reset.call(this);
        };
        _proto10.getTarget = function getTarget() {
          var target = this._owner.skill.getTarget();
          if (!target) {
            this.target = target;
            this.isEnd = true;
            return;
          }
          var map = App.battleMgr.roleCtrl.getRolesByType(target.type);
          var range = this.owner.bulletVO.catapult_srange;
          target = null;
          var list = [];
          for (var i in map) {
            var role = map[i];
            if (!role.checkValid()) {
              continue;
            }
            if (this.catchTargetList.indexOf(role.uid) > -1) {
              continue;
            }
            list.push(role);
          }
          if (list.length > 0) {
            target = null;
            var distance = -1;
            for (var _i = 0; _i < list.length; _i++) {
              var dis = Vec3.distance(this.owner.node.worldPosition, list[_i].node.worldPosition);
              if (dis < range && dis > distance) {
                target = list[_i];
                distance = dis;
              }
            }
          }
          this.target = target;
          if (!this.target) {
            this.isEnd = true;
          } else {
            if (this.needClean) {
              this.catchTargetList.pop();
            }
            this.catchTargetList.push(target.uid);
          }
        };
        _proto10.launch = function launch(bulletLauncherData) {
          this.target = this._owner.target;
          this.catchTargetList = [this.target.uid];
          this.catapults_num = this.owner.bulletVO.catapults_num;
          this._isEnd = false;
          this.needClean = this.owner.bulletVO.repeat;
        };
        _proto10.onHit = function onHit(target) {
          // console.log('onHit', target.uid);
        };
        _proto10.tanShe = function tanShe(target) {
          if (!this.target || this.target.uid !== target.uid) {
            this.catchTargetList.pop();
            this.target = target;
            this.catchTargetList.push(target.uid);
          }
          this.catapults_num--;
          if (this.catapults_num <= 0) {
            this._isEnd = true;
            return;
          }
          this.getTarget();
        };
        _proto10.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          if (!this.target || !this.target.checkValid()) {
            this._isEnd = true;
            return;
          }
          var startPos = this._owner.node.worldPosition;
          var endPos = this.target.getHitWorldPosition();
          var frameSpeed = this.getFrameSpeed();
          //let pos = endPos.clone().subtract(startPos).normalize().multiplyScalar(frameSpeed);
          Vec3.subtract(this.tempPos, endPos, startPos);
          var pos = this.tempPos.normalize().multiplyScalar(frameSpeed);
          this._owner.node.x += pos.x;
          this._owner.node.y += pos.y;
          var angle = BattleUtil.get2DAngleByPoint(startPos, endPos);
          this._owner.node.angle = angle;
          var distance = Vec3.distance(startPos, endPos);
          if (distance <= frameSpeed) {
            this.tanShe(this.target);
          }
        };
        return BulletMovement_TanTiao;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 环绕子弹运动
       */
      var BulletMovement_RoundBullet = exports('BulletMovement_RoundBullet', /*#__PURE__*/function (_BulletMovement11) {
        _inheritsLoose(BulletMovement_RoundBullet, _BulletMovement11);
        function BulletMovement_RoundBullet() {
          var _this9;
          for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
            args[_key9] = arguments[_key9];
          }
          _this9 = _BulletMovement11.call.apply(_BulletMovement11, [this].concat(args)) || this;
          _this9._t = void 0;
          //初始与圆心的夹角
          _this9.angle = 0;
          // 圆周运动的半径
          _this9.radius = void 0;
          // 运动的速度（角速度，单位：弧度每秒）
          _this9.angularSpeed = void 0;
          _this9._count = 4;
          _this9.target = null;
          return _this9;
        }
        var _proto11 = BulletMovement_RoundBullet.prototype;
        _proto11.reset = function reset() {
          _BulletMovement11.prototype.reset.call(this);
        };
        _proto11.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          this.radius = this._owner.bulletVO.distance;
          this.angularSpeed = this._owner.bulletVO.angle_speed;
          var bulletId = Number(this._owner.bulletVO.position);
          var bullets = App.battleMgr.bulletCtrl.getBulletsByBullId(bulletId);
          if (bullets.length > 0) {
            this.target = bullets.pop();
          }
          // 圆心坐标
          var pos = this.target.node.worldPosition;
          var cx = pos.x;
          var cy = pos.y;
          var i = bulletLauncherData.index;
          var angle = i * (2 * Math.PI / bulletLauncherData.count); // 0, 120, 240 度对应的弧度
          var x = cx + this.radius * Math.cos(angle);
          var y = cy + this.radius * Math.sin(angle);
          this.angle = angle;
          this.owner.node.setWorldPosition(x, y, 0);
          this.owner.node.angle = 0;
        };
        _proto11.onUpdate = function onUpdate(dt) {
          if (!this.target || !this.target.checkValid()) {
            this.isEnd = true;
            return;
          }

          // 更新角度
          this.angle += this.angularSpeed * dt;
          var pos = this.target.node.worldPosition;
          var centerX = pos.x;
          var centerY = pos.y;
          // 计算新的位置
          var x = centerX + this.radius * Math.cos(this.angle);
          var y = centerY + this.radius * Math.sin(this.angle);

          // 设置节点的新位置
          this.owner.node.setWorldPosition(x, y, 0);

          // // 计算节点与中心点的方向向量
          // let direction = v2(centerX - x, centerY - y);

          // // 计算方向向量的角度（弧度）
          // let angleRadians = Math.atan2(direction.y, direction.x);

          // // 将弧度转换为角度，并设置节点的旋转角度
          // let angleDegrees = angleRadians * (180 / Math.PI);
          // this.owner.node.angle = angleDegrees - 180;
        };

        return BulletMovement_RoundBullet;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 乌云
       */
      var BulletMovement_Lock = exports('BulletMovement_Lock', /*#__PURE__*/function (_BulletMovement12) {
        _inheritsLoose(BulletMovement_Lock, _BulletMovement12);
        function BulletMovement_Lock() {
          var _this10;
          for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
            args[_key10] = arguments[_key10];
          }
          _this10 = _BulletMovement12.call.apply(_BulletMovement12, [this].concat(args)) || this;
          _this10.target = null;
          return _this10;
        }
        var _proto12 = BulletMovement_Lock.prototype;
        _proto12.reset = function reset() {
          _BulletMovement12.prototype.reset.call(this);
        };
        _proto12.launch = function launch(bulletLauncherData) {
          this.speed = this.getFrameSpeed();
          this.target = this._owner.skill.getTarget();
          this._owner.node.angle = 0;
          this._owner.node.setWorldPosition(this._owner.owner.node.worldPosition);
        };
        _proto12.onUpdate = function onUpdate(dt) {
          if (!this.target || !this.target.checkValid() || this.target.uid === this.owner.owner.uid) {
            this.target = this._owner.skill.getTarget();
            if (!this.target) {
              this.target = this.owner.owner;
            }
          }
          var startPos = this._owner.node.worldPosition;
          //const endPos = this.target.node.worldPosition.clone();
          // endPos.add(this.target.getHitPosition());
          //let pos = endPos.clone().subtract(startPos).normalize().multiplyScalar(this.speed);
          Vec3.subtract(this.tempPos, this.target.node.worldPosition, startPos);
          var pos = this.tempPos.normalize().multiplyScalar(this.speed);
          pos.add(startPos);
          this._owner.node.position = pos;
        };
        return BulletMovement_Lock;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 创建在目标位置上
       */
      var BulletMovement_onTarget = exports('BulletMovement_onTarget', /*#__PURE__*/function (_BulletMovement13) {
        _inheritsLoose(BulletMovement_onTarget, _BulletMovement13);
        function BulletMovement_onTarget() {
          return _BulletMovement13.apply(this, arguments) || this;
        }
        var _proto13 = BulletMovement_onTarget.prototype;
        _proto13.reset = function reset() {
          _BulletMovement13.prototype.reset.call(this);
        };
        _proto13.launch = function launch(bulletLauncherData) {
          var target = this._owner.target;
          if (!target) {
            return;
          }
          if (this._owner.bulletVO.move_param && this._owner.bulletVO.move_param.length > 0) {
            //最大半径
            var _this$_owner$bulletVO = this._owner.bulletVO.move_param,
              min = _this$_owner$bulletVO[0],
              max = _this$_owner$bulletVO[1];
            //随机半径
            var r = 0;
            if (max) {
              r = Utils.GetRandomNum(min, max);
            } else {
              r = Utils.GetRandomNum(0, min);
            }
            //随机角度
            var theta = Math.random() * (2 * Math.PI);
            var x = target.node.worldPosition.x + r * Math.cos(theta);
            var y = target.node.worldPosition.y + r * Math.sin(theta);
            this.owner.node.setWorldPosition(x, y, target.node.worldPosition.z);
          } else {
            this.owner.node.setWorldPosition(target.node.worldPosition.x, target.node.worldPosition.y, target.node.worldPosition.z);
          }
          this.owner.node.angle = 0;
        };
        _proto13.onUpdate = function onUpdate(dt) {};
        return BulletMovement_onTarget;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 延展子弹(例如裂地波)
       */
      var BulletMovement_YanZhan = exports('BulletMovement_YanZhan', /*#__PURE__*/function (_BulletMovement14) {
        _inheritsLoose(BulletMovement_YanZhan, _BulletMovement14);
        function BulletMovement_YanZhan() {
          return _BulletMovement14.apply(this, arguments) || this;
        }
        var _proto14 = BulletMovement_YanZhan.prototype;
        _proto14.reset = function reset() {
          _BulletMovement14.prototype.reset.call(this);
        };
        _proto14.launch = function launch(bulletLauncherData) {
          var _this11 = this;
          var target = this._owner.target;
          if (this._owner.bulletVO.type !== GameBattle.BulletType.NoAngle) {
            var pos = this._owner.owner.getFirePosition();
            this.owner.node.setWorldPosition(pos.x, pos.y, pos.z);
            //const endPos = target.node.worldPosition.clone().add(target.getHitPosition());
            Vec3.add(this.tempPos, target.node.worldPosition, target.getHitPosition());
            var endPos = this.tempPos;
            var angle = BattleUtil.get2DAngleByPoint(pos, endPos);
            this._owner.node.angle = angle;
          }
          var _this$_owner$bulletVO2 = this._owner.bulletVO.move_param,
            w = _this$_owner$bulletVO2[0],
            h = _this$_owner$bulletVO2[1],
            tm = _this$_owner$bulletVO2[2];
          var size = new Size(w, h);
          tween(this._owner.hitBox).tag(GameBattle.BattleTweenTag).to(tm, {
            contentSize: size
          }).call(function () {
            _this11._isEnd = true;
          }).start();
        };
        return BulletMovement_YanZhan;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 直接创建在预警位置
       */
      var BulletMovement_Warning = exports('BulletMovement_Warning', /*#__PURE__*/function (_BulletMovement15) {
        _inheritsLoose(BulletMovement_Warning, _BulletMovement15);
        function BulletMovement_Warning() {
          return _BulletMovement15.apply(this, arguments) || this;
        }
        var _proto15 = BulletMovement_Warning.prototype;
        _proto15.reset = function reset() {
          _BulletMovement15.prototype.reset.call(this);
        };
        _proto15.launch = function launch(bulletLauncherData) {
          var pos = this.owner.skill.targetPos;
          this.owner.node.setWorldPosition(pos.x, pos.y, pos.z);
        };
        return BulletMovement_Warning;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 有角速度的跟随
       */
      var BulletMovement_AngularFollow = exports('BulletMovement_AngularFollow', /*#__PURE__*/function (_BulletMovement16) {
        _inheritsLoose(BulletMovement_AngularFollow, _BulletMovement16);
        function BulletMovement_AngularFollow() {
          var _this12;
          for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
            args[_key11] = arguments[_key11];
          }
          _this12 = _BulletMovement16.call.apply(_BulletMovement16, [this].concat(args)) || this;
          /** 目标 */
          _this12._target = void 0;
          /** 当前角度 */
          _this12._currentAngle = 0;
          /** 当前飞行距离 */
          _this12._traveledDistance = 0;
          /** 起始位置 */
          _this12._startPosition = new Vec3();
          /** 存活时间 */
          _this12._aliveTime = 0;
          return _this12;
        }
        var _proto16 = BulletMovement_AngularFollow.prototype;
        _proto16.reset = function reset() {
          this._target = null;
          this._currentAngle = 0;
          this._traveledDistance = 0;
          this._aliveTime = 0;
          this._startPosition.set(Vec3.ZERO);
          this._isEnd = false;
        };
        _proto16.launch = function launch(bulletLauncherData) {
          this.lockAngle = this._owner.bulletVO.type === GameBattle.BulletType.NoAngle;
          this._target = this._owner.target;
          this.speed = this._owner.bulletVO.initialSpeed;
          this._startPosition = this._owner.node.worldPosition;

          // 初始角度设置为朝向目标
          if (this._target) {
            var startPos = this._owner.node.worldPosition;
            var endPos = this._target.node.worldPosition;
            this._currentAngle = Math.atan2(endPos.y - startPos.y, endPos.x - startPos.x);
            !this.lockAngle && (this._owner.node.angle = this._currentAngle * 180 / Math.PI);
          }
        };
        _proto16.onUpdate = function onUpdate(dt) {
          if (!this._target || !this._target.checkValid()) {
            this._isEnd = true;
            return;
          }

          // 更新存活时间
          this._aliveTime += dt;
          if (this._owner.bulletVO.holding_time > 0 && this._aliveTime >= this._owner.bulletVO.holding_time) {
            this._isEnd = true;
            return;
          }

          // 获取目标方向
          var startPos = this._owner.node.worldPosition;
          //const endPos = this._target.node.worldPosition.clone().add(this._target.getHitPosition());
          Vec3.add(this.tempPos, this._target.node.worldPosition, this._target.getHitPosition());
          var endPos = this.tempPos;
          var targetAngle = Math.atan2(endPos.y - startPos.y, endPos.x - startPos.x);

          // 计算角度差
          var angleDiff = targetAngle - this._currentAngle;
          while (angleDiff > Math.PI) angleDiff -= Math.PI * 2;
          while (angleDiff < -Math.PI) angleDiff += Math.PI * 2;

          // 根据角速度调整当前角度
          var angleSpeed = this._owner.bulletVO.angle_speed; // 角速度（弧度/秒）
          var maxAngleStep = angleSpeed * dt;
          this._currentAngle += Math.sign(angleDiff) * Math.min(Math.abs(angleDiff), maxAngleStep);

          // 计算移动方向和新位置
          var moveDir = new Vec3(Math.cos(this._currentAngle), Math.sin(this._currentAngle), 0);

          // 应用速度
          var frameSpeed = this.speed * dt;
          //const newPos = startPos.clone().add(moveDir.multiplyScalar(frameSpeed));
          Vec3.add(this.tempVec, startPos, moveDir.multiplyScalar(frameSpeed));
          var newPos = this.tempVec;

          // 更新位置和角度
          this._owner.node.setWorldPosition(newPos);
          !this.lockAngle && (this._owner.node.angle = this._currentAngle * 180 / Math.PI);

          // 更新已飞行距离
          var distanceMoved = Vec3.distance(startPos, newPos);
          this._traveledDistance += distanceMoved;

          // 检查是否达到最大距离
          if (this._owner.bulletVO.distance > 0 && this._traveledDistance >= this._owner.bulletVO.distance) {
            this._isEnd = true;
            return;
          }
        };
        _proto16.onHit = function onHit(target) {
          this._isEnd = true;
        };
        return BulletMovement_AngularFollow;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 回旋子弹
       */
      var BulletMovement_HuiXuan = exports('BulletMovement_HuiXuan', /*#__PURE__*/function (_BulletMovement17) {
        _inheritsLoose(BulletMovement_HuiXuan, _BulletMovement17);
        function BulletMovement_HuiXuan() {
          var _this13;
          for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
            args[_key12] = arguments[_key12];
          }
          _this13 = _BulletMovement17.call.apply(_BulletMovement17, [this].concat(args)) || this;
          _this13._tween = null;
          return _this13;
        }
        var _proto17 = BulletMovement_HuiXuan.prototype;
        _proto17.reset = function reset() {
          if (this._tween) {
            this._tween.stop();
            this._tween = null;
          }
          _BulletMovement17.prototype.reset.call(this);
        };
        _proto17.launch = function launch(bulletLauncherData) {
          if (this._direction.x === 0 && this._direction.y === 0) {
            this._direction.x = 1;
          }

          // let target=this.owner.owner.lockTargetCtrl.target;
          // if(target&&this.owner.owner.type===GameBattle.RoleType.Player){
          //     this._direction=target.node.worldPosition.clone().subtract(this.owner.node.worldPosition).normalize();
          // }

          var startPos = this._owner.owner.getFirePosition2();
          console.log(">>>>>>>>> startPosstartPosstartPos:", startPos);
          this._owner.node.setWorldPosition(startPos);
          var frameSpeed = this.getFrameSpeed();
          //const offset = this._direction.clone().multiplyScalar(frameSpeed);
          Vec3.multiplyScalar(this.tempVec, this._direction, frameSpeed);
          var offset = this.tempVec;
          var node = this._owner.node;
          var self = this;
          var tm = this._owner.bulletVO.distance / this._owner.bulletVO.initialSpeed;
          var _this$_owner$bulletVO3 = this._owner.bulletVO.move_param,
            hole_tm = _this$_owner$bulletVO3[0];
          this._tween = tween(node).tag(GameBattle.BattleTweenTag).to(tm, {
            scale_z: 1
          }, {
            onUpdate: function onUpdate(target, ratio) {
              node.worldPosition = node.worldPosition.add(offset);
            }
          }).delay(hole_tm).to(tm, {
            worldPosition: startPos
          }).call(function () {
            self._isEnd = true;
          }).start();
        };
        return BulletMovement_HuiXuan;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 寒冰激光
       */
      var BulletMovement_HanBingJiGuang = exports('BulletMovement_HanBingJiGuang', /*#__PURE__*/function (_BulletMovement18) {
        _inheritsLoose(BulletMovement_HanBingJiGuang, _BulletMovement18);
        function BulletMovement_HanBingJiGuang() {
          return _BulletMovement18.apply(this, arguments) || this;
        }
        var _proto18 = BulletMovement_HanBingJiGuang.prototype;
        _proto18.reset = function reset() {
          _BulletMovement18.prototype.reset.call(this);
        };
        _proto18.launch = function launch(bulletLauncherData) {
          var target = this._owner.target;
          //最大半径
          var _this$_owner$bulletVO4 = this._owner.bulletVO.move_param,
            r = _this$_owner$bulletVO4[0],
            max = _this$_owner$bulletVO4[1];
          //随机角度
          var theta = Math.random() * (2 * Math.PI);
          var x = target.node.worldPosition.x + r * Math.cos(theta);
          var y = target.node.worldPosition.y + r * Math.sin(theta);
          this.owner.node.setWorldPosition(x, y, target.node.worldPosition.z);
          this.owner.node.angle = Math.random() * 360;
        };
        _proto18.onUpdate = function onUpdate(dt) {};
        return BulletMovement_HanBingJiGuang;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 火焰吐息
       */
      var BulletMovement_HuoYanTuXi = exports('BulletMovement_HuoYanTuXi', /*#__PURE__*/function (_BulletMovement19) {
        _inheritsLoose(BulletMovement_HuoYanTuXi, _BulletMovement19);
        function BulletMovement_HuoYanTuXi() {
          return _BulletMovement19.apply(this, arguments) || this;
        }
        var _proto19 = BulletMovement_HuoYanTuXi.prototype;
        _proto19.reset = function reset() {
          _BulletMovement19.prototype.reset.call(this);
        };
        _proto19.launch = function launch(bulletLauncherData) {
          //console.log('火炎吐息---------->>> ',bulletLauncherData.index,bulletLauncherData.count);
          var target = this._owner.target;
          var _this$_owner$bulletVO5 = this._owner.bulletVO.move_param,
            range = _this$_owner$bulletVO5[0],
            spaceMin = _this$_owner$bulletVO5[1],
            spaceMax = _this$_owner$bulletVO5[2];
          var index = bulletLauncherData.index;
          var count = bulletLauncherData.count;
          var startOffsetX;
          if (index === count - 1) {
            startOffsetX = Utils.GetRandomNum(-range, range);
            BulletMovement_HuoYanTuXi.lastStartOffsetX = startOffsetX;
            //console.log('-------------------------startX',startOffsetX);
          } else {
            startOffsetX = BulletMovement_HuoYanTuXi.lastStartOffsetX;
            //console.log('+++++++lastStartX',startOffsetX);
          }

          var spaceX = Utils.GetRandomNum(spaceMin, spaceMax);
          var dir = index % 2 === 0 ? 1 : -1;
          var x = target.node.worldPosition.x + startOffsetX + dir * spaceX * Math.floor((index + 1) / 2);
          var y = target.node.worldPosition.y;
          this.owner.node.setWorldPosition(x, y, target.node.worldPosition.z);
          //console.log('火炎吐息---------->>> ',startOffsetX,dir*spaceX*(Math.floor((index+1)/2)));
        };

        _proto19.onUpdate = function onUpdate(dt) {};
        return BulletMovement_HuoYanTuXi;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 飞向玩家的子弹
       */
      BulletMovement_HuoYanTuXi.lastStartOffsetX = 0;
      var BulletMovement_ToPlayer = exports('BulletMovement_ToPlayer', /*#__PURE__*/function (_BulletMovement20) {
        _inheritsLoose(BulletMovement_ToPlayer, _BulletMovement20);
        function BulletMovement_ToPlayer() {
          var _this14;
          for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
            args[_key13] = arguments[_key13];
          }
          _this14 = _BulletMovement20.call.apply(_BulletMovement20, [this].concat(args)) || this;
          /** 计算贝塞尔时间 0-1 */
          _this14._t = void 0;
          /** 曲线点数组, 起点终点控制点 */
          _this14._startPos = void 0;
          _this14._endPos = void 0;
          _this14._ctrlPos = new Vec3();
          _this14._target = null;
          return _this14;
        }
        var _proto20 = BulletMovement_ToPlayer.prototype;
        _proto20.reset = function reset() {
          _BulletMovement20.prototype.reset.call(this);
        };
        _proto20.launch = function launch(bulletLauncherData) {
          this._owner.targetType = GameBattle.SkillApplyTarget.Self;
          this.speed = this._owner.bulletVO.initialSpeed;
          this._target = App.battleMgr.roleCtrl.player;
          this._t = 0;
          this._startPos = this._owner.node.worldPosition;
          //this._endPos = this._target.node.worldPosition.clone().add(this._target.getHitPosition());
          Vec3.add(this.tempPos, this._target.node.worldPosition, this._target.getHitPosition());
          this._endPos = this.tempPos;
          this.getMidPoint();
        };
        _proto20.getMidPoint = function getMidPoint() {
          Vec3.add(this._ctrlPos, this._startPos, this._endPos);
          this._ctrlPos.multiplyScalar(0.5);
          var hight = 0; //Utils.GetRandomNum(-400, 400)
          if (this._owner.bulletVO.move_param.length === 2) {
            hight = Utils.GetRandomNum(this._owner.bulletVO.move_param[0], this._owner.bulletVO.move_param[1]);
          } else if (this._owner.bulletVO.move_param.length === 1) {
            hight = this._owner.bulletVO.move_param[0];
          }
          this._ctrlPos.add3f(0, hight, 0);
        };
        _proto20.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          this.speed = this.getFrameSpeed() / 8;
          this._t += dt * this.speed;
          if (this._t > 1) {
            this._t = 1;
            this._isEnd = true;
          }
          //this._endPos = this._target.node.worldPosition.clone().add(this._target.getHitPosition());
          Vec3.add(this.tempPos, this._target.node.worldPosition, this._target.getHitPosition());
          this._endPos = this.tempPos;
          var point = MathUtils.bessel2eLevel(this._t, this._startPos, this._ctrlPos, this._endPos);
          this._owner.node.setWorldPosition(point.x, point.y, 0);
          var angle = BattleUtil.get2DAngleByPoint(this._owner.node.position, this._endPos);
          this._owner.node.angle = angle;
        };
        return BulletMovement_ToPlayer;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 直线分裂
       */
      var BulletMovement_ZhiXianFenLie = exports('BulletMovement_ZhiXianFenLie', /*#__PURE__*/function (_BulletMovement21) {
        _inheritsLoose(BulletMovement_ZhiXianFenLie, _BulletMovement21);
        function BulletMovement_ZhiXianFenLie() {
          var _this15;
          for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
            args[_key14] = arguments[_key14];
          }
          _this15 = _BulletMovement21.call.apply(_BulletMovement21, [this].concat(args)) || this;
          /** 起始位置 */
          _this15._startPosition = new Vec3();
          return _this15;
        }
        var _proto21 = BulletMovement_ZhiXianFenLie.prototype;
        _proto21.reset = function reset() {
          _BulletMovement21.prototype.reset.call(this);
          this._direction.set(0, 0, 0);
          this._startPosition.set(0, 0, 0);
        };
        _proto21.init = function init() {};
        _proto21.launch = function launch(bulletLauncherData) {
          var _this$_owner$bulletVO6 = this._owner.bulletVO.move_param,
            angle = _this$_owner$bulletVO6[0];
          if (!angle) {
            angle = 0;
          }
          var theta = angle * Math.ceil(bulletLauncherData.index / 2) * (bulletLauncherData.index % 2 === 0 ? -1 : 1);
          var dir = MathUtils.angleToDirection(theta);
          this._direction.set(dir.x, dir.y, 0);
          this._direction = this._direction.normalize();
          this._startPosition.set(this._owner.node.worldPosition);
        };
        _proto21.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          if (this._checkDistance()) {
            this._isEnd = true;
            return;
          }
          var frameSpeed = this.getFrameSpeed();
          //const offset = this._direction.clone().multiplyScalar(frameSpeed);
          Vec3.multiplyScalar(this.tempVec, this._direction, frameSpeed);
          var offset = this.tempVec;

          // const pos = this._owner.node.worldPosition.clone();
          Vec3.add(this.tempPos, this._owner.node.worldPosition, offset);
          this._owner.node.worldPosition = this.tempPos;
        }

        /**
         * 检测是否达到设定距离
         * @returns
         */;
        _proto21._checkDistance = function _checkDistance() {
          var result = true;
          var maxDistance = this._owner.bulletVO.distance;
          if (maxDistance === -1) {
            // 无限距离
            result = false;
          } else {
            //const distance = this._owner.node.worldPosition.clone().subtract(this._startPosition).length();
            Vec3.subtract(this.tempVec, this._owner.node.worldPosition, this._startPosition);
            var distance = this.tempVec.length();
            result = distance >= maxDistance;
          }
          return result;
        };
        _createClass(BulletMovement_ZhiXianFenLie, [{
          key: "startPosition",
          get: function get() {
            return this._startPosition;
          }
        }]);
        return BulletMovement_ZhiXianFenLie;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 弹力球，碰到镜头边缘反弹
       */
      var BulletMovement_TanLiQiu = exports('BulletMovement_TanLiQiu', /*#__PURE__*/function (_BulletMovement22) {
        _inheritsLoose(BulletMovement_TanLiQiu, _BulletMovement22);
        function BulletMovement_TanLiQiu() {
          var _this16;
          for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
            args[_key15] = arguments[_key15];
          }
          _this16 = _BulletMovement22.call.apply(_BulletMovement22, [this].concat(args)) || this;
          /** 起始位置 */
          _this16._startPosition = new Vec3();
          /**累计的移动路程 */
          _this16._moveDisAll = 0;
          /** 反弹位置 */
          _this16._reboundPosition = new Vec3();
          return _this16;
        }
        var _proto22 = BulletMovement_TanLiQiu.prototype;
        _proto22.reset = function reset() {
          _BulletMovement22.prototype.reset.call(this);
          this._direction.set(0, 0, 0);
          this._startPosition.set(0, 0, 0);
          this._moveDisAll = 0;
        };
        _proto22.init = function init() {
          this._moveDisAll = 0;
        };
        _proto22.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          var startPos = this._owner.node.worldPosition;
          if (this._direction.x === 0 && this._direction.y === 0) {
            this._direction.x = 1;
          }
          this._startPosition.set(startPos);
          this._reboundPosition.set(startPos);
          if (this._owner.bulletVO.type === GameBattle.BulletType.NoAngle) {
            this._owner.node.angle = 0;
          }
        };
        _proto22.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          if (this._checkDistance()) {
            this._isEnd = true;
            return;
          }
          if (this._direction.x === 0 && this._direction.y === 0) return;
          this.speed = this.getMoveSpeed();
          var frameSpeed = this.speed * dt;
          //const offset = this._direction.clone().multiplyScalar(frameSpeed);
          Vec3.multiplyScalar(this.tempVec, this._direction, frameSpeed);
          var offset = this.tempVec;
          //const pos = this._owner.node.worldPosition.clone();
          Vec3.add(this.tempPos, this._owner.node.worldPosition, offset);
          this._owner.node.worldPosition = this.tempPos;

          //碰到镜头边缘后反弹
          var playerCamera = App.battleMgr.battleMainViewCtrl.playerCamera.camera;
          var uiCamera = find("Canvas/Camera").getComponent(Camera);
          var posInUI = Utils.worldPositionCameraAToCameraB(this._owner.node.position, playerCamera, uiCamera);
          var reboundAreaSize = App.battleMgr.battleMainViewCtrl.node.getComponent(UITransform).contentSize;
          //console.log(">>>>   bullet pos:",posUI.x.toFixed(0),posUI.y.toFixed(0),reboundSize.x,reboundSize.y);
          if (this._direction.x < 0 && posInUI.x <= 0 || this._direction.x > 0 && posInUI.x >= reboundAreaSize.width) {
            this.reBound(false);
          } else if (this._direction.y < 0 && posInUI.y <= 0 || this._direction.y > 0 && posInUI.y >= reboundAreaSize.height) {
            this.reBound(true);
          }
        }

        /**
         * 碰到镜头边缘后反弹
         * @param isHorizontal
         */;
        _proto22.reBound = function reBound(isHorizontal) {
          var angleInRadians = this._owner.node.angle * (Math.PI / 180);
          var angleVec = v2(Math.cos(angleInRadians), Math.sin(angleInRadians));
          if (isHorizontal) {
            this._direction.y *= -1;
            angleVec.y *= -1;
          } else {
            this._direction.x *= -1;
            angleVec.x *= -1;
          }
          var angleInRadiansAfter = Math.atan2(angleVec.y, angleVec.x);
          this._owner.node.angle = angleInRadiansAfter * (180 / Math.PI);
          //const distance = this._owner.node.worldPosition.clone().subtract(this._reboundPosition).length();
          Vec3.subtract(this.tempVec, this._owner.node.worldPosition, this._reboundPosition);
          var distance = this.tempVec.length();
          this._moveDisAll += distance;
          this._reboundPosition.set(this._owner.node.worldPosition);
        }

        /**
         * 检测是否达到设定距离
         * @returns
         */;
        _proto22._checkDistance = function _checkDistance() {
          var result = true;
          var maxDistance = this._owner.bulletVO.distance;
          if (maxDistance === -1) {
            // 无限距离
            result = false;
          } else {
            if (this._moveDisAll > 0) {
              result = this._moveDisAll >= maxDistance;
            } else {
              //const distance = this._owner.node.worldPosition.clone().subtract(this._startPosition).length();
              Vec3.subtract(this.tempVec, this._owner.node.worldPosition, this._startPosition);
              var distance = this.tempVec.length();
              result = distance >= maxDistance;
            }
          }
          return result;
        };
        _createClass(BulletMovement_TanLiQiu, [{
          key: "startPosition",
          get: function get() {
            return this._startPosition;
          }
        }]);
        return BulletMovement_TanLiQiu;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 光芒射线
       */
      var BulletMovement_GuangMangSheXian = exports('BulletMovement_GuangMangSheXian', /*#__PURE__*/function (_BulletMovement23) {
        _inheritsLoose(BulletMovement_GuangMangSheXian, _BulletMovement23);
        function BulletMovement_GuangMangSheXian() {
          return _BulletMovement23.apply(this, arguments) || this;
        }
        var _proto23 = BulletMovement_GuangMangSheXian.prototype;
        _proto23.reset = function reset() {
          _BulletMovement23.prototype.reset.call(this);
        };
        _proto23.launch = function launch(bulletLauncherData) {
          // 目标位置
          var pos = this.owner.target.node.worldPosition;
          this.owner.node.setWorldPosition(pos.x, pos.y, 0);
          var i = bulletLauncherData.index;
          var angleOffset = 0;
          if (this._owner.bulletVO.move_param && this._owner.bulletVO.move_param.length > 0) {
            angleOffset = this._owner.bulletVO.move_param[this.owner.indexInSkill] || 0;
          }
          var angle = i * (360 / bulletLauncherData.count) + angleOffset;
          //console.log(">>>>>>>>> index,indexinskill:",i,this.owner.indexInSkill);
          this.owner.node.angle = angle;
        };
        return BulletMovement_GuangMangSheXian;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 直线飞向施法者
       */
      var BulletMovement_ToOwnerLine = exports('BulletMovement_ToOwnerLine', /*#__PURE__*/function (_BulletMovement24) {
        _inheritsLoose(BulletMovement_ToOwnerLine, _BulletMovement24);
        function BulletMovement_ToOwnerLine() {
          var _this17;
          for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
            args[_key16] = arguments[_key16];
          }
          _this17 = _BulletMovement24.call.apply(_BulletMovement24, [this].concat(args)) || this;
          _this17._target = null;
          _this17._offset = v2(0, 0);
          _this17.targetPosTemp = new Vec3();
          return _this17;
        }
        var _proto24 = BulletMovement_ToOwnerLine.prototype;
        _proto24.reset = function reset() {
          _BulletMovement24.prototype.reset.call(this);
          this._direction.set(0, 0, 0);
        };
        _proto24.launch = function launch(bulletLauncherData) {
          this.speed = this._owner.bulletVO.initialSpeed;
          this._target = this.owner.owner;
          if (!this._target || this._target._isDead) {
            return;
          }
          if (this._owner.bulletVO.move_param.length >= 0) {
            this._offset.x = this._owner.bulletVO.move_param[0];
            this._offset.y = this._owner.bulletVO.move_param[1];
          }
          this.setMoveDir();
        };
        _proto24.setMoveDir = function setMoveDir() {
          this._direction = this.getTargetPos().subtract(this.owner.node.worldPosition).normalize();
        };
        _proto24.getTargetPos = function getTargetPos() {
          // let pos=this._target.node.worldPosition.clone();
          // pos.x+=this._offset.x;
          // pos.y+=this._offset.y;
          this.targetPosTemp.x = this._target.node.worldPosition.x + this._offset.x;
          this.targetPosTemp.y = this._target.node.worldPosition.y + this._offset.y;
          return this.targetPosTemp;
        };
        _proto24.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          this.setMoveDir();
          if (this._direction.x === 0 && this._direction.y === 0) return;
          this.speed = this.getMoveSpeed();
          var frameSpeed = this.speed * dt;
          // const offset = this._direction.clone().multiplyScalar(frameSpeed);
          Vec3.multiplyScalar(this.tempVec, this._direction, frameSpeed);
          var offset = this.tempVec;
          // const pos = this._owner.node.worldPosition.clone();
          Vec3.add(this.tempPos, this._owner.node.worldPosition, offset);
          var nextPos = this.tempPos;
          var angle = BattleUtil.get2DAngleByPoint(this._owner.node.position, nextPos);
          this._owner.node.worldPosition = nextPos;
          this._owner.node.angle = angle;
          var dis = frameSpeed * 1.5;
          if (this.getTargetPos().subtract(this.owner.node.worldPosition).length() <= dis) {
            this.isEnd = true;
          }
        };
        return BulletMovement_ToOwnerLine;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 雷霆万钧
       */
      var BulletMovement_LeiTingWanJun = exports('BulletMovement_LeiTingWanJun', /*#__PURE__*/function (_BulletMovement_TanLi) {
        _inheritsLoose(BulletMovement_LeiTingWanJun, _BulletMovement_TanLi);
        function BulletMovement_LeiTingWanJun() {
          return _BulletMovement_TanLi.apply(this, arguments) || this;
        }
        var _proto25 = BulletMovement_LeiTingWanJun.prototype;
        _proto25.reset = function reset() {
          _BulletMovement_TanLi.prototype.reset.call(this);
          this._direction.set(0, 0, 0);
        };
        _proto25.launch = function launch(bulletLauncherData) {
          // let pos=this.owner.owner.node.worldPosition.clone();
          var width = 0;
          var height = 0;
          if (this._owner.bulletVO.move_param.length >= 0) {
            width = this._owner.bulletVO.move_param[0];
            height = this._owner.bulletVO.move_param[1];
          }
          var offsetX = Utils.GetRandomNum(-width, width);
          var offsetY = Utils.GetRandomNum(-height, height);
          // pos.x+=offsetX;
          // pos.y+=offsetY;
          this.tempPos.x = this.owner.owner.node.worldPosition.x + offsetX;
          this.tempPos.y = this.owner.owner.node.worldPosition.y + offsetY;
          this._owner.node.worldPosition = this.tempPos;
          var v2 = MathUtils.angleToDirection(Utils.GetRandomNum(0, 360));
          this._direction = v3(v2.x, v2.y, 0).normalize();
          _BulletMovement_TanLi.prototype.launch.call(this, bulletLauncherData);
        };
        return BulletMovement_LeiTingWanJun;
      }(BulletMovement_TanLiQiu));

      /**
       * 子弹运动器类型 —— 飞舞雷环
       */
      var BulletMovement_FeiWuLeiHuan = exports('BulletMovement_FeiWuLeiHuan', /*#__PURE__*/function (_BulletMovement25) {
        _inheritsLoose(BulletMovement_FeiWuLeiHuan, _BulletMovement25);
        function BulletMovement_FeiWuLeiHuan() {
          var _this18;
          for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
            args[_key17] = arguments[_key17];
          }
          _this18 = _BulletMovement25.call.apply(_BulletMovement25, [this].concat(args)) || this;
          /** 计算贝塞尔时间 0-1 */
          _this18._t = void 0;
          /** 曲线点数组, 起点终点控制点 */
          _this18._startPos = void 0;
          _this18._endPos = void 0;
          _this18._ctrlPos = new Vec3();
          _this18._dirVec = void 0;
          _this18._isReturn = false;
          _this18._angle = 110;
          _this18._bulletLauncherData = void 0;
          _this18.tempVec2 = new Vec3();
          return _this18;
        }
        var _proto26 = BulletMovement_FeiWuLeiHuan.prototype;
        _proto26.reset = function reset() {
          _BulletMovement25.prototype.reset.call(this);
        };
        _proto26.launch = function launch(bulletLauncherData) {
          this._bulletLauncherData = bulletLauncherData;
          this.speed = this._owner.bulletVO.initialSpeed;
          var target = this._owner.target;
          this._t = 0;
          this._isReturn = false;
          this._startPos = this._owner.node.worldPosition;
          //console.log(">>>>>>>>>>> start:",this._startPos.x,this._startPos.y);
          //this._dirVec=target.node.worldPosition.clone().subtract(this.owner.owner.node.worldPosition).normalize();
          Vec3.subtract(this.tempPos, target.node.worldPosition, this.owner.owner.node.worldPosition);
          this._dirVec = this.tempPos.normalize();
          //this._endPos=this._startPos.clone().add(this._dirVec.clone().multiplyScalar(this._owner.bulletVO.move_param[0]));
          Vec3.multiplyScalar(this.tempVec, this._dirVec, this._owner.bulletVO.move_param[0]);
          Vec3.add(this.tempVec2, this._startPos, this.tempVec);
          this._endPos = this.tempVec2;
          this.getMidPoint();
        };
        _proto26.getMidPoint = function getMidPoint() {
          var sign = this._isReturn ? 1 : -1;
          var sign2 = this._bulletLauncherData.index === 0 ? 1 : -1;
          var dirV = v2(this._dirVec.x, this._dirVec.y).rotate(sign * sign2 * this._angle * (Math.PI / 180));
          var dirV3 = v3(dirV.x, dirV.y, 0).multiplyScalar(this._owner.bulletVO.move_param[1]);
          //this._ctrlPos=(this._isReturn?this._startPos:this._endPos).clone().add(dirV3);
          Vec3.add(this.tempVec, this._isReturn ? this._startPos : this._endPos, dirV3);
          this._ctrlPos = this.tempVec;
        };
        _proto26.onUpdate = function onUpdate(dt) {
          if (this._isEnd) return;
          this.speed = this.getFrameSpeed() / 8;
          this._t += dt * this.speed;
          if (this._t > 1) {
            if (!this._isReturn) {
              this.turnAround();
            } else {
              this._t = 1;
              this._isEnd = true;
            }
          }
          var point = MathUtils.bessel2eLevel(this._t, this._startPos, this._ctrlPos, this._endPos);
          //console.log(">>>>>>>>>>> start--------------:",this._startPos.x,this._startPos.y,point.x,point.y);
          this._owner.node.setPosition(point.x, point.y);
          var angle = BattleUtil.get2DAngleByPoint(this._owner.node.position, this._endPos);
          this._owner.node.angle = angle;
        };
        _proto26.turnAround = function turnAround() {
          this._isReturn = true;
          this._t = 0;
          var temp = this._startPos;
          this._startPos = this._endPos;
          this._endPos = temp;
          this.getMidPoint();
        };
        return BulletMovement_FeiWuLeiHuan;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 世界boss吐息
       */
      var BulletMovement_WorldBossTuXi = exports('BulletMovement_WorldBossTuXi', /*#__PURE__*/function (_BulletMovement26) {
        _inheritsLoose(BulletMovement_WorldBossTuXi, _BulletMovement26);
        function BulletMovement_WorldBossTuXi() {
          return _BulletMovement26.apply(this, arguments) || this;
        }
        var _proto27 = BulletMovement_WorldBossTuXi.prototype;
        _proto27.reset = function reset() {
          _BulletMovement26.prototype.reset.call(this);
        };
        _proto27.launch = function launch(bulletLauncherData) {
          var target = this._owner.target;
          //相对boss位置做偏移[x1,y1,x2,y2,x3,y3...]
          var paramLength = this._owner.bulletVO.move_param.length / 2;
          var index = BulletMovement_WorldBossTuXi.launchCounter % paramLength;
          var x = this.owner.owner.node.worldPosition.x + this._owner.bulletVO.move_param[index * 2] || 0;
          var y = this.owner.owner.node.worldPosition.y + this._owner.bulletVO.move_param[index * 2 + 1] || 0;
          this.owner.node.setWorldPosition(x, y, target.node.worldPosition.z);
          BulletMovement_WorldBossTuXi.launchCounter++;
        };
        _proto27.onUpdate = function onUpdate(dt) {};
        return BulletMovement_WorldBossTuXi;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 向目标方向差值生成子弹    运动参数填距离差值    最远距离填第一颗子弹的位置
       */
      /** 多次发射索引 */
      BulletMovement_WorldBossTuXi.launchCounter = 0;
      var BulletMovement_DistanceOffset = exports('BulletMovement_DistanceOffset', /*#__PURE__*/function (_BulletMovement27) {
        _inheritsLoose(BulletMovement_DistanceOffset, _BulletMovement27);
        function BulletMovement_DistanceOffset() {
          return _BulletMovement27.apply(this, arguments) || this;
        }
        var _proto28 = BulletMovement_DistanceOffset.prototype;
        _proto28.reset = function reset() {
          _BulletMovement27.prototype.reset.call(this);
        };
        _proto28.launch = function launch(bulletLauncherData) {
          var target = this._owner.target;
          if (this.owner.indexInSkill === 0) {
            Vec3.subtract(BulletMovement_DistanceOffset.targetDir, target.node.worldPosition, this.owner.owner.node.worldPosition);
            BulletMovement_DistanceOffset.targetDir.normalize();
          }
          var len = this._owner.bulletVO.move_param[0] + this._owner.bulletVO.move_param[1] * this.owner.indexInSkill;
          var dis = BulletMovement_DistanceOffset.targetDir.clone().multiplyScalar(len);
          console.log(">>>>>>>>>>>>>>>>>>>>>> BulletMovement_DistanceOffset  bullet data:", this.owner.indexInSkill, len, dis.x, dis.y);
          var x = this.owner.owner.node.worldPosition.x + dis.x;
          var y = this.owner.owner.node.worldPosition.y + dis.y;
          this.owner.node.setWorldPosition(x, y, 0);
        };
        _proto28.onUpdate = function onUpdate(dt) {};
        return BulletMovement_DistanceOffset;
      }(BulletMovement));

      /**
       * 子弹运动器类型 —— 巨大子弹,带特殊角度偏移，太刀居合斩刀光
       */
      BulletMovement_DistanceOffset.targetDir = new Vec3();
      var BulletMovement_HugeBullet = exports('BulletMovement_HugeBullet', /*#__PURE__*/function (_BulletMovement_Line) {
        _inheritsLoose(BulletMovement_HugeBullet, _BulletMovement_Line);
        function BulletMovement_HugeBullet() {
          return _BulletMovement_Line.apply(this, arguments) || this;
        }
        var _proto29 = BulletMovement_HugeBullet.prototype;
        _proto29.launch = function launch(bulletLauncherData) {
          _BulletMovement_Line.prototype.launch.call(this, bulletLauncherData);
          // let bullet = this.owner;
          // let turnAngle = this.owner.bulletVO.move_param[bullet.indexInSkill];
          // bullet.node.angle += turnAngle;
          // let dirOffset = turnAngle > 0 ? -1 : 1;
          // const target = bullet.target;
          // const startPos = bullet.node.worldPosition;
          // const endPos = target.node.worldPosition.clone().add(target.getHitPosition());
          // let dis = Vec3.distance(startPos, endPos);
          // let offset = dis * Math.sin((turnAngle * Math.PI) / 180);
          // Vec3.subtract(bullet.bulletMovement.direction, endPos, startPos);

          // // 计算垂直于角度方向的偏移
          // const angleInRadians = (bullet.node.angle * Math.PI) / 180;
          // // 垂直方向的角度（原角度 + 90度）
          // const perpAngleInRadians = angleInRadians + (Math.PI / 2) * dirOffset;
          // const offsetX = Math.cos(perpAngleInRadians) * offset;
          // const offsetY = Math.sin(perpAngleInRadians) * offset;
          // bullet.node.worldPosition.add3f(offsetX, offsetY, 0);
        };

        return BulletMovement_HugeBullet;
      }(BulletMovement_Line));

      /**
       * 子弹运动器类型 —— 朝向跟随施法者的冲刺方向：太刀回旋斩
       */
      var BulletMovement_FollowMoveDir = exports('BulletMovement_FollowMoveDir', /*#__PURE__*/function (_BulletMovement_Line2) {
        _inheritsLoose(BulletMovement_FollowMoveDir, _BulletMovement_Line2);
        function BulletMovement_FollowMoveDir() {
          return _BulletMovement_Line2.apply(this, arguments) || this;
        }
        var _proto30 = BulletMovement_FollowMoveDir.prototype;
        _proto30.launch = function launch(bulletLauncherData) {
          _BulletMovement_Line2.prototype.launch.call(this, bulletLauncherData);
          this.resetDir();
        };
        _proto30.resetDir = function resetDir() {
          var bulletowner = this.owner.owner;
          //console.log('doMoveAction BulletMovement_FollowMoveDir ------------->>>>   launch', this._owner.node.angle, bulletowner.type, bulletowner.skillMoveDirVec);
          if (bulletowner.skillMoveDirVec) {
            var moveVec = bulletowner.skillMoveDirVec;
            var moveAngleRadians = Math.atan2(moveVec.y, moveVec.x);
            this._owner.node.angle = moveAngleRadians * (180 / Math.PI);
            //console.log('doMoveAction BulletMovement_FollowMoveDir------------->>>>', this._owner.node.angle, moveVec);
          }
        };

        _proto30.onUpdate = function onUpdate(dt) {
          _BulletMovement_Line2.prototype.onUpdate.call(this, dt);
          this.resetDir();
        };
        return BulletMovement_FollowMoveDir;
      }(BulletMovement_Line));

      /**
       * 子弹运动器类型 —— 朝向跟随施法者的移动方向：
       */
      var BulletMovement_FollowMoveDir2 = exports('BulletMovement_FollowMoveDir2', /*#__PURE__*/function (_BulletMovement28) {
        _inheritsLoose(BulletMovement_FollowMoveDir2, _BulletMovement28);
        function BulletMovement_FollowMoveDir2() {
          var _this19;
          for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
            args[_key18] = arguments[_key18];
          }
          _this19 = _BulletMovement28.call.apply(_BulletMovement28, [this].concat(args)) || this;
          _this19._step = 1;
          return _this19;
        }
        var _proto31 = BulletMovement_FollowMoveDir2.prototype;
        // private _offsetAngle = 0;
        _proto31.launch = function launch(bulletLauncherData) {
          // let index = bulletLauncherData.index;
          // let bulletowner = this.owner.owner;
          // let attachment = bulletowner.node.getChildByName('attachment2');
          //let pos = bulletowner.getLocalMountPoint(this._owner.bulletVO.position, v3(0, 0, 0));
          // this._owner.node.setParent(bulletowner.node);
          // this._owner.node.setPosition(v3(0, 0, 0));
          this._step = this._owner.bulletVO.angle_speed;
          if (this._owner.bulletVO.hierarchy === 2) {
            this._owner.node.setSiblingIndex(0);
          }
          this.resetDir();
        };
        _proto31.resetDir = function resetDir() {
          var bulletowner = this.owner.owner;
          //console.log('doMoveAction BulletMovement_FollowMoveDir ------------->>>>   launch', this._owner.node.angle, bulletowner.type, bulletowner.skillMoveDirVec);
          if (bulletowner.type === GameBattle.RoleType.Hero) {
            var moveVec = bulletowner.moveDirection;
            var moveAngleRadians = Math.atan2(moveVec.y, moveVec.x);
            this._owner.node.angle = moveAngleRadians * (180 / Math.PI);
            //console.log('doMoveAction BulletMovement_FollowMoveDir------------->>>>', this._owner.node.angle, moveVec);
          }
        };

        _proto31.onUpdate = function onUpdate(dt) {
          //this.resetDir();
          var bulletowner = this.owner.owner;
          this._owner.node.setPosition(bulletowner.node.position);
          var dirVec = bulletowner.moveDirection.clone();
          if (dirVec.length() === 0) {
            var target = this._owner.skill.getTarget();
            if (!target) return;
            Vec3.subtract(dirVec, target.node.worldPosition, this._owner.node.worldPosition);
          }
          var moveAngleRadians = Math.atan2(dirVec.y, dirVec.x);
          var angle = moveAngleRadians * (180 / Math.PI);
          // 确保目标角度在 0 到 360 度之间
          var targetAngle = (angle + 360) % 360;
          var currentAngle = (this._owner.node.angle + 360) % 360;

          // 如果两者的角度差大于 180 度，说明跨越了 0 度的边界，需要调整
          if (Math.abs(targetAngle - currentAngle) > 180) {
            if (targetAngle > currentAngle) {
              targetAngle -= 360;
            } else {
              currentAngle -= 360;
            }
          }
          var difference = targetAngle - currentAngle;

          // 如果差值大于步长，继续平滑旋转
          if (Math.abs(difference) > this._step) {
            if (difference > 0) {
              this._owner.node.angle += this._step;
            } else {
              this._owner.node.angle -= this._step;
            }
          } else {
            this._owner.node.angle = angle; // 目标角度已足够接近，直接设置
          }
        };

        return BulletMovement_FollowMoveDir2;
      }(BulletMovement));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/BulletVO.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './BulletEffect.ts', './DBRecord.ts'], function (exports) {
  var _createClass, cclegacy, GameBattle, BulletEffect, DBRecord;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      BulletEffect = module.BulletEffect;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "d09a9vJo5RBnodqHZEyk1Ij", "BulletVO", undefined);

      /**
       * 子弹数据类
       */
      var BulletVO = exports('BulletVO', /*#__PURE__*/function () {
        function BulletVO() {
          /** 类型 */
          this._bulletID = 0;
          /** 类型 */
          this._type = 0;
          /** 外观目录 */
          this._viewPath = "";
          /** 初始位置 */
          this._position = "";
          /** 运动方式 */
          this._moveType = GameBattle.BulletMoveType.None;
          /** 初速度 */
          this._initialVelocity = 0;
          /** 加速度 */
          this._acceleration = 0;
          /** 最远距离 */
          this._distance = 0;
          /** 穿透数 */
          this._penetrate_num = 0;
          /** 弹射次数 */
          this._catapults_num = 0;
          /** 弹射半径 */
          this._catapult_srange = 0;
          /** 是否重复弹射 */
          this._repeat = false;
          /** 触发次数上限 */
          this._Trigger_num = 0;
          /** 触发间隔时间 */
          this._Trigger_time = 0;
          /** 延迟作用时间 */
          this._delayTime = 0;
          /** 持续时间(ms) */
          this._holding_time = 0;
          /** 拖尾参数 */
          this._motion_streak = void 0;
          /** 击中特效 */
          this._hit_effect = void 0;
          /** 子弹特效附件 */
          this._attachment = void 0;
          /** 环绕子弹的角速度 */
          this._angle_speed = void 0;
          /** 子弹大小倍率 */
          this._volume = void 0;
          /** 子弹运行中缩放最大倍率 */
          this._volume_max = void 0;
          this._effect_id = [];
          /** 延迟生效时间 */
          this._waiting_time = void 0;
          this._waiting_move_time = 0;
          /** 子弹碰撞盒锚点 */
          this._angle_point = void 0;
          /** 特效层级 */
          this._hierarchy = void 0;
          this._move_param = [];
          this._res = "";
          this._sound = "";
          this._bullet_sound = "";
          this._offset = [];
          this.crash_box = [];
          this.crash_box_type = void 0;
          /** 子弹效果 */
          this.bulletEffect = {};
          /**子弹类型参数 */
          this.type_param = [];
        }
        var _proto = BulletVO.prototype;
        _proto.reset = function reset() {
          for (var _key in this.bulletEffect) {
            delete this.bulletEffect[_key];
          }
          this.bulletEffect = {};
        };
        _proto.load = function load(cfg) {
          var _this$_effect_id, _this$crash_box, _this$_angle_point, _this$_move_param, _this$_offset;
          this._bulletID = cfg.bullet_id;
          this._type = cfg.type;
          this._viewPath = typeof cfg.res === "string" && cfg.res !== "" ? cfg.res : "";
          this._position = cfg.position;
          this._moveType = cfg.move_type;
          this._initialVelocity = Number.isInteger(cfg.initial_speed) ? cfg.initial_speed : 0;
          // @ts-ignore
          this._acceleration = cfg.acceleration ? Number.isInteger(cfg.acceleration) ? cfg.acceleration : 0 : 0;
          this._distance = cfg.distance;
          this._penetrate_num = Number.isInteger(cfg.penetrate_num) ? cfg.penetrate_num : 0;
          this._catapults_num = Number.isInteger(cfg.catapults_num) ? cfg.catapults_num : 0;
          this._catapult_srange = Number.isInteger(cfg.catapult_srange) ? cfg.catapult_srange : 0;
          // @ts-ignore
          this._repeat = cfg.repeat === 1;
          this._holding_time = cfg.holding_time;
          this._Trigger_num = cfg.Trigger_num;
          this._Trigger_time = cfg.Trigger_time;
          this._motion_streak = cfg.motion_streak;
          this._hit_effect = cfg.hit_effect;
          this._attachment = cfg.attachment;
          this._effect_id = [];
          cfg.effect_id && (_this$_effect_id = this._effect_id).push.apply(_this$_effect_id, cfg.effect_id);
          this.crash_box = [];
          cfg.crash_box && (_this$crash_box = this.crash_box).push.apply(_this$crash_box, cfg.crash_box);
          this._angle_speed = cfg.angle_speed;
          this._volume = cfg.volume;
          this._waiting_time = cfg.waiting_time;
          this._waiting_move_time = 0; //cfg.waiting_move_time || 0;
          this._hierarchy = cfg.hierarchy;
          this._angle_point = [];
          cfg.angle_point && (_this$_angle_point = this._angle_point).push.apply(_this$_angle_point, cfg.angle_point);
          this._move_param = [];
          cfg.move_param && (_this$_move_param = this._move_param).push.apply(_this$_move_param, cfg.move_param);
          this._sound = cfg.sound;
          this._bullet_sound = cfg.bullet_sound;
          this._offset = [];
          cfg.offset && (_this$_offset = this._offset).push.apply(_this$_offset, cfg.offset);
          this._volume_max = cfg.volume_max;
          this.crash_box_type = 1; //cfg.crash_box_type;
          this.type_param = [];
          // cfg.type_param && this.type_param.push(...cfg.type_param);
        };

        _proto.set = function set(cfg) {
          var _this$_effect_id2, _this$crash_box2, _this$_angle_point2, _this$_move_param2, _this$_offset2, _this$type_param;
          this._bulletID = cfg._bulletID;
          this._type = cfg.type;
          this._viewPath = cfg._viewPath;
          this._position = cfg._position;
          this._moveType = cfg._moveType;
          this._initialVelocity = cfg._initialVelocity;
          this._acceleration = cfg._acceleration;
          this._distance = cfg._distance;
          this._penetrate_num = cfg._penetrate_num;
          this._catapults_num = cfg._catapults_num;
          this._catapult_srange = cfg._catapult_srange;
          this._repeat = cfg._repeat;
          this._holding_time = cfg._holding_time;
          this._Trigger_num = cfg._Trigger_num;
          this._Trigger_time = cfg._Trigger_time;
          this._motion_streak = cfg._motion_streak;
          this._hit_effect = cfg._hit_effect;
          this._attachment = cfg._attachment;
          this._angle_speed = cfg._angle_speed;
          this._volume = cfg._volume;
          this._volume_max = cfg._volume_max;
          this._waiting_time = cfg._waiting_time;
          this._waiting_move_time = cfg._waiting_move_time || 0;
          this._hierarchy = cfg._hierarchy;
          this._effect_id = [];
          cfg._effect_id && (_this$_effect_id2 = this._effect_id).push.apply(_this$_effect_id2, cfg._effect_id);
          this.crash_box = [];
          cfg.crash_box && (_this$crash_box2 = this.crash_box).push.apply(_this$crash_box2, cfg.crash_box);
          this._angle_point = [];
          cfg.angle_point && (_this$_angle_point2 = this._angle_point).push.apply(_this$_angle_point2, cfg.angle_point);
          this._move_param = [];
          cfg.move_param && (_this$_move_param2 = this._move_param).push.apply(_this$_move_param2, cfg.move_param);
          this._sound = cfg._sound;
          this._offset = [];
          cfg.offset && (_this$_offset2 = this._offset).push.apply(_this$_offset2, cfg.offset);
          this._bullet_sound = cfg.bullet_sound;
          this.crash_box_type = cfg.crash_box_type;
          this.type_param = [];
          cfg.type_param && (_this$type_param = this.type_param).push.apply(_this$type_param, cfg.type_param);
        };
        _createClass(BulletVO, [{
          key: "bulletID",
          get: function get() {
            return this._bulletID;
          },
          set: function set(v) {
            this._bulletID = v;
          }
        }, {
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "viewPath",
          get: function get() {
            return this._viewPath;
          },
          set: function set(v) {
            this._viewPath = v;
          }
        }, {
          key: "position",
          get: function get() {
            return this._position;
          },
          set: function set(v) {
            this._position = v;
          }
        }, {
          key: "moveType",
          get: function get() {
            return this._moveType;
          },
          set: function set(v) {
            this._moveType = v;
          }
        }, {
          key: "initialSpeed",
          get: function get() {
            return this._initialVelocity;
          },
          set: function set(v) {
            this._initialVelocity = v;
          }
        }, {
          key: "acceleration",
          get: function get() {
            return this._acceleration;
          },
          set: function set(v) {
            this._acceleration = v;
          }
        }, {
          key: "distance",
          get: function get() {
            return this._distance;
          },
          set: function set(v) {
            this._distance = v;
          }
        }, {
          key: "penetrate_num",
          get: function get() {
            return this._penetrate_num;
          },
          set: function set(v) {
            this._penetrate_num = v;
          }
        }, {
          key: "catapults_num",
          get: function get() {
            return this._catapults_num;
          },
          set: function set(v) {
            this._catapults_num = v;
          }
        }, {
          key: "catapult_srange",
          get: function get() {
            return this._catapult_srange;
          },
          set: function set(v) {
            this._catapult_srange = v;
          }
        }, {
          key: "repeat",
          get: function get() {
            return this._repeat;
          },
          set: function set(v) {
            this._repeat = v;
          }
        }, {
          key: "Trigger_num",
          get: function get() {
            return this._Trigger_num;
          },
          set: function set(v) {
            this._Trigger_num = v;
          }
        }, {
          key: "Trigger_time",
          get: function get() {
            return this._Trigger_time;
          },
          set: function set(v) {
            this._Trigger_time = v;
          }
        }, {
          key: "delayTime",
          get: function get() {
            return this._delayTime;
          },
          set: function set(v) {
            this._delayTime = v;
          }
        }, {
          key: "holding_time",
          get: function get() {
            return this._holding_time;
          },
          set: function set(v) {
            this._holding_time = v;
          }
        }, {
          key: "motion_streak",
          get: function get() {
            return this._motion_streak;
          },
          set: function set(value) {
            this._motion_streak = value;
          }
        }, {
          key: "hit_effect",
          get: function get() {
            return this._hit_effect;
          },
          set: function set(value) {
            this._hit_effect = value;
          }
        }, {
          key: "attachment",
          get: function get() {
            return this._attachment;
          },
          set: function set(value) {
            this._attachment = value;
          }
        }, {
          key: "angle_speed",
          get: function get() {
            return this._angle_speed;
          },
          set: function set(value) {
            this._angle_speed = value;
          }
        }, {
          key: "volume",
          get: function get() {
            return this._volume;
          },
          set: function set(value) {
            this._volume = value;
          }
        }, {
          key: "volume_max",
          get: function get() {
            return this._volume_max;
          },
          set: function set(value) {
            this._volume_max = value;
          }
        }, {
          key: "effect_id",
          get: function get() {
            return this._effect_id;
          },
          set: function set(value) {
            this._effect_id = value;
            for (var i = 0; i < value.length; i++) {
              var effect_id = value[i];
              if (!this.bulletEffect[effect_id]) {
                this.bulletEffect[effect_id] = new BulletEffect();
                var cfg2 = DBRecord.fetchId("JiNengXiaoGuo", effect_id);
                this.bulletEffect[effect_id].load(cfg2);
              }
            }
          }
        }, {
          key: "waiting_time",
          get: function get() {
            return this._waiting_time;
          },
          set: function set(value) {
            this._waiting_time = value;
          }
        }, {
          key: "waiting_move_time",
          get: /** 延迟移动时间 */
          function get() {
            return this._waiting_move_time;
          },
          set: function set(value) {
            this._waiting_move_time = value;
          }
        }, {
          key: "angle_point",
          get: function get() {
            return this._angle_point;
          },
          set: function set(value) {
            this._angle_point = value;
          }
        }, {
          key: "hierarchy",
          get: function get() {
            return this._hierarchy;
          },
          set: function set(value) {
            this._hierarchy = value;
          }
        }, {
          key: "move_param",
          get: function get() {
            return this._move_param;
          },
          set: function set(value) {
            this._move_param = value;
          }
        }, {
          key: "res",
          get: function get() {
            return this._res;
          },
          set: function set(value) {
            this._res = value;
            this._viewPath = typeof value === "string" && value !== "" ? value : "";
          }
        }, {
          key: "sound",
          get: function get() {
            return this._sound;
          },
          set: function set(value) {
            this._sound = value;
          }
        }, {
          key: "bullet_sound",
          get: function get() {
            return this._bullet_sound;
          },
          set: function set(value) {
            this._bullet_sound = value;
          }
        }, {
          key: "offset",
          get: function get() {
            return this._offset;
          },
          set: function set(value) {
            this._offset = value;
          }
        }]);
        return BulletVO;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/CaiKuangChang.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './PlaceGameMgr.ts', './App.ts', './ResBuildingModel.ts', './MonitorType.ts', './EventType.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, BuildingBase, BuildingStatus, BuildingType, PlaceGameMgr, App, ResBuildingModel, MonitorType, EventType, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      BuildingStatus = module.BuildingStatus;
      BuildingType = module.BuildingType;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ResBuildingModel = module.ResBuildingModel;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "ac8b7lR6EVKH7W2P3hcHpeV", "CaiKuangChang", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 采矿场建筑类
       */
      var CaiKuangChang = exports('CaiKuangChang', (_dec = ccclass("CaiKuangChang"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "存储数量",
        tooltip: "存储数量文本"
      }), _dec6 = property({
        type: ProgressBar,
        displayName: "仓库存储进度",
        tooltip: "仓库存储数量进度条"
      }), _dec7 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(CaiKuangChang, _BuildingBase);
        function CaiKuangChang() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "numLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "numProgress", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor6, _assertThisInitialized(_this));
          /**
           * 数据模型
           */
          _this._dataModel = null;
          /**
           * 建造/升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 生产定时器
           */
          _this._productionTimer = null;
          return _this;
        }
        var _proto = CaiKuangChang.prototype;
        /**
         * 组件激活时调用
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetZiYuan, this.resGetZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSendZiYuan, this.resSendZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopUpgradeTimer();
          this.stopProductionTimer();
        }

        /**
         * 开始生产定时器
         */;
        _proto.startProductionTimer = function startProductionTimer() {
          var _this2 = this;
          this.stopProductionTimer();
          if (this.dataModel.status === BuildingStatus.IDLE || this.dataModel.status === BuildingStatus.WORKING) {
            this._productionTimer = setInterval(function () {
              _this2.produceResource();
            }, this.dataModel.shengChangeTime);
          }
        }

        /**
         * 停止生产定时器
         */;
        _proto.stopProductionTimer = function stopProductionTimer() {
          if (this._productionTimer) {
            clearInterval(this._productionTimer);
            this._productionTimer = null;
          }
        }

        /**
         * 生产资源
         */;
        _proto.produceResource = function produceResource() {
          if (!this.dataModel || this.dataModel.status === BuildingStatus.BUILDING) return;
          if (this.dataModel.curCangku >= this.dataModel.maxCangku) {
            App.log.logBusiness("\u78E8\u574A\u5B58\u50A8\u5DF2\u6EE1: \u5F53\u524D=" + this.dataModel.curCangku + ", \u6700\u5927=" + this.dataModel.maxCangku);
            return;
          }
          this.dataModel.curCangku += this.dataModel.shengChangeNum[0][1];
          this.updateProductionProgress();
        }

        /**
         * 更新生产进度条
         */;
        _proto.updateProductionProgress = function updateProductionProgress() {
          if (this.numLab && this.dataModel) {
            this.numLab.string = this.dataModel.curCangku + "/" + this.dataModel.maxCangku;
          }
          if (this.numProgress && this.dataModel) {
            var progress = this.dataModel.maxCangku > 0 ? this.dataModel.curCangku / this.dataModel.maxCangku : 0;
            this.numProgress.progress = Math.max(0, Math.min(1, progress));
          }
        }

        /**
         * 收集资源
         */;
        _proto.onCollectResClick = function onCollectResClick() {
          if (!this.dataModel) return 0;
          PlaceGameMgr.inst.reqGetZiYuan(this.dataModel.buildingUid, this.dataModel.buildType);
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.startUpgradeTimer();
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
          this.startUpgradeTimer();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }
        /**
         * 启动建造或者升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this3 = this;
          if (!this.dataModel.isUpgrading && this.dataModel.status !== BuildingStatus.BUILDING) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            return;
          }
          this.stopUpgradeTimer();
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.upgradeProgressBar.node.active = true;
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this3.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 建造计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getBuildProgress() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = 1 - this.dataModel.getBuildProgress();
          } else {
            this.stopUpgradeTimer();
            this.updateView();
          }
        };
        _proto.resSendZiYuan = function resSendZiYuan(msg) {
          if (msg.code !== 200) {
            return;
          }
          this.updateView();
        }

        /**
         * 接受资源领取
         * @param msg
         */;
        _proto.resGetZiYuan = function resGetZiYuan(msg) {
          this.dataModel.curCangku = 0;
          this.updateView();
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this.dataModel) return;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateBuildImg();
          this.updateProductionProgress();
          this.updateLevUpImg();
        }

        /**
         * 当建筑数据更新时调用
         * @param data
         * @returns
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, BuildingType.CaiKuangChang, this.dataModel.buildIndex);
          }
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this.dataModel) return;
          var curLevel = this.dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        //======================子类虚函数=====================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.CaiKuangChang;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new ResBuildingModel(buildingIndex, buildingType, buildingUid, buildingLevel, this);
          this.dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
          this.startUpgradeTimer();
          this.startProductionTimer();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            if (this.dataModel.level > 0 && this.dataModel.checkFully()) {
              this.dataModel.status = BuildingStatus.FULLY;
            } else {
              if (this._productionTimer) {
                this.dataModel.status = BuildingStatus.WORKING;
              } else {
                this.dataModel.status = BuildingStatus.IDLE;
              }
            }
          }
          if (data) {
            if (data.ziyuans && data.ziyuans.length > 0) {
              this.dataModel.curCangku = data.ziyuans[0].num;
            } else {
              this.dataModel.curCangku = 0;
            }
            if (data.building_level !== oldLevel) {
              this.dataModel.level = data.building_level;
            }
            if (data.building_level <= 0 && data.upgrade_duration > 0) {
              this.dataModel.status = BuildingStatus.BUILDING;
              this.dataModel.isUpgrading = false;
            } else if (data.building_level > 0 && data.upgrade_duration > 0) {
              this.dataModel.isUpgrading = true;
            } else {
              this.dataModel.isUpgrading = false;
              this.dataModel.completeBuilding();
            }
            if (this.dataModel.level > 0) {
              var cfg = PlaceConfigMgr.inst.getZiyuanQuLevelConfig(this.dataModel.buildType, this.dataModel.level);
              if (cfg) {
                this.dataModel.shengChangeTime = cfg.shengchantime || 0;
              }
            }
          } else {
            this.dataModel.isUpgrading = false;
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        _createClass(CaiKuangChang, [{
          key: "dataModel",
          get: function get() {
            return this._dataModel;
          }
        }]);
        return CaiKuangChang;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "numLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "numProgress", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/CameraShake.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Camera, v3, math, js, log, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Camera = module.Camera;
      v3 = module.v3;
      math = module.math;
      js = module.js;
      log = module.log;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _dec7, _dec8, _class5, _class6, _descriptor7, _descriptor8, _class7;
      cclegacy._RF.push({}, "476a7isMiJAXaNhWdqBPdN0", "CameraShake", undefined);
      var ccclass = _decorator.ccclass,
        inspector = _decorator.inspector,
        executeInEditMode = _decorator.executeInEditMode,
        property = _decorator.property;
      var ShakeParam = exports('ShakeParam', (_dec = ccclass("ShakeParam"), _dec2 = property({
        displayName: "最大震动数"
      }), _dec3 = property({
        displayName: "震动距离"
      }), _dec4 = property({
        displayName: "速度"
      }), _dec5 = property({
        displayName: "衰减幅度",
        range: [0.1, 1],
        slide: true
      }), _dec6 = property({
        displayName: "随机方向"
      }), _dec(_class = (_class2 = /*#__PURE__*/function () {
        function ShakeParam() {
          /** 最大震动数 */
          _initializerDefineProperty(this, "numberOfShakes", _descriptor, this);
          _initializerDefineProperty(this, "shakeAmount", _descriptor2, this);
          /** 震动距离 */
          _initializerDefineProperty(this, "distance", _descriptor3, this);
          /** 速度 */
          _initializerDefineProperty(this, "speed", _descriptor4, this);
          /** 衰减幅度 */
          _initializerDefineProperty(this, "decay", _descriptor5, this);
          /** 随机方向 */
          _initializerDefineProperty(this, "randomSign", _descriptor6, this);
          // 震动开始
          this.onShakeStartEvent = void 0;
          // 当前震动完成的回调事件
          this.onShakeCompleteEvent = void 0;
        }
        var _proto = ShakeParam.prototype;
        _proto.copy = function copy(other) {
          for (var key in other) {
            this[key] = other[key];
          }
          return this;
        };
        return ShakeParam;
      }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "numberOfShakes", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 2;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "shakeAmount", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return v3(1, 1, 1);
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "distance", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 10;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "speed", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 100;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "decay", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0.2;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "randomSign", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      })), _class2)) || _class));
      var ShakeState = function ShakeState(startPosition, shakeParam) {
        // 当前震动计时
        this.timer = 0;
        this.startPosition = v3();
        this.shakePosition = v3();
        // 方向种子
        this.seed = v3(1, 1, 0);
        // 震动参数
        this.shakeParam = null;
        this.startPosition = v3(startPosition);
        this.shakeParam = shakeParam;
        if (shakeParam.randomSign) {
          this.seed.x = Math.random() > 0.5 ? -1 : 1;
          this.seed.y = Math.random() > 0.5 ? -1 : 1;
          // this.seed.z = Math.random() > 0.5 ? -1 : 1;
        }
      };

      var CameraShake = exports('default', (_dec7 = property(Camera), _dec8 = property(ShakeParam), ccclass(_class5 = executeInEditMode(_class5 = (_class6 = (_class7 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(CameraShake, _Component);
        function CameraShake() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "camera", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shakeParam", _descriptor8, _assertThisInitialized(_this));
          // 是否开启震动
          _this._isShaking = false;
          // 正在取消震动
          _this._isCancelling = false;
          _this.stateList = [];
          return _this;
        }
        var _proto2 = CameraShake.prototype;
        _proto2.onLoad = function onLoad() {
          CameraShake.instance = this;
          this.camera = this.node.getComponent(Camera);
        };
        _proto2.start = function start() {
          if (!this.camera) {
            this.camera = this.node.getComponent(Camera);
          }
        };
        _proto2.lateUpdate = function lateUpdate(dt) {
          if (!this._isShaking) {
            return;
          }
          for (var i = this.stateList.length; i--;) {
            var state = this.stateList[i];
            this.updateShake(dt, state);
          }
        };
        _proto2.updateShake = function updateShake(dt, shakeState) {
          var param = shakeState.shakeParam;
          shakeState.timer += dt;
          var timer = shakeState.timer * param.speed;
          shakeState.shakePosition = v3(shakeState.seed.x * Math.sin(timer) * (param.shakeAmount.x * param.distance), shakeState.seed.y * Math.cos(timer) * (param.shakeAmount.y * param.distance), 0
          // shakeState.seed.z * Math.sin(timer) * (param.shakeAmount.z * param.distance)
          );

          // 取消震动
          if (this.isCancelling) {
            param.distance -= param.decay * dt;
            if (param.distance <= 0) {
              this._isCancelling = false;
              param.numberOfShakes = 0;
            }
          } else {
            if (timer > Math.PI * 2) {
              shakeState.timer = 0;
              param.distance *= 1 - math.clamp01(param.decay);
              param.numberOfShakes--;
            }
          }
          this.camera.node.position = this.camera.node.position.add(shakeState.shakePosition);
          if (param.numberOfShakes === 0) {
            param.onShakeCompleteEvent && param.onShakeCompleteEvent();
            js.array.remove(this.stateList, shakeState);
            if (this.stateList.length === 0) {
              this._isShaking = false;
              log("CameraShake-> \u6240\u6709\u9707\u52A8\u7ED3\u675F");
            }
          }
        }

        // 震动
        ;

        _proto2.doShake = function doShake(_param) {
          if (this.isCancelling) {
            return;
          }
          this._isShaking = true;
          var param = new ShakeParam();
          param.copy(_param || this.shakeParam);
          this.stateList.push(new ShakeState(this.camera.node.position, param));
        }

        // 取消震动
        ;

        _proto2.doCancelShake = function doCancelShake(time) {
          if (time) {
            this._doCancelShakeByTime(time);
          } else {
            this._doCancelShakeImm();
          }
        };
        _proto2._doCancelShakeByTime = function _doCancelShakeByTime(time) {
          if (this._isShaking && !this.isCancelling) {
            this._isCancelling = true;
            for (var i = this.stateList.length; i--;) {
              var state = this.stateList[i];
              var param = state.shakeParam;
              param.decay = param.distance / time;
            }
          }
        };
        _proto2._doCancelShakeImm = function _doCancelShakeImm() {
          if (this._isShaking && !this.isCancelling) {
            this._isShaking = false;
            for (var i = this.stateList.length; i--;) {
              var state = this.stateList[i];
              this.camera.node.position = this.camera.node.position.subtract(state.shakePosition);
            }
            this.stateList.length = 0;
          }
        };
        CameraShake.shake = function shake(param) {
          var self = CameraShake.instance;
          if (!self) {
            return;
          }
          self.doShake(param);
        };
        CameraShake.cancelShake = function cancelShake(time) {
          var self = CameraShake.instance;
          if (!self) {
            return;
          }
          self.doCancelShake(time);
        };
        _createClass(CameraShake, [{
          key: "isShaking",
          get: function get() {
            return this._isShaking;
          }
        }, {
          key: "isCancelling",
          get: function get() {
            return this._isCancelling;
          }
        }]);
        return CameraShake;
      }(Component), _class7.instance = null, _class7), (_descriptor7 = _applyDecoratedDescriptor(_class6.prototype, "camera", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class6.prototype, "shakeParam", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return new ShakeParam();
        }
      })), _class6)) || _class5) || _class5));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/cc-button.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      exports('ButtonLock', ButtonLock);
      cclegacy._RF.push({}, "0afe1bdwlJCsawi7fVG6gVW", "cc-button", undefined);
      /**
      按钮点击限制节流
      @param lockTime 阻塞时间
      @param callBackFun 节流回调 多次点击的时候给一个回调函数提示用户不要多次点击
      */
      function ButtonLock(lockTime, callBackFun) {
        if (lockTime === void 0) {
          lockTime = 0.3;
        }
        return function (target, propertyKey, descriptor) {
          var oldFun = descriptor.value;
          var isLock = false;
          descriptor.value = function () {
            if (isLock) {
              callBackFun == null || callBackFun();
              return;
            }
            isLock = true;
            setTimeout(function () {
              isLock = false;
            }, lockTime * 1000);
            for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
              args[_key] = arguments[_key];
            }
            oldFun.apply(this, args);
          };
          return descriptor;
        };
      }
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/cc-extension.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function () {
  var _createForOfIteratorHelperLoose, cclegacy, Node, UITransform, Graphics, Label, RichText, Sprite, Button, Canvas, EditBox, Layout, PageView, ProgressBar, ScrollView, Slider, Toggle, Animation, Skeleton, Widget, UIOpacity, Mask, sp, director, Director, js, Vec2, Vec3, Event, ViewGroup;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Node = module.Node;
      UITransform = module.UITransform;
      Graphics = module.Graphics;
      Label = module.Label;
      RichText = module.RichText;
      Sprite = module.Sprite;
      Button = module.Button;
      Canvas = module.Canvas;
      EditBox = module.EditBox;
      Layout = module.Layout;
      PageView = module.PageView;
      ProgressBar = module.ProgressBar;
      ScrollView = module.ScrollView;
      Slider = module.Slider;
      Toggle = module.Toggle;
      Animation = module.Animation;
      Skeleton = module.Skeleton;
      Widget = module.Widget;
      UIOpacity = module.UIOpacity;
      Mask = module.Mask;
      sp = module.sp;
      director = module.director;
      Director = module.Director;
      js = module.js;
      Vec2 = module.Vec2;
      Vec3 = module.Vec3;
      Event = module.Event;
      ViewGroup = module.ViewGroup;
    }],
    execute: function () {
      cclegacy._RF.push({}, "377235nFyhIi4EyeN6U2FEu", "cc-extension", undefined);
      {
        // if (!EDITOR) {
        if (!Node.prototype["__$cc-extension$__"]) {
          Node.prototype["__$cc-extension$__"] = true;
          Object.defineProperty(Node.prototype, "__nodeCaches__", {
            get: function get() {
              if (!this.__nodeCache) {
                this.__nodeCache = {
                  componentMap: new Map()
                };
              }
              return this.__nodeCache;
            }
          });

          // for (const key in componentMap) {
          //     console.log('defineProperty1111   ', key)
          //     Object.defineProperty(Node.prototype, key, {
          //         get: function () {
          //             let tmp = this.__nodeCaches__.componentMap.get(key);
          //             console.trace('defineProperty 2222   ', key, tmp, this.__nodeCaches__.componentMap)
          //             if (!tmp || !tmp.isValid) {
          //                 tmp = this.getComponent(componentMap[key]);
          //                 this.__nodeCaches__.componentMap.set(key, tmp);
          //             }
          //             return tmp;
          //         },
          //         set: function (value) {
          //             if (value) {
          //                 this.__nodeCaches__.componentMap.set(key, value);
          //             } else {
          //                 this.__nodeCaches__.componentMap.delete(key);
          //             }
          //         },
          //     });
          // }
          var myDefineProperty = function myDefineProperty(name, comp) {
            Object.defineProperty(Node.prototype, name, {
              get: function get() {
                var tmp = this.__nodeCaches__.componentMap.get(name);
                if (!tmp || !tmp.isValid) {
                  tmp = this.getComponent(comp);
                  this.__nodeCaches__.componentMap.set(name, tmp);
                }
                return tmp;
              },
              set: function set(value) {
                if (value) {
                  this.__nodeCaches__.componentMap.set(name, value);
                } else {
                  this.__nodeCaches__.componentMap["delete"](name);
                }
              }
            });
          };
          myDefineProperty("uiTransform", UITransform);
          myDefineProperty("graphics", Graphics);
          myDefineProperty("label", Label);
          myDefineProperty("richText", RichText);
          myDefineProperty("sprite", Sprite);
          myDefineProperty("button", Button);
          myDefineProperty("canvas", Canvas);
          myDefineProperty("editBox", EditBox);
          myDefineProperty("layout", Layout);
          myDefineProperty("pageView", PageView);
          myDefineProperty("progressBar", ProgressBar);
          myDefineProperty("scrollView", ScrollView);
          myDefineProperty("slider", Slider);
          myDefineProperty("toggle", Toggle);
          myDefineProperty("animation", Animation);
          myDefineProperty("skeleton", Skeleton);
          myDefineProperty("widget", Widget);
          myDefineProperty("uiOpacity", UIOpacity);
          myDefineProperty("mask", Mask);
          myDefineProperty("spine", sp.Skeleton);
          Object.defineProperty(UITransform.prototype, 'priority', {
            get: function get() {
              return this.__priority || 0;
            },
            set: function set(value) {
              if (!this.isValid) {
                return;
              }
              this.__priority = value;
              if (!this.node.parent) {
                return;
              }
              this.node.parent._$50priorityDirty = true;
            }
          });
          Object.defineProperty(Node.prototype, '_$50priorityDirty', {
            set: function set(v) {
              var _this = this;
              if (this.__$50priorityDirty) {
                return;
              }
              this.__$50priorityDirty = true;
              this._$50_event_before_commit_priority_callback = function () {
                var priorityAs = [].concat(_this.children).sort(function (a, b) {
                  var uiTransformA = a.uiTransform;
                  var uiTransformB = b.uiTransform;
                  if (!uiTransformA || !uiTransformB) {
                    return 0;
                  }
                  return uiTransformA.priority - (uiTransformB == null ? void 0 : uiTransformB.priority);
                });
                priorityAs.forEach(function (value, index) {
                  value.setSiblingIndex(index);
                });
                _this.__$50priorityDirty = false;
                _this._$50_event_before_commit_priority_callback = null;
              };
              director.once(Director.EVENT_BEFORE_COMMIT, this._$50_event_before_commit_priority_callback, this);
            },
            enumerable: false,
            configurable: true
          });
          js.mixin(Node.prototype, {
            clearNodeCache: function clearNodeCache() {
              this.__nodeCaches__.componentMap.clear();
            }
          });
          js.mixin(Vec2.prototype, {
            copyAsVec3: function copyAsVec3() {
              return new Vec3(this.x, this.y, 0);
            }
          });
          js.mixin(Vec3.prototype, {
            copyAsVec2: function copyAsVec2() {
              return new Vec2(this.x, this.y);
            }
          });
          js.mixin(Button.prototype, {
            setSoundName: function setSoundName(soundName) {
              this.__$soundName = soundName;
            }
          });
        }

        // let _hasNestedViewGroup = ScrollView.prototype["_hasNestedViewGroup"];
        // 滑动面板内有可滑动的节点
        ScrollView.prototype["_hasNestedViewGroup"] = function (event, captureListeners) {
          if (!event || event.eventPhase !== Event.CAPTURING_PHASE) {
            return false;
          }
          if (captureListeners) {
            // captureListeners are arranged from child to parent
            for (var _iterator = _createForOfIteratorHelperLoose(captureListeners), _step; !(_step = _iterator()).done;) {
              var listener = _step.value;
              var item = listener;
              if (this.node === item) {
                var target = event.target;
                if (target && (target.getComponent(ViewGroup) || target.getComponent(Slider))) {
                  return true;
                }
                return false;
              }
              if (item.getComponent(ViewGroup) || item.getComponent(Slider)) {
                return true;
              }
            }
          }
          return false;
        };
      }
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/cc-node.ts", ['cc'], function () {
  var cclegacy, log, Node, UITransform, Size, UIOpacity, UIRenderer, Color, v3;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      log = module.log;
      Node = module.Node;
      UITransform = module.UITransform;
      Size = module.Size;
      UIOpacity = module.UIOpacity;
      UIRenderer = module.UIRenderer;
      Color = module.Color;
      v3 = module.v3;
    }],
    execute: function () {
      cclegacy._RF.push({}, "79495l0RAJMTZcxjbxG0SEo", "cc-node", undefined);

      // ========= 扩展 cc 提示声明 =========

      {
        /**
         * 扩展节点属性
         */
        log('节点扩展');
        if (!Node.prototype["$__definedProperties__"]) {
          Node.prototype["$__definedProperties__"] = true;

          /** 获取、设置节点的 X 坐标 */
          Object.defineProperty(Node.prototype, "x", {
            get: function get() {
              var self = this;
              return self.position.x;
            },
            set: function set(value) {
              var self = this;
              self.setPosition(value, self.position.y);
            }
          });

          /** 获取、设置节点的 Y 坐标 */
          Object.defineProperty(Node.prototype, "y", {
            get: function get() {
              var self = this;
              return self.position.y;
            },
            set: function set(value) {
              var self = this;
              self.setPosition(self.position.x, value);
            }
          });

          /** 获取、设置节点的 Z 坐标 */
          Object.defineProperty(Node.prototype, "z", {
            get: function get() {
              var self = this;
              return self.position.z;
            },
            set: function set(value) {
              var self = this;
              self.setPosition(self.position.x, self.position.y, value);
            }
          });

          /** 获取、设置节点的宽度 */
          Object.defineProperty(Node.prototype, "w", {
            configurable: true,
            get: function get() {
              var _self$getComponent$wi, _self$getComponent;
              var self = this;
              return (_self$getComponent$wi = (_self$getComponent = self.getComponent(UITransform)) == null ? void 0 : _self$getComponent.width) != null ? _self$getComponent$wi : 0;
            },
            set: function set(value) {
              var self = this;
              (self.getComponent(UITransform) || self.addComponent(UITransform)).width = value;
            }
          });

          /** 获取、设置节点的高度 */
          Object.defineProperty(Node.prototype, "h", {
            configurable: true,
            get: function get() {
              var _self$getComponent$he, _self$getComponent2;
              var self = this;
              return (_self$getComponent$he = (_self$getComponent2 = self.getComponent(UITransform)) == null ? void 0 : _self$getComponent2.height) != null ? _self$getComponent$he : 0;
            },
            set: function set(value) {
              var self = this;
              (self.getComponent(UITransform) || self.addComponent(UITransform)).height = value;
            }
          });

          /** 获取、设置节点的尺寸 */
          Object.defineProperty(Node.prototype, "size", {
            get: function get() {
              var self = this;
              var uiTransform = self.getComponent(UITransform);
              return new Size(uiTransform.width, uiTransform.height);
            },
            set: function set(value) {
              var self = this;
              var uiTransform = self.getComponent(UITransform) || self.addComponent(UITransform);
              uiTransform.width = value.width;
              uiTransform.height = value.height;
            }
          });

          /** 获取、设置节点的水平锚点 */
          Object.defineProperty(Node.prototype, "anchor_x", {
            get: function get() {
              var _self$getComponent$an, _self$getComponent3;
              var self = this;
              return (_self$getComponent$an = (_self$getComponent3 = self.getComponent(UITransform)) == null ? void 0 : _self$getComponent3.anchorX) != null ? _self$getComponent$an : 0.5;
            },
            set: function set(value) {
              var self = this;
              (self.getComponent(UITransform) || self.addComponent(UITransform)).anchorX = value;
            }
          });

          /** 获取、设置节点的垂直锚点 */
          Object.defineProperty(Node.prototype, "anchor_y", {
            get: function get() {
              var _self$getComponent$an2;
              var self = this;
              return (_self$getComponent$an2 = self.getComponent(UITransform).anchorY) != null ? _self$getComponent$an2 : 0.5;
            },
            set: function set(value) {
              var self = this;
              (self.getComponent(UITransform) || self.addComponent(UITransform)).anchorY = value;
            }
          });

          /** 获取、设置节点的透明度 */
          Object.defineProperty(Node.prototype, "opacity", {
            get: function get() {
              var self = this;
              var op = self.getComponent(UIOpacity);
              if (op !== null) {
                return op.opacity;
              }
              var render = self.getComponent(UIRenderer);
              if (render) {
                return render.color.a;
              }
              return 255;
            },
            set: function set(value) {
              var self = this;
              var op = self.getComponent(UIOpacity);
              if (op !== null) {
                op.opacity = value;
                return;
              }
              var render = self.getComponent(UIRenderer);
              if (render) {
                // 直接通过 color.a 设置透明度会有bug，没能直接生效，需要激活节点才生效
                // (render.color.a as any) = value;

                // 创建一个颜色缓存对象，避免每次都创建新对象
                if (!this.$__color__) {
                  this.$__color__ = new Color(render.color.r, render.color.g, render.color.b, value);
                } else {
                  this.$__color__.a = value;
                }
                render.color = this.$__color__; // 设置 color 对象则可以立刻生效
              } else {
                self.addComponent(UIOpacity).opacity = value;
              }
            }
          });

          /** 获取、设置节点的颜色 */
          Object.defineProperty(Node.prototype, "color", {
            get: function get() {
              var _self$getComponent4;
              var self = this;
              return (_self$getComponent4 = self.getComponent(UIRenderer)) == null ? void 0 : _self$getComponent4.color;
            },
            set: function set(value) {
              var self = this;
              var render = self.getComponent(UIRenderer);
              render && (render.color = value);
            }
          });

          /** 获取、设置节点的 X 缩放系数 */
          Object.defineProperty(Node.prototype, "scale_x", {
            get: function get() {
              var self = this;
              return self.scale.x;
            },
            set: function set(value) {
              var self = this;
              self.scale = v3(value, self.scale.y, self.scale.z);
            }
          });

          /** 获取、设置节点的 Y 缩放系数 */
          Object.defineProperty(Node.prototype, "scale_y", {
            get: function get() {
              var self = this;
              return self.scale.y;
            },
            set: function set(value) {
              var self = this;
              self.scale = v3(self.scale.x, value, self.scale.z);
            }
          });

          /** 获取、设置节点的 Z 缩放系数 */
          Object.defineProperty(Node.prototype, "scale_z", {
            get: function get() {
              var self = this;
              return self.scale.z;
            },
            set: function set(value) {
              var self = this;
              self.scale = v3(self.scale.x, self.scale.y, value);
            }
          });

          // log(Object.getOwnPropertyNames(Node.prototype));
        }
      }

      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ChatMgr.ts", ['cc', './App.ts', './MonitorType.ts', './NetChannelMgr.ts'], function (exports) {
  var cclegacy, App, MonitorType, netChannel;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      netChannel = module.netChannel;
    }],
    execute: function () {
      cclegacy._RF.push({}, "67ad3AaMeVGrpwT6pjxBiPx", "ChatMgr", undefined);
      var ChatMgr = exports('ChatMgr', /*#__PURE__*/function () {
        function ChatMgr() {}
        var _proto = ChatMgr.prototype;
        _proto.init = function init() {
          App.monitorMgr.addEventListener(MonitorType.web_chat_gm, this.sc_chat_gm_2001, this);
        }

        //------------------- 华丽分割线 ------------------- 协议部分
        /**
         * GM指令
         */;
        _proto.cs_chat_gm_2001 = function cs_chat_gm_2001(str) {
          var obj = {
            cmdtext: str
          };
          netChannel.game.send(MonitorType.web_chat_gm, obj);
        };
        _proto.sc_chat_gm_2001 = function sc_chat_gm_2001(obj) {
          console.log('GM命令==', obj.cmdtext);
          console.log('执行成功');
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.removeEventListener(MonitorType.web_chat_gm, this.sc_chat_gm_2001, this);
        };
        return ChatMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/CircularBullet.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletBase.ts', './BattleDefine.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, v2, BulletBase, GameBattle;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      v2 = module.v2;
    }, function (module) {
      BulletBase = module.BulletBase;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "ce7feyoz1dE85UPuENVW2Yr", "CircularBullet", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var CircularBullet = exports('CircularBullet', (_dec = ccclass("CircularBullet"), _dec(_class = /*#__PURE__*/function (_BulletBase) {
        _inheritsLoose(CircularBullet, _BulletBase);
        function CircularBullet() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BulletBase.call.apply(_BulletBase, [this].concat(args)) || this;
          /** 内圈半径 */
          _this._rInner = 0;
          /** 外圈半径 */
          _this._rOuter = 0;
          return _this;
        }
        var _proto = CircularBullet.prototype;
        _proto.init = function init() {
          _BulletBase.prototype.init.call(this);
          this._type = GameBattle.BulletType.Circular;
        };
        _proto.reuse = function reuse() {
          _BulletBase.prototype.reuse.call(this);
        };
        _proto.recovery = function recovery() {
          _BulletBase.prototype.recovery.call(this);
        };
        _proto.launch = function launch(bulletLauncherData) {
          this._rInner = this.bulletVO.crash_box[0];
          this._rOuter = this.bulletVO.crash_box[1];
          //DOTO 子弹居中到场景中
          if (this.bulletVO.bulletID === 40010) {
            this.node.setPosition(1500, 1500);
          }
          _BulletBase.prototype.launch.call(this, bulletLauncherData);
        }

        // 假设我们有一个圆心坐标 circleCenter，内外半径 rInner 和 rOuter，矩形 rect
        ;

        _proto.isRectIntersectingRing = function isRectIntersectingRing(circleCenter, rInner, rOuter, rect) {
          // 获取矩形的四个角点
          var rectCorners = [v2(rect.xMin, rect.yMin), v2(rect.xMax, rect.yMin), v2(rect.xMin, rect.yMax), v2(rect.xMax, rect.yMax)];

          // 标志变量，用于判断相交状态
          var isIntersectingOuterCircle = false;
          var isOutsideInnerCircle = false;

          // 遍历矩形的四个角点，判断相交条件
          for (var i = 0; i < rectCorners.length; i++) {
            var corner = rectCorners[i];
            var dx = corner.x - circleCenter.x;
            var dy = corner.y - circleCenter.y;
            var distance = Math.sqrt(dx * dx + dy * dy);

            // 判断是否与外圆相交
            if (distance <= rOuter) {
              isIntersectingOuterCircle = true;
            }

            // 判断是否完全在内圆之外
            if (distance >= rInner) {
              isOutsideInnerCircle = true;
            }
          }

          // 如果与外圆相交且不完全在内圆内，则与圆环相交
          return isIntersectingOuterCircle && isOutsideInnerCircle;
        };
        _proto.checkHit = function checkHit(target) {
          var targetBox = target.getBoundingBoxToWorld();
          // return targetBox.contains(this.view.node.worldPosition.copyAsVec2())
          var ret = this.isRectIntersectingRing(this.node.worldPosition, this._rInner, this._rOuter, targetBox);
          // console.log('圆环子弹', ret)
          return ret;
        };
        _proto.onUpdate = function onUpdate(dt) {
          _BulletBase.prototype.onUpdate.call(this, dt);
        };
        _createClass(CircularBullet, [{
          key: "rInner",
          get: function get() {
            return this._rInner;
          },
          set: function set(value) {
            this._rInner = value;
          }
        }, {
          key: "rOuter",
          get: function get() {
            return this._rOuter;
          },
          set: function set(value) {
            this._rOuter = value;
          }
        }]);
        return CircularBullet;
      }(BulletBase)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/City.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './Hero.ts', './App.ts', './CityLane.ts', './BattleHeroStancesItem.ts', './BattleHeroHeadsItem.ts', './MonitorType.ts', './TeamMgr.ts', './Utils.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Sprite, Node, Label, ProgressBar, v3, UITransform, Widget, Vec3, director, Canvas, v2, Component, GameBattle, Hero, App, CityLane, BattleHeroStancesItem, BattleHeroHeadsItem, MonitorType, TeamMgr, Utils;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      ProgressBar = module.ProgressBar;
      v3 = module.v3;
      UITransform = module.UITransform;
      Widget = module.Widget;
      Vec3 = module.Vec3;
      director = module.director;
      Canvas = module.Canvas;
      v2 = module.v2;
      Component = module.Component;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Hero = module.Hero;
    }, function (module) {
      App = module.App;
    }, function (module) {
      CityLane = module.CityLane;
    }, function (module) {
      BattleHeroStancesItem = module.BattleHeroStancesItem;
    }, function (module) {
      BattleHeroHeadsItem = module.BattleHeroHeadsItem;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
      cclegacy._RF.push({}, "b0101HmpUFGt4s14aMHqo0b", "City", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 城池类
       * 负责处理城池的耐久度、敌方攻击检测等功能
       */
      var City = exports('City', (_dec = ccclass("City"), _dec2 = property(Sprite), _dec3 = property(Node), _dec4 = property(Label), _dec5 = property(Sprite), _dec6 = property(Node), _dec7 = property([BattleHeroStancesItem]), _dec8 = property({
        type: ProgressBar
      }), _dec9 = property(Node), _dec10 = property([CityLane]), _dec11 = property(Node), _dec12 = property([BattleHeroHeadsItem]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(City, _Component);
        function City() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "citySp", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hpBarNode", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hpLabel", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hpBarFill", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cityGateNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heros", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cityHPBar", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "laneNode", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lanes", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "headNode", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroHeads", _descriptor11, _assertThisInitialized(_this));
          // 英雄头像与英雄实体的映射
          _this._heroEntityToHeadIndex = new Map();
          // 拖拽相关变量
          _this._isDragging = false;
          _this._dragStartTime = 0;
          _this._dragThreshold = 10;
          // 0.5秒
          _this._currentDragHero = null;
          _this._currentDragHeroIndex = 0;
          _this._originalHeroPos = v3(0, 0, 0);
          _this._originalHeroWorldPos = v3(0, 0, 0);
          _this._dragOriginalParent = null;
          _this._dragOriginalSiblingIndex = 0;
          _this._currentLane = null;
          _this._dragTimer = null;
          // 用于检测拖拽时间的定时器
          _this._heroInitialWorldPos = new Map();
          // 存储每个英雄的初始世界位置
          // 城池最大耐久度
          _this._maxHp = 1000;
          // 当前耐久度
          _this._currentHp = 1000;
          // 城池防线Y坐标
          _this._defenseLineY = 315;
          // 攻击检测范围
          _this._attackDetectionRadius = 100;
          // 正在攻击城池的敌方单位列表
          _this._attackingEnemies = new Map();
          _this._isDead = false;
          // 战斗结束回调
          _this._onBattleEndCallback = null;
          /** 当前选中的战场英雄 */
          _this._selectedHero = null;
          /** 战场点击监听节点 */
          _this._battlefieldTouchNode = null;
          return _this;
        }
        var _proto = City.prototype;
        /**
         * 初始化城池
         */
        _proto.init = function init(params) {
          this._maxHp = params.maxHp || 1000;
          this._currentHp = this._maxHp;
          this._defenseLineY = params.defenseLineY || this.node.getComponent(UITransform).height + 115;
          this._onBattleEndCallback = params.onBattleEnd;
          this.cityHPBar.progress = 1;
          this.headNode.getComponent(Widget).updateAlignment();

          // 隐藏所有线路高亮
          this.isHideLane(false);

          // 更新UI显示
          this.updateHpDisplay();

          // 初始化Hero模型的触摸事件
          this.initHeroTouchEvents();
          this._registerEvent();
        };
        _proto._registerEvent = function _registerEvent() {
          // 注册战场点击事件（用于英雄选中与移动指令）
          this.registerBattlefieldTouchEvents();
          App.monitorMgr.addEventListener(MonitorType.battle_hero_dead, this._onEventBattleHeroDead, this);
        };
        _proto._removeEvent = function _removeEvent() {
          App.monitorMgr.removeEventListener(MonitorType.battle_hero_dead, this._onEventBattleHeroDead, this);
          this.unregisterBattlefieldTouchEvents();
        };
        _proto._onEventBattleHeroDead = function _onEventBattleHeroDead(heroId) {
          var _App$dungeonBattleMgr,
            _this2 = this,
            _App$dungeonBattleMgr2,
            _App$dungeonBattleMgr3;
          var hero = (_App$dungeonBattleMgr = App.dungeonBattleMgr) == null ? void 0 : _App$dungeonBattleMgr.deployedHeroes.get(heroId);
          if (!hero) return;

          // 标记死亡状态
          hero.isDead = true;
          hero.isUsable = false;
          this.parkHeroAtCity(hero);

          // 更新英雄头像为死亡状态
          this.updateHeroHeadOnDead(heroId);

          // 设置复活时间

          var reviveTime = hero.reviveCD || 10;
          setTimeout(function () {
            _this2.onHeroReviveReady(hero);
          }, reviveTime * 1000);
          (_App$dungeonBattleMgr2 = App.dungeonBattleMgr) == null || _App$dungeonBattleMgr2.deployedHeroes["delete"](heroId);
          (_App$dungeonBattleMgr3 = App.dungeonBattleMgr) == null || _App$dungeonBattleMgr3.standbyHeros.set(heroId, hero);
        }
        /**
         * 英雄复活准备就绪
         */;
        _proto.onHeroReviveReady = function onHeroReviveReady(hero) {
          var _App$dungeonBattleMgr4;
          if (!hero || !hero.isDead) return;
          hero.revive(new Vec3(0, 0, 0));

          // 更新英雄头像为复活状态
          this.updateHeroHeadOnRevive(hero.uid);

          // 如果开启自动战斗，自动复活英雄到敌军最多的兵线
          if ((_App$dungeonBattleMgr4 = App.dungeonBattleMgr) != null && _App$dungeonBattleMgr4.autoBattleEnabled) {
            setTimeout(function () {
              var _App$dungeonBattleMgr5;
              (_App$dungeonBattleMgr5 = App.dungeonBattleMgr) == null || _App$dungeonBattleMgr5.autoBattleMgr.onHeroEnterBattle(hero);
            }, 1000);
          }
        };
        _proto.parkHeroAtCity = function parkHeroAtCity(hero) {
          if (!hero) return;
          var slotIndex = hero.citySlotIndex || 1;
          var slotNode = this.positionHeroNode(slotIndex);
          if (slotNode) {
            var heroNode = slotNode.getChildByName("hero");
            if (!heroNode) return;
            // 使用保存的初始世界位置，如果没有则使用当前位置
            var initialWorldPos = this._heroInitialWorldPos.get(slotIndex) || heroNode.worldPosition.clone();
            hero.node.setParent(heroNode);
            hero.node.setWorldPosition(initialWorldPos);
            // 始终设置在父节点最上层（最后渲染）
            heroNode.setSiblingIndex(1);
            heroNode.setWorldPosition(initialWorldPos);
          }
          hero.recallToCity(new Vec3(0, 0, 0));
          hero.state.clearType();
          hero.isUsable = false;

          // 更新英雄头像为返回城墙状态
          this.updateHeroHeadOnReturnToWall(hero.uid);
        }

        /**
         * 初始化英雄头像
         */;
        _proto.initHeroHeads = function initHeroHeads() {
          var _this3 = this;
          if (!App.dungeonBattleMgr) return;

          // 获取当前编队信息
          var currFormation = TeamMgr.inst.currFormation;
          if (!currFormation || !currFormation.heros) {
            // 没有编队信息，清空所有头像
            for (var i = 0; i < this.heroHeads.length; i++) {
              if (this.heroHeads[i]) {
                this.heroHeads[i].show(null);
              }
            }
            return;
          }
          var standbyHeroes = App.dungeonBattleMgr.standbyHeros;

          // 遍历所有头像位置
          var _loop = function _loop() {
            var headItem = _this3.heroHeads[_i];
            if (!headItem) return 1; // continue

            // 根据位置索引查找编队中的英雄 (pos从1开始，i从0开始)
            var formationPos = _i + 1;
            var heroUnit = currFormation.heros.find(function (unit) {
              return unit.pos === formationPos;
            });
            if (heroUnit && heroUnit.id) {
              // 从待命英雄中查找对应的英雄实体
              var heroEntity = null;
              standbyHeroes.forEach(function (hero) {
                if (hero.roleVO.heroId === heroUnit.id) {
                  heroEntity = hero;
                }
              });
              if (heroEntity) {
                // 构造英雄数据
                var heroData = {
                  hero_id: heroEntity.roleVO.heroId,
                  level: heroEntity.roleVO.level,
                  stage: heroEntity.roleVO._stage,
                  star: heroEntity.roleVO.star
                };

                // 显示英雄头像
                headItem.show(heroData, heroEntity);

                // 绑定英雄实体
                headItem.bindHeroEntity(heroEntity);

                // 建立映射关系（使用UID）
                _this3._heroEntityToHeadIndex.set(heroEntity.uid, _i);
              } else {
                // 编队中有配置但找不到英雄实体，显示空位置
                headItem.show(null);
              }
            } else {
              // 该位置没有英雄，显示空位置
              headItem.show(null);
            }
          };
          for (var _i = 0; _i < this.heroHeads.length; _i++) {
            if (_loop()) continue;
          }
        }

        /**
         * 初始化Hero模型的触摸事件
         */;
        _proto.initHeroTouchEvents = function initHeroTouchEvents() {
          var _this4 = this;
          this.heros.forEach(function (hero, index) {
            if (!hero) return;
            var heroNode = hero.heroNode;
            if (!heroNode) return;
            hero.node.setSiblingIndex(hero.node.parent.children.length - 1);
            // 保存每个英雄的初始世界位置
            _this4._heroInitialWorldPos.set(index + 1, heroNode.worldPosition.clone());
            heroNode.on(Node.EventType.TOUCH_START, function (event) {
              return _this4.onHeroTouchStart(heroNode, index + 1, event);
            });
            heroNode.on(Node.EventType.TOUCH_MOVE, function (event) {
              return _this4.onHeroTouchMove(heroNode, event);
            });
            heroNode.on(Node.EventType.TOUCH_END, function (event) {
              return _this4.onHeroTouchEnd(heroNode, index + 1, event);
            });
            heroNode.on(Node.EventType.TOUCH_CANCEL, function (event) {
              return _this4.onHeroTouchCancel(heroNode, event);
            });
          });
        }

        /**
         * 注册战场点击事件（roleLayer）
         */;
        _proto.registerBattlefieldTouchEvents = function registerBattlefieldTouchEvents() {
          var _App$dungeonBattleMgr6;
          var battleCtrl = (_App$dungeonBattleMgr6 = App.dungeonBattleMgr) == null ? void 0 : _App$dungeonBattleMgr6.battleMainViewCtrl;
          if (!battleCtrl) {
            console.warn("City.registerBattlefieldTouchEvents: battleMainViewCtrl not ready");
            return;
          }
          var touchNode = battleCtrl.battleBg || battleCtrl.node || battleCtrl.roleLayer;
          if (!touchNode) {
            console.warn("City.registerBattlefieldTouchEvents: touch node not found");
            return;
          }
          this._battlefieldTouchNode = touchNode;
          touchNode.on(Node.EventType.TOUCH_END, this.onBattlefieldTouch, this);
        };
        _proto.unregisterBattlefieldTouchEvents = function unregisterBattlefieldTouchEvents() {
          if (this._battlefieldTouchNode && this._battlefieldTouchNode.isValid) {
            this._battlefieldTouchNode.off(Node.EventType.TOUCH_END, this.onBattlefieldTouch, this);
            this._battlefieldTouchNode = null;
          }
        };
        _proto.isHideLane = function isHideLane(flag) {
          var index = 0;
          this.lanes.forEach(function (lane) {
            if (lane.laneImg && lane.node) {
              index++;
              lane.init(index);
              lane.node.active = flag;
              // 如果需要隐藏/显示线路图片，直接用 Sprite 的 enabled 属性控制
              lane.laneImg.enabled = false;
            }
          });
        }

        /**
         * 战场点击回调（用于英雄选中与移动）
         */;
        _proto.onBattlefieldTouch = function onBattlefieldTouch(event) {
          var _director$getScene;
          if (!App.dungeonBattleMgr) return;

          // 将触摸位置转换为世界坐标
          var touchPos = event.getUILocation();
          var sceneCanvas = (_director$getScene = director.getScene()) == null ? void 0 : _director$getScene.getComponentInChildren(Canvas);
          var canvasUI = sceneCanvas == null ? void 0 : sceneCanvas.getComponent(UITransform);
          var worldPos;
          if (canvasUI) {
            var canvasLocal = v3(touchPos.x - canvasUI.width / 2, touchPos.y - canvasUI.height / 2, 0);
            worldPos = canvasUI.convertToWorldSpaceAR(canvasLocal);
          } else {
            worldPos = v3(touchPos.x, touchPos.y, 0);
          }
          var clickPoint = worldPos;

          // 优先尝试选中英雄
          var deployedHeroes = App.dungeonBattleMgr.deployedHeroes;
          var clickedHero = null;
          if (deployedHeroes && deployedHeroes.size > 0) {
            for (var _iterator = _createForOfIteratorHelperLoose(deployedHeroes.values()), _step; !(_step = _iterator()).done;) {
              var hero = _step.value;
              if (!hero || hero.isDead) continue;
              var rect = hero.getBoundingBoxToWorld();
              if (rect && rect.contains(v2(clickPoint.x, clickPoint.y))) {
                clickedHero = hero;
                break;
              }
            }
          }

          // 点击到英雄：选中该英雄
          if (clickedHero) {
            // 如果之前有选中的英雄，先取消其选中状态
            if (this._selectedHero && this._selectedHero !== clickedHero) {
              this._selectedHero.setSelectedHero(false);
              this._selectedHero.hideAttackRange();
            }

            // 选中新英雄并显示选中效果
            this._selectedHero = clickedHero;
            this._selectedHero.setSelectedHero(true);
            return;
          }

          // 未点到英雄但有已选中英雄：发送移动命令并取消选中
          if (this._selectedHero && !this._selectedHero.isDead) {
            this._selectedHero.commandMoveTo(clickPoint);
            // this._selectedHero.setSelectedHero(false);
            // this._selectedHero.hideAttackRange();
          }

          this._selectedHero = null;
        }
        /**
         * Hero触摸开始
         */;
        _proto.onHeroTouchStart = function onHeroTouchStart(heroNode, heroIndex, event) {
          var _heroNode$getChildByN;
          this._dragStartTime = Date.now();
          this._currentDragHero = heroNode;
          this._currentDragHeroIndex = heroIndex;
          this._originalHeroPos.set(heroNode.position);
          this._originalHeroWorldPos.set(heroNode.worldPosition.clone());
          this._dragOriginalParent = heroNode.parent;
          this._dragOriginalSiblingIndex = heroNode.getSiblingIndex();
          this._isDragging = false;
          var hero = ((_heroNode$getChildByN = heroNode.getChildByName("Hero")) == null ? void 0 : _heroNode$getChildByN.getComponent(Hero)) || null;
          if (!hero || hero.isDead && hero.reviveCD > 0) {
            this._isDragging = false;
          } else {
            this._isDragging = true;
          }

          // 不改变父节点，只调整渲染顺序，确保hero显示在最上层
          if (heroNode.parent) {
            heroNode.setSiblingIndex(heroNode.parent.children.length - 1);
          }

          // 清除之前的定时器
          if (this._dragTimer) {
            clearTimeout(this._dragTimer);
            this._dragTimer = null;
          }
          event.propagationStopped = true;
        }

        /**
         * Hero触摸移动
         */;
        _proto.onHeroTouchMove = function onHeroTouchMove(heroNode, event) {
          var _director$getScene2;
          // 检查是否达到拖拽时间阈值
          if (!this._isDragging) {
            // const dragDuration = Date.now() - this._dragStartTime;
            // if (dragDuration >= this._dragThreshold) {
            //     this._isDragging = true;
            //     this.isHideLane(true);
            // } else {
            // 未达到拖拽时间，不处理移动
            return;
            // }
          }
          // 获取触摸位置的UI坐标（相对于Canvas的坐标）
          var touchPos = event.getUILocation();
          this.isHideLane(true);
          // 推荐：通过 Canvas 的 UITransform 将 UI 坐标转换为世界坐标，避免相机深度/缩放误差
          var sceneCanvas = (_director$getScene2 = director.getScene()) == null ? void 0 : _director$getScene2.getComponentInChildren(Canvas);
          var screenPos = v3(touchPos.x, touchPos.y, 0);
          var canvasUI = sceneCanvas == null ? void 0 : sceneCanvas.getComponent(UITransform);
          if (canvasUI) {
            var canvasLocal = v3(screenPos.x - canvasUI.width / 2, screenPos.y - canvasUI.height / 2, 0);
            var worldPos = canvasUI.convertToWorldSpaceAR(canvasLocal);
            heroNode.setWorldPosition(worldPos);
          }

          // 检测当前拖拽位置是否在某个线路上
          this.checkDragPositionOnLane(heroNode.worldPosition);
          event.propagationStopped = true;
        }

        /**
         * Hero触摸结束
         */;
        _proto.onHeroTouchEnd = function onHeroTouchEnd(heroNode, heroIndex, event) {
          // 清除定时器
          if (this._dragTimer) {
            clearTimeout(this._dragTimer);
            this._dragTimer = null;
          }

          // 重置拖拽状态
          var dragDuration = Date.now() - this._dragStartTime;
          this.isHideLane(false);
          if (this._isDragging) {
            // 拖拽结束，检查是否在有效线路上并且与lane节点相交
            if (this._currentLane && this.isHeroIntersectingLane(heroNode, this._currentLane)) {
              var _App$dungeonBattleMgr7;
              // 在有效线路上且相交，部署Hero到线路
              // 直接从拖拽的节点获取Hero组件（而不是通过索引查找）
              var heroComponent = heroNode.getComponent(Hero);
              if (!heroComponent) {
                // 如果当前节点没有Hero组件，尝试从子节点获取
                heroComponent = heroNode.getComponentInChildren(Hero);
              }
              if (!heroComponent) {
                // 如果还是找不到，尝试通过索引查找（备用方案）
                heroComponent = this.getHeroByIndex(heroIndex);
              }
              if (!heroComponent) {
                console.warn("\u672A\u627E\u5230Hero" + heroIndex + "\u7EC4\u4EF6\u5B9E\u4F8B");
                this.restoreHeroPosition(heroNode);
                return;
              }

              // 获取roleLayer
              var roleLayer = (_App$dungeonBattleMgr7 = App.dungeonBattleMgr) == null || (_App$dungeonBattleMgr7 = _App$dungeonBattleMgr7.battleMainViewCtrl) == null ? void 0 : _App$dungeonBattleMgr7.roleLayer;
              if (!roleLayer) {
                console.warn("roleLayer未找到，无法部署Hero");
                this.restoreHeroPosition(heroNode);
                return;
              }

              // 根据线路索引获取LanePosition
              var lanePosition = this.getLanePositionByIndex(this._currentLane.laneIndex);
              if (lanePosition === GameBattle.LanePosition.None) {
                console.warn("\u65E0\u6548\u7684\u7EBF\u8DEF\u7D22\u5F15: " + this._currentLane.laneIndex);
                this.restoreHeroPosition(heroNode);
                return;
              }

              // 获取线路的Hero部署位置（使用GameBattle.HeroPoints定义的位置）
              var heroSpawnPos = GameBattle.HeroPoints.get(lanePosition);
              if (!heroSpawnPos) {
                console.warn("\u7EBF\u8DEF" + this._currentLane.laneIndex + "\u7684Hero\u90E8\u7F72\u4F4D\u7F6E\u672A\u5B9A\u4E49");
                this.restoreHeroPosition(heroNode);
                return;
              }

              // 获取Hero节点（Hero组件所在的节点）
              var heroNd = heroComponent.node;
              if (!heroNd) {
                console.warn("Hero" + heroIndex + "\u8282\u70B9\u672A\u627E\u5230");
                this.restoreHeroPosition(heroNode);
                return;
              }

              // 保存当前的世界坐标（因为要切换父节点）
              var currentWorldPos = heroNd.worldPosition.clone();

              // 设置Hero的父节点为roleLayer（必须在部署前设置，因为deployToLane会使用node.position）
              heroNd.setParent(roleLayer);

              // 恢复世界坐标（切换父节点后，本地坐标会变化，需要重新设置世界坐标）
              heroNd.setWorldPosition(currentWorldPos);

              // 部署Hero到线路（调用部署逻辑，deployHero会通过deployToLane设置正确的位置和父节点）
              // 注意：deployHero会调用hero.deployToLane，而deployToLane会设置node.position = position
              // 所以父节点已经设置好了，deployToLane只需要设置位置即可
              // 使用heroComponent.uid来部署，而不是heroIndex
              var deploySuccess = this.deployHeroToLaneByUid(heroComponent.uid, lanePosition);

              // 如果部署失败，还原Hero的位置和父节点
              if (!deploySuccess) {
                console.warn("\u90E8\u7F72Hero" + heroIndex + "\u5230\u7EBF\u8DEF" + this._currentLane.laneIndex + "\u5931\u8D25\uFF0C\u8FD8\u539F\u4F4D\u7F6E");
                this.restoreHeroPosition(heroNode);
              }
              // 如果部署成功，Hero已经被部署到线路，不需要还原位置
            } else {
              // 节点不相交，还原父节点并重置位置
              this.restoreHeroPosition(heroNode);
            }

            // 重置当前线路高亮
            if (this._currentLane) {
              this._currentLane.laneImg.enabled = false;
              this._currentLane = null;
            }
            this._isDragging = false;
          } else if (dragDuration < this._dragThreshold) {
            // 点击时间小于1秒，触发技能释放
            this.castHeroSkill(heroIndex);
            this.restoreHeroPosition(heroNode);
          }
          this._currentDragHero = null;
          this._currentDragHeroIndex = 0;
          this._dragOriginalParent = null;
          event.propagationStopped = true;
        }

        /**
         * Hero触摸取消
         */;
        _proto.onHeroTouchCancel = function onHeroTouchCancel(heroNode, event) {
          // 清除定时器
          if (this._dragTimer) {
            clearTimeout(this._dragTimer);
            this._dragTimer = null;
          }
          if (this._isDragging) {
            // 还原父节点并重置位置
            this.restoreHeroPosition(heroNode);
            this._isDragging = false;

            // 重置当前线路高亮
            if (this._currentLane) {
              this._currentLane.laneImg.node.active = false;
              this._currentLane = null;
            }
          }
          this._currentDragHero = null;
          this._currentDragHeroIndex = 0;
          this._dragOriginalParent = null;
          event.propagationStopped = true;
        }

        /**
         * 检查拖拽位置是否在某个线路上
         */;
        _proto.checkDragPositionOnLane = function checkDragPositionOnLane(_heroPos) {
          var foundLane = null;

          // 隐藏所有线路高亮
          this.lanes.forEach(function (lane) {
            if (lane.node && lane.laneImg) {
              lane.laneImg.enabled = false;
            }
          });

          // 检测是否在某个线路上（检查hero节点是否与lane节点相交）
          for (var _iterator2 = _createForOfIteratorHelperLoose(this.lanes), _step2; !(_step2 = _iterator2()).done;) {
            var lane = _step2.value;
            if (this.isHeroIntersectingLane(this._currentDragHero, lane)) {
              foundLane = lane;
              break;
            }
          }

          // 高亮找到的线路
          if (foundLane && foundLane.laneImg && foundLane.laneImg.node) {
            foundLane.laneImg.enabled = true;
            this._currentLane = foundLane;
          } else {
            this._currentLane = null;
          }
        }

        /**
         * 还原Hero的位置和父节点
         */;
        _proto.restoreHeroPosition = function restoreHeroPosition(heroNode) {
          var restoreWorld = this._originalHeroWorldPos.clone();
          if (this._dragOriginalParent && heroNode.parent !== this._dragOriginalParent) {
            heroNode.setParent(this._dragOriginalParent);
          }
          heroNode.setSiblingIndex(1);
          heroNode.setWorldPosition(restoreWorld);
          if (this._dragOriginalParent) {
            heroNode.setSiblingIndex(this._dragOriginalSiblingIndex);
          }
        }

        /**
         * 判断Hero节点是否与Lane节点相交
         */;
        _proto.isHeroIntersectingLane = function isHeroIntersectingLane(hero, lane) {
          if (!hero || !lane || !lane.node) return false;
          var heroUITransform = hero.getComponent(UITransform);
          var laneUITransform = lane.node.getComponent(UITransform);
          if (!heroUITransform || !laneUITransform) return false;

          // 获取Hero和Lane的世界坐标边界框
          var heroBoundingBox = heroUITransform.getBoundingBoxToWorld();
          var laneBoundingBox = laneUITransform.getBoundingBox();
          var laneBoundingBoxWorld = laneUITransform.getBoundingBoxToWorld();

          // 检查两个矩形是否相交
          return heroBoundingBox.x < laneBoundingBoxWorld.x + laneBoundingBox.width && heroBoundingBox.x + heroBoundingBox.width > laneBoundingBoxWorld.x && heroBoundingBox.y < laneBoundingBoxWorld.y + laneBoundingBox.height && heroBoundingBox.y + heroBoundingBox.height > laneBoundingBoxWorld.y;
        }

        /**
         * 部署Hero到指定线路（通过Hero UID）
         * @param heroUid 英雄UID
         * @param lanePosition 线路位置
         * @returns 部署是否成功
         */;
        _proto.deployHeroToLaneByUid = function deployHeroToLaneByUid(heroUid, lanePosition) {
          if (!App.dungeonBattleMgr) {
            console.warn("DungeonBattleMgr\u672A\u521D\u59CB\u5316");
            return false;
          }

          // 通过DungeonBattleMgr部署Hero
          var success = App.dungeonBattleMgr.deployHero(heroUid, lanePosition);
          if (success) {
            console.log("\u6210\u529F\u90E8\u7F72Hero(uid:" + heroUid + ")\u5230\u7EBF\u8DEF" + lanePosition);
            // 更新英雄头像为部署状态
            this.updateHeroHeadOnDeploy(heroUid);
            // Hero部署后会自动通过AI系统查找敌人并移动攻击
          }

          return success;
        }

        /**
         * 部署Hero到指定线路（通过Hero索引，保留用于兼容）
         * @returns 部署是否成功
         */;
        _proto.deployHeroToLane = function deployHeroToLane(heroIndex, laneIndex) {
          // 根据线路索引获取LanePosition
          var lanePosition = this.getLanePositionByIndex(laneIndex);
          if (lanePosition === GameBattle.LanePosition.None) {
            console.warn("\u65E0\u6548\u7684\u7EBF\u8DEF\u7D22\u5F15: " + laneIndex);
            return false;
          }

          // 获取Hero实例
          var hero = this.getHeroByIndex(heroIndex);
          if (!hero) {
            console.warn("\u672A\u627E\u5230Hero" + heroIndex + "\u5B9E\u4F8B");
            return false;
          }

          // 检查Hero是否在待命状态
          if (!hero.isWaiting) {
            console.warn("Hero" + heroIndex + "\u4E0D\u5728\u5F85\u547D\u72B6\u6001\uFF0C\u65E0\u6CD5\u90E8\u7F72");
            return false;
          }

          // 使用UID部署
          return this.deployHeroToLaneByUid(hero.uid, lanePosition);
        }

        /**
         * 根据索引获取Hero实例
         */;
        _proto.getHeroByIndex = function getHeroByIndex(heroIndex) {
          // 方法1: 尝试从hero节点获取Hero组件
          var heroNode = this.heros[heroIndex - 1].heroNode; //this[`hero${heroIndex}`] as Node;
          if (heroNode) {
            // 先尝试从当前节点获取
            var hero = heroNode.getComponent(Hero);
            if (hero) {
              return hero;
            }

            // 尝试从子节点获取
            hero = heroNode.getComponentInChildren(Hero);
            if (hero) {
              return hero;
            }
          }

          // 方法2: 从DungeonBattleMgr的deployedHeroes中查找
          if (App.dungeonBattleMgr) {
            var deployedHeroes = App.dungeonBattleMgr.deployedHeroes;
            // 将Map转换为数组，按创建顺序或某种规则获取
            var heroesArray = Array.from(deployedHeroes.values());
            if (heroesArray.length >= heroIndex && heroIndex > 0) {
              // heroIndex从1开始，数组从0开始
              return heroesArray[heroIndex - 1];
            }
          }
          return null;
        }

        /**
         * 根据索引获取LanePosition
         */;
        _proto.getLanePositionByIndex = function getLanePositionByIndex(index) {
          switch (index) {
            case 1:
              return GameBattle.LanePosition.Left;
            case 2:
              return GameBattle.LanePosition.Middle;
            case 3:
              return GameBattle.LanePosition.Right;
            default:
              return GameBattle.LanePosition.None;
          }
        }

        /**
         * 触发Hero技能释放
         */;
        _proto.castHeroSkill = function castHeroSkill(heroIndex) {
          // 获取Hero实例
          var hero = this.getHeroByIndex(heroIndex);
          if (!hero) {
            console.warn("\u672A\u627E\u5230Hero" + heroIndex + "\u5B9E\u4F8B\uFF0C\u65E0\u6CD5\u91CA\u653E\u6280\u80FD");
            return;
          }

          // 检查Hero是否可以释放技能
          if (hero.isWaiting) {
            console.log("Hero" + heroIndex + "\u5728\u5F85\u547D\u72B6\u6001\uFF0C\u65E0\u6CD5\u91CA\u653E\u6280\u80FD");
            return;
          }
          if (hero.isDead) {
            console.log("Hero" + heroIndex + "\u5DF2\u6B7B\u4EA1\uFF0C\u65E0\u6CD5\u91CA\u653E\u6280\u80FD");
            return;
          }

          // 检查Hero是否可以释放技能（需要足够的怒气等）
          if (hero.canUseSkill()) ;else {
            console.log("Hero" + heroIndex + "\u65E0\u6CD5\u91CA\u653E\u6280\u80FD\uFF08\u53EF\u80FD\u6012\u6C14\u4E0D\u8DB3\uFF09");
            // 即使无法释放技能，也可以触发技能动画或提示
            // 这里可以根据需求添加其他逻辑
          }
        }

        /**
         * 更新英雄头像 - 部署状态
         */;
        _proto.updateHeroHeadOnDeploy = function updateHeroHeadOnDeploy(heroUid) {
          var headIndex = this._heroEntityToHeadIndex.get(heroUid);
          if (headIndex !== undefined && headIndex < this.heroHeads.length) {
            this.heroHeads[headIndex].onHeroDeployed();
          }
        }

        /**
         * 更新英雄头像 - 死亡状态
         */;
        _proto.updateHeroHeadOnDead = function updateHeroHeadOnDead(heroUid) {
          var headIndex = this._heroEntityToHeadIndex.get(heroUid);
          if (headIndex !== undefined && headIndex < this.heroHeads.length) {
            this.heroHeads[headIndex].onHeroDead();
          }
        }

        /**
         * 更新英雄头像 - 复活状态
         */;
        _proto.updateHeroHeadOnRevive = function updateHeroHeadOnRevive(heroUid) {
          var headIndex = this._heroEntityToHeadIndex.get(heroUid);
          if (headIndex !== undefined && headIndex < this.heroHeads.length) {
            this.heroHeads[headIndex].onHeroRevive();
          }
        }

        /**
         * 更新英雄头像 - 返回城墙状态
         */;
        _proto.updateHeroHeadOnReturnToWall = function updateHeroHeadOnReturnToWall(heroUid) {
          var headIndex = this._heroEntityToHeadIndex.get(heroUid);
          if (headIndex !== undefined && headIndex < this.heroHeads.length) {
            this.heroHeads[headIndex].onHeroReturnToWall();
          }
        };
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          var _this$targetable;
          var targetNode = (_this$targetable = this.targetable) != null ? _this$targetable : this.node;
          var ui = targetNode == null ? void 0 : targetNode.getComponent(UITransform);
          return ui ? ui.getBoundingBoxToWorld() : null;
        };
        _proto.getTargetWorldPosition = function getTargetWorldPosition() {
          var _this$targetable2;
          var targetNode = (_this$targetable2 = this.targetable) != null ? _this$targetable2 : this.node;
          return targetNode ? targetNode.worldPosition.clone() : this.node.worldPosition.clone();
        }

        /**
         * 获取城池防线Y坐标
         */;
        /**
         * 检查敌方单位是否到达防线
         */
        _proto.checkEnemyReachDefenseLine = function checkEnemyReachDefenseLine(enemy, max_y) {
          if (max_y === void 0) {
            max_y = 0;
          }
          var enemyPos = enemy.node.position;
          return enemyPos.y <= this._defenseLineY + max_y;
        }

        /**
         * 检查敌方单位是否有我方单位拦截
         */;
        _proto.checkEnemyHasInterceptor = function checkEnemyHasInterceptor(enemy, allFriendlyUnits) {
          var enemyPos = enemy.node.position;

          // 检查是否有我方单位在敌方单位的攻击范围内
          for (var _iterator3 = _createForOfIteratorHelperLoose(allFriendlyUnits), _step3; !(_step3 = _iterator3()).done;) {
            var friendlyUnit = _step3.value;
            if (friendlyUnit.isDead) continue;
            var distance = this.calculateDistance(enemyPos, friendlyUnit.node.position);
            if (distance <= this._attackDetectionRadius) {
              return true;
            }
          }
          return false;
        }

        /**
         * 敌方单位开始攻击城池
         */;
        _proto.enemyStartAttack = function enemyStartAttack(enemy) {
          if (!this._attackingEnemies.has(enemy.uid)) {
            this._attackingEnemies.set(enemy.uid, enemy);
            // 可以添加攻击特效等
          }
        }

        /**
         * 敌方单位停止攻击城池
         */;
        _proto.enemyStopAttack = function enemyStopAttack(enemyUid) {
          this._attackingEnemies["delete"](enemyUid);
        }

        /**
         * 处理城池受到的伤害
         */;
        _proto.takeDamage = function takeDamage(damage, attacker) {
          this._currentHp -= damage;

          // 确保HP不为负数
          if (this._currentHp < 0) {
            this._currentHp = 0;
          }

          // 更新UI
          this.updateHpDisplay();

          // 播放受伤特效
          this.playHitEffect(attacker.node.position);

          // 通知DungeonBattleMgr城池受到攻击（会在那里统一处理战斗结束逻辑）
          App.dungeonBattleMgr.cityAttacked(damage);

          // 检查是否战斗失败
          if (this._currentHp <= 0 && !this.isDead) {
            this.onCityDestroyed();
          }
        }

        /**
         * 城池被摧毁
         */;
        _proto.onCityDestroyed = function onCityDestroyed() {
          if (this.isDead) {
            return; // 已经处理过了，避免重复调用
          }

          this.isDead = true;
          // 播放城池摧毁特效
          this.playDestroyEffect();

          // 注意：不在这里调用战斗失败回调，由DungeonBattleMgr统一处理
          // 这样可以避免重复发送战斗结算协议
        }

        /**
         * 更新HP显示
         */;
        _proto.updateHpDisplay = function updateHpDisplay() {
          if (this.hpLabel) {
            this.hpLabel.string = "" + Math.floor(this._currentHp);
          }
          this.cityHPBar.progress = this._currentHp / this._maxHp;
          if (this.hpBarFill) {
            this.hpBarFill.fillRange = this.hpPercentage;
          }
        };
        _proto.positionHero = function positionHero(slotIndex) {
          if (slotIndex < 1 || slotIndex > this.heros.length) {
            return null;
          }
          var hero = this.heros[slotIndex - 1];
          return hero ? hero.heroNode : null;
        };
        _proto.positionHeroNode = function positionHeroNode(slotIndex) {
          if (slotIndex < 1 || slotIndex > this.heros.length) {
            return null;
          }
          var hero = this.heros[slotIndex - 1];
          return hero ? hero.node : null;
        }

        /**
         * 获取指定线路
         */;
        _proto.getLaneByPosition = function getLaneByPosition(position) {
          var index = this.getLaneIndexByPosition(position);
          return this.lanes[index] || null;
        }

        /**
         * 根据LanePosition获取索引
         */;
        _proto.getLaneIndexByPosition = function getLaneIndexByPosition(position) {
          switch (position) {
            case GameBattle.LanePosition.Left:
              return 0;
            case GameBattle.LanePosition.Middle:
              return 1;
            case GameBattle.LanePosition.Right:
              return 2;
            default:
              return -1;
          }
        }

        /**
         * 播放受伤特效
         */;
        _proto.playHitEffect = function playHitEffect(hitPosition) {
          // TODO: 实现受伤特效
          // console.log(`City hit at position: ${hitPosition.toString()}`);
          // if (!this.citySp.node.getComponent(FlashSpriteRed)) {
          //     this.citySp.node.addComponent(FlashSpriteRed);
          // }
          // this.citySp.node.getComponent(FlashSpriteRed).flashQuick();
          Utils.flashWhite(this.citySp.node);
        }

        /**
         * 播放摧毁特效
         */;
        _proto.playDestroyEffect = function playDestroyEffect() {
          // TODO: 实现摧毁特效
          console.log("City destroyed!");

          // 可以隐藏城池或显示摧毁后的模型
          if (this.cityGateNode) {
            // 先缩小再隐藏
            this.scheduleOnce(function () {
              // this.cityGateNode.active = false;
            }, 1);
          }
        }

        /**
         * 计算两点之间的距离
         */;
        _proto.calculateDistance = function calculateDistance(pos1, pos2) {
          var dx = pos1.x - pos2.x;
          var dy = pos1.y - pos2.y;
          return Math.sqrt(dx * dx + dy * dy);
        }

        /**
         * 清除所有攻击中的敌方单位
         */;
        _proto.clearAttackingEnemies = function clearAttackingEnemies() {
          this._attackingEnemies.clear();
        }

        /**
         * 重置城池状态
         */;
        _proto.reset = function reset() {
          this._currentHp = this._maxHp;
          this._attackingEnemies.clear();
          this.updateHpDisplay();

          // 重新显示城池
          if (this.cityGateNode) {
            this.cityGateNode.active = true;
          }
        };
        _proto.onDestroy = function onDestroy() {
          this._removeEvent();
          if (this._battlefieldTouchNode && this._battlefieldTouchNode.isValid) {
            this._battlefieldTouchNode.off(Node.EventType.TOUCH_END, this.onBattlefieldTouch, this);
            this._battlefieldTouchNode = null;
          }
        };
        _createClass(City, [{
          key: "isDead",
          get: function get() {
            return this._isDead;
          },
          set: function set(value) {
            this._isDead = value;
          }
        }, {
          key: "targetable",
          get: function get() {
            return this.cityGateNode;
          }
        }, {
          key: "defenseLineY",
          get: function get() {
            return this._defenseLineY;
          }

          /**
           * 获取当前耐久度
           */
        }, {
          key: "currentHp",
          get: function get() {
            return this._currentHp;
          }

          /**
           * 获取最大耐久度
           */
        }, {
          key: "maxHp",
          get: function get() {
            return this._maxHp;
          }

          /**
           * 获取耐久度百分比
           */
        }, {
          key: "hpPercentage",
          get: function get() {
            return this._currentHp / this._maxHp;
          }
        }]);
        return City;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "citySp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "hpBarNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "hpLabel", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "hpBarFill", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "cityGateNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "heros", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "cityHPBar", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "laneNode", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "lanes", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "headNode", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "heroHeads", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/CityLane.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, Sprite, Label, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      Label = module.Label;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "d7935T53AxFv5n1zEoDkEap", "CityLane", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 城池线路类
       * 负责表现单条线路的节点信息、高亮表现等
       */
      var CityLane = exports('CityLane', (_dec = ccclass("CityLane"), _dec2 = property(Node), _dec3 = property(Sprite), _dec4 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(CityLane, _Component);
        function CityLane() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "laneDi", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "laneImg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "laneName", _descriptor3, _assertThisInitialized(_this));
          _this._laneIndex = 0;
          return _this;
        }
        var _proto = CityLane.prototype;
        _proto.start = function start() {
          this.laneImg.enabled = false;
        };
        _proto.init = function init(index) {
          this._laneIndex = index;
        };
        _createClass(CityLane, [{
          key: "laneIndex",
          get: function get() {
            return this._laneIndex;
          }
        }]);
        return CityLane;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "laneDi", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "laneImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "laneName", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/CommonCfgUtil.ts", ['cc', './DBRecord.ts'], function (exports) {
  var cclegacy, DBRecord;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "016ccFMz6hGVK8B07h/gpr2", "CommonCfgUtil", undefined);
      var EShuoMingQuanJu = exports('EShuoMingQuanJu', /*#__PURE__*/function (EShuoMingQuanJu) {
        EShuoMingQuanJu[EShuoMingQuanJu["ExitBattleTargetDistance"] = 5] = "ExitBattleTargetDistance";
        EShuoMingQuanJu[EShuoMingQuanJu["ExitBattleHomeDistance"] = 6] = "ExitBattleHomeDistance";
        EShuoMingQuanJu[EShuoMingQuanJu["ExitBattleEndTime"] = 7] = "ExitBattleEndTime";
        EShuoMingQuanJu[EShuoMingQuanJu["BossWudiDuration"] = 39] = "BossWudiDuration";
        EShuoMingQuanJu[EShuoMingQuanJu["PlayerAutoFightCheckEnemyKill"] = 155] = "PlayerAutoFightCheckEnemyKill";
        return EShuoMingQuanJu;
      }({}));
      var CommonCfgUtil = exports('CommonCfgUtil', /*#__PURE__*/function () {
        function CommonCfgUtil() {}
        CommonCfgUtil.getCommonCfgValue = function getCommonCfgValue(key) {
          var cfg = DBRecord.fetchId("ShuoMingQuanJu", key);
          return cfg == null ? void 0 : cfg.value;
        };
        CommonCfgUtil.getValue = function getValue(key) {
          var cfg = DBRecord.fetchId("ShuoMingQuanJu", key);
          if (cfg) {
            return cfg.value;
          } else {
            return null;
          }
        };
        return CommonCfgUtil;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ConditionCell.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './ScrollListItem.ts', './BuildItem.ts', './UtilGame.ts', './UIMgr.ts', './UI_ItemSourceView.ts', './Layout_UI_ItemSourceView.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Sprite, Label, Color, App, PlaceConfigMgr, PlaceGameMgr, ScrollListItem, BuildItem, UtilGame, UIMgr, LayerType, UI_ItemSourceView, Layout_UI_ItemSourceView;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      Label = module.Label;
      Color = module.Color;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      BuildItem = module.BuildItem;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_ItemSourceView = module.UI_ItemSourceView;
    }, function (module) {
      Layout_UI_ItemSourceView = module.Layout_UI_ItemSourceView;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
      cclegacy._RF.push({}, "f72caE51+BNc4O9Pc0Xbwzm", "ConditionCell", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 条件类型
       */
      var ConditionType = exports('ConditionType', /*#__PURE__*/function (ConditionType) {
        ConditionType[ConditionType["Build"] = 1] = "Build";
        ConditionType[ConditionType["item"] = 2] = "item";
        ConditionType[ConditionType["Shebei"] = 3] = "Shebei";
        return ConditionType;
      }({}));
      var ConditionCell = exports('ConditionCell', (_dec = ccclass("ConditionCell"), _dec2 = property({
        type: Node,
        tooltip: "类型1"
      }), _dec3 = property({
        type: Node,
        tooltip: "类型2"
      }), _dec4 = property({
        type: Node,
        tooltip: "类型3"
      }), _dec5 = property({
        type: Node,
        tooltip: "背景图"
      }), _dec6 = property({
        type: Node,
        tooltip: "建筑节点"
      }), _dec7 = property({
        type: Node,
        tooltip: "设备节点"
      }), _dec8 = property({
        type: Sprite,
        tooltip: "道具图标"
      }), _dec9 = property({
        type: Label,
        tooltip: "消耗文本"
      }), _dec10 = property({
        type: Label,
        tooltip: "名字"
      }), _dec11 = property({
        type: Label,
        tooltip: "文本显示"
      }), _dec12 = property({
        type: Node,
        tooltip: "前往按钮"
      }), _dec13 = property({
        type: Node,
        tooltip: "打勾图片"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(ConditionCell, _ScrollListItem);
        function ConditionCell() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "type1Node", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "type2Node", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "type3Node", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bgNode", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sheBeiNode", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemIcon", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "costLab", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nameLab", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtLab", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnGoNode", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "doneImg", _descriptor12, _assertThisInitialized(_this));
          _this._data = null;
          return _this;
        }
        var _proto = ConditionCell.prototype;
        _proto.show = function show(data, index) {
          if (index === void 0) {
            index = 0;
          }
          if (!data) return;
          this._data = data;
          if (this.bgNode) {
            this.bgNode.active = index % 2 === 1;
          }
          if (data.type === ConditionType.Build) {
            this.type1Node.active = true;
            this.type2Node.active = false;
            this.type3Node.active = false;
          } else if (data.type === ConditionType.item) {
            this.type1Node.active = false;
            this.type2Node.active = true;
            this.type3Node.active = false;
          } else if (data.type === ConditionType.Shebei) {
            this.type1Node.active = false;
            this.type2Node.active = false;
            this.type3Node.active = true;
          }
          if (data.type === ConditionType.Build) {
            var buildingName = PlaceConfigMgr.inst.getBuildingName(data.buildType);
            this.nameLab.string = buildingName;
            var comp = this.buildNode.getComponent(BuildItem);
            if (comp) {
              comp.show(data.buildType);
            }
            var maxLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(data.buildType);
            this.txtLab.string = "\u7B49\u7EA7" + data.level;
            if (maxLevel < data.level) {
              this.txtLab.color = new Color("#E71F1F");
              this.nameLab.color = new Color("#E71F1F");
              this.doneImg.active = false;
              this.btnGoNode.active = true;
            } else {
              this.txtLab.color = new Color("#786A5A");
              this.nameLab.color = new Color("#786A5A");
              this.doneImg.active = true;
              this.btnGoNode.active = false;
            }
          } else if (data.type === ConditionType.item) {
            var itemConfig = App.bagMgr.getItemConfig(data.itemId);
            if (itemConfig && itemConfig.icon) {
              UtilGame.loadItemIcon(this.itemIcon, itemConfig.icon);
            }
            var curCount = App.bagMgr.getItemCount(data.itemId);
            this.costLab.string = curCount + "/" + data.count;
            if (curCount < data.count) {
              this.txtLab.string = curCount + "/" + data.count;
              this.txtLab.color = new Color("#E71F1F");
              this.nameLab.color = new Color("#E71F1F");
              this.doneImg.active = false;
              this.btnGoNode.active = true;
            } else {
              this.txtLab.string = data.count + "/" + data.count;
              this.txtLab.color = new Color("#786A5A");
              this.nameLab.color = new Color("#786A5A");
              this.doneImg.active = true;
              this.btnGoNode.active = false;
            }
          }
        };
        _proto.onGoBtnClick = function onGoBtnClick() {
          if (this._data.type === ConditionType.Build) {
            PlaceGameMgr.inst.moveToBuilding(this._data.buildType, function () {
              UIMgr.inst.closeOnce("UI_BuildUpgradeView");
              UIMgr.inst.closeOnce("UI_UnLockView");
            });
          } else if (this._data.type === ConditionType.item) {
            var itemData = {};
            var itemConfig = App.bagMgr.getItemConfig(this._data.itemId);
            itemData.itemid = itemConfig.id;
            UIMgr.inst.open(UI_ItemSourceView, LayerType.panel, Layout_UI_ItemSourceView, [itemData]);
          } else if (this._data.type === ConditionType.Shebei) ;
        };
        return ConditionCell;
      }(ScrollListItem), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "type1Node", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "type2Node", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "type3Node", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "bgNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "buildNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "sheBeiNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "itemIcon", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "costLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "txtLab", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "btnGoNode", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "doneImg", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/CostItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './App.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, RichText, Sprite, Node, Layout, Color, Component, Utils, App, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      RichText = module.RichText;
      Sprite = module.Sprite;
      Node = module.Node;
      Layout = module.Layout;
      Color = module.Color;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "1c97en92u1KzLLPJ6955q5W", "CostItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var CostItem = exports('CostItem', (_dec = ccclass("CostItem"), _dec2 = property(Label), _dec3 = property(RichText), _dec4 = property(Label), _dec5 = property(Sprite), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(CostItem, _Component);
        function CostItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lblName", _descriptor, _assertThisInitialized(_this));
          // 道具名称
          _initializerDefineProperty(_this, "rtxCost", _descriptor2, _assertThisInitialized(_this));
          // 道具数量
          _initializerDefineProperty(_this, "labCost", _descriptor3, _assertThisInitialized(_this));
          // 道具数量
          _initializerDefineProperty(_this, "imgCost", _descriptor4, _assertThisInitialized(_this));
          // 道具图标
          _this._data = null;
          // 数据
          _this.curTouch = true;
          return _this;
        }
        var _proto = CostItem.prototype;
        // 是否点击
        _proto.start = function start() {
          var _this2 = this;
          if (this.curTouch) {
            this.node.on(Node.EventType.TOUCH_END, function () {
              _this2.openItemDetailView();
            });
          }
        };
        _proto.openItemDetailView = function openItemDetailView() {
          if (this._data) {
            App.bagMgr.showItemDetailView(this._data[0]);
          }
        };
        _proto.setClickTouch = function setClickTouch(flag) {
          this.curTouch = flag;
          this.node.off(Node.EventType.TOUCH_END);
        }

        /**
         * 设置消耗道具数据
         * @param costData
         */;
        _proto.setData = function setData(costData, needX) {
          var _this3 = this;
          if (needX === void 0) {
            needX = false;
          }
          this._data = costData;
          if (this.rtxCost) {
            var richText = this.rtxCost;
            var content = Utils.getCostRtx(this._data);
            richText.maxWidth = 0;
            richText.string = content;
            this.scheduleOnce(function () {
              var _richText$node$parent;
              if (!_this3.isValid || !richText.isValid) return;
              var layout = (_richText$node$parent = richText.node.parent) == null ? void 0 : _richText$node$parent.getComponent(Layout);
              if (layout) {
                layout.updateLayout();
              }
            }, 0);
          }
          if (this.labCost) {
            this.labCost.string = needX ? "X" + Utils.getNumText(this._data[1]) : Utils.getNumText(this._data[1]);
          }
          this.setCostIcon();
        }

        /**
         * 设置道具图标
         */;
        _proto.setCostIcon = function setCostIcon() {
          var itemConfig = App.bagMgr.getItemConfig(this._data[0]);
          UtilGame.loadItemIcon(this.imgCost, itemConfig.id);
        }

        /**
         * 设置消耗道具数据
         * @param text 显示标题
         * @param costData 消耗数据
         * @param noColor 不需要颜色
         */;
        _proto.setDataOnlyCost = function setDataOnlyCost(text, costData, needColor) {
          if (needColor === void 0) {
            needColor = false;
          }
          this._data = costData;
          var itemConfig = App.bagMgr.getItemConfig(this._data[0]);
          if (itemConfig && itemConfig.icon) {
            this.setCostIcon();
          }
          if (text) {
            if (this.node.getChildByName("Label")) {
              this.node.getChildByName("Label").getComponent(Label).string = text;
            }
          }
          var color0 = "#64e964";
          var color1 = "#FF6648";
          var val0 = App.bagMgr.getItemCount(costData[0]);
          if (this.rtxCost) {
            if (!needColor) {
              this.rtxCost.string = "<b><outline color = black width = 2>" + Utils.getNumText(costData[1]) + "</color>";
            } else {
              this.rtxCost.string = "<b><outline color = black width = 2><color=" + (val0 >= costData[1] ? color0 : color1) + ">" + Utils.getNumText(costData[1]) + "</color>";
            }
          }
          if (this.labCost) {
            this.labCost.string = Utils.getNumText(costData[1]);
            if (!needColor) {
              this.labCost.color = val0 >= costData[1] ? new Color().fromHEX(color0) : new Color().fromHEX(color1);
            }
          }
        }

        /**
         * 只显示拥有多少道具，不显示消耗
         * @param text 显示标题
         * @param costData 消耗数据
         */;
        _proto.setDataHave = function setDataHave(text, costData) {
          this._data = costData;
          var itemConfig = App.bagMgr.getItemConfig(this._data[0]);
          if (itemConfig && itemConfig.icon) {
            this.setCostIcon();
          }
          if (text) {
            if (this.node.getChildByName("Label")) {
              this.node.getChildByName("Label").getComponent(Label).string = text;
            }
          }
          var val0 = App.bagMgr.getItemCount(costData[0]);
          var color0 = "#64e964";
          var color1 = "#FF6648";
          if (this.rtxCost) {
            this.rtxCost.string = "<b><outline color = black width = 2><color=" + color0 + ">" + Utils.getNumText(val0) + "</color>";
          }
          if (this.labCost) {
            this.labCost.string = Utils.getNumText(val0);
            if (val0 > 0) {
              this.labCost.color = new Color().fromHEX(color0);
            } else {
              this.labCost.color = new Color().fromHEX(color1);
            }
          }
        }
        /**
         * 设置消耗道具数据-同时显示拥有和消耗
         * @param text 显示标题
         * @param costData 消耗数据
         * @param noColor 不需要颜色
         */;
        _proto.setDataNeedCost = function setDataNeedCost(text, costData, needColor) {
          if (needColor === void 0) {
            needColor = true;
          }
          this._data = costData;
          var itemConfig = App.bagMgr.getItemConfig(this._data[0]);
          if (itemConfig && itemConfig.icon) {
            this.setCostIcon();
          }
          var titleStr = text || "";
          if (this.node.getChildByName("Label")) {
            this.node.getChildByName("Label").getComponent(Label).string = titleStr;
          }
          var color0 = "#64e964"; // 绿色：满足条件
          var color1 = "#ec2b04ff"; // 红色：不满足条件
          var val0 = App.bagMgr.getItemCount(costData[0]); // 拥有数量
          var needCount = costData[1]; // 需要数量
          var isEnough = val0 >= needCount; // 是否满足

          // 显示格式：拥有数量/消耗数量
          var displayText = Utils.getNumText(val0) + "/" + Utils.getNumText(needCount);
          if (this.rtxCost) {
            if (needColor) {
              // 根据是否满足显示不同颜色
              this.rtxCost.string = "<b><outline color = black width = 2><color=" + (isEnough ? color0 : color1) + ">" + displayText + "</color></outline></b>";
            } else {
              this.rtxCost.string = "<b><outline color = black width = 2>" + displayText + "</outline></b>";
            }
          }
          if (this.labCost) {
            this.labCost.string = displayText;
            if (needColor) {
              this.labCost.color = isEnough ? new Color().fromHEX(color0) : new Color().fromHEX(color1);
            }
          }
        }

        /**
         * 检查消耗是否足够
         * @returns {boolean} 消耗是否足够
         */;
        _proto.checkCostEnough = function checkCostEnough(open) {
          if (open === void 0) {
            open = false;
          }
          var val0 = App.bagMgr.getItemCount(this._data[0]);
          var flag = val0 >= this._data[1];
          if (!flag && open) {
            this.openItemDetailView();
          }
          return flag;
        };
        return CostItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lblName", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "rtxCost", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "labCost", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "imgCost", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/DamageTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MathUtils.ts', './BattleProprMgr.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Label, Vec3, Tween, tween, v3, Component, MathUtils, FormulaResultItem, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Vec3 = module.Vec3;
      Tween = module.Tween;
      tween = module.tween;
      v3 = module.v3;
      Component = module.Component;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      FormulaResultItem = module.FormulaResultItem;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "21ad7uAMjNOyLU8nr9c+Zxe", "DamageTips", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var STR_ICON = {
        2: "i",
        //火
        3: "j",
        //冰
        4: "k",
        //电
        5: "l",
        //神圣伤害
        6: "m",
        //毒
        7: "n" //暗影
      };

      var strMap = {
        "1": ["1", "①", "Ⅰ"],
        "2": ["2", "②", "Ⅱ"],
        "3": ["3", "③", "Ⅲ"],
        "4": ["4", "④", "Ⅳ"],
        "5": ["5", "⑤", "Ⅴ"],
        "6": ["6", "⑥", "Ⅵ"],
        "7": ["7", "⑦", "Ⅶ"],
        "8": ["8", "⑧", "Ⅷ"],
        "9": ["9", "⑨", "Ⅸ"],
        "0": ["0", "⑩", "Ⅹ"],
        ".": [".", "z", "."],
        "-": ["-", "x", "("],
        "+": ["+", "y", ")"],
        c: ["c", "w", "&"],
        d: ["d", "v", "^"],
        e: ["e", "u", "$"],
        f: ["f", "t", "#"],
        g: ["g", "s", "@"],
        h: ["h", "r", "!"],
        a: ["a", "a", "a"],
        b: ["b", "b", "b"],
        i: ["i", "i", "i"],
        j: ["j", "j", "j"],
        k: ["k", "k", "k"],
        l: ["l", "l", "l"],
        m: ["m", "m", "m"]
      };

      /**
       * 伤害提示
       */
      var DamageTips = exports('DamageTips', (_dec = ccclass("DamageTips"), _dec2 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(DamageTips, _Component);
        function DamageTips() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lab_num", _descriptor, _assertThisInitialized(_this));
          /** 唯一id */
          _this._uid = void 0;
          _this._pos = new Vec3(0, 0, 0);
          return _this;
        }
        var _proto = DamageTips.prototype;
        // protected onDestroy(): void {
        //     Tween.stopAllByTarget(this.node);
        // }
        // Administrator:
        // 0=无
        // 1=物理
        // 2=火焰
        // 3=冰寒
        // 4=闪电
        // 5=神圣
        // 6=毒素
        // 7=暗影
        _proto.formatNum = function formatNum(num) {
          num = -Math.floor(num);
          if (num > 100000000000000000) {
            //京
            num = (num / 10000000000000000).toFixed(2) + "f";
          } else if (num > 10000000000000) {
            //兆
            num = (num / 1000000000000).toFixed(2) + "e";
          } else if (num > 1000000000) {
            //亿
            num = (num / 100000000).toFixed(2) + "d";
          } else if (num > 100000) {
            //万
            num = (num / 10000).toFixed(2) + "c";
          }
          return num;
        };
        _proto.transformStr = function transformStr(str, index) {
          var result = "";
          for (var _iterator = _createForOfIteratorHelperLoose(str), _step; !(_step = _iterator()).done;) {
            var _char = _step.value;
            if (strMap[_char]) {
              result += strMap[_char][index] || _char;
            } else {
              result += _char;
            }
          }
          return result;
        };
        _proto.show = function show(num, pos, attrType, hit_type) {
          window["testcount"]++;
          var add = num > 0 ? "+" : "";
          num = this.formatNum(num);
          var str = "";
          var index = 0;
          if (hit_type === FormulaResultItem._sanbi) {
            index = 0;
            this.lab_num.fontSize = 30;
            str += "b";
          } else if (hit_type === FormulaResultItem._zhiliao) {
            this.lab_num.fontSize = 30;
            str += "+" + Math.abs(num);
            index = 2;
          } else {
            if (hit_type === FormulaResultItem._baoji) {
              this.lab_num.fontSize = 65;
              str += "a";
              index = 0;
            } else {
              this.lab_num.fontSize = 30;
              str += STR_ICON[attrType] || "";
              index = 1;
            }
            str += add + num;
          }
          this.lab_num.string = this.transformStr(str, index);
          this._pos.set(pos.x, pos.y, pos.z);
          this._playAnim();
        };
        _proto.recovery = function recovery() {
          Tween.stopAllByTarget(this.node);
          Tween.stopAllByTarget(this.node.uiOpacity);
        };
        _proto._playAnim = function _playAnim() {
          var _this2 = this;
          this.node.active = true;
          // 模拟迷雾大陆的飘字效果
          var o = 20;
          var offset = MathUtils.randomInt(-o, o);
          this._pos.set(this._pos.x + offset, this._pos.y + MathUtils.randomInt(50, 100), this._pos.z);
          this.node.setWorldPosition(this._pos.x + offset, this._pos.y, this._pos.z);
          var s = 1;
          this.node.setScale(s, s, s);
          this.node.uiOpacity.opacity = 255;
          s = 0.8;
          o = 70;
          var endPos = this._pos.clone().add3f(Math.random() > 0.5 ? o : -o, 50, 0);
          tween(this.node).to(0.6, {
            scale: v3(s, s, s),
            worldPosition: endPos
          }, {
            easing: "sineInOut"
          }).call(function () {
            tween(_this2.node.uiOpacity).to(0.3, {
              opacity: 0
            }).start();
          }).start();
          App.scheduleMgr.scheduleOnce(function () {
            if (_this2 && _this2.node && _this2.node.parent) {
              App.battleMgr.recoveryDamageTips(_this2);
            }
          }, this, 0.91);
          return;

          // let tm = 1.0;
          // // this._time = tm;
          // let s = 0.4;
          // this.node.setScale(s, s, s);
          // this.node.setWorldPosition(this._pos.x, this._pos.y+100, this._pos.z);

          // tween(this.node)
          //     .to(tm / 2, { scale: v3(1, 1, 1) }, {easing: 'sineInOut'})
          //     .to(tm / 2, { scale: v3(0.2, 0.2, 0.2) }, {easing: 'sineInOut'})
          //     .start();

          // let x = Utils.GetRandomNum(20, 50) * (Math.random() > 0.5 ? 1 : -1);
          // const p0 = this.node.worldPosition.clone();
          // const p1 = p0.clone().add3f(x, 250, 0); // 水平速度为10，垂直速度为20
          // const p2 = p0.clone().add3f(x * 1.5, 0, 0);
          // // this.p0 = p0;
          // // this.p1 = p1;
          // // this.p2 = p2;
          // tween(this.node)
          //     .to(
          //         tm,
          //         { worldPosition: p2 },
          //         {
          //             onUpdate(target: Node, t) {
          //                 let pos = MathUtils.bessel2eLevel(t, p0, p1, p2);
          //                 target && (target.worldPosition = pos.copyAsVec3());
          //             }
          //         }
          //     )
          //     .start();
          // App.scheduleMgr.scheduleOnce(
          //     () => {
          //         if (this && this.node.parent) {
          //             App.battleMgr.recoveryDamageTips(this);
          //         }
          //     },
          //     this,
          //     tm
          // );
        }
        // private _time:number = 0;
        // private _curTime:number = 0;

        // private p0;
        // private p1;
        // private p2;
        // protected update(dt: number): void {
        //     if (this._time > 0) {
        //         this._curTime += dt;
        //         if (this._curTime >= this._time) {
        //             this._curTime = 0;
        //             this._time = 0;
        //             App.battleMgr.recoveryDamageTips(this);
        //         } else {
        //             let t = this._curTime / this._time;
        //             if (t < 0.5) {
        //                 let s = 1 - t * 2;
        //                 this.node.setScale(s, s, s);
        //             } else {
        //                 let s = t * 2 - 1;
        //                 this.node.setScale(s, s, s);
        //             }
        //             let x = Utils.GetRandomNum(20, 50) * (Math.random() > 0.5 ? 1 : -1);
        //             let pos = MathUtils.bessel2eLevel(t, this.p0, this.p1, this.p2);
        //             this.node.worldPosition = pos.copyAsVec3();
        //         }
        //     }

        // }
        ;

        _createClass(DamageTips, [{
          key: "uid",
          get: function get() {
            return this._uid;
          },
          set: function set(v) {
            this._uid = v;
          }
        }]);
        return DamageTips;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "lab_num", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/DBRecord.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "4e1f67QIUFIV4FYtdIUXqeL", "DBRecord", undefined);
      var DBRecord = exports('default', /*#__PURE__*/function () {
        function DBRecord() {}
        // Fetch a record by ID
        DBRecord.fetchId = function fetchId(name, id) {
          var cfg = DBRecord._getRes(name);
          return cfg ? cfg[id] : null;
        }

        // Fetch the value of a field by ID
        ;

        DBRecord.fetchKey = function fetchKey(name, id, key) {
          var r = DBRecord.fetchId(name, id);
          return r ? r[key] : undefined;
        }

        // Fetch all records that match the given key-value pairs
        ;

        DBRecord.fetchKvs = function fetchKvs(name, kvs) {
          var ret = [];
          var cfg = DBRecord._getRes(name);
          if (!cfg) {
            return ret;
          }
          var ids = Object.keys(cfg);
          for (var _i = 0, _ids = ids; _i < _ids.length; _i++) {
            var id = _ids[_i];
            var ok = true;
            for (var k in kvs) {
              ok = ok && cfg[id][k] === kvs[k];
            }
            if (ok) {
              ret.push(cfg[id]);
            }
          }
          return ret;
        }

        // Fetch a record where the specified key-values match and are less than or equal to the provided values
        ;

        DBRecord.fetchKvCfg = function fetchKvCfg(name, kvs) {
          var cfg = DBRecord._getRes(name);
          if (!cfg) {
            return [];
          }
          var index = 0;
          for (var _key in cfg) {
            for (var k in kvs) {
              if (cfg[_key][k] > kvs[k]) {
                return cfg[index];
              } else if (cfg[_key][k] === kvs[k]) {
                return cfg[_key];
              } else {
                index++;
              }
            }
          }
        }

        // Fetch all records
        ;

        DBRecord.fetchAll = function fetchAll(name) {
          var ret = [];
          var cfg = DBRecord._getRes(name);
          if (!cfg) {
            return ret;
          }
          var ids = Object.keys(cfg);
          for (var _i2 = 0, _ids2 = ids; _i2 < _ids2.length; _i2++) {
            var id = _ids2[_i2];
            ret.push(cfg[id]);
          }
          return ret;
        }

        // Fetch all IDs
        ;

        DBRecord.fetchIds = function fetchIds(name) {
          var ret = [];
          var cfg = DBRecord.data[name];
          if (!cfg) {
            return ret;
          }
          var ids = Object.keys(cfg);
          return ids;
        }

        // Fetch resources
        ;

        DBRecord._getRes = function _getRes(name) {
          if (DBRecord.data[name]) {
            return DBRecord.data[name];
          } else {
            return null;
          }
        }

        /**
         * 获取物品配置
         * @param id
         * @returns
         */;
        DBRecord.getItemConfig = function getItemConfig(id) {
          var tableName;
          if (id >= 300000 && id <= 390000) {
            tableName = "FuShiDaoJu";
          } else if (id >= 500000) {
            tableName = "ZhuangBei";
          } else {
            tableName = "DaoJu";
          }
          var cfg = DBRecord.fetchId(tableName, id);
          return cfg;
        };
        return DBRecord;
      }());
      DBRecord.data = {};
      DBRecord.jsonNameData = {};
      DBRecord.requests = {};
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/DBRecordTypes.ts", ['cc'], function () {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "d972cRvxyNJQYeDTH7fqq6/", "DBRecordTypes", undefined);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/debug-view-runtime-control.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Color, Canvas, UITransform, instantiate, Label, RichText, Toggle, Button, director, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Color = module.Color;
      Canvas = module.Canvas;
      UITransform = module.UITransform;
      instantiate = module.instantiate;
      Label = module.Label;
      RichText = module.RichText;
      Toggle = module.Toggle;
      Button = module.Button;
      director = module.director;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "b2bd1+njXxJxaFY3ymm06WU", "debug-view-runtime-control", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var DebugViewRuntimeControl = exports('DebugViewRuntimeControl', (_dec = ccclass('internal.DebugViewRuntimeControl'), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(DebugViewRuntimeControl, _Component);
        function DebugViewRuntimeControl() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "compositeModeToggle", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "singleModeToggle", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "EnableAllCompositeModeButton", _descriptor3, _assertThisInitialized(_this));
          _this._single = 0;
          _this.strSingle = ['No Single Debug', 'Vertex Color', 'Vertex Normal', 'Vertex Tangent', 'World Position', 'Vertex Mirror', 'Face Side', 'UV0', 'UV1', 'UV Lightmap', 'Project Depth', 'Linear Depth', 'Fragment Normal', 'Fragment Tangent', 'Fragment Binormal', 'Base Color', 'Diffuse Color', 'Specular Color', 'Transparency', 'Metallic', 'Roughness', 'Specular Intensity', 'IOR', 'Direct Diffuse', 'Direct Specular', 'Direct All', 'Env Diffuse', 'Env Specular', 'Env All', 'Emissive', 'Light Map', 'Shadow', 'AO', 'Fresnel', 'Direct Transmit Diffuse', 'Direct Transmit Specular', 'Env Transmit Diffuse', 'Env Transmit Specular', 'Transmit All', 'Direct Internal Specular', 'Env Internal Specular', 'Internal All', 'Fog'];
          _this.strComposite = ['Direct Diffuse', 'Direct Specular', 'Env Diffuse', 'Env Specular', 'Emissive', 'Light Map', 'Shadow', 'AO', 'Normal Map', 'Fog', 'Tone Mapping', 'Gamma Correction', 'Fresnel', 'Transmit Diffuse', 'Transmit Specular', 'Internal Specular', 'TT'];
          _this.strMisc = ['CSM Layer Coloration', 'Lighting With Albedo'];
          _this.compositeModeToggleList = [];
          _this.singleModeToggleList = [];
          _this.miscModeToggleList = [];
          _this.textComponentList = [];
          _this.labelComponentList = [];
          _this.textContentList = [];
          _this.hideButtonLabel = void 0;
          _this._currentColorIndex = 0;
          _this.strColor = ['<color=#ffffff>', '<color=#000000>', '<color=#ff0000>', '<color=#00ff00>', '<color=#0000ff>'];
          _this.color = [Color.WHITE, Color.BLACK, Color.RED, Color.GREEN, Color.BLUE];
          return _this;
        }
        var _proto = DebugViewRuntimeControl.prototype;
        _proto.start = function start() {
          // get canvas resolution
          var canvas = this.node.parent.getComponent(Canvas);
          if (!canvas) {
            console.error('debug-view-runtime-control should be child of Canvas');
            return;
          }
          var uiTransform = this.node.parent.getComponent(UITransform);
          var halfScreenWidth = uiTransform.width * 0.5;
          var halfScreenHeight = uiTransform.height * 0.5;
          var x = -halfScreenWidth + halfScreenWidth * 0.1,
            y = halfScreenHeight - halfScreenHeight * 0.1;
          var width = 200,
            height = 20;

          // new nodes
          var miscNode = this.node.getChildByName('MiscMode');
          var buttonNode = instantiate(miscNode);
          buttonNode.parent = this.node;
          buttonNode.name = 'Buttons';
          var titleNode = instantiate(miscNode);
          titleNode.parent = this.node;
          titleNode.name = 'Titles';

          // title
          for (var i = 0; i < 2; i++) {
            var newLabel = instantiate(this.EnableAllCompositeModeButton.getChildByName('Label'));
            newLabel.setPosition(x + (i > 0 ? 50 + width * 2 : 150), y, 0.0);
            newLabel.setScale(0.75, 0.75, 0.75);
            newLabel.parent = titleNode;
            var _labelComponent = newLabel.getComponent(Label);
            _labelComponent.string = i ? '----------Composite Mode----------' : '----------Single Mode----------';
            _labelComponent.color = Color.WHITE;
            _labelComponent.overflow = 0;
            this.labelComponentList[this.labelComponentList.length] = _labelComponent;
          }
          y -= height;
          // single
          var currentRow = 0;
          for (var _i = 0; _i < this.strSingle.length; _i++, currentRow++) {
            if (_i === this.strSingle.length >> 1) {
              x += width;
              currentRow = 0;
            }
            var newNode = _i ? instantiate(this.singleModeToggle) : this.singleModeToggle;
            newNode.setPosition(x, y - height * currentRow, 0.0);
            newNode.setScale(0.5, 0.5, 0.5);
            newNode.parent = this.singleModeToggle.parent;
            var textComponent = newNode.getComponentInChildren(RichText);
            textComponent.string = this.strSingle[_i];
            this.textComponentList[this.textComponentList.length] = textComponent;
            this.textContentList[this.textContentList.length] = textComponent.string;
            newNode.on(Toggle.EventType.TOGGLE, this.toggleSingleMode, this);
            this.singleModeToggleList[_i] = newNode;
          }
          x += width;
          // buttons
          this.EnableAllCompositeModeButton.setPosition(x + 15, y, 0.0);
          this.EnableAllCompositeModeButton.setScale(0.5, 0.5, 0.5);
          this.EnableAllCompositeModeButton.on(Button.EventType.CLICK, this.enableAllCompositeMode, this);
          this.EnableAllCompositeModeButton.parent = buttonNode;
          var labelComponent = this.EnableAllCompositeModeButton.getComponentInChildren(Label);
          this.labelComponentList[this.labelComponentList.length] = labelComponent;
          var changeColorButton = instantiate(this.EnableAllCompositeModeButton);
          changeColorButton.setPosition(x + 90, y, 0.0);
          changeColorButton.setScale(0.5, 0.5, 0.5);
          changeColorButton.on(Button.EventType.CLICK, this.changeTextColor, this);
          changeColorButton.parent = buttonNode;
          labelComponent = changeColorButton.getComponentInChildren(Label);
          labelComponent.string = 'TextColor';
          this.labelComponentList[this.labelComponentList.length] = labelComponent;
          var HideButton = instantiate(this.EnableAllCompositeModeButton);
          HideButton.setPosition(x + 200, y, 0.0);
          HideButton.setScale(0.5, 0.5, 0.5);
          HideButton.on(Button.EventType.CLICK, this.hideUI, this);
          HideButton.parent = this.node.parent;
          labelComponent = HideButton.getComponentInChildren(Label);
          labelComponent.string = 'Hide UI';
          this.labelComponentList[this.labelComponentList.length] = labelComponent;
          this.hideButtonLabel = labelComponent;

          // misc
          y -= 40;
          for (var _i2 = 0; _i2 < this.strMisc.length; _i2++) {
            var _newNode = instantiate(this.compositeModeToggle);
            _newNode.setPosition(x, y - height * _i2, 0.0);
            _newNode.setScale(0.5, 0.5, 0.5);
            _newNode.parent = miscNode;
            var _textComponent = _newNode.getComponentInChildren(RichText);
            _textComponent.string = this.strMisc[_i2];
            this.textComponentList[this.textComponentList.length] = _textComponent;
            this.textContentList[this.textContentList.length] = _textComponent.string;
            var toggleComponent = _newNode.getComponent(Toggle);
            toggleComponent.isChecked = _i2 ? true : false;
            _newNode.on(Toggle.EventType.TOGGLE, _i2 ? this.toggleLightingWithAlbedo : this.toggleCSMColoration, this);
            this.miscModeToggleList[_i2] = _newNode;
          }

          // composite
          y -= 150;
          for (var _i3 = 0; _i3 < this.strComposite.length; _i3++) {
            var _newNode2 = _i3 ? instantiate(this.compositeModeToggle) : this.compositeModeToggle;
            _newNode2.setPosition(x, y - height * _i3, 0.0);
            _newNode2.setScale(0.5, 0.5, 0.5);
            _newNode2.parent = this.compositeModeToggle.parent;
            var _textComponent2 = _newNode2.getComponentInChildren(RichText);
            _textComponent2.string = this.strComposite[_i3];
            this.textComponentList[this.textComponentList.length] = _textComponent2;
            this.textContentList[this.textContentList.length] = _textComponent2.string;
            _newNode2.on(Toggle.EventType.TOGGLE, this.toggleCompositeMode, this);
            this.compositeModeToggleList[_i3] = _newNode2;
          }
        };
        _proto.isTextMatched = function isTextMatched(textUI, textDescription) {
          var tempText = new String(textUI);
          var findIndex = tempText.search('>');
          if (findIndex === -1) {
            return textUI === textDescription;
          } else {
            tempText = tempText.substr(findIndex + 1);
            tempText = tempText.substr(0, tempText.search('<'));
            return tempText === textDescription;
          }
        };
        _proto.toggleSingleMode = function toggleSingleMode(toggle) {
          var debugView = director.root.debugView;
          var textComponent = toggle.getComponentInChildren(RichText);
          for (var i = 0; i < this.strSingle.length; i++) {
            if (this.isTextMatched(textComponent.string, this.strSingle[i])) {
              debugView.singleMode = i;
            }
          }
        };
        _proto.toggleCompositeMode = function toggleCompositeMode(toggle) {
          var debugView = director.root.debugView;
          var textComponent = toggle.getComponentInChildren(RichText);
          for (var i = 0; i < this.strComposite.length; i++) {
            if (this.isTextMatched(textComponent.string, this.strComposite[i])) {
              debugView.enableCompositeMode(i, toggle.isChecked);
            }
          }
        };
        _proto.toggleLightingWithAlbedo = function toggleLightingWithAlbedo(toggle) {
          var debugView = director.root.debugView;
          debugView.lightingWithAlbedo = toggle.isChecked;
        };
        _proto.toggleCSMColoration = function toggleCSMColoration(toggle) {
          var debugView = director.root.debugView;
          debugView.csmLayerColoration = toggle.isChecked;
        };
        _proto.enableAllCompositeMode = function enableAllCompositeMode(button) {
          var debugView = director.root.debugView;
          debugView.enableAllCompositeMode(true);
          for (var i = 0; i < this.compositeModeToggleList.length; i++) {
            var _toggleComponent = this.compositeModeToggleList[i].getComponent(Toggle);
            _toggleComponent.isChecked = true;
          }
          var toggleComponent = this.miscModeToggleList[0].getComponent(Toggle);
          toggleComponent.isChecked = false;
          debugView.csmLayerColoration = false;
          toggleComponent = this.miscModeToggleList[1].getComponent(Toggle);
          toggleComponent.isChecked = true;
          debugView.lightingWithAlbedo = true;
        };
        _proto.hideUI = function hideUI(button) {
          var titleNode = this.node.getChildByName('Titles');
          var activeValue = !titleNode.active;
          this.singleModeToggleList[0].parent.active = activeValue;
          this.miscModeToggleList[0].parent.active = activeValue;
          this.compositeModeToggleList[0].parent.active = activeValue;
          this.EnableAllCompositeModeButton.parent.active = activeValue;
          titleNode.active = activeValue;
          this.hideButtonLabel.string = activeValue ? 'Hide UI' : 'Show UI';
        };
        _proto.changeTextColor = function changeTextColor(button) {
          this._currentColorIndex++;
          if (this._currentColorIndex >= this.strColor.length) {
            this._currentColorIndex = 0;
          }
          for (var i = 0; i < this.textComponentList.length; i++) {
            this.textComponentList[i].string = this.strColor[this._currentColorIndex] + this.textContentList[i] + '</color>';
          }
          for (var _i4 = 0; _i4 < this.labelComponentList.length; _i4++) {
            this.labelComponentList[_i4].color = this.color[this._currentColorIndex];
          }
        };
        _proto.onLoad = function onLoad() {};
        _proto.update = function update(deltaTime) {};
        return DebugViewRuntimeControl;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "compositeModeToggle", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "singleModeToggle", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "EnableAllCompositeModeButton", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/deviceTopPx.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, CCBoolean, Widget, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCBoolean = module.CCBoolean;
      Widget = module.Widget;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "d44abBOkDJPa65MJZURS3/m", "deviceTopPx", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var deviceTopPx = exports('deviceTopPx', (_dec = ccclass("deviceTopPx"), _dec2 = property(CCBoolean), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(deviceTopPx, _Component);
        function deviceTopPx() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this._deviceTopPx = 0;
          _initializerDefineProperty(_this, "isFixWx", _descriptor, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = deviceTopPx.prototype;
        _proto.onLoad = function onLoad() {
          if (!this._deviceTopPx) {
            this._deviceTopPx = 0;
            if (this.isFixWx) this._deviceTopPx += 35;
            var widgGet = this.node.getComponent(Widget);
            if (widgGet && widgGet.isAlignTop) widgGet.top += this._deviceTopPx;else this.node.y -= this._deviceTopPx;
            var mask = this.node.getChildByName("mask") || this.node.getChildByName("nodeBg");
            if (mask && mask.getComponent(Widget)) mask.getComponent(Widget).top = -this._deviceTopPx;
          }
        };
        return deviceTopPx;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "isFixWx", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return false;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/DiBiao.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameMgr.ts', './App.ts', './PlaceGameEnum.ts', './DiBiaoModel.ts', './MonitorType.ts', './EventType.ts', './PlaceConfigMgr.ts', './Utils.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, BuildingBase, PlaceGameMgr, App, BuildingStatus, BuildingType, DiBiaoModel, MonitorType, EventType, PlaceConfigMgr, Utils;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BuildingStatus = module.BuildingStatus;
      BuildingType = module.BuildingType;
    }, function (module) {
      DiBiaoModel = module.DiBiaoModel;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "5c9f3hIiyBG7KZpKfuL2S02", "DiBiao", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var DiBiao = exports('DiBiao', (_dec = ccclass("DiBiao"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "建筑进度条",
        tooltip: "建筑进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "建造时间",
        tooltip: "建造时间"
      }), _dec6 = property(Node), _dec7 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec8 = property({
        type: Label,
        displayName: "升级时间",
        tooltip: "升级时间"
      }), _dec9 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(DiBiao, _BuildingBase);
        function DiBiao() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jiaImg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildProgress", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildTimeLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "timeLab", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor8, _assertThisInitialized(_this));
          /**
           * 地标数据模型
           */
          _this._dataModel = null;
          /**
           * 建造定时器
           */
          _this._buildTimer = null;
          /**
           * 升级定时器
           */
          _this._upgradeTimer = null;
          return _this;
        }
        var _proto = DiBiao.prototype;
        /**
         * 组件激活时调用
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopBuildTimer();
          this.stopUpgradeTimer();
          this.unscheduleAllCallbacks();
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.getBuildType());
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.getBuildType(), targetLevel);
          this.lvUpImg.active = flag;
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopBuildTimer();
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 启动建造倒计时
         */;
        _proto.startBuildTimer = function startBuildTimer() {
          var _this2 = this;
          if (this.dataModel.status !== BuildingStatus.BUILDING) {
            this.buildProgress.node.active = false;
            return;
          }
          if (this._buildTimer) {
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("地标建筑已经达到最高级");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          if (remainTime <= 0) {
            this.buildProgress.node.active = false;
            return;
          }
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.buildProgress.node.active = true;
          this.jiaImg.active = false;
          this.buildProgress.progress = this.dataModel.getBuildProgress();
          if (this.buildTimeLab) {
            this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          }
          this._buildTimer = setInterval(function () {
            _this2.onBuildTimerUpdate();
          }, 1000);
        }

        /**
         * 启动升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this3 = this;
          if (!this.dataModel.isUpgrading) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("地标建筑已经达到最高级");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          if (remainTime <= 0) {
            this.stopUpgradeTimer();
            this.upgradeProgressBar.node.active = false;
            return;
          }
          if (this._upgradeTimer && Math.abs(this.dataModel.getRemainBuildTime() - remainTime) < 0.5) {
            return;
          }
          this.stopUpgradeTimer();
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.upgradeProgressBar.node.active = true;
          this.timeLab.string = Utils.timeFormat(totalTime);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this3.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopBuildTimer = function stopBuildTimer() {
          if (this._buildTimer) {
            clearInterval(this._buildTimer);
            this._buildTimer = null;
          }
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 建造计时器更新回调
         */;
        _proto.onBuildTimerUpdate = function onBuildTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.buildProgress.progress = this.dataModel.getBuildProgress();
            if (this.buildTimeLab) {
              this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
            }
          } else {
            this.stopBuildTimer();
          }
        }

        /**
         * 升级计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = this.dataModel.getBuildProgress();
            this.timeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          } else {
            this.stopUpgradeTimer();
          }
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (this.dataModel.status === BuildingStatus.LOCK) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.buildProgress.node.active = false;
            this.jiaImg.active = true;
            return;
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.jiaImg.active = false;
            this.buildProgress.node.active = true;
            this.startBuildTimer();
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateBuildImg();
          if (this.dataModel.isUpgrading) {
            this.startUpgradeTimer();
          } else {
            this.upgradeProgressBar.node.active = false;
          }
        }

        /**
         * 当建筑数据更新时调用
         * @param data
         * @returns
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.dataModel.status === BuildingStatus.LOCK) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.isUpgrading) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          }
        }

        //======================子类虚函数=====================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          App.log.logBusiness("\u5730\u6807\u5EFA\u7B51: \u521D\u59CB\u5316\u6570\u636E\u6A21\u578B - \u5E8F\u5217\u53F7: " + this.buildIndex);
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.DiBiao;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new DiBiaoModel(buildingIndex, buildingType, buildingUid, buildingLevel, this);
          this._dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            this._dataModel.status = BuildingStatus.IDLE;
          }
          if (!data) {
            return;
          }
          if (data.building_level !== oldLevel) {
            this.dataModel.level = data.building_level;
          }
          if (data.building_level <= 0 && data.upgrade_duration > 0) {
            this.dataModel.status = BuildingStatus.BUILDING;
            this.dataModel.isUpgrading = false;
          } else if (data.building_level > 0 && data.upgrade_duration > 0) {
            this.dataModel.isUpgrading = true;
          } else {
            this.dataModel.isUpgrading = false;
            this.dataModel.completeBuilding();
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        _createClass(DiBiao, [{
          key: "dataModel",
          get:
          /**
           * 获取当前等级
           */
          function get() {
            return this._dataModel;
          }
        }]);
        return DiBiao;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "jiaImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildProgress", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "buildTimeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/DiBiaoModel.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingModel.ts'], function (exports) {
  var _inheritsLoose, cclegacy, BuildingModel;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      BuildingModel = module.BuildingModel;
    }],
    execute: function () {
      cclegacy._RF.push({}, "ff63crwX2tJoZLU1FfH4s6+", "DiBiaoModel", undefined);
      /**
       * 地标建筑数据模型
       */
      var DiBiaoModel = exports('DiBiaoModel', /*#__PURE__*/function (_BuildingModel) {
        _inheritsLoose(DiBiaoModel, _BuildingModel);
        /**
         * 构造函数
         * @param buildingUid 建筑UID
         * @param type 建筑类型
         * @param buildingIndex 建筑序列号
         * @param level 初始等级
         */
        function DiBiaoModel(buildIndex, buildType, buildingUid, level, owner) {
          var _this;
          if (level === void 0) {
            level = 1;
          }
          _this = _BuildingModel.call(this, buildIndex, buildType, buildingUid, level, owner) || this;
          /**
           * 剩余建造时间
           */
          _this._remainingBuildTime = 0;
          /**
           * 总建造时间
           */
          _this._totalBuildTime = 0;
          return _this;
        }
        var _proto = DiBiaoModel.prototype;
        _proto.getRemainBuildTime = function getRemainBuildTime() {
          return this._remainingBuildTime;
        };
        _proto.getToTalBuildTime = function getToTalBuildTime() {
          return this._totalBuildTime;
        }

        /**
         * 开始建造升级
         * @param buildTime 建造时间（毫秒）
         * @param targetLevel 目标等级
         */;
        _proto.startBuildingUpgrade = function startBuildingUpgrade(buildTime, totalTime) {
          this._remainingBuildTime = buildTime;
          this._totalBuildTime = totalTime;
        }

        /**
         * 减少剩余建造时间
         * @param milliseconds 减少的毫秒数
         * @returns 剩余建造时间
         */;
        _proto.decreaseBuildTime = function decreaseBuildTime(milliseconds) {
          this._remainingBuildTime = Math.max(0, this._remainingBuildTime - milliseconds);
          return this._remainingBuildTime;
        }

        /**
         * 获取建造进度
         * @returns 进度值 (0-1)
         */;
        _proto.getBuildProgress = function getBuildProgress() {
          if (this._totalBuildTime <= 0) return 0;
          return Math.max(0, (this._totalBuildTime - this._remainingBuildTime) / this._totalBuildTime);
        }

        /**
         * 完成建造，执行升级
         */;
        _proto.completeBuilding = function completeBuilding() {
          this._remainingBuildTime = 0;
          this._totalBuildTime = 0;
        };
        return DiBiaoModel;
      }(BuildingModel));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/DungeonBattleMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Hero.ts', './Soldier.ts', './App.ts', './BattleProprMgr.ts', './MoraleSystem.ts', './MonsterSpawnMgr.ts', './SoldierSpawnMgr.ts', './AutoBattleMgr.ts', './Singleton.ts', './ModuleDef.ts', './BattleDefine.ts', './DBRecord.ts', './UIMgr.ts', './BattleMainView.ts', './uiGameLoading.ts', './Item_BattleMap.ts', './MonitorType.ts', './ui_Victory.ts', './Layout_uiVictory.ts', './ui_Defeat.ts', './Layout_uiDefeat.ts', './TeamMgr.ts', './NetChannelMgr.ts', './UIUtil.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, Vec3, Layout, Hero, Soldier, App, BattlePropertyName, MoraleSystem, MonsterSpawnMgr, SoldierSpawnMgr, AutoBattleMgr, Singleton, ModuleDef, GameBattle, DBRecord, UIMgr, LayerType, BattleMainView, uiGameLoading, Item_BattleMap, MonitorType, ModType, ui_Victory, Layout_uiVictory, ui_Defeat, Layout_uiDefeat, TeamMgr, netChannel, UIUtil;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
      Layout = module.Layout;
    }, function (module) {
      Hero = module.Hero;
    }, function (module) {
      Soldier = module.Soldier;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      MoraleSystem = module.MoraleSystem;
    }, function (module) {
      MonsterSpawnMgr = module.MonsterSpawnMgr;
    }, function (module) {
      SoldierSpawnMgr = module.SoldierSpawnMgr;
    }, function (module) {
      AutoBattleMgr = module.AutoBattleMgr;
    }, function (module) {
      Singleton = module.Singleton;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      BattleMainView = module.BattleMainView;
    }, function (module) {
      uiGameLoading = module.uiGameLoading;
    }, function (module) {
      Item_BattleMap = module.Item_BattleMap;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      ui_Victory = module.ui_Victory;
    }, function (module) {
      Layout_uiVictory = module.Layout_uiVictory;
    }, function (module) {
      ui_Defeat = module.ui_Defeat;
    }, function (module) {
      Layout_uiDefeat = module.Layout_uiDefeat;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      cclegacy._RF.push({}, "860740zN5JMHYYQaMgyW6Va", "DungeonBattleMgr", undefined);

      /**
       * 副本战斗管理器
       */
      var DungeonBattleMgr = exports('DungeonBattleMgr', /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(DungeonBattleMgr, _Singleton);
        function DungeonBattleMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          _this._showVictorying = void 0;
          _this._showFailureing = void 0;
          _this._resourceManager = null;
          // 组件引用
          _this._city = null;
          // 新增：城池防御组件
          _this._moraleSystem = null;
          // 新增：士气系统组件
          _this._monsterSpawnMgr = null;
          _this._soldierSpawnMgr = null;
          _this._autoBattleMgr = null;
          // 战斗状态
          _this._battleState = GameBattle.BattleState.None;
          // 副本ID
          _this._dungeonId = 0;
          // 副本类型
          _this._dungeonType = GameBattle.GuanQiaType.MainLine;
          // 战场中的敌方单位列表
          _this._activeEnemies = new Map();
          // 战斗奖励
          _this._battleRewards = [];
          _this._monsterDrops = [];
          _this._battleUnit = [];
          // 英雄杀怪信息（用于战斗心跳）hero_id -> {monster_id -> count}
          _this._heroKillMonsterInfo = new Map();
          // 士兵杀怪信息（用于战斗心跳）soldier_uid -> {monster_id -> count}
          _this._soldierKillMonsterInfo = new Map();
          // 士兵UID到ID的映射（用于记录已死亡士兵的ID）soldier_uid -> soldier_id
          _this._soldierUidToIdMap = new Map();
          // 待恢复的士兵杀怪信息（继续战斗时使用）soldier_id -> kill_monster_info[]
          _this._pendingSoldierKillInfo = new Map();
          // 杀怪信息（全局统计，用于统计和日志）
          _this._killMonsterInfo = new Map();
          // 战斗心跳定时器
          _this._battleHeartTimer = 0;
          _this._battleHeartInterval = 15;
          // 15秒发送一次心跳
          // 城池耐久度
          _this._cityDurability = 100;
          // 最大城池耐久度
          _this._maxCityDurability = 1000;
          // 士气值
          _this._morale = 0;
          // 军令数量
          _this._militaryOrders = 0;
          /**
           * 待命英雄
           */
          _this._onStandbyHeros = new Map();
          /**
           * 已部署的英雄
           */
          _this._deployedHeroes = new Map();
          // 已部署的士兵
          _this._deployedSoldiers = new Map();
          // 激活的兵种
          _this._activatedSoldierTypes = new Set();
          // 各兵种的当前人口
          _this._soldierPopulation = new Map();
          // 各兵种的人口上限
          _this._soldierPopulationLimit = new Map();
          // 各兵种的刷新CD
          _this._soldierRefreshCD = new Map();
          // 战斗内士兵数据（soldier_id -> {level, stage, activated}）
          _this._battleSoldierData = new Map();
          // 后端推送的副本信息
          _this._pushDungeonInfo = null;
          // 后端推送的士兵信息（用于恢复战斗状态）
          _this._pushSoldierInfo = [];
          // 战斗结果
          _this._battleResult = GameBattle.BattleResult.None;
          // 是否开启自动战斗
          _this._autoBattleEnabled = false;
          _this._battleMainViewCtrl = void 0;
          /** 下一波过场暂停 */
          _this._waveStop = false;
          return _this;
        }
        DungeonBattleMgr.getInstance = function getInstance() {
          if (!this._instance) {
            this._instance = new DungeonBattleMgr();
          }
          return this._instance;
        };
        var _proto = DungeonBattleMgr.prototype;
        /**
         * 获取全局杀怪统计信息
         * @returns 杀怪信息数组 [{monster_id, count}, ...]
         */
        _proto.getGlobalKillMonsterStats = function getGlobalKillMonsterStats() {
          var stats = [];
          for (var _iterator = _createForOfIteratorHelperLoose(this._killMonsterInfo), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              monsterId = _step$value[0],
              count = _step$value[1];
            stats.push({
              monster_id: monsterId,
              count: count
            });
          }
          return stats;
        };
        /**
         * 初始化副本战斗（新增）
         */
        _proto.initBattle = function initBattle(config) {
          // 重置状态
          this._dungeonId = config.dungeonId;
          this._dungeonType = config.dungeonType || GameBattle.GuanQiaType.MainLine;
          this._cityDurability = config.cityDurability || 100;
          this._maxCityDurability = this._cityDurability;
          this._morale = config.initialMorale || 0;
          this._militaryOrders = config.militaryOrders || 0;
          this._battleResult = GameBattle.BattleResult.None;
          this._battleState = GameBattle.BattleState.Preparing;
          this._resourceManager = App.resourceManager;
          this._waveStop = false;
          this._showFailureing = false;

          // 清空数据
          this._deployedHeroes.clear();
          this._onStandbyHeros.clear();
          this._deployedSoldiers.clear();
          this._activatedSoldierTypes.clear();
          this._soldierPopulation.clear();
          this._soldierPopulationLimit.clear();
          this._soldierRefreshCD.clear();
          this._battleSoldierData.clear();
          this._activeEnemies.clear();
          this._battleRewards = [];
          this._monsterDrops = [];
          this._killMonsterInfo.clear();
          this._heroKillMonsterInfo.clear();
          this._soldierKillMonsterInfo.clear();
          this._soldierUidToIdMap.clear();
          this._pendingSoldierKillInfo.clear();
          this._battleUnit = [];
          this._resourceManager.clearAllResources();
          this.initPool();
          App.battleMgr.roleCtrl.onEnter();

          // 初始化战斗内士兵数据（从编队获取）
          this.initBattleSoldierData(config.soldiers);

          // 注册战斗内协议监听
          this.initEventLister();

          // 默认激活步兵
          this._activatedSoldierTypes.add(GameBattle.SoldierType.Infantry);

          // 初始化组件
          this.initComponents(config);

          // 初始化英雄
          if (config.heroes) {
            this.initHeroes(config.heroes);
          }

          // 如果是继续战斗，恢复战斗状态
          if (config.continueFromWave !== undefined && config.continueFromWave > 0) {
            this.restoreBattleState(config.continueFromWave, config.pushUnits || []);
          }
          App.log.logBusiness("Battle initialized for dungeon " + this._dungeonId + ", type: " + this._dungeonType);
          this.startBattle();
        };
        _proto.initEventLister = function initEventLister() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBattleUpStage, this.onResBattleUpStage, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBattleHeart, this.onResBattleHeart, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBattleSettle, this.onBattleSettle, this);
          // App.monitorMgr.addEventListener(MonitorType.CMD_ResEnterDungeon, this.onEnterDungeon, this);
        };

        _proto.removeEventLister = function removeEventLister() {
          App.monitorMgr.removeEventListener(MonitorType.CMD_ResBattleUpStage, this.onResBattleUpStage, this);
          App.monitorMgr.removeEventListener(MonitorType.CMD_ResBattleHeart, this.onResBattleHeart, this);
          App.monitorMgr.removeEventListener(MonitorType.CMD_ResBattleSettle, this.onBattleSettle, this);
          // App.monitorMgr.removeEventListener(MonitorType.CMD_ResEnterDungeon, this.onEnterDungeon, this);
        }

        /**
         * 初始化组件（新增）
         */;
        _proto.initComponents = function initComponents(config) {
          var _config$spawnConfigs,
            _this2 = this;
          // 初始化城池
          this._city = this._battleMainViewCtrl.battleCity;
          this._city.init({
            maxHp: this._maxCityDurability,
            onBattleEnd: this.onBattleEnd.bind(this)
          });

          // 初始化士气系统
          this._moraleSystem = new MoraleSystem();
          this._moraleSystem.init({
            initialMorale: 0,
            onUpgrade: this.onSoldierUpgraded.bind(this),
            onActivate: this.onSoldierActivated.bind(this)
          });

          // 初始化怪物刷新管理器（新增）
          // 即使 spawnConfigs 为空，也要初始化管理器（继续战斗时需要）
          var hasSpawnConfigs = config.spawnConfigs && config.spawnConfigs.length > 0;
          App.log.logBusiness("\u521D\u59CB\u5316\u602A\u7269\u5237\u65B0\u7BA1\u7406\u5668\uFF1AhasSpawnConfigs=" + hasSpawnConfigs + ", configsLength=" + (((_config$spawnConfigs = config.spawnConfigs) == null ? void 0 : _config$spawnConfigs.length) || 0));
          if (hasSpawnConfigs) {
            this._monsterSpawnMgr = new MonsterSpawnMgr();
            this._monsterSpawnMgr.init({
              spawnConfigs: config.spawnConfigs,
              createMonsterCallback: this.createMonster.bind(this),
              allMonstersKilledCallback: this.onAllMonstersKilled.bind(this),
              bossSpawnedCallback: this.onBossSpawned.bind(this),
              waveStartCallback: this.onWaveStart.bind(this)
            });
            App.log.logBusiness("\u602A\u7269\u5237\u65B0\u7BA1\u7406\u5668\u521D\u59CB\u5316\u6210\u529F\uFF0C\u914D\u7F6E\u6570\u91CF\uFF1A" + config.spawnConfigs.length);
          } else {
            // 如果没有配置，也创建一个空的管理器（用于继续战斗）
            this._monsterSpawnMgr = new MonsterSpawnMgr();
            this._monsterSpawnMgr.init({
              spawnConfigs: [],
              createMonsterCallback: this.createMonster.bind(this),
              allMonstersKilledCallback: this.onAllMonstersKilled.bind(this),
              bossSpawnedCallback: this.onBossSpawned.bind(this),
              waveStartCallback: this.onWaveStart.bind(this)
            });
            App.log.logBusiness("\u602A\u7269\u5237\u65B0\u7BA1\u7406\u5668\u521D\u59CB\u5316\u6210\u529F\uFF08\u7A7A\u914D\u7F6E\uFF09");
          }

          // 初始化士兵生成管理器（新增）
          this._soldierSpawnMgr = new SoldierSpawnMgr();
          if (this._pushDungeonInfo && this._pushDungeonInfo.soldiers) {
            var soldiers = this._pushDungeonInfo.soldiers;
            if (soldiers) {
              for (var i = 0; i < soldiers.length; i++) {
                this._activatedSoldierTypes.add(soldiers[i].soldier_id);
                this._moraleSystem.activateSoldierType(soldiers[i].soldier_id);
              }
            }
          }
          // 初始化各兵种的人口上限和刷新CD
          config.soldiers.forEach(function (element) {
            if (element && element.id) {
              var soldierType = element.id;
              var _TeamMgr$inst$getSold = TeamMgr.inst.getSoldierBattle(soldierType),
                _cd = _TeamMgr$inst$getSold[0],
                _menbernum = _TeamMgr$inst$getSold[1],
                _population = _TeamMgr$inst$getSold[2];
              _this2._soldierPopulation.set(soldierType, 0);
              _this2._soldierPopulationLimit.set(soldierType, _population); // 默认上限10
              _this2._soldierRefreshCD.set(soldierType, _cd);
              _this2._deployedSoldiers.set(soldierType, []);
              var soldierInfo = TeamMgr.inst.getSoldierById(element.id);
              var sldConfig = {
                soldierType: soldierType,
                baseSpawnCount: _menbernum,
                spawnCd: _cd,
                maxPopulation: _population,
                initialLevel: soldierInfo.level,
                armyTokenCost: 1
              };
              _this2._soldierSpawnMgr.setSoldierConfig(soldierType, sldConfig);
            }
          });
          this._soldierSpawnMgr.init({
            moraleSystem: this._moraleSystem,
            createSoldierCallback: this.createSoldier.bind(this),
            checkArmyTokenCallback: this.checkArmyToken.bind(this),
            consumeArmyTokenCallback: this.consumeArmyToken.bind(this)
          });
          AutoBattleMgr.inst.init();

          // 注册士气变化回调
          // this._moraleSystem.onMoraleChange = (newMorale: number) => {
          //     // 通知UI更新士气
          //     if (globalThis.EventManager) {
          //         globalThis.EventManager.dispatch("MORALE_CHANGED", newMorale);
          //     }
          // };

          App.log.logBusiness("\u7EC4\u4EF6\u521D\u59CB\u5316\u5B8C\u6210");
        };
        _proto.initPool = function initPool() {
          // App.mapMgr.clearMap();
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Monster], {
            preloadCount: 5,
            maxSize: 50,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Hero], {
            preloadCount: 3,
            maxSize: 5,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Soldier], {
            preloadCount: 10,
            maxSize: 50,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.DamageTips, {
            preloadCount: 10,
            maxSize: 300,
            autoExpand: true
          });
          // 为MeleeBullet单独设置更高的预加载数量
          var meleeBulletPath = GameBattle.BulletPrefabPath[GameBattle.BulletType.Melee];
          if (meleeBulletPath) {
            App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, meleeBulletPath, {
              preloadCount: 30,
              // 增加预加载数量
              maxSize: 100,
              // 增加最大容量
              autoExpand: true
            });
          }

          // 为其他子弹类型设置默认预加载数量
          for (var _key2 in GameBattle.BulletPrefabPath) {
            var path = GameBattle.BulletPrefabPath[_key2];
            // 跳过已经单独设置的MeleeBullet
            if (path !== meleeBulletPath) {
              App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, path, {
                preloadCount: 20,
                maxSize: 50,
                autoExpand: true
              });
            }
          }

          // this._battleMainViewCtrl.battleMap.init();
        }

        /**
         * 初始化英雄（新增）
         */;
        _proto.initHeroes = function initHeroes(heroConfigs) {
          var _this3 = this;
          var index = 0;
          heroConfigs.forEach(function (config) {
            if (config.id && config.id > 0) {
              index++;
              var heroInfo = TeamMgr.inst.getHeroById(config.id);
              // 创建英雄
              var hero = App.battleMgr.roleCtrl.createHero({
                heroId: heroInfo.hero_id,
                level: heroInfo.level,
                stage: heroInfo.stage,
                star: heroInfo.star,
                // 默认在城池位置待命
                position: new Vec3(0, 0, 0),
                parent: _this3._city.positionHero(index)
              });
              if (hero) {
                hero.citySlotIndex = index;
                // 设置死亡回调
                hero.onDeadCallback = function (uid) {
                  return _this3.handleHeroDead(uid);
                };
                hero.isUsable = false;
                // 添加到已部署英雄列表（待命状态）
                _this3._onStandbyHeros.set(hero.uid, hero);

                // 添加到自动战斗管理器（新增）
                if (_this3._autoBattleMgr) {
                  _this3._autoBattleMgr.addAvailableHero(hero);
                }
              }
            }
          });
          this._city.initHeroHeads();
        }

        /**
         * 初始化战斗内士兵数据
         * 所有士兵初始为1级1阶，只有第一个位置的士兵激活
         * 如果有推送的士兵信息，则使用推送的阶级
         */;
        _proto.initBattleSoldierData = function initBattleSoldierData(soldiers) {
          var _this4 = this;
          if (!soldiers || soldiers.length === 0) {
            return;
          }
          soldiers.forEach(function (soldier, index) {
            if (soldier && soldier.id) {
              // 查找推送的士兵信息
              var stage = 1;
              var activated = index === 0; // 只有第一个位置激活

              if (_this4._pushSoldierInfo && _this4._pushSoldierInfo.length > 0) {
                var pushSoldier = _this4._pushSoldierInfo.find(function (s) {
                  return s.soldier_id === soldier.id;
                });
                if (pushSoldier) {
                  stage = pushSoldier.stage || 1;
                  // 如果推送的阶级大于0，说明已激活
                  activated = stage > 0;
                }
              }
              _this4._battleSoldierData.set(soldier.id, {
                level: 1,
                stage: stage,
                activated: activated
              });
              if (activated) {
                _this4._activatedSoldierTypes.add(soldier.id);
              }
            }
          });
          App.log.logBusiness("\u6218\u6597\u5185\u58EB\u5175\u6570\u636E\u521D\u59CB\u5316\u5B8C\u6210\uFF0C\u5171" + this._battleSoldierData.size + "\u4E2A\u58EB\u5175");
        }

        /**
         * 获取战斗内士兵数据
         */;
        _proto.getBattleSoldierData = function getBattleSoldierData(soldierId) {
          return this._battleSoldierData.get(soldierId) || null;
        }

        /**
         * 战斗内士兵升阶
         */;
        _proto.battleSoldierUpStage = function battleSoldierUpStage(soldierId, newStage) {
          var data = this._battleSoldierData.get(soldierId);
          if (data) {
            data.stage = newStage;
            data.activated = true; // 升阶后自动激活
            App.log.logBusiness("\u6218\u6597\u5185\u58EB\u5175\u5347\u9636\u6210\u529F: soldier_id=" + soldierId + ", stage=" + newStage);
            this.soldierSpawnMgr.activateSoldierType(soldierId);
          }
          // this.soldierSpawnMgr.activateSoldierType(soldierId);
        }

        /**
         * 请求战斗内士兵升阶
         */;
        _proto.reqBattleUpStage = function reqBattleUpStage(soldierId) {
          var obj = {
            dungeon_id: this._dungeonId,
            soldier_id: soldierId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqBattleUpStage, obj);
          App.log.logBusiness("\u53D1\u9001\u6218\u6597\u5185\u58EB\u5175\u5347\u9636\u8BF7\u6C42: dungeon_id=" + this._dungeonId + ", soldier_id=" + soldierId);
        }

        /**
         * 战斗内士兵升阶响应
         */;
        _proto.onResBattleUpStage = function onResBattleUpStage(data) {
          if (data && data.code === 200) {
            // 更新战斗内士兵数据
            this.battleSoldierUpStage(data.soldier_id, data.stage);
            App.log.logBusiness("\u6218\u6597\u5185\u58EB\u5175\u5347\u9636\u6210\u529F: soldier_id=" + data.soldier_id + ", stage=" + data.stage);
          } else {
            console.error("\u6218\u6597\u5185\u58EB\u5175\u5347\u9636\u5931\u8D25: code=" + (data == null ? void 0 : data.code));
          }
        }

        /**
         * 部署英雄（新增）
         */;
        _proto.deployHero = function deployHero(heroId, lane) {
          var hero = this._onStandbyHeros.get(heroId);
          if (!hero || hero.isWaiting === false || hero.isDead) {
            return false;
          }
          this._onStandbyHeros["delete"](heroId);
          // 计算部署位置
          var position = this.calculateDeployPosition(lane);

          // 部署英雄
          hero.deployToLane(lane, position);
          hero.isUsable = true;
          this.battleMainViewCtrl.showSpineWarning("hero", hero.heroId);
          this._deployedHeroes.set(hero.uid, hero);

          // 添加到自动战斗管理器（新增）
          if (this._autoBattleMgr) {
            this._autoBattleMgr.onHeroEnterBattle(hero);
          }

          // 通知UI英雄部署
          if (globalThis.EventManager) {
            globalThis.EventManager.dispatch("HERO_DEPLOYED", hero);
          }
          return true;
        }

        /**
         * 召回英雄（新增）
         */;
        _proto.recallHero = function recallHero(heroId) {
          var hero = this._deployedHeroes.get(heroId);
          if (!hero || hero.isWaiting === true) {
            return false;
          }
          this._deployedHeroes["delete"](heroId);
          this._onStandbyHeros.set(heroId, hero);
          this._city.parkHeroAtCity(hero);

          // 从自动战斗管理器移除（新增）
          if (this._autoBattleMgr) {
            this._autoBattleMgr.onHeroLeaveBattle(heroId);
          }

          // 通知UI英雄召回
          if (globalThis.EventManager) {
            globalThis.EventManager.dispatch("HERO_RECALLED", hero);
          }
          return true;
        }

        /**
         * 处理英雄死亡（新增）
         */;
        _proto.handleHeroDead = function handleHeroDead(heroId) {
          App.monitorMgr.dispatchEvent(MonitorType.battle_hero_dead, heroId);

          // 从自动战斗管理器移除（新增）
          if (this._autoBattleMgr) {
            this._autoBattleMgr.onHeroLeaveBattle(heroId);
          }
        }

        /**
         * 消耗军令立即刷新士兵
         */;
        _proto.refreshSoldierWithOrder = function refreshSoldierWithOrder(soldierType, lane) {
          // 检查是否激活该兵种
          if (!this._activatedSoldierTypes.has(soldierType)) {
            UIUtil.showTip(soldierType + " \u5175\u79CD\u672A\u6FC0\u6D3B");
            return false;
          }

          // 检查军令是否足够
          if (this._militaryOrders <= 0) {
            UIUtil.showTip(soldierType + " \u519B\u4EE4\u4E0D\u8DB3");
            return false;
          }
          var result = this.soldierSpawnMgr.spawnSoldier(soldierType, lane, true);
          if (!result) {
            return false;
          }
          UIUtil.showTip("\u6D88\u8017\u519B\u4EE4\u5237\u65B0\u58EB\u5175\u6210\u529F");
          // 消耗军令
          this._militaryOrders--;
          // 通知UI消耗军令刷新士兵
          App.monitorMgr.dispatchEvent(MonitorType.battle_player_use_junling, this._militaryOrders);
          return true;
        }

        /**
         * 激活兵种
         */;
        _proto.activateSoldierType = function activateSoldierType(soldierType, moraleCost) {
          // 检查是否已激活
          if (this._activatedSoldierTypes.has(soldierType)) {
            App.log.logBusiness("\u58EB\u5175\u7C7B\u578B" + soldierType + "\u5DF2\u6FC0\u6D3B");
            return false;
          }
          if (this._morale < moraleCost) {
            App.log.logBusiness("\u58EB\u6C14\u4E0D\u8DB3\uFF0C\u9700\u8981" + moraleCost + "\uFF0C\u5F53\u524D" + this._morale);
            return false;
          }

          // 消耗士气
          this._morale -= moraleCost;
          this._activatedSoldierTypes.add(soldierType);

          // 设置人口上限
          var maxPopulation = 10; // 可以从士气系统获取
          this._soldierPopulationLimit.set(soldierType, maxPopulation);

          // 初始化人口计数
          this._soldierPopulation.set(soldierType, 0);

          // 初始化刷新CD
          this._soldierRefreshCD.set(soldierType, 0);
          App.log.logBusiness("\u58EB\u5175\u7C7B\u578B" + soldierType + "\u6FC0\u6D3B\u6210\u529F\uFF0C\u4EBA\u53E3\u4E0A\u9650" + maxPopulation);
          return true;
        }

        /**
         * 升级兵种
         */;
        _proto.upgradeSoldierType = function upgradeSoldierType(soldierType, level, moraleCost) {
          if (!this._activatedSoldierTypes.has(soldierType)) {
            App.log.logBusiness("\u58EB\u5175\u7C7B\u578B" + soldierType + "\u672A\u6FC0\u6D3B");
            return false;
          }
          if (level >= 3) {
            // 假设最高3级
            App.log.logBusiness("\u58EB\u5175\u7C7B\u578B" + soldierType + "\u5DF2\u8FBE\u6700\u9AD8\u7B49\u7EA7");
            return false;
          }
          if (this._morale < moraleCost) {
            App.log.logBusiness("\u58EB\u6C14\u4E0D\u8DB3\uFF0C\u9700\u8981" + moraleCost + "\uFF0C\u5F53\u524D" + this._morale);
            return false;
          }

          // 消耗士气
          this._morale -= moraleCost;

          // 更新该兵种的基础等级
          var newLevel = level + 1;

          // 更新人口上限
          var currentLimit = this._soldierPopulationLimit.get(soldierType) || 10;
          var maxPopulation = currentLimit + 5; // 每级增加5个单位上限
          this._soldierPopulationLimit.set(soldierType, maxPopulation);
          App.log.logBusiness("\u58EB\u5175\u7C7B\u578B" + soldierType + "\u5347\u7EA7\u6210\u529F\uFF0C\u5F53\u524D\u7B49\u7EA7" + newLevel + "\uFF0C\u4EBA\u53E3\u4E0A\u9650" + maxPopulation);

          // 应用升级效果到现有士兵
          this.applySoldierUpgradedEffect(soldierType, newLevel);
          return true;
        }

        /**
         * 应用士兵升级效果
         */;
        _proto.applySoldierUpgradedEffect = function applySoldierUpgradedEffect(soldierType, _newLevel) {
          // 遍历所有兵线的士兵
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._deployedSoldiers.entries()), _step2; !(_step2 = _iterator2()).done;) {
            var _step2$value = _step2.value,
              _lane = _step2$value[0],
              soldiers = _step2$value[1];
            for (var _iterator3 = _createForOfIteratorHelperLoose(soldiers), _step3; !(_step3 = _iterator3()).done;) {
              var soldier = _step3.value;
              if (soldier.soldierType === soldierType && !soldier.isDead) {
                var roleVO = soldier.roleVO;

                // 获取当前属性值
                var currentAtk = roleVO.getRoleAttr(BattlePropertyName.gongji);
                var currentDef = roleVO.getRoleAttr(BattlePropertyName.fangyu);
                var currentMaxHP = roleVO.getRoleAttr(BattlePropertyName.shengming);

                // 计算属性提升值（增量）
                var atkBonus = Math.floor(currentAtk * 0.2); // 攻击提升20%
                var defBonus = Math.floor(currentDef * 0.15); // 防御提升15%
                var hpBonus = Math.floor(currentMaxHP * 0.25); // 生命提升25%

                // 使用buff系统添加永久属性加成
                var upgradeEffectId = 999900 + soldierType; // 使用唯一ID标识升级效果
                var attrBonus = {};
                attrBonus[BattlePropertyName.gongji] = atkBonus;
                attrBonus[BattlePropertyName.fangyu] = defBonus;
                attrBonus[BattlePropertyName.shengming] = hpBonus;

                // 先移除旧的升级效果（如果存在）
                roleVO.delEffcAttr(upgradeEffectId);

                // 添加新的升级效果
                roleVO.addEffcAttr(upgradeEffectId, attrBonus);

                // 补满生命
                var newMaxHP = roleVO.getRoleAttr(BattlePropertyName.shengming);
                roleVO.updateCurHP(newMaxHP, true);
              }
            }
          }
        }

        /**
         * 增加士气值
         */;
        _proto.addMorale = function addMorale(value) {
          this._morale = Math.max(0, Math.min(this._morale + value, 1000)); // 假设最大士气为1000
          if (this._moraleSystem) {
            this._moraleSystem.currentMorale = this._morale;
          }
          App.monitorMgr.dispatchEvent(MonitorType.battle_monster_dead_update_morale, this._morale);
        }

        /**
         * 城池被攻击（新增）
         */;
        _proto.cityAttacked = function cityAttacked(damage) {
          this._cityDurability = Math.max(0, this._cityDurability - damage);

          // 更新UI显示
          // TODO: 触发城池被攻击的特效

          // 检查是否失败
          if (this._cityDurability <= 0) {
            this._battleResult = GameBattle.BattleResult.Defeat;
            this.onBattleEnd();
          }
        }

        /**
         * 检查战斗胜利（新增）
         */;
        _proto.checkBattleVictory = function checkBattleVictory() {
          // 检查是否所有敌人都被消灭且所有波次都已刷新
          if (this.isVictoryConditionMet()) {
            this._battleResult = GameBattle.BattleResult.Victory;
            this.onBattleEnd();
          }
        }

        /**
         * 检查是否满足胜利条件（仅检查，不执行结束逻辑）
         */;
        _proto.isVictoryConditionMet = function isVictoryConditionMet() {
          // 检查是否所有敌人都被消灭且所有波次都已刷新
          return this._activeEnemies.size === 0 && this._monsterSpawnMgr && this._monsterSpawnMgr.allWavesSpawned;
        }

        /**
         * 计算部署位置
         */;
        _proto.calculateDeployPosition = function calculateDeployPosition(lane) {
          // TODO: 根据兵线计算具体的部署位置
          var position = GameBattle.HeroPoints.get(lane);
          if (position) {
            return position;
          }
          return new Vec3(0, 0, 0);
        }

        /**
         * 获取城池位置
         */;
        _proto.getCityPosition = function getCityPosition(lane) {
          // TODO: 根据兵线获取城池上的位置
          var position = GameBattle.HeroPoints.get(lane);
          if (position) {
            return position;
          }
          return new Vec3(0, 0, 0);
        }

        /**
         * 找到敌军最多的兵线
         */;
        _proto.findLaneWithMostEnemies = function findLaneWithMostEnemies() {
          // 统计各兵线的敌人数量
          var laneEnemyCount = new Map();
          laneEnemyCount.set(GameBattle.LanePosition.Left, 0);
          laneEnemyCount.set(GameBattle.LanePosition.Middle, 0);
          laneEnemyCount.set(GameBattle.LanePosition.Right, 0);

          // 遍历所有敌人，统计每条兵线的敌人数量
          this._activeEnemies.forEach(function (enemy) {
            if (!enemy.isDead && enemy.curLane !== undefined) {
              var currentCount = laneEnemyCount.get(enemy.curLane) || 0;
              laneEnemyCount.set(enemy.curLane, currentCount + 1);
            }
          });

          // 找出敌人最多的兵线
          var maxCount = -1;
          var targetLane = GameBattle.LanePosition.Middle; // 默认中间

          laneEnemyCount.forEach(function (count, lane) {
            if (count > maxCount) {
              maxCount = count;
              targetLane = lane;
            }
          });

          // 如果所有兵线都没有敌人，随机选择一条
          if (maxCount === 0) {
            var lanes = [GameBattle.LanePosition.Left, GameBattle.LanePosition.Middle, GameBattle.LanePosition.Right];
            return lanes[Math.floor(Math.random() * lanes.length)];
          }
          return targetLane;
        }

        /**
         * 恢复战斗状态（继续战斗时使用）
         * @param waveIndex 当前波数
         * @param pushUnits 推送的单位杀怪信息
         */;
        _proto.restoreBattleState = function restoreBattleState(waveIndex, pushUnits) {
          App.log.logBusiness("========== \u5F00\u59CB\u6062\u590D\u6218\u6597\u72B6\u6001 ==========");
          App.log.logBusiness("\u6CE2\u6570=" + waveIndex + ", \u5355\u4F4D\u6570=" + pushUnits.length);
          App.log.logBusiness("_monsterSpawnMgr\u662F\u5426\u5B58\u5728\uFF1A" + (this._monsterSpawnMgr !== null && this._monsterSpawnMgr !== undefined));

          // 1. 恢复英雄和士兵的血量（填满）
          for (var _iterator4 = _createForOfIteratorHelperLoose(this._onStandbyHeros), _step4; !(_step4 = _iterator4()).done;) {
            var _step4$value = _step4.value,
              hero = _step4$value[1];
            if (hero && hero.roleVO) {
              var maxHp = hero.roleVO.getRoleAttr(BattlePropertyName.shengming);
              hero.roleVO.updateCurHP(maxHp, true);
              App.log.logBusiness("\u6062\u590D\u82F1\u96C4\u8840\u91CF\uFF1AheroId=" + hero.heroId + ", hp=" + maxHp);
            }
          }

          // 2. 恢复杀怪信息
          for (var _iterator5 = _createForOfIteratorHelperLoose(pushUnits), _step5; !(_step5 = _iterator5()).done;) {
            var unit = _step5.value;
            if (unit.type === 1) {
              // 英雄杀怪信息
              var heroId = unit.id;
              if (!this._heroKillMonsterInfo.has(heroId)) {
                this._heroKillMonsterInfo.set(heroId, new Map());
              }
              var heroKills = this._heroKillMonsterInfo.get(heroId);
              if (unit.kill_monster_info) {
                for (var _iterator6 = _createForOfIteratorHelperLoose(unit.kill_monster_info), _step6; !(_step6 = _iterator6()).done;) {
                  var killInfo = _step6.value;
                  heroKills.set(killInfo.monster_id, killInfo.count);

                  // 同时更新全局杀怪信息
                  var globalCount = this._killMonsterInfo.get(killInfo.monster_id) || 0;
                  this._killMonsterInfo.set(killInfo.monster_id, globalCount + killInfo.count);
                  App.log.logBusiness("\u6062\u590D\u82F1\u96C4\u6740\u602A\uFF1AheroId=" + heroId + ", monsterId=" + killInfo.monster_id + ", count=" + killInfo.count);
                }
              }
            } else if (unit.type === 2) {
              // 士兵杀怪信息
              // 注意：这里的 unit.id 是 soldier_id，但我们需要 soldier_uid
              // 由于士兵还未创建，我们需要在士兵创建时匹配并恢复
              // 暂时保存到一个临时映射中
              if (!this._pendingSoldierKillInfo) {
                this._pendingSoldierKillInfo = new Map();
              }
              if (unit.kill_monster_info) {
                this._pendingSoldierKillInfo.set(unit.id, unit.kill_monster_info);
                App.log.logBusiness("\u4FDD\u5B58\u5F85\u6062\u590D\u7684\u58EB\u5175\u6740\u602A\u4FE1\u606F\uFF1AsoldierId=" + unit.id + ", kills=" + unit.kill_monster_info.length);
              }
            }
          }

          // 3. 设置怪物刷新管理器从指定波数继续
          if (this._monsterSpawnMgr) {
            this._monsterSpawnMgr.setCurrentWave(waveIndex);
            App.log.logBusiness("\u8BBE\u7F6E\u602A\u7269\u5237\u65B0\u7BA1\u7406\u5668\u6CE2\u6570\uFF1A" + waveIndex);
          } else {
            App.log.logError("\u6062\u590D\u6218\u6597\u72B6\u6001\u5931\u8D25\uFF1A_monsterSpawnMgr \u672A\u521D\u59CB\u5316\uFF01\u6CE2\u6570=" + waveIndex);
          }
        }

        /**
         * 开始战斗（新增）
         */;
        _proto.startBattle = function startBattle() {
          var _this5 = this;
          this._battleState = GameBattle.BattleState.Battling;
          App.log.logBusiness("[DungeonBattleMgr] 准备开始战斗");

          // 延迟0.1秒开始战斗，确保UI已经初始化完成
          if (this._battleMainViewCtrl) {
            this._battleMainViewCtrl.scheduleOnce(function () {
              App.log.logBusiness("[DungeonBattleMgr] 开始战斗刷怪");

              // 检查UI是否准备好
              if (_this5._battleMainViewCtrl && _this5._battleMainViewCtrl.battleUIView) {
                App.log.logBusiness("[DungeonBattleMgr] BattleUIView已准备好");
              } else {
                App.log.logError("[DungeonBattleMgr] BattleUIView未准备好！");
              }

              // 开始战斗
              if (_this5._monsterSpawnMgr) {
                _this5._monsterSpawnMgr.startBattle();
              }
            }, 0.1);
          } else {
            // 如果没有battleMainViewCtrl，直接开始
            App.log.logError("[DungeonBattleMgr] battleMainViewCtrl未设置，直接开始战斗");
            if (this._monsterSpawnMgr) {
              this._monsterSpawnMgr.startBattle();
            }
          }
        }

        /**
         * 战斗结束（新增）
         */;
        _proto.onBattleEnd = function onBattleEnd() {
          if (this._battleState === GameBattle.BattleState.Ended) {
            return;
          }
          this._battleState = GameBattle.BattleState.Ended;
          App.log.logBusiness("\u6218\u6597\u7ED3\u675F\uFF0C\u7ED3\u679C: " + (this._battleResult === GameBattle.BattleResult.Victory ? "胜利" : "失败"));

          // 停止所有战斗相关的逻辑
          if (this._monsterSpawnMgr) {
            this._monsterSpawnMgr.stopBattle();
          }

          // 关闭自动战斗
          if (this._autoBattleMgr) {
            this._autoBattleMgr.disableAutoBattle();
          }

          // 发送战斗结果
          this.reqBattleSettle(this._dungeonId, this._battleResult);
        }
        /**
         * 显示胜利结算画面
         */;
        _proto.showVictory = /*#__PURE__*/
        function () {
          var _showVictory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var items;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _context.prev = 0;
                  if (!this._showVictorying) {
                    _context.next = 4;
                    break;
                  }
                  console.warn("胜利界面正在显示中,跳过...");
                  return _context.abrupt("return");
                case 4:
                  if (!UIMgr.inst.getUiNode("uiPromptWarn")) {
                    _context.next = 7;
                    break;
                  }
                  console.warn("提示警告界面正在显示,跳过显示胜利界面");
                  return _context.abrupt("return");
                case 7:
                  this._showVictorying = true;
                  items = this._monsterDrops;
                  _context.next = 11;
                  return UIMgr.inst.openOnce(ui_Victory, LayerType.panel, Layout_uiVictory, [items]);
                case 11:
                  _context.next = 17;
                  break;
                case 13:
                  _context.prev = 13;
                  _context.t0 = _context["catch"](0);
                  console.error("Error in showVictory:", _context.t0);
                  this._showVictorying = false;
                case 17:
                case "end":
                  return _context.stop();
              }
            }, _callee, this, [[0, 13]]);
          }));
          function showVictory() {
            return _showVictory.apply(this, arguments);
          }
          return showVictory;
        }()
        /**
         * 显示失败结算画面
         */;

        _proto.showFailure = /*#__PURE__*/
        function () {
          var _showFailure = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  _context2.prev = 0;
                  if (!this._showFailureing) {
                    _context2.next = 4;
                    break;
                  }
                  console.warn("失败界面正在显示中,跳过...");
                  return _context2.abrupt("return");
                case 4:
                  if (!UIMgr.inst.getUiNode("uiPromptWarn")) {
                    _context2.next = 7;
                    break;
                  }
                  console.warn("提示警告界面正在显示,跳过显示失败界面");
                  return _context2.abrupt("return");
                case 7:
                  this._showFailureing = true;
                  _context2.next = 10;
                  return UIMgr.inst.openOnce(ui_Defeat, LayerType.panel, Layout_uiDefeat, [this._monsterDrops]);
                case 10:
                  _context2.next = 16;
                  break;
                case 12:
                  _context2.prev = 12;
                  _context2.t0 = _context2["catch"](0);
                  console.error("Error in showFailure:", _context2.t0);
                  this._showFailureing = false;
                case 16:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this, [[0, 12]]);
          }));
          function showFailure() {
            return _showFailure.apply(this, arguments);
          }
          return showFailure;
        }()
        /**
         * 创建怪物（新增）
         */;

        _proto.createMonster = function createMonster(config, position, uid) {
          // 创建怪物
          var monster = App.battleMgr.roleCtrl.createMonster({
            id: config.monsterId,
            position: position,
            uid: uid
          });
          if (monster) {
            // 设置UID
            // monster.uid = uid;

            // 设置品质
            // monster.quality = config.monsterQuality;

            // 设置死亡回调
            // monster.onDeadCallback = () => this.onMonsterDead(uid);

            // 如果是Boss，设置Boss标识
            // if (config.isBoss) {
            //     monster.isBoss = true;
            // }

            // 设置攻击目标为城池
            if (this._city && this._city.targetable) ;

            // 添加到活跃敌人列表
            this._activeEnemies.set(uid, monster);
          }
          return monster;
        }

        /**
         * 创建士兵（新增）
         */;
        _proto.createSoldier = function createSoldier(soldierType, lane, level) {
          var _this6 = this;
          // 创建士兵
          var soldier = App.battleMgr.roleCtrl.createSoldier({
            soldierType: soldierType,
            lane: lane,
            baseLevel: level,
            parent: this._battleMainViewCtrl.roleLayer
          });
          if (soldier) {
            // 记录士兵UID到ID的映射（用于死亡后仍能获取ID）
            this._soldierUidToIdMap.set(soldier.uid, soldier.roleVO.id);

            // 设置死亡回调
            soldier.onDeadCallback = function () {
              return _this6.onSoldierDead(soldier.uid, soldierType);
            };

            // 设置士兵所属兵线
            soldier.currentLane = lane;

            // 添加到对应兵线
            var soldiers = this._deployedSoldiers.get(lane) || [];
            soldiers.push(soldier);

            // 更新人口
            var currentPop = this._soldierPopulation.get(soldierType) || 0;
            this._soldierPopulation.set(soldierType, currentPop + soldier.getPopulationCost());

            // 恢复士兵的杀怪信息（如果有待恢复的数据）
            var soldierId = soldier.roleVO.id;
            if (this._pendingSoldierKillInfo && this._pendingSoldierKillInfo.has(soldierId)) {
              var killInfoList = this._pendingSoldierKillInfo.get(soldierId);
              if (!this._soldierKillMonsterInfo.has(soldier.uid)) {
                this._soldierKillMonsterInfo.set(soldier.uid, new Map());
              }
              var soldierKills = this._soldierKillMonsterInfo.get(soldier.uid);
              for (var _iterator7 = _createForOfIteratorHelperLoose(killInfoList), _step7; !(_step7 = _iterator7()).done;) {
                var killInfo = _step7.value;
                soldierKills.set(killInfo.monster_id, killInfo.count);
                App.log.logBusiness("\u6062\u590D\u58EB\u5175\u6740\u602A\uFF1AsoldierUid=" + soldier.uid + ", soldierId=" + soldierId + ", monsterId=" + killInfo.monster_id + ", count=" + killInfo.count);
              }

              // 恢复后从待恢复列表中移除
              this._pendingSoldierKillInfo["delete"](soldierId);
            }

            // 通知UI新士兵生成
            if (globalThis.EventManager) {
              globalThis.EventManager.dispatch("SOLDIER_SPAWNED", soldier);
            }
          }
          return soldier;
        }

        /**
         * 检查军令是否足够
         */;
        _proto.checkArmyToken = function checkArmyToken(cost) {
          return this._militaryOrders >= cost;
        }

        /**
         * 消耗军令
         */;
        _proto.consumeArmyToken = function consumeArmyToken(cost) {
          this._militaryOrders -= cost;
          App.log.logBusiness("Army token consumed: " + cost + ", Remaining: " + this._militaryOrders);
        }

        /**
         * 记录英雄杀怪信息
         * @param heroId 英雄ID
         * @param monsterId 怪物ID
         */;
        _proto.recordHeroKillMonster = function recordHeroKillMonster(heroId, monsterId) {
          if (!this._heroKillMonsterInfo.has(heroId)) {
            this._heroKillMonsterInfo.set(heroId, new Map());
          }
          var heroKills = this._heroKillMonsterInfo.get(heroId);
          var currentCount = heroKills.get(monsterId) || 0;
          heroKills.set(monsterId, currentCount + 1);

          // 同时更新全局杀怪信息
          var globalCount = this._killMonsterInfo.get(monsterId) || 0;
          this._killMonsterInfo.set(monsterId, globalCount + 1);
        }

        /**
         * 记录士兵杀怪信息
         * @param soldierId 士兵UID
         * @param monsterId 怪物ID
         */;
        _proto.recordSoldierKillMonster = function recordSoldierKillMonster(soldierId, monsterId) {
          if (!this._soldierKillMonsterInfo.has(soldierId)) {
            this._soldierKillMonsterInfo.set(soldierId, new Map());
          }
          var soldierKills = this._soldierKillMonsterInfo.get(soldierId);
          var currentCount = soldierKills.get(monsterId) || 0;
          soldierKills.set(monsterId, currentCount + 1);

          // 同时更新全局杀怪信息
          var globalCount = this._killMonsterInfo.get(monsterId) || 0;
          this._killMonsterInfo.set(monsterId, globalCount + 1);
        }

        /**
         * 处理怪物死亡（新增）
         */;
        _proto.handleMonsterDead = function handleMonsterDead(monsterUid, attrUser) {
          var monster = this._activeEnemies.get(monsterUid);
          if (monster) {
            // 移除活跃敌人
            this._activeEnemies["delete"](monsterUid);
            var attrMorale = 0;
            // 记录杀怪信息（用于战斗心跳）
            var monsterId = monster.roleVO.id;
            if (monsterId && attrUser) {
              // 根据攻击者类型记录杀怪信息
              if (attrUser instanceof Hero) {
                // 英雄杀怪
                var heroId = attrUser.heroId;
                this.recordHeroKillMonster(heroId, monsterId);
                var heroCfg = TeamMgr.inst.getHeroStageCfg(attrUser.heroId, attrUser.roleVO._stage);
                attrMorale = heroCfg.shiqi;
              } else if (attrUser instanceof Soldier) {
                // 士兵杀怪
                var soldierId = attrUser.roleVO.id;
                App.log.logBusiness("soldierUid " + soldierId + " killed.");
                this.recordSoldierKillMonster(soldierId, monsterId);
                var soldierCfg = TeamMgr.inst.getSoldierStageCfg(attrUser.roleVO.id, attrUser.roleVO.baseStage);
                attrMorale = soldierCfg.shiqi;
              }
            }

            // 通知怪物刷新管理器
            if (this._monsterSpawnMgr) {
              this._monsterSpawnMgr.onMonsterKilled(monsterUid);
            }

            // 增加士气值（根据怪物等级和品质）
            var moraleReward = this.calculateMoraleReward(monster) + attrMorale;
            this.addMorale(moraleReward);

            // 处理掉落
            this.handleMonsterDrop(monster);

            // 通知UI怪物被消灭
            if (globalThis.EventManager) {
              globalThis.EventManager.dispatch("MONSTER_KILLED", monster);
            }
            if (monster.node && monster.node.isValid) {
              monster.node.removeFromParent();
            }
            App.log.logBusiness("Monster " + monsterUid + " killed. Morale reward: " + moraleReward);
          }

          // 更新自动战斗管理器的怪物列表（新增）
          if (this._autoBattleMgr) {
            this._autoBattleMgr.updateActiveMonsters(Array.from(this._activeEnemies.values()));
          }

          // 检查战斗胜利
          this.checkBattleVictory();
        }

        /**
         * 士兵死亡处理
         */;
        _proto.onSoldierDead = function onSoldierDead(soldierUid, soldierType) {
          // 更新人口
          var currentPop = this._soldierPopulation.get(soldierType) || 0;
          var soldier = new Soldier();
          soldier.initSoldierData(soldierType, 1, 1);
          this._soldierPopulation.set(soldierType, Math.max(0, currentPop - soldier.getPopulationCost()));

          // 从兵线列表中移除
          for (var _iterator8 = _createForOfIteratorHelperLoose(this._deployedSoldiers.entries()), _step8; !(_step8 = _iterator8()).done;) {
            var _step8$value = _step8.value,
              _lane = _step8$value[0],
              soldiers = _step8$value[1];
            var index = soldiers.findIndex(function (s) {
              return s.uid === soldierUid;
            });
            if (index > -1) {
              soldiers.splice(index, 1);
              break;
            }
          }
        }

        /**
         * 所有怪物被消灭
         */;
        _proto.onAllMonstersKilled = function onAllMonstersKilled() {
          App.log.logBusiness("All monsters killed! Battle victory!");
          this._battleResult = GameBattle.BattleResult.Victory;
          this.onBattleEnd();
        }

        /**
         * Boss出现
         */;
        _proto.onBossSpawned = function onBossSpawned(monster) {
          App.log.logBusiness("Boss spawned: " + monster.uid);
          // TODO: 显示Boss出现的特效和提示
          this.battleMainViewCtrl.showSpineWarning("monster");
        }

        /**
         * 波次开始回调
         * @param waveId 当前波次ID
         * @param totalWaves 总波次数
         * @param callback 倒计时结束后的回调
         */;
        _proto.onWaveStart = function onWaveStart(waveId, totalWaves, callback) {
          // 调用UI显示波次提示和倒计时
          if (this._battleMainViewCtrl && this._battleMainViewCtrl.battleUIView) {
            if (waveId > 1) {
              this.waveStop = true;
              var roleLayer = App.dungeonBattleMgr.battleMainViewCtrl.roleLayer;
              var childCount = roleLayer.children.length;
              for (var i = childCount - 1; i >= 0; i--) {
                var child = roleLayer.children[i];
                // 判断节点类型为 monster
                if (child.name && child.name.includes("Monster")) {
                  child.removeFromParent();
                  // 或用 destroy()，根据实际需要
                  // child.destroy();
                }
              }

              this._battleMainViewCtrl.battleUIView.showWaveLayer(waveId, totalWaves, callback);
              App.dungeonBattleMgr.reqBattleRewardInfo();
            } else {
              if (callback) {
                callback();
              }
            }
          } else {
            // 如果UI不可用，直接执行回调
            if (callback) {
              callback();
            }
          }
        }

        /**
         * 兵种激活回调
         */;
        _proto.onSoldierActivated = function onSoldierActivated(soldierType) {
          this._activatedSoldierTypes.add(soldierType);
          App.log.logBusiness("Soldier type " + soldierType + " activated");
          // TODO: 显示激活特效或提示
        }

        /**
         * 兵种升级回调
         */;
        _proto.onSoldierUpgraded = function onSoldierUpgraded(soldierType, level) {
          App.log.logBusiness("Soldier type " + soldierType + " upgraded to level " + level);

          // 如果达到5阶（觉醒），应用觉醒效果
          if (level === 5) {
            this.applySoldierAwakening(soldierType);
          }

          // TODO: 显示升级特效或提示
        }

        /**
         * 应用士兵觉醒效果
         */;
        _proto.applySoldierAwakening = function applySoldierAwakening(soldierType) {
          // 为当前战场上的该类型士兵应用觉醒效果
          for (var _iterator9 = _createForOfIteratorHelperLoose(this._deployedSoldiers.entries()), _step9; !(_step9 = _iterator9()).done;) {
            var _step9$value = _step9.value,
              _lane = _step9$value[0],
              soldiers = _step9$value[1];
            soldiers.forEach(function (soldier) {
              if (soldier.soldierType === soldierType) ;
            });
          }
        }

        /**
         * 计算士气奖励
         */;
        _proto.calculateMoraleReward = function calculateMoraleReward(monster) {
          var baseReward = monster.roleVO.morale;
          return baseReward;
        }

        /**
         * 处理怪物掉落
         */;
        _proto.handleMonsterDrop = function handleMonsterDrop(monster) {
          // TODO: 根据怪物配置获取掉落物品
          // 暂时模拟添加掉落
          var m_cfg = monster.roleVO.monsterCfg;
          if (m_cfg) {
            var drops = m_cfg.drop;
            if (drops) {
              for (var _iterator10 = _createForOfIteratorHelperLoose(drops), _step10; !(_step10 = _iterator10()).done;) {
                var drop = _step10.value;
                var gift_cfg = DBRecord.fetchId("Gift", drop);
                if (gift_cfg) {
                  this.handleOneGiftDrop(gift_cfg);
                }
              }
            }
          }
        };
        _proto.handleOneGiftDrop = function handleOneGiftDrop(gift_cfg) {
          var effectParameter = gift_cfg.effectParameter;
          var parameter = gift_cfg.parameter;
          if (effectParameter) {
            var index = 0;
            for (var _iterator11 = _createForOfIteratorHelperLoose(effectParameter), _step11; !(_step11 = _iterator11()).done;) {
              var effect = _step11.value;
              var gailv = parameter[index] / 10000;
              if (Math.random() < gailv) {
                var cfg = DBRecord.fetchId("Item", effect[0]);
                if (cfg) {
                  this.handleOneItemDrop(cfg, effect[1]);
                }
              }
              index++;
            }
          }
        };
        _proto.handleOneItemDrop = function handleOneItemDrop(item_cfg, count) {
          this._monsterDrops.push({
            itemid: item_cfg.id,
            num: count
          });
        }

        /**
         * 更新战斗逻辑（新增）
         */;
        _proto.update = function update(dt) {
          if (this._battleState !== GameBattle.BattleState.Battling) {
            return;
          }

          // 更新怪物刷新管理器（新增）
          if (this._monsterSpawnMgr) {
            this._monsterSpawnMgr.update(dt);
          }
          // 更新士兵生成管理器（新增）
          if (this._soldierSpawnMgr) {
            this._soldierSpawnMgr.update(dt);
          }

          // 更新战斗心跳定时器
          this._battleHeartTimer += dt;
          if (this._battleHeartTimer >= this._battleHeartInterval) {
            this.sendBattleHeart();
            this._battleHeartTimer = 0;
          }
        }

        /**
         * 构建杀怪信息列表
         * @param killMonsterMap 杀怪信息Map
         * @returns 杀怪信息数组
         */;
        _proto.buildKillMonsterList = function buildKillMonsterList(killMonsterMap) {
          var list = [];
          if (killMonsterMap && killMonsterMap.size > 0) {
            for (var _iterator12 = _createForOfIteratorHelperLoose(killMonsterMap), _step12; !(_step12 = _iterator12()).done;) {
              var _step12$value = _step12.value,
                monsterId = _step12$value[0],
                count = _step12$value[1];
              list.push({
                monster_id: monsterId,
                count: count
              });
            }
          }
          return list;
        }

        /**
         * 发送战斗心跳
         */;
        _proto.sendBattleHeart = function sendBattleHeart() {
          var _this$_monsterSpawnMg;
          // 构建BattleUnit列表
          this._battleUnit = [];
          for (var _iterator13 = _createForOfIteratorHelperLoose(this._heroKillMonsterInfo), _step13; !(_step13 = _iterator13()).done;) {
            var _step13$value = _step13.value,
              heroId = _step13$value[0],
              killMonsterMap = _step13$value[1];
            var killMonsterList = this.buildKillMonsterList(killMonsterMap);
            if (killMonsterList.length > 0) {
              this._battleUnit.push({
                id: heroId,
                type: 1,
                // 1 = 英雄
                kill_monster_info: killMonsterList
              });
            }
          }

          // 遍历所有士兵的杀怪信息（包括已死亡的士兵）
          for (var _iterator14 = _createForOfIteratorHelperLoose(this._soldierKillMonsterInfo), _step14; !(_step14 = _iterator14()).done;) {
            var _step14$value = _step14.value,
              soldierId = _step14$value[0],
              _killMonsterMap = _step14$value[1];
            var _killMonsterList = this.buildKillMonsterList(_killMonsterMap);
            if (_killMonsterList.length > 0) {
              this._battleUnit.push({
                id: soldierId,
                type: 2,
                // 2 = 士兵
                kill_monster_info: _killMonsterList
              });
            }
          }

          // 发送战斗心跳请求
          this.reqBattleHeart(this._dungeonId, ((_this$_monsterSpawnMg = this._monsterSpawnMgr) == null ? void 0 : _this$_monsterSpawnMg.currentWave) || 0, this._battleUnit);
        }
        /**
         * 请求进入副本
         * @param gdId 要挑战的副本ID
         */;
        _proto.ReqEnterDungeon = function ReqEnterDungeon(gdId) {
          var obj = {
            dungeon_id: gdId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqEnterDungeon, obj);
        }
        /**
         * 挑战副本
         * @param msg 挑战副本返回信息
         */;
        _proto.onEnterDungeon = /*#__PURE__*/
        function () {
          var _onEnterDungeon = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(msg) {
            var ui;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  if (!(msg && msg.code !== 200)) {
                    _context3.next = 2;
                    break;
                  }
                  return _context3.abrupt("return");
                case 2:
                  App.battleMgr._isInBattle = true;
                  App.battleMgr.challengeGuanQiaId = msg.dungeon_id;
                  _context3.next = 6;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 6:
                  ui = _context3.sent;
                  ui.setCloseByHand(true);
                  _context3.next = 10;
                  return Item_BattleMap.loadMapResource(msg.dungeon_id, ui.onProgress.bind(ui));
                case 10:
                  UIMgr.inst.closeAllPanel();
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout, [msg.dungeon_id], function () {
                    ui.onClose();
                    UIMgr.inst.closeAllPanel(["BattleMainView"]);
                  });
                case 12:
                case "end":
                  return _context3.stop();
              }
            }, _callee3);
          }));
          function onEnterDungeon(_x) {
            return _onEnterDungeon.apply(this, arguments);
          }
          return onEnterDungeon;
        }()
        /**
         * 请求战斗结算
         * @param dungeon_id 副本id
         */;

        _proto.reqBattleSettle = function reqBattleSettle(dungeon_id, result) {
          var obj = {
            dungeon_id: dungeon_id || this._dungeonId,
            result: result === GameBattle.BattleResult.None ? GameBattle.BattleResult.Defeat : result
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqBattleSettle, obj);
        }
        /**
         * 战斗结算
         * @param msg
         */;
        _proto.onBattleSettle = function onBattleSettle(msg) {
          if (msg && msg.code !== 200) {
            return;
          }
          this._battleState = GameBattle.BattleState.Ended;
          this._monsterDrops = msg.items;
          // TODO: 显示胜利/失败界面
          if (this._battleResult === GameBattle.BattleResult.Victory) {
            this.showVictory();
          } else {
            this.showFailure();
          }
        }
        /**
         * 请求战斗奖励信息
         * @param dungeon_id 副本id
         */;
        _proto.reqBattleRewardInfo = function reqBattleRewardInfo(dungeon_id) {
          var obj = {
            dungeon_id: dungeon_id || this._dungeonId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqBattleRewardInfo, obj);
        }

        /**
         * 保存后端推送的副本信息
         * @param dungeonInfo 副本信息
         */;
        _proto.setPushDungeonInfo = function setPushDungeonInfo(dungeonInfo) {
          this._pushDungeonInfo = dungeonInfo;
        }

        /**
         * 保存后端推送的士兵信息
         * @param soldierInfo 士兵信息列表
         */;
        _proto.setPushSoldierInfo = function setPushSoldierInfo(soldierInfo) {
          this._pushSoldierInfo = soldierInfo || [];
        }

        /**
         * 继续挑战副本（使用推送的副本信息）
         * @param dungeonId 副本ID
         */;
        _proto.continueChallengeDungeon = /*#__PURE__*/
        function () {
          var _continueChallengeDungeon = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dungeonId) {
            var ui;
            return _regeneratorRuntime().wrap(function _callee4$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  if (this._pushDungeonInfo) {
                    _context4.next = 3;
                    break;
                  }
                  App.log.logError("没有推送的副本信息");
                  return _context4.abrupt("return");
                case 3:
                  App.battleMgr._isInBattle = true;
                  App.battleMgr.challengeGuanQiaId = dungeonId;
                  this._morale = this._pushDungeonInfo.shiqi_val;
                  _context4.next = 8;
                  return UIMgr.inst.asyncOpen(uiGameLoading, LayerType.load);
                case 8:
                  ui = _context4.sent;
                  ui.setCloseByHand(true);

                  // 加载地图资源
                  _context4.next = 12;
                  return Item_BattleMap.loadMapResource(dungeonId, ui.onProgress.bind(ui));
                case 12:
                  UIMgr.inst.closeAllPanel();

                  // 使用推送的副本信息初始化战斗
                  UIMgr.inst.openOnce(BattleMainView, LayerType.main, Layout, [dungeonId, this._pushDungeonInfo], function () {
                    ui.onClose();
                    UIMgr.inst.closeAllPanel(["BattleMainView"]);
                  });
                case 14:
                case "end":
                  return _context4.stop();
              }
            }, _callee4, this);
          }));
          function continueChallengeDungeon(_x2) {
            return _continueChallengeDungeon.apply(this, arguments);
          }
          return continueChallengeDungeon;
        }()
        /**
         * 请求战斗心跳
         * @param dungeon_id 副本id
         * @param wave_times 波数
         * @param battle_units 战斗单位信息
         */;

        _proto.reqBattleHeart = function reqBattleHeart(dungeon_id, wave_times, battle_units) {
          var obj = {
            dungeon_id: dungeon_id,
            wave_times: wave_times,
            units: battle_units
          };
          var all_num = 0;
          battle_units.forEach(function (element) {
            all_num += element.kill_monster_info[0].count;
          });
          if (all_num <= 0) {
            return;
          }
          App.log.logBusiness("怪物总数量：" + all_num);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqBattleHeart, obj);
        }
        /**
         * 战斗心跳
         * @param msg 战斗心跳返回信息
         */;
        _proto.onResBattleHeart = function onResBattleHeart(msg) {
          if (msg && msg.code !== 200) {
            return;
          }
          this._battleState = GameBattle.BattleState.Battling;
          this._morale = msg.shiqi_val;
        }
        /**
         * 重新挑战副本
         */;
        _proto.reqReTry = function reqReTry() {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqReTry, {});
        }

        /**
         * 重置战斗（新增）
         */;
        _proto.reset = function reset() {
          this.removeEventLister();

          // 重置状态
          this._battleState = GameBattle.BattleState.None;
          this._dungeonId = 0;
          this._battleResult = GameBattle.BattleResult.None;
          this._showVictorying = false;
          this._pushDungeonInfo = null; // 清除推送的副本信息
          this._pushSoldierInfo = []; // 清除推送的士兵信息
          this._battleHeartTimer = 0; // 重置战斗心跳定时器

          // 清空数据
          this._deployedHeroes.clear();
          this._deployedSoldiers.clear();
          this._activatedSoldierTypes.clear();
          this._soldierPopulation.clear();
          this._soldierPopulationLimit.clear();
          this._soldierRefreshCD.clear();
          this._battleSoldierData.clear(); // 清除战斗内士兵数据
          this._activeEnemies.clear();
          this._battleRewards = [];
          this._monsterDrops = [];
          this._killMonsterInfo.clear(); // 清除杀怪信息
          this._heroKillMonsterInfo.clear(); // 清除英雄杀怪信息
          this._soldierKillMonsterInfo.clear(); // 清除士兵杀怪信息
          this._soldierUidToIdMap.clear(); // 清除士兵UID到ID的映射
          this._pendingSoldierKillInfo.clear(); // 清除待恢复的士兵杀怪信息
          this._battleUnit = []; // 清除战斗单位信息
          if (this._resourceManager) {
            this._resourceManager.clearAllResources();
            this._resourceManager = null;
          }

          // 重置组件
          this._city = null;
          this._moraleSystem = null;
          this._monsterSpawnMgr = null;
          this._soldierSpawnMgr = null;
          this._autoBattleMgr = null;
        };
        _proto.dispose = function dispose() {
          this.reset();
        };
        _createClass(DungeonBattleMgr, [{
          key: "resourceManager",
          get: function get() {
            return this._resourceManager;
          }
        }, {
          key: "monsterSpawnMgr",
          get:
          // 新增：怪物刷新管理器
          function get() {
            return this._monsterSpawnMgr;
          }
        }, {
          key: "soldierSpawnMgr",
          get:
          // 新增：士兵生成管理器
          function get() {
            return this._soldierSpawnMgr;
          }
        }, {
          key: "autoBattleMgr",
          get:
          // 新增：自动战斗管理器
          function get() {
            return this._autoBattleMgr;
          }
        }, {
          key: "currentMorale",
          get: function get() {
            return this._moraleSystem.currentMorale;
          }
        }, {
          key: "dungeonId",
          get: function get() {
            return this._dungeonId;
          }
        }, {
          key: "activeEnemies",
          get: function get() {
            return this._activeEnemies;
          }
        }, {
          key: "killMonsterInfo",
          get:
          // monster_id -> count
          function get() {
            return this._killMonsterInfo;
          }
        }, {
          key: "cityDurability",
          get: function get() {
            return this._cityDurability;
          }
        }, {
          key: "morale",
          get: function get() {
            return this._morale;
          }
        }, {
          key: "militaryOrders",
          get: function get() {
            return this._militaryOrders;
          }
        }, {
          key: "standbyHeros",
          get: function get() {
            return this._onStandbyHeros;
          }
        }, {
          key: "deployedHeroes",
          get: function get() {
            return this._deployedHeroes;
          }
        }, {
          key: "deployedSoldiers",
          get:
          // key: lanePosition
          function get() {
            return this._deployedSoldiers;
          }
        }, {
          key: "soldierPopulation",
          get: function get() {
            return this._soldierPopulation;
          }
        }, {
          key: "soldierPopulationLimit",
          get: function get() {
            return this._soldierPopulationLimit;
          }
        }, {
          key: "battleSoldierData",
          get: function get() {
            return this._battleSoldierData;
          }
        }, {
          key: "pushDungeonInfo",
          get: function get() {
            return this._pushDungeonInfo;
          }
        }, {
          key: "pushSoldierInfo",
          get: function get() {
            return this._pushSoldierInfo;
          }
        }, {
          key: "battleResult",
          get: function get() {
            return this._battleResult;
          }
        }, {
          key: "autoBattleEnabled",
          get: function get() {
            return this._autoBattleEnabled;
          },
          set: function set(value) {
            this._autoBattleEnabled = value;
          }
        }, {
          key: "battleMainViewCtrl",
          get: function get() {
            return this._battleMainViewCtrl;
          },
          set: function set(v) {
            this._battleMainViewCtrl = v;
          }
        }, {
          key: "dungeonType",
          get: function get() {
            return this._dungeonType;
          },
          set: function set(v) {
            this._dungeonType = v;
          }
        }, {
          key: "waveStop",
          get: function get() {
            return this._waveStop;
          },
          set: function set(v) {
            this._waveStop = v;
          }
        }, {
          key: "city",
          get: function get() {
            return this._city;
          }
        }]);
        return DungeonBattleMgr;
      }(Singleton()));
      // 单例实例
      DungeonBattleMgr._instance = null;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/EffectMgr.ts", ['cc', './CameraShake.ts', './MathUtils.ts', './BattleDefine.ts'], function (exports) {
  var cclegacy, tween, v3, v2, ShakeParam, CameraShake, MathUtils, GameBattle;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      tween = module.tween;
      v3 = module.v3;
      v2 = module.v2;
    }, function (module) {
      ShakeParam = module.ShakeParam;
      CameraShake = module.default;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      cclegacy._RF.push({}, "66d7a3iLuxJA5r0gJU162Ay", "EffectMgr", undefined);
      var EffectManager = exports('EffectManager', /*#__PURE__*/function () {
        function EffectManager() {}
        EffectManager.cameraStretch = function cameraStretch(camera, eventTime, orthoHeight, cb) {
          tween(camera).by(eventTime, {
            orthoHeight: -orthoHeight
          }, {
            easing: "cubicIn"
          }).delay(0.6).by(eventTime, {
            orthoHeight: orthoHeight
          }, {
            easing: "cubicOut"
          }).call(function () {
            cb == null || cb();
          }).start();
        };
        EffectManager.cameraStretchBig = function cameraStretchBig(camera, eventTime, orthoHeight, cb) {
          tween(camera).by(eventTime, {
            orthoHeight: -orthoHeight
          }, {
            easing: "cubicIn"
          }).delay(0.6).call(function () {
            cb == null || cb();
          }).start();
        };
        EffectManager.cameraStretchNormal = function cameraStretchNormal(camera, eventTime, orthoHeight, cb) {
          tween(camera).by(eventTime, {
            orthoHeight: orthoHeight
          }, {
            easing: "cubicOut"
          }).call(function () {
            cb == null || cb();
          }).start();
        };
        EffectManager.sharke = function sharke(bombShake) {
          if (!bombShake) {
            bombShake = new ShakeParam();
            bombShake.numberOfShakes = 4;
            bombShake.shakeAmount = v3(0.3, 1, 0);
            bombShake.distance = 10;
            bombShake.speed = 30;
            bombShake.decay = 0.6;
            bombShake.randomSign = true;
          }
          CameraShake.shake(bombShake);
        };
        EffectManager.flyTo = function flyTo(target, selfNode, cb, flyTime, offsetX, offsetY, scale) {
          if (offsetX === void 0) {
            offsetX = 100;
          }
          if (offsetY === void 0) {
            offsetY = 100;
          }
          if (scale === void 0) {
            scale = 1;
          }
          var ctrlPoint = v2(selfNode.worldPosition.x + offsetX * (selfNode.worldPosition.x > target.worldPosition.x ? 1 : -1), selfNode.worldPosition.y - offsetY);
          tween(selfNode).tag(GameBattle.BattleTweenTag).to(0.6, {
            scale: v3(scale, scale, scale)
          }, {
            easing: "quartIn",
            onUpdate: function onUpdate(_, ratio) {
              var pos = MathUtils.bessel2eLevel(ratio, selfNode.worldPosition, ctrlPoint, target.worldPosition);
              selfNode.setWorldPosition(pos.x, pos.y, 0);
            }
          }).call(function () {
            cb == null || cb();
          }).start();
        };
        return EffectManager;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/EffectNode.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './ModuleDef.ts', './BattleDefine.ts', './Item_BattleMap.ts', './SpineUtils.ts', './DBRecord.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, assetManager, SpriteAtlas, AnimationClip, Component, MonitorType, ModuleDef, GameBattle, DBRecord, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      assetManager = module.assetManager;
      SpriteAtlas = module.SpriteAtlas;
      AnimationClip = module.AnimationClip;
      Component = module.Component;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, null, null, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "1cf2ehfmstBt57upfVh0n1+", "EffectNode", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var EffectNode = exports('EffectNode', (_dec = ccclass("EffectNode"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(EffectNode, _Component);
        function EffectNode() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this._uid = 0;
          _this._scheduleIds = [];
          _this["private"] = [];
          _this._tmMap = new Map();
          _this._bundle = void 0;
          _this._clipMap = {};
          _this._nodeCatch = {};
          return _this;
        }
        var _proto = EffectNode.prototype;
        _proto.onLoad = function onLoad() {
          this.initNode();
          this.initEvent();
        };
        _proto.onEnable = function onEnable() {
          var _this2 = this;
          this.clearSchedule();
          this._bundle = assetManager.getBundle("affectedAni");
          if (!this._bundle) {
            assetManager.loadBundle("affectedAni", function (err, bundle) {
              if (err) {
                console.log(err);
              }
              _this2._bundle = bundle;
            });
          }
        };
        _proto.initNode = function initNode() {};
        _proto.initEvent = function initEvent() {
          App.monitorMgr.addEventListener(MonitorType.battle_gun_weapon_attack_affected, this.addAffected, this);
          App.monitorMgr.addEventListener(MonitorType.battle_buff_attack_effect, this.addBuffEffect, this);
        };
        _proto.clearSchedule = function clearSchedule() {
          this._scheduleIds.forEach(function (v) {
            App.scheduleMgr.unschedule(v);
          });
          this._scheduleIds = [];
        };
        _proto.onDisable = function onDisable() {
          this.clearSchedule();
          this._clipMap = {};
          App.monitorMgr.offTarget(this);
          for (var _key2 in this._nodeCatch) {
            var node = this._nodeCatch[_key2];
            node.active = false;
            node.sprite.spriteFrame = null;
            node.animation.destroy();
            node.destroy();
          }
          this._nodeCatch = {};
        }

        /**
         * 添加一个子弹打击特效
         * @param data * @param data
         */;
        _proto.addAffected = function addAffected(data) {
          var _data$node;
          if (data) return;
          var name = "" + data.effect;
          if ((_data$node = data.node) != null && _data$node.getChildByName(name)) {
            return;
          }
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.BulletPrefabPath[GameBattle.BulletType.Affected]);
          if (!node) return;
          node.sprite.spriteFrame = null;
          node.animation.stop();
          node.active = true;
          node.parent = data.node;
          node.name = name;
          node.setPosition(data.hit_pos);
          this._nodeCatch[node.uuid] = node;
          {
            this.loadFrameAnimation(node, data, false);
            return;
          }
        }

        /**
         * 添加buff特效  将buff特效和受击特效区分开
         * @param data
         */;
        _proto.addBuffEffect = function addBuffEffect(data) {
          var _data$node2;
          var effName = "affected_" + data.effect;
          if ((_data$node2 = data.node) != null && _data$node2.getChildByName(effName)) {
            return;
          }
          {
            var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, "prefabs/effect/affected");
            if (!node) return;
            node.sprite.spriteFrame = null;
            node.animation.stop();
            node.active = true;
            node.parent = data.node;
            node.name = effName;
            this._nodeCatch[node.uuid] = node;
            var cfg = DBRecord.fetchId("JiNengTeXiaoPianYi", data.effect);
            if (cfg) {
              node.setPosition(data.hit_pos.x, data.hit_pos.y + cfg.skewing, 0);
            } else {
              node.setPosition(data.hit_pos);
            }
            this.loadFrameAnimation(node, data, true);
            return;
          }
        };
        _proto.loadFrameAnimation = function loadFrameAnimation(node, data, isBuff) {
          var _this5 = this;
          if (this._clipMap[data.effect]) {
            this.playFrameAnimation(node, this._clipMap[data.effect]);
            return;
          }
          this._bundle.load(data.effect, SpriteAtlas, function (err, res) {
            if (err) {
              console.log(err);
              return;
            }
            if (!node.isValid) return;
            var spriteFrameList = res.getSpriteFrames();
            if (isBuff) {
              if (data.effect === "effect_buff_fuhuo") {
                data.duration = GameBattle.BuffDurationType.SpineTimer;
              }
              if (data.duration === GameBattle.BuffDurationType.SpineTimer) {
                spriteFrameList.push(null);
              }
            } else {
              spriteFrameList.push(null);
            }
            var clip = AnimationClip.createWithSpriteFrames(spriteFrameList, spriteFrameList.length);
            clip.name = data.effect;
            clip.speed = 1.5;
            //TODOO 单体治疗buff特效，不影响其他buff，写死
            if (data.effect === "effect_common_buff_dantizhiliao") {
              clip.speed = 1;
            }
            clip.sample = 30;
            var time = 0;
            var count = spriteFrameList.length;
            if (isBuff) {
              if (data.duration === GameBattle.BuffDurationType.Timer) {
                time = Math.max(1, data.time);
                clip.wrapMode = AnimationClip.WrapMode.Loop;
              } else if (data.duration === GameBattle.BuffDurationType.Battle || data.duration === GameBattle.BuffDurationType.Forever) {
                clip.wrapMode = AnimationClip.WrapMode.Loop;
              } else if (data.duration === GameBattle.BuffDurationType.SpineTimer) {
                time = Math.max(1, 0.05 * count);
                clip.wrapMode = AnimationClip.WrapMode.Normal;
              }
            } else {
              if (data.dutation) {
                // time = data.dutation;
                time = Math.max(1, data.dutation);
              } else {
                time = Math.max(1, 0.05 * count);
              }
              clip.wrapMode = AnimationClip.WrapMode.Normal;
            }
            _this5._clipMap[data.effect] = {
              clip: clip,
              time: time
            };
            _this5.playFrameAnimation(node, _this5._clipMap[data.effect]);
          });
        };
        _proto.playFrameAnimation = function playFrameAnimation(node, data) {
          var _this6 = this;
          var animation = node.animation;
          animation.addClip(data.clip);
          var time = data.time;
          var aniName = data.clip.name;
          animation.play(aniName);
          if (time > 0) {
            var id = App.scheduleMgr.scheduleOnce(function () {
              if (_this6._nodeCatch[node.uuid]) {
                delete _this6._nodeCatch[node.uuid];
              }
              node.active = false;
              node.sprite.spriteFrame = null;
              animation.stop();
              var clipList = animation.clips;
              for (var i = clipList.length; i--;) {
                animation.removeClip(clipList[i]);
              }
              App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, "prefabs/effect/affected", node);
            }, this, time);
            this._scheduleIds.push(id);
          }
        };
        return EffectNode;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/EmailMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './NetChannelMgr.ts', './DBRecord.ts', './UtilGame.ts', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, MonitorType, netChannel, DBRecord, UtilGame, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "ce653MsYNNN+JAYFLmjVg21", "EmailMgr", undefined);
      var EmailMgr = exports('EmailMgr', /*#__PURE__*/function () {
        function EmailMgr() {
          //------------------------------------------------------------         声明变量         --------------------------------------------------------------------------------------------
          /**所有邮件 */
          this._emails = void 0;
        }
        var _proto = EmailMgr.prototype;
        //-------------------------------------------------------------         初始化         --------------------------------------------------------------------------------------------
        _proto.init = function init() {
          App.monitorMgr.addEventListener(MonitorType.web_email_get_email, this.sc_get_email_50001, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_open_email, this.sc_open_email_50002, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_delete_email, this.sc_delete_email_50003, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_one_key_delete_email, this.sc_one_key_delete_email_50004, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_get_email_rwd, this.sc_get_email_rwd_50005, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_one_key_get_email_rwd, this.sc_one_key_get_email_rwd_50006, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_notice, this.sc_email_notice_50601, this);
          App.monitorMgr.addEventListener(MonitorType.web_email_notice_delete, this.sc_email_notice_delete_50602, this);
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.removeEventListener(MonitorType.web_email_get_email, this.sc_get_email_50001, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_open_email, this.sc_open_email_50002, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_delete_email, this.sc_delete_email_50003, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_one_key_delete_email, this.sc_one_key_delete_email_50004, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_get_email_rwd, this.sc_get_email_rwd_50005, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_one_key_get_email_rwd, this.sc_one_key_get_email_rwd_50006, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_notice, this.sc_email_notice_50601, this);
          App.monitorMgr.removeEventListener(MonitorType.web_email_notice_delete, this.sc_email_notice_delete_50602, this);
        }

        //-------------------------------------------------------------         逻辑处理         --------------------------------------------------------------------------------------------
        /**
         * 邮件排序 未读>已读未领取>已读
         */;
        _proto.sortEmail = function sortEmail() {
          this._emails.sort(function (a, b) {
            // 定义状态的优先级 cstatus(0：未读无附件 1：已读 2：未读有附件 3：已读有附件)
            var statusPriority = {
              0: 0,
              // 未读无附件
              2: 1,
              // 未读有附件
              3: 2,
              // 已读有附件
              1: 3 // 已读无附件
            };

            // 获取状态的优先级
            var getStatusPriority = function getStatusPriority(email) {
              var _statusPriority$email;
              return (_statusPriority$email = statusPriority[email.cstatus]) != null ? _statusPriority$email : Infinity; // 处理未知状态
            };

            // 比较两封邮件的优先级
            var priorityA = getStatusPriority(a);
            var priorityB = getStatusPriority(b);

            // 根据状态优先级和时间排序
            if (priorityA !== priorityB) {
              return priorityA - priorityB; // 优先级低的排在前面
            } else {
              // 状态相同，按时间排序，时间越新越靠前
              return b.createTime - a.createTime; // 降序排列，时间越新越靠前
            }
          });
        }

        //---------------------------------------------------------         华丽分割线(协议部分)         --------------------------------------------------------------------------------------------
        /**请求邮箱列表 */;
        _proto.cs_get_email_50001 = function cs_get_email_50001() {
          netChannel.game.send(MonitorType.web_email_get_email);
        };
        _proto.sc_get_email_50001 = function sc_get_email_50001(obj) {
          this._emails = [];
          for (var _iterator = _createForOfIteratorHelperLoose(obj.mailList), _step; !(_step = _iterator()).done;) {
            var value = _step.value;
            this._emails.push(value);
            if (value.templateId) {
              //邮件表
              var cfg = DBRecord.fetchId('YouJian', value.templateId);
              if (cfg) {
                if (value.extData && value.extData.templateParams) {
                  value.title = cfg.title;
                  value.content = UtilGame.formateStr(cfg.descrip, value.extData.templateParams);
                } else {
                  value.title = cfg.title;
                  value.content = cfg.descrip;
                }
              }
            }
          }
          this.sortEmail();
          App.redPointManager.checkEmailRedPoint();
          App.monitorMgr.dispatchEvent(MonitorType.email_update_main_view);
        }

        /**
         * 打开邮件
         * @param emailId 邮件Id
         */;
        _proto.cs_open_email_50002 = function cs_open_email_50002(emailId) {
          var obj = {
            mailId: emailId
          };
          netChannel.game.send(MonitorType.web_email_open_email, obj);
        };
        _proto.sc_open_email_50002 = function sc_open_email_50002(obj) {
          if (obj.err_code) return;
          this.cs_get_email_50001();
        }

        /**
         * 删除邮件
         * @param emailId 邮件Id
         */;
        _proto.cs_delete_email_50003 = function cs_delete_email_50003(emailId) {
          var obj = {
            mailIds: [emailId]
          };
          netChannel.game.send(MonitorType.web_email_delete_email, obj);
        };
        _proto.sc_delete_email_50003 = function sc_delete_email_50003(obj) {
          if (obj.err_code) return;
          this.cs_get_email_50001();
        }

        /**一键删除邮件 */;
        _proto.cs_one_key_delete_email_50004 = function cs_one_key_delete_email_50004() {
          netChannel.game.send(MonitorType.web_email_one_key_delete_email);
        };
        _proto.sc_one_key_delete_email_50004 = function sc_one_key_delete_email_50004(obj) {
          if (obj.err_code) return;
          this.cs_get_email_50001();
        }

        /**
         * 获取邮件的附件
         * @param emailId 邮件Id
         */;
        _proto.cs_get_email_rwd_50005 = function cs_get_email_rwd_50005(emailId) {
          var obj = {
            mailId: emailId
          };
          netChannel.game.send(MonitorType.web_email_get_email_rwd, obj);
        };
        _proto.sc_get_email_rwd_50005 = function sc_get_email_rwd_50005(obj) {
          if (obj.err_code) return;
          // App.activityManager.showAwardPanl(obj.attachments);
          if (!this._emails) {
            this._emails = [];
          }
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._emails), _step2; !(_step2 = _iterator2()).done;) {
            var value = _step2.value;
            if (value.mailId == obj.mailId) {
              value.cstatus = 1;
              App.monitorMgr.dispatchEvent(MonitorType.email_update_info_view, value);
              break;
            }
          }
          this.cs_get_email_50001();
        }

        /**一键获取附件 */;
        _proto.cs_one_key_get_email_rwd_50006 = function cs_one_key_get_email_rwd_50006() {
          netChannel.game.send(MonitorType.web_email_one_key_get_email_rwd);
        };
        _proto.sc_one_key_get_email_rwd_50006 = function sc_one_key_get_email_rwd_50006(obj) {
          if (obj.err_code) return;
          // App.activityManager.showAwardPanl(obj.allAttachments);
          this.cs_get_email_50001();
        }

        //---------------------------------------------------------         通知(协议部分)         --------------------------------------------------------------------------------------------
        ;

        _proto.sc_email_notice_50601 = function sc_email_notice_50601(obj) {
          // 获得邮件
          console.log(obj);
          if (!obj.mail) return;
          if (!this._emails) {
            this._emails = [];
          }
          this._emails.push(obj.mail);
          if (obj.mail.templateId) {
            //邮件表
            var cfg = DBRecord.fetchId('YouJian', obj.mail.templateId);
            if (cfg) {
              obj.mail.title = cfg.title, obj.mail.content = cfg.descrip;
            }
          }
          this.sortEmail();
          App.redPointManager.checkEmailRedPoint();
          App.monitorMgr.dispatchEvent(MonitorType.email_update_main_view);
          // this.cs_get_email_50001();
        };

        _proto.sc_email_notice_delete_50602 = function sc_email_notice_delete_50602(obj) {
          // 邮件删除
          console.log(obj);
        };
        _createClass(EmailMgr, [{
          key: "emails",
          get: function get() {
            return this._emails;
          }
        }]);
        return EmailMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/EventAgent.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Button, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _class;
      cclegacy._RF.push({}, "c3471eATMFMwKyGYyWokjoz", "EventAgent", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var EventAgent = exports('EventAgent', (_dec = ccclass('EventAgent'), _dec2 = menu("Z框架基类/EventAgent"), _dec(_class = _dec2(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(EventAgent, _Component);
        function EventAgent() {
          return _Component.apply(this, arguments) || this;
        }
        var _proto = EventAgent.prototype;
        /***
         * @en recieve button click event and deliver them to the real handlers.
         * @zh 接受按钮事件，并转发给真正的处理函数  转发器  
         * */
        _proto.onButtonClicked = function onButtonClicked(evt, customEventData) {
          var btn = evt.target.getComponent(Button);
          if (!btn) return;
          var clickEvents = btn.clickEvents;
          for (var i = 0; i < clickEvents.length; ++i) {
            var h = clickEvents[i];
            if (h.customEventData == customEventData) {
              var cb = h['$cb$'];
              var target = h['$target$'];
              var args = h['$args$'];
              cb && cb.apply(target, [btn, args]);
            }
          }
        };
        return EventAgent;
      }(Component)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/EventType.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "91fa7sZjb5EKYTCv5U9H/+B", "EventType", undefined);
      /**
       * 自定义事件类型
       */
      var EventType = exports('EventType', {
        manager_to_view_update: "manager_to_view_update",
        loading_end_to_mainGame: "loading_end_to_mainGame",
        joystick_touch_start: "joystick_touch_start",
        Android2TS: "Android2TS",
        ui_open: "ui_open",
        ui_close: "ui_close",
        login_select_ser: "login_select_ser",
        login_serverList_close: "login_serverList_close",
        login_player_ready: "login_player_ready",
        login_close: "login_close",
        login_ser_refresh: "login_ser_refresh",
        BuildingBtnClick: "BuildingBtnClick",
        net_checked: "net_checked",
        loading_auto_close: "loading_auto_close",
        net_on_error: "net_on_error",
        net_on_close: "net_on_close",
        ResourceUpdate: "ResourceUpdate",
        BuildingFHGetReward: "BuildingFHGetReward",
        BuildingUpdated: "BuildingUpdated",
        BuildingComplete: "BuildingComplete",
        bag_update_list: "bag_update_list",
        web_player_assets_info: "web_player_assets_info",
        TestMapBig: "TestMapBig",
        TestMapSmall: "TestMapSmall",
        Close_Build_XunLianBtns: "Close_Build_XunLianBtns"
      });
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FakeProgressBar.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, ProgressBar, Sprite, Label, sp, Node, Component, Utils;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      ProgressBar = module.ProgressBar;
      Sprite = module.Sprite;
      Label = module.Label;
      sp = module.sp;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "93155xUBwZDIJROMgewMhN3", "FakeProgressBar", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var FakeProgressBar = exports('FakeProgressBar', (_dec = ccclass("FakeProgressBar"), _dec2 = property(ProgressBar), _dec3 = property(Sprite), _dec4 = property(Sprite), _dec5 = property(Label), _dec6 = property(sp.Skeleton), _dec7 = property(Label), _dec8 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(FakeProgressBar, _Component);
        function FakeProgressBar() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "progressBar", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgLogo", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbPercent", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spineBg", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbInfo", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "Splash", _descriptor7, _assertThisInitialized(_this));
          /** 假进度条的定时器 */
          _this._timeHandle = null;
          /** 假进度条的进度 */
          _this._fakeProgress = 0;
          _this._cfg = null;
          return _this;
        }
        var _proto = FakeProgressBar.prototype;
        _proto.changePageInfoByConfig = function changePageInfoByConfig() {
          var _this2 = this;
          this.spineBg.enabled = false;
          var logoUrl = this._cfg.logo;
          var bgUrl = this._cfg.img;
          // 暂时不释放 不确定释放时机 / 是否会2次加载
          Utils.loadRemoteImage(logoUrl, this.imgLogo, function () {
            // 加载成功显示
            console.error("加载远程logo图成功 开始显示", logoUrl);
            _this2.imgLogo.node.active = true;
          }, function () {
            console.error("加载远程logo图失败 不显示logo");
            // 加载失败显示默认
            // this.spineBg.enabled = true;
          });
          // 暂时不释放 不确定释放时机 / 是否会2次加载
          Utils.loadRemoteImage(bgUrl, this.imgBg, function () {
            console.error("加载远程背景图成功 开始显示", bgUrl);
            // 加载成功显示
            _this2.imgBg.node.active = true;
          }, function () {
            // 加载失败显示默认
            console.error("加载远程背景图失败 显示默认图");
            _this2.spineBg.enabled = true;
          });
        };
        _proto.setCfg = function setCfg(cfg) {
          this._cfg = cfg;
        };
        _proto.startProgress = function startProgress(isFirst) {
          var self = this;
          if (this._cfg) {
            // 这个直接用远程图
            this.changePageInfoByConfig();
          } else {
            console.error("不存在启动图配置");
            // 显示
            this.spineBg.enabled = true;
            this.showBG(isFirst);
          }
          this._fakeProgress = 0;
          this.progressBar.node.active = true;
          this.progressBar.progress = 0.01;
          this.lbPercent.string = "1%";
          if (this._timeHandle) {
            clearInterval(this._timeHandle);
          }
          this._timeHandle = setInterval(function () {
            self.onProgress();
          }, 80);
        };
        _proto.updateInfo = function updateInfo(info) {
          this.lbInfo.string = info;
        };
        _proto.close = function close(hideAll) {
          if (this._timeHandle) {
            this._fakeProgress = 1;
            this.onProgress();
            clearInterval(this._timeHandle);
            this._timeHandle = null;
          }
          if (hideAll) {
            this.hideAll();
          } else {
            this.progressBar.node.active = false;
          }
        };
        _proto.onProgress = function onProgress() {
          this._fakeProgress += 0.01;
          if (this._fakeProgress > this.progressBar.progress) {
            if (this._fakeProgress > 1) {
              this._fakeProgress = 1;
              clearInterval(this._timeHandle);
              this._timeHandle = null;
            }
            this.progressBar.progress = this._fakeProgress;
            this.lbPercent.string = Math.floor(this._fakeProgress * 100) + "%";
          }
        };
        _proto.hideAll = function hideAll() {
          this.spineBg.setCompleteListener(null);
          this.spineBg.node.active = false;
          this.Splash.active = false;
          this.progressBar.node.active = false;
        };
        _proto.showBG = function showBG(isFirst) {
          this.spineBg.node.active = true;
          this.Splash.active = true;
          // if (isFirst) {
          //     this.spineBg.setAnimation(0, "Join", false);
          //     this.spineBg.setCompleteListener(() => {
          //         this.spineBg.setAnimation(0, "Loop", true);
          //         this.spineBg.setCompleteListener(null);
          //     });
          // } else {
          //     this.spineBg.setCompleteListener(null);
          //     this.spineBg.setAnimation(0, "Loop", true);
          // }
        }

        /**
         * 重启游戏
         */;
        _proto.onBtnRestartGame = function onBtnRestartGame() {
          Utils.reboot();
        };
        return FakeProgressBar;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgBg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgLogo", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "lbPercent", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "spineBg", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lbInfo", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Splash", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FallingPropCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './ItemFallingProp.ts', './BattleDefine.ts', './DBRecord.ts', './MonitorType.ts', './ModuleDef.ts', './MathUtils.ts', './BattleGlobalData.ts', './CommonCfgUtil.ts', './EffectMgr.ts', './SoundDef.ts', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, Vec3, tween, v3, find, Camera, Sprite, Utils, ItemFallingProp, GameBattle, DBRecord, MonitorType, ModuleDef, MathUtils, BattleGlobalDataType, CommonCfgUtil, EffectManager, SoundDef, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
      tween = module.tween;
      v3 = module.v3;
      find = module.find;
      Camera = module.Camera;
      Sprite = module.Sprite;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ItemFallingProp = module.ItemFallingProp;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      BattleGlobalDataType = module.BattleGlobalDataType;
    }, function (module) {
      CommonCfgUtil = module.CommonCfgUtil;
    }, function (module) {
      EffectManager = module.EffectManager;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "35714m5X2FOjaoC2Q6LZ3HQ", "FallingPropCtrl", undefined);
      //装备的三种品质 低品质 中品质 高品质
      var EQUIP_COLOR_COUNT = 3;
      var FallingPropCtrl = exports('FallingPropCtrl', /*#__PURE__*/function () {
        function FallingPropCtrl() {
          this._exps = [];
          this._monsterIndex = [0, 0, 0];
          //金币掉落列表
          this._fallingGoldIndex = [[], [], []];
          this._fallingGoldValue = [];
          //装备掉落列表
          this._fallingEquipIndex = null;
          this._fallingEquipCount = [];
          this._equipList = [];
          this._goldId = 1;
          this._maxColor = 0;
          //最高品质装备
          this._minColor = 0;
          //最低品质装备
          this._hpBall = 0;
          //血球掉落概率
          this._mixBall = 0;
          //HP+MP球掉落概率
          this._surpriseIndex = 0;
          //惊喜掉落的怪物
          this._totalMonsterIndex = 0;
          //所有怪物的死亡个数
          this._surpriseItem = [];
          this.allItems = [];
          this._pickUpDistance = 0;
          //掉落物拾取范围
          this._itemAwards = [];
          this._kaPiBaLaGold = 0;
          //卡皮巴拉小怪掉落金币
          this._dropPackageOdds = {};
          this._playerHasPet = false;
          this._dropPackageData = {};
        }
        var _proto = FallingPropCtrl.prototype;
        _proto.init = function init() {};
        _proto.sc_web_battle_pick = function sc_web_battle_pick(obj) {
          if (obj.err_code) {
            console.log("装备 返回拾取装备失败", obj);
            return;
          }
          for (var i = 0; i < obj.award_list.length; i++) {
            var id = obj.award_list[i].item_id;
          }
        };
        _proto.onEnter = function onEnter() {
          var _App$battleMgr$roleCt;
          this._playerHasPet = !!((_App$battleMgr$roleCt = App.battleMgr.roleCtrl.player) != null && _App$battleMgr$roleCt.getCurPetInf());
        };
        _proto.onExit = function onExit() {
          this._dropPackageData = {};
          App.monitorMgr.removeEventListener(MonitorType.web_battle_pick, this.sc_web_battle_pick, this);
        };
        _proto.initFallingByGuanQiaId = function initFallingByGuanQiaId(guanQiaId, obj) {
          if (!obj) return; //木桩副本不需要掉落

          if (guanQiaId <= 100) return;
          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.TuBoshu || App.battleMgr.guanQiaType === GameBattle.GuanQiaType.MiJingB) {
            return;
          }
          var cfgShuoMing = DBRecord.fetchId("ShuoMingQuanJu", 8);
          this._pickUpDistance = Number(cfgShuoMing.value);
          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.KaPiBaLa) {
            this.initKaPiBaLaDiaoLuo(guanQiaId, obj);
            return;
          }
          this._itemAwards = obj.guanka_award.item_awards;
          App.monitorMgr.addEventListener(MonitorType.web_battle_pick, this.sc_web_battle_pick, this);
          // return
          this.allItems = [];
          this._totalMonsterIndex = 0;
          var cfg = DBRecord.fetchId("GuanQia", guanQiaId);
          this._hpBall = cfg.hp_ball;
          this._mixBall = cfg.mix_ball;
          //关卡经验系数
          var exp_coefficient = cfg.exp_coefficient;
          var exp_drop = cfg.exp_drop[0];
          var cfgDiaoLuo = DBRecord.fetchId("DiaoLuo", exp_drop);
          var pool_reward = cfgDiaoLuo.pool_reward[0][0];
          var cfgKachi = DBRecord.fetchAll("KaChi");
          var base_exp = 0;
          for (var i = 0; i < cfgKachi.length; i++) {
            if (cfgKachi[i].pool == pool_reward) {
              base_exp = cfgKachi[i].reward[1] * cfgDiaoLuo.pool_reward[0][1];
            }
          }
          for (var _i = 0; _i < 3; _i++) {
            var _cfgShuoMing = DBRecord.fetchId("ShuoMingQuanJu", 12 + _i);
            this._exps[_i] = base_exp * parseInt(_cfgShuoMing.value) * exp_coefficient / 10000;
          }
          this._surpriseItem = [];
          if (obj.guanka_award.surprise_awards) {
            this._surpriseItem = [].concat(obj.guanka_award.surprise_awards);
          }
          console.log("惊喜 奖励", this._surpriseItem);
          var totalGold = obj.guanka_award.gold_awards[0].item_count;
          this._goldId = obj.guanka_award.gold_awards[0].item_id;

          //小怪最大参考值
          var normal_estimate = cfg.normal_estimate;
          this._surpriseIndex = Math.floor(Math.random() * normal_estimate * 0.8);
          //精英最大参考值
          var elite_estimate = cfg.elite_estimate;
          //金币掉落密度 小怪	50%	精英30%  BOSS20%
          var gold_drop_density = cfg.gold_drop_density;
          var arr = [Math.floor(totalGold * 0.5), Math.floor(totalGold * 0.3)];
          var bossGold = totalGold - arr[0] - arr[1];
          arr.push(bossGold);
          this._fallingGoldValue = arr;
          var func = function func(arr, total) {
            while (true) {
              var index = Math.floor(Math.random() * total);
              if (arr.indexOf(index) == -1) {
                arr.push(index);
                break;
              }
            }
          };
          this._monsterIndex = [0, 0, 0];
          this._fallingGoldIndex = [[], [], [0]];
          if (normal_estimate > 0) {
            for (var _i2 = 0; _i2 < gold_drop_density; _i2++) {
              func(this._fallingGoldIndex[0], normal_estimate);
            }
          }
          var elite_Count = Math.min(elite_estimate, gold_drop_density);
          if (elite_Count > 0) {
            for (var _i3 = 0; _i3 < elite_Count; _i3++) {
              func(this._fallingGoldIndex[1], elite_estimate);
            }
          }
          var sortFunc = function sortFunc(a, b) {
            return a - b;
          };
          this._fallingGoldIndex[0].sort(sortFunc);
          this._fallingGoldIndex[1].sort(sortFunc);

          //装备掉落密度
          // 最低品质装备         	70%	    20%	    剩下归他
          // 非最低也非最高品质装备	 0%	     60%	 剩下归他
          // 最高品质装备	            0%	    50%	    必定固定1件
          var equipment_drop_density = cfg.equipment_drop_density;
          var equipment_awards = obj.guanka_award.equipment_awards;
          console.log("装备掉落 总表", equipment_awards);
          this._equipList = [];
          for (var _i4 = 0; _i4 < equipment_awards.length; _i4++) {
            for (var j = 0; j < equipment_awards[_i4].item_count; j++) {
              this._equipList.push(equipment_awards[_i4]);
            }
          }
          var equioCount = equipment_awards.length;
          var equipCountArr = [0, 0, 0];
          var min = 9999;
          var max = -1;
          for (var _i5 = 0; _i5 < equioCount; _i5++) {
            var color = equipment_awards[_i5].color;
            if (min > color) {
              min = color;
            }
            if (max < color) {
              max = color;
            }
          }
          for (var _i6 = 0; _i6 < equioCount; _i6++) {
            var _color = equipment_awards[_i6].color;
            var index = 1;
            if (_color == min) {
              index = 0;
            } else if (_color == max) {
              index = 2;
            }
            equipCountArr[index] += equipment_awards[_i6].item_count;
          }
          this._maxColor = max;
          this._minColor = min;
          var percent = [[0.7, 0.2], [0, 0.6], [0, 0.5]];
          this._fallingEquipCount = [];
          for (var _i7 = 0; _i7 < EQUIP_COLOR_COUNT; _i7++) {
            var count = equipCountArr[_i7];
            var _arr = [Math.floor(count * percent[_i7][0]), Math.floor(count * percent[_i7][1])];
            _arr.push(count - _arr[0] - _arr[1]);
            this._fallingEquipCount[_i7] = _arr;
          }
          this._fallingEquipIndex = []; //三种品级的装备
          for (var _i8 = 0; _i8 < EQUIP_COLOR_COUNT; _i8++) {
            this._fallingEquipIndex[_i8] = []; //三种等级的怪物
            this._fallingEquipIndex[_i8][0] = []; //普通
            this._fallingEquipIndex[_i8][1] = []; //精英
            this._fallingEquipIndex[_i8][2] = [0]; //BOSS

            for (var _j = 0; _j < equipment_drop_density; _j++) {
              func(this._fallingEquipIndex[_i8][0], normal_estimate);
            }
            this._fallingEquipIndex[_i8][0].sort(sortFunc);
            var elite_equip_count = Math.min(elite_estimate, equipment_drop_density);
            for (var _j2 = 0; _j2 < elite_equip_count; _j2++) {
              func(this._fallingEquipIndex[_i8][1], elite_estimate);
            }
            this._fallingEquipIndex[_i8][1].sort(sortFunc);
          }
          // let arr = [Math.floor(totalGold*0.5/gold_drop_density), Math.floor(totalGold*0.3/gold_drop_density)]
          // let bossGold = totalGold - arr[1]*Math.min(normal_estimate,gold_drop_density) - arr[2]*Math.min(elite_estimate,gold_drop_density)
          // arr.push(Math.floor(bossGold))
          // this._fallingGoldValue = arr
          this.initDropPackage(obj.guanka_award.guaiwu_drops, cfg);
          console.log("xxxxxxxxx_surpriseIndexxxxxxxxxxx", this._fallingGoldValue, this._exps);
        };
        /** 初始化掉落包数据 */
        _proto.initDropPackage = function initDropPackage(data, cfg) {
          for (var _iterator = _createForOfIteratorHelperLoose(data), _step; !(_step = _iterator()).done;) {
            var list = _step.value;
            this._dropPackageData[list.type] = list.pack_list;
          }

          //小怪最大参考值
          var normal_estimate = cfg.normal_estimate;
          //精英最大参考值
          var elite_estimate = cfg.elite_estimate;
          var odds = {
            1: normal_estimate,
            2: elite_estimate,
            9: 1
          };
          var item2_drop_apart = cfg.item2_drop_apart;
          if (!item2_drop_apart) {
            return;
          }
          for (var _iterator2 = _createForOfIteratorHelperLoose(item2_drop_apart), _step2; !(_step2 = _iterator2()).done;) {
            var _step2$value = _step2.value,
              type = _step2$value[0],
              count = _step2$value[1];
            this._dropPackageOdds[type] = count / odds[type];
          }
        };
        _proto.getDropPackage = function getDropPackage(type) {
          var list = [];
          if (type == GameBattle.MonsterQuality.Boss) {
            for (var key in this._dropPackageData) {
              for (var _iterator3 = _createForOfIteratorHelperLoose(this._dropPackageData[key]), _step3; !(_step3 = _iterator3()).done;) {
                var items = _step3.value;
                for (var _iterator4 = _createForOfIteratorHelperLoose(items.item_list), _step4; !(_step4 = _iterator4()).done;) {
                  var item = _step4.value;
                  list.push({
                    item_id: item.item_id,
                    item_count: item.item_count,
                    color: item.color
                  });
                }
              }
            }
            return list;
          }
          var data = this._dropPackageData[type];
          if (data && data.length > 0) {
            if (Math.random() < this._dropPackageOdds[type]) {
              var _items = data.shift();
              for (var _iterator5 = _createForOfIteratorHelperLoose(_items.item_list), _step5; !(_step5 = _iterator5()).done;) {
                var _item = _step5.value;
                list.push({
                  item_id: _item.item_id,
                  item_count: _item.item_count,
                  color: _item.color
                });
              }
            }
          }
          return list;
        };
        _proto.initKaPiBaLaDiaoLuo = function initKaPiBaLaDiaoLuo(guanQiaId, obj) {
          //关卡经验系数
          var cfg = DBRecord.fetchId("GuanQia", guanQiaId);
          var exp_coefficient = cfg.exp_coefficient;
          var exp_drop = cfg.exp_drop[0];
          var cfgDiaoLuo = DBRecord.fetchId("DiaoLuo", exp_drop);
          var exp_pool_reward = cfgDiaoLuo.pool_reward[0][0];
          var cfgKachi = DBRecord.fetchAll("KaChi");
          var base_exp = 0;
          var gold_drop = cfg.gold_drop[0];
          var gold_drop_cfg = DBRecord.fetchId("DiaoLuo", gold_drop);
          var gold_pool_reward = gold_drop_cfg.pool_reward[0][0];
          var base_gold = 0;
          for (var i = 0; i < cfgKachi.length; i++) {
            if (cfgKachi[i].pool == exp_pool_reward) {
              base_exp = cfgKachi[i].reward[1] * cfgDiaoLuo.pool_reward[0][1];
            }
            if (cfgKachi[i].pool == gold_pool_reward) {
              base_gold = cfgKachi[i].reward[1] * gold_drop_cfg.pool_reward[0][1];
            }
          }
          // let cfgShuoMing: dbr.ShuoMingQuanJu = DBRecord.fetchId('ShuoMingQuanJu', 12);
          // this._exps[0] = (base_exp * parseInt(cfgShuoMing.value) * exp_coefficient) / 10000;
          var diKuai = 1001; //App.battleMgr.battleMainViewCtrl.battleMap.curGrid.diKuaiId;
          var diKuaiCfg = DBRecord.fetchId("DiKuai", diKuai);
          var boShu = cfg.time_limit * 1000 / cfg.monster_Interval;
          var count = diKuaiCfg.moster_born[0][2];
          this._exps[0] = base_exp * exp_coefficient / 10000;
          this._kaPiBaLaGold = base_gold * cfg.gold_coefficient / 10000;
          var totalCount = count * boShu;
          this._kaPiBaLaGold = Math.floor(this._kaPiBaLaGold / totalCount);
          console.log("initKaPiBaLaDiaoLuo", this._exps, this._kaPiBaLaGold);
        };
        _proto.getExp = function getExp(type) {
          var index = {
            1: 0,
            2: 1,
            9: 2
          }[type];
          return this._exps[index];
        };
        _proto.checkColor = function checkColor(quality, color) {
          if (quality == 2) {
            //0低品质 1中品质 2 高品质
            return color == this._maxColor;
          }
          if (quality == 0) {
            return color == this._minColor;
          }
          return color > this._minColor && color < this._maxColor;
        };
        _proto.getEquipByColor = function getEquipByColor(quality) {
          for (var i = 0; i < this._equipList.length; i++) {
            var color = this._equipList[i].color;
            if (this.checkColor(quality, color)) {
              var item = this._equipList[i];
              this._equipList.splice(i, 1);
              return item;
            }
          }
        };
        _proto.getKaPiBaLaDiaoLuo = function getKaPiBaLaDiaoLuo(type) {
          var items = [];
          var value = Math.floor(this._kaPiBaLaGold / 2);
          items.push({
            item_id: this._goldId,
            item_count: value,
            color: 0
          });
          items.push({
            item_id: this._goldId,
            item_count: value,
            color: 0
          });
          return items;
        };
        _proto.getFallingItem = function getFallingItem(type, monsterId) {
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.MiJingB) {
            return [];
          }
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.KaPiBaLa) {
            return this.getKaPiBaLaDiaoLuo(type);
          }
          if (this._fallingEquipCount.length == 0) {
            return [];
          }
          var index = {
            1: 0,
            2: 1,
            9: 2
          }[type];
          var items = [];
          if (this._monsterIndex[index] == this._fallingGoldIndex[index][0]) {
            this._fallingGoldIndex[index].shift();
            var value = 0;
            if (this._fallingGoldIndex[index].length == 0) {
              value = this._fallingGoldValue[index];
            } else {
              var max = this._fallingGoldValue[index] / this._fallingGoldIndex[index].length;
              var min = max / 2;
              value = Math.floor(Utils.GetRandomNum(min, max));
            }
            this._fallingGoldValue[index] -= value;
            if (type == GameBattle.MonsterQuality.Boss) {
              //BOSS金币多分几份
              var count = Math.floor(Utils.GetRandomNum(2, 5));
              var total = value + this._fallingGoldValue[0] + this._fallingGoldValue[1];
              for (var i = 0; i < count - 1; i++) {
                var _max = total / (count - 1 - i);
                var _min = _max / 2;
                var v = Math.floor(Utils.GetRandomNum(_min, _max));
                items.push({
                  item_id: this._goldId,
                  item_count: v,
                  color: 0
                });
                total -= v;
              }
              items.push({
                item_id: this._goldId,
                item_count: total,
                color: 0
              });
            } else {
              items.push({
                item_id: this._goldId,
                item_count: value,
                color: 0
              });
            }
          }
          if (type == GameBattle.MonsterQuality.Boss) {
            //剩余装备全给BOSS
            for (var _i9 = 0; _i9 < this._equipList.length; _i9++) {
              var color = this._equipList[_i9].color;
              var equip_id = this._equipList[_i9].item_id;
              var pool_id = this._equipList[_i9].pool_id;
              items.push({
                item_id: equip_id,
                item_count: 1,
                color: color,
                pool_id: pool_id
              });
            }
            if (this._itemAwards) {
              for (var _i10 = 0; _i10 < this._itemAwards.length; _i10++) {
                items.push({
                  item_id: this._itemAwards[_i10].item_id,
                  item_count: this._itemAwards[_i10].item_count,
                  color: this._itemAwards[_i10].color
                });
              }
            }
          } else {
            for (var _i11 = 0; _i11 < EQUIP_COLOR_COUNT; _i11++) {
              if (this._fallingEquipCount[_i11][index] > 0) {
                if (this._monsterIndex[index] == this._fallingEquipIndex[_i11][index][0]) {
                  this._fallingEquipIndex[_i11][index].shift();
                  var item = this.getEquipByColor(_i11);
                  item.item_count = 1;
                  items.push(item);
                }
                this._fallingEquipCount[_i11][index]--;
              }
            }
          }
          var _temphpBallId = 9999999999998;
          var _tempmixBallId = 9999999999999;
          var num = Math.random() * 10000;
          var globalRatio = App.battleMgr.globalData.getData(BattleGlobalDataType.hpBallRatio);
          if (num < this._hpBall + globalRatio) {
            items.push({
              item_id: _temphpBallId,
              item_count: 1,
              color: 0
            });
          } else {
            num = Math.random() * 10000;
            if (num < this._mixBall) {
              items.push({
                item_id: _tempmixBallId,
                item_count: 1,
                color: 0
              });
            }
          }
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.MiJingA) {
            var cfg = CommonCfgUtil.getValue(120);
            var surprise_monster_id = cfg[1]; // 惊喜怪物ID 秘境A下惊喜掉落包只分配给这个怪物
            if (monsterId && surprise_monster_id == monsterId) {
              this.setSurpriseItem(items);
            }
          } else if (this._surpriseIndex == this._totalMonsterIndex) {
            this.setSurpriseItem(items);
          }
          this._monsterIndex[index]++;
          this._totalMonsterIndex++;
          var dropPackageList = this.getDropPackage(type); // 获取掉落包
          //console.log('掉落包', dropPackageList);
          if (dropPackageList.length > 0) {
            items = items.concat(dropPackageList);
          }
          return items;
        }
        /**
         * 获取惊喜掉落包
         */;
        _proto.setSurpriseItem = function setSurpriseItem(items) {
          for (var i = 0; i < this._surpriseItem.length; i++) {
            var item = this._surpriseItem[i];
            if (item.item_id == this._goldId) {
              var count = Math.floor(Utils.GetRandomNum(2, 5));
              var total = item.item_count;
              for (var j = 0; j < count - 1; j++) {
                var max = total / (count - 1 - j);
                var min = max / 2;
                var v = Math.floor(Utils.GetRandomNum(min, max));
                items.push({
                  item_id: this._goldId,
                  item_count: v,
                  color: 0
                });
                total -= v;
              }
              items.push({
                item_id: this._goldId,
                item_count: total,
                color: 0
              });
            } else {
              for (var _j3 = 0; _j3 < item.item_count; _j3++) {
                items.push({
                  item_id: item.item_id,
                  item_count: 1,
                  color: item.color,
                  pool_id: item.pool_id
                });
              }
            }
          }
        };
        _proto.update = function update(dt) {
          var player = App.battleMgr.roleCtrl.player;
          if (!player) return;
          var nodeList = App.battleMgr.battleMainViewCtrl.fallingLayer.children;
          for (var i = nodeList.length; i--;) {
            var distance = Vec3.distance(nodeList[i].worldPosition, player.node.worldPosition);
            var comp = nodeList[i].getComponent(ItemFallingProp);
            var checkDis = this._pickUpDistance;
            //带宠物时全屏可拾取
            if (this._playerHasPet) {
              checkDis *= 100;
            }
            if (distance < checkDis && comp != null && comp.canFly && !comp.isYaoPing) {
              if (!comp.flying) {
                var flag = true;
                if (comp.item_id < 500000 || comp.item_id > 1000000) {
                  //道具需要合并 大于500000的为装备 大于1000000的为勾玉
                  for (var _i12 = 0; _i12 < this.allItems.length; _i12++) {
                    if (this.allItems[_i12].item_id == comp.item_id) {
                      this.allItems[_i12].item_count += comp.item_count;
                      flag = false;
                      break;
                    }
                  }
                }
                if (flag) {
                  var item = {
                    item_id: comp.item_id,
                    item_count: comp.item_count,
                    color: comp.item_color
                  };
                  this.allItems.push(item);
                }
                comp.flyTo(player.node);
              }
            }
          }
        }
        /**
         * 获取掉落物坐标
         * @param center - 怪物死亡坐标
         * @param count - 掉落物总数
         * @returns 掉落物坐标
         */;
        _proto.getPositionByIndex = function getPositionByIndex(center, count) {
          var w = count / 3 * 60;
          var h = w * 2;
          var minx = center.x - w / 2;
          var maxx = center.x + w / 2;
          var miny = center.y - h / 2;
          var maxy = center.y + h / 2;
          var x = MathUtils.randomInt(minx, maxx);
          var y = MathUtils.randomInt(miny, maxy);
          return new Vec3(x, y, center.z);
        }

        // dropItem(item: m_proto.IGuankaDrop, count: number, position: Vec3) {
        //     let node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp);
        //     let comp = node.getComponent(ItemFallingProp);
        //     // while (true) {
        //     for (let i = 0; i < 100; i++) {
        //         let pos = this.getPositionByIndex(position, count);
        //         if (App.mapMgr.checkCanMove(pos)) {
        //             comp.init(item, pos);
        //             return;
        //         }
        //     }
        //     comp.init(item, position);
        // }
        ;

        _proto.dropItem = function dropItem(item, count, position) {
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp);
          var comp = node.getComponent(ItemFallingProp);
          var pos = new Vec3();
          for (var i = 0; i < 100; i++) {
            var r = Utils.GetRandomNum(100, 300);
            //随机角度
            var theta = Math.random() * (2 * Math.PI);
            pos.x = position.x + r * Math.cos(theta);
            pos.y = position.y + r * Math.sin(theta);
            if (App.mapMgr.checkCanMove(pos)) {
              comp.init(item, pos, position);
              return;
            }
          }
          comp.init(item, position, position);
          App.monitorMgr.dispatchEvent(MonitorType.battle_player_falling_equip, item);
        }

        /**
         * 爬塔宝箱掉落（前端表现）
         * @param item 掉落道具信息
         * @param count 数量
         * @param position 掉落位置（怪物位置）
         * @param targetNode 飞行目标节点
         * @param callback 飞行完成后的回调函数
         * @param scale 宝箱缩放比例，默认0.4
         */;
        _proto.dropPataItem = function dropPataItem(item, count, position, targetNode, callback, scale) {
          if (scale === void 0) {
            scale = 0.4;
          }
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp);
          if (!node) return;
          var comp = node.getComponent(ItemFallingProp);

          // 计算最终掉落位置
          var finalDropPos = new Vec3();
          var positionFound = false;
          for (var i = 0; i < 100; i++) {
            var r = Utils.GetRandomNum(100, 300);
            var theta = Math.random() * (2 * Math.PI);
            finalDropPos.x = position.x + r * Math.cos(theta);
            finalDropPos.y = position.y + r * Math.sin(theta);
            finalDropPos.z = position.z;
            if (App.mapMgr.checkCanMove(finalDropPos)) {
              positionFound = true;
              break;
            }
          }
          if (!positionFound) {
            finalDropPos.set(position);
          }
          var startPos = new Vec3(position.x, position.y + 30, position.z);
          comp.init(item, startPos, position);
          var hideTextNodes = ["nodeName", "lbName", "lblCount", "lblName"];
          hideTextNodes.forEach(function (nodeName) {
            var textNode = comp.node.getChildByName(nodeName);
            if (textNode) {
              textNode.active = false;
            }
          });
          comp.flyTo = this.createPataFlyTo(targetNode, callback, scale);
          this.playTreasureDropAnimation(comp, startPos, finalDropPos);
        }

        /**
         * 播放宝箱掉落动画（从怪物身上爆出）
         * @param comp 宝箱组件
         * @param startPos 起始位置（怪物位置）
         * @param finalPos 最终掉落位置
         */;
        _proto.playTreasureDropAnimation = function playTreasureDropAnimation(comp, startPos, finalPos) {
          var _this = this;
          var node = comp.node;
          node.setScale(0.3, 0.3, 0.3);
          node.setPosition(startPos);
          var midPos = new Vec3((startPos.x + finalPos.x) / 2, Math.max(startPos.y, finalPos.y) + 150, startPos.z);

          // 第一阶段：爆出效果（缩放变大 + 向上弹起）
          tween(node).to(0.15, {
            scale: v3(0.6, 0.6, 0.6),
            position: v3(startPos.x, startPos.y + 60, startPos.z)
          }, {
            easing: "backOut"
          }).call(function () {
            // 第二阶段：抛物线运动到中间点
            tween(node).to(0.3, {
              position: midPos,
              scale: v3(0.5, 0.5, 0.5)
            }, {
              easing: "quartOut"
            }).call(function () {
              // 第三阶段：掉到地上
              tween(node).to(0.25, {
                position: finalPos,
                scale: v3(0.9, 0.9, 0.9) // 地面宝箱大小增加50%（原来0.6）
              }, {
                easing: "quartIn"
              }).call(function () {
                // 第四阶段：落地弹跳效果
                tween(node).to(0.1, {
                  scale: v3(0.75, 0.45, 0.75)
                }) // 压扁效果，保持比例
                .to(0.1, {
                  scale: v3(0.9, 0.9, 0.9)
                }) // 恢复到地面最终大小
                .call(function () {
                  // 延迟后自动飞向目标
                  _this.scheduleDropToTarget(comp, 0.8);
                }).start();
              }).start();
            }).start();
          }).start();

          // 添加旋转效果，让宝箱在空中旋转
          tween(node).by(0.7, {
            angle: 360 * 2
          }) // 总共旋转2圈
          .start();
        }

        /**
         * 延迟执行飞向目标的动画
         * @param comp 宝箱组件
         * @param delay 延迟时间（秒）
         */;
        _proto.scheduleDropToTarget = function scheduleDropToTarget(comp, delay) {
          App.scheduleMgr.scheduleOnce(function () {
            console.log("爬塔宝箱延迟后自动执行飞行动效");
            if (comp && comp.node && comp.node.isValid) {
              comp.flyTo(null);
            }
          }, comp, delay);
        }

        /**
         * 创建爬塔专用的飞行函数
         * @param targetNode 目标节点
         * @param callback 飞行完成后的回调函数
         * @param scale 宝箱缩放比例
         * @returns 飞行函数
         */;
        _proto.createPataFlyTo = function createPataFlyTo(targetNode, callback, scale) {
          if (scale === void 0) {
            scale = 0.4;
          }
          return function () {
            // 获取战斗相机和UI相机
            var playerCamera = App.battleMgr.battleMainViewCtrl.playerCamera.camera;
            var uiCamera = find("Canvas/Camera").getComponent(Camera);
            var pos = Utils.worldPositionCameraAToCameraB(this.node.worldPosition, playerCamera, uiCamera);
            App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp, this.node);
            var flyNode = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingGold);
            flyNode.setParent(targetNode.getParent());
            flyNode.setWorldPosition(pos);

            // 设置宝箱图标
            var imgItem = flyNode.getChildByName("imgItem").getComponent(Sprite);
            imgItem.spriteFrame = this.imgItem.spriteFrame;
            imgItem.node.setScale(scale, scale, scale);
            var hideTextNodes = ["nodeName", "lbName", "lblCount", "lblName"];
            hideTextNodes.forEach(function (nodeName) {
              var textNode = flyNode.getChildByName(nodeName);
              if (textNode) {
                textNode.active = false;
              }
            });

            // 执行飞行动画到目标位置
            EffectManager.flyTo(targetNode, flyNode, function () {
              App.soundMgr.playEffect(SoundDef.Sound_Audio_Reward1);
              App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingGold, flyNode);
              if (targetNode && targetNode.activeInHierarchy) {
                tween(targetNode).to(0.1, {
                  scale: v3(0.6, 0.6, 0.6)
                }).to(0.1, {
                  scale: v3(0.5, 0.5, 0.5)
                }).start();
              }
              callback == null || callback();
              console.log("爬塔宝箱飞行完成，回调已执行");
            });
          };
        };
        _proto.replaceItem = function replaceItem(oItem1, oItem2) {
          if (oItem2) {
            oItem1.item_count -= oItem2.item_count;
            if (oItem1.item_count <= 0) {
              return;
            }
          }
          for (var dx0 = 0; dx0 < this.allItems.length; dx0++) {
            var oItem0 = this.allItems[dx0];
            if (oItem0.bag_id) {
              continue;
            }
            if (oItem1.item_id != oItem0.item_id) {
              continue;
            }
            if (oItem1.item_count != oItem0.item_count) {
              continue;
            }

            // if (oItem1.item_count > oItem0.item_count) {
            //     vItem2.push({ item_id: oItem0.item_id, item_count: oItem1.item_count - oItem0.item_count })
            // } else if (oItem1.item_count < oItem0.item_count) {
            //     oItem0.item_count -= oItem1.item_count;
            //     this.allItems.push(oItem0);
            // }

            this.allItems[dx0] = oItem1;
            break;
          }
        };
        _proto.setBoxMonsterDropItem = function setBoxMonsterDropItem(item, count, position, bx_id, index) {
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp);
          var comp = node.getComponent(ItemFallingProp);
          // while (true) {
          for (var i = 0; i < 100; i++) {
            var pos = this.getPositionByIndex(position, count);
            if (App.mapMgr.checkCanMove(pos)) {
              comp.init(item, pos, position);
              comp.initBoxMonsterDrop(bx_id, index);
              return;
            }
          }
          comp.init(item, position, position);
          comp.initBoxMonsterDrop(bx_id, index);
        };
        _proto.addItem = function addItem(item) {};
        _createClass(FallingPropCtrl, [{
          key: "surpriseItem",
          get:
          //惊喜宝箱
          function get() {
            return this._surpriseItem;
          }
        }]);
        return FallingPropCtrl;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FaMuChang.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './PlaceGameMgr.ts', './App.ts', './ResBuildingModel.ts', './MonitorType.ts', './EventType.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, BuildingBase, BuildingStatus, BuildingType, PlaceGameMgr, App, ResBuildingModel, MonitorType, EventType, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      BuildingStatus = module.BuildingStatus;
      BuildingType = module.BuildingType;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ResBuildingModel = module.ResBuildingModel;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "8cfa1YeoppHAJq0iQiLH5sb", "FaMuChang", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 磨坊建筑类
       * 负责生产食物资源
       */
      var FaMuChang = exports('FaMuChang', (_dec = ccclass("FaMuChang"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "存储数量",
        tooltip: "存储数量文本"
      }), _dec6 = property({
        type: ProgressBar,
        displayName: "仓库存储进度",
        tooltip: "仓库存储数量进度条"
      }), _dec7 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(FaMuChang, _BuildingBase);
        function FaMuChang() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "numLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "numProgress", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor6, _assertThisInitialized(_this));
          /**
           * 数据模型
           */
          _this._dataModel = null;
          /**
           * 建造/升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 生产定时器
           */
          _this._productionTimer = null;
          return _this;
        }
        var _proto = FaMuChang.prototype;
        /**
         * 组件激活时调用
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetZiYuan, this.resGetZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSendZiYuan, this.resSendZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopUpgradeTimer();
          this.stopProductionTimer();
        }

        /**
         * 开始生产定时器
         */;
        _proto.startProductionTimer = function startProductionTimer() {
          var _this2 = this;
          this.stopProductionTimer();
          if (this.dataModel.status === BuildingStatus.IDLE || this.dataModel.status === BuildingStatus.WORKING) {
            this._productionTimer = setInterval(function () {
              _this2.produceResource();
            }, this.dataModel.shengChangeTime);
          }
        }

        /**
         * 停止生产定时器
         */;
        _proto.stopProductionTimer = function stopProductionTimer() {
          if (this._productionTimer) {
            clearInterval(this._productionTimer);
            this._productionTimer = null;
          }
        }

        /**
         * 生产资源
         */;
        _proto.produceResource = function produceResource() {
          if (!this.dataModel || this.dataModel.status === BuildingStatus.BUILDING) return;
          if (this.dataModel.curCangku >= this.dataModel.maxCangku) {
            App.log.logBusiness("\u78E8\u574A\u5B58\u50A8\u5DF2\u6EE1: \u5F53\u524D=" + this.dataModel.curCangku + ", \u6700\u5927=" + this.dataModel.maxCangku);
            return;
          }
          this.dataModel.curCangku += this.dataModel.shengChangeNum[0][1];
          this.updateProductionProgress();
        }

        /**
         * 更新生产进度条
         */;
        _proto.updateProductionProgress = function updateProductionProgress() {
          if (this.numLab && this.dataModel) {
            this.numLab.string = this.dataModel.curCangku + "/" + this.dataModel.maxCangku;
          }
          if (this.numProgress && this.dataModel) {
            var progress = this.dataModel.maxCangku > 0 ? this.dataModel.curCangku / this.dataModel.maxCangku : 0;
            this.numProgress.progress = Math.max(0, Math.min(1, progress));
          }
        }

        /**
         * 收集资源
         */;
        _proto.onCollectResClick = function onCollectResClick() {
          if (!this.dataModel) return 0;
          PlaceGameMgr.inst.reqGetZiYuan(this.dataModel.buildingUid, this.dataModel.buildType);
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.startUpgradeTimer();
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
          this.startUpgradeTimer();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }
        /**
         * 启动建造或者升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this3 = this;
          if (!this.dataModel.isUpgrading && this.dataModel.status !== BuildingStatus.BUILDING) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            return;
          }
          this.stopUpgradeTimer();
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.upgradeProgressBar.node.active = true;
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this3.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 建造计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getBuildProgress() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = 1 - this.dataModel.getBuildProgress();
          } else {
            this.stopUpgradeTimer();
            this.updateView();
          }
        };
        _proto.resSendZiYuan = function resSendZiYuan(msg) {
          if (msg.code !== 200) {
            return;
          }
          this.updateView();
        }

        /**
         * 接受资源领取
         * @param msg
         */;
        _proto.resGetZiYuan = function resGetZiYuan(msg) {
          this.dataModel.curCangku = 0;
          this.updateView();
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this.dataModel) return;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateBuildImg();
          this.updateProductionProgress();
          this.updateLevUpImg();
        }

        /**
         * 当建筑数据更新时调用
         * @param data
         * @returns
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, BuildingType.FaMuChang, this.dataModel.buildIndex);
          }
        }

        //======================子类虚函数=====================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.FaMuChang;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new ResBuildingModel(buildingIndex, buildingType, buildingUid, buildingLevel, this);
          this.dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
          this.startUpgradeTimer();
          this.startProductionTimer();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            if (this.dataModel.level > 0 && this.dataModel.checkFully()) {
              this.dataModel.status = BuildingStatus.FULLY;
            } else {
              if (this._productionTimer) {
                this.dataModel.status = BuildingStatus.WORKING;
              } else {
                this.dataModel.status = BuildingStatus.IDLE;
              }
            }
          }
          if (data) {
            if (data.ziyuans && data.ziyuans.length > 0) {
              this.dataModel.curCangku = data.ziyuans[0].num;
            } else {
              this.dataModel.curCangku = 0;
            }
            if (data.building_level !== oldLevel) {
              this.dataModel.level = data.building_level;
            }
            if (data.building_level <= 0 && data.upgrade_duration > 0) {
              this.dataModel.status = BuildingStatus.BUILDING;
              this.dataModel.isUpgrading = false;
            } else if (data.building_level > 0 && data.upgrade_duration > 0) {
              this.dataModel.isUpgrading = true;
            } else {
              this.dataModel.isUpgrading = false;
              this.dataModel.completeBuilding();
            }
            if (this.dataModel.level > 0) {
              var cfg = PlaceConfigMgr.inst.getZiyuanQuLevelConfig(this.dataModel.buildType, this.dataModel.level);
              if (cfg) {
                this.dataModel.shengChangeTime = cfg.shengchantime || 0;
              }
            }
          } else {
            this.dataModel.isUpgrading = false;
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }

        /**
         * 更新升级图标显示状态
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this.dataModel) return;
          var currentLevel = this.dataModel.level;
          var targetLevel = currentLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);

          // 如果已达到最大等级，隐藏升级图标
          if (currentLevel >= maxLevel) {
            this.lvUpImg.active = false;
            return;
          }

          // 检查是否满足升级条件
          var canUpgrade = PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, targetLevel);
          this.lvUpImg.active = canUpgrade;
        }

        /**
         * 建筑升级完成
         */;
        _proto.onBuildingUpgradeFinish = function onBuildingUpgradeFinish() {
          if (this.dataModel) {
            this.dataModel.status = BuildingStatus.IDLE;
            this.updateView();
          }
        };
        _createClass(FaMuChang, [{
          key: "dataModel",
          get: function get() {
            return this._dataModel;
          }
        }]);
        return FaMuChang;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "numLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "numProgress", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FlashDragonBones.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, dragonBones, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      dragonBones = module.dragonBones;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "566afFsHJJHR5GawG5Ovfy7", "FlashDragonBones", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var FlashDragonBones = exports('default', (_dec = ccclass("FlashDragonBones"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(FlashDragonBones, _Component);
        function FlashDragonBones() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.duration = 0.25;
          _this._median = 0;
          _this._time = 0;
          _this._material = null;
          _this._db = null;
          return _this;
        }
        var _proto = FlashDragonBones.prototype;
        _proto.onLoad = function onLoad() {
          this._median = this.duration / 2;
          // 获取材质
          this._db = this.node.getComponent(dragonBones.ArmatureDisplay);
          this._material = this._db.customMaterial;
          // 设置材质对应的属性
          this._material.setProperty("u_rate", 1);
        };
        _proto.update = function update(dt) {
          if (this._time > 0) {
            this._time -= dt;
            this._time = this._time < 0 ? 0 : this._time;
            var rate = Math.abs(this._time - this._median) * 2 / this.duration;
            {
              // @ts-ignore
              var cache = this._db._materialCache;
              for (var i in cache) {
                var material = cache[i];
                material.setProperty("u_rate", rate);
              }
            }
          }
        };
        _proto.clickFlash = function clickFlash() {
          this._time = this.duration;
        };
        return FlashDragonBones;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FlashSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Material, sp, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Material = module.Material;
      sp = module.sp;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "c25ado18jRCn7GRdzUtYdqH", "FlashSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var FlashSpine = exports('default', (_dec = ccclass("FlashSpine"), _dec2 = property(Material), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(FlashSpine, _Component);
        function FlashSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.duration = 0.25;
          _this._median = 0;
          _this._time = 0;
          _this._first = true;
          _initializerDefineProperty(_this, "material", _descriptor, _assertThisInitialized(_this));
          _this._skeleton = null;
          return _this;
        }
        var _proto = FlashSpine.prototype;
        _proto.onLoad = function onLoad() {
          this._median = this.duration / 2;
          // 获取材质
          this._skeleton = this.node.getComponent(sp.Skeleton);
        };
        _proto.update = function update(dt) {
          if (this._time > 0) {
            this._time -= dt;
            var rate = Math.abs(this._time - this._median) * 2 / this.duration;
            {
              // @ts-ignore
              var cache = this._skeleton._materialCache;
              for (var i in cache) {
                var material = cache[i];
                material.setProperty("u_rate", rate);
              }
            }
            if (this._time < 0) {
              this._time = 0;
              this._skeleton.customMaterial = null;
            }
          }
        };
        _proto.clickFlash = function clickFlash() {
          if (this._time > 0 || !this._skeleton) return;
          this._skeleton.customMaterial = this.material;
          this._time = this.duration;
          // 设置材质对应的属性
          this.material.setProperty("u_rate", 1);
        };
        return FlashSpine;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "material", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FlashSprite.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Sprite, assetManager, Material, isValid, Component, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      assetManager = module.assetManager;
      Material = module.Material;
      isValid = module.isValid;
      Component = module.Component;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "91a2c1kMjVFyrAw0/iXYHsN", "FlashSprite", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var FlashSprite = exports('default', (_dec = ccclass("FlashSprite"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(FlashSprite, _Component);
        function FlashSprite() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.duration = 0.25;
          _this._median = 0;
          _this._time = 0;
          _this._material = null;
          _this._originalMaterial = null;
          _this._isFlashing = false;
          return _this;
        }
        var _proto = FlashSprite.prototype;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          this._median = this.duration / 2;

          // 保存原始材质
          var sprite = this.node.getComponent(Sprite);
          if (sprite) {
            this._originalMaterial = sprite.getSharedMaterial(0);
          }

          // 获取闪白材质
          assetManager.loadBundle(ModuleDef.SHADER, function (err, bundle) {
            if (err) {
              console.error("Failed to load shader bundle:", err);
              return;
            }
            bundle.load("flash_white/flash_red", Material, function (err, material) {
              if (err) {
                console.error("Failed to load flash material:", err);
                return;
              }
              _this2._material = material;
            });
          });
        };
        _proto.update = function update(dt) {
          if (this._time > 0) {
            this._time -= dt;
            this._time = this._time < 0 ? 0 : this._time;
            var rate = Math.abs(this._time - this._median) * 2 / this.duration;
            this._material && this._material.setProperty("u_rate", rate);

            // 闪白结束，恢复原始材质
            if (this._time <= 0 && this._isFlashing) {
              this._isFlashing = false;
              var sprite = this.node.getComponent(Sprite);
              if (sprite && this._originalMaterial) {
                sprite.setMaterialInstance(this._originalMaterial, 0);
              }
            }
          }
        };
        _proto.clickFlash = function clickFlash() {
          if (!this._material) {
            console.warn("Flash material not loaded yet");
            return;
          }
          var sprite = this.node.getComponent(Sprite);
          if (!sprite) {
            console.warn("No Sprite component found");
            return;
          }

          // 如果还没保存原始材质，现在保存
          if (!this._originalMaterial) {
            this._originalMaterial = sprite.getSharedMaterial(0);
          }

          // 只有在本体受击时才闪白
          this._time = this.duration;
          this._isFlashing = true;

          // 应用闪白材质
          sprite.setMaterialInstance(this._material, 0);
          this._material.setProperty("u_rate", 1);
        };
        _proto.onDestroy = function onDestroy() {
          // 组件销毁时恢复原始材质
          // 在 onDestroy 中，节点可能已经处于销毁状态，需要谨慎处理
          if (this._isFlashing && this._originalMaterial) {
            try {
              // 检查节点和组件是否仍然有效
              if (!isValid(this.node)) {
                return;
              }
              var sprite = this.node.getComponent(Sprite);
              if (!sprite || !isValid(sprite)) {
                return;
              }

              // 检查 setMaterialInstance 方法是否存在且可用
              if (typeof sprite.setMaterialInstance === "function") {
                // 再次检查原始材质是否有效
                if (isValid(this._originalMaterial)) {
                  sprite.setMaterialInstance(this._originalMaterial, 0);
                }
              }
            } catch (error) {
              // 如果恢复材质失败，静默处理（节点正在销毁中）
              console.warn("Failed to restore material in FlashSprite.onDestroy:", error);
            }
          }
        };
        return FlashSprite;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FlashSpriteRed.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Color, Sprite, tween, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Color = module.Color;
      Sprite = module.Sprite;
      tween = module.tween;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "3c39cixjGxJWpaNdLylIdgn", "FlashSpriteRed", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var FlashSpriteRed = exports('FlashSpriteRed', (_dec = ccclass("FlashSpriteRed"), _dec2 = property({
        type: Color
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(FlashSpriteRed, _Component);
        function FlashSpriteRed() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "flashDuration", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "flashColor", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "flashCount", _descriptor3, _assertThisInitialized(_this));
          // 闪烁次数
          _this.sprite = null;
          _this.originalColor = new Color();
          _this.isFlashing = false;
          return _this;
        }
        var _proto = FlashSpriteRed.prototype;
        _proto.onLoad = function onLoad() {
          this.sprite = this.node.getComponent(Sprite);
          if (this.sprite) {
            this.originalColor = this.sprite.color.clone();
          }
        }

        /**
         * 触发闪红效果
         */;
        _proto.flash = function flash() {
          if (!this.sprite || this.isFlashing) return;
          this.flashQuick();
          return;
        }

        /**
         * 简单的一次闪红，只切换到红色再切回
         */;
        _proto.flashQuick = function flashQuick() {
          var _this3 = this;
          if (!this.sprite) return;
          var original = null;
          if (!this.isFlashing) {
            original = this.sprite.color.clone();
          }
          var flash = new Color(255, 60, 60, 255); // 固定红色
          this.isFlashing = true;
          this.sprite.color = flash;
          setTimeout(function () {
            if (_this3.sprite && _this3.sprite.node && _this3.sprite.node.isValid && original) {
              _this3.sprite.color = original;
              _this3.isFlashing = false;
            }
          }, 100); // 保持红色约70ms后恢复
        }

        /**
         * 持续闪红一段时间
         */;
        _proto.flashForDuration = function flashForDuration(duration) {
          var _this4 = this;
          if (duration === void 0) {
            duration = 1.0;
          }
          if (!this.sprite || this.isFlashing) return;
          this.isFlashing = true;
          var original = this.sprite.color.clone();
          var flash = this.flashColor.clone();
          var startTime = Date.now();
          var flashInterval = setInterval(function () {
            if (!_this4.sprite) {
              clearInterval(flashInterval);
              return;
            }
            var elapsed = Date.now() - startTime;
            if (elapsed >= duration * 1000) {
              clearInterval(flashInterval);
              _this4.sprite.color = original;
              _this4.isFlashing = false;
              return;
            }

            // 切换颜色（闪烁效果）
            var isFlashPhase = Math.floor(elapsed / 100) % 2 === 0;
            _this4.sprite.color = isFlashPhase ? flash : original;
          }, 50); // 每50ms切换一次
        }

        /**
         * 立即停止闪红
         */;
        _proto.stopFlash = function stopFlash() {
          this.isFlashing = false;
          if (this.sprite && this.sprite.node && this.sprite.node.isValid) {
            this.sprite.color = this.originalColor.clone();
            tween(this.sprite).stop();
          }
        };
        _proto.onDestroy = function onDestroy() {
          this.stopFlash();
          this.sprite = null;
        };
        return FlashSpriteRed;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "flashDuration", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0.25;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "flashColor", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return new Color(255, 60, 60, 255);
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "flashCount", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 2;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FollowBullet.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletBase.ts', './BattleDefine.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Vec2, BulletBase, GameBattle;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec2 = module.Vec2;
    }, function (module) {
      BulletBase = module.BulletBase;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "71dc5ldbbZL159BLfQ2fD7n", "FollowBullet", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 跟踪子弹
       */
      var FollowBullet = exports('FollowBullet', (_dec = ccclass("FollowBullet"), _dec(_class = /*#__PURE__*/function (_BulletBase) {
        _inheritsLoose(FollowBullet, _BulletBase);
        function FollowBullet() {
          return _BulletBase.apply(this, arguments) || this;
        }
        var _proto = FollowBullet.prototype;
        _proto.init = function init() {
          _BulletBase.prototype.init.call(this);
          this._type = GameBattle.BulletType.Follow;
        };
        _proto.reuse = function reuse() {
          _BulletBase.prototype.reuse.call(this);
        };
        _proto.recovery = function recovery() {
          _BulletBase.prototype.recovery.call(this);
        };
        _proto.launch = function launch(bulletLauncherData) {
          _BulletBase.prototype.launch.call(this, bulletLauncherData);
        };
        _proto.checkHit = function checkHit(target) {
          var selfBox = this.getBoundingBoxToWorld();
          var targetPos = new Vec2(target.node.worldPosition.x, target.node.worldPosition.y);
          var hitPos = target.getHitPosition();
          targetPos.add2f(hitPos.x, hitPos.y);
          return selfBox.contains(targetPos);
        };
        return FollowBullet;
      }(BulletBase)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Formula.ts", ['cc'], function (exports) {
  var cclegacy, _decorator;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }],
    execute: function () {
      exports('Formula', void 0);
      cclegacy._RF.push({}, "90137istblFFaY7Wn5Ngzq+", "Formula", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Formula;
      (function (_Formula, _dec, _class, _class2) {
        var BattlePropFormula = (_dec = ccclass('BattlePropFormula'), _dec(_class = (_class2 = /*#__PURE__*/function () {
          function BattlePropFormula() {}
          BattlePropFormula.executeFormula = function executeFormula(formula, arg) {
            var fun = BattlePropFormula.formulaMap.get(formula);
            return fun(arg);
          }

          /**
           * Min(A+B+C+……+Z,100%)
           * A.加法，百分比，把所有子系统子项同一ID值全部加起来，如【A+B+C+……+Z】，上限最高100%；
           */;
          BattlePropFormula.addFormulaPercentLim_A = function addFormulaPercentLim_A(numArray) {
            var c = numArray.reduce(function (acc, curr) {
              return acc + curr;
            });
            return Math.min(c, 100);
          }

          /**
           * Min(A+B+C+……+Z,50000%)
           * B.加法，百分比，把所有子系统子项同一ID值全部加起来，如【A+B+C+……+Z】，无上限，但谨慎起见最高设定500倍，即50000%；
           */;
          BattlePropFormula.addFormulaPercent_B = function addFormulaPercent_B(numArray) {
            var c = numArray.reduce(function (acc, curr) {
              return acc + curr;
            });
            return c;
            // return Math.min(c,500) ;
          };

          BattlePropFormula.addFormulaInt_C = function addFormulaInt_C(numArray) {
            var c = numArray.reduce(function (acc, curr) {
              return acc + curr;
            });
            return Math.min(c, Number.MAX_SAFE_INTEGER);
          };
          BattlePropFormula.multiFormula_D = function multiFormula_D(numArray) {
            // let tempFun = (arr: any, cb: Function) => {
            //     let len = arr.length;
            //     if (len <= 0) {
            //         return;
            //     }
            //     for (let i = 0; i < len; i++) {
            //         let info = arr[i];
            //         if (info == undefined) {
            //             continue;
            //         }
            //         let ret = cb(info, i);
            //         if (ret) {
            //             break;
            //         }
            //     }
            // };

            var tempNumbers = numArray.map(function (num) {
              return num + 1;
            });
            var mulResult = 1;
            tempNumbers.forEach(function (item) {});
            return mulResult - 1;
          };
          BattlePropFormula.multiFormula_E = function multiFormula_E(numArray) {
            var tempNumbers = numArray.map(function (num) {
              return 1 - num;
            });
            var mulResult = 1;
            tempNumbers.forEach(function (item) {});
            return Math.min(1 - mulResult, 0);
          };
          BattlePropFormula.addFormulaInt_F = function addFormulaInt_F(numArray) {
            var c = numArray.reduce(function (acc, curr) {
              return acc + curr;
            });
            return c;
          };
          BattlePropFormula.addFormulaInt_G = function addFormulaInt_G(numArray) {
            var c = numArray.reduce(function (acc, curr) {
              return acc + curr;
            });
            return Math.min(c, Number.MIN_SAFE_INTEGER);
          };
          BattlePropFormula.addFormulaPercent_H = function addFormulaPercent_H(numArray) {
            var c = numArray.reduce(function (acc, curr) {
              return acc + curr;
            });
            return Math.min(c, Number.MIN_SAFE_INTEGER);
          }

          ////////////第三层公式//////////////////

          /**
           * 直接伤害
           */;
          BattlePropFormula.thirdDirectDamage = function thirdDirectDamage() {
            return undefined;
          };
          return BattlePropFormula;
        }(), _class2.formulaMap = new Map([[1, _class2.addFormulaPercentLim_A], [2, _class2.addFormulaPercent_B], [3, _class2.addFormulaInt_C], [4, _class2.multiFormula_D], [5, _class2.multiFormula_E], [6, _class2.addFormulaInt_F], [7, _class2.addFormulaInt_G], [8, _class2.addFormulaPercent_H]]), _class2)) || _class);
        _Formula.BattlePropFormula = BattlePropFormula;
      })(Formula || (Formula = exports('Formula', {})));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FrameUtil.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, tween, assetManager, SpriteFrame;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      tween = module.tween;
      assetManager = module.assetManager;
      SpriteFrame = module.SpriteFrame;
    }],
    execute: function () {
      cclegacy._RF.push({}, "3e48cywOjpBpLnzBA+A6Sjt", "FrameUtil", undefined);
      var FrameUtil = exports('default', /*#__PURE__*/function () {
        function FrameUtil() {}
        /** 播放帧动画 */
        FrameUtil.play = function play(sprite, frames, config, cb) {
          var _config$frameRate,
            _config$loop,
            _config$timeScale,
            _this = this;
          if (config === void 0) {
            config = {};
          }
          if (!sprite || !frames || frames.length === 0) {
            console.error("Sprite or frames is invalid");
            cb == null || cb(false);
            return;
          }
          var frameRate = (_config$frameRate = config.frameRate) != null ? _config$frameRate : 24;
          var loop = (_config$loop = config.loop) != null ? _config$loop : false;
          var timeScale = (_config$timeScale = config.timeScale) != null ? _config$timeScale : 1;
          if (frameRate <= 0) {
            console.error("Frame rate must be greater than 0");
            cb == null || cb(false);
            return;
          }

          // 计算总时长（秒）
          var totalDuration = frames.length / frameRate / timeScale;

          // 停止之前的动画
          tween(sprite.node).stop();

          // 启用精灵
          sprite.enabled = true;

          // 设置初始帧
          sprite.spriteFrame = frames[0];
          var playFrames = function playFrames() {
            var sequence = tween(sprite.node);
            var nodeId = sprite.node.uuid;
            var _loop = function _loop(i) {
              var frameDuration = 1 / frameRate / timeScale;
              sequence = sequence.to(frameDuration, {}, {
                onUpdate: function onUpdate() {
                  sprite.spriteFrame = frames[i];
                }
              });
            };
            for (var i = 0; i < frames.length; i++) {
              _loop(i);
            }
            if (loop) {
              sequence.call(function () {
                playFrames();
              });
            } else {
              sequence.call(function () {
                cb == null || cb(true);
              });
            }
            sequence.start();
            _this._animationMap.set(nodeId, sequence);
          };
          playFrames();
        }

        /** 播放帧动画并等待完成回调 */;
        FrameUtil.playAndComplete = function playAndComplete(sprite, frames, config) {
          if (config === void 0) {
            config = {};
          }
          return new Promise(function (resolve) {
            FrameUtil.play(sprite, frames, config, function (result) {
              resolve(result);
            });
          });
        }

        /**
         * 播放帧动画并支持帧事件回调
         * @param sprite 精灵组件
         * @param frames 帧数组
         * @param config 动画配置
         * @param frameCallbacks 帧事件回调数组
         * @param cb 动画完成回调
         */;
        FrameUtil.playWithFrameEvents = function playWithFrameEvents(sprite, frames, config, frameCallbacks, cb) {
          var _config$frameRate2,
            _config$loop2,
            _config$timeScale2,
            _this2 = this;
          if (config === void 0) {
            config = {};
          }
          if (frameCallbacks === void 0) {
            frameCallbacks = [];
          }
          if (!sprite || !frames || frames.length === 0) {
            console.error("Sprite or frames is invalid");
            cb == null || cb(false);
            return;
          }
          var frameRate = (_config$frameRate2 = config.frameRate) != null ? _config$frameRate2 : 24;
          var loop = (_config$loop2 = config.loop) != null ? _config$loop2 : false;
          var timeScale = (_config$timeScale2 = config.timeScale) != null ? _config$timeScale2 : 1;

          // 记录已触发过一次的回调
          var triggeredOnceCallbacks = new Set();

          // 停止之前的动画
          this.stop(sprite);

          // 启用精灵
          sprite.enabled = true;

          // 设置初始帧
          sprite.spriteFrame = frames[0];
          var playFrames = function playFrames() {
            var sequence = tween(sprite.node);
            var nodeId = sprite.node.uuid;
            var _loop2 = function _loop2(i) {
              var frameDuration = 1 / frameRate / timeScale;
              sequence = sequence.to(frameDuration, {}, {
                onUpdate: function onUpdate() {
                  sprite.spriteFrame = frames[i];

                  // 检查帧事件回调
                  frameCallbacks.forEach(function (frameEvent) {
                    if (frameEvent.frameIndex === i) {
                      if (frameEvent.once) {
                        if (!triggeredOnceCallbacks.has(i)) {
                          frameEvent.callback();
                          triggeredOnceCallbacks.add(i);
                        }
                      } else {
                        frameEvent.callback();
                      }
                    }
                  });
                }
              });
            };
            for (var i = 0; i < frames.length; i++) {
              _loop2(i);
            }
            if (loop) {
              sequence.call(function () {
                triggeredOnceCallbacks.clear();
                playFrames();
              });
            } else {
              sequence.call(function () {
                triggeredOnceCallbacks.clear();
                // 动画结束后清理引用
                cb == null || cb(true);
              });
            }
            sequence.start();
            _this2._animationMap.set(nodeId, sequence);
          };
          playFrames();
        }

        /**
         * 停止帧动画
         * @param sprite 精灵组件
         */;
        FrameUtil.stop = function stop(sprite) {
          if (!sprite || !sprite.node) return;
          var nodeId = sprite.node.uuid;
          var tween = this._animationMap.get(nodeId);
          if (tween) {
            tween.stop();
            this._animationMap["delete"](nodeId);
          }
        }

        /**
         * 暂停帧动画
         * @param sprite 精灵组件
         */;
        FrameUtil.pause = function pause(sprite) {
          if (!sprite) return;
          // 暂停节点上的所有 tween
          var tweens = sprite.node._tweens;
          if (tweens) {
            tweens.forEach(function (t) {
              return t.pause == null ? void 0 : t.pause();
            });
          }
        }

        /**
         * 恢复帧动画
         * @param sprite 精灵组件
         */;
        FrameUtil.resume = function resume(sprite) {
          if (!sprite) return;
          // 恢复节点上的所有 tween
          var tweens = sprite.node._tweens;
          if (tweens) {
            tweens.forEach(function (t) {
              return t.resume == null ? void 0 : t.resume();
            });
          }
        }

        /**
         * 让精灵停止在指定帧
         * @param sprite 精灵组件
         * @param frames 帧数组
         * @param frameIndex 帧索引。0是开始，-1是最后一帧
         */;
        FrameUtil.stopAtFrame = function stopAtFrame(sprite, frames, frameIndex) {
          if (frameIndex === void 0) {
            frameIndex = 0;
          }
          if (!sprite || !frames || frames.length === 0) {
            console.error("Sprite or frames is invalid");
            return;
          }
          FrameUtil.stop(sprite);
          var index = frameIndex;
          if (frameIndex < 0) {
            // 最后一帧
            index = frames.length - 1;
          } else if (frameIndex === 0) {
            // 第一帧
            index = 0;
          } else if (frameIndex >= frames.length) {
            // 超出范围，取最后一帧
            index = frames.length - 1;
          }
          if (index >= 0 && index < frames.length) {
            sprite.spriteFrame = frames[index];
          }
        }

        /**
         * 获取动画时长（秒）
         * @param frames 帧数组
         * @param frameRate 帧率（帧/秒），默认24
         * @param timeScale 播放速度倍数，默认1
         * @returns 时长（秒）
         */;
        FrameUtil.getAnimationDuration = function getAnimationDuration(frames, frameRate, timeScale) {
          if (frameRate === void 0) {
            frameRate = 24;
          }
          if (timeScale === void 0) {
            timeScale = 1;
          }
          if (!frames || frames.length === 0) return 0;
          if (frameRate <= 0) return 0;
          return frames.length / frameRate / timeScale;
        }

        /**
         * 获取指定帧的时间点（秒）
         * @param frameIndex 帧索引
         * @param frameRate 帧率（帧/秒），默认24
         * @param timeScale 播放速度倍数，默认1
         * @returns 时间点（秒）
         */;
        FrameUtil.getFrameTime = function getFrameTime(frameIndex, frameRate, timeScale) {
          if (frameRate === void 0) {
            frameRate = 24;
          }
          if (timeScale === void 0) {
            timeScale = 1;
          }
          if (frameRate <= 0) return 0;
          return frameIndex / frameRate / timeScale;
        }

        /**
         * 检查帧数组是否有效
         * @param frames 帧数组
         * @returns 是否有效
         */;
        FrameUtil.isFramesValid = function isFramesValid(frames) {
          return frames && frames.length > 0;
        }

        /**
         * 获取帧数组的帧数
         * @param frames 帧数组
         * @returns 帧数
         */;
        FrameUtil.getFrameCount = function getFrameCount(frames) {
          return frames ? frames.length : 0;
        }

        /**
         * 获取Bundle
         * @param bundleName Bundle名称
         * @returns Bundle
         */;
        FrameUtil.getBundle = /*#__PURE__*/
        function () {
          var _getBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bundleName) {
            var _this3 = this;
            var bundle;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!this.bundleCache.has(bundleName)) {
                    _context.next = 2;
                    break;
                  }
                  return _context.abrupt("return", this.bundleCache.get(bundleName));
                case 2:
                  // 尝试获取已加载的Bundle
                  bundle = assetManager.getBundle(bundleName);
                  if (!bundle) {
                    _context.next = 6;
                    break;
                  }
                  this.bundleCache.set(bundleName, bundle);
                  return _context.abrupt("return", bundle);
                case 6:
                  return _context.abrupt("return", new Promise(function (resolve) {
                    assetManager.loadBundle(bundleName, function (err, loadedBundle) {
                      if (err) {
                        console.error("Failed to load bundle: " + bundleName, err);
                        resolve(null);
                      } else {
                        _this3.bundleCache.set(bundleName, loadedBundle);
                        resolve(loadedBundle);
                      }
                    });
                  }));
                case 7:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function getBundle(_x) {
            return _getBundle.apply(this, arguments);
          }
          return getBundle;
        }()
        /**
         * 从Bundle加载动画帧
         * @param bundleName Bundle名称
         * @param name 角色/对象名称
         * @param action 动作名称
         * @returns 帧数组
         */;

        FrameUtil.loadAnimationFrames = /*#__PURE__*/
        function () {
          var _loadAnimationFrames = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(bundleName, name, action) {
            var _this4 = this;
            var bundle, path;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  _context2.next = 2;
                  return this.getBundle(bundleName);
                case 2:
                  bundle = _context2.sent;
                  if (bundle) {
                    _context2.next = 5;
                    break;
                  }
                  throw new Error("Bundle not found: " + bundleName);
                case 5:
                  path = name + "/" + action;
                  return _context2.abrupt("return", new Promise(function (resolve, reject) {
                    bundle.loadDir(path, SpriteFrame, function (err, assets) {
                      if (err) {
                        reject(err);
                        return;
                      }
                      if (assets.length === 0) {
                        reject(new Error("No frames found at path: " + path));
                        return;
                      }
                      var frames = _this4.sortAndAdjustFrames(assets);
                      resolve(frames);
                    });
                  }));
                case 7:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function loadAnimationFrames(_x2, _x3, _x4) {
            return _loadAnimationFrames.apply(this, arguments);
          }
          return loadAnimationFrames;
        }()
        /**
         * 对帧进行排序并调整偏移
         * @param frames 帧数组
         * @returns 排序后的帧数组
         */;

        FrameUtil.sortAndAdjustFrames = function sortAndAdjustFrames(frames) {
          var sortedFrames = frames.sort(function (a, b) {
            var getFrameNumber = function getFrameNumber(name) {
              var match = name.match(/(\d+)$/);
              return match ? parseInt(match[1]) : 0;
            };
            var numA = getFrameNumber(a.name || "");
            var numB = getFrameNumber(b.name || "");
            return numA - numB;
          });

          // 找到所有帧中的最大高度
          var maxHeight = 0;
          sortedFrames.forEach(function (frame) {
            if (frame && frame.rect) {
              maxHeight = Math.max(maxHeight, frame.rect.height);
            }
          });

          // 调整所有帧的偏移，使其底部对齐
          sortedFrames.forEach(function (frame) {
            if (frame && frame.rect) {
              var heightDiff = maxHeight - frame.rect.height;
              frame.offset.y = heightDiff / 2;
            }
          });
          return sortedFrames;
        }

        /**
         * 生成资源键
         * @param bundleName Bundle名称
         * @param name 对象名称
         * @param action 动作名称
         * @returns 资源键
         */;
        FrameUtil.getResourceKey = function getResourceKey(bundleName, name, action) {
          if (action && action !== "") {
            return bundleName + "/" + name + "/" + action;
          } else {
            return bundleName + "/" + name;
          }
        }

        /**
         * 获取动画帧（自动加载和缓存）
         * @param resourceConfig 资源配置
         * @returns 帧数组
         */;
        FrameUtil.getAnimationFrames = /*#__PURE__*/
        function () {
          var _getAnimationFrames = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resourceConfig) {
            var key, loadPromise, frames;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  key = this.getResourceKey(resourceConfig.bundleName, resourceConfig.name, resourceConfig.action); // 从缓存中获取
                  if (!this.resourcePool.has(key)) {
                    _context3.next = 3;
                    break;
                  }
                  return _context3.abrupt("return", this.resourcePool.get(key));
                case 3:
                  if (!this.loadingResources.has(key)) {
                    _context3.next = 7;
                    break;
                  }
                  _context3.next = 6;
                  return this.loadingResources.get(key);
                case 6:
                  return _context3.abrupt("return", _context3.sent);
                case 7:
                  // 开始加载
                  loadPromise = this.loadAnimationFrames(resourceConfig.bundleName, resourceConfig.name, resourceConfig.action);
                  this.loadingResources.set(key, loadPromise);
                  _context3.prev = 9;
                  _context3.next = 12;
                  return loadPromise;
                case 12:
                  frames = _context3.sent;
                  this.resourcePool.set(key, frames);
                  this.loadingResources["delete"](key);
                  return _context3.abrupt("return", frames);
                case 18:
                  _context3.prev = 18;
                  _context3.t0 = _context3["catch"](9);
                  this.loadingResources["delete"](key);
                  throw _context3.t0;
                case 22:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this, [[9, 18]]);
          }));
          function getAnimationFrames(_x5) {
            return _getAnimationFrames.apply(this, arguments);
          }
          return getAnimationFrames;
        }()
        /**
         * 播放帧动画（自动加载资源）
         * 如果资源已缓存则直接播放，否则先加载再播放
         * @param sprite 精灵组件
         * @param resourceConfig 资源配置
         * @param config 动画配置
         * @param cb 完成回调
         */;

        FrameUtil.playWithResource = /*#__PURE__*/
        function () {
          var _playWithResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(sprite, resourceConfig, config, cb) {
            var frames;
            return _regeneratorRuntime().wrap(function _callee4$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  if (config === void 0) {
                    config = {};
                  }
                  _context4.prev = 1;
                  _context4.next = 4;
                  return this.getAnimationFrames(resourceConfig);
                case 4:
                  frames = _context4.sent;
                  this.play(sprite, frames, config, cb);
                  _context4.next = 12;
                  break;
                case 8:
                  _context4.prev = 8;
                  _context4.t0 = _context4["catch"](1);
                  console.error("Failed to play animation with resource:", _context4.t0);
                  cb == null || cb(false);
                case 12:
                case "end":
                  return _context4.stop();
              }
            }, _callee4, this, [[1, 8]]);
          }));
          function playWithResource(_x6, _x7, _x8, _x9) {
            return _playWithResource.apply(this, arguments);
          }
          return playWithResource;
        }()
        /**
         * 播放帧动画并等待完成（自动加载资源）
         * @param sprite 精灵组件
         * @param resourceConfig 资源配置
         * @param config 动画配置
         * @returns Promise<boolean>
         */;

        FrameUtil.playWithResourceAndComplete = /*#__PURE__*/
        function () {
          var _playWithResourceAndComplete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sprite, resourceConfig, config) {
            var _this5 = this;
            return _regeneratorRuntime().wrap(function _callee6$(_context6) {
              while (1) switch (_context6.prev = _context6.next) {
                case 0:
                  if (config === void 0) {
                    config = {};
                  }
                  return _context6.abrupt("return", new Promise( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(resolve) {
                    return _regeneratorRuntime().wrap(function _callee5$(_context5) {
                      while (1) switch (_context5.prev = _context5.next) {
                        case 0:
                          _context5.next = 2;
                          return _this5.playWithResource(sprite, resourceConfig, config, function (result) {
                            resolve(result);
                          });
                        case 2:
                        case "end":
                          return _context5.stop();
                      }
                    }, _callee5);
                  }))));
                case 2:
                case "end":
                  return _context6.stop();
              }
            }, _callee6);
          }));
          function playWithResourceAndComplete(_x10, _x11, _x12) {
            return _playWithResourceAndComplete.apply(this, arguments);
          }
          return playWithResourceAndComplete;
        }()
        /**
         * 播放帧动画并支持帧事件回调（自动加载资源）
         * @param sprite 精灵组件
         * @param resourceConfig 资源配置
         * @param config 动画配置
         * @param frameCallbacks 帧事件回调数组
         * @param cb 动画完成回调
         */;

        FrameUtil.playWithResourceAndFrameEvents = /*#__PURE__*/
        function () {
          var _playWithResourceAndFrameEvents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(sprite, resourceConfig, config, frameCallbacks, cb) {
            var frames;
            return _regeneratorRuntime().wrap(function _callee7$(_context7) {
              while (1) switch (_context7.prev = _context7.next) {
                case 0:
                  if (config === void 0) {
                    config = {};
                  }
                  if (frameCallbacks === void 0) {
                    frameCallbacks = [];
                  }
                  _context7.prev = 2;
                  _context7.next = 5;
                  return this.getAnimationFrames(resourceConfig);
                case 5:
                  frames = _context7.sent;
                  this.playWithFrameEvents(sprite, frames, config, frameCallbacks, cb);
                  _context7.next = 13;
                  break;
                case 9:
                  _context7.prev = 9;
                  _context7.t0 = _context7["catch"](2);
                  console.error("Failed to play animation with resource and frame events:", _context7.t0);
                  cb == null || cb(false);
                case 13:
                case "end":
                  return _context7.stop();
              }
            }, _callee7, this, [[2, 9]]);
          }));
          function playWithResourceAndFrameEvents(_x14, _x15, _x16, _x17, _x18) {
            return _playWithResourceAndFrameEvents.apply(this, arguments);
          }
          return playWithResourceAndFrameEvents;
        }()
        /**
         * 检查资源是否已加载
         * @param resourceConfig 资源配置
         * @returns 是否已加载
         */;

        FrameUtil.isResourceLoaded = function isResourceLoaded(resourceConfig) {
          var key = this.getResourceKey(resourceConfig.bundleName, resourceConfig.name, resourceConfig.action);
          return this.resourcePool.has(key);
        }

        /**
         * 预加载动画资源
         * @param resourceConfig 资源配置
         * @returns Promise<boolean>
         */;
        FrameUtil.preloadResource = /*#__PURE__*/
        function () {
          var _preloadResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(resourceConfig) {
            return _regeneratorRuntime().wrap(function _callee8$(_context8) {
              while (1) switch (_context8.prev = _context8.next) {
                case 0:
                  _context8.prev = 0;
                  _context8.next = 3;
                  return this.getAnimationFrames(resourceConfig);
                case 3:
                  return _context8.abrupt("return", true);
                case 6:
                  _context8.prev = 6;
                  _context8.t0 = _context8["catch"](0);
                  console.error("Failed to preload animation resource:", _context8.t0);
                  return _context8.abrupt("return", false);
                case 10:
                case "end":
                  return _context8.stop();
              }
            }, _callee8, this, [[0, 6]]);
          }));
          function preloadResource(_x19) {
            return _preloadResource.apply(this, arguments);
          }
          return preloadResource;
        }()
        /**
         * 批量预加载动画资源
         * @param resourceConfigs 资源配置数组
         * @returns Promise<boolean>
         */;

        FrameUtil.preloadResources = /*#__PURE__*/
        function () {
          var _preloadResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(resourceConfigs) {
            var _this6 = this;
            var loadPromises;
            return _regeneratorRuntime().wrap(function _callee9$(_context9) {
              while (1) switch (_context9.prev = _context9.next) {
                case 0:
                  _context9.prev = 0;
                  loadPromises = resourceConfigs.map(function (config) {
                    return _this6.getAnimationFrames(config);
                  });
                  _context9.next = 4;
                  return Promise.all(loadPromises);
                case 4:
                  return _context9.abrupt("return", true);
                case 7:
                  _context9.prev = 7;
                  _context9.t0 = _context9["catch"](0);
                  console.error("Failed to preload animation resources:", _context9.t0);
                  return _context9.abrupt("return", false);
                case 11:
                case "end":
                  return _context9.stop();
              }
            }, _callee9, null, [[0, 7]]);
          }));
          function preloadResources(_x20) {
            return _preloadResources.apply(this, arguments);
          }
          return preloadResources;
        }()
        /**
         * 清理指定Bundle的资源
         * @param bundleName Bundle名称
         */;

        FrameUtil.clearBundleResources = function clearBundleResources(bundleName) {
          var _this7 = this;
          var keysToDelete = [];
          for (var _iterator = _createForOfIteratorHelperLoose(this.resourcePool.keys()), _step; !(_step = _iterator()).done;) {
            var key = _step.value;
            if (key.startsWith(bundleName + "/")) {
              keysToDelete.push(key);
            }
          }
          keysToDelete.forEach(function (key) {
            _this7.resourcePool["delete"](key);
            _this7.loadingResources["delete"](key);
          });
          this.bundleCache["delete"](bundleName);
        }

        /**
         * 清理所有资源
         */;
        FrameUtil.clearAllResources = function clearAllResources() {
          this.resourcePool.clear();
          this.loadingResources.clear();
          this.bundleCache.clear();
          this._animationMap.clear();
        }

        /**
         * 获取所有已加载的资源键
         * @returns 资源键数组
         */;
        FrameUtil.getLoadedResourceKeys = function getLoadedResourceKeys() {
          return Array.from(this.resourcePool.keys());
        };
        return FrameUtil;
      }());
      /** 资源缓存池 */
      FrameUtil.resourcePool = new Map();
      /** 加载中的资源 */
      FrameUtil.loadingResources = new Map();
      /** Bundle 缓存 */
      FrameUtil.bundleCache = new Map();
      // 添加一个存储动画引用的Map
      FrameUtil._animationMap = new Map();
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FuHuaModel.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingModel.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, cclegacy, BuildingModel, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      BuildingModel = module.BuildingModel;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      cclegacy._RF.push({}, "8dcb9MjDvZNV4wiCTZouALt", "FuHuaModel", undefined);
      /**
       * 孵化中心数据模型
       */
      var FuHuaModel = exports('FuHuaModel', /*#__PURE__*/function (_BuildingModel) {
        _inheritsLoose(FuHuaModel, _BuildingModel);
        var _proto = FuHuaModel.prototype;
        /**
         * 计算设备提供的生产时间缩短（万分比）
         */
        _proto.calcPeopleBornTimeReduction = function calcPeopleBornTimeReduction() {
          if (!this.serverData || !this.serverData.shebeis) {
            return 0;
          }
          var totalReduction = 0;
          for (var _iterator = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step; !(_step = _iterator()).done;) {
            var shebei = _step.value;
            var config = PlaceConfigMgr.inst.getFuHuaSheBeiLevelConfig(shebei.shebei_id, shebei.shebei_level);
            if (config && config.peopleborn) {
              totalReduction += config.peopleborn;
            }
          }
          return totalReduction;
        }

        /**
         * 更新孵化间隔时间
         */;
        _proto.updateHatchInterval = function updateHatchInterval() {
          var cfg = PlaceConfigMgr.inst.getFuHuaLevelConfig(this.level);
          var baseTime = cfg ? cfg.peopleborn : 0;
          var reductionRate = this.calcPeopleBornTimeReduction() / 10000;
          var actualTime = baseTime * (1 - reductionRate);
          this._hatchInterval = actualTime / 1000;
        }

        /**
         * 获取孵化间隔时间
         */;
        /**
         * 计算设备提供的食物消耗减少（万分比）
         */
        _proto.calcFoodCostReduction = function calcFoodCostReduction() {
          if (!this.serverData || !this.serverData.shebeis) {
            return 0;
          }
          var totalReduction = 0;
          for (var _iterator2 = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step2; !(_step2 = _iterator2()).done;) {
            var shebei = _step2.value;
            var config = PlaceConfigMgr.inst.getFuHuaSheBeiLevelConfig(shebei.shebei_id, shebei.shebei_level);
            if (config && config.food_cost) {
              totalReduction += config.food_cost;
            }
          }
          return totalReduction;
        }

        /**
         * 计算设备提供的额外人口容量
         */;
        _proto.calcExtraPeopleMax = function calcExtraPeopleMax() {
          if (!this.serverData || !this.serverData.shebeis) {
            return 0;
          }
          var totalExtra = 0;
          for (var _iterator3 = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step3; !(_step3 = _iterator3()).done;) {
            var shebei = _step3.value;
            var config = PlaceConfigMgr.inst.getFuHuaSheBeiLevelConfig(shebei.shebei_id, shebei.shebei_level);
            if (config && config.peoplemax) {
              totalExtra += config.peoplemax;
            }
          }
          return totalExtra;
        }

        /**
         * 计算设备提供的生产奖励加成
         */;
        _proto.calcPeopleBornRewardBonus = function calcPeopleBornRewardBonus() {
          if (!this.serverData || !this.serverData.shebeis) {
            return [];
          }
          var rewardMap = new Map();
          for (var _iterator4 = _createForOfIteratorHelperLoose(this.serverData.shebeis), _step4; !(_step4 = _iterator4()).done;) {
            var shebei = _step4.value;
            var config = PlaceConfigMgr.inst.getFuHuaSheBeiLevelConfig(shebei.shebei_id, shebei.shebei_level);
            if (config && config.peopleborn_reward) {
              for (var _iterator5 = _createForOfIteratorHelperLoose(config.peopleborn_reward), _step5; !(_step5 = _iterator5()).done;) {
                var reward = _step5.value;
                var itemId = reward[0];
                var itemCount = reward[1];
                var currentCount = rewardMap.get(itemId) || 0;
                rewardMap.set(itemId, currentCount + itemCount);
              }
            }
          }
          var result = [];
          rewardMap.forEach(function (count, itemId) {
            result.push([itemId, count]);
          });
          return result;
        }

        /**
         * 构造函数
         * @param buildingUid 建筑UID
         * @param type 建筑类型
         * @param buildingIndex 建筑序列号
         * @param level 初始等级
         */;
        function FuHuaModel(buildIndex, buildType, buildingUid, level, owner) {
          var _this;
          if (level === void 0) {
            level = 1;
          }
          _this = _BuildingModel.call(this, buildIndex, buildType, buildingUid, level, owner) || this;
          /**
           * 当前人口数量
           */
          _this._curPersonNum = 0;
          /**
           * 剩余孵化时间（秒）
           */
          _this._lastFHTime = 0;
          /**
           * 孵化间隔时间（秒）
           */
          _this._hatchInterval = 0;
          /**
           * 剩余建造时间
           */
          _this._remainingBuildTime = 0;
          /**
           * 总建造时间
           */
          _this._totalBuildTime = 0;
          _this.updateHatchInterval();
          _this.resetFHTime();
          return _this;
        }

        /**
         * 设置服务器返回的建筑数据
         * @param serverData 服务器返回的建筑数据
         */
        _proto.setServerData = function setServerData(serverData) {
          _BuildingModel.prototype.setServerData.call(this, serverData);
          this.updateHatchInterval();
        }

        /**
         * 获取剩余孵化时间
         */;
        /**
         * 增加人头
         */
        _proto.addPersonNum = function addPersonNum(num) {
          this._curPersonNum += num;
        }

        /**
         * 获取实际最大人口容量
         */;
        _proto.getActualMaxPeopleNum = function getActualMaxPeopleNum() {
          var baseMax = PlaceConfigMgr.inst.getFuHuaMaxPersonNum(this.level);
          var extraMax = this.calcExtraPeopleMax();
          return baseMax + extraMax;
        }

        /**
         * 检测是否满载
         * @returns
         */;
        _proto.checkFully = function checkFully() {
          return this._curPersonNum >= this.getActualMaxPeopleNum();
        }

        /**
         * 获取每次孵化获得的总奖励
         */;
        _proto.getPeopleBornReward = function getPeopleBornReward() {
          var cfg = PlaceConfigMgr.inst.getFuHuaLevelConfig(this.level);
          var baseReward = cfg ? cfg.peopleborn_reward : [];
          // 计算加成
          var bonusReward = this.calcPeopleBornRewardBonus();
          var rewardMap = new Map();
          for (var _iterator6 = _createForOfIteratorHelperLoose(baseReward), _step6; !(_step6 = _iterator6()).done;) {
            var reward = _step6.value;
            var itemId = reward[0];
            var itemCount = reward[1];
            rewardMap.set(itemId, (rewardMap.get(itemId) || 0) + itemCount);
          }
          for (var _iterator7 = _createForOfIteratorHelperLoose(bonusReward), _step7; !(_step7 = _iterator7()).done;) {
            var _reward = _step7.value;
            var _itemId = _reward[0];
            var _itemCount = _reward[1];
            rewardMap.set(_itemId, (rewardMap.get(_itemId) || 0) + _itemCount);
          }
          var result = [];
          rewardMap.forEach(function (count, itemId) {
            result.push([itemId, count]);
          });
          return result;
        }

        /**
         * 获取实际食物消耗
         */;
        _proto.getActualFoodCost = function getActualFoodCost() {
          var baseFoodCost = PlaceConfigMgr.inst.getFuHuaFoodCost(this.level);
          var reductionRate = this.calcFoodCostReduction() / 10000;
          var actualCost = [];
          for (var _iterator8 = _createForOfIteratorHelperLoose(baseFoodCost), _step8; !(_step8 = _iterator8()).done;) {
            var cost = _step8.value;
            var itemId = cost[0];
            var itemCount = cost[1];
            var reducedCount = Math.ceil(itemCount * (1 - reductionRate));
            actualCost.push([itemId, reducedCount]);
          }
          return actualCost;
        }

        /**
         * 减少孵化剩余时间
         */;
        _proto.decreaseFHTime = function decreaseFHTime(seconds) {
          if (seconds === void 0) {
            seconds = 1;
          }
          this._lastFHTime = Math.max(0, this._lastFHTime - seconds);
        }

        /**
         * 重置孵化时间
         */;
        _proto.resetFHTime = function resetFHTime() {
          this._lastFHTime = this.hatchInterval;
        };
        _proto.getRemainBuildTime = function getRemainBuildTime() {
          return this._remainingBuildTime;
        };
        _proto.getToTalBuildTime = function getToTalBuildTime() {
          return this._totalBuildTime;
        }

        /**
         * 开始建造升级
         * @param buildTime 建造时间
         * @param targetLevel 目标等级
         */;
        _proto.startBuildingUpgrade = function startBuildingUpgrade(buildTime, totalTime) {
          this._remainingBuildTime = buildTime;
          this._totalBuildTime = totalTime;
        }

        /**
         * 减少剩余建造时间
         * @param milliseconds 减少的毫秒数
         * @returns 剩余建造时间
         */;
        _proto.decreaseBuildTime = function decreaseBuildTime(milliseconds) {
          this._remainingBuildTime = Math.max(0, this._remainingBuildTime - milliseconds);
          return this._remainingBuildTime;
        }

        /**
         * 获取建造进度
         * @returns
         */;
        _proto.getBuildProgress = function getBuildProgress() {
          if (this._totalBuildTime <= 0) return 0;
          return Math.max(0, (this._totalBuildTime - this._remainingBuildTime) / this._totalBuildTime);
        }

        /**
         * 完成建造，执行升级
         */;
        _proto.completeBuilding = function completeBuilding() {
          this._remainingBuildTime = 0;
          this._totalBuildTime = 0;
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.updateHatchInterval();
          this.resetFHTime();
        };
        _createClass(FuHuaModel, [{
          key: "hatchInterval",
          get: function get() {
            return this._hatchInterval;
          }
        }, {
          key: "lastFHTime",
          get: function get() {
            return this._lastFHTime;
          }

          /**
           * 设置剩余孵化时间
           */,
          set: function set(value) {
            this._lastFHTime = Math.max(0, value);
          }

          /**
           * 获取当前人口数量
           */
        }, {
          key: "curPersonNum",
          get: function get() {
            return this._curPersonNum;
          },
          set: function set(value) {
            this._curPersonNum = Math.max(0, value);
          }
        }]);
        return FuHuaModel;
      }(BuildingModel));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/FuHuaZhongXin.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './App.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './Animal.ts', './FuHuaModel.ts', './EventType.ts', './MonitorType.ts', './Utils.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, ProgressBar, Sprite, Label, BuildingBase, BuildingStatus, AnimalType, BuildingType, App, PlaceGameMgr, PlaceConfigMgr, Animal, FuHuaModel, EventType, MonitorType, Utils;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Sprite = module.Sprite;
      Label = module.Label;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      BuildingStatus = module.BuildingStatus;
      AnimalType = module.AnimalType;
      BuildingType = module.BuildingType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      Animal = module.Animal;
    }, function (module) {
      FuHuaModel = module.FuHuaModel;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "84befh6SUpP05u0pE86YzU2", "FuHuaZhongXin", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 孵化中心建筑类
       */
      var FuHuaZhongXin = exports('FuHuaZhongXin', (_dec = ccclass("FuHuaZhongXin"), _dec2 = property({
        type: Node,
        displayName: "人头标签"
      }), _dec3 = property({
        type: Node,
        displayName: "动物节点",
        tooltip: "动物节点"
      }), _dec4 = property({
        type: ProgressBar,
        displayName: "人口进度条",
        tooltip: "人口进度条"
      }), _dec5 = property({
        type: Node,
        displayName: "孵化进度条",
        tooltip: "孵化进度条"
      }), _dec6 = property({
        type: Sprite,
        displayName: "孵化进度条",
        tooltip: "孵化进度条"
      }), _dec7 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec8 = property({
        type: Label,
        displayName: "升级剩余时间",
        tooltip: "升级剩余时间"
      }), _dec9 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(FuHuaZhongXin, _BuildingBase);
        function FuHuaZhongXin() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "personNumNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "animalNode", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "personPro", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "progress", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "proBar", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "timeLab", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor8, _assertThisInitialized(_this));
          /**
           * 孵化中心数据模型
           */
          _this._dataModel = null;
          /**
           * 孵化定时器
           */
          _this._hatchTimer = null;
          /**
           * 建造定时器
           */
          _this._upgradeTimer = null;
          /**
           * 是否正在孵化中
           */
          _this._isHatching = false;
          return _this;
        }
        var _proto = FuHuaZhongXin.prototype;
        /**
         * 组件激活时调用
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(EventType.BuildingFHGetReward, this.onBuildingFHGetReward, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResShebeiUpgrade, this.resShebeiUpgrade, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopHatchTimer();
          this.stopUpgradeTimer();
          this.unscheduleAllCallbacks();
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.getBuildType());
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.getBuildType(), targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 开始孵化定时器
         */;
        _proto.startHatchTimer = function startHatchTimer() {
          var _this2 = this;
          // 检查建筑是否解锁
          if (!this._dataModel.isUnlocked) {
            App.log.logBusiness("孵化中心未解锁，无法启动孵化定时器");
            return;
          }

          // 检查是否已满员
          if (this._dataModel.checkFully()) {
            this._dataModel.status = BuildingStatus.FULLY;
            App.log.logBusiness("孵化中心已满员，无法启动孵化定时器");
            return;
          }

          // 检查定时器是否已经存在，避免重复启动
          if (this._hatchTimer) {
            App.log.logBusiness("孵化定时器已存在，无需重复启动");
            return;
          }

          // 使用应用设备加成后的食物消耗
          var actualFoodCost = this._dataModel.getActualFoodCost();
          if (!App.bagMgr.checkPropEnoughList(actualFoodCost, false, false)) {
            App.log.logBusiness("孵化中心食物不足");
            return;
          }
          this._dataModel.lastFHTime = this._dataModel.hatchInterval;
          this._dataModel.status = BuildingStatus.WORKING;
          this._hatchTimer = setInterval(function () {
            _this2.onHatchTimerUpdate();
          }, 1000);
        }

        /**
         * 停止孵化定时器
         */;
        _proto.stopHatchTimer = function stopHatchTimer() {
          this.dataModel.status = BuildingStatus.IDLE;
          if (this._hatchTimer) {
            clearInterval(this._hatchTimer);
            this._hatchTimer = null;
          }
        }

        /**
         * 建造定时器更新回调
         */;
        _proto.onHatchTimerUpdate = function onHatchTimerUpdate() {
          if (!this._hatchTimer) {
            App.log.logBusiness("孵化定时器已被清除，跳过onHatchTimerUpdate执行");
            return;
          }
          if (!this.node.isValid) return;
          if (this.dataModel.checkFully()) {
            this.stopHatchTimer();
            return;
          }
          if (this._dataModel.lastFHTime > 0) {
            this._dataModel.decreaseFHTime(1);
            this.updateFHProgressBar();
          } else {
            this.progress.active = false;
            this.stopHatchTimer();
            PlaceGameMgr.inst.reqFuHua(this._dataModel.buildingUid, this._dataModel.buildType);
          }
        };
        _proto.onBuildingFHGetReward = function onBuildingFHGetReward(buildingUid) {
          if (this._dataModel.buildingUid !== buildingUid) {
            return;
          }
          this.hatchAnimal();
        }

        /**
         * 孵化动物
         */;
        _proto.hatchAnimal = function hatchAnimal() {
          this.updatePersonNum();
          this.spawnAnimal();
        }

        /**
         * 随机获取动物类型
         * @returns 动物类型
         */;
        _proto.getRandomAnimalType = function getRandomAnimalType() {
          var rand = Math.random();
          if (rand < 0.4) return AnimalType.CHICKEN;
          if (rand < 0.7) return AnimalType.DUCK;
          return AnimalType.GOOSE;
        }

        /**
         * 生成动物显示效果
         */;
        _proto.spawnAnimal = function spawnAnimal() {
          var _this3 = this;
          this._isHatching = true;
          var animalComp = this.animalNode.getComponent(Animal);
          var rewards = this._dataModel.getPeopleBornReward();
          animalComp.show(this.getRandomAnimalType(), rewards);
          this.scheduleOnce(function () {
            _this3._dataModel.resetFHTime();
            animalComp.hide();
            if (_this3._dataModel.checkFully()) {
              _this3._dataModel.status = BuildingStatus.FULLY;
            } else {
              _this3._dataModel.status = BuildingStatus.WORKING;
            }
            _this3._isHatching = false;
            _this3.startHatchTimer();
          }, 4);
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        };
        _proto.resShebeiUpgrade = function resShebeiUpgrade(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u8BBE\u5907\u5347\u7EA7\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this.updateView();
        }

        /**
         * 启动建造倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this4 = this;
          if (!this.dataModel.isUpgrading) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getFuHuaMaxLevel()) {
            App.log.logError("孵化中心已经达到最高级");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          if (remainTime <= 0) {
            this.stopUpgradeTimer();
            this.upgradeProgressBar.node.active = false;
            return;
          }
          if (this._upgradeTimer && Math.abs(this.dataModel.getRemainBuildTime() - remainTime) < 0.5) {
            return;
          }
          this.stopUpgradeTimer();
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, this.dataModel.level + 1);
          this._dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.upgradeProgressBar.node.active = true;
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this4.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 建造计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = this.dataModel.getBuildProgress();
            this.timeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          } else {
            this.stopUpgradeTimer();
          }
        }

        /**
         * 更新当前人口数量显示
         */;
        _proto.updatePersonNum = function updatePersonNum() {
          if (!this.personNumNode || !this._dataModel) {
            return;
          }
          if (!this._dataModel.isUnlocked || this._dataModel.status === BuildingStatus.LOCK) {
            this.personNumNode.active = false;
            return;
          }
          this.personNumNode.active = true;
          // 使用应用设备加成后的最大人口容量
          var maxNum = this._dataModel.getActualMaxPeopleNum();
          var personNumLabel = this.personNumNode.getChildByName("personNum");
          if (personNumLabel) {
            personNumLabel.getComponent(Label).string = this._dataModel.curPersonNum.toString() + "/" + maxNum.toString();
          }
          if (this.personPro) {
            this.personPro.progress = this._dataModel.curPersonNum / maxNum;
          }
        }

        /**
         * 更新进度条显示
         */;
        _proto.updateFHProgressBar = function updateFHProgressBar() {
          if (this.progress) {
            if (this.dataModel.checkFully()) {
              this.progress.active = false;
            } else if (!this._hatchTimer) {
              this.progress.active = false;
            } else {
              this.progress.active = true;
              var progress = 1 - this._dataModel.lastFHTime / this._dataModel.hatchInterval;
              this.proBar.fillRange = progress;
            }
          }
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          this.updatePersonNum();
          this.updateFHProgressBar();
          if (this.dataModel.isUpgrading) {
            this.startUpgradeTimer();
          } else {
            this.upgradeProgressBar.node.active = false;
          }
        }

        /**
         * 当建筑数据更新时调用
         * @param data
         * @returns
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
          if (!this._dataModel.checkFully() && !this._hatchTimer && this._dataModel.isUnlocked && !this._isHatching) {
            this.startHatchTimer();
          }
        }

        //==============================子类方法重载=======================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          App.log.logBusiness("\u5B75\u5316\u4E2D\u5FC3: \u521D\u59CB\u5316\u6570\u636E\u6A21\u578B - \u5E8F\u5217\u53F7: " + this.buildIndex);
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.FuHua;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 1 : 1;
          this._dataModel = new FuHuaModel(buildingIndex, buildingType, buildingUid, buildingLevel, this);
          this._dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
          this.startHatchTimer();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          if (!data) {
            return;
          }
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          this.dataModel.curPersonNum = data.total_people || 0;
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            if (this.dataModel.checkFully()) {
              this.dataModel.status = BuildingStatus.FULLY;
            } else {
              if (!this._hatchTimer) {
                this.dataModel.status = BuildingStatus.IDLE;
              }
            }
          }
          if (data.building_level !== oldLevel) {
            this.dataModel.level = data.building_level;
          }
          if (data.building_level <= 0 && data.upgrade_duration > 0) {
            this.dataModel.status = BuildingStatus.BUILDING;
            this.dataModel.isUpgrading = false;
          } else if (data.building_level > 0 && data.upgrade_duration > 0) {
            this.dataModel.isUpgrading = true;
          } else {
            this.dataModel.isUpgrading = false;
            this.dataModel.completeBuilding();
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("孵化中心播放升级动画");
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.dataModel.isUpgrading) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          }
        }
        //==============================子类方法重载=======================================
        ;

        _createClass(FuHuaZhongXin, [{
          key: "dataModel",
          get:
          /**
           * 获取当前等级
           */
          function get() {
            return this._dataModel;
          }
        }]);
        return FuHuaZhongXin;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "personNumNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "animalNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "personPro", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "progress", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "proBar", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GameBattleEnum.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "c055a0eiyxP9Yl6/jSJzr8x", "GameBattleEnum", undefined);
      /**所有碰撞组序号 */
      var allCollideGroupIndex = exports('allCollideGroupIndex', {
        wheel: 1,
        box: 2,
        ground: 3,
        connectMove: 5,
        checkCollideMonster: 6,
        colllideWall: 7,
        roadMonster1: 8,
        roadMonster2: 9,
        roadMonster3: 10,
        bullet: 11,
        saw: 14,
        fire: 15,
        ground2: 17,
        ground3: 18,
        collideGroundRoadMonster1: 21,
        collideGroundRoadMonster2: 23,
        collideGroundRoadMonster3: 25
      });

      /**箱子所有武器类型 */
      var allBoxWeaponType = exports('allBoxWeaponType', {
        saw: 0,
        machineGun: 1,
        fireGun: 2
      });
      /**火子弹的状态 */
      var fireBulleState = exports('fireBulleState', {
        init: 1,
        normal: 2,
        big: 3
      });
      /**怪物类型 */
      var monsterType = exports('monsterType', {
        nearEarthAttack: 0,
        earthRemoteAttack: 1,
        skyAttack: 2
      });
      /**怪物受重力状态 */
      var monsterGravityState = exports('monsterGravityState', {
        noGravity: 1,
        haveGravity: 2
      });
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GameBoot.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './GameDef.ts', './UtilityAndroid.ts', './UtilityPlatform.ts', './UtilityWeb.ts', './UtilityWx.ts', './DBRecord.ts', './UIMgr.ts', './ModuleDef.ts', './Ui_loading2.ts', './Layout_uiLogin.ts', './FakeProgressBar.ts', './UtilityH5Sdk.ts', './UtilityTT.ts', './App.ts', './UI_LoginView.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, JsonAsset, Label, sys, Component, find, Prefab, assetManager, Utils, GameDef, GameLogin_Enum, UtilityAndroid, UtilityPlatform, UtilityIWeb, UtilityWx, DBRecord, UIMgr, LayerType, ModuleDef, Ui_loading, Layout_uiLogin, FakeProgressBar, UtilityH5Sdk, UtilityTT, App, UI_LoginView;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      JsonAsset = module.JsonAsset;
      Label = module.Label;
      sys = module.sys;
      Component = module.Component;
      find = module.find;
      Prefab = module.Prefab;
      assetManager = module.assetManager;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      GameDef = module.default;
      GameLogin_Enum = module.GameLogin_Enum;
    }, function (module) {
      UtilityAndroid = module.default;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      UtilityIWeb = module.default;
    }, function (module) {
      UtilityWx = module.default;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      Ui_loading = module.Ui_loading;
    }, function (module) {
      Layout_uiLogin = module.Layout_uiLogin;
    }, function (module) {
      FakeProgressBar = module.FakeProgressBar;
    }, function (module) {
      UtilityH5Sdk = module.default;
    }, function (module) {
      UtilityTT = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UI_LoginView = module.UI_LoginView;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3, _class3;
      cclegacy._RF.push({}, "dd88blqXrhBK5grnfhAfciZ", "GameBoot", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var GameBoot = exports('GameBoot', (_dec = ccclass("GameBoot"), _dec2 = property(JsonAsset), _dec3 = property(FakeProgressBar), _dec4 = property(Label), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(GameBoot, _Component);
        function GameBoot() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "jsonAssets", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "fakeProgressBar", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbRebootTips", _descriptor3, _assertThisInitialized(_this));
          _this.progressBar = void 0;
          _this._flag = 0;
          return _this;
        }
        var _proto = GameBoot.prototype;
        _proto.onLoad = function onLoad() {
          App.log.logBusiness("GameBoot onLoad!!!,sys.os,sys.platform:", "启动", sys.os, sys.platform);
          if (!GameBoot.Instance) {
            GameBoot.Instance = this;
          } else {
            this.destroy();
            return;
          }
        }

        /**
         * 启动游戏
         */;
        _proto.gotoGame = /*#__PURE__*/
        function () {
          var _gotoGame = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _context.prev = 0;
                  this.startUpBeforeInit();
                  _context.next = 4;
                  return this.initializePlatformSDK();
                case 4:
                  _context.next = 6;
                  return this.loadGameResources();
                case 6:
                  this.enterLoginScene();
                  // 检查是否是私域用户
                  // this.checkUserIsSiyu();
                  _context.next = 13;
                  break;
                case 9:
                  _context.prev = 9;
                  _context.t0 = _context["catch"](0);
                  console.error("游戏启动失败:", _context.t0);
                  App.log.logError("GameBoot.gotoGame error:", _context.t0);
                case 13:
                case "end":
                  return _context.stop();
              }
            }, _callee, this, [[0, 9]]);
          }));
          function gotoGame() {
            return _gotoGame.apply(this, arguments);
          }
          return gotoGame;
        }()
        /**
         * 初始化平台SDK
         */;

        _proto.initializePlatformSDK = /*#__PURE__*/
        function () {
          var _initializePlatformSDK = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  _context2.t0 = GameDef.gameLoginType;
                  _context2.next = _context2.t0 === GameLogin_Enum.standAlone ? 3 : _context2.t0 === GameLogin_Enum.andoird ? 5 : _context2.t0 === GameLogin_Enum.wx ? 7 : _context2.t0 === GameLogin_Enum.p8_h5 ? 9 : _context2.t0 === GameLogin_Enum.tt ? 11 : 13;
                  break;
                case 3:
                  UtilityIWeb.initInstace();
                  return _context2.abrupt("break", 13);
                case 5:
                  UtilityAndroid.initInstace();
                  return _context2.abrupt("break", 13);
                case 7:
                  UtilityWx.initInstace();
                  return _context2.abrupt("break", 13);
                case 9:
                  UtilityH5Sdk.initInstace();
                  return _context2.abrupt("break", 13);
                case 11:
                  UtilityTT.initInstace();
                  return _context2.abrupt("break", 13);
                case 13:
                  _context2.next = 15;
                  return new Promise(function (resolve) {
                    UtilityPlatform.getInstance().init(function () {
                      resolve();
                    });
                  });
                case 15:
                  if (GameDef.gameLoginType === GameLogin_Enum.andoird) {
                    UtilityPlatform.getInstance().toJavaShowDialog();
                  }
                case 18:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function initializePlatformSDK() {
            return _initializePlatformSDK.apply(this, arguments);
          }
          return initializePlatformSDK;
        }()
        /**
         * 初始化需要提前加载的json配置
         */;

        _proto.initJsonData = function initJsonData() {
          for (var idx = 0; idx < this.jsonAssets.length; idx++) {
            var json = this.jsonAssets[idx];
            DBRecord.data[json.name] = json.json;
          }
        }

        /**
         * 启动前的初始化
         */;
        _proto.startUpBeforeInit = function startUpBeforeInit() {
          this.initJsonData();
          this.initRebootTips();
          GameDef.init();
          UIMgr.inst.init(this.node);
          App.launch(this);
        }

        /**
         * 加载游戏资源
         */;
        _proto.loadGameResources = /*#__PURE__*/
        function () {
          var _loadGameResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  console.log("开始加载游戏资源");

                  // 启动进度条
                  this.startProgressBar(true);

                  // TODO: 未来可以在这里获取启动图配置
                  // this.getLoginlnfoConfig(
                  //     (cfg) => {
                  //         // 按配置修改启动页面显示
                  //         console.error("修改启动页面显示");
                  //         this.fakeProgressBar.setCfg(cfg);
                  //     },
                  //     () => {
                  //         // 默认加载流程
                  //     }
                  // );

                  // 加载资源
                  _context3.next = 4;
                  return this.loadResources();
                case 4:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this);
          }));
          function loadGameResources() {
            return _loadGameResources.apply(this, arguments);
          }
          return loadGameResources;
        }() /**判断是否是私域用户 */;
        _proto.checkUserIsSiyu = function checkUserIsSiyu() {
          UtilityPlatform.getInstance().getUserIsSyByHttp().then(function (res) {
            console.error("私域用户返回", res);
            if (res.result === 1) {
              console.log("请求失败了------->>>>>>>>", res);
              // 显示默认F
              return;
            }
            UtilityPlatform.getInstance().isSiYuUser = res.data.isSy; // 1:是， 0:否
            UtilityPlatform.getInstance().roleidTime = res.data.roleidTime;
          });
        }

        /**
         * SDK初始化完毕回调（原生包使用）
         * 执行游戏正常的流程
         */;
        _proto.sdkInitFinish = /*#__PURE__*/
        function () {
          var _sdkInitFinish = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
            return _regeneratorRuntime().wrap(function _callee4$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  console.warn("sdk初始化完毕， 执行登录流程。");
                  if (!this.progressBar) {
                    this.progressBar = find("progressBar", this.node);
                  }
                  this.progressBar.active = true;

                  // 加载游戏资源
                  _context4.next = 5;
                  return this.loadGameResources();
                case 5:
                  // 进入登录场景
                  this.enterLoginScene();
                case 6:
                case "end":
                  return _context4.stop();
              }
            }, _callee4, this);
          }));
          function sdkInitFinish() {
            return _sdkInitFinish.apply(this, arguments);
          }
          return sdkInitFinish;
        }();
        _proto.update = function update(_dt) {
          App && App.update(_dt);
        }

        /**
         * 加载资源（异步）
         */;
        _proto.loadResources = /*#__PURE__*/
        function () {
          var _loadResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
            var _this2 = this;
            var _preloadRes, count, info, idx, bundle, _loop, _idx;
            return _regeneratorRuntime().wrap(function _callee5$(_context6) {
              while (1) switch (_context6.prev = _context6.next) {
                case 0:
                  //加载资源 json要排在第一位, (打点需求)
                  _preloadRes = [{
                    bundle: ModuleDef.BASE_COMMON,
                    url: "json",
                    type: "json"
                  }, {
                    bundle: ModuleDef.BASE_COMMON,
                    url: "prefab/view/UI_LoginView",
                    type: "prefab"
                  }, {
                    bundle: ModuleDef.BASE_COMMON,
                    url: "prefab/view/uiLoading",
                    type: "prefab"
                  }, {
                    bundle: ModuleDef.BASE_COMMON,
                    url: "prefab/view/uiEnterLoading",
                    type: "prefab"
                  }];
                  count = _preloadRes.length;
                  info = [];
                  for (idx = 0; idx < count; idx++) {
                    info[idx] = App.languageMgr.getLoginLanguage(idx + 1);
                  }
                  this.updateInfo(info[0]);

                  // 加载 bundle
                  _context6.next = 7;
                  return new Promise(function (resolve, reject) {
                    assetManager.loadBundle(ModuleDef.BASE_COMMON, null, function (err, bundle) {
                      if (err) {
                        reject(err);
                      } else {
                        console.log("------module:<" + ModuleDef.BASE_COMMON + ">loaded.");
                        resolve(bundle);
                      }
                    });
                  });
                case 7:
                  bundle = _context6.sent;
                  _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
                    var res;
                    return _regeneratorRuntime().wrap(function _loop$(_context5) {
                      while (1) switch (_context5.prev = _context5.next) {
                        case 0:
                          res = _preloadRes[_idx];
                          if (!(res.type === "prefab")) {
                            _context5.next = 7;
                            break;
                          }
                          console.log("boot___载入prefab.....", res.url);
                          _context5.next = 5;
                          return new Promise(function (resolve) {
                            bundle.preload(res.url, Prefab, function () {
                              resolve();
                            });
                          });
                        case 5:
                          _context5.next = 11;
                          break;
                        case 7:
                          if (!(res.type === "json")) {
                            _context5.next = 11;
                            break;
                          }
                          console.log("boot___载入json.....", res.url);
                          _context5.next = 11;
                          return new Promise(function (resolve) {
                            bundle.loadDir(res.url, JsonAsset, function (_err, assets) {
                              assets.forEach(function (jsonAsset) {
                                var jsonData = jsonAsset.json;
                                DBRecord.data[jsonAsset["_name"]] = jsonData;
                              });
                              resolve();
                            });
                          });
                        case 11:
                          // 更新加载提示信息
                          if (_idx < count - 1) {
                            _this2.updateInfo(info[_idx + 1]);
                          }
                        case 12:
                        case "end":
                          return _context5.stop();
                      }
                    }, _loop);
                  });
                  _idx = 0;
                case 10:
                  if (!(_idx < count)) {
                    _context6.next = 15;
                    break;
                  }
                  return _context6.delegateYield(_loop(), "t0", 12);
                case 12:
                  _idx++;
                  _context6.next = 10;
                  break;
                case 15:
                  // 资源加载完成
                  this.finishLoadRes();
                case 16:
                case "end":
                  return _context6.stop();
              }
            }, _callee5, this);
          }));
          function loadResources() {
            return _loadResources.apply(this, arguments);
          }
          return loadResources;
        }();
        _proto.onPreloadingComplete = function onPreloadingComplete() {
          this._flag++;
          console.warn("==*==*==*==*== onPreloadingComplete boot___载入完成了,flag,isNewPlayer========>:", this._flag, App.loginMgr.isNewPlayer);
          App.log.logBusiness("==*==*==*==*== onPreloadingComplete boot___载入完成了,flag,isNewPlayer========>:", "加载", this._flag, App.loginMgr.isNewPlayer);
          this.closeProgressBar(true);
          console.warn("==*==*==*==*== onPreloadingComplete boot___载入完成了,finish,isNewPlayer", App.loginMgr.isNewPlayer);
          // if (App.loginMgr.isNewPlayer) {
          // if (GameDef.privacyOpen) {
          // LoginDaDian.daDian(LoginDaDianType.bootEnd, 'boot to login page', UtilityPlatform.getInstance().uid, 0);
          UIMgr.inst.openOnce(UI_LoginView, LayerType.panel, Layout_uiLogin);
          // } else {
          // LoginDaDian.daDian(LoginDaDianType.bootEnd, 'boot to enterLoading', UtilityPlatform.getInstance().uid, 0);
          // myUiEnterLoading.Instance.loadRes();
          // }
          // } else {
          //     let loginServer = App.loginMgr.getLoginServer(App.loginMgr.serverCache);
          //     //勾选了自动登录、勾选了隐私协议
          //     // let condition1 = App.mixMgr.getIsAutoLogin() && App.mixMgr.getIsAgreeUserAndPrivacy();
          //     let condition1 = false;
          //     //服务没有维护、没有封号
          //     let condition2 = App.loginMgr.checkCanAutoLogin(loginServer);
          //     let autoLogin = condition1 && condition2;
          //     //跳过登录页，自动登录

          //     if (autoLogin) {
          //         App.loginMgr.selServer = loginServer;
          //         GameDef.gameSocket = loginServer.ip;
          //         console.warn('>>>>>>>>>> 自动登录服务器:', loginServer);
          //         myUiEnterLoading.Instance.loadRes();
          //         App.loginMgr.loginServer(loginServer, false);
          //     } else {
          //         LoginDaDian.daDian(LoginDaDianType.bootEnd, 'boot to login page', UtilityPlatform.getInstance().uid, 0);
          //         UIMgr.inst.open(Ui_login, LayerType.panel, Layout_uiLogin, ['登录了', { a: 1, b: 'ddd' }]);
          //     }
          // }
        }

        /**
         * 资源加载完成后的处理
         */;
        _proto.finishLoadRes = function finishLoadRes() {
          App.languageMgr.init();
          // 打开常驻的loading节点
          UIMgr.inst.open(Ui_loading, LayerType.load, null, null, function (ins) {
            GameBoot.loadingIns = ins;
          }, this);
        }

        /**
         * 进入登录场景
         */;
        _proto.enterLoginScene = function enterLoginScene() {
          this.onPreloadingComplete();
        };
        _proto.startProgressBar = function startProgressBar(isFirst) {
          this.fakeProgressBar.startProgress(isFirst);
        };
        _proto.showBg = function showBg(isFirst) {
          this.fakeProgressBar.showBG(isFirst);
        }

        /**
         * 关闭进度条
         * @param hideAll 是否隐藏所有 false的时候只隐藏进度条, 不隐藏背景动画
         */;
        _proto.closeProgressBar = function closeProgressBar(hideAll) {
          this.fakeProgressBar.close(hideAll);
        };
        _proto.updateInfo = function updateInfo(info) {
          this.fakeProgressBar.updateInfo(info);
        };
        _proto.onBtnRestart = function onBtnRestart() {
          console.log("onBtnRestart");
          Utils.reboot();
        };
        _proto.initRebootTips = function initRebootTips() {
          for (var i = 0; i < this.lbRebootTips.length; i++) {
            this.lbRebootTips[i].string = App.languageMgr.getLoginLanguage(6 + i);
          }
        };
        /**
         * 弱网时显示转圈loading
         * @param showTime 转圈毫秒时间
         * @param interval 间隔时间
         * @param delay 延迟时间
         * @param repeat 重复次数
         * @returns
         */
        GameBoot.startShowLagLoading = function startShowLagLoading(showTime, interval, delay, repeat) {
          if (delay === void 0) {
            delay = 0;
          }
          if (repeat === void 0) {
            repeat = 1;
          }
          if (!GameBoot.loadingIns) {
            return;
          }
          if (GameBoot.showLagLoadingTaskId) {
            GameBoot.clearShowLagLoading();
          }
          GameBoot.showLagLoadingTaskId = App.scheduleMgr.schedule(function () {
            GameBoot.loadingIns.run(0, showTime);
          }, this, interval, delay, repeat);
        }

        /**
         * 停止转圈loading
         * @returns
         */;
        GameBoot.clearShowLagLoading = function clearShowLagLoading() {
          if (!GameBoot.loadingIns) {
            return;
          }
          App.scheduleMgr.unschedule(this.showLagLoadingTaskId);
          GameBoot.showLagLoadingTaskId = undefined;
          GameBoot.loadingIns.onBack();
        }

        /**对节点图片进行更换 */;
        _proto.getLoginlnfoConfig = function getLoginlnfoConfig(hasConf, noChange) {
          console.error("开始获取启动图");
          UtilityPlatform.getInstance().getLoginlnfoConfigByHttp().then(function (res) {
            if (typeof res.code === "undefined" || res.data === null) {
              console.error("获取登录启动图和资质信息配置->服务器返回数据异常------->>>>>>>>", res);
              // 显示默认F
              noChange && noChange();
              return;
            }
            console.error("获取启动信息配置成功", res.data);
            UtilityPlatform.getInstance().loginPageConfig = res.data;
            hasConf && hasConf(res.data);
          });
          console.error("开始获取启动图");
        };
        return GameBoot;
      }(Component), _class3.Instance = null, _class3.loadingIns = null, _class3.showLagLoadingTaskId = void 0, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "jsonAssets", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "fakeProgressBar", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lbRebootTips", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GameConfig.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "7eded08eS1A8LwuJ5r4Tpvt", "GameConfig", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-12-25 10:15:37
       * @FilePath: \qianduan\assets\script\def\GameConfig.ts
       * @LastEditors: heyuanguang www.heyuanguang@qq.com
       * @LastEditTime: 2025-12-23 14:43:48
       * @Description: 文件功能描述
       */
      var GameConfig = exports('default', function GameConfig() {});
      /** 调试信息开关 */
      GameConfig.DebugInfo = {
        /** 显示角色实时信息 */
        showRoleInfo: false,
        /** 显示战斗UI信息 */
        showBattleUIInfo: true,
        /** 修改主角属性 */
        changePlayerAttribute: false,
        /** 打印子弹动画信息 */
        showBulletAniLog: false,
        /** 打印战报信息 */
        showBattleReportLog: true,
        /** 打印协议信息 */
        showBattleMessageLog: true,
        /** 打印怪物行为状态 */
        showMonsterBehaviorLog: false,
        /** 打印怪物技能信息 */
        showMonsterSkillLog: false,
        /** 打印buff信息 */
        showBuffLog: false,
        /** 打印掉落物信息 */
        showLootLog: false,
        /** 打印音效信息 */
        showSoundEffectLog: false,
        showBulletBox: false,
        showMonsterBox: false,
        showHeroBox: false,
        showSoldierBox: false,
        showAllBox: false,
        showMonsterHit: false,
        showHeroHit: false,
        showSoldierHit: false,
        debugSkillList: [],
        /** 玩家加buff出飘字 */
        showPlayerAddBuffTips: false,
        /**怪物只受一点伤害 */
        monsterDmgReduce: false,
        /**怪物增伤 */
        monsterDmgMax: false,
        /**玩家只受一点伤害 */
        playerDmgReduce: false,
        /**战斗中不创建怪物 */
        noMonster: false,
        /**战斗中不限制时间 */
        noTimeLimit: false,
        /*怪物不移动 */
        monterNoMove: false,
        /** 关闭GM */
        closeGm: false,
        /** 测试关卡 */
        testGuanQia: 0,
        /** 测试地貌，1为遗忘之森 */
        testDiMao: 0,
        /** 测试地块列表 */
        testMapList: [],
        /** 不刷boss */
        noBoss: false,
        /** 自动战斗调试 */
        autoFightDebug: false,
        useCollisionGrid: false
      };
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GameDef.ts", ['cc', './DBRecord.ts'], function (exports) {
  var cclegacy, DBRecord;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      var _class;
      cclegacy._RF.push({}, "0493bJAZgpNjLgDhF/FrHTt", "GameDef", undefined);

      /**
       * 平台枚举
       */
      var GamePlatform_Enum = exports('GamePlatform_Enum', /*#__PURE__*/function (GamePlatform_Enum) {
        GamePlatform_Enum[GamePlatform_Enum["DEBUG_H5"] = 0] = "DEBUG_H5";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_H5_1"] = 3] = "YONGYE_H5_1";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_H5_2"] = 4] = "YONGYE_H5_2";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_WX"] = 5] = "YONGYE_WX";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_DouXiao"] = 6] = "YONGYE_DouXiao";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_P8H5"] = 7] = "YONGYE_P8H5";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_tt_androidxxx"] = 8] = "YONGYE_tt_androidxxx";
        GamePlatform_Enum[GamePlatform_Enum["IOS"] = 9] = "IOS";
        GamePlatform_Enum[GamePlatform_Enum["TANXIAN_WX"] = 10] = "TANXIAN_WX";
        GamePlatform_Enum[GamePlatform_Enum["YONGYE_tt_andoird"] = 11] = "YONGYE_tt_andoird";
        GamePlatform_Enum[GamePlatform_Enum["TANXIAN_tt_android"] = 12] = "TANXIAN_tt_android";
        GamePlatform_Enum[GamePlatform_Enum["Mother_bag_android"] = 13] = "Mother_bag_android";
        GamePlatform_Enum[GamePlatform_Enum["TANXIAN_DouXiao"] = 14] = "TANXIAN_DouXiao";
        return GamePlatform_Enum;
      }({}));

      /**
       * 登录方式
       */
      var GameLogin_Enum = exports('GameLogin_Enum', /*#__PURE__*/function (GameLogin_Enum) {
        GameLogin_Enum[GameLogin_Enum["standAlone"] = 1] = "standAlone";
        GameLogin_Enum[GameLogin_Enum["andoird"] = 2] = "andoird";
        GameLogin_Enum[GameLogin_Enum["wx"] = 3] = "wx";
        GameLogin_Enum[GameLogin_Enum["p8_h5"] = 4] = "p8_h5";
        GameLogin_Enum[GameLogin_Enum["zong_you_h5"] = 5] = "zong_you_h5";
        GameLogin_Enum[GameLogin_Enum["zong_you_android"] = 6] = "zong_you_android";
        GameLogin_Enum[GameLogin_Enum["tt"] = 7] = "tt";
        GameLogin_Enum[GameLogin_Enum["qq"] = 8] = "qq";
        GameLogin_Enum[GameLogin_Enum["p8_h5_ios"] = 9] = "p8_h5_ios";
        return GameLogin_Enum;
      }({}));

      /**
       * 游戏配置
       */
      var GameDef = exports('default', /*#__PURE__*/function () {
        function GameDef() {}
        GameDef.init = function init() {
          GameDef.platId = GamePlatform_Enum.DEBUG_H5;
          var cfg = DBRecord.fetchId("Sdk", GameDef.platId);
          {
            cfg = DBRecord.fetchId("Sdk", GamePlatform_Enum.DEBUG_H5);
          }
          GameDef.appName = cfg.appName;
          // GameDef.baseUrl = cfg.baseUrl;
          GameDef.key = cfg.key;
          GameDef.appId = cfg.appId;
          GameDef.gameLoginType = cfg.gamePlatform_002;
          GameDef.showUserEdit = cfg.showUserEdit === 1;
          GameDef.wxVideoId = cfg.videoId;
          GameDef.skip = cfg.skip;
          GameDef.serverMap = GameDef.baseUrl + "/servermap.json";
          GameDef.serverList = GameDef.baseUrl + "/server_list.json";
          GameDef.serverConfig = GameDef.baseUrl + "/server.json?version=" + GameDef.version;
          {
            GameDef.gamePlatform_video = 1; // ******区分平台 1-apk || 单机, 2-wx || qq || tt || oppo  3-h5 平台  4-p8-h5  99-模拟广告成功
          }
        };

        return GameDef;
      }());
      _class = GameDef;
      /** 平台ID */
      GameDef.platId = GamePlatform_Enum.DEBUG_H5;
      /** 服务器地址 */
      GameDef.SERVER_URL = "wss://xzdjbtest.jvplay.cn:7401";
      /**
       * 审核时的服务器地址
       */
      GameDef.SERVER_URL_SHENHE = "wss://pre.jvplay.cn:7401";
      /** 公告地址，后缀接类型 1是公告 */
      GameDef.noticelink = "https://dhbclient.jvplay.cn/base/getNoticeBySite?site=";
      /** 游戏圈首页 */
      GameDef.RPKClubUrl = "-SSEykJvFV3pORt5kTNpS2fwtu92m0HliGKHO1vwqIkVO1j7QVcWRpAfMeuAnfNZcKSEYPaux-VVrbg8lWJWuhZg6Lp6GDaJqvGCWJ1oawA49THMP_CHsKLASiHjwD97O-Yc_z-VfjdQwtp_81SJhYxOXXwkm0qE6i_vaoT-ETe0tdV3X0cun8Tjp269p-0faaBWRZ1AXjhU3UoHVnUCzcsd8jXT75rc3nclh06mUxSNGA1YoR3EQ76HHbt279WTPwYf0ukaBYL9cWxJQ3ECs6zeQGrgJ_zGpUz5E8OmzlAMnpMOT9HLHsDJEq-f0-YGwpnQ1hFSLsnsYZtVQro9yg";
      /** 平台签名key */
      GameDef.KeyOfSite = {
        wjyzcswxxyx_android: "4cfd6795892f221d9fee73f4430bddd6",
        wjyzcswxxyx_android4: "9dec009e5b13a887bae2ba07b75fb283",
        wjyzcswxxyx_data: "4436c5b642ea10e0d5093f649cdb1cbe",
        wjyzcswxxyx_ios: "fc0e7bde4aeb93337ab5509e9b3b705e"
      };
      /** 日志输出：true-输出日志 false-不输出日志 */
      GameDef.LOG = true;
      /** 游戏appid */
      GameDef.appId = "5352023";
      /** 游戏名称 */
      GameDef.appName = "蛋蛋英雄";
      /** 版本号 */
      GameDef.version = "1.3.2";
      /** 登录方式：1-普通单机直连 2-p8 sdk(android) 3-微信 4-p8-h5 */
      GameDef.gameLoginType = 3;
      /** 是否使用快速跳过广告 */
      GameDef.useSkinVideo = false;
      /** 区分平台：1-apk/单机 2-wx/qq/tt/oppo 3-h5平台 99-模拟广告成功 */
      GameDef.gamePlatform_video = 2;
      /** 激励视频广告ID */
      GameDef.rewardVideo_CodeId = "950653715";
      /** 微信视频广告ID */
      GameDef.wxVideoId = "";
      /** 审核状态，true表示正在审核中 */
      GameDef.shenHeZhong = false;
      /** 隐私协议状态，true表示新玩家需要在登录页面同意用户协议才能进游戏 */
      GameDef.privacyOpen = false;
      /** 配置资源地址 */
      GameDef.cfgRes = "https://dhboss.jvplay.cn/zip/class";
      /** 活动配置地址 */
      GameDef.activityConfig = "https://dhbclient.jvplay.cn/base/getActivityConfig?site=";
      /** 活动配置测试地址 */
      GameDef.activityConfigTest = "http://192.168.110.3:8002/base/getActivityConfig?site=";
      /** 基础URL地址 */
      // public static baseUrl = "http://192.168.110.66:8181/houtai";
      GameDef.baseUrl = "http://121.41.108.167/houtai";
      /** 服务器映射配置 */
      GameDef.serverMap = "";
      /** 服务器列表配置 */
      GameDef.serverList = "";
      /** 服务器配置 */
      GameDef.serverConfig = "";
      /** 应用ID */
      GameDef.aid = "";
      /** 签名密钥 */
      GameDef.key = "";
      /** 站点标识 */
      GameDef.site = "";
      /** 是否显示账号输入框 */
      GameDef.showUserEdit = false;
      /** 是否需要跳过审核：0-不需要 1-需要 */
      GameDef.skip = 0;
      /** 从后台获取问卷数据 */
      GameDef.getQuestionnaireAddr = "https://dhbclient.jvplay.cn/base/getSurveyConfig";
      /** 从后台获取服务器状态和URL（正式环境） */
      GameDef.newServerStateInfo = "https://dhbclient.jvplay.cn/base/getSwitch";
      /** 从后台获取服务器状态和URL（调试环境） */
      GameDef.newServerStateInfoDebug = "http://192.168.110.58:8002/base/getSwitch";
      /** 从后台获取服务器状态和URL（需要校验token） */
      GameDef.newServerStateInfoCheckToken = "https://dhbclient.jvplay.cn/base/getSwitchCheck";
      /** 从后台获取服务器列表 */
      GameDef.newServerListInfo = "http://192.168.110.3:8002/api";
      /** 从后台获取服务器角色信息 */
      GameDef.newServerRoleInfo = "";
      /** 从后台获取的基础URL */
      GameDef.baseServerUrl = "";
      /** 获取微信分享配置 */
      GameDef.getShareConfig = "https://dhbclient.jvplay.cn/base/shareConfig";
      /** 获取登录页面配置 */
      GameDef.loginConfigUrl = _class.SERVER_URL + "/base/getLoginInfoConfig?site=";
      /** 微信分享打点 */
      GameDef.shareLog = "https://dhbclient.jvplay.cn/base/shareLog";
      /** 判断用户是否为私域用户 */
      GameDef.isSyUser = "https://center.yyingplay.com/sy/isSyUser";
      /** 获取开关配置 */
      GameDef.getSwitchConfig = "";
      /** 获取赛季订阅配置 */
      GameDef.getSeasonSubscribeConfig = "";
      /** 开关配置数据 */
      GameDef.switchConfig = null;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GameShareMgr.ts", ['cc', './MonitorType.ts', './NetChannelMgr.ts', './uiWxShareActivity.ts', './DBRecord.ts', './UtilityPlatform.ts', './env', './Http.ts', './SystemDef.ts', './App.ts', './GameDef.ts', './UtilGame.ts'], function (exports) {
  var cclegacy, MonitorType, netChannel, WxShareActivityDailyStatus, WxShareActivityType, DBRecord, UtilityPlatform, WECHAT, Http, SYS_ID, App, GameDef, UtilGame;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      WxShareActivityDailyStatus = module.WxShareActivityDailyStatus;
      WxShareActivityType = module.WxShareActivityType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      WECHAT = module.WECHAT;
    }, function (module) {
      Http = module.Http;
    }, function (module) {
      SYS_ID = module.SYS_ID;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameDef = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      cclegacy._RF.push({}, "846f3uHDUNKEaMpN8BfviMo", "GameShareMgr", undefined);

      /**微信分享配置 */

      /**分享打点类型 */
      var GameShareLogType = exports('GameShareLogType', /*#__PURE__*/function (GameShareLogType) {
        GameShareLogType[GameShareLogType["Share"] = 1] = "Share";
        GameShareLogType[GameShareLogType["ClickCard"] = 2] = "ClickCard";
        return GameShareLogType;
      }({}));

      /**分享打点 */
      var GameShareLogPoint = exports('GameShareLogPoint', /*#__PURE__*/function (GameShareLogPoint) {
        GameShareLogPoint["Daily"] = "share_daily";
        GameShareLogPoint["Invite"] = "share_activity";
        GameShareLogPoint["System"] = "share_System";
        return GameShareLogPoint;
      }({}));
      var GameShareMgr = exports('GameShareMgr', /*#__PURE__*/function () {
        function GameShareMgr() {
          /**微信每日分享状态*/
          this.shareDaiLyInof = void 0;
          /**微信邀请数据*/
          this.shareInviteInfo = void 0;
          /**微信分享配置*/
          this.shareConfig = void 0;
          /**微信分享配置-系统，玩家从微信三个点进入分享，单独一份配置*/
          this.shareConfigSystem = void 0;
        }
        var _proto = GameShareMgr.prototype;
        _proto._resetData = function _resetData() {
          console.log("GameShareManager _resetData");
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.web_wx_share_daily_status, this.recWxShareDailyStatus, this);
          App.monitorMgr.addEventListener(MonitorType.web_wx_share_daily_success, this.recWxShareDailySuccess, this);
          App.monitorMgr.addEventListener(MonitorType.web_wx_share_daily_reward, this.recWxShareDailyReward, this);
          App.monitorMgr.addEventListener(MonitorType.web_wx_share_invite_info, this.recWxShareInviteInfo, this);
          App.monitorMgr.addEventListener(MonitorType.web_wx_share_invite_reward, this.recWxShareInviteReward, this);
        };
        _proto.init = function init() {
          this._resetData();
          this.addEventListener();
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * 请求微信每日分享状态
         */;
        _proto.reqWxShareDailyStatus = function reqWxShareDailyStatus() {
          netChannel.game.send(MonitorType.web_wx_share_daily_status);
        }

        /**
         * 接收微信每日分享状态
         */;
        _proto.recWxShareDailyStatus = function recWxShareDailyStatus(msg) {
          console.log("WX_SHARE recWxShareDailyStatus", msg, msg.state);
          this.shareDaiLyInof = msg;
          if (!this.shareDaiLyInof.state) {
            this.shareDaiLyInof.state = WxShareActivityDailyStatus.NotShare;
          }
          App.monitorMgr.dispatchEvent(MonitorType.wx_share_daily_status_update);
        }

        /**
         * 提交微信每日分享成功
         */;
        _proto.reqWxShareDailySuccess = function reqWxShareDailySuccess() {
          netChannel.game.send(MonitorType.web_wx_share_daily_success);
        }

        /**
         * 接收微信每日分享成功
         */;
        _proto.recWxShareDailySuccess = function recWxShareDailySuccess(msg) {
          console.log("WX_SHARE recWxShareDailySuccess", msg);
          if (!msg.error_code) {
            this.shareDaiLyInof.state = msg.state;
            App.monitorMgr.dispatchEvent(MonitorType.wx_share_daily_success_update);
          }
        }

        /**
         * 请求微信每日分享奖励
         */;
        _proto.reqWxShareDailyReward = function reqWxShareDailyReward() {
          netChannel.game.send(MonitorType.web_wx_share_daily_reward);
        }

        /**
         * 接收微信每日分享奖励
         */;
        _proto.recWxShareDailyReward = function recWxShareDailyReward(msg) {
          console.log("WX_SHARE recWxShareDailyReward", msg);
          if (!msg.error_code) {
            this.shareDaiLyInof.state = WxShareActivityDailyStatus.Received;
            App.monitorMgr.dispatchEvent(MonitorType.wx_share_daily_status_update);
            if (msg.item_list) {
              UtilGame.showCommonAward(msg.item_list);
            }
          }
        }

        /**
         * 请求微信邀请状态
         */;
        _proto.reqWxShareInviteInfo = function reqWxShareInviteInfo() {
          netChannel.game.send(MonitorType.web_wx_share_invite_info);
        }

        /**
         * 接收微信邀请状态
         */;
        _proto.recWxShareInviteInfo = function recWxShareInviteInfo(msg) {
          console.log("WX_SHARE recWxShareInviteInfo", msg);
          this.shareInviteInfo = msg;
          if (!this.shareInviteInfo.count) {
            this.shareInviteInfo.count = 0;
          }
          App.monitorMgr.dispatchEvent(MonitorType.wx_share_invite_info_update);
        }

        /**
         * 请求微信邀请列表
         */;
        _proto.reqWxShareInviteList = function reqWxShareInviteList() {
          netChannel.game.send(MonitorType.web_wx_share_invite_list);
        }

        /**
         * 请求微信邀请奖励
         */;
        _proto.reqWxShareInviteReward = function reqWxShareInviteReward() {
          netChannel.game.send(MonitorType.web_wx_share_invite_reward);
        }

        /**
         * 接收微信邀请奖励
         */;
        _proto.recWxShareInviteReward = function recWxShareInviteReward(msg) {
          console.log("WX_SHARE recWxShareInviteReward", msg);
          if (msg.error_code) {
            return;
          }
          this.shareInviteInfo.reward_state = msg.reward_state;
          App.monitorMgr.dispatchEvent(MonitorType.wx_share_invite_info_update);
          if (msg.item_list) {
            UtilGame.showCommonAward(msg.item_list);
          }
        }

        /**
         * 检查每日是否可以分享
         * @returns
         */;
        _proto.checkCanShareDaily = function checkCanShareDaily() {
          if (!this.shareDaiLyInof) {
            return false;
          }
          if (this.shareDaiLyInof.state === WxShareActivityDailyStatus.NotShare) {
            return true;
          }
          return false;
        }

        /**
         * 检查每日是否可以领奖
         * @returns
         */;
        _proto.checkCanGetRewardDaily = function checkCanGetRewardDaily() {
          if (!this.shareDaiLyInof) {
            return false;
          }
          if (this.shareDaiLyInof.state === WxShareActivityDailyStatus.Shared) {
            return true;
          }
          return false;
        }

        /**
         * 检查某一档的奖励是否领取了
         * @param id  档位id
         */;
        _proto.checkInviteRewardGot = function checkInviteRewardGot(id) {
          if (!this.shareInviteInfo) {
            return false;
          }
          if (this.shareInviteInfo.reward_state.find(function (item) {
            return item === id;
          })) {
            return true;
          }
          return false;
        }

        /**
         * 检查某一档的奖励是否完成
         * @param id  档位id
         */;
        _proto.checkInviteFinish = function checkInviteFinish(id) {
          if (!this.shareInviteInfo) {
            return false;
          }
          var cfg = DBRecord.fetchId("FenXiangJiangLi", id);
          if (cfg.target_num <= this.shareInviteInfo.count) {
            return true;
          }
          return false;
        }

        /**
         * 检查邀请的奖励是否可领取
         */;
        _proto.checkCanGetInviteReward = function checkCanGetInviteReward() {
          if (!this.shareInviteInfo) {
            return false;
          }
          var cfgList = DBRecord.fetchAll("FenXiangJiangLi").filter(function (item) {
            return item.type === WxShareActivityType.Invite;
          });
          for (var index = 0; index < cfgList.length; index++) {
            var element = cfgList[index];
            if (this.checkInviteFinish(element.id) && !this.checkInviteRewardGot(element.id)) {
              return true;
            }
          }
          return false;
        }

        /**
         * 获取后台分享配置
         */;
        _proto.getShareConfig = function getShareConfig(sharePoint, cb) {
          var _this = this;
          if (!this.needShare()) {
            return;
          }
          var url = GameDef.getShareConfig + "?pointType=" + sharePoint;
          console.warn("****** WX_SHARE getShareConfig,send:", url);
          Http.Get_pro(url, function (result) {
            console.warn("****** WX_SHARE getShareConfig,result:", result);
            _this.shareConfig = result.data;
            if (cb) {
              cb(result.data);
            }
          }, function (msg) {
            console.warn("****** WX_SHARE getShareConfig,err:", msg);
          });
        }

        /**
         * 微信每日分享
         */;
        _proto.shareGame = function shareGame(sharePoint) {
          var _this2 = this;
          if (!this.needShare()) {
            return;
          }
          this.getShareConfig(sharePoint, function () {
            UtilityPlatform.getInstance().shareGame(_this2.shareConfig);
            _this2.gameShareLog(GameShareLogType.Share, _this2.shareConfig);
          });
        }

        /**
         * 游戏分享打点
         */;
        _proto.gameShareLog = function gameShareLog(type, shareCfg) {
          if (!this.needShare()) {
            return;
          }
          var data = {
            status: type,
            site: UtilityPlatform.getInstance().site //游戏标识（接入时获取参数）
          };

          if (type === GameShareLogType.ClickCard) {
            var option = UtilityPlatform.getInstance().getLaunchOptionsSync();
            console.warn("****** WX_SHARE gameShareLog,option:", option.query);
            if (!option.query) {
              return;
            }
            data["shareCardId"] = option.query["shareCardId"];
            data["shareRoleId"] = option.query["shareRoleId"];
            data["shareRoleName"] = option.query["shareRoleName"];
            data["shareServerId"] = option.query["shareServerId"];
            data["shareStrategyId"] = option.query["shareStrategyId"];
            data["shareUid"] = option.query["shareUid"];
            data["pointType"] = option.query["pointType"];
            data["beShareRoleId"] = App.roleMgr.getRoleUd();
            data["beShareRoleName"] = App.roleMgr.getRoleName();
            data["beShareServerId"] = App.loginMgr.selServer.sid;
            data["beShareUid"] = UtilityPlatform.getInstance().uid;
          } else {
            data["shareCardId"] = shareCfg.shareCardId;
            data["shareRoleId"] = App.roleMgr.getRoleUd();
            data["shareRoleName"] = App.roleMgr.getRoleName();
            data["shareServerId"] = App.loginMgr.selServer.sid;
            data["shareStrategyId"] = shareCfg.shareStrategyId;
            data["shareUid"] = UtilityPlatform.getInstance().uid;
            data["pointType"] = shareCfg.pointType;
          }
          console.warn("****** WX_SHARE gameShareLog,send:", GameDef.shareLog, JSON.stringify(data));
          var xhr = new XMLHttpRequest();
          xhr.open("POST", GameDef.shareLog, true);
          xhr.setRequestHeader("Content-Type", "application/json");
          xhr.send(JSON.stringify(data));
        };
        _proto.needShare = function needShare() {
          return WECHAT;
        }

        /**
         * 检查邀请红点
         */;
        _proto.checkInviteRedPoint = function checkInviteRedPoint() {
          if (!this.shareInviteInfo) {
            return false;
          }
          return this.checkCanGetInviteReward();
        }

        /**
         * 检查每日分享红点
         */;
        _proto.checkShareDailyRedPoint = function checkShareDailyRedPoint() {
          if (!this.shareDaiLyInof) {
            return false;
          }
          return this.checkCanGetRewardDaily() || this.checkCanShareDaily();
        }

        /**
         * 检查红点
         */;
        _proto.checkRedPoint = function checkRedPoint() {
          if (!App.lockMgr.checkFuncLock(SYS_ID.WxShare)) {
            return false;
          }
          return this.checkInviteRedPoint() || this.checkShareDailyRedPoint();
        };
        return GameShareMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GameStateMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _createClass, cclegacy, _decorator;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "4b6c4fdZjJEoIEs5EJZrJ7B", "GameStateMgr", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**游戏状态 */
      var GameState = exports('GameState', /*#__PURE__*/function (GameState) {
        GameState[GameState["None"] = 0] = "None";
        GameState[GameState["City"] = 1] = "City";
        GameState[GameState["Battle_ZhuxianGuanQia"] = 2] = "Battle_ZhuxianGuanQia";
        return GameState;
      }({}));
      var GameStateMgr = exports('GameStateMgr', (_dec = ccclass('GameStateMgr'), _dec(_class = /*#__PURE__*/function () {
        function GameStateMgr() {
          this._state = GameState.None;
        }
        var _proto = GameStateMgr.prototype;
        _proto.init = function init() {
          this._state = GameState.None;
        };
        _proto.dispose = function dispose() {
          this._state = GameState.None;
        };
        _createClass(GameStateMgr, [{
          key: "state",
          get: function get() {
            return this._state;
          },
          set: function set(v) {
            this._state = v;
          }
        }]);
        return GameStateMgr;
      }()) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GlobalData.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      var _class;
      cclegacy._RF.push({}, "12954sgjFlHRq69IYiAavEZ", "GlobalData", undefined);
      /*
       * @Author: nilhuang 5520026+nilhuang@user.noreply.gitee.com
       * @Date: 2022-05-31 22:57:37
       * @LastEditors: nil.huang
       * @LastEditTime: 2022-12-03 22:36:07
       * @FilePath: \oversea-game3.x\assets\script\data\GlobalData.ts
       * @Description: 全局数据
       */
      var GlobalData = exports('default', function GlobalData() {});
      _class = GlobalData;
      //读取配置文件  
      GlobalData.mainVersion = "99999";
      //主版本
      GlobalData.subVersion = 0;
      //热更版本
      GlobalData.showVersion = _class.mainVersion + "." + _class.subVersion;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GongBingYing.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './BingYingModel.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './App.ts', './MovingSoldierNPC.ts', './MonitorType.ts', './EventType.ts', './TrainingMgr.ts', './Utils.ts', './ActionFramesItem.ts', './DBRecord.ts', './ModuleDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, Prefab, Vec3, BuildingBase, SoldierType, BuildingType, BuildingStatus, BingYingModel, PlaceGameMgr, PlaceConfigMgr, App, MovingSoldierNPC, MonitorType, EventType, TrainingMgr, Utils, ActionFramesItem, DBRecord, ModuleDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
      Prefab = module.Prefab;
      Vec3 = module.Vec3;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingType = module.BuildingType;
      BuildingStatus = module.BuildingStatus;
    }, function (module) {
      BingYingModel = module.BingYingModel;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MovingSoldierNPC = module.MovingSoldierNPC;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      TrainingMgr = module.TrainingMgr;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
      cclegacy._RF.push({}, "effc8wwXzVHLaus4H8NYsNJ", "GongBingYing", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var GongBingYing = exports('GongBingYing', (_dec = ccclass("GongBingYing"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "建造进度条",
        tooltip: "建造进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "建造时间",
        tooltip: "建造时间"
      }), _dec6 = property(Node), _dec7 = property({
        type: ActionFramesItem,
        displayName: "英雄模型",
        tooltip: "英雄模型"
      }), _dec8 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "可升级图标"
      }), _dec9 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec10 = property({
        type: Label,
        displayName: "升级时间",
        tooltip: "升级时间"
      }), _dec11 = property({
        type: Node,
        displayName: "进入路线",
        tooltip: "NPC进入步兵营路线规划"
      }), _dec12 = property({
        type: Node,
        displayName: "出门路线",
        tooltip: "NPC离开步兵营到指挥部路线规划"
      }), _dec13 = property(Node), _dec14 = property(Label), _dec15 = property(Node), _dec16 = property(Node), _dec17 = property(Prefab), _dec18 = property(Vec3), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(GongBingYing, _BuildingBase);
        function GongBingYing() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jiaImg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildProgress", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildTimeLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroAni", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "timeLab", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "inLine", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "outLine", _descriptor11, _assertThisInitialized(_this));
          /**
           * 训练中的NPC父容器节点
           */
          _initializerDefineProperty(_this, "trainingNPCParent", _descriptor12, _assertThisInitialized(_this));
          /**
           * 预备兵数量显示节点
           */
          _initializerDefineProperty(_this, "reserveCountLab", _descriptor13, _assertThisInitialized(_this));
          /**
           * 兵营按钮组合
           */
          _initializerDefineProperty(_this, "btnNode", _descriptor14, _assertThisInitialized(_this));
          /**
           * 所有设备节点父容器
           */
          _initializerDefineProperty(_this, "xlShebeiParent", _descriptor15, _assertThisInitialized(_this));
          /**
           * 移动士兵NPC预制体
           */
          _initializerDefineProperty(_this, "movingSoldierPrefab", _descriptor16, _assertThisInitialized(_this));
          /**
           * NPC到达兵营的目标位置
           */
          _initializerDefineProperty(_this, "npcArrivePos", _descriptor17, _assertThisInitialized(_this));
          /**
           * 数据模型
           */
          _this._dataModel = null;
          /**
           * 训练定时器
           */
          _this._xlTimer = null;
          /**
           * 建造定时器
           */
          _this._buildTimer = null;
          /**
           * 升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 训练设备管理器
           */
          _this.trainingMgr = null;
          /**
           * 当前移动中的NPC列表
           */
          _this._movingNPCs = [];
          /**
           * 预备役NPC创建定时器ID列表
           */
          _this._reserveNPCTimers = [];
          /**
           * 前端记录的训练完成数量
           */
          _this._frontendReserveCount = 0;
          /**
           * 总训练数量（本次训练）
           */
          _this._totalTrainingCount = 0;
          /**
           * 每个NPC的训练时长
           */
          _this._trainingDuration = 0;
          /**
           * 转向对应关系
           */
          _this.inFaceMap = new Map([[1, 2], [2, 2], [3, 1], [4, 1]]);
          /**
           * 出门路线对应关系
           */
          _this.outFaceMap = new Map([[1, 1], [2, 1], [3, 2], [4, 2], [5, 2], [6, 2], [8, 2], [9, 2]]);
          _this.poolName = "MovingSoldierNPC_GB";
          return _this;
        }
        var _proto = GongBingYing.prototype;
        /**
         * 组件启用时的初始化
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
          this.initTrainingMgr();
          if (this.movingSoldierPrefab) {
            App.nodePoolMgr.createPool(this.poolName, this.movingSoldierPrefab, {
              preloadCount: 10,
              maxSize: 20,
              autoExpand: true
            });
          }
        }

        /**
         * 初始化训练设备管理器
         */;
        _proto.initTrainingMgr = function initTrainingMgr() {
          var _this2 = this;
          this.trainingMgr = new TrainingMgr();
          this.trainingMgr.initialize(this.xlShebeiParent, this.trainingNPCParent, SoldierType.GongBing, BuildingType.GongBingYing, function (npcId) {
            return _this2.onSingleTrainingComplete(npcId);
          });
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrain, this.resTrain, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrainFinish, this.resTrainFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.BuildingBtnClick, this.buildingBtnClick, this);
          App.monitorMgr.addEventListener(EventType.Close_Build_XunLianBtns, this.closeBuildXunLianBtns, this);
          App.monitorMgr.addEventListener(EventType.ui_open, this.closeBuildXunLianBtns, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopBuildTimer();
          this.stopUpgradeTimer();
          this.stopXLTimer();
          this.clearReserveNPCTimers();
          this.unscheduleAllCallbacks();
          for (var _iterator = _createForOfIteratorHelperLoose(this._movingNPCs), _step; !(_step = _iterator()).done;) {
            var npc = _step.value;
            if (npc && npc.node && npc.node.isValid) {
              npc.stopAndDestroy(this.poolName);
            }
          }
          this._movingNPCs = [];
          if (this.trainingMgr) {
            this.trainingMgr.destroy();
            this.trainingMgr = null;
          }
        };
        _proto.closeBuildXunLianBtns = function closeBuildXunLianBtns() {
          this.btnNode.active = false;
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.startUpgradeTimer();
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 训练协议响应
         */;
        _proto.resTrain = function resTrain(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this._totalTrainingCount = msg.train_count;
          this._trainingDuration = msg.training_duration;
          App.log.logBusiness("\u670D\u52A1\u5668\u8FD4\u56DE \u6B65\u5175\u8425\u8BAD\u7EC3\u5F00\u59CB - \u65B0\u589E\u6570\u91CF: " + msg.count + ", \u7D2F\u8BA1\u603B\u6570: " + this._totalTrainingCount + ", \u65F6\u957F: " + msg.training_duration + "\u6BEB\u79D2");
          this.createMovingNPCs(msg.count, this._trainingDuration);
          this.startXLTimer();
          this.updateView();
        }

        /**
         * 从路径节点中获取路径点数组
         * @param pathNode 路径节点，包含多个point子节点
         * @param npcLayer NPC父容器节点
         * @returns 路径点数组（世界坐标转换为父容器本地坐标）
         */;
        _proto.getPathPoints = function getPathPoints(pathNode, npcLayer) {
          var pathPoints = [];
          if (!pathNode) {
            return pathPoints;
          }

          // 获取所有子节点，按名称排序（point1, point2, ...）
          var pointNodes = pathNode.children.sort(function (a, b) {
            var aNum = parseInt(a.name.replace("point", "")) || 0;
            var bNum = parseInt(b.name.replace("point", "")) || 0;
            return aNum - bNum;
          });

          // 转换路径点为世界坐标
          for (var _iterator2 = _createForOfIteratorHelperLoose(pointNodes), _step2; !(_step2 = _iterator2()).done;) {
            var pointNode = _step2.value;
            var worldPos = pointNode.getWorldPosition();
            var localPos = npcLayer.inverseTransformPoint(new Vec3(), worldPos);
            pathPoints.push(localPos);
          }
          return pathPoints;
        }

        /**
         * 创建移动中的士兵NPC
         * @param count 士兵数量
         * @param trainingDuration 训练时长
         */;
        _proto.createMovingNPCs = function createMovingNPCs(count, trainingDuration) {
          var _this3 = this;
          if (!this.movingSoldierPrefab) {
            App.log.logError("步兵营：移动NPC预制体未设置");
            return;
          }
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            return;
          }
          var pathPoints = this.getPathPoints(this.inLine, npcLayer);
          var startPos = pathPoints[0];
          for (var i = 0; i < count; i++) {
            (function (npcId) {
              _this3.scheduleOnce(function () {
                var npcNode = App.nodePoolMgr.getNode(_this3.poolName);
                if (!npcNode) {
                  App.log.logError("\u521B\u5EFA\u79FB\u52A8NPC\u5931\u8D25: " + npcId);
                  return;
                }
                npcLayer.addChild(npcNode);
                npcNode.setPosition(startPos);
                var movingNPC = npcNode.getComponent(MovingSoldierNPC);
                if (!movingNPC) {
                  App.nodePoolMgr.putNode(_this3.poolName, npcNode);
                  return;
                }
                var faceDirection = _this3.inFaceMap.get(1) || 1;
                movingNPC.setFaceDirection(faceDirection);
                _this3._movingNPCs.push(movingNPC);

                // 开始沿路径点移动
                var resourceConfig = {
                  module: ModuleDef.NPC,
                  name: "npc_xiaoji",
                  action: "Move"
                };
                movingNPC.startMoveAlongPath(pathPoints, function (id, npc) {
                  _this3.onNPCArriveCallFunc(id, npc, trainingDuration);
                }, npcId, _this3.inFaceMap, resourceConfig);
              }, npcId * 0.5);
            })(i);
          }
        }

        /**
         * 创建模型移动到指挥部
         * @param count
         * @returns
         */;
        _proto.createMovingNPCsFromReserve = function createMovingNPCsFromReserve(count) {
          var _this4 = this;
          if (!this.movingSoldierPrefab) {
            App.log.logError("仓库：移动NPC预制体未设置");
            return;
          }
          this.clearReserveNPCTimers();
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            return;
          }
          var pathPoints = this.getPathPoints(this.outLine, npcLayer);
          for (var i = 0; i < count; i++) {
            (function (npcId) {
              var timerId = _this4.scheduleOnce(function () {
                var npcNode = App.nodePoolMgr.getNode(_this4.poolName);
                if (!npcNode) {
                  App.log.logError("\u521B\u5EFA\u79FB\u52A8NPC\u5931\u8D25: " + npcId);
                  return;
                }
                npcLayer.addChild(npcNode);
                var startWorldPos = _this4.node.getWorldPosition();
                var localStartPos = npcLayer.inverseTransformPoint(new Vec3(), startWorldPos);
                npcNode.setPosition(localStartPos);
                var movingNPC = npcNode.getComponent(MovingSoldierNPC);
                if (!movingNPC) {
                  npcNode.destroy();
                  return;
                }

                // 设置NPC朝向
                var faceDirection = _this4.outFaceMap.get(1) || 1;
                movingNPC.setFaceDirection(faceDirection);
                _this4._movingNPCs.push(movingNPC);

                // 开始沿路径点移动
                var resourceConfig = {
                  module: ModuleDef.SOLDIER,
                  name: "gongjianbing",
                  action: "Move"
                };
                movingNPC.startMoveAlongPath(pathPoints, function (id, npc) {
                  App.log.logBusiness("\u9884\u5907\u5F79NPC " + id + " \u5230\u8FBE\u76EE\u7684\u5730");
                  var index = _this4._movingNPCs.indexOf(npc);
                  if (index !== -1) {
                    _this4._movingNPCs.splice(index, 1);
                  }
                  npc.stopAndDestroy(_this4.poolName);
                }, npcId, _this4.outFaceMap, resourceConfig);
              }, npcId * 0.7);
              _this4._reserveNPCTimers.push(timerId);
            })(i);
          }
        }

        /**
         * NPC到达兵营回调（第一阶段）
         * @param npcId NPC ID
         * @param npc NPC组件
         * @param trainingDuration 训练时长
         */;
        _proto.onNPCArriveCallFunc = function onNPCArriveCallFunc(npcId, npc, trainingDuration) {
          App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5230\u8FBE\u5175\u8425\uFF0C\u68C0\u67E5\u7A7A\u95F2\u8BBE\u5907");
          if (!this.trainingMgr) {
            var index = this._movingNPCs.indexOf(npc);
            if (index !== -1) {
              this._movingNPCs.splice(index, 1);
            }
            npc.stopAndDestroy(this.poolName);
            return;
          }
          var trainingNPCNode = this.trainingMgr.getFreeEquipmentNode();
          if (trainingNPCNode) {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u83B7\u53D6\u5230\u7A7A\u95F2\u8BBE\u5907\uFF08\u5DF2\u9884\u5360\u7528\uFF09\uFF0C\u7EE7\u7EED\u79FB\u52A8\u5230\u8BBE\u5907\u4F4D\u7F6E");
            this.moveToEquipment(npc, npcId, trainingNPCNode, trainingDuration);
          } else {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u65E0\u7A7A\u95F2\u8BBE\u5907\uFF0C\u76F4\u63A5\u9500\u6BC1");
            // 没有空闲设备，直接销毁
            var _index = this._movingNPCs.indexOf(npc);
            if (_index !== -1) {
              this._movingNPCs.splice(_index, 1);
            }
            npc.stopAndDestroy(this.poolName);
          }
        }

        /**
         * NPC移动到训练设备（第二阶段）
         * @param npc NPC组件
         * @param npcId NPC ID
         * @param trainingNPCNode 目标设备的TrainingNPC节点
         * @param trainingDuration 训练时长
         */;
        _proto.moveToEquipment = function moveToEquipment(npc, npcId, trainingNPCNode, trainingDuration) {
          var _this5 = this;
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            npc.stopAndDestroy(this.poolName);
            return;
          }
          var targetWorldPos = trainingNPCNode.getWorldPosition();
          var localTargetPos = npcLayer.inverseTransformPoint(new Vec3(), targetWorldPos);
          var resourceConfig = {
            module: ModuleDef.NPC,
            name: "npc_xiaoji",
            action: "Move"
          };
          npc.startMoveTo(localTargetPos, function (id, npcObj) {
            _this5.onNPCArriveEquipment(id, npcObj, trainingNPCNode, trainingDuration);
          }, npcId, resourceConfig);
        }

        /**
         * NPC到达训练设备回调（第二阶段）
         * @param npcId NPC ID
         * @param npc NPC组件
         * @param trainingNPCNode 目标设备的TrainingNPC节点
         * @param trainingDuration 训练时长
         */;
        _proto.onNPCArriveEquipment = function onNPCArriveEquipment(npcId, npc, trainingNPCNode, trainingDuration) {
          App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5230\u8FBE\u8BAD\u7EC3\u8BBE\u5907\u4F4D\u7F6E");
          var index = this._movingNPCs.indexOf(npc);
          if (index !== -1) {
            this._movingNPCs.splice(index, 1);
          }
          npc.stopAndDestroy(this.poolName);
          if (!this.trainingMgr) {
            App.log.logError("\u6B65\u5175\u8425: trainingMgr\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F00\u59CB\u8BAD\u7EC3");
            return;
          }
          var started = this.trainingMgr.occupyEquipmentByNode(trainingNPCNode, npcId, trainingDuration);
          if (started) {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5F00\u59CB\u5728\u8BBE\u5907\u4E0A\u8BAD\u7EC3");
          } else {
            App.log.logError("\u6B65\u5175\u8425: NPC " + npcId + " \u65E0\u6CD5\u5F00\u59CB\u8BAD\u7EC3\uFF0C\u8BBE\u5907\u72B6\u6001\u5F02\u5E38");
          }
        }

        /**
         * 单个训练完成回调（由设备管理器调用）
         * 这是停止训练定时器的统一出口
         * @param npcId 完成训练的NPC ID
         */;
        _proto.onSingleTrainingComplete = function onSingleTrainingComplete(npcId) {
          App.log.logBusiness("NPC " + npcId + " \u5B8C\u6210\u8BAD\u7EC3");
          this.playTrainingCompleteAnimation(npcId);
          this._frontendReserveCount++;
          App.log.logBusiness("\u8BAD\u7EC3\u8FDB\u5EA6: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
          if (this._frontendReserveCount >= this._totalTrainingCount) {
            App.log.logBusiness("\u6240\u6709NPC\u90FD\u5B8C\u6210\u4E86\u8BAD\u7EC3\uFF0C\u524D\u7AEF\u8BB0\u5F55: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
            this.stopXLTimer();
            this._frontendReserveCount = 0;
            this._totalTrainingCount = 0;
          }
        }

        /**
         * 播放训练完成动画
         * @param npcId NPC ID
         */;
        _proto.playTrainingCompleteAnimation = function playTrainingCompleteAnimation(npcId) {
          if (!this.movingSoldierPrefab) {
            return;
          }
        }

        /**
         * 训练完成协议响应
         */;
        _proto.resTrainFinish = function resTrainFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          if (this._dataModel.serverData) {
            this._dataModel.serverData.reserve_count = msg.reserve_count;
            this._dataModel.serverData.train_count = msg.train_count;
          }
          this.updateReserveCount();
          App.log.logBusiness("\u540E\u7AEF\u6B65\u5175\u8425\u8BAD\u7EC3\u5B8C\u6210 - \u9884\u5907\u5F79: " + msg.reserve_count + ", \u8BAD\u7EC3\u4E2D: " + msg.train_count + ", \u524D\u7AEF\u8BB0\u5F55: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
        }

        /**
         * 当建筑数据更新时调用
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 启动建造倒计时
         */;
        _proto.startBuildTimer = function startBuildTimer() {
          var _this6 = this;
          if (this.dataModel.status !== BuildingStatus.BUILDING) {
            this.buildProgress.node.active = false;
            return;
          }
          if (this._buildTimer) {
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("出错 还没解锁");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.buildProgress.node.active = true;
          this.jiaImg.active = false;
          this.buildProgress.progress = this.dataModel.getBuildProgress();
          if (this.buildTimeLab) {
            this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          }
          this._buildTimer = setInterval(function () {
            _this6.onBuildTimerUpdate();
          }, 1000);
        }

        /**
         * 停止建造倒计时
         */;
        _proto.stopBuildTimer = function stopBuildTimer() {
          this.dataModel.completeBuilding();
          if (this.buildProgress.node) {
            this.buildProgress.node.active = false;
          }
          if (this._buildTimer) {
            clearInterval(this._buildTimer);
            this._buildTimer = null;
          }
        }

        /**
         * 建造更新
         */;
        _proto.onBuildTimerUpdate = function onBuildTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.buildProgress.progress = this.dataModel.getBuildProgress();
            if (this.buildTimeLab) {
              this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
            }
          } else {
            this.stopBuildTimer();
          }
        }

        /**
         * 启动升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this7 = this;
          if (!this.dataModel.isUpgrading) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("步兵营建筑已经达到最高级");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          if (remainTime <= 0) {
            this.stopUpgradeTimer();
            this.upgradeProgressBar.node.active = false;
            return;
          }
          if (this._upgradeTimer && Math.abs(this.dataModel.getRemainBuildTime() - remainTime) < 0.5) {
            return;
          }
          this.stopUpgradeTimer();
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.upgradeProgressBar.node.active = true;
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this7.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 升级计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = this.dataModel.getBuildProgress();
            this.timeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          } else {
            this.stopUpgradeTimer();
          }
        }

        /**
         * 开始训练定时器
         */;
        _proto.startXLTimer = function startXLTimer() {
          var _this8 = this;
          if (this._xlTimer) {
            App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u8BAD\u7EC3\u5B9A\u65F6\u5668\u5DF2\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u542F\u52A8");
            return;
          }
          App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u542F\u52A8\u8BAD\u7EC3\u5B9A\u65F6\u5668\uFF0C\u95F4\u9694100ms");
          this._xlTimer = setInterval(function () {
            _this8.updateXLProgress();
          }, 100);
        }

        /**
         * 停止训练定时器
         */;
        _proto.stopXLTimer = function stopXLTimer() {
          if (this._xlTimer) {
            App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u505C\u6B62\u8BAD\u7EC3\u5B9A\u65F6\u5668");
            clearInterval(this._xlTimer);
            this._xlTimer = null;
          }
        }

        /**
         * 更新训练进度
         */;
        _proto.updateXLProgress = function updateXLProgress() {
          if (!this.trainingMgr) return;
          this.trainingMgr.updateProgress(100);
          this.updateReserveCount();
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this._dataModel) return;
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.buildProgress.node.active = false;
            this.jiaImg.active = true;
            return;
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.jiaImg.active = false;
            this.startBuildTimer();
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateReserveCount();
          this.updateBuildImg();
          this.updateLevUpImg();
          if (this.dataModel.isUpgrading) {
            this.startUpgradeTimer();
          } else {
            this.upgradeProgressBar.node.active = false;
          }
          if (this.dataModel.serverData.entry_hero > 0) {
            this.heroAni.node.active = true;
            var heroCfg = DBRecord.fetchId("Hero", this.dataModel.serverData.entry_hero);
            if (heroCfg) {
              this.heroAni.playWithResource(ModuleDef.HERO, heroCfg.res, "Idle");
            }
          } else {
            this.heroAni.node.active = false;
          }
        }

        /**
         * 更新可升级图片显示
         * @returns
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this.dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }
        /**
         * 更新预备役士兵数量显示
         * 只显示服务器数据
         */;
        _proto.updateReserveCount = function updateReserveCount() {
          if (!this.reserveCountLab || !this._dataModel) return;
          this.reserveCountLab.string = "" + (this._dataModel.reserveCount || 0);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.btnNode.active) {
            this.btnNode.active = false;
            return;
          }
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            this.btnNode.active = true;
            App.monitorMgr.dispatchEvent(EventType.BuildingBtnClick, this.dataModel.buildingUid);
          }
        };
        _proto.buildingBtnClick = function buildingBtnClick(buildingUid) {
          if (!this.dataModel) return;
          if (this.dataModel.buildingUid === buildingUid) {
            return;
          }
          this.btnNode.active = false;
        }

        /**
         * 升级按钮点击
         */;
        _proto.onBtnUpgradeClick = function onBtnUpgradeClick() {
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            return;
          }
          if (this.dataModel.isUpgrading) {
            PlaceGameMgr.inst.showBuildUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          }
        }

        /**
         * 训练按钮点击
         */;
        _proto.onBtnXunLianClick = function onBtnXunLianClick() {
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            return;
          }
          PlaceGameMgr.inst.showTrainingView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
        }

        /**
         * 领取预备役士兵
         * @returns 领取预备役士兵
         */;
        _proto.onCangKuClick = function onCangKuClick() {
          var reserveCount = this._dataModel.reserveCount || 0;
          if (reserveCount <= 0) {
            App.log.logBusiness("没有预备役士兵可以领取");
            return;
          }
          this.createMovingNPCsFromReserve(reserveCount);
          PlaceGameMgr.inst.reqGetReserve(this.dataModel.buildingUid, this.dataModel.buildType);
        };
        _proto.clearReserveNPCTimers = function clearReserveNPCTimers() {
          var _this9 = this;
          this._reserveNPCTimers.forEach(function (timerId) {
            _this9.unschedule(timerId);
          });
          this._reserveNPCTimers = [];
        }

        //==============================子类方法重载=======================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          App.log.logBusiness("\u6B65\u5175\u8425: \u521D\u59CB\u5316\u6570\u636E\u6A21\u578B - \u5E8F\u5217\u53F7: " + this.buildIndex);
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.GongBingYing;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new BingYingModel(buildingUid, buildingType, buildingIndex, buildingLevel, this);
          this._dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            this.dataModel.status = BuildingStatus.IDLE;
          }
          if (data) {
            if (data.building_level !== oldLevel) {
              this.dataModel.level = data.building_level;
            }
            if (data.building_level <= 0 && data.upgrade_duration > 0) {
              this.dataModel.status = BuildingStatus.BUILDING;
              this.dataModel.isUpgrading = false;
            } else if (data.building_level > 0 && data.upgrade_duration > 0) {
              this.dataModel.isUpgrading = true;
            } else {
              this.dataModel.isUpgrading = false;
              this.dataModel.completeBuilding();
            }
          } else {
            this.dataModel.isUpgrading = false;
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        }

        /**
         * 播放升级动画
         */;
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("步兵营播放升级动画");
          // TODO: 播放升级动画
        }
        //==============================子类方法重载=======================================
        ;

        _createClass(GongBingYing, [{
          key: "dataModel",
          get:
          /**
           * 获取数据模型
           */
          function get() {
            return this._dataModel;
          }
        }]);
        return GongBingYing;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "jiaImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildProgress", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "buildTimeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "heroAni", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "inLine", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "outLine", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "trainingNPCParent", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "reserveCountLab", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "btnNode", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "xlShebeiParent", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "movingSoldierPrefab", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "npcArrivePos", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return new Vec3(0, 0, 0);
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/GongHui.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './App.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './EventType.ts', './UIUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, BuildingBase, App, PlaceConfigMgr, PlaceGameMgr, EventType, UIUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "65ef5Zn+bNKMLvjVfArzGGb", "GongHui", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var GongHui = exports('GongHui', (_dec = ccclass("GongHui"), _dec2 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(GongHui, _BuildingBase);
        function GongHui() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lvUpImg", _descriptor, _assertThisInitialized(_this));
          _this._dataModel = void 0;
          return _this;
        }
        var _proto = GongHui.prototype;
        _proto.initDataModel = function initDataModel(data) {
          // 初始化数据模型
          // TODO: 根据需要实现具体逻辑
          // 初始化后更新可升级图标
          this.updateLevUpImg();
        };
        _proto.updateDataModel = function updateDataModel(data) {
          // 更新数据模型
          // TODO: 根据需要实现具体逻辑
          // 更新后刷新可升级图标
          this.updateLevUpImg();
        }

        /**
         * 组件激活时调用
         */;
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          UIUtil.showTip("功能暂未开启");
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        return GongHui;
      }(BuildingBase), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Hero.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './RoleBase.ts', './HeroVO.ts', './HeroSkill.ts', './HeroModelFrameAnimation.ts', './HeroAI.ts', './App.ts', './BattleUtil.ts', './Utils.ts', './BattleProprMgr.ts', './SkillVO.ts', './HeroHPBar.ts', './GameConfig.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Sprite, Node, Label, UITransform, Vec3, v3, UIOpacity, GameBattle, RoleBase, HeroVO, HeroSkill, HeroModelFrameAnimation, HeroAI, App, BattleUtil, Utils, FormulaResultItem, BattlePropertyName, SkillBuffTiggerTime, SkillType, HeroHPBar, GameConfig;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
      v3 = module.v3;
      UIOpacity = module.UIOpacity;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      HeroVO = module.HeroVO;
    }, function (module) {
      HeroSkill = module.HeroSkill;
    }, function (module) {
      HeroModelFrameAnimation = module.HeroModelFrameAnimation;
    }, function (module) {
      HeroAI = module.HeroAI;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      FormulaResultItem = module.FormulaResultItem;
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      SkillBuffTiggerTime = module.SkillBuffTiggerTime;
      SkillType = module.SkillType;
    }, function (module) {
      HeroHPBar = module.HeroHPBar;
    }, function (module) {
      GameConfig = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "4a60c6iRB9FbZw2IY496QA5", "Hero", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 英雄单位
       */
      var Hero = exports('Hero', (_dec = ccclass("Hero"), _dec2 = property({
        type: HeroModelFrameAnimation
      }), _dec3 = property(Sprite), _dec4 = property(Node), _dec5 = property(Label), _dec6 = property(Label), _dec7 = property(UITransform), _dec8 = property(HeroHPBar), _dec(_class = (_class2 = /*#__PURE__*/function (_RoleBase) {
        _inheritsLoose(Hero, _RoleBase);
        function Hero() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleBase.call.apply(_RoleBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "view", _descriptor, _assertThisInitialized(_this));
          /** 选中 */
          _initializerDefineProperty(_this, "selectSp", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgYingZi", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroNameLabel", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTitle", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hitBox", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroHPBar", _descriptor7, _assertThisInitialized(_this));
          // 英雄ID
          _this._heroId = 0;
          /** 复活时间 */
          _this._reviveTime = 10;
          _this._heroAI = new HeroAI();
          _this._dt = 0;
          _this._AIdt = 0;
          // 奇偶帧分组
          _this._updateGroup = 0;
          _this._tempSkillTimes = 0;
          // 当前兵线
          _this._currentLane = 1;
          // 怒气值
          _this._rage = 0;
          // 复活倒计时
          _this._reviveCD = 0;
          // 是否在待命状态
          _this._isWaiting = true;
          // 是否可手动控制
          _this._isManualControl = false;
          /** 手动移动目标点（世界坐标） */
          _this._manualMoveTarget = null;
          _this._citySlotIndex = 0;
          /** 死亡回调函数 */
          _this._onDeadCallback = null;
          _this._endActionNames = ["Hookend"];
          /**
           * 刷新角色朝向
           */
          _this._targetDir = new Vec3();
          return _this;
        }
        var _proto = Hero.prototype;
        _proto._init = function _init() {
          this.view.init();
          this._isDead = false;
          this.type = GameBattle.RoleType.Hero;
          this._roleVO = new HeroVO();
          this._roleSkill = new HeroSkill();
          this._rage = 0;
          this._reviveCD = 0;
          this.isWaiting = true;
          this.view.owne = this;
          this.heroHPBar.node.active = false;
          this.reviveTime = this.roleVO.reviveCDTime;
          // this.roleVO.curHP = 10000;

          //战斗测试临时设置viewPath
          // this._roleVO.viewPath = `gongbing`;
        }

        /**
         * 初始化英雄数据
         */;
        _proto.initHeroData = function initHeroData(heroId, level, stage, star) {
          var _this2 = this;
          this._init();
          this._heroId = heroId;
          this.roleVO.initHeroData(heroId, level, stage, star);
          this.heroHPBar.owner = this;
          this.heroHPBar.node.active = false;
          this.roleSkill._owner = this;
          this.roleSkill.setAwakenedSkill(this.roleVO.atkId);
          this.atkSkill = this.roleSkill.awakenedSkill;
          this.roleSkill.initSkills(this.roleVO.skillIDList);
          if (this.heroNameLabel) {
            this.heroNameLabel.string = this.roleVO.name;
          }
          this._loadView(function () {
            _this2.isUsable = true;
            _this2.state.init(_this2.view);
            // 简化的碰撞点设置
            _this2.hitPos = v3(0, _this2.hitBox.height / 2);
            var s = _this2.roleVO.size / 10000;
            _this2.imgYingZi.setScale(s, s, s);
            if (_this2.view) {
              _this2.view.node.setScale(s, s, s);
              _this2.view.isFlipX = false;
            }
            var bodyPos = _this2.view.sprite_body.node.getPosition();
            _this2.view.sprite_body.node.setPosition(v3(bodyPos.x + _this2.roleVO.offset[0], bodyPos.y + _this2.roleVO.offset[1]));
            _this2._buffBox.init(_this2);
            _this2.hitBox.width = _this2.roleVO.crash_box[0] * s;
            _this2.hitBox.height = _this2.roleVO.crash_box[1] * s;
            {
              _this2.hitBox.node.children[0].active = GameConfig.DebugInfo.showHeroBox || GameConfig.DebugInfo.showAllBox;
            }

            // 动态设置血条位置：根据Idle动画帧高度
            _this2.updateHpBarPosition();
            _this2.updateHeroHpBarPosition();

            // 确保视图完全初始化后再设置事件处理器
            setTimeout(function () {
              _this2.resetSpineEvent();
              _this2.loadCompleted == null || _this2.loadCompleted(_this2);
            }, 1);
          });
          App.battleMgr.skillCtrl.addAtkSkill(this, this.atkSkill);
          this._lockTargetCtrl.range = this.roleVO.lockRange;
          this._lockTargetCtrl.owner = this;
          // 设置士兵的目标类型为怪物，使其能够寻找敌人
          this._lockTargetCtrl.addTargetTypes(GameBattle.RoleType.Monster);
          this._lockTargetCtrl.setChangeHandler(this._onChangeLockTarget.bind(this));
          this.addInitBuff();
          this.updateRageBar();

          // 初始化AI（首次初始化，设置_homePoint为当前位置，即城墙位置）
          this._heroAI.load(this, true);
        }
        /**
         * 动态更新血条位置：根据Idle动画帧的高度
         */;
        _proto.updateHeroHpBarPosition = /*#__PURE__*/
        function () {
          var _updateHeroHpBarPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var frames, firstFrame, frameHeight, hpBarY, roleVO, s, height;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!(!this.heroHPBar || !this.view)) {
                    _context.next = 2;
                    break;
                  }
                  return _context.abrupt("return");
                case 2:
                  _context.prev = 2;
                  _context.next = 5;
                  return this.view.getIdleFrames();
                case 5:
                  frames = _context.sent;
                  if (frames && frames.length > 0) {
                    // 获取第一帧的高度作为参考
                    firstFrame = frames[0];
                    if (firstFrame && firstFrame.rect) {
                      frameHeight = firstFrame.rect.height; // 血条位置 = 帧高度 + 一些额外偏移（如10-20像素）
                      hpBarY = frameHeight + 20;
                      this.heroHPBar.node.setPosition(this.heroHPBar.node.position.x, hpBarY);
                      this.heroNameLabel.node.setPosition(this.heroNameLabel.node.position.x, hpBarY + 30);
                    }
                  }
                  _context.next = 17;
                  break;
                case 9:
                  _context.prev = 9;
                  _context.t0 = _context["catch"](2);
                  console.error("Failed to update HP bar position", _context.t0);
                  // 如果获取失败，使用默认高度
                  roleVO = this.roleVO;
                  s = (roleVO.size || 10000) / 10000;
                  height = roleVO.hpHeight || 90;
                  this.heroHPBar.node.setPosition(this.heroHPBar.node.position.x, height * s);
                  this.heroNameLabel.node.setPosition(this.heroNameLabel.node.position.x, height * s + 40);
                case 17:
                case "end":
                  return _context.stop();
              }
            }, _callee, this, [[2, 9]]);
          }));
          function updateHeroHpBarPosition() {
            return _updateHeroHpBarPosition.apply(this, arguments);
          }
          return updateHeroHpBarPosition;
        }() /** 设置骨骼回调事件 */;
        _proto.resetSpineEvent = function resetSpineEvent() {
          var _this3 = this;
          // 检查view是否存在
          if (!this.view) {
            console.error("resetSpineEvent: Soldier view is not initialized!");
            return;
          }
          this.view.clearAllHandler();
          this.view.setCompleteHandler(function (trace) {
            // 兼容Spine和帧动画两种格式
            // Spine: trace["name"]
            // 帧动画: trace.name
            var eventName = trace["name"] || trace.name;
            if (eventName === "Attack") {
              _this3._heroAI.stateLock = false;
              if (_this3.state.isAttacking()) {
                _this3.state.exitType(GameBattle.ActionState.Attack);
                _this3.atkSkill.end();
              }
              // this._monsterAI.stateLock = true;
              // this.atkSkill.use();
            } else if (eventName === _this3.curSkillName) {
              _this3.handleSkillComplete();
              // } else if (eventName === 'Hit') {
              //     this.state.exitType(GameBattle.ActionState.Affected);
            } else if (eventName === "Dead") {
              _this3.dead();
            }
          });
          this.view.setFrameEventHandler(function (trace, event) {
            // 兼容Spine和帧动画两种格式
            var eventName = trace["name"] || trace.name;
            if (eventName === "Attack") {
              if (_this3.state.isAttacking()) {
                if (_this3.roleVO.hide === 0) {
                  _this3.node.getComponent(UIOpacity).opacity = 255;
                  _this3.roleVO.hide = 1;
                  _this3.invulnerable = false;
                }
                _this3._heroAI.stateLock = true;
                _this3.atkSkill.use();
              }
            } else if (eventName === _this3.curSkillName) {
              if (!_this3.curSkill) {
                return;
              }
              if (_this3.roleVO.hide === 0) {
                _this3.node.uiOpacity.opacity = 255;
                _this3.roleVO.hide = 1;
                _this3.invulnerable = false;
              }
              if (_this3._isDead) {
                _this3.curSkill.end();
                _this3.state.type = GameBattle.ActionState.Dead;
                _this3._heroAI.stateLock = false;
                return;
              }

              //一个动作多次事件
              if (_this3._endActionNames.findIndex(function (val) {
                return val === eventName;
              }) !== -1) {
                return;
              }

              // 直接执行技能效果
              _this3.curSkill.endCD();
              _this3.curSkill.use();

              // 记录已执行的动作，防止重复触发
              _this3._endActionNames.push(eventName);
            } else {
              _this3._heroAI.stateLock = false;
            }
          });
          this.view.setStartHandler(function (trace) {
            // 兼容Spine和帧动画两种格式
            var eventName = trace["name"] || trace.name;
            if (eventName === "Attack") {
              _this3._heroAI.stateLock = true;
              // this.showWarning(this.atkSkill);

              if (_this3.roleVO.hide === 0) {
                _this3.node.getComponent(UIOpacity).opacity = 255;
              }
            } else if (eventName === _this3.curSkillName) {
              if (!_this3.curSkill) {
                return;
              }
              _this3.publicSkillCd = _this3.roleVO.publicCD;
              // let [dir, targetPos] = this.showWarning(this.curSkill);
              // this.curSkill.doMoveAction(dir, targetPos);
              _this3.curSkill.createBuff(SkillBuffTiggerTime.begin);
              if (_this3.roleVO.hide === 0) {
                _this3.node.getComponent(UIOpacity).opacity = 255;
              }
            } else if (eventName === "Dead") {
              // 血条消失
              _this3.heroHPBar.node.active = false;
              _this3.lbTitle.node.active = false;
            }
          });
        }
        /**
         * 技能动画结束回调处理
         * @param force 强制执行
         * @returns
         */;
        _proto.handleSkillComplete = function handleSkillComplete(force) {
          var _this4 = this;
          if (force === void 0) {
            force = false;
          }
          if (!this.curSkill) {
            return;
          }

          // 检查是否是手动释放的技能
          var isManualSkill = this._isManualSkill;

          //这里返回, 否则迂回和追踪技能会被打断（但手动释放的技能除外）
          if (this.curSkill && (this.curSkill.type === SkillType.YuHui || this.curSkill.type === SkillType.ZhuiZong) && !force && !isManualSkill) {
            return;
          }

          // 清除手动技能标记
          this._isManualSkill = false;
          if (this._isDead) {
            this.state.exitType(GameBattle.ActionState.Skill);
            this._heroAI.stateLock = false;
            this.curSkillName = "noSkill";
            this.curSkill.end();
            return;
          }
          this._tempSkillTimes--;
          if (this._tempSkillTimes > 0) {
            // this.state.exitType(GameBattle.ActionState.Skill)
            // this.curSkillName = ''
            this.curSkill.endAction();
            if (this.needFlip) {
              this.view.isFlipX = this.node.position.x > this.curSkill.getTarget().node.position.x;
            }
            // this.curSkill.use();
            this.state.setSkill(this.curSkill.arts_action, this.curSkill);
            // this.showWarning(this.curSkill);
            //再次开始
            return;
          }
          this.state.exitType(GameBattle.ActionState.Skill);

          // 清除技能名称记录，允许下次释放同一技能
          var skillNameIndex = this._endActionNames.findIndex(function (val) {
            return val === _this4.curSkillName;
          });
          if (skillNameIndex !== -1) {
            this._endActionNames.splice(skillNameIndex, 1);
          }
          this.curSkillName = "noSkill";
          this.curSkill.end();
          this._heroAI.stateLock = false;

          // 恢复自动AI控制
          this.isManualControl = false;
        };
        _proto.underAttack = function underAttack(damage, attrType, hit_effect, hit_type) {
          // if (DEBUG) {
          //     if (GameConfig.DebugInfo.monsterDmgReduce) {
          //         damage = -1;
          //     }
          //     if (GameConfig.DebugInfo.monsterDmgMax) {
          //         damage *= 1000000000;
          //     }
          // }

          if (!this.isUsable) {
            return 0;
          }
          var oweHp = _RoleBase.prototype.underAttack.call(this, damage, attrType, hit_effect, hit_type);

          // 闪白
          if (hit_type !== FormulaResultItem._sanbi) {
            Utils.flashWhite(this.view.sprite_body.node);
          }
          this.heroHPBar.refreshUI();
          if (this.roleVO.curHP <= 0) {
            this._heroAI.stateLock = false;
            this.isUsable = false;
            this.dead(); // 调用死亡方法移除模型
          }

          return oweHp;
        };
        _proto.addInitBuff = function addInitBuff() {
          var initBuffList = this.roleVO.init_buff_id;
          if (initBuffList) {
            for (var index = 0; index < initBuffList.length; index++) {
              var element = initBuffList[index];
              this._buffBox.addBuff(element, this);
            }
          }
        }
        /**
         * 出击英雄到指定兵线
         */;
        _proto.deployToLane = function deployToLane(lane, position) {
          // console.log(`[Hero] deployToLane: heroId=${this.heroId}, lane=${lane}`);
          this.isWaiting = false;
          this.heroHPBar.node.active = true;
          this._currentLane = lane;
          this.node.position = position;
          this._reviveCD = 0;
          this._rage = 0;

          // 清除手动控制状态，让AI接管
          this._isManualControl = false;
          this._manualMoveTarget = null;

          // 重置状态为Idle，清除可能残留的Attack/Move等状态
          this.state.clearType();
          this.exitMove();

          // 清除锁定目标，让AI重新寻敌
          this.lockTargetCtrl.target = null;

          // 解锁AI状态
          this._heroAI.stateLock = false;

          // 重新加载AI（注意：load会设置_homePoint为当前位置，这里不应该调用）
          // 只在首次初始化时调用load，出击时不应重新加载
          // this._heroAI.load(this);

          // 重置AI状态但不改变_homePoint
          this._heroAI.pause = false;
          this._heroAI.isTargetReached = false;
          this.resetSpineEvent();
          this.updateRageBar();

          // console.log(`[Hero] deployToLane完成: state=${this.state.type}, isManualControl=${this._isManualControl}`);
        }

        /**
         * 撤回英雄到城池
         */;
        _proto.recallToCity = function recallToCity(position) {
          this.isWaiting = true;
          this.heroHPBar.node.active = false;
          this._currentLane = GameBattle.LanePosition.None;
          this.node.position = position;
          this._rage = 0;
          this.updateRageBar();
        }

        /**
         * 增加怒气值
         */;
        _proto.addRage = function addRage(value) {
          if (this._isWaiting || this._isDead) return;
          this.rage += value;
        }

        /**
         * 更新怒气条UI
         */;
        _proto.updateRageBar = function updateRageBar() {
          if (this.heroHPBar) {
            // TODO: 更新怒气条UI显示
            this.heroHPBar.refreshRage();
          }
        }

        /**
         * 检查是否可以释放技能
         */;
        _proto.canUseSkill = function canUseSkill() {
          return !this._isWaiting && !this._isDead && this._rage >= 100;
        }

        /**
         * 释放技能
         */;
        _proto.useSkill = function useSkill(skill) {
          // 调用父类方法设置curSkill和curSkillName
          _RoleBase.prototype.useSkill.call(this, skill);

          // 设置技能使用次数（手动释放的技能只播放一次）
          this._tempSkillTimes = 1;
          return true;
        };
        _proto._loadView = function _loadView(_onCompleted, _onFaild) {
          var _this5 = this;
          this.view.loadAnimationData(this._roleVO.viewPath, function () {
            _this5.initStateMachine();
            _onCompleted && _onCompleted();
          }, _onFaild);
        }
        /**
         * 英雄死亡
         */;
        _proto.dead = function dead() {
          // super.dead();
          this._isDead = true;
          this._reviveCD = this.roleVO.reviveCDTime; // 从配置获取复活时间

          // 通知战斗管理器处理英雄死亡
          this._onDeadCallback && this._onDeadCallback(this.uid);
        }

        /**
         * 英雄复活
         */;
        _proto.revive = function revive(position) {
          this.isWaiting = true;
          this._currentLane = GameBattle.LanePosition.None;
          this._rage = 0;
          this._isDead = false;
          this._reviveCD = 0;
          this.roleVO.curHP = this.roleVO.getRoleAttr(BattlePropertyName.shengming);
          this.node.position = position;
          this.updateRageBar();
          this.heroHPBar.refreshUI();
          this.heroHPBar.node.active = false;
        }

        /**
         * 移动到指定位置
         */;
        _proto.moveTo = function moveTo(position) {
          if (this._isWaiting || this._isDead) return;
          // 如果正在释放技能，禁止移动
          if (this.state.isSkilling()) return;
          this._isManualControl = true;
          // TODO: 实现移动逻辑
        }

        /**
         * 更新
         */;
        _proto.onUpdate = function onUpdate(dt) {
          _RoleBase.prototype.onUpdate.call(this, dt);
          if (!this._isWaiting && !this._isDead) {
            // 每秒增加怒气
            this.addRage(this.roleVO.rageGainPerSecond * dt);
          }

          // 减少复活CD
          if (this._reviveCD > 0) {
            this._reviveCD -= dt;
            if (this._reviveCD <= 0) ;
          }
          if (!this._isWaiting) {
            this._dt += dt;
            if (this._dt > 1) {
              //buff属性
              this.execBattleBufferAtti();
              this._dt = 0;
            }
            if (this._isManualControl) {
              // 手动控制移动：只按指定目标点直线移动，不进行追击/巡逻/寻敌
              this._updateManualMove();
            } else {
              // 寻路降帧 大概3帧一次 + AI 行为
              this._AIdt += dt;
              if (this._AIdt > 0.04) {
                if (!App.battleMgr.isInBattle() || App.battleMgr.getCurrentFrame() === this._updateGroup) {
                  this._heroAI.onUpdate(this._AIdt);
                }
                this._AIdt = 0;
              }
              this.detectEnemyAndAttack();
            }
            {
              this.hitBox.node.children[0].active = GameConfig.DebugInfo.showHeroBox;
            }
          }
        }

        /**
         * 手动移动更新：朝目标点直线移动
         */;
        _proto._updateManualMove = function _updateManualMove() {
          if (!this._manualMoveTarget) return;
          // 如果正在释放技能，暂停移动
          if (this.state.isSkilling()) return;
          var curPos = this.node.worldPosition;
          var dir = this._manualMoveTarget.clone().subtract(curPos);
          var dist = Math.sqrt(dir.x * dir.x + dir.y * dir.y);

          // 到达目标点，结束手动控制
          if (dist <= 1) {
            this.exitMove();
            this._manualMoveTarget = null;
            this.isManualControl = false;
            this._heroAI.stateLock = false;
            this.setSelectedHero(false);
            return;
          }

          // 更新英雄朝向，面向目标点方向
          dir.normalize();
          var direction = BattleUtil.analysisDirection(dir);
          if (direction !== GameBattle.Direction.None) {
            this.curDirection = direction;
          }
          this._heroAI.moveToTarget(this._manualMoveTarget);
        }
        /**
         * 检测周围敌人并发起攻击
         * 注意：这个方法只负责寻找和锁定目标，具体的追击和攻击由AI处理
         */;
        _proto.detectEnemyAndAttack = function detectEnemyAndAttack() {
          // 如果正在释放技能，不要改变目标
          if (this.state.isSkilling()) {
            return;
          }

          // 如果已有目标且目标还活着且有效，不需要重新寻找
          if (this._lockTargetCtrl.target && !this._lockTargetCtrl.target.isDead && this._lockTargetCtrl.target.checkValid()) {
            return; // AI会自动处理追击和攻击
          }

          // 清除已死亡或无效的目标
          if (this._lockTargetCtrl.target && (this._lockTargetCtrl.target.isDead || !this._lockTargetCtrl.target.checkValid())) {
            this.lockTargetCtrl.target = null;
          }

          // 获取周围范围内的敌人（扩大检测范围到2000）
          var enemies = this.getNearbyEnemies(2000);
          if (enemies.length > 0) {
            // 锁定最近的敌人作为目标
            var target = enemies[0];
            this.lockTargetCtrl.target = target;
          } else {
            // 如果没有目标，清空锁定
            if (this.lockTargetCtrl.target) {
              this.lockTargetCtrl.target = null;
            }
          }
        }

        /**
         * 获取周围指定范围内的我方敌人
         * @param range 检测范围
         * @returns 敌人数组
         */;
        _proto.getNearbyEnemies = function getNearbyEnemies(range) {
          var enemies = [];
          var soldierPos = this.node.worldPosition;

          // 从战斗管理器获取所有我方角色（敌人）
          // 检测怪物
          if (App.dungeonBattleMgr && App.dungeonBattleMgr.activeEnemies) {
            var monsters = App.dungeonBattleMgr.activeEnemies;
            for (var _iterator = _createForOfIteratorHelperLoose(monsters), _step; !(_step = _iterator()).done;) {
              var monsterArr = _step.value;
              var monster = monsterArr[1];
              if (monster && monster.node.active && monster.isUsable && !monster.isDead) {
                var distance = Vec3.distance(soldierPos, monster.node.worldPosition);
                if (distance <= range) {
                  enemies.push(monster);
                }
              }
            }
          }

          // 按距离排序，最近的敌人排在前面
          enemies.sort(function (a, b) {
            var distA = Vec3.distance(soldierPos, a.node.worldPosition);
            var distB = Vec3.distance(soldierPos, b.node.worldPosition);
            return distA - distB;
          });
          return enemies;
        }

        /**
         * 手动命令英雄移动到指定世界坐标
         * @param target 目标世界坐标
         */;
        _proto.commandMoveTo = function commandMoveTo(target) {
          if (this.isDead) return;
          this._manualMoveTarget = target.clone();
          this.isManualControl = true;
          this._heroAI.stateLock = true;
          // this.exitMove();
          // 清除锁定目标，防止继续自动追击
          this.lockTargetCtrl.target = null;
          // 移动到目标点范围并攻击
          this._heroAI.isTargetReached = false;
          this._heroAI.moveToTarget(target);
        }
        /**
         * 设置选中状态
         */;
        _proto.setSelectedHero = function setSelectedHero(flag) {
          this.selectSp.node.active = flag;
        }

        /**
         * 显示攻击范围
         * @param range 攻击范围距离
         */;
        _proto.showAttackRange = function showAttackRange(range) {
          // 显示选中框
          if (this.selectSp) {
            this.selectSp.node.active = true;
          }
        }

        /**
         * 隐藏攻击范围
         */;
        _proto.hideAttackRange = function hideAttackRange() {
          // 隐藏选中框
          if (this.selectSp) {
            this.selectSp.node.active = false;
          }
        };
        _proto._updateDirection = function _updateDirection(force) {
          if (force === void 0) {
            force = false;
          }
          // 检查是否可以转向
          if (!this.state.canTurn()) return;

          // 如果是怪物且正在攻击或施法，不改变方向
          if ((this.state.isAttacking() || this.state.isSkilling()) && !force) {
            return;
          }

          // 优先使用锁定目标的方向
          var target = this._lockTargetCtrl.target;
          if (target && target.node.active && this.alwaysFaceToTarget()) {
            this._targetDir.set(target.node.worldPosition);
            this._targetDir.subtract(this.node.worldPosition).normalize();
            if (this._targetDir.y !== 0 || force) {
              var direction = BattleUtil.analysisDirection(this._targetDir);
              if (direction !== GameBattle.Direction.None) {
                this.curDirection = direction;
              }
            }
          }
          // 否则使用面向方向
          else if (this._faceDirection.y !== 0) {
            var _direction = BattleUtil.analysisDirection(this._faceDirection);
            if (_direction !== GameBattle.Direction.None) {
              this.curDirection = _direction;
            }
          }
        }

        /**
         * 是否始终面向目标
         */;
        _proto.alwaysFaceToTarget = function alwaysFaceToTarget() {
          // 手动控制移动时不要始终面向目标
          if (this._isManualControl) {
            return false;
          }
          return true;
        }
        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.hitBox.getBoundingBoxToWorld();
        };
        _proto.attack = function attack() {
          _RoleBase.prototype.attack.call(this);
        };
        _proto.doDead = function doDead() {
          this._heroAI.stateLock = false;
          this.roleVO.curHP = 0;
          this.roleVO.updateCurHP(0, true);
          this._heroAI.doDead();
        };
        _proto.getFirePosition = function getFirePosition(dummy_pos) {
          var skeleton = this.view.sprite_body;
          if (!dummy_pos || dummy_pos.length === 0) {
            return skeleton.node.worldPosition;
          }
          return skeleton.node.worldPosition;
        };
        _createClass(Hero, [{
          key: "reviveTime",
          get: function get() {
            return this._reviveTime;
          },
          set: function set(value) {
            this._reviveTime = value;
          }
        }, {
          key: "heroId",
          get: function get() {
            return this._heroId;
          },
          set: function set(value) {
            this._heroId = value;
          }
        }, {
          key: "currentLane",
          get: function get() {
            return this._currentLane;
          },
          set: function set(value) {
            this._currentLane = value;
          }
        }, {
          key: "rage",
          get: function get() {
            return this._rage;
          },
          set: function set(value) {
            this._rage = value; //Math.max(0, Math.min(value, 100));
            this.updateRageBar();
          }
        }, {
          key: "reviveCD",
          get: function get() {
            return this._reviveCD;
          },
          set: function set(value) {
            this._reviveCD = Math.max(0, value);
          }
        }, {
          key: "isWaiting",
          get: function get() {
            return this._isWaiting;
          },
          set: function set(value) {
            this._isWaiting = value;
          }
        }, {
          key: "isManualControl",
          get: function get() {
            return this._isManualControl;
          },
          set: function set(value) {
            this._isManualControl = value;
          }
        }, {
          key: "citySlotIndex",
          get: function get() {
            return this._citySlotIndex;
          },
          set: function set(value) {
            this._citySlotIndex = value;
          }
        }, {
          key: "roleVO",
          get: function get() {
            return this._roleVO;
          }
        }, {
          key: "roleSkill",
          get: function get() {
            return this._roleSkill;
          }
          // 是否死亡
          // public _isDead: boolean = false;
        }, {
          key: "isDead",
          get: function get() {
            return this._isDead;
          },
          set: function set(flag) {
            this._isDead = flag;
          }
        }, {
          key: "onDeadCallback",
          get: function get() {
            return this._onDeadCallback;
          },
          set: function set(value) {
            this._onDeadCallback = value;
          }
        }]);
        return Hero;
      }(RoleBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "view", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "selectSp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgYingZi", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "heroNameLabel", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "lbTitle", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "hitBox", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "heroHPBar", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroAI.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './CommonCfgUtil.ts', './BattleDefine.ts', './BaseAi.ts', './SkillVO.ts', './GameConfig.ts', './RoleBase.ts', './AxingManager.ts', './App.ts', './RoleFSM.ts'], function (exports) {
  var _inheritsLoose, _createClass, _assertThisInitialized, cclegacy, Tween, Vec3, CommonCfgUtil, EShuoMingQuanJu, GameBattle, AI_BEHAVIOR, BaseAi, SkillType, GameConfig, RoleBase, FindPathDeepType, App, RoleFSM;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      Vec3 = module.Vec3;
    }, function (module) {
      CommonCfgUtil = module.CommonCfgUtil;
      EShuoMingQuanJu = module.EShuoMingQuanJu;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      AI_BEHAVIOR = module.AI_BEHAVIOR;
      BaseAi = module.BaseAi;
    }, function (module) {
      SkillType = module.SkillType;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      FindPathDeepType = module.FindPathDeepType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      RoleFSM = module.RoleFSM;
    }],
    execute: function () {
      cclegacy._RF.push({}, "1383cjUT9tBA5gLnxbp6eFr", "HeroAI", undefined);

      // Administrator:
      // 影响怪物AI行为
      // 1=木桩
      // 2=炮台
      // 3=近战莽夫
      // 4=远程莽夫

      var AI_TYPE = exports('AI_TYPE', /*#__PURE__*/function (AI_TYPE) {
        AI_TYPE[AI_TYPE["MUZHUANG"] = 1] = "MUZHUANG";
        AI_TYPE[AI_TYPE["PAOTAI"] = 2] = "PAOTAI";
        AI_TYPE[AI_TYPE["JINZHANMANGFU"] = 3] = "JINZHANMANGFU";
        AI_TYPE[AI_TYPE["YUANCHENGMANGFU"] = 4] = "YUANCHENGMANGFU";
        AI_TYPE[AI_TYPE["JINZHANWEISUO"] = 5] = "JINZHANWEISUO";
        AI_TYPE[AI_TYPE["YUANCHENGWEISUO"] = 6] = "YUANCHENGWEISUO";
        return AI_TYPE;
      }({}));
      /**
       * 英雄AI
       */
      var HeroAI = exports('HeroAI', /*#__PURE__*/function (_BaseAi) {
        _inheritsLoose(HeroAI, _BaseAi);
        function HeroAI() {
          var _this;
          _this = _BaseAi.call(this) || this;
          /** 出生点 */
          _this._homePoint = void 0;
          /** 巡逻半径 */
          _this._patrolRadius = 300;
          /** 锁敌脱战距离 */
          _this._targetDistance = 0;
          /** 出生点脱战距离 */
          _this._homeDistance = 0;
          /** 是否已脱战 */
          _this._isExitBattle = true;
          _this._roleFSM = new RoleFSM();
          _this.pursuitTime = 0;
          /** AI 类型 */
          _this._behaviors = [];
          _this._curBehavior = AI_BEHAVIOR.DAIJI;
          /** 状态检查函数 */
          _this._checkTypeFuncMap = {};
          /** 状态执行函数 */
          _this._doTypeFuncMap = {};
          _this._pause = false;
          /** 是否索敌中 */
          _this._locking = false;
          /** 是否是真实怪物 */
          // 玩家的召唤物和宠物不算真正的怪物
          _this._isRealMonster = false;
          /**
           * 状态保持
           */
          _this._stateLock = false;
          _this._curSkill = null;
          _this._testCanPursuit = -1;
          /** 共用向量 */
          _this._tempVec3 = new Vec3();
          _this._target = null;
          _this._maxLockRange = 0;
          // 相关变量
          _this._isTargetReached = false;
          _this._lastTarget = null;
          _this._frameCount = 0;
          /** 是否正在释放技能 */
          _this._isSkilling = false;
          _this.testname = ["待机", "迂回", "脱战", "跟随", "追击", "攻击", "技能", "追逐宝箱", "开宝箱", "受击", "巡逻", "死亡"];
          /**
           * 受击状态计时器
           */
          _this._underAttackTimer = 0;
          _this._checkTypeFuncMap[AI_BEHAVIOR.ZHUIJI] = _this.checkPursuit.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.ZHUIJI] = _this.doPursuit.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.GONGJI] = _this.checkAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.GONGJI] = _this.doAttack.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.XUNLUO] = _this.checkPatrol.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.XUNLUO] = _this.patrol.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.DAIJI] = _this.doDaiji.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.SIWANG] = _this.checkDead.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.SIWANG] = _this.doDead.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.SKILL] = _this.checkSkill.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.SKILL] = _this.doSkill.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.UNDERATTACK] = _this.checkUnderAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.UNDERATTACK] = _this.doUnderAttack.bind(_assertThisInitialized(_this));
          return _this;
        }
        var _proto = HeroAI.prototype;
        _proto.onUpdate = function onUpdate(dt) {
          if (this.pursuitTime > 0) {
            this.pursuitTime -= dt;
            // console.log(`[HeroAI] onUpdate: pursuitTime=${this.pursuitTime.toFixed(2)}, 等待中...`);
            return;
          }
          if (this.stateLock) {
            // console.log(`[HeroAI] onUpdate: stateLock=true, AI被锁定`);
            return;
          }

          // 如果正在释放技能，禁止AI行为
          if (this._owner && this._owner.state.isSkilling()) {
            // console.log(`[HeroAI] onUpdate: 正在释放技能`);
            return;
          }
          if (!this._owner || this.pause) {
            // console.log(`[HeroAI] onUpdate: owner=${!!this._owner}, pause=${this.pause}`);
            return;
          }

          // 更新受击计时器
          if (this._underAttackTimer > 0) {
            this._underAttackTimer -= dt;
          }

          // 更新技能状态
          if (this._isSkilling && !this._owner.state.isSkilling()) {
            this._isSkilling = false;
          }
          var type = AI_BEHAVIOR.DAIJI;
          this._owner.behaviorFollowFlag = true;

          // 从高优先级到低优先级检查行为（倒序遍历）
          // 移除 behavior >= this._curBehavior 的限制，允许行为自由切换
          for (var i = this._behaviors.length; i--;) {
            var behavior = this._behaviors[i];
            var checkFunc = this._checkTypeFuncMap[behavior];
            if (checkFunc()) {
              type = behavior;
              break;
            }
          }
          if (type === AI_BEHAVIOR.DAIJI && this._locking) ;
          if (type !== this._curBehavior) {
            this._curBehavior = type;
          }
          if (this._doTypeFuncMap[type]) {
            this._doTypeFuncMap[type]();
          }
        };
        _proto.load = function load(owner, resetHomePoint) {
          if (resetHomePoint === void 0) {
            resetHomePoint = true;
          }
          _BaseAi.prototype.init.call(this, owner);
          this._owner = owner;
          this._targetDistance = CommonCfgUtil.getCommonCfgValue(EShuoMingQuanJu.ExitBattleTargetDistance);
          this._homeDistance = CommonCfgUtil.getCommonCfgValue(EShuoMingQuanJu.ExitBattleHomeDistance);
          this._roleFSM.owner = owner;

          // 只在首次初始化或明确要求时才重置_homePoint
          // 避免在出击后重新加载AI时错误地将战场位置设为出生点
          if (resetHomePoint) {
            this._homePoint = this._owner.node.worldPosition.clone();
          }

          // let aiType = this._owner.roleVO.AIType;
          this._behaviors = [];
          this._testCanPursuit = -1;

          // 按优先级添加AI行为
          this._behaviors.push(AI_BEHAVIOR.SIWANG); // 死亡优先级最高
          this._behaviors.push(AI_BEHAVIOR.UNDERATTACK); // 受击
          this._behaviors.push(AI_BEHAVIOR.SKILL); // 技能
          if (owner.atkSkill.skillID !== 0) {
            //skillid为0则是为了不放普攻
            this._behaviors.push(AI_BEHAVIOR.GONGJI); // 攻击
          }

          this._behaviors.push(AI_BEHAVIOR.ZHUIJI); // 追击
          this._behaviors.push(AI_BEHAVIOR.XUNLUO); // 巡逻（无敌人时往怪物出生点移动）

          this._locking = false;
          this._isRealMonster = false; //owner.isRealMonster();

          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.None) {
            this._maxLockRange = 1000000;
          } else {
            this._maxLockRange = this._owner.roleVO.lockRange[1];
          }
        }

        /**
         * 检测死亡
         */;
        _proto.checkDead = function checkDead() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          return this._owner.roleVO.curHP <= 0;
        }

        /**
         * 播放死亡动画
         */;
        _proto.doDead = function doDead() {
          this._owner.exitMove();
          Tween.stopAllByTarget(this._owner.node);
          this._owner.state.type = GameBattle.ActionState.Dead;
          this._owner.isUsable = false;
          if (this._owner.isBoss()) {
            App.battleMgr.bossIsDead = true;
          }
        }

        /**
         * 待机
         */;
        _proto.doDaiji = function doDaiji() {
          // 即使在待机状态，也要检查是否需要避让
          var avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
          if (avoidanceForce && (avoidanceForce.x !== 0 || avoidanceForce.y !== 0)) {
            // 如果有避让力，应用位置调整
            var ownerPos = this._owner.node.worldPosition;
            var newPos = ownerPos.clone().add(avoidanceForce.multiplyScalar(1.0)); // 完整应用避让力
            this._owner.node.worldPosition = newPos;
          }
          this._owner.moveDirection.set(0, 0, 0);
          this._owner.state.clearType();
        }

        /**
         * 检查重叠并返回避让力（不改变移动方向，只返回避让向量）
         */;
        _proto.checkOverlapAndGetAvoidanceForce = function checkOverlapAndGetAvoidanceForce() {
          var _this2 = this;
          var ownerPos = this._owner.node.worldPosition;
          var avoidanceRadius = 60; // 避让半径
          var avoidanceForce = new Vec3(0, 0, 0);
          var nearbyCount = 0;

          // 检查附近的友军
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            if ((entity.type === GameBattle.RoleType.Hero || entity.type === GameBattle.RoleType.Soldier) && entity.uid !== _this2._owner.uid) {
              var distance = Vec3.distance(entity.node.worldPosition, ownerPos);

              // 只在非常近的时候才推开
              if (distance < avoidanceRadius && distance > 0.1) {
                var repulsion = ownerPos.clone().subtract(entity.node.worldPosition);
                repulsion.normalize();

                // 距离越近，排斥力越大（使用更陡峭的曲线）
                var strength = (avoidanceRadius - distance) / avoidanceRadius;

                // 非常近时使用指数增强
                if (distance < 30) {
                  strength = Math.pow(strength, 2); // 平方
                  repulsion.multiplyScalar(strength * 5); // 5倍排斥力
                } else {
                  strength = Math.pow(strength, 3); // 三次方
                  repulsion.multiplyScalar(strength * 3); // 3倍排斥力
                }

                avoidanceForce.add(repulsion);
                nearbyCount++;
              }
            }
            return false;
          });
          return nearbyCount > 0 ? avoidanceForce : null;
        }

        /**
         * 攻击
         */;
        _proto.doAttack = function doAttack() {
          if (this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.isAttacking()) {
            // 即使在攻击状态，也要检查是否需要避让
            var _avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
            if (_avoidanceForce && (_avoidanceForce.x !== 0 || _avoidanceForce.y !== 0)) {
              var ownerPos = this._owner.node.worldPosition;
              var newPos = ownerPos.clone().add(_avoidanceForce.multiplyScalar(1.0));
              this._owner.node.worldPosition = newPos;
            }
            return;
          }

          // 攻击前也检查避让
          var avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
          if (avoidanceForce && (avoidanceForce.x !== 0 || avoidanceForce.y !== 0)) {
            var _ownerPos = this._owner.node.worldPosition;
            var _newPos = _ownerPos.clone().add(avoidanceForce.multiplyScalar(1.0));
            this._owner.node.worldPosition = _newPos;
          }
          this._owner.updateAttackInterval();
          this._owner.exitMove();
          this._owner.state.type = GameBattle.ActionState.Attack;
          this.atkUseTime++;
          if (this._owner.needFlip) {
            this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
          }
        }
        /**
         * 检测能否攻击
         */;
        _proto.checkAttack = function checkAttack() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 先检查是否正在攻击
          if (this._owner.state.isAttacking()) {
            // 如果正在攻击，检查目标是否还有效
            if (!this.target || this.target.isDead || !this.target.checkValid()) {
              var _this$_owner$atkSkill;
              // 目标已死亡或无效，停止攻击
              this._owner.state.exitType(GameBattle.ActionState.Attack);
              (_this$_owner$atkSkill = this._owner.atkSkill) == null || _this$_owner$atkSkill.end();
              this.findNearestMonster();
              return false;
            }
            return true;
          }
          if (this._owner.state.isSkilling()) {
            //已经在放技能了
            return false;
          }

          // 检查目标是否有效，如果目标死亡则重新寻找
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            this.findNearestMonster();
            if (!this.target) {
              return false;
            }
          }
          var ret = this._owner.checkAttack();
          if (ret) {
            this._owner.behaviorFollowFlag = false;
          }
          return ret;
        }

        //强制技能
        ;

        _proto.forceSkill = function forceSkill(id) {
          var skill = App.battleMgr.skillCtrl.getSkill(this._owner.uid, id);
          if (!skill) return;
          if (skill.type === SkillType.YuHui) {
            skill.use();
          } else if (skill.checkUpdateUseTime()) {
            this.skillUseTime++;
          }
          this._owner.exitMove();
          this._owner.useSkill(skill);
          this._owner.state.setSkill(skill.arts_action, skill);
          this.lastSkillId = skill.skillID;
        }
        /**
         * 释放技能
         */;
        _proto.doSkill = function doSkill() {
          // 检查各种状态限制
          if (this._owner.state.isSkilling() || this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.type === GameBattle.ActionState.Skill || !this.target) {
            return;
          }
          var skill = this._curSkill;
          // 再次检查技能是否有效
          if (!skill || !skill.checkCD() || !skill.checkRange()) {
            // 如果当前技能无效，尝试获取新的可用技能
            skill = this._owner.getUsableSkill();
            if (!skill || !skill.checkCD() || !skill.checkRange()) {
              return;
            }
            this._curSkill = skill;
          }

          // 记录技能释放日志
          if (GameConfig.DebugInfo.showMonsterSkillLog) {
            console.log("\u58EB\u5175\u91CA\u653E\u6280\u80FD: " + skill.skillID + ", \u7C7B\u578B: " + SkillType[skill.type]);
          }

          // 停止移动
          this._owner.exitMove();

          // 标记为正在释放技能
          this._isSkilling = true;

          // 根据技能类型处理
          if (skill.type === SkillType.YuHui) {
            // 迂回类技能直接使用
            skill.use();
          } else {
            // 其他类型技能更新使用时间
            if (skill.checkUpdateUseTime()) {
              this.skillUseTime++;
            }

            // 播放技能预警（如果需要）
            // this._owner.showWarning(skill, () => {});
          }

          // 使用技能
          this._owner.useSkill(skill);

          // 设置技能状态和动作
          this._owner.state.setSkill(skill.arts_action, skill);

          // 记录最后使用的技能ID
          this.lastSkillId = skill.skillID;

          // 调整朝向
          if (this._owner.needFlip && this.target) {
            this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
          }

          // 清除当前技能引用
          this._curSkill = null;
        }

        /**
         * 检测能否释放技能
         */;
        _proto.checkSkill = function checkSkill() {
          // 检查战斗状态
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 重置当前技能
          this._curSkill = null;

          // 如果正在释放技能，直接返回true
          if (this._owner.state.isSkilling() || this._isSkilling) {
            return true;
          }

          // 检查是否有可用目标
          if (!this.target || !this.target.isAlive()) {
            return false;
          }

          // 获取可用技能
          var skill = this._owner.getUsableSkill();
          if (!skill) {
            return false;
          }

          // 检查技能是否在冷却中
          if (!skill.checkCD()) {
            return false;
          }

          // 检查技能是否在范围内
          if (!skill.checkRange()) {
            return false;
          }

          // 检查怪物是否可以使用技能（能量/怒气等）
          if (!this._owner.canUseSkill(skill)) {
            return false;
          }

          // 设置当前技能
          this._curSkill = skill;

          // 记录最后一次检查到的可用技能ID
          this.lastSkillId = skill.skillID;

          // 如果是迂回类技能，优先释放
          if (skill.type === SkillType.YuHui) {
            return true;
          }

          // 如果技能没有动作动画，可以直接释放，无需等待普攻结束
          if (skill.arts_action.length === 0) {
            return true;
          }

          // 有技能动作时，需要检查是否正在进行普通攻击
          // 如果正在攻击，可以等待攻击动作结束后再释放技能
          // 这里可以添加更多的策略，比如某些重要技能可以打断普通攻击
          return !this._owner.state.isAttacking();
        }

        /**
         * 脱战
         * @returns
         */;
        _proto.doExitBattle = function doExitBattle() {
          this.goHome();
        };
        /**
         * 设置受击状态
         */
        _proto.setUnderAttack = function setUnderAttack() {
          this._underAttackTimer = 0.2; // 受击状态持续0.2秒
          this._isSkilling = false;
          this._doTypeFuncMap[AI_BEHAVIOR.UNDERATTACK]();
        }

        /**
         * 检测是否处于受击状态
         */;
        _proto.checkUnderAttack = function checkUnderAttack() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果受击计时器大于0，则处于受击状态
          return this._underAttackTimer > 0;
        }

        /**
         * 执行受击动作
         */;
        _proto.doUnderAttack = function doUnderAttack() {
          if (this._owner.state.type === GameBattle.ActionState.Dead) {
            return;
          }

          // 播放受击动画
          // this._owner.state.type = GameBattle.ActionState.UnderAttack;
          // 取消技能释放状态
          this._isSkilling = false;

          // 减少受击计时器
          this._underAttackTimer -= 0.016; // 假设60fps，每帧减少约0.016秒
          if (this._underAttackTimer < 0) {
            this._underAttackTimer = 0;
          }
        }

        /**
         * 检测脱战
         * @returns
         */;
        _proto.checkExitBattle = function checkExitBattle() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          if (this._testCanPursuit > 0) return false;
          if (this._isRealMonster) {
            //士兵索敌后只有超出脱战范围才会脱战
            var target = this._owner; //App.battleMgr.roleCtrl.player;
            if (target) {
              //有目标, 但超出了攻击范围 脱战
              this._tempVec3.set(target.node.worldPosition);
              var targetDistance = this._tempVec3.subtract(this._owner.node.worldPosition).length();
              if (targetDistance > this._targetDistance) {
                this._locking = false;
                return true;
              }
            }
          } else {
            var _target = this._owner.lockTargetCtrl.target;
            this._tempVec3.set(this._owner.node.worldPosition);
            var homeDistance = this._tempVec3.subtract(this._homePoint).length();
            if (homeDistance > this._homeDistance) {
              //不在锁敌范围里 脱战
              this._locking = false;
              return true;
            }
            if (!_target && homeDistance > 10) {
              //没有目标， 又离开了出生地 脱战
              this._locking = false;
              return true;
            }
            if (_target) {
              //有目标, 但超出了攻击范围 脱战
              this._tempVec3.set(_target.node.worldPosition);
              var _targetDistance = this._tempVec3.subtract(this._owner.node.worldPosition).length();
              if (_targetDistance > this._targetDistance) {
                this._locking = false;
                return true;
              }
            }
          }
          return false;
        }

        /**
         * 追击
         */;
        _proto.doPursuit = function doPursuit() {
          if (this.pause) {
            return;
          }

          // 检查当前目标是否有效
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            // 目标无效，重新寻找目标
            this.findNearestMonster();
            if (!this.target) {
              // 没有找到目标，停止追击
              this._locking = false;
              return;
            }
          }

          // 计算从英雄到目标的方向向量
          var targetPos = this.target.node.worldPosition;
          var ownerPos = this._owner.node.worldPosition;
          var direction = targetPos.clone().subtract(ownerPos).normalize();

          // 添加单位避让逻辑，避免重叠
          // direction = this.avoidOverlap(direction);

          this._locking = true;
          this._owner.move(direction, this._owner.getMoveActionState());
          if (this._owner.needFlip) {
            this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
          }
        }

        /**
         * 单位避让逻辑，避免与其他友军重叠
         */;
        _proto.avoidOverlap = function avoidOverlap(originalDirection) {
          var _this3 = this;
          var ownerPos = this._owner.node.worldPosition;
          var avoidanceRadius = 100; // 避让半径
          var avoidanceForce = new Vec3(0, 0, 0);
          var nearbyCount = 0;
          var hasVeryClose = false; // 是否有非常近的单位

          // 检查附近的友军（英雄和士兵）
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 检查友军（英雄和士兵）
            if ((entity.type === GameBattle.RoleType.Hero || entity.type === GameBattle.RoleType.Soldier) && entity.uid !== _this3._owner.uid) {
              var distance = Vec3.distance(entity.node.worldPosition, ownerPos);

              // 如果距离小于避让半径，计算排斥力
              if (distance < avoidanceRadius && distance > 0.1) {
                var repulsion = ownerPos.clone().subtract(entity.node.worldPosition);
                repulsion.normalize();

                // 距离越近，排斥力越大（使用平方增强近距离排斥）
                var strength = (avoidanceRadius - distance) / avoidanceRadius;
                strength = strength * strength; // 平方增强

                // 如果非常近（小于30像素），标记为紧急避让
                if (distance < 30) {
                  hasVeryClose = true;
                  strength *= 2; // 双倍排斥力
                }

                repulsion.multiplyScalar(strength);
                avoidanceForce.add(repulsion);
                nearbyCount++;
              }
            }
            return false;
          });

          // 如果有附近的友军，混合原方向和避让力
          if (nearbyCount > 0) {
            avoidanceForce.normalize();

            // 根据距离动态调整权重
            var avoidWeight = hasVeryClose ? 0.7 : 0.5; // 非常近时避让权重更高
            var targetWeight = 1.0 - avoidWeight;
            var finalDirection = originalDirection.clone().multiplyScalar(targetWeight).add(avoidanceForce.multiplyScalar(avoidWeight));
            finalDirection.normalize();
            return finalDirection;
          }
          return originalDirection;
        }
        /**
         * 检测能否追击
         */;
        _proto.checkPursuit = function checkPursuit() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果没有目标，尝试寻找最近的怪物
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            this.findNearestMonster();
          }

          // 如果还是没有目标，不追击
          if (!this.target) {
            return false;
          }
          var distance = Vec3.distance(this.target.node.worldPosition, this._owner.node.worldPosition);
          var pursueRange = this._owner.roleVO.pursuerange;

          // 有目标且距离大于攻击范围且不在攻击/释放技能中就追击
          var ret = distance > pursueRange && !this._owner.state.isAttacking() && !this._owner.checkCanUseSkill();
          if (ret) {
            this._owner.behaviorFollowFlag = false;
          }
          return ret;
        }

        /**
         * 寻找最近的怪物目标
         */;
        _proto.findNearestMonster = function findNearestMonster() {
          var _this4 = this;
          var closestMonster = null;
          var minDistance = Number.MAX_VALUE;
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 只寻找怪物类型
            if (entity.type === GameBattle.RoleType.Monster) {
              if (entity.checkValid() && !entity.isDead) {
                var distance = Vec3.distance(entity.node.worldPosition, _this4._owner.node.worldPosition);
                if (distance < minDistance) {
                  minDistance = distance;
                  closestMonster = entity;
                }
              }
            }
            return false;
          });

          // 更新锁定目标
          this._owner.lockTargetCtrl.target = closestMonster;
        }

        /**
         * 返回领地
         */;
        _proto.goHome = function goHome() {
          return;
        }

        /**
         * 检测是否需要巡逻
         */;
        _proto.checkPatrol = function checkPatrol() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果正在攻击或释放技能，不巡逻
          if (this._owner.state.isAttacking() || this._owner.checkCanUseSkill()) {
            return false;
          }

          // 检查是否有怪物目标
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            this.findNearestMonster();
          }

          // 没有目标时才巡逻
          return !this.target;
        }

        /**
         * 巡逻（无怪物时移动到怪物出生点y坐标1100）
         * 策略：只往怪物出生点方向移动，如果已经到达或超过，就待机等待下一波怪物
         */;
        _proto.patrol = function patrol() {
          var ownerPos = this._owner.node.worldPosition;
          var monsterBirthY = 1100; // 怪物出生点Y坐标

          // 场景边界定义（根据实际场景大小设置）
          var minY = 50; // 最小Y坐标（留一些边距）
          var maxY = 1160; // 最大Y坐标（不要超过怪物出生点太多）
          var minX = 50; // 最小X坐标
          var maxX = 620; // 最大X坐标（场景宽度720，留边距）

          // 如果已经超出边界，停止移动并警告
          if (ownerPos.y < minY || ownerPos.y > maxY || ownerPos.x < minX || ownerPos.x > maxX) {
            this._owner.exitMove();
            this._locking = false;
            console.warn("[HeroAI] Hero\u8D85\u51FA\u5B89\u5168\u8FB9\u754C\uFF0C\u505C\u6B62\u79FB\u52A8: pos=(" + ownerPos.x.toFixed(0) + ", " + ownerPos.y.toFixed(0) + ")");
            return;
          }

          // 如果已经到达或超过怪物出生点Y坐标，待机等待下一波怪物
          // 不要往回走（往城墙方向），因为怪物会从出生点刷新
          if (ownerPos.y >= monsterBirthY - 50) {
            this._owner.exitMove();
            this._locking = false;
            return;
          }

          // 只有当Hero在怪物出生点下方时，才往上移动
          var direction = new Vec3(0, 1, 0); // 始终往Y正方向（怪物出生点方向）移动
          this._locking = true;
          this._owner.move(direction, this._owner.getMoveActionState());
        }

        /**
         * 移动到目标点100范围并攻击（主函数）
         * @param target 目标角色或目标位置
         */;
        _proto.moveToTarget = function moveToTarget(target) {
          if (target instanceof Vec3 && (target.x >= GameBattle.BattleScope.big_x || target.y >= 1160 || target.x <= GameBattle.BattleScope.min_x || target.y <= 0)) {
            return;
          }
          this._frameCount++;
          // 检查是否已到达目标点
          if (this._isTargetReached) {
            return;
          }
          // 检查基本条件
          if (!this._checkBasicConditions()) {
            return;
          }

          // 检查目标有效性并获取目标位置
          var targetPos = this._getTargetPosition(target);
          if (!targetPos) {
            return;
          }

          // 检查目标是否变化
          if (this._lastTarget !== target) {
            this._lastTarget = target;
            // 重置到达标志
            this._isTargetReached = false;
          }

          // 执行实际的移动逻辑
          this._executeMoveLogic(target, targetPos);
        }

        /**
         * 检查基本条件
         */;
        _proto._checkBasicConditions = function _checkBasicConditions() {
          if (!this._owner || this.pause || !App.battleMgr.isInBattle()) {
            return false;
          }
          return true;
        }

        /**
         * 获取目标位置
         */;
        _proto._getTargetPosition = function _getTargetPosition(target) {
          if (target instanceof Vec3) {
            return target;
          } else {
            // 如果是角色对象，获取其世界位置
            if (!target || !target.node) {
              return null;
            }
            return target.node.worldPosition;
          }
        }

        /**
         * 执行实际的移动逻辑
         */;
        _proto._executeMoveLogic = function _executeMoveLogic(target, targetPos) {
          if (target instanceof Vec3) {
            this._moveToTargetPosition(target, targetPos);
            return;
          }
          // 计算到目标的距离
          var distance = Vec3.distance(this._owner.node.worldPosition, targetPos);
          var max = this._owner.atkSkill.checkRange() ? this._owner.atkSkill.distance[1] : 100;
          // 如果距离大于技能最大距离，向目标移动
          if (distance > max) {
            this._isTargetReached = false;
            this._moveToTargetPosition(target, targetPos);
          } else {
            // 距离小于等于100，停止移动并攻击
            this._handleTargetReached(target);
          }
        }

        /**
         * 向目标位置移动
         */;
        _proto._moveToTargetPosition = function _moveToTargetPosition(target, targetPos) {
          if (target instanceof Vec3) {
            this._handleZeroVectorMove(target, targetPos);
            return;
          }
          // 使用getMoveVector获取正确的移动方向向量
          var pos = App.mapMgr.getMoveVector(this._owner.node.worldPosition, targetPos, false, this._owner.findPathUseMaxDeep() ? FindPathDeepType.Boss : FindPathDeepType.Normal);

          // 如果getMoveVector返回零向量，直接控制怪物位置向目标移动
          if (target instanceof RoleBase && pos.x === 0 && pos.y === 0) {
            this._handleZeroVectorMove(target, targetPos);
          } else if (pos.x !== 0 || pos.y !== 0) {
            this._handleNormalMove(target, pos);
          } else {
            this._owner.exitMove();
          }
        }

        /**
         * 处理零向量移动情况
         */;
        _proto._handleZeroVectorMove = function _handleZeroVectorMove(target, targetPos) {
          // 计算移动方向
          var dirX = targetPos.x - this._owner.node.worldPosition.x;
          var dirY = targetPos.y - this._owner.node.worldPosition.y;
          var length = Math.sqrt(dirX * dirX + dirY * dirY);
          if (length > 0.1) {
            if (this._owner.state.isAttacking()) {
              this._owner.exitMove();
              return;
            }
            // 只有当有实际移动时才播放移动动画
            // 直接设置移动状态，确保播放移动动画
            if (this._owner.state.type !== GameBattle.ActionState.Move) {
              this._owner.state.type = GameBattle.ActionState.Move;
            }

            // 计算移动步长（根据距离动态调整，增大每帧移动距离以提高流畅度）
            var moveStep = Math.min(length, 1); // 每帧最多移动单位

            // 计算新位置
            var newX = this._owner.node.worldPosition.x + dirX / length * moveStep;
            var newY = this._owner.node.worldPosition.y + dirY / length * moveStep;

            // 直接设置位置
            this._owner.node.worldPosition = new Vec3(newX, newY, 0);

            // 设置朝向
            if (this._owner.needFlip && target instanceof RoleBase) {
              this._owner.view.isFlipX = this._owner.node.position.x > target.node.position.x;
            }
          } else {
            // 距离目标太近，退出移动状态
            this._owner.exitMove();
          }
        }

        /**
         * 处理正常移动情况
         */;
        _proto._handleNormalMove = function _handleNormalMove(target, pos) {
          this._locking = true;
          this._owner.move(pos, this._owner.getMoveActionState());
          if (this._owner.needFlip && target instanceof RoleBase) {
            this._owner.view.isFlipX = this._owner.node.position.x > target.node.position.x;
          }
        }

        /**
         * 处理到达目标的情况
         */;
        _proto._handleTargetReached = function _handleTargetReached(target) {
          this._owner.exitMove();
          this._isTargetReached = true;

          // 如果目标是角色对象，设置为锁定目标
          if (target instanceof RoleBase) {
            this._owner.lockTargetCtrl.target = target;
          }

          // 执行攻击
          if (this._owner.lockTargetCtrl.target && this._owner.atkSkill && this._owner.atkSkill.skillID !== 0 && !this._owner.state.isAttacking() && !this._owner.state.isSkilling()) {
            this.doAttack();
          }
        };
        _createClass(HeroAI, [{
          key: "pause",
          get: function get() {
            return this._pause;
          },
          set: function set(value) {
            this._pause = value;
            if (value) {
              this.doDaiji();
            }
          }
        }, {
          key: "stateLock",
          get: function get() {
            return this._stateLock;
          },
          set: function set(v) {
            this._stateLock = v;
          }
        }, {
          key: "target",
          get: function get() {
            this._target = this._owner.lockTargetCtrl.target;
            return this._target;
          },
          set: function set(value) {
            this._target = value;
          }
        }, {
          key: "isTargetReached",
          get: function get() {
            return this._isTargetReached;
          },
          set: function set(value) {
            this._isTargetReached = value;
          }
        }]);
        return HeroAI;
      }(BaseAi));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroAvatarItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UI_TeamHeroListView.ts', './Layout_UI_TeamHeroListView.ts', './UIMgr.ts', './TeamMgr.ts', './DBRecord.ts', './UtilGame.ts', './App.ts', './ModuleDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, Node, Component, UI_TeamHeroListView, Layout_UI_TeamHeroListView, UIMgr, LayerType, TeamMgr, HeroJobIcon, DBRecord, UtilGame, App, ModuleDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      UI_TeamHeroListView = module.UI_TeamHeroListView;
    }, function (module) {
      Layout_UI_TeamHeroListView = module.Layout_UI_TeamHeroListView;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      TeamMgr = module.TeamMgr;
      HeroJobIcon = module.HeroJobIcon;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
      cclegacy._RF.push({}, "fe12dbjFb1Lg5tr0PTeCpB2", "HeroAvatarItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var HeroAvatarItem = exports('HeroAvatarItem', (_dec = ccclass("HeroAvatarItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Sprite
      }), _dec7 = property({
        type: Node
      }), _dec8 = property({
        type: Label
      }), _dec9 = property({
        type: Sprite
      }), _dec10 = property({
        type: Node
      }), _dec11 = property([Sprite]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(HeroAvatarItem, _Component);
        function HeroAvatarItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 头像品质框 */
          _initializerDefineProperty(_this, "headBg", _descriptor, _assertThisInitialized(_this));
          /** 头像框 */
          _initializerDefineProperty(_this, "headIcon", _descriptor2, _assertThisInitialized(_this));
          /** 头像锁定 */
          _initializerDefineProperty(_this, "lockSp", _descriptor3, _assertThisInitialized(_this));
          /** 解锁条件 */
          _initializerDefineProperty(_this, "conditionLab", _descriptor4, _assertThisInitialized(_this));
          /** 添加英雄+号标识 */
          _initializerDefineProperty(_this, "addSp", _descriptor5, _assertThisInitialized(_this));
          /** 英雄等级Node */
          _initializerDefineProperty(_this, "levelNode", _descriptor6, _assertThisInitialized(_this));
          /** 英雄等级 */
          _initializerDefineProperty(_this, "lvLab", _descriptor7, _assertThisInitialized(_this));
          /** 英雄职业 */
          _initializerDefineProperty(_this, "jopSp", _descriptor8, _assertThisInitialized(_this));
          /** 星级Node */
          _initializerDefineProperty(_this, "starNode", _descriptor9, _assertThisInitialized(_this));
          /** 星星数组 */
          _initializerDefineProperty(_this, "starList", _descriptor10, _assertThisInitialized(_this));
          _this._pos = 0;
          _this._currFormation = 0;
          _this._isLocked = false;
          _this._onTouchCb = null;
          _this._data = void 0;
          return _this;
        }
        var _proto = HeroAvatarItem.prototype;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          this.node.on(Node.EventType.TOUCH_END, function () {
            if (_this2._onTouchCb) {
              _this2._onTouchCb(_this2, _this2._data);
            }
          });
        };
        _proto.onDestroy = function onDestroy() {
          this.node.off(Node.EventType.TOUCH_END, this._onTouchCb, this);
        }
        /**
         * @param data 编队单元数据
         * @param pos 在编队中的位置
         * @param index 当前编队索引
         */;
        _proto.show = function show(data, pos, index) {
          var _this3 = this;
          this._data = data;
          if (pos) {
            this._pos = pos;
            this._currFormation = index;
            var cfgs = DBRecord.fetchKvs("Biandui", {
              type: 1
            });
            var posCfg = null;
            cfgs.forEach(function (element) {
              if (element.sort === _this3._pos) {
                posCfg = element;
                return;
              }
            });
            UtilGame.loadHeroHeadBg(this.headBg, 0, "min");
            if (!data && posCfg.wintimes && posCfg.wintimes > 0) {
              this.setLock();
              this._isLocked = true;
              this.conditionLab.string = "\u80DC\u5229" + posCfg.wintimes + "\u6B21";
            } else {
              if (data && data.id && data.id > 0) {
                //获取英雄数据更新相关信息
                this.conditionLab.enabled = false;
                this.lockSp.enabled = false;
                this.addSp.enabled = false;
                this.addSp.node.active = false;
                this.levelNode.active = true;
                this.jopSp.enabled = true;
                this.starNode.active = true;
                this.headIcon.enabled = true;
                var hero = TeamMgr.inst.getHeroById(data.id);
                if (!hero) {
                  return;
                }
                this.lvLab.string = hero.level + "\u7EA7";
                var heroCfg = TeamMgr.inst.getHeroIdCfg(data.id);
                UtilGame.loadHeroHeadIcon(this.headIcon, data.id);
                // 根据品质设置品质框
                UtilGame.loadHeroHeadBg(this.headBg, heroCfg.color, "min");
                App.resMgr.loadImage(this.jopSp, ModuleDef.BASE_COMMON, "/texture/new_common/" + HeroJobIcon[heroCfg.job].icon);
                var _index = 0;
                this.starList.forEach(function (star) {
                  star.node.active = _index < hero.star;
                  _index++;
                });
              } else {
                this.setLock();
                this.conditionLab.enabled = false;
                this.lockSp.enabled = false;
                this.addSp.enabled = true;
                this.addSp.node.active = true;
                this.headIcon.enabled = false;
                this.levelNode.active = false;
                this.jopSp.enabled = false;
                this.starNode.active = false;
              }
            }
          }
        };
        _proto.onItemClick = function onItemClick(event) {
          // 阻止事件冒泡和穿透
          event.propagationStopped = true;
          event.preventSwallow = false;
          if (this._isLocked) {
            return;
          }
          UIMgr.inst.open(UI_TeamHeroListView, LayerType.panel, Layout_UI_TeamHeroListView, [{
            pos: this._pos,
            index: this._currFormation,
            type: "add"
          }], function () {});
        };
        _proto.setLock = function setLock() {
          this.headIcon.enabled = false;
          this.levelNode.active = false;
          this.jopSp.enabled = false;
          this.starNode.active = false;
          this.lockSp.enabled = true;
          this.addSp.enabled = false;
        };
        _proto.setConditionLab = function setConditionLab(flag) {
          this.conditionLab.node.active = flag;
        };
        _proto.onTouchCellBack = function onTouchCellBack(cb) {
          var _this4 = this;
          if (cb) {
            this._onTouchCb = function () {
              return cb(_this4, _this4._data);
            };
          } else {
            this._onTouchCb = undefined;
          }
        }

        /**
         * 通过heroId显示英雄信息
         * @param heroId 英雄ID
         */;
        _proto.showByHeroId = function showByHeroId(heroId) {
          if (!heroId || heroId <= 0) {
            this.conditionLab.node.active = false;
            this.lockSp.node.active = false;
            this.addSp.node.active = true;
            this.headIcon.node.active = false;
            this.levelNode.active = false;
            this.jopSp.node.active = false;
            this.starNode.active = false;
            UtilGame.loadHeroHeadBg(this.headBg, 0, "min");
            return;
          }
          var heroData = TeamMgr.inst.getHeroById(heroId);
          if (!heroData) {
            this.conditionLab.node.active = false;
            this.lockSp.node.active = false;
            this.addSp.node.active = true;
            this.addSp.node.active = true;
            this.headIcon.node.active = false;
            this.levelNode.active = false;
            this.jopSp.node.active = false;
            this.starNode.active = false;
            return;
          }
          this.conditionLab.node.active = false;
          this.lockSp.node.active = false;
          this.addSp.node.active = false;
          this.levelNode.active = true;
          this.jopSp.node.active = true;
          this.starNode.active = true;
          this.headIcon.node.active = true;
          this.lvLab.string = heroData.level + "\u7EA7";
          var heroCfg = TeamMgr.inst.getHeroIdCfg(heroId);
          UtilGame.loadHeroHeadIcon(this.headIcon, heroId);
          UtilGame.loadHeroHeadBg(this.headBg, heroCfg.color, "min");
          App.resMgr.loadImage(this.jopSp, ModuleDef.BASE_COMMON, "/texture/new_common/" + HeroJobIcon[heroCfg.job].icon);
          var index = 0;
          this.starList.forEach(function (star) {
            star.node.active = index < heroData.star;
            index++;
          });
        };
        return HeroAvatarItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "headBg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "headIcon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lockSp", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "conditionLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "addSp", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "levelNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lvLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "jopSp", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "starNode", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "starList", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroHPBar.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleProprMgr.ts', './TeamMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, ProgressBar, Label, Sprite, Component, BattlePropertyName, TeamMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
      Sprite = module.Sprite;
      Component = module.Component;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "ec4d866Nq5Fd6XtYTQGKjwC", "HeroHPBar", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 血条栏
       */
      var HeroHPBar = exports('HeroHPBar', (_dec = ccclass("HeroHPBar"), _dec2 = property({
        type: ProgressBar
      }), _dec3 = property({
        type: ProgressBar
      }), _dec4 = property({
        type: Label
      }), _dec5 = property({
        type: Sprite
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(HeroHPBar, _Component);
        function HeroHPBar() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "pb_hp", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "pb_rage", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lab_num", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sp_bar", _descriptor4, _assertThisInitialized(_this));
          /** 持有者 */
          _this._owner = void 0;
          return _this;
        }
        var _proto = HeroHPBar.prototype;
        /**
         * 刷新UI
         */
        _proto.refreshUI = function refreshUI() {
          var cur = this._owner.roleVO.curHP;
          var max = this._owner.roleVO.getRoleAttr(BattlePropertyName.shengming);
          var progress = cur / max;
          if (progress <= 0) return;
          this.node.active = !(progress === 0);
          progress = Math.min(progress, 1);
          this.pb_hp.progress = progress;
          this.lab_num.string = cur + "/" + max;
        };
        _proto.refreshRage = function refreshRage() {
          var stageCfg = TeamMgr.inst.getHeroStageCfg(this._owner.heroId, this._owner.roleVO.stage);
          if (stageCfg && stageCfg.nuqi) {
            // nuqi格式: [每秒增长值, 增长间隔(秒), 最大值]
            // 例如: [5, 1, 100] 表示每1秒增长5点怒气，最大100
            var _stageCfg$nuqi = stageCfg.nuqi,
              gainAmount = _stageCfg$nuqi[0],
              gainInterval = _stageCfg$nuqi[1],
              maxRage = _stageCfg$nuqi[2];
            this.pb_rage.progress = this._owner.rage / maxRage;
          }
        };
        _createClass(HeroHPBar, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
            this.refreshUI();
            this.node.setScale(1, 1, 1);
          }
        }]);
        return HeroHPBar;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "pb_hp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "pb_rage", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lab_num", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "sp_bar", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroModelFrameAnimation.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModelFrameAnimation.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ModuleDef, ModelFrameAnimation;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModelFrameAnimation = module.ModelFrameAnimation;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "3948bae4w1DgYQk6abd7fCq", "HeroModelFrameAnimation", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var HeroModelFrameAnimation = exports('HeroModelFrameAnimation', (_dec = ccclass("HeroModelFrameAnimation"), _dec(_class = /*#__PURE__*/function (_ModelFrameAnimation) {
        _inheritsLoose(HeroModelFrameAnimation, _ModelFrameAnimation);
        function HeroModelFrameAnimation() {
          return _ModelFrameAnimation.apply(this, arguments) || this;
        }
        var _proto = HeroModelFrameAnimation.prototype;
        /**
         * 加载英雄动画数据
         */
        _proto.loadAnimationData = /*#__PURE__*/
        function () {
          var _loadAnimationData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, onCompleted, onFaild) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  try {
                    // 初始化组件
                    this.init();
                    // 设置动画相关属性
                    this.animationName = path;
                    this.moduleType = ModuleDef.HERO;
                    onCompleted && onCompleted();
                  } catch (error) {
                    console.error("Failed to load hero animation data", error);
                    onFaild && onFaild(error);
                  }
                case 1:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function loadAnimationData(_x, _x2, _x3) {
            return _loadAnimationData.apply(this, arguments);
          }
          return loadAnimationData;
        }();
        return HeroModelFrameAnimation;
      }(ModelFrameAnimation)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroModelSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModelSpine.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, UITransform, ModelSpine;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
    }, function (module) {
      ModelSpine = module.ModelSpine;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "c133aj8ghJIH7cdeklrwn7a", "HeroModelSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var HeroModelSpine = exports('HeroModelSpine', (_dec = ccclass("HeroModelSpine"), _dec(_class = /*#__PURE__*/function (_ModelSpine) {
        _inheritsLoose(HeroModelSpine, _ModelSpine);
        function HeroModelSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ModelSpine.call.apply(_ModelSpine, [this].concat(args)) || this;
          /** 是否翻转 */
          _this._isFlipX = false;
          return _this;
        }
        var _proto = HeroModelSpine.prototype;
        _proto.init = function init() {
          this._parts = [];
          this._parts.push(this.spine_body);
        };
        _proto.loadSkeletonData = function loadSkeletonData(data) {
          var _this2 = this;
          var cur = 0;
          var max = 0;
          var fnUpdateProgress = function fnUpdateProgress() {
            cur++;
            if (cur === max) {
              if (_this2.node) {
                _this2.node.getComponent(UITransform).width = _this2.spine_body.getComponent(UITransform).width;
                _this2.node.getComponent(UITransform).height = _this2.spine_body.getComponent(UITransform).height;
              }
              data.onComplete();
            }
          };
          if (typeof data.body === "string") max++;
          this.spine_body.loadHeroSkeletonData(data.body, function () {
            fnUpdateProgress();
          }, function () {});
        }

        /**
         * 是否有动画名
         */;
        _proto.hasAnimation = function hasAnimation(name) {
          var animsEnum = this.spine_body.skeleton.skeletonData.getAnimsEnum();
          return !!animsEnum[name];
        };
        _proto.clearSpine = function clearSpine() {
          this.spine_body.skeleton.skeletonData = null;
        };
        _createClass(HeroModelSpine, [{
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-this.node.scale.x, this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }
        }]);
        return HeroModelSpine;
      }(ModelSpine)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroSkill.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RoleSkill.ts', './SkillVO.ts', './App.ts', './DBRecord.ts', './BattleProprMgr.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, cclegacy, RoleSkill, SkillVO, App, DBRecord, BattlePropertyName;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      RoleSkill = module.RoleSkill;
    }, function (module) {
      SkillVO = module.SkillVO;
    }, function (module) {
      App = module.App;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }],
    execute: function () {
      cclegacy._RF.push({}, "7ed1ez+O1ZE+KvHSgEyv7IN", "HeroSkill", undefined);

      /**
       * 英雄技能管理器
       */
      var HeroSkill = exports('HeroSkill', /*#__PURE__*/function (_RoleSkill) {
        _inheritsLoose(HeroSkill, _RoleSkill);
        function HeroSkill() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleSkill.call.apply(_RoleSkill, [this].concat(args)) || this;
          // 当前选中的技能索引
          _this._selectedSkillIndex = 0;
          // 技能列表
          _this._skills = [];
          // 觉醒技能
          _this._awakenedSkill = null;
          return _this;
        }
        var _proto = HeroSkill.prototype;
        /**
         * 设置觉醒技能
         */
        _proto.setAwakenedSkill = function setAwakenedSkill(skillId) {
          var cfg = DBRecord.fetchId("Skill", skillId);
          this._awakenedSkill = new SkillVO();
          this._awakenedSkill.init(cfg);
          this.awakenedSkill.owner = this._owner;
        }

        /**
         * 初始化技能
         */;
        _proto.initSkills = function initSkills(skillIds) {
          this._skills = [];

          // 加载每个技能的数据
          for (var _iterator = _createForOfIteratorHelperLoose(skillIds), _step; !(_step = _iterator()).done;) {
            var skillId = _step.value;
            var skillVO = new SkillVO();
            var skillCfg = DBRecord.fetchId("Skill", skillId);
            skillVO.init(skillCfg);
            skillVO.owner = this._owner; // 设置技能的owner
            this._skills.push(skillVO);
          }

          // 默认选中第一个技能
          if (this._skills.length > 0) {
            this._selectedSkillIndex = 0;
          }
        }

        /**
         * 使用技能
         */;
        _proto.useSkill = function useSkill(skillIndex) {
          var index = skillIndex !== undefined ? skillIndex : this._selectedSkillIndex;
          if (index < 0 || index >= this._skills.length) {
            return false;
          }
          var skill = this._skills[index];
          if (!skill) {
            return false;
          }
          this._owner.curSkill = skill;
          this._owner.curSkillName = skill.arts_action;
          // 播放技能动画
          this.playSkillAnimation(skill);

          // 触发技能效果
          // this.triggerSkillEffect(skill);

          // 开始技能冷却
          skill.startCD();
          return true;
        }

        /**
         * 播放技能动画
         */;
        _proto.playSkillAnimation = function playSkillAnimation(skill) {
          if (!this._owner) return;
          // TODO: 播放技能动画
          // this._owner.exitMove();
          this._owner.state.setSkill(skill.arts_action, skill);
        }

        /**
         * 触发技能效果
         */;
        _proto.triggerSkillEffect = function triggerSkillEffect(skill) {
          if (!this._owner) return;

          // 获取技能目标
          var targets = this.getSkillTargets(skill);
          if (targets.length === 0) {
            return;
          }

          // 对每个目标应用技能效果
          for (var _iterator2 = _createForOfIteratorHelperLoose(targets), _step2; !(_step2 = _iterator2()).done;) {
            var target = _step2.value;
            // 计算伤害
            var damage = this.calculateSkillDamage(skill, target);

            // 应用伤害
            target.hurt(damage, this._owner);

            // 应用buff
            this.applySkillBuffs(skill, target);
          }

          // 播放技能特效
          this.playSkillEffect(skill);
        }

        /**
         * 获取技能目标
         */;
        _proto.getSkillTargets = function getSkillTargets(skill) {
          var targets = [];
          if (!this._owner) return targets;

          // 根据技能类型和范围获取目标
          var roleCtrl = App.battleMgr.roleCtrl;
          var position = this._owner.node.position;

          // TODO: 根据技能的目标类型、范围、数量等获取有效的目标
          // 这里需要根据具体的技能配置来实现

          return targets;
        }

        /**
         * 计算技能伤害
         */;
        _proto.calculateSkillDamage = function calculateSkillDamage(skill, target) {
          if (!this._owner) return 0;

          // 基础伤害 = 攻击力 * 技能系数
          // 基础伤害 = 攻击力 * 技能系数
          var damage = this._owner.roleVO.getRoleAttr(BattlePropertyName.gongji) * skill.damageFactor;

          // 考虑目标防御
          if (target.roleVO.def > 0) {
            damage = damage * (damage / (damage + target.roleVO.def));
          }
          return Math.floor(damage);
        }

        /**
         * 应用技能buff
         */;
        _proto.applySkillBuffs = function applySkillBuffs(skill, target) {
          // TODO: 应用技能附带的buff效果
        }

        /**
         * 播放技能特效
         */;
        _proto.playSkillEffect = function playSkillEffect(skill) {
          // TODO: 播放技能特效
        }

        /**
         * 根据技能ID获取技能对象
         */;
        _proto.getSkillById = function getSkillById(skillId) {
          for (var _iterator3 = _createForOfIteratorHelperLoose(this._skills), _step3; !(_step3 = _iterator3()).done;) {
            var skill = _step3.value;
            if (skill.skillID === skillId) {
              return skill;
            }
          }
          return null;
        }

        /**
         * 获取所有技能
         */;
        _proto.getAllSkills = function getAllSkills() {
          return this._skills;
        }

        /**
         * 更新技能CD
         */;
        _proto.update = function update(dt) {
          if (this._awakenedSkill) {
            this._awakenedSkill.onUpdate(dt);
          }

          // 更新所有技能的CD
          for (var _iterator4 = _createForOfIteratorHelperLoose(this._skills), _step4; !(_step4 = _iterator4()).done;) {
            var skill = _step4.value;
            skill.onUpdate(dt);
          }
        };
        _createClass(HeroSkill, [{
          key: "awakenedSkill",
          get: function get() {
            return this._awakenedSkill;
          }
        }]);
        return HeroSkill;
      }(RoleSkill));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroSkillItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ModuleDef.ts', './ScrollListItem.ts', './UtilGame.ts', './UIUtil.ts', './Layout_HeroSkillItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, CCBoolean, Sprite, App, ModuleDef, ScrollListItem, UtilGame, UIUtil, Layout_HeroSkillItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCBoolean = module.CCBoolean;
      Sprite = module.Sprite;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      Layout_HeroSkillItem = module.Layout_HeroSkillItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _class3, _binding;
      cclegacy._RF.push({}, "7cee4W/JAxO5Yx9++3lhRNt", "HeroSkillItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var HeroSkillItem = exports('HeroSkillItem', (_dec = ccclass("HeroSkillItem"), _dec2 = property(CCBoolean), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Sprite
      }), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(HeroSkillItem, _ScrollListItem);
        function HeroSkillItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "canClick", _descriptor, _assertThisInitialized(_this));
          /** 技能背景 */
          _initializerDefineProperty(_this, "skillBg", _descriptor2, _assertThisInitialized(_this));
          /** 技能图标 */
          _initializerDefineProperty(_this, "skillIcon", _descriptor3, _assertThisInitialized(_this));
          /** 技能类型标签 */
          _initializerDefineProperty(_this, "skillType", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = HeroSkillItem.prototype;
        _proto.onLoad = function onLoad() {
          if (this.canClick) {
            this.initItemButton_ifHas(HeroSkillItem.custom, Layout_HeroSkillItem);
          }
        }

        /**
         * 显示技能信息
         * @param skill_data 技能ID
         */;
        _proto.show = function show(skill_data) {
          if (!skill_data) return;
          this._data = skill_data;
          // 获取技能配置
          var skillCfg = skill_data.cfg;
          if (!skillCfg) {
            console.error("\u6280\u80FD\u914D\u7F6E\u4E0D\u5B58\u5728");
            return;
          }

          // 设置技能图标
          if (this.skillIcon && skillCfg.icon) {
            UtilGame.loadSkillIcon(this.skillIcon, skillCfg.id);
          }

          // 设置技能类型标签
          if (this.skillType) {
            // 根据技能类型显示不同的文本
            var iconStr = this.getSkillTypeIcon(skillCfg.type);
            App.log.logBusiness("skill_type:  " + skillCfg.type);
            App.resMgr.loadImage(this.skillType, ModuleDef.BASE_COMMON, "/texture/new_common/" + iconStr);
          }
          UIUtil.setGrayByNode(this.node, !skill_data.activate);
        };
        _proto.setScalle = function setScalle(v) {
          this.node.scale_x = v;
          this.node.scale_y = v;
        }

        /**
         * 获取技能类型文本
         * @param type 技能类型
         */;
        _proto.getSkillTypeIcon = function getSkillTypeIcon(type) {
          // 根据实际的技能类型定义返回对应文本
          switch (type) {
            case 1:
              return "com_sklii_pu";
            case 2:
            case 3:
              return "com_sklii_bei";
            case 4:
              return "com_sklii_nu";
            default:
              return "";
          }
        };
        _proto.onBtnClick = function onBtnClick() {
          console.log("TeamHeroItem clicked:", this._data);
          // 这里可以添加点击后的逻辑，比如打开英雄详情界面
        };

        return HeroSkillItem;
      }(ScrollListItem), _class3.custom = {
        binding: (_binding = {}, _binding["btnClick"] = {
          method: "onBtnClick"
        }, _binding)
      }, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "canClick", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "skillBg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "skillIcon", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "skillType", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroVO.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './RoleBaseVO.ts', './BattleProprMgr.ts', './TeamMgr.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, DBRecord, RoleBaseVO, BattlePropertyName, TeamMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      RoleBaseVO = module.RoleBaseVO;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }],
    execute: function () {
      cclegacy._RF.push({}, "e6ad6buvZ9KWIcsth7nUIaf", "HeroVO", undefined);

      /**
       * 英雄数据模型
       */
      var HeroVO = exports('HeroVO', /*#__PURE__*/function (_RoleBaseVO) {
        _inheritsLoose(HeroVO, _RoleBaseVO);
        function HeroVO() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleBaseVO.call.apply(_RoleBaseVO, [this].concat(args)) || this;
          // 英雄ID
          _this.heroId = 0;
          // 英雄名称
          _this.name = "";
          /** 阶级 */
          _this._stage = 1;
          // 星级
          _this.star = 1;
          /** 职业 */
          _this.jop = 1;
          // 等级
          _this.level = 1;
          // 怒气获取速率（每秒）
          _this.rageGainPerSecond = 5;
          // 复活CD时间
          _this.reviveCDTime = 15;
          /** 进度值 */
          _this._progress = 0;
          /** 缩放值 */
          _this._size = 0;
          _this._hpHeight = 0;
          /**
           * 体型
           */
          _this._body_size = 1;
          /**
           * 是否可选中
           */
          _this._selected = void 0;
          /**
           * 隐身
           */
          _this._hide = void 0;
          _this._publicCD = 0;
          return _this;
        }
        var _proto = HeroVO.prototype;
        /**
         * 初始化英雄数据
         */
        _proto.initHeroData = function initHeroData(heroId, level, stage, star) {
          this.heroId = heroId;
          this.level = level;
          this.star = star;
          this._stage = stage;

          // TODO: 从配置表中加载英雄数据
          this.loadHeroConfig();

          // 根据等级和星级计算属性
          this.calculateAttributes();
          this.udtInitAttr(this.battleAttrList);
        }

        /**
         * 从配置表加载英雄数据
         */;
        _proto.loadHeroConfig = function loadHeroConfig() {
          var _this$_lockRange, _this$_skillIDList, _this$crash_box;
          // TODO: 从配置表中获取英雄基础数据
          // 这里暂时使用占位符数据
          var type_cfg = TeamMgr.inst.getHeroIdCfg(this.heroId);
          this.jop = type_cfg.job;
          var stage_cfg = TeamMgr.inst.getHeroStageCfg(this.heroId, this._stage);
          var level_cfg = TeamMgr.inst.getHeroLevelCfg(this.heroId, this.level);
          var star_cfg = TeamMgr.inst.getHeroStarCfg(this.heroId, this.star);
          this._moveSpeed = level_cfg.movespeed;
          (_this$_lockRange = this._lockRange).push.apply(_this$_lockRange, type_cfg.lockrange);
          this._quality = 1;
          this._viewPath = type_cfg.res; //`/Monster/${cfg.res}/${cfg.res}`;
          // this._viewPath = cfg.res;
          this._progress = 1; //cfg.progress;
          this._pursuerange = 90; //cfg.pursuerange;
          this._selected = -1; //cfg.selected;
          this._hide = -1; //cfg.hide;
          this._body_size = type_cfg.size;
          this._curHP = level_cfg.max_hp; //this.getRoleAttr(BattlePropertyName.shengming);
          this._offset = type_cfg.offset;
          this._skillIDList = [];
          this.atkId = stage_cfg.atk_id;
          stage_cfg.skill_id && (_this$_skillIDList = this._skillIDList).push.apply(_this$_skillIDList, stage_cfg.skill_id);
          star_cfg.skill_id && this._skillIDList.push(star_cfg.skill_id);
          type_cfg.crash_box && (_this$crash_box = this.crash_box).push.apply(_this$crash_box, type_cfg.crash_box);
          this.AIType = 0; //type_cfg.job;
          // let style = DBRecord.fetchId("DuoYuYan", cfg.style)?.cn || "";
          this.name = type_cfg.name || "";
          this.reviveCDTime = stage_cfg.cd;
          this._publicCD = -1; //cfg.publicCD ?? -1;
          this._init_buff_id = [];
          // if (cfg.init_buff_id) {
          //     this._init_buff_id.push(...cfg.init_buff_id);
          // }

          var jineng_cfg = DBRecord.fetchId("Skill", stage_cfg.atk_id);
          this._atkInterval = jineng_cfg.CD;
          this._size = type_cfg.size;
          this.lockOrientation = -1; //cfg.lockOrientation;

          //初始化战斗属性列表
          //战斗
          var attItem_atk = {
            id: BattlePropertyName.gongji,
            value: level_cfg.atk
          };
          //防御
          var attItem_def = {
            id: BattlePropertyName.fangyu,
            value: level_cfg.def
          };

          //最大生命
          var attItem_hp = {
            id: BattlePropertyName.shengming,
            value: level_cfg.max_hp
          };

          //攻速
          var attItem_atk_interval = {
            id: BattlePropertyName.gongsu,
            value: 0
          };

          //移速
          var attItem_moveSpeed = {
            id: BattlePropertyName.yisu,
            value: level_cfg.movespeed
          };

          //易伤
          var attItem_yishang = {
            id: BattlePropertyName.yishang,
            value: 0
          };
          this.battleAttrList.push(attItem_atk);
          this.battleAttrList.push(attItem_def);
          this.battleAttrList.push(attItem_hp);
          this.battleAttrList.push(attItem_atk_interval);
          this.battleAttrList.push(attItem_moveSpeed);
          this.battleAttrList.push(attItem_yishang);

          // this.name = `Hero_${this.heroId}`;

          // this._size = 10000;
          this._hpHeight = 200;
          this.body_size = 1;
        }

        /**
         * 根据等级和星级计算属性
         */;
        _proto.calculateAttributes = function calculateAttributes() {
          // TODO: 根据等级和星级计算最终属性
          // 这里暂时使用占位符数据
          // const baseAtk = 100;
          // const baseDef = 50;
          // const baseHp = 1000;
          // const baseSpeed = 100;

          // 等级和星级加成
          // const levelBonus = 1 + (this.level - 1) * 0.1;
          // const starBonus = 1 + (this.star - 1) * 0.2;

          // this.atk = Math.floor(baseAtk * levelBonus * starBonus);
          // this.def = Math.floor(baseDef * levelBonus * starBonus);
          // this.maxHp = Math.floor(baseHp * levelBonus * starBonus);
          // this.hp = this.maxHp;
          // this.speed = baseSpeed * levelBonus;

          // 怒气获取和复活CD随等级调整
          this.rageGainPerSecond = 5 + (this.level - 1) * 0.5;
          // this.reviveCDTime = Math.max(5, 15 - (this.level - 1) * 0.5);
        };

        _createClass(HeroVO, [{
          key: "stage",
          get: function get() {
            return this._stage;
          }
        }, {
          key: "progress",
          get: function get() {
            return this._progress;
          },
          set: function set(v) {
            this._progress = v;
          }
        }, {
          key: "size",
          get: function get() {
            return this._size;
          },
          set: function set(v) {
            this._size = v;
          }
        }, {
          key: "hpHeight",
          get: function get() {
            return this._hpHeight;
          }
        }, {
          key: "body_size",
          get: function get() {
            return this._body_size;
          },
          set: function set(value) {
            this._body_size = value;
          }
        }, {
          key: "selected",
          get: function get() {
            return this._selected;
          },
          set: function set(value) {
            this._selected = value;
          }
        }, {
          key: "hide",
          get: function get() {
            return this._hide;
          },
          set: function set(value) {
            this._hide = value;
          }
        }, {
          key: "publicCD",
          get: function get() {
            return this._publicCD;
          },
          set: function set(value) {
            this._publicCD = value;
          }
        }]);
        return HeroVO;
      }(RoleBaseVO));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HeroZhiPaiItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './App.ts', './MonitorType.ts', './HeroAvatarItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Sprite, Button, Component, PlaceGameMgr, PlaceConfigMgr, App, MonitorType, HeroAvatarItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Sprite = module.Sprite;
      Button = module.Button;
      Component = module.Component;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      HeroAvatarItem = module.HeroAvatarItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "f3acdqcpRFJgorqNTEunqFE", "HeroZhiPaiItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var HeroZhiPaiItem = exports('HeroZhiPaiItem', (_dec = ccclass("HeroZhiPaiItem"), _dec2 = property({
        type: Label,
        displayName: "等级标签",
        tooltip: "显示英雄等级"
      }), _dec3 = property({
        type: HeroAvatarItem,
        displayName: "英雄Item",
        tooltip: "英雄Item组件"
      }), _dec4 = property({
        type: Sprite,
        displayName: "物品图标",
        tooltip: "显示物品图标"
      }), _dec5 = property({
        type: Label,
        displayName: "数值标签",
        tooltip: "显示加成数值或效率"
      }), _dec6 = property({
        type: Button,
        displayName: "指派按钮",
        tooltip: "点击指派英雄"
      }), _dec7 = property({
        type: Button,
        displayName: "取消指派按钮",
        tooltip: "点击取消指派"
      }), _dec8 = property({
        type: Label,
        displayName: "状态提示节点",
        tooltip: "状态提示节点"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(HeroZhiPaiItem, _Component);
        function HeroZhiPaiItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "levelLab", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroItem", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemIcon", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "valueLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "zhipaiBtn", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "qxZhipaiBtn", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "statusLab", _descriptor7, _assertThisInitialized(_this));
          _this._openBuildingUid = 0;
          _this._openBuildingId = null;
          _this.assignHero = null;
          /**
           * 指派类型
           * @description 指派类型：1=指派，2=取消指派
           */
          _this._enumReqTypes = {
            assign: 1,
            unassign: 2
          };
          return _this;
        }
        var _proto = HeroZhiPaiItem.prototype;
        _proto.onLoad = function onLoad() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAssignHero, this.resAssignHero, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        };
        _proto.setData = function setData(assignHero, buildingUid, _openBuildingId) {
          if (!assignHero) return;
          this.assignHero = assignHero;
          this._openBuildingUid = buildingUid;
          this._openBuildingId = _openBuildingId;
          this.updateUIState();
        }

        /**
         * 更新UI状态
         */;
        _proto.updateUIState = function updateUIState() {
          if (!this.assignHero) return;
          if (this.heroItem) {
            this.heroItem.showByHeroId(this.assignHero.hero_id);
          }
          if (this.levelLab) {
            this.levelLab.string = (this.assignHero.level || 1) + "\u7EA7";
          }
          if (this.valueLab) {
            var addPercent = this.assignHero.rate ? this.assignHero.rate / 100 : 0;
            this.valueLab.string = "+" + addPercent + "%";
          }
          var isAssigned = this.assignHero.building_uid > 0;
          if (isAssigned) {
            if (this.zhipaiBtn) {
              this.zhipaiBtn.node.active = false;
            }
            if (this.qxZhipaiBtn) {
              this.qxZhipaiBtn.node.active = true;
            }
          } else {
            if (this.zhipaiBtn) {
              this.zhipaiBtn.node.active = true;
            }
            if (this.qxZhipaiBtn) {
              this.qxZhipaiBtn.node.active = false;
            }
          }
          if (this.statusLab) {
            if (isAssigned) {
              var config = PlaceConfigMgr.inst.getJianZhuConfig(this.assignHero.building_id);
              if (config) {
                this.statusLab.string = "" + config.name;
              }
            } else {
              this.statusLab.string = "空闲";
            }
          }
        }

        /**
         * 指派按钮点击事件
         */;
        _proto.onZhipaiClick = function onZhipaiClick() {
          PlaceGameMgr.inst.reqAssignHero(this._enumReqTypes.assign, this._openBuildingUid, this._openBuildingId, this.assignHero.hero_id);
        }

        /**
         * 取消指派按钮点击事件
         */;
        _proto.onQxZhipaiClick = function onQxZhipaiClick() {
          PlaceGameMgr.inst.reqAssignHero(this._enumReqTypes.unassign, this.assignHero.building_uid, this.assignHero.building_id, this.assignHero.hero_id);
        }

        /**
         * 指派英雄协议响应
         */;
        _proto.resAssignHero = function resAssignHero(msg) {
          if (!this.assignHero || msg.assign_hero.hero_id !== this.assignHero.hero_id) {
            return;
          }
          if (msg.code !== 200) {
            return;
          }
          this.assignHero = msg.assign_hero;
          this.updateUIState();
        };
        return HeroZhiPaiItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "levelLab", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "heroItem", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "itemIcon", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "valueLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "zhipaiBtn", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "qxZhipaiBtn", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "statusLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HexMapCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './PlaceGameEnum.ts', './PlaceGameMgr.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Vec3, Node, view, Component, App, MapParams, PlaceGameMgr, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      Node = module.Node;
      view = module.view;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MapParams = module.MapParams;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "baa96muZA1D4YFq4VsRu+9p", "HexMapCtrl", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      /**
       * 地图操作控制器
       */
      var HexMapCtrl = exports('HexMapCtrl', (_dec = ccclass("HexMapCtrl"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(HexMapCtrl, _Component);
        function HexMapCtrl() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.mapWidth = MapParams.mapWidth * MapParams.cellWidth;
          _this.mapHeight = MapParams.mapHeight * MapParams.cellHeight;
          _this.minScale = 0.6;
          _this.maxScale = 1.5;
          _this._isDragging = false;
          // 是否正在进行拖拽
          _this._lastTouchPos = new Vec3();
          _this._lastDistance = 0;
          _this._isPinching = false;
          // 是否正在进行双指缩放
          _this.leftRightDistance = 50;
          // 左右距离
          _this._placeMap = null;
          return _this;
        }
        var _proto = HexMapCtrl.prototype;
        _proto.onLoad = function onLoad() {
          PlaceGameMgr.inst.setHexMapCtrl(this);
          this.initReferences();
          this.addEventListeners();
          this.initPosition();
        };
        _proto.onDestroy = function onDestroy() {
          this.removeEventListeners();
        };
        _proto.initPosition = function initPosition() {
          if (this._placeMap) {
            this._placeMap.setPosition(Vec3.ZERO);
            this._placeMap.scale.set(0.8, 0.8, 0.8);
          }
        };
        _proto.initReferences = function initReferences() {
          this._placeMap = this.node.getChildByName("main");
          if (!this._placeMap) {
            App.log.logError("未找到placeMap节点，请确保场景中存在该节点");
          }
        }

        /**
         * 设置触摸事件监听
         */;
        _proto.addEventListeners = function addEventListeners() {
          this.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
          this.node.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
          this.node.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
          this.node.on(Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
          App.monitorMgr.addEventListener(EventType.TestMapBig, this.onTestMapBig, this);
          App.monitorMgr.addEventListener(EventType.TestMapSmall, this.onTestMapSmall, this);
        }

        /**
         * 清理事件监听
         */;
        _proto.removeEventListeners = function removeEventListeners() {
          if (this.node && typeof this.node.off === "function") {
            this.node.off(Node.EventType.TOUCH_START, this.onTouchStart, this);
            this.node.off(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
            this.node.off(Node.EventType.TOUCH_END, this.onTouchEnd, this);
            this.node.off(Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
          }
        }

        /**
         * 触摸开始事件处理
         */;
        _proto.onTouchStart = function onTouchStart(event) {
          this._isDragging = true;
          var touchPos = event.getUILocation();
          this._lastTouchPos.set(touchPos.x, touchPos.y, 0);
          var touches = event.getTouches();
          if (touches.length >= 2) {
            this._isPinching = true;
            this._lastDistance = this.calculateDistance(touches[0], touches[1]);
          }
          App.monitorMgr.dispatchEvent(EventType.Close_Build_XunLianBtns);
        }

        /**
         * 触摸移动事件处理
         */;
        _proto.onTouchMove = function onTouchMove(event) {
          if (!this._isDragging) return;
          var touches = event.getTouches();
          if (touches.length >= 2) {
            this._isPinching = true;
            var currentDistance = this.calculateDistance(touches[0], touches[1]);
            if (this._lastDistance > 0 && this._placeMap) {
              var scaleFactor = 1 + (currentDistance - this._lastDistance) * 0.005;
              var currentScale = this._placeMap.scale.x;
              var newScale = currentScale * scaleFactor;
              // 限制缩放大小
              var clampedScale = Math.max(this.minScale, Math.min(this.maxScale, newScale));
              if (Math.abs(clampedScale - currentScale) > 0.01) {
                this.setScale(clampedScale);
                App.log.logBusiness("HexMapCtrl: \u53CC\u6307\u7F29\u653E - \u8DDD\u79BB\u53D8\u5316: " + (currentDistance - this._lastDistance) + ", \u7F29\u653E\u56E0\u5B50: " + scaleFactor + ", \u76EE\u6807\u7F29\u653E: " + clampedScale);
              }
            }
            this._lastDistance = currentDistance;
            var center = this.calculateMidPoint(touches[0], touches[1]);
            this._lastTouchPos.set(center);
          } else if (touches.length === 1 && !this._isPinching) {
            var touchPos = event.getUILocation();
            var currentTouchPos = new Vec3(touchPos.x, touchPos.y, 0);
            var deltaX = currentTouchPos.x - this._lastTouchPos.x;
            var deltaY = currentTouchPos.y - this._lastTouchPos.y;
            if (this._placeMap) {
              var currentPos = new Vec3();
              this._placeMap.getPosition(currentPos);
              var newPos = new Vec3(currentPos.x + deltaX, currentPos.y + deltaY, 0);
              this.applyBoundary(newPos);
              if (newPos.x !== currentPos.x || newPos.y !== currentPos.y) {
                this._placeMap.setPosition(newPos);
              }
            }
            this._lastTouchPos.set(currentTouchPos);
          }
        }

        /**
         * 触摸结束事件处理
         */;
        _proto.onTouchEnd = function onTouchEnd(_event) {
          this._isDragging = false;
          this._isPinching = false;
          this._lastDistance = 0;
        }

        /**
         * 边界限制
         */;
        _proto.applyBoundary = function applyBoundary(position) {
          if (!this._placeMap) return;
          var winSize = view.getVisibleSize();
          var halfScreenWidth = winSize.width / 2;
          var halfScreenHeight = winSize.height / 2;
          var currentScale = this._placeMap.scale.x;
          var scaledMapWidth = this.mapWidth * currentScale;
          var scaledMapHeight = this.mapHeight * currentScale;
          var maxX = Math.max(0, scaledMapWidth / 2 - halfScreenWidth) - this.leftRightDistance;
          var maxY = Math.max(0, scaledMapHeight / 2 - halfScreenHeight);
          position.x = Math.max(-maxX, Math.min(maxX, position.x));
          position.y = Math.max(-maxY, Math.min(maxY, position.y));
        }

        /**
         * 计算两个触摸点之间的距离
         */;
        _proto.calculateDistance = function calculateDistance(touch1, touch2) {
          var p1 = touch1.getUILocation();
          var p2 = touch2.getUILocation();
          var dx = p1.x - p2.x;
          var dy = p1.y - p2.y;
          return Math.sqrt(dx * dx + dy * dy);
        }

        /**
         * 计算两个触摸点的中点
         */;
        _proto.calculateMidPoint = function calculateMidPoint(touch1, touch2) {
          var p1 = touch1.getUILocation();
          var p2 = touch2.getUILocation();
          return new Vec3((p1.x + p2.x) / 2, (p1.y + p2.y) / 2, 0);
        };
        _proto.resetPosition = function resetPosition() {
          if (this._placeMap) {
            this._placeMap.setPosition(Vec3.ZERO);
            this._placeMap.scale.set(1.0, 1.0, 1.0);
            var resetPos = new Vec3();
            this._placeMap.getPosition(resetPos);
            this.applyBoundary(resetPos);
            this._placeMap.setPosition(resetPos);
            App.log.logBusiness("HexMapCtrl: \u5730\u56FE\u91CD\u7F6E\u5B8C\u6210 - \u7F29\u653E: 1.0, \u4F4D\u7F6E: (" + resetPos.x.toFixed(2) + ", " + resetPos.y.toFixed(2) + ")");
          }
        }

        /**
         * 设置地图缩放比例
         * @param scale 缩放比例
         */;
        _proto.setScale = function setScale(scale) {
          if (this._placeMap) {
            var clampedScale = Math.max(this.minScale, Math.min(this.maxScale, scale));
            var beforeScale = this._placeMap.scale.x;
            var beforePos = new Vec3();
            this._placeMap.getPosition(beforePos);
            var winSize = view.getVisibleSize();
            var halfScreenWidth = winSize.width / 2;
            var halfScreenHeight = winSize.height / 2;
            var scaledMapWidthBefore = this.mapWidth * beforeScale;
            var scaledMapHeightBefore = this.mapHeight * beforeScale;
            var beforeMaxX = Math.max(0, scaledMapWidthBefore / 2 - halfScreenWidth);
            var beforeMaxY = Math.max(0, scaledMapHeightBefore / 2 - halfScreenHeight);
            var isAtBottomBoundary = beforeMaxY > 0 && Math.abs(beforePos.y + beforeMaxY) <= 5; // 底边界
            var isAtTopBoundary = beforeMaxY > 0 && Math.abs(beforePos.y - beforeMaxY) <= 5; // 顶边界
            var isAtLeftBoundary = beforeMaxX > 0 && Math.abs(beforePos.x + beforeMaxX) <= 5; // 左边界
            var isAtRightBoundary = beforeMaxX > 0 && Math.abs(beforePos.x - beforeMaxX) <= 5; // 右边界

            var scaledMapWidthAfter = this.mapWidth * clampedScale;
            var scaledMapHeightAfter = this.mapHeight * clampedScale;
            var newMaxX = Math.max(0, scaledMapWidthAfter / 2 - halfScreenWidth);
            var newMaxY = Math.max(0, scaledMapHeightAfter / 2 - halfScreenHeight);
            var newPos = new Vec3();
            this._placeMap.setScale(clampedScale, clampedScale, 1.0);
            if (isAtBottomBoundary) {
              newPos.y = -newMaxY;
            } else if (isAtTopBoundary) {
              newPos.y = newMaxY;
            } else if (beforeMaxY > 0) {
              newPos.y = beforePos.y * (clampedScale / beforeScale);
            } else {
              newPos.y = 0;
            }
            if (isAtLeftBoundary) {
              newPos.x = -newMaxX;
            } else if (isAtRightBoundary) {
              newPos.x = newMaxX;
            } else if (beforeMaxX > 0) {
              newPos.x = beforePos.x * (clampedScale / beforeScale);
            } else {
              newPos.x = 0;
            }
            this._placeMap.setPosition(newPos);
            var finalPos = new Vec3();
            this._placeMap.getPosition(finalPos);
            if (beforeMaxX > 0) {
              finalPos.x = Math.max(-newMaxX, Math.min(newMaxX, finalPos.x));
            } else {
              finalPos.x = 0;
            }
            if (beforeMaxY > 0) {
              finalPos.y = Math.max(-newMaxY, Math.min(newMaxY, finalPos.y));
            } else {
              finalPos.y = 0;
            }
            this._placeMap.setPosition(finalPos);
          } else {
            App.log.logError("HexMapCtrl: _placeMap节点未找到，无法设置缩放");
          }
        }

        /**
         * 获取当前地图缩放比例
         * @returns 当前缩放比例
         */;
        _proto.getScale = function getScale() {
          if (this._placeMap) {
            return this._placeMap.scale.x;
          }
          return 1.0;
        }

        // 设置地图位置
        ;

        _proto.setPosition = function setPosition(x, y) {
          if (this._placeMap) {
            var pos = new Vec3(x, y, 0);
            this.applyBoundary(pos);
            this._placeMap.setPosition(pos);
          }
        }

        /**
         * 获取当前地图位置
         * @returns
         */;
        _proto.getPosition = function getPosition() {
          if (this._placeMap) {
            var pos = new Vec3();
            this._placeMap.getPosition(pos);
            return pos;
          }
          return null;
        }

        /**
         * 测试地图放大功能
         */;
        _proto.onTestMapBig = function onTestMapBig() {
          if (this._placeMap) {
            var currentScale = this._placeMap.scale.x;
            var newScale = currentScale * 1.2;
            App.log.logBusiness("HexMapCtrl: \u6D4B\u8BD5\u653E\u5927 - \u5F53\u524D\u7F29\u653E: " + currentScale.toFixed(2) + ", \u76EE\u6807\u7F29\u653E: " + newScale.toFixed(2));
            this.setScale(newScale);
          }
        }

        /**
         * 测试地图缩小功能
         */;
        _proto.onTestMapSmall = function onTestMapSmall() {
          if (this._placeMap) {
            var currentScale = this._placeMap.scale.x;
            var newScale = currentScale * 0.8;
            App.log.logBusiness("HexMapCtrl: \u6D4B\u8BD5\u7F29\u5C0F - \u5F53\u524D\u7F29\u653E: " + currentScale.toFixed(2) + ", \u76EE\u6807\u7F29\u653E: " + newScale.toFixed(2));
            this.setScale(newScale);
          }
        }

        /**
         * 移动地图到指定位置
         * @param targetPosition 目标世界坐标位置
         * @param callback 移动完成后的回调函数
         */;
        _proto.moveToPosition = function moveToPosition(targetPosition, callback) {
          if (this._placeMap) {
            var winSize = view.getVisibleSize();
            var screenCenter = new Vec3(winSize.width / 2, winSize.height / 2, 0);
            var currentScale = this._placeMap.scale.x;
            var currentMapPos = new Vec3();
            this._placeMap.getPosition(currentMapPos);
            var targetLocalPos = new Vec3(targetPosition.x - currentMapPos.x, targetPosition.y - currentMapPos.y, 0);
            var newPosition = new Vec3(screenCenter.x - targetLocalPos.x * currentScale, screenCenter.y - targetLocalPos.y * currentScale, 0);
            this.applyBoundary(newPosition);
            this._placeMap.setPosition(newPosition);
            if (callback) {
              callback();
            }
          } else {
            if (callback) {
              callback();
            }
          }
        };
        return HexMapCtrl;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HotUpdateConfig.ts", ['cc'], function (exports) {
  var cclegacy, sys, native;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      sys = module.sys;
      native = module.native;
    }],
    execute: function () {
      cclegacy._RF.push({}, "4cb91MsFINCVb9bHPHzmzVR", "HotUpdateConfig", undefined);
      var HotUpdateEvent = exports('HotUpdateEvent', /*#__PURE__*/function (HotUpdateEvent) {
        HotUpdateEvent["HOTUPDATE_FINISH"] = "HotUpdateFinish";
        return HotUpdateEvent;
      }({}));
      var HotUpdateState = exports('HotUpdateState', /*#__PURE__*/function (HotUpdateState) {
        HotUpdateState[HotUpdateState["SUCCESS"] = 0] = "SUCCESS";
        HotUpdateState[HotUpdateState["NEWEST"] = 1] = "NEWEST";
        HotUpdateState[HotUpdateState["ERROR"] = 2] = "ERROR";
        return HotUpdateState;
      }({})); //更新失败
      var HotUpdateConfig = exports('default', /*#__PURE__*/function () {
        function HotUpdateConfig() {}
        //更新目录
        HotUpdateConfig.getHotUpdateDir = function getHotUpdateDir() {
          if (sys.isNative) {
            return native.fileUtils.getWritablePath() + "HotUpdate";
          } else {
            return "/HotUpdate";
          }
        }

        //存储热更的版本号，方便覆盖安装时候对比本地进行删除操作
        ;

        return HotUpdateConfig;
      }());
      HotUpdateConfig.DISK_HOTUPDATE_PATH = "HotUpdatePath";
      //存储热更路径，应该将该路径置为优先级最高的资源搜索路径
      HotUpdateConfig.DISK_HOTUPDATE_VERSION = "HotUpdateVersion";
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HotUpdateView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ZipHotUpdateView.ts', './HotUpdateConfig.ts', './GameBoot.ts', './GlobalData.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Label, Button, director, Sprite, native, Component, ZipHotUpdateView, HotUpdateEvent, HotUpdateConfig, GameBoot, GlobalData, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Label = module.Label;
      Button = module.Button;
      director = module.director;
      Sprite = module.Sprite;
      native = module.native;
      Component = module.Component;
    }, function (module) {
      ZipHotUpdateView = module.default;
    }, function (module) {
      HotUpdateEvent = module.HotUpdateEvent;
      HotUpdateConfig = module.default;
    }, function (module) {
      GameBoot = module.GameBoot;
    }, function (module) {
      GlobalData = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "11e1bjG+pVGZ7RLo9WjZMgA", "HotUpdateView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var HotUpdateView = exports('default', (_dec = ccclass('HotUpdateView'), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property(Label), _dec5 = property(Button), _dec6 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(HotUpdateView, _Component);
        function HotUpdateView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lblVer", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nodeUpdate", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lblState", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUpdate", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnClear", _descriptor5, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = HotUpdateView.prototype;
        _proto.onLoad = function onLoad() {
          this.addEventListeners();
          this.node.active = false;
          {
            this.node.active = false;
            GameBoot.Instance.gotoGame();
          }
        };
        _proto.setVersion = function setVersion(showVersion) {
          // this.lblVer.getComponent(Label).string = `v${showVersion}`
        };
        _proto.addEventListeners = function addEventListeners() {
          director.on(HotUpdateEvent.HOTUPDATE_FINISH, this.onUpdateFinish, this);
        };
        _proto.onUpdateFinish = function onUpdateFinish(state, msg) {
          console.log('更新完成了。hopupdate view**********----***************-----***********', msg);
          this.node.active = false;
          switch (msg) {
            case 'sucess':
              console.warn('更新成功，不做任何操作，会重启游戏---------------------=', msg);
              break;
            default:
              console.warn('最新的 ,获取没有更新文件，直接进入游戏--------------------- -=', msg);
              GameBoot.Instance.gotoGame();
              break;
          }
        };
        _proto.onDestroy = function onDestroy() {
          director.off(HotUpdateEvent.HOTUPDATE_FINISH, this.onUpdateFinish, this);
        };
        _proto.start = function start() {
          this.setVersion(GlobalData.showVersion);
        };
        _proto.update = function update(dt) {};
        _proto.setBtnState = function setBtnState(state) {
          this.btnUpdate.interactable = state;
          this.btnUpdate.node.getComponent(Sprite).grayscale = !state;
          this.btnClear.interactable = state;
          this.btnClear.node.getComponent(Sprite).grayscale = !state;
        }

        /**
         * 点击更新 用于测试
         */;
        _proto.onClickUpdate = function onClickUpdate() {
          // this.lblState.string = ""
          // this.setBtnState(false)
          // this.nodeUpdate.getComponent(ZipHotUpdateView).requestVersionInfo()
        }

        /**
         * 清理缓存
         */;
        _proto.onClickClear = function onClickClear() {
          native.fileUtils.purgeCachedEntries();
          var flag = native.fileUtils.removeDirectory(HotUpdateConfig.getHotUpdateDir());
          App.log.logBusiness('onClickClear success::' + flag);
          this.nodeUpdate.getComponent(ZipHotUpdateView).initVersion();
          this.lblState.string = 'clear success, you can update again';
        };
        return HotUpdateView;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lblVer", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "nodeUpdate", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lblState", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnUpdate", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnClear", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/HPBar.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleProprMgr.ts', './Monster.ts', './BattleDefine.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, ProgressBar, Label, Sprite, SpriteFrame, UITransform, Vec3, Component, BattlePropertyName, Monster, GameBattle;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
      Sprite = module.Sprite;
      SpriteFrame = module.SpriteFrame;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "64b57j++tZMWpmXGjDd3nX5", "HPBar", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 血条栏
       */
      var HPBar = exports('HPBar', (_dec = ccclass("HPBar"), _dec2 = property({
        type: ProgressBar
      }), _dec3 = property({
        type: Label
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property([SpriteFrame]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(HPBar, _Component);
        function HPBar() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "pb_hp", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lab_num", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sp_bar", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sp_hp", _descriptor4, _assertThisInitialized(_this));
          /** 持有者 */
          _this._owner = void 0;
          return _this;
        }
        var _proto = HPBar.prototype;
        /**
         * 刷新UI
         */
        _proto.refreshUI = function refreshUI() {
          var cur = this._owner.roleVO.curHP;
          var max = this._owner.roleVO.getRoleAttr(BattlePropertyName.shengming);
          var progress = cur / max;
          if (progress <= 0) return;
          // this.node.active = !(progress === 0);
          progress = Math.min(progress, 1);
          this.pb_hp.progress = progress;
          this.lab_num.string = cur + "/" + max;
        };
        _createClass(HPBar, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
            if (this._owner instanceof Monster) {
              var hpTransform = this.pb_hp.node.getComponent(UITransform);
              var barTransform = this.sp_bar.getComponent(UITransform);
              var width = 58;
              var height = 10;
              if (this._owner.roleVO.quality === GameBattle.MonsterQuality.Boss) {
                this.sp_bar.spriteFrame = this.sp_hp[0];
                width = 130;
                height = 18;
                this.sp_bar.node.setPosition(new Vec3(-65, 0, 0));
              } else {
                this.sp_bar.spriteFrame = this.sp_hp[1];
                this.sp_bar.node.setPosition(new Vec3(-28, 0, 0));
              }
              if (hpTransform) {
                hpTransform.setContentSize(width, height);
                this.pb_hp.totalLength = width - 2;
                barTransform.setContentSize(width - 2, height - 2);
              }
            } else {
              this.sp_bar.spriteFrame = this.sp_hp[1];
            }
            this.refreshUI();
            this.node.setScale(1, 1, 1);
          }
        }]);
        return HPBar;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "pb_hp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lab_num", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "sp_bar", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "sp_hp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Http.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "395f4l71j9A9YnzUqRRafF4", "Http", undefined);
      /*
       * @Author: heyuanguang www.heyuanguang@qq.com
       * @Date: 2025-10-21 10:35:50
       * @LastEditors: heyuanguang www.heyuanguang@qq.com
       * @LastEditTime: 2025-10-24 20:39:41
       * @FilePath: \qianduan\assets\script\frameworks\tool\Http.ts
       * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
       */
      var Http = exports('Http', /*#__PURE__*/function () {
        function Http() {}
        Http.Post = function Post(uri, params, successCallBack, _needToken) {
          if (params === void 0) {
            params = {};
          }
          var xhr = new XMLHttpRequest();
          xhr.open("POST", uri, true);
          // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
          xhr.setRequestHeader("Content-Type", "application/json");
          // if (needToken) {
          //     xhr.setRequestHeader("token", Config.token);
          // }
          var str = JSON.stringify(params); //this.querify(params);
          xhr.onreadystatechange = function () {
            if (xhr.readyState === 4 && xhr.status === 200) {
              var result = JSON.parse(xhr.responseText);
              successCallBack(result);
            }
          };
          xhr.send(str);
        };
        Http.Get = function Get(uri, successCallBack) {
          var xhr = new XMLHttpRequest();
          xhr.open("GET", uri, true);
          xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
          // if (needToken) {
          //     xhr.setRequestHeader("token", Config.token);
          // }
          xhr.onreadystatechange = function () {
            if (xhr.readyState === 4 && xhr.status === 200) {
              // let result = JSON.parse(xhr.responseText);
              successCallBack(xhr.responseText);
            }
          };
          xhr.send();
        }

        //新增网络错误处理
        ;

        Http.Get_pro = function Get_pro(uri, successCallBack, errorCallBack) {
          var xhr = new XMLHttpRequest();
          xhr.open("GET", uri, true);
          xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
          xhr.onreadystatechange = function () {
            if (xhr.readyState === 4) {
              if (xhr.status === 200) {
                var result;
                try {
                  result = JSON.parse(xhr.responseText);
                  // eslint-disable-next-line @typescript-eslint/no-unused-vars
                } catch (e) {
                  // 解析失败
                  errorCallBack && errorCallBack("Failed to parse response.");
                  return;
                }
                successCallBack(result);
              } else {
                errorCallBack && errorCallBack(xhr.statusText);
              }
            }
          };
          xhr.onerror = function (event) {
            console.error("Get request error: ", uri, event);
            errorCallBack && errorCallBack(event);
          };
          xhr.send();
        }

        //数据处理
        ;

        Http.querify = function querify(object) {
          if (object === void 0) {
            object = {};
          }
          var keys = Object.keys(object);
          var result = keys.map(function (key) {
            return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]);
          }).join("&");
          return result;
        };
        return Http;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Item_BattleMap.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './UIMgr.ts', './MonitorType.ts', './ModuleDef.ts', './App.ts', './DBRecord.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, TiledMap, Rect, sp, v3, instantiate, assetManager, Component, TiledMapAsset, GameBattle, UIMgr, MonitorType, ModuleDef, App, DBRecord;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      TiledMap = module.TiledMap;
      Rect = module.Rect;
      sp = module.sp;
      v3 = module.v3;
      instantiate = module.instantiate;
      assetManager = module.assetManager;
      Component = module.Component;
      TiledMapAsset = module.TiledMapAsset;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      UIMgr = module.UIMgr;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor, _class3;
      cclegacy._RF.push({}, "d91fdiC4f5FMbC634fzGIX5", "Item_BattleMap", undefined);
      // import { BattleMijingBMap } from '../../frameworks/manager/module/game_battle_b/BattleMijingBMap';
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      // 门的顺序
      // 8    1    2
      // 7         3
      // 6    5    4

      var Item_BattleMap = exports('Item_BattleMap', (_dec = ccclass("Item_BattleMap"), _dec2 = property(TiledMap), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(Item_BattleMap, _Component);
        function Item_BattleMap() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "tiledMap", _descriptor, _assertThisInitialized(_this));
          _this._tiledLayer = null;
          _this.hasNext = false;
          //是否生成了下一个地图块
          _this.out_direction = 0;
          //出口方向
          _this.map_width = 0;
          //地图格子X轴数量
          _this.map_height = 0;
          //地图格子y轴数量
          _this.diKuaiId = 0;
          //地块ID
          _this._tiledWidth = 0;
          //地图格子宽度
          _this._tiledHeight = 0;
          //地图格子高度
          /** 触发器类型 */
          _this._tirggerType = 0;
          _this._tiggerRect = new Rect(0, 0, 0, 0);
          _this._tirggerFunc = null;
          return _this;
        }
        var _proto = Item_BattleMap.prototype;
        _proto.init = function init(tmxName, is_born, id) {
          var _this2 = this;
          if (id === void 0) {
            id = 0;
          }
          this.diKuaiId = id;
          this.out_direction = Math.floor(parseInt(tmxName) / 10) % 10;
          if (!this.out_direction) this.hasNext = true;
          this.tiledMap.tmxAsset = Item_BattleMap.tiledMapAsset[tmxName];
          if (!this.tiledMap.tmxAsset) {
            console.error("没有找到地图块");
            return;
          }
          console.log("loadd map ", tmxName);
          this._tiledLayer = this.tiledMap.getLayer("physicalLayer");
          this.map_height = this.tiledMap.getMapSize().height;
          this.map_width = this.tiledMap.getMapSize().width;
          var gridSize = this.tiledMap.getTileSize();
          this.node.w = this.map_width * gridSize.width;
          this.node.h = this.map_height * gridSize.height;
          this._tiledHeight = gridSize.height;
          this._tiledWidth = gridSize.width;
          this._tirggerType = 0;
          var trigger = this.tiledMap.getObjectGroup("trigger");
          if (trigger) {
            var data = trigger.getObjects()[0];
            console.log("trigger", trigger, data);
            this._tirggerType = data.type;
            this._tiggerRect.x = data.x;
            this._tiggerRect.y = this.node.h - data.y;
            this._tiggerRect.width = data.width;
            this._tiggerRect.height = data.height;
            if (this._tirggerType == 1) {
              this._tirggerFunc = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
                var ctrl, spine, modifyMap, npc, npcData, x, y, pos, i, j, _x, _y, _ctrl;
                return _regeneratorRuntime().wrap(function _callee$(_context) {
                  while (1) switch (_context.prev = _context.next) {
                    case 0:
                      ctrl = App.battleMgr.battleMainViewCtrl;
                      spine = ctrl.firewall[0].getComponent(sp.Skeleton);
                      ctrl.firewall[0].active = true;

                      /**修改了地图物理层 */
                      modifyMap = false;
                      npc = _this2.tiledMap.getObjectGroup("npc");
                      if (npc) {
                        npcData = npc.getObjects()[0];
                        x = npcData.x;
                        y = _this2.node.h - npcData.y + npcData.height / 2 - 50;
                        pos = _this2.node.uiTransform.convertToWorldSpaceAR(v3(x, y, 0));
                        spine.node.setWorldPosition(pos);
                        spine.setAnimation(0, npcData["facing"].toString(), true);
                        for (i = npcData.offset.x; i < npcData.offset.x + npcData.width; i += _this2._tiledWidth) {
                          for (j = npcData.offset.y; j < npcData.offset.y + npcData.height; j += _this2._tiledHeight) {
                            _x = Math.floor(npcData.x / _this2._tiledWidth);
                            _y = Math.floor(j / _this2._tiledHeight);
                            App.mapMgr.setRoadBlock(_x, _y);
                            modifyMap = true;
                          }
                        }
                      }
                      if (modifyMap) {
                        App.monitorMgr.dispatchEvent(MonitorType.battle_show_boss_modify_map);
                      }
                      _context.next = 9;
                      return ctrl.showBoss();
                    case 9:
                      if (!npc) {
                        _ctrl = App.battleMgr.battleMainViewCtrl;
                        _ctrl.firewall[0].active = false;
                        _ctrl.firewall[1].active = false;
                      }
                    case 10:
                    case "end":
                      return _context.stop();
                  }
                }, _callee);
              }));
            }
          }
          this.addMijingBMap();
        }

        /**
         * 添加秘境B资源
         */;
        _proto.addMijingBMap = function addMijingBMap() {
          var _this3 = this;
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.MiJingB) {
            if (Item_BattleMap.preMijingBMap) {
              var node = instantiate(Item_BattleMap.preMijingBMap);
              node.name = "MijingBMap";
              this.node.parent.addChild(node);
              node.setPosition(0, 0, 0);
              // let comp = node.getComponent(BattleMijingBMap);
              // App.battleMgr.battleMainViewCtrl.battleMiJingB = comp;
            } else {
              App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/BattleMapMiJinB", function (err, prefab) {
                if (err) {
                  return;
                }
                Item_BattleMap.preMijingBMap = prefab;
                var node = instantiate(Item_BattleMap.preMijingBMap);
                node.name = "MijingBMap";
                _this3.node.parent.addChild(node);
                node.setPosition(0, 0, 0);
                // let comp = node.getComponent(BattleMijingBMap);
                // App.battleMgr.battleMainViewCtrl.battleMiJingB = comp;
              });
            }
          }

          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.MiJingA) {
            if (Item_BattleMap.preMijingAMap) {
              var _node = instantiate(Item_BattleMap.preMijingAMap);
              _node.name = "battleMiJinA";
              App.battleMgr.battleMainViewCtrl.node.addChild(_node);
              _node.setPosition(0, 0, 0);
            } else {
              App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/battleMiJinA", function (err, prefab) {
                if (err) {
                  return;
                }
                Item_BattleMap.preMijingAMap = prefab;
                var node = instantiate(Item_BattleMap.preMijingAMap);
                node.name = "battleMiJinA";
                App.battleMgr.battleMainViewCtrl.node.addChild(node);
                node.setPosition(0, 0, 0);
              });
            }
          }
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.MuZhuang) {
            App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/battleTrainingGround", function (err, prefab) {
              if (err) {
                return;
              }
              var node = instantiate(prefab);
              App.battleMgr.battleMainViewCtrl.node.addChild(node);
              node.setPosition(0, 0, 0);
            });
          }
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.JingJiChang) {
            App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/battleJingJiChang", function (err, prefab) {
              if (err) {
                return;
              }
              var node = instantiate(prefab);
              App.battleMgr.battleMainViewCtrl.node.addChild(node);
              node.setPosition(0, 0, 0);
            });
          }
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.PaTa) {
            if (Item_BattleMap.prePaoTaMap) {
              var _node2 = instantiate(Item_BattleMap.prePaoTaMap);
              _node2.name = "BattlePaTa";
              App.battleMgr.battleMainViewCtrl.node.addChild(_node2);
              _node2.setPosition(0, 0, 0);
            } else {
              App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/BattlePaTa", function (err, prefab) {
                if (err) {
                  return;
                }
                Item_BattleMap.prePaoTaMap = prefab;
                var node = instantiate(Item_BattleMap.prePaoTaMap);
                node.name = "BattlePaTa";
                App.battleMgr.battleMainViewCtrl.node.addChild(node);
                node.setPosition(0, 0, 0);
              });
            }
          }
        };
        _proto.getTileCoordAt = function getTileCoordAt(worldPos) {
          var localPos = this.node.uiTransform.convertToNodeSpaceAR(worldPos);
          var x = Math.floor(localPos.x / this._tiledWidth);
          var y = Math.floor(localPos.y / this._tiledHeight);
          return this._tiledLayer.getTileGIDAt(x, y) > 0;
        };
        Item_BattleMap.loadMap = /*#__PURE__*/function () {
          var _loadMap = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(diMao, cb) {
            var bundle_name, bundle, bundleCount, total_count, index, bundle_monster, _App$battleMgr$getMap, mapData, _App$battleMgr$initAl, monsterNameList, monsterIds, loadedCount, totalMonsters, bundle_bullet, _App$battleMgr$getAll, allBulletResList, totalBullets, bulletLoadedCount;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  Item_BattleMap.tiledMapAsset = {};
                  Item_BattleMap.bulletAsset = {};
                  Item_BattleMap.monsterAsset = {};
                  Item_BattleMap.heroAsset = {};
                  Item_BattleMap.soldierAsset = {};
                  Item_BattleMap.preMijingBMap = null;
                  Item_BattleMap.effectAsset = {};
                  bundle_name = "battleMap";
                  if (diMao == 99 || diMao == 96) {
                    bundle_name = "cityMap";
                  }
                  _context2.next = 11;
                  return UIMgr.inst.asyncGetBundle(bundle_name);
                case 11:
                  bundle = _context2.sent;
                  bundleCount = 3;
                  total_count = 100 * bundleCount;
                  index = 0;
                  _context2.next = 17;
                  return new Promise(function (resolve, reject) {
                    bundle.loadDir("map" + diMao, function (finished, total, item) {
                      cb == null || cb(finished / total * 100 / total_count);
                    }, function (err, asset) {
                      if (err) {
                        reject("瓦片地图不存在:");
                        return;
                      }
                      for (var i = asset.length; i--;) {
                        if (asset[i] instanceof TiledMapAsset) {
                          Item_BattleMap.tiledMapAsset[asset[i].name] = asset[i];
                        }
                        // console.log("xxxxxxxxxxxxxxxxxxxxxxx", asset[i].name);
                      }

                      resolve(asset);
                    });
                  });
                case 17:
                  if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.MiJingB) {
                    App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/BattleMapMiJinB", function (err, prefab) {
                      if (err) {
                        return;
                      }
                      Item_BattleMap.preMijingBMap = prefab;
                    });
                  }
                  index += 100;
                  _context2.next = 21;
                  return UIMgr.inst.asyncGetBundle(ModuleDef.MONSTER);
                case 21:
                  bundle_monster = _context2.sent;
                  _App$battleMgr$getMap = App.battleMgr.getMapData(App.battleMgr.diMao), mapData = _App$battleMgr$getMap[0], _App$battleMgr$getMap[1];
                  _App$battleMgr$initAl = App.battleMgr.initAllMonsterRes(mapData), monsterNameList = _App$battleMgr$initAl[0], monsterIds = _App$battleMgr$initAl[1];
                  loadedCount = 0;
                  if (!(monsterNameList && monsterNameList.length > 0)) {
                    _context2.next = 29;
                    break;
                  }
                  totalMonsters = monsterNameList.length;
                  _context2.next = 29;
                  return Promise.all(monsterNameList.map(function (monsterName) {
                    return new Promise(function (resolve, reject) {
                      bundle_monster.load("/" + monsterName + "/" + monsterName, sp.SkeletonData, function (err, asset) {
                        if (err) {
                          console.error("============================>>\u602A\u7269spine\u4E0D\u5B58\u5728: " + monsterName);
                          resolve(null);
                          return;
                        }
                        Item_BattleMap.monsterAsset[asset.name] = asset;
                        //console.log("============================>> 加载怪物spine:", asset.name);
                        loadedCount++;
                        cb == null || cb(loadedCount / totalMonsters * 100 / total_count + index / total_count);
                        resolve(asset);
                      });
                    });
                  }));
                case 29:
                  console.log("============================>> 关卡怪物spine加载完成,总数:", loadedCount);
                  index += 100;
                  _context2.next = 33;
                  return UIMgr.inst.asyncGetBundle(ModuleDef.BULLET_EFFECT);
                case 33:
                  bundle_bullet = _context2.sent;
                  _App$battleMgr$getAll = App.battleMgr.getAllBulletRes(monsterIds), allBulletResList = _App$battleMgr$getAll[0], _App$battleMgr$getAll[1];
                  if (!(allBulletResList && allBulletResList.length > 0)) {
                    _context2.next = 41;
                    break;
                  }
                  totalBullets = allBulletResList.length;
                  bulletLoadedCount = 0;
                  _context2.next = 40;
                  return Promise.all(allBulletResList.map(function (bulletName) {
                    return new Promise(function (resolve, reject) {
                      bundle_bullet.load("/" + bulletName + "/" + bulletName, sp.SkeletonData, function (err, asset) {
                        if (err) {
                          console.error("============================>>TEST BULLET \u5B50\u5F39spine\u4E0D\u5B58\u5728: " + bulletName);
                          resolve(null);
                          return;
                        }
                        Item_BattleMap.bulletAsset[asset.name] = asset;
                        // console.log('============================>> TEST BULLET 加载子弹spine:', asset.name);
                        bulletLoadedCount++;
                        cb == null || cb(bulletLoadedCount / totalBullets * 100 / total_count + index / total_count);
                        resolve(asset);
                      });
                    });
                  }));
                case 40:
                  console.log("============================>> TEST BULLET 关卡子弹spine加载完成,总数:", bulletLoadedCount);
                case 41:
                case "end":
                  return _context2.stop();
              }
            }, _callee2);
          }));
          function loadMap(_x2, _x3) {
            return _loadMap.apply(this, arguments);
          }
          return loadMap;
        }();
        Item_BattleMap.loadMapResource = /*#__PURE__*/function () {
          var _loadMapResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(fbId, _cb) {
            var index, fb_monsters, _App$battleMgr$initAl2, monsterResList, monsterIds, resourceList, loadedCount, bundleCount, total_count, success, bundle_bullet, _App$battleMgr$getAll2, allBulletResList, totalBullets, bulletLoadedCount;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  index = 0;
                  fb_monsters = DBRecord.fetchKvs("Fb_Monster", {
                    fbid: fbId
                  });
                  _App$battleMgr$initAl2 = App.battleMgr.initAllMonsterRes(fb_monsters), monsterResList = _App$battleMgr$initAl2[0], monsterIds = _App$battleMgr$initAl2[1];
                  resourceList = App.battleMgr.initHeroAndSoldierRes();
                  resourceList = resourceList.concat(monsterResList);
                  loadedCount = 0;
                  bundleCount = 2;
                  total_count = 100 * bundleCount;
                  if (!(resourceList && resourceList.length > 0)) {
                    _context3.next = 13;
                    break;
                  }
                  _context3.next = 11;
                  return App.resourceManager.preloadBattleResources(resourceList, function () {
                    loadedCount++;
                    var pre = loadedCount / resourceList.length * 100 / total_count + index / total_count;
                    App.log.logBusiness("加载进度值=====" + pre);
                    _cb == null || _cb(pre);
                  });
                case 11:
                  success = _context3.sent;
                  if (success) {
                    console.log("Battle resources preloaded successfully");
                  }
                case 13:
                  App.log.logBusiness("============================>> 副本帧动画加载完成,总数:" + loadedCount);
                  index += 100;
                  _context3.next = 17;
                  return UIMgr.inst.asyncGetBundle(ModuleDef.BULLET_EFFECT);
                case 17:
                  bundle_bullet = _context3.sent;
                  _App$battleMgr$getAll2 = App.battleMgr.getAllBulletRes(monsterIds), allBulletResList = _App$battleMgr$getAll2[0], _App$battleMgr$getAll2[1];
                  allBulletResList.push("effect_bullet_fashi_shengguangrensuxuanfeng");
                  // let allBulletResList = ["effect_bullet_fashi_anyeliuxing", "effect_Monster_YuanZhengJunGongNuShou_Bullet"];
                  if (!(allBulletResList && allBulletResList.length > 0)) {
                    _context3.next = 26;
                    break;
                  }
                  totalBullets = allBulletResList.length;
                  bulletLoadedCount = 0;
                  _context3.next = 25;
                  return Promise.all(allBulletResList.map(function (bulletName) {
                    return new Promise(function (resolve, reject) {
                      bundle_bullet.load("/" + bulletName + "/" + bulletName, sp.SkeletonData, function (err, asset) {
                        if (err) {
                          console.error("============================>>TEST BULLET \u5B50\u5F39spine\u4E0D\u5B58\u5728: " + bulletName);
                          resolve(null);
                          return;
                        }
                        Item_BattleMap.bulletAsset[asset.name] = asset;
                        // App.log.logBusiness('============================>> TEST BULLET 加载子弹spine:', asset.name);
                        bulletLoadedCount++;
                        var pre = bulletLoadedCount / totalBullets * 100 / total_count + index / total_count;
                        // App.log.logBusiness("加载进度值=====" + pre);
                        _cb == null || _cb(pre);
                        resolve(asset);
                      });
                    });
                  }));
                case 25:
                  App.log.logBusiness("============================>> TEST BULLET 关卡子弹spine加载完成,总数:" + bulletLoadedCount);
                case 26:
                case "end":
                  return _context3.stop();
              }
            }, _callee3);
          }));
          function loadMapResource(_x4, _x5) {
            return _loadMapResource.apply(this, arguments);
          }
          return loadMapResource;
        }();
        Item_BattleMap.releaseMap = function releaseMap(cb) {
          var diMao = App.battleMgr.diMao;
          if (diMao !== 99) {
            var _bundle = assetManager.getBundle(ModuleDef.BATTLE_MAP);
            if (_bundle) {
              _bundle.releaseAll();
            }
          }
          // for (let i in Item_BattleMap.tiledMapAsset) {
          //     if (Item_BattleMap.tiledMapAsset[i].name != "city1")//主城地图不释放
          //         bundle.release(`tiledMap/map${diMao}/` + Item_BattleMap.tiledMapAsset[i].name, TiledMapAsset);
          // }

          Item_BattleMap.tiledMapAsset = {};
          var bundle_bullet = assetManager.getBundle(ModuleDef.BULLET_EFFECT);
          bundle_bullet && bundle_bullet.releaseAll();
          Item_BattleMap.bulletAsset = {};
          var bundle_monster = assetManager.getBundle(ModuleDef.MONSTER);
          bundle_monster && bundle_monster.releaseAll();
          Item_BattleMap.monsterAsset = {};
          Item_BattleMap.heroAsset = {};
          Item_BattleMap.soldierAsset = {};
          Item_BattleMap.preMijingBMap = null;
          var bundle_effect = assetManager.getBundle(ModuleDef.AFFECTED);
          bundle_effect && bundle_effect.releaseAll();
          Item_BattleMap.effectAsset = {};
          var bundle = assetManager.getBundle("affectedAni");
          setTimeout(function () {
            if (bundle) {
              bundle.releaseAll();
            }
          }, 100);
          Item_BattleMap.preMijingBMap = null;
          Item_BattleMap.preMijingAMap = null;
          Item_BattleMap.prePaoTaMap = null;
        };
        _proto.getPhysicalLayerData = function getPhysicalLayerData() {
          return this._tiledLayer.tiles;
        };
        _proto.update = function update(dt) {
          if (this._tirggerType > 0) {
            var player = App.battleMgr.roleCtrl.player;
            if (!player) return;
            var playerPos = player.node.worldPosition;
            var localPos = this.node.uiTransform.convertToNodeSpaceAR(playerPos);
            if (localPos.x > this._tiggerRect.x && localPos.x < this._tiggerRect.x + this._tiggerRect.width && localPos.y > this._tiggerRect.y && localPos.y < this._tiggerRect.y + this._tiggerRect.height) {
              this._tirggerFunc();
              this._tirggerType = 0;
            }
          }
        };
        return Item_BattleMap;
      }(Component), _class3.tiledMapAsset = {}, _class3.bulletAsset = {}, _class3.monsterAsset = {}, _class3.heroAsset = {}, _class3.soldierAsset = {}, _class3.effectAsset = {}, _class3.preMijingBMap = null, _class3.preMijingAMap = null, _class3.prePaoTaMap = null, _class3), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "tiledMap", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Item_prop.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollListItem.ts', './Layout_itemProp.ts', './DBRecord.ts', './Utils.ts', './UtilGame.ts', './SoundDef.ts', './App.ts', './ModuleDef.ts', './PlaceGameEnum.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, CCBoolean, Button, Label, Sprite, Node, ScrollListItem, Layout_itemProp, DBRecord, Utils, UtilGame, SoundDef, App, ModuleDef, ItemUISource;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCBoolean = module.CCBoolean;
      Button = module.Button;
      Label = module.Label;
      Sprite = module.Sprite;
      Node = module.Node;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      Layout_itemProp = module.Layout_itemProp;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ItemUISource = module.ItemUISource;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _class3, _binding;
      cclegacy._RF.push({}, "e6187qgx1pJnrEOW7TZad60", "Item_prop", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Item_prop = exports('Item_prop', (_dec = ccclass("Item_prop"), _dec2 = menu("Item/Item_prop"), _dec3 = property(CCBoolean), _dec4 = property(Button), _dec5 = property(Label), _dec6 = property(Label), _dec7 = property(Sprite), _dec8 = property(Sprite), _dec9 = property(Sprite), _dec10 = property(Node), _dec11 = property(Label), _dec12 = property(Sprite), _dec13 = property(Sprite), _dec14 = property(Node), _dec15 = property(Node), _dec(_class = _dec2(_class = (_class2 = (_class3 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(Item_prop, _ScrollListItem);
        function Item_prop() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "canClick", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnClick", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbCnt", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lblLv", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgLock", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgSelect", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "suiPianImg", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "descParent", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "descLab", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgIcon", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBg", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nodRedPoint", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nodNew", _descriptor13, _assertThisInitialized(_this));
          _this._data = void 0;
          _this._funcLong = void 0;
          _this._funcShort = void 0;
          _this._delay = void 0;
          _this._isTouchLong = void 0;
          _this._itemData = void 0;
          _this._fClick = void 0;
          _this._fAfter = void 0;
          _this._bNewSta = false;
          _this._uiSource = ItemUISource.other;
          // 是否来自背包
          _this._bShowLv = false;
          return _this;
        }
        var _proto = Item_prop.prototype;
        _proto.onLoad = function onLoad() {
          if (this.canClick) {
            this.initItemButton_ifHas(Item_prop.custom, Layout_itemProp);
          }
        };
        _proto.onBtnClick = function onBtnClick() {
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
          if (!this.canClick || !this._itemData) return;

          // if (this._data) {
          //     App.bagMgr.delItemNew(this._data.bag_id);
          //     this.setItemNew(false);
          // }

          if (this._fClick) {
            return this._fClick(this.node, this._data);
          }
          if (this._data) {
            // if (DBRecord.fetchId("ZhuangBei", this._data.item_id)) {
            //     return UIMgr.inst.open(Ui_heroEquipInfo, LayerType.panel, Layout_uiHeroEquipInfo, [this._data]);
            // }
            // const DaoJu = DBRecord.fetchId("DaoJu", this._data.item_id) || {};
            // if (this._data.gem && DaoJu.type == TypeItem.gem) {
            //     return UIMgr.inst.open(uiGemInfo, LayerType.panel, null, [this._data]);
            // }
            // if (this._data.gem && DaoJu.type == TypeItem.gouYu) {
            //     return UIMgr.inst.open(uiGemInfo, LayerType.panel, null, [this._data]);
            // }
            // const fushi = DBRecord.fetchId("FuShiDaoJu", this._data.item_id);
            // if (fushi) {
            //     return UIMgr.inst.open(uiFuShiInfo, LayerType.panel, null, [this._data]);
            // }

            this._data.bag_id;
          }
          // const DaoJu = DBRecord.fetchId('DaoJu', itemId);
          // if (DaoJu) {
          //     if (DaoJu.type == TypeItem.gem && DaoJu.effectParameter) {
          //         let temp = { item_id: itemId, gem: { sx_id: DaoJu.effectParameter[0], fighting: UtilGame.getGemFight(DaoJu.effectParameter[0]) } };
          //         UIMgr.inst.open(uiGemInfo, LayerType.panel, null, [temp]);
          //         return;
          //     }

          //     if (DaoJu.type == TypeItem.gouYu && DaoJu.effectParameter) {
          //         let temp = { item_id: itemId, gem: { sx_id: DaoJu.effectParameter[0], fighting: UtilGame.getGemFight(DaoJu.effectParameter[0]) } };
          //         UIMgr.inst.open(uiGemInfo, LayerType.panel, null, [temp]);
          //         return;
          //     }
          // }

          // UIMgr.inst.open(uiPopItemInfo, LayerType.panel, null, [itemId, bagId, nColor, this._uiSource, this._readOnly]);
          if (this._fAfter) this._fAfter();
        };
        _proto.onItemRender = function onItemRender(data) {
          if (!data) return;
          this.resetItem();
          this._data = data;
          this.lbCnt.node.active = true;
          this.lblLv.node.active = false;
          this.imgLock.node.active = Boolean(data.islock);

          // if (DBRecord.fetchId("ZhuangBei", data.item_id)) {
          //     this.updateEquip(data);
          // } else {
          this._updateItem(this._data);
          // }
        };

        _proto.clrItemData = function clrItemData() {
          this._data = null;
        }

        /**
         * 更新道具
         * @param item_id
         * @param item_count
         * @param color
         * @param cost
         */;
        _proto.updateItem = function updateItem(itemData, color, cost) {
          this.resetItem();
          this._updateItem(itemData, color, cost);
        }

        /**
         * 更新道具
         * @param item_id
         * @param item_count
         * @param color
         * @param cost
         */;
        _proto._updateItem = function _updateItem(itemData, color, cost) {
          var item_id = itemData.itemid;
          var config = App.bagMgr.getItemConfig(item_id);
          if (!config) {
            return;
          }
          var item_num = itemData.num;
          this._itemData = itemData;
          if (cost) {
            this.lbCnt.node.active = true;
            this.lbCnt.string = Utils.getNumText(item_num) + " / " + cost;
          } else {
            this.lbCnt.node.active = item_num > 1;
            if (item_num > 1) {
              this.lbCnt.string = "" + Utils.getNumText(item_num);
            }
          }
          this.suiPianImg.node.active = !!config.suipian;
          if (config.wenben) {
            this.descParent.active = true;
            this.descLab.string = config.wenben;
          } else {
            this.descParent.active = false;
          }
          var showColor = color;
          if (!showColor) {
            showColor = config.color;
          }
          UtilGame.loadItemBg(this.imgBg, showColor);
          if (config.icon) {
            UtilGame.loadItemIcon(this.imgIcon, item_id);
          }
        };
        _proto.setSelect = function setSelect(active) {
          this.imgSelect.node.active = active;
        };
        _proto.getItemData = function getItemData() {
          return this._itemData;
        };
        _proto.getItemId = function getItemId() {
          return this._itemData.itemid;
        };
        _proto.setItemNum = function setItemNum(num) {
          this.lbCnt.string = "" + Utils.getNumText(num);
        };
        _proto.setItemLock = function setItemLock(bLock) {
          this.imgLock.node.active = bLock;
        }

        /**
         * 更新锁状态
         * @param bNew 是否是新数据
         */;
        _proto.updateLock = function updateLock(bNew) {
          if (bNew === void 0) {
            bNew = false;
          }
          if (bNew && this._data.bag_id) this._data = App.bagMgr.findEquipItem(this._data.bag_id);
          this.imgLock.node.active = Boolean(this._data.islock);
        }

        /**
         * 更新装备状态
         * @param data
         */;
        _proto.updateEquip = function updateEquip(data) {
          // let color = data["equipment"] ? data.equipment.color : data["color"];
          // this.updateEquipItem(data.item_id, data.item_count, color);
        }

        /**
         * 更新装备状态
         * @param item_id
         * @param item_count
         * @param color
         */;
        _proto.updateEquipItem = function updateEquipItem(itemData, color) {
          if (color === void 0) {
            color = 0;
          }
          var cfg = DBRecord.fetchId("ZhuangBei", itemData.itemid);
          if (!cfg) {
            return;
          }
          this.lbCnt.node.active = false;
          this.lblLv.node.active = false;
          this.imgSelect.node.active = false;
          if (this._data && this._data.equipment) {
            this.lblLv.string = this._data.equipment.level + UtilGame.getGlobalTxt(163);
            this._updtLv();
          }
          App.resMgr.loadImage(this.imgIcon, ModuleDef.GAME_ROLE, "/texture/" + cfg.icon);
          if (!color) {
            color = cfg.min_color[0];
          }
          App.resMgr.loadImage(this.imgBg, ModuleDef.BASE_COMMON, "/texture/common/ui/com_quality_" + color);
        };
        _proto.getData = function getData() {
          return this._data;
        };
        _proto.updateTouchLong = function updateTouchLong(funcLong, funcShort, delay) {
          if (!this.canClick) return;
          var btnClick = this.node.getChildByName("btnClick");
          btnClick.getComponent(Button).clickEvents = [];
          btnClick.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
          btnClick.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
          btnClick.on(Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);
          btnClick.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
          this._funcLong = funcLong;
          this._funcShort = funcShort;
          this._delay = delay;
          this._isTouchLong = false;
        };
        _proto.onTouchStart = function onTouchStart() {
          var btnClick = this.node.getChildByName("btnClick");
          btnClick.off(Node.EventType.TOUCH_MOVE);
          btnClick.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
          this._isTouchLong = false;
          this.unschedule(this.scheduleTouchLong);
          this.scheduleOnce(this.scheduleTouchLong, this._delay);
        };
        _proto.onTouchEnd = function onTouchEnd() {
          this.unschedule(this.scheduleTouchLong);
          if (!this._isTouchLong) {
            if (this._funcShort) this._funcShort(this._data, this.node);
          }
        };
        _proto.onTouchCancel = function onTouchCancel() {
          this.unschedule(this.scheduleTouchLong);
          this._isTouchLong = false;
        };
        _proto.onTouchMove = function onTouchMove() {
          var btnClick = this.node.getChildByName("btnClick");
          btnClick.off(Node.EventType.TOUCH_MOVE);
          this.unschedule(this.scheduleTouchLong);
          this._isTouchLong = false;
        };
        _proto.scheduleTouchLong = function scheduleTouchLong() {
          this._isTouchLong = true;
          this.unschedule(this.scheduleTouchLong);
          if (this._funcLong) this._funcLong(this._data, this.node);
        };
        _proto.setClickFunc = function setClickFunc(fClick) {
          this._fClick = fClick;
        };
        _proto.setAfterFunc = function setAfterFunc(fAfter) {
          this._fAfter = fAfter;
        };
        _proto.resetItem = function resetItem() {
          this.lblLv.node.active = false;
          this.lbCnt.node.active = false;
          this.imgLock.node.active = false;
          this.imgSelect.node.active = false;
          this.nodRedPoint.active = false;
          this.imgIcon.spriteFrame = null;
          this._data = undefined;
          this._fClick = null;
        };
        _proto.setCanClick = function setCanClick(canClick) {
          this.canClick = canClick;
        };
        _proto.setClickBtn = function setClickBtn(val) {
          this.btnClick.node.active = val;
        };
        _proto.setNumShow = function setNumShow(bShow) {
          this.lbCnt.node.active = bShow;
        };
        _proto.setRedPoint = function setRedPoint(active) {
          this.nodRedPoint.active = active;
          if (!active) this.nodNew.active = this._bNewSta;
        };
        _proto.setItemNew = function setItemNew(active) {
          this._bNewSta = active;
          this.nodNew.active = active && !this.nodRedPoint.active;
        };
        _proto.showItemlv = function showItemlv(bShow) {
          this._bShowLv = bShow;
          this._updtLv();
        };
        _proto._updtLv = function _updtLv() {
          this.lblLv.node.active = this._bShowLv;
        }
        /**
         * 设置道具UI来源
         * @param uiSource UI资源
         */;
        _proto.setUiSource = function setUiSource(uiSource) {
          this._uiSource = uiSource;
        };
        return Item_prop;
      }(ScrollListItem), _class3.custom = {
        binding: (_binding = {}, _binding["btnClick"] = {
          method: "onBtnClick"
        }, _binding)
      }, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "canClick", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnClick", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lbCnt", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "lblLv", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "imgLock", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "imgSelect", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "suiPianImg", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "descParent", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "descLab", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "imgIcon", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "imgBg", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "nodRedPoint", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "nodNew", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Item_server.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Prompt.ts', './UtilGame.ts', './NetChannelMgr.ts', './LoginDaDian.ts', './UtilityPlatform.ts', './App.ts', './EventType.ts', './ScrollListItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, SpriteFrame, NodeEventType, Prompt, UtilGame, netChannel, LoginDaDian, LoginDaDianType, UtilityPlatform, App, EventType, ScrollListItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      SpriteFrame = module.SpriteFrame;
      NodeEventType = module.NodeEventType;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      LoginDaDian = module.LoginDaDian;
      LoginDaDianType = module.LoginDaDianType;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "7394060pYxITa6JlDaGuBSx", "Item_server", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      /**服务器状态 */
      var ServerState = exports('ServerState', /*#__PURE__*/function (ServerState) {
        ServerState[ServerState["ZhengChang"] = 1] = "ZhengChang";
        ServerState[ServerState["WeiHu"] = 3] = "WeiHu";
        ServerState[ServerState["BaoMan"] = 4] = "BaoMan";
        return ServerState;
      }({}));

      /**审核状态 */
      var AuditState = exports('AuditState', /*#__PURE__*/function (AuditState) {
        AuditState[AuditState["ZhengShi"] = 0] = "ZhengShi";
        AuditState[AuditState["ShenHe"] = 1] = "ShenHe";
        return AuditState;
      }({}));

      /**隐私协议状态 */
      var PrivacyState = exports('PrivacyState', /*#__PURE__*/function (PrivacyState) {
        PrivacyState[PrivacyState["Open"] = 1] = "Open";
        PrivacyState[PrivacyState["Close"] = 0] = "Close";
        return PrivacyState;
      }({}));
      var Item_server = exports('Item_server', (_dec = ccclass("Item_server"), _dec2 = property(Sprite), _dec3 = property(Label), _dec4 = property(Label), _dec5 = property(SpriteFrame), _dec6 = property(SpriteFrame), _dec7 = property(SpriteFrame), _dec(_class = (_class2 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(Item_server, _ScrollListItem);
        function Item_server() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          /** 当前项在列表中的索引 */
          _this.index = -1;
          _this._data = void 0;
          _initializerDefineProperty(_this, "imgState", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbId", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbLv", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "greenSF", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "redSF", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "graySF", _descriptor6, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Item_server.prototype;
        _proto.onLoad = function onLoad() {
          this.node.on(NodeEventType.TOUCH_END, this.onBtnClick, this);
        };
        _proto.onBtnClick = function onBtnClick() {
          switch (this._data.sstate) {
            case ServerState.WeiHu:
              if (!App.loginMgr.checkIgnoreWeiHu()) {
                Prompt.popTip(UtilGame.getGlobalTxt(91));
                return;
              }
              break;
            case ServerState.BaoMan:
              var cache = App.loginMgr.serverCache;
              var hasRole = !!cache.recently_smap[this._data.sid];
              if (!hasRole && !App.loginMgr.checkIgnoreBaoMan()) {
                Prompt.popTip(UtilGame.getGlobalTxt(92));
                return;
              }
              break;
          }
          LoginDaDian.daDian(LoginDaDianType.selectServer, "change server", UtilityPlatform.getInstance().uid, this._data.sid);
          netChannel.gameClose();
          App.monitorMgr.dispatchEvent(EventType.login_select_ser, this._data);
          App.monitorMgr.dispatchEvent(EventType.login_serverList_close);
        };
        _proto.onItemRender = function onItemRender(data) {
          this._data = data;
          this.lbId.string = data.sname;
          var sstate = data.sstate;
          switch (sstate) {
            case ServerState.ZhengChang:
              this.imgState.spriteFrame = this.greenSF;
              break;
            case ServerState.WeiHu:
              this.imgState.spriteFrame = this.graySF;
              break;
            case ServerState.BaoMan:
              this.imgState.spriteFrame = this.redSF;
              break;
          }
          // this.lbLv.node.active = data.role_level && data.role_level > 0;
          // if (data.role_level) {
          //     this.lbLv.string = data.role_level + '级';
          // }
        };

        _proto.onDestroy = function onDestroy() {
          this.node.off(NodeEventType.TOUCH_END, this.onBtnClick, this);
        };
        return Item_server;
      }(ScrollListItem), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgState", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lbId", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lbLv", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "greenSF", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "redSF", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "graySF", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ItemBattleNpc.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BattleDefine.ts', './Prompt.ts', './MonitorType.ts', './NetChannelMgr.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, sp, UITransform, Node, Vec3, Component, ModuleDef, GameBattle, Prompt, MonitorType, netChannel, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      sp = module.sp;
      UITransform = module.UITransform;
      Node = module.Node;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _class3;
      cclegacy._RF.push({}, "f173dym/dhDKIBimsBRAX2T", "ItemBattleNpc", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var ItemBattleNpc = exports('ItemBattleNpc', (_dec = ccclass("ItemBattleNpc"), _dec2 = property(sp.Skeleton), _dec3 = property(UITransform), _dec4 = property(Node), _dec5 = property(Node), _dec6 = property(Node), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ItemBattleNpc, _Component);
        function ItemBattleNpc() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "spine", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "uifBar", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgArrow", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bg", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgYingZi", _descriptor5, _assertThisInitialized(_this));
          _this._used = false;
          /** 是否正在使用 */
          _this.isUsing = false;
          /** 正在使用者 */
          _this.usingRole = null;
          _this._max = 111;
          _this._effectType = 0;
          //效果类型
          _this._effectId = 0;
          //效果id
          _this._desc = 0;
          _this._npcType = 0;
          _this._zhuangBei = null;
          _this._npcData = null;
          _this.bx_id = -1;
          _this.gz_list = [];
          _this._tm = 0;
          //交互时间
          _this._fOpen = void 0;
          return _this;
        }
        var _proto = ItemBattleNpc.prototype;
        _proto.start = function start() {};
        _proto.onEnable = function onEnable() {
          App.monitorMgr.addEventListener(MonitorType.web_xybx_80002, this.sc_web_xybx_80002, this);
        };
        _proto.onDisable = function onDisable() {
          App.monitorMgr.removeEventListener(MonitorType.web_xybx_80002, this.sc_web_xybx_80002, this);
        };
        _proto.init = function init(npc, bx_id, data) {
          var _this2 = this;
          this.bx_id = bx_id;
          console.log("宝箱， ", this.bx_id);
          this.gz_list = [];
          this._npcData = npc;
          var model = npc.model;
          this.node.active = true;
          this.bg.active = true;
          this._desc = npc.desc;
          this._zhuangBei = null;
          this._npcType = npc.type;
          this.imgYingZi.active = true;
          if (data.facing > 0) this.spine.node.setScale(-1, 1);
          if (data.size) this.imgYingZi.setScale(data.size, data.size, data.size);
          if (this._npcType == GameBattle.BattleNpcType.BaoXiang) {
            var obj = {
              bx_id: bx_id
            };
            netChannel.game.send(MonitorType.web_xybx_80002, obj);
            console.log("宝箱 获取宝箱信息", bx_id);
          }
          this._used = false;
          this.uifBar.node.parent.active = false;
          this.uifBar.width = 0;
          // this.spine.setAnimation(0,'Idle', true)
          if (npc.effect) {
            this._effectType = npc.effect[0];
            this._effectId = npc.effect[1];
          }
          var self = this;
          App.resMgr.loadSpineData(ModuleDef.SPINE, "battleNpc/" + model, function (err, asset) {
            console.log("xxxxxxxxxxxxxxxxxxxxx", err, asset);
            _this2.spine.skeletonData = asset;
            setTimeout(function () {
              if (self) {
                self.spine.setAnimation(0, "Idle", true);
              }
            }, 1);
          });
          var pos = this.bg.worldPosition.clone();
          this.bg.parent = App.battleMgr.battleMainViewCtrl.underBulletLayer;
          this.bg.setWorldPosition(pos);
          this.imgArrow.active = false;
        };
        _proto.update = function update(dt) {
          var player = App.battleMgr.roleCtrl.player;
          this.checkUser(player, dt);
          this.checkUser(player == null ? void 0 : player.pet, dt);
        }

        /**
         * 检查开启者
         * @param user
         * @returns
         */;
        _proto.checkUser = function checkUser(user, dt) {
          var player = App.battleMgr.roleCtrl.player;
          if (!user || !player) return;
          var index = user.node.getSiblingIndex();
          if (index == 0) {
            user.node.setSiblingIndex(1);
            this.node.setSiblingIndex(0);
          } else {
            this.node.setSiblingIndex(this.node.worldPosition.y > user.node.worldPosition.y ? index - 1 : index + 1);
          }
          if (this._used) return;
          if (!this.checkCanUse(user)) {
            return;
          }
          var distance = Vec3.distance(this.node.worldPosition, user.node.worldPosition);
          if (distance < ItemBattleNpc.USE_DISTANCE) {
            if (this.uifBar.node.parent.active == false) {
              this.uifBar.node.parent.active = true;
            }
            this._tm += dt;
            var rate = this._tm / this._npcData.time;
            if (rate > 1) rate = 1;
            this.uifBar.width = this._max * rate;
            this.isUsing = true;
            this.usingRole = user;
            if (rate == 1) {
              this.openLogic(player);
            }
          } else {
            this.uifBar.node.parent.active = false;
            this.uifBar.width = 1;
            this._tm = 0;
            this.isUsing = false;
            this.usingRole = null;
          }
        };
        _proto.isBaoxiang = function isBaoxiang() {
          return this._npcType == GameBattle.BattleNpcType.BaoXiang;
        };
        _proto.getBaoxiangId = function getBaoxiangId() {
          return this.bx_id;
        };
        _proto.setArrow = function setArrow(val) {
          this.imgArrow.active = val;
        };
        _proto.setUsed = function setUsed(used) {
          this._used = used;
          this.bg.active = !used;
        };
        _proto.isUsed = function isUsed() {
          return this._used;
        };
        _proto.setBaoXiangFunc = function setBaoXiangFunc(fOpen) {
          this._fOpen = fOpen;
        };
        _proto.setZhuangBei = function setZhuangBei(zhuangbei) {
          this._zhuangBei = zhuangbei;
        };
        _proto.sc_web_xybx_80002 = function sc_web_xybx_80002(obj) {
          if (obj.bx_id == this.bx_id) {
            this.gz_list = obj.gz_list;
            console.log("宝箱 sc_web_xybx_80002", obj, this.bx_id, this.gz_list);
          }
        };
        _proto.getBoxMonsterDropIndex = function getBoxMonsterDropIndex() {
          var wight = [this.gz_list[0].weight];
          var total = wight[0];
          for (var i = 1; i < this.gz_list.length; i++) {
            total += this.gz_list[i].weight;
            wight[i] = total;
          }
          var num = Math.random() * total;
          for (var _i = 0; _i < wight.length; _i++) {
            if (num < wight[_i]) {
              return _i;
            }
          }
          return null;
        }

        /**
         * 是否是图腾
         */;
        _proto.isTotem = function isTotem() {
          return this._npcType == GameBattle.BattleNpcType.TuTeng;
        }

        /**
         * 获取图腾ID
         */;
        _proto.getTotemId = function getTotemId() {
          return this._npcData.id;
        }

        /**
         * 是否是武器架/防具架
         */;
        _proto.isWeaponRack = function isWeaponRack() {
          return this._npcType == GameBattle.BattleNpcType.ZhuangBeiJia;
        }

        /**
         * 获取武器架/防具架ID
         */;
        _proto.getRackId = function getRackId() {
          return this._npcData.id;
        }

        /**
         * 开启逻辑
         */;
        _proto.openLogic = function openLogic(player) {
          this._used = true;
          this.spine.setAnimation(0, "Play", false);
          this.uifBar.node.parent.active = false;
          this.bg.active = false;
          this.bg.parent = this.node;
          if (this._npcType == GameBattle.BattleNpcType.TuTeng) {
            player._buffBox.addBuff(this._effectId, player);
            player._buffBox.triggerEventBuff(GameBattle.EventBuffId.TuTeng, this._effectId);
            // Utils.taskManager.reqTaskCount(16);
          } else if (this._npcType == GameBattle.BattleNpcType.ZhuangBeiJia) {
            App.battleMgr.fallingPropCtrl.dropItem(this._zhuangBei, 1, this.node.worldPosition);
            // Utils.taskManager.reqTaskCount(14);
          } else if (this._npcType == GameBattle.BattleNpcType.BaoXiang) {
            if (this._fOpen) {
              this._fOpen();
              this.setArrow(false);
            } else if (this._npcData.effect && this._effectType == 2) {
              //创建怪物
              var monsterId = this._effectId;
              // monsterId = 11004
              var monster = App.battleMgr.roleCtrl.createMonster({
                id: monsterId,
                position: this.node.worldPosition
              });
              if (monster) {
                var index = this.getBoxMonsterDropIndex();
                var item = this.gz_list[index].item_list[0];
                console.log("宝箱 gz_list", this.gz_list, index);
                monster.setBoxMonsterDrop(item, this.bx_id, index);
              }
              this.imgYingZi.active = false;
              App.battleMgr.battleNpcCtrl.setBxOpend();
            } else {
              //显示转盘
              console.log("宝箱 显示转盘");
              // UIMgr.inst.asyncOpen(uiLuckBox, LayerType.panel, null, [this.gz_list, this.bx_id]);
              // UIMgr.inst.asyncOpen(uiBattleLuckBox, LayerType.panel, null, [this.gz_list, this.bx_id]);
              App.battleMgr.battleNpcCtrl.setBxOpend();
            }
            // Utils.taskManager.reqTaskCount(13);
          }

          var str = App.languageMgr.getTextById(this._desc);
          if (str.length > 0) {
            Prompt.popTip(str);
          }
        }

        /**
         * 检查是否可以被使用
         * @param user
         */;
        _proto.checkCanUse = function checkCanUse(user) {
          if (this.isUsed()) {
            return false;
          }
          if (this.isUsing) {
            return this.usingRole == user;
          }
          return true;
        };
        _createClass(ItemBattleNpc, [{
          key: "used",
          get: function get() {
            return this._used;
          },
          set: function set(value) {
            this._used = value;
          }
        }]);
        return ItemBattleNpc;
      }(Component), _class3.USE_DISTANCE = 159, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "spine", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "uifBar", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgArrow", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "bg", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "imgYingZi", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemBuffIcon.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BattleDefine.ts', './DBRecord.ts', './GameConfig.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, Component, ModuleDef, GameBattle, DBRecord, GameConfig, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      Component = module.Component;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "25d5b4h84FH3KNtV721fqbp", "itemBuffIcon", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var itemBuffIcon = exports('itemBuffIcon', (_dec = ccclass("itemBuffIcon"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(itemBuffIcon, _Component);
        function itemBuffIcon() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "img_view", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "img_cd", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lb_count", _descriptor3, _assertThisInitialized(_this));
          _this._cd = 10;
          _this._max = 10;
          _this.count = 0;
          _this.buffId = 0;
          return _this;
        }
        var _proto = itemBuffIcon.prototype;
        _proto.set = function set(icon, cd, count, buffId) {
          App.resMgr.loadImage(this.img_view, ModuleDef.GAME_BATTLE_B, "images/battleUI/" + icon);
          this._max = this._cd = cd / 1000;
          this.count = count;
          this.lb_count.node.active = DBRecord.fetchId("JiNengBuff", buffId).add_type === 4;
          this.lb_count.string = this.count.toString();
          this.buffId = buffId;
          if (GameConfig.DebugInfo.showBuffLog) {
            console.log("set test buff", cd, count);
          }
        };
        _proto.remove = function remove() {
          this.buffId = 0;
          this.img_view.spriteFrame = null;
          App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemBuffIcon, this.node);
        };
        _proto.update = function update(dt) {
          this._cd -= dt;
          if (this._cd <= 0) {
            this._cd = this._max;
            this.count--;
            this.lb_count.string = this.count.toString();
            if (this.count <= 0) {
              this.remove();
            }
          }
          this.img_cd.fillRange = this._cd / this._max;
        };
        return itemBuffIcon;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "img_view", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "img_cd", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lb_count", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemDingYue.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollListItem.ts', './Utils.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Toggle, ScrollListItem, Utils, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Toggle = module.Toggle;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "7ba3exWYtVE+pkZ7GhTwT0E", "itemDingYue", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      /**
       * 微信订阅列表item
       */
      var itemDingYue = exports('itemDingYue', (_dec = ccclass('itemDingYue'), _dec2 = menu('Item/itemDingYue'), _dec3 = property(Label), _dec4 = property(Toggle), _dec5 = property(Toggle), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(itemDingYue, _ScrollListItem);
        function itemDingYue() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lbName", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleClose", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleOpen", _descriptor3, _assertThisInitialized(_this));
          _this._data = void 0;
          return _this;
        }
        var _proto = itemDingYue.prototype;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          this.toggleClose.node.on(Toggle.EventType.TOGGLE, function (msg) {
            if (!msg.isChecked) return;
            _this2.onSwitch(false);
          });
          this.toggleOpen.node.on(Toggle.EventType.TOGGLE, function (msg) {
            if (!msg.isChecked) return;
            _this2.onSwitch(true);
          });
        };
        _proto.onDestroy = function onDestroy() {};
        _proto.onItemRender = function onItemRender(data) {
          this._data = data;
          this.lbName.string = Utils.getGlobalTxt(data.text2);
          var isOpen = App.subscribeMgr.isDingYueOpen(this._data.id);
          this.toggleOpen.isChecked = isOpen;
          this.toggleClose.isChecked = !isOpen;
        }

        /**
         * 开关订阅
         * @param open 是否打开
         */;
        _proto.onSwitch = function onSwitch(open) {
          var isOpen = App.subscribeMgr.isDingYueOpen(this._data.id);
          if (isOpen == open) {
            return;
          }
          if (open) {
            var templateId = App.subscribeMgr.getDingYueTemplateId(this._data);
            console.warn('DingYue, itemDingYue.onSwitch() ,打开订阅:', App.subscribeMgr.isDingYueState, this._data, templateId);
            if (!templateId) {
              return;
            }
            // if (App.subscribeMgr.isDingYueState) {
            //     // App.subscribeMgr.reqDingYueSwitch(this._data.id, open);
            // } else {

            App.subscribeMgr.dingYue([templateId], function (isDingYue) {
              // if (isDingYue) {
              //     App.subscribeMgr.reqDingYueSwitch(this._data.id, open);
              // }
            });
            // }
          }
        };

        return itemDingYue;
      }(ScrollListItem), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lbName", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "toggleClose", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "toggleOpen", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemDouyinDiamond.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './GameDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, sys, Component, GameDef, GamePlatform_Enum;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      sys = module.sys;
      Component = module.Component;
    }, function (module) {
      GameDef = module.default;
      GamePlatform_Enum = module.GamePlatform_Enum;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "08e4fs0yEVH34Ef2nZlqRMW", "itemDouyinDiamond", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var itemDouyinDiamond = exports('itemDouyinDiamond', (_dec = ccclass("itemDouyinDiamond"), _dec2 = property(Sprite), _dec3 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(itemDouyinDiamond, _Component);
        function itemDouyinDiamond() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgIcon", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbMoney", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = itemDouyinDiamond.prototype;
        _proto.onLoad = function onLoad() {
          this._initComp();
          this._registEvt();
        };
        _proto.onEnable = function onEnable() {};
        _proto.setMoney = function setMoney(lb) {
          // 判断当前是否为iOS系统
          if ((GameDef.platId === GamePlatform_Enum.YONGYE_DouXiao || GameDef.platId === GamePlatform_Enum.TANXIAN_DouXiao) && sys.os === sys.OS.IOS) {
            if (this.lbMoney) {
              var _money$match;
              // 提取数字并乘以10
              var money = lb.string;
              var numStr = (_money$match = money.match(/\d+/)) == null ? void 0 : _money$match[0];
              if (numStr) {
                var num = parseInt(numStr);
                money = money.replace(numStr, (num * 10).toString());
              }
              this.lbMoney.string = money.replace("元", ""); // money;

              var lbSize = lb.fontSize;
              if (lbSize) {
                this.lbMoney.fontSize = lbSize;
                // 根据文字大小调整图标大小
                if (this.imgIcon) {
                  // 设置图标大小与文字大小一致
                  this.imgIcon.node.setScale(lbSize / 30, lbSize / 30); // 40为基准大小,可根据需要调整
                }
              }
            }

            lb.node.active = false;
            this.node.active = true;
          } else {
            this.node.active = false;
            lb.node.active = true;
          }
        };
        _proto._initComp = function _initComp() {
          // this.imgIcon = Utils.findComp('imgIcon', Sprite, this.node)!;
        };
        _proto._registEvt = function _registEvt() {
          // App.monitorMgr.addEventListener(MonitorType.web_player_assets_info, this.updtVal, this);
        };
        _proto.onDestroy = function onDestroy() {
          // App.monitorMgr.offTarget(this);
        };
        return itemDouyinDiamond;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgIcon", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lbMoney", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ItemFallingProp.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './MathUtils.ts', './Utils.ts', './BattleDefine.ts', './DBRecord.ts', './MonitorType.ts', './NetChannelMgr.ts', './GameConfig.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, color, sp, Sprite, Label, tween, Color, v3, Vec3, v2, find, Camera, Tween, Component, ModuleDef, MathUtils, Utils, GameBattle, DBRecord, MonitorType, netChannel, GameConfig, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      color = module.color;
      sp = module.sp;
      Sprite = module.Sprite;
      Label = module.Label;
      tween = module.tween;
      Color = module.Color;
      v3 = module.v3;
      Vec3 = module.Vec3;
      v2 = module.v2;
      find = module.find;
      Camera = module.Camera;
      Tween = module.Tween;
      Component = module.Component;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "de67fg+46VK8ZCa4YUDwVPV", "ItemFallingProp", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      // type	法师掉落物素材				             color	       掉落物素材	光柱素材	    环绕特效
      // 1=头盔	falling_object_helmet				1=灰色	        _1	        无需
      // 2=衣服	falling_object_cuirass				2=白色	        _2	        无需
      // 3=主武器	falling_object_wand				    3=蓝色	        _3	        无需
      // 4=副武器	falling_object_grimoire				4=紫色	        _4	        无需
      // 5=护肩	falling_object_pauldron				5=黄色	        _5	    yellow_light	falling_object_vfx
      // 6=裤子	falling_object_pants				6=低阶套装绿	_6	    green_light	    falling_object_vfx
      // 7=鞋	falling_object_shoes				    7=橙色	       _7      orange_light	    falling_object_vfx
      // 8=手套	falling_object_glove				8=中阶套装绿	_6	    green_light	    falling_object_vfx
      // 9=饰品	falling_object_necklace				9=红色	        _8	    red_light	    falling_object_vfx
      // 10=戒指	falling_object_ring				    10=高阶套装绿	_6	    green_light	    falling_object_vfx

      // const ItemColor    = [0,1,2,3,4,5,6,7,8,9,10]
      // const ItemColorStr = ['', '', '', '', '', 'yellow_light', 'green_light', 'orange_light', 'green_light', 'red_light', 'green_light'];
      var ItemColor = [color("#ffffff"), color("#b8b8b8"), color("#ffffff"), color("#13b5ff"), color("#e23cf6"), color("#ffeb3b"), color("#91f42f"), color("#fd712c"), color("#91f42f"), color("#ff3543"), color("#91f42f")];
      var _goldId = 1;
      var _temphpBallId = 9999999999998;
      var _tempmixBallId = 9999999999999;
      var maskColor = [color("#ffffffff"), color("#8d7f7f99")];
      /**
       * 道具掉落
       */
      var ItemFallingProp = exports('ItemFallingProp', (_dec = ccclass("ItemFallingProp"), _dec2 = property(sp.Skeleton), _dec3 = property(Sprite), _dec4 = property(Sprite), _dec5 = property(Label), _dec6 = property(sp.Skeleton), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ItemFallingProp, _Component);
        function ItemFallingProp() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "spineLight", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgItem", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgItemBg", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbName", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spineXUeping", _descriptor5, _assertThisInitialized(_this));
          _this.item_id = 0;
          _this.item_count = 0;
          _this.item_color = 0;
          _this.pool_id = 0;
          _this.flying = false;
          _this.canFly = false;
          _this._data = {
            item_id: 0,
            color: ItemColor[0],
            count: 0,
            name: ""
          };
          _this._bx_id = -1;
          _this._bx_idnex = -1;
          // 飞行函数
          _this.flyTo = null;
          _this._isYaoPing = false;
          return _this;
        }
        var _proto = ItemFallingProp.prototype;
        _proto.initBoxMonsterDrop = function initBoxMonsterDrop(bx_id, index) {
          this._bx_id = bx_id;
          this._bx_idnex = index;
        };
        _proto.init = function init(item, position, startPosition) {
          var _this2 = this;
          //console.log('装备 初始', item);
          this.canFly = false;
          this._bx_id = -1;
          tween(this.node).delay(1.6).call(function () {
            _this2.canFly = true;
          }).start();
          var itemColor = item.color;
          var item_count = item.item_count;
          var itemId = item.item_id;
          this.pool_id = item.pool_id;
          this.item_color = itemColor;
          this.node.parent = App.battleMgr.battleMainViewCtrl.fallingLayer;
          this.spineLight.node.active = false;
          this.imgItemBg.spriteFrame = null;
          this.item_id = itemId;
          this.item_count = item_count;
          var imgName = "";
          this._data = {
            item_id: itemId,
            color: Color.WHITE,
            count: item_count,
            name: ""
          };
          this.lbName.node.parent.active = true;
          var showTrail = false;
          this.spineXUeping.node.active = false;
          this._isYaoPing = false;
          this.imgItem.node.setScale(1, 1, 1);
          if (this.item_id == _goldId) {
            //掉落金币
            this.lbName.string = "金币";
            this.lbName.color = Color.WHITE;
            this._data.name = "金币";
            var index = 1;
            if (item_count > 9999) {
              index = 4;
            } else if (item_count > 999) {
              index = 3;
            } else if (item_count > 99) {
              index = 2;
            }
            imgName = "/images/itemFalling/gold_coins_" + index;
          } else if (this.item_id == _temphpBallId) {
            this.lbName.node.parent.active = false;
            this.lbName.string = "";
            // imgName = `/images/itemFalling/health_potion_1`;
            this.lbName.color = Color.WHITE;
            this.spineXUeping.node.active = true;
            this.spineXUeping.setAnimation(0, "HpPlay", true);
            this._isYaoPing = true;
          } else if (this.item_id == _tempmixBallId) {
            this.lbName.node.parent.active = false;
            this.lbName.string = "";
            // imgName = `/images/itemFalling/vitality_potion_1`;
            this.lbName.color = Color.WHITE;
            this.spineXUeping.node.active = true;
            this.spineXUeping.setAnimation(0, "MpPlay", true);
            this._isYaoPing = true;
          } else if (this.item_id == 999999999) {
            // 爬塔宝箱特殊处理
            // this.lbName.string = '宝箱';
            // this.lbName.color = Utils.getGuanQiaColor(itemColor);
            this.lbName.node.active = false;
            imgName = "";
            this.spineLight.node.active = false;
            this._data.name = "神力试炼宝箱";
            this.imgItem.node.setScale(0.4, 0.4, 0.4);
            this.imgItem.node.active = true;
            App.resMgr.loadImage(this.imgItem, ModuleDef.GAME_SELECT_LEVEL, "texture/pata_baoxiang");
          } else if (this.item_id < 500000) {
            //道具
            var daojuCfg = DBRecord.fetchId("DaoJu", itemId);
            var name = App.languageMgr.getTextById(daojuCfg.name);
            imgName = "/images/itemFalling/" + daojuCfg.icon;
            this.lbName.string = name;
            this.lbName.color = Utils.getGuanQiaColor(itemColor);
            if (itemColor > 1) {
              App.resMgr.loadImage(this.imgItemBg, ModuleDef.GAME_BATTLE_B, "/images/itemFalling/" + itemColor);
            }
            this._data.name = name;
            this.imgItem.node.setScale(0.4, 0.4, 0.4);
          } else {
            var lbName = ["", "头盔", "衣服", "主武器", "副武器", "护肩", "裤子", "鞋", "手套", "饰品", "戒指"];
            var prop = ["", "falling_object_helmet", "falling_object_cuirass", "falling_object_wand", "falling_object_grimoire", "falling_object_pauldron", "falling_object_pants", "falling_object_shoes", "falling_object_glove", "falling_object_necklace", "falling_object_ring"];
            var equipCfg = DBRecord.fetchId("ZhuangBei", itemId);
            var part = equipCfg.type;
            var _name = prop[part];
            this.lbName.string = lbName[part];
            this.lbName.color = Utils.getGuanQiaColor(itemColor);
            imgName = "/images/itemFalling/" + _name;
            var nameCode = equipCfg.name;
            this._data.name = App.languageMgr.getTextById(nameCode);
            if (itemColor > 1) {
              App.resMgr.loadImage(this.imgItemBg, ModuleDef.GAME_BATTLE_B, "/images/itemFalling/" + itemColor);
            }
            if (itemColor > 2) {
              showTrail = true;
              this.spineLight.node.active = true;
              this.spineLight.setAnimation(0, itemColor.toString(), true);
            }
          }
          if (GameConfig.DebugInfo.showLootLog) {
            console.log("falling item ", itemId);
          }
          // 爬塔宝箱已经手动处理了图片加载，跳过统一处理
          if (this.item_id !== 999999999) {
            if (imgName.length > 0) {
              this.imgItem.node.active = true;
              App.resMgr.loadImage(this.imgItem, ModuleDef.GAME_BATTLE_B, imgName);
            } else {
              this.imgItem.node.active = false;
            }
          }
          this.node.setWorldPosition(position);
          this.node.setScale(v3(0, 0, 0));
          this.flying = false;
          if (App.battleMgr.guanQiaType == GameBattle.GuanQiaType.KaPiBaLa) {
            this.flyTo = this.expFlyTo;
          } else {
            this.flyTo = this.mainFlyTo;
          }
          var tm = 0.7;
          if (showTrail) {
            var ctrlPoint = new Vec3();
            if (position.y > startPosition.y) {
              ctrlPoint.y = position.y + 300;
              ctrlPoint.x = (startPosition.x + position.x) / 2;
            } else {
              ctrlPoint.y = startPosition.y + 600;
              ctrlPoint.x = (startPosition.x + position.x) / 2;
            }
            var self = this;
            /** 掉落拖尾 */
            var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, "images/effect_FallingProp_trail/effect_FallingProp_trail" + itemColor);
            if (node) {
              node.parent = this.node.parent;
              node.setWorldPosition(position.x, position.y + 300, 0);
              tween(node).tag(GameBattle.BattleTweenTag).to(tm, {
                scale_z: 1
              }, {
                onUpdate: function onUpdate(target, ratio) {
                  var point = MathUtils.bessel2eLevel(ratio, startPosition, ctrlPoint, position);
                  node.setWorldPosition(point.x, point.y, 0);
                }
              }).call(function () {
                App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, "images/effect_FallingProp_trail/effect_FallingProp_trail" + itemColor, node);
                self.node.setScale(v3(1, 1, 1));
              }).start();
            }
          } else {
            tween(this.node).tag(GameBattle.BattleTweenTag).delay(tm).call(function () {
              _this2.node.setScale(v3(1, 1, 1));
            }).start();
          }
        }

        /**
         * 主线副本掉落道具飞行
         * @param target
         * @returns
         */;
        _proto.mainFlyTo = function mainFlyTo(target) {
          var _this3 = this;
          if (this.flying) return;
          if (this._isYaoPing) return;
          this.flying = true;
          this.spineLight.node.active = false;
          var ctrlPoint = v2(this.node.worldPosition.x + 100 * (this.node.worldPosition.x > target.worldPosition.x ? 1 : -1), this.node.worldPosition.y - 100);
          var node = this.node;
          tween(node).tag(GameBattle.BattleTweenTag).to(0.6, {
            scale: v3(0.2, 0.2, 0.2)
          }, {
            easing: "quartIn",
            onUpdate: function onUpdate(_, ratio) {
              var pos = MathUtils.bessel2eLevel(ratio, node.worldPosition, ctrlPoint, target.worldPosition);
              node.setWorldPosition(pos.x, pos.y, 0);
            }
          }).call(function () {
            App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp, _this3.node);
            if (_this3._bx_id == -1) {
              //普通怪掉落
              var obj = {
                guanka_id: App.battleMgr.challengeGuanQiaId,
                item_list: [{
                  item_id: _this3.item_id,
                  item_count: _this3.item_count,
                  color: _this3.item_color,
                  pool_id: _this3.pool_id
                }]
              };
              var player = target.getComponent(Player);
              player.showGetItemEffect(_this3.item_id);
              if (_this3.item_id != _temphpBallId && _this3.item_id != _tempmixBallId) {
                netChannel.game.send(MonitorType.web_battle_pick, obj);
                App.monitorMgr.dispatchEvent(MonitorType.battle_player_get_falling_item, _this3._data);
                if (_this3.item_id != 1 && _this3.item_id != 3) {
                  console.log("装备 发送拾取装备", _this3.item_id);
                }
              }
            } else {
              //宝箱怪掉落
              var _obj = {
                bx_id: _this3._bx_id,
                gz_idx: _this3._bx_idnex + 1
              };
              netChannel.game.send(MonitorType.web_xybx_win_80003, _obj);
            }
          }).start();
        };
        _proto.expFlyTo = function expFlyTo() {
          if (this.flying) return;
          if (this._isYaoPing) return;
          // 获取战斗相机
          var playerCamera = App.battleMgr.battleMainViewCtrl.playerCamera.camera;
          var uiCamera = find("Canvas/Camera").getComponent(Camera);
          var pos = Utils.worldPositionCameraAToCameraB(this.node.worldPosition, playerCamera, uiCamera);
          App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp, this.node);

          // let target: Node = App.battleMgr.battleMainViewCtrl.battleKapiBaLa.goldNode;
          // let node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingGold);
          // node.parent = target.parent;
          // node.setWorldPosition(pos);
          // let imgItem: Sprite = node.getChildByName('imgItem').getComponent(Sprite);
          // imgItem.spriteFrame = this.imgItem.spriteFrame;
          // EffectManager.flyTo(target, node, () => {
          //     // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_Reward1);
          //     // 掉落飘的金币当做战斗音效来处理
          //     App.soundMgr.playEffect(SoundDef.Sound_Audio_Reward1);
          //     App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingGold, node);
          // });
        };

        _proto.onDisable = function onDisable() {
          Tween.stopAllByTarget(this.node);
        };
        _proto.onDestroy = function onDestroy() {
          Tween.stopAllByTarget(this.node);
          this._data.color = null;
          this._data = null;
        };
        _proto.update = function update(dt) {
          if (this._isYaoPing) {
            var player = App.battleMgr.roleCtrl.player;
            if (!player) return;
            if (Math.abs(player.node.x - this.node.x) < 50 && Math.abs(player.node.y - this.node.y) < 50) {
              player.showGetItemEffect(this.item_id);
              App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.itemFallingProp, this.node);
            }
          }
          // if (this.item_id == _temphpBallId) {
          //     const player = App.battleMgr.roleCtrl.player;
          //     if (!player) return;
          //     // if (player.roleVO.isMaxHp()) {
          //     //     if (this.imgItem.color.toHEX() !== '8d7f7f') {
          //     //         this.imgItem.color = maskColor[1];
          //     //     }
          //     // } else {
          //     //     if (this.imgItem.color.toHEX() !== 'ffffff') {
          //     //         this.imgItem.color = maskColor[0];
          //     //     }
          //     // }
          //     if (player.roleVO.isMaxHp()) {
          //         if (!SpineUtils.checkAnimationPlaying(this.spineXUeping, 'HpIdle')) {
          //             this.spineXUeping.setAnimation(0, 'HpIdle', false);
          //         }
          //     } else {
          //         if (!SpineUtils.checkAnimationPlaying(this.spineXUeping, 'HpPlay')) {
          //             this.spineXUeping.setAnimation(0, 'HpPlay', true);
          //         }
          //     }
          // } else if (this.item_id == _tempmixBallId) {
          //     const player = App.battleMgr.roleCtrl.player;
          //     if (!player) return;
          //     if (player.roleVO.isMaxNengLiang()) {
          //         if (!SpineUtils.checkAnimationPlaying(this.spineXUeping, 'MpIdle')) {
          //             this.spineXUeping.setAnimation(0, 'MpIdle', false);
          //         }
          //     } else {
          //         if (!SpineUtils.checkAnimationPlaying(this.spineXUeping, 'MpPlay')) {
          //             this.spineXUeping.setAnimation(0, 'MpPlay', true);
          //         }
          //     }
          // }
        };

        _createClass(ItemFallingProp, [{
          key: "isYaoPing",
          get: function get() {
            return this._isYaoPing;
          }
        }]);
        return ItemFallingProp;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "spineLight", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgItem", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgItemBg", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "lbName", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "spineXUeping", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ItemFallUi.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "b3dc3+KHVZAdYFG4YpiLarF", "ItemFallUi", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var ItemFallUi = exports('ItemFallUi', (_dec = ccclass("ItemFallUi"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ItemFallUi, _Component);
        function ItemFallUi() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this._data = void 0;
          _this.imgItem = void 0;
          _this.skeLight = void 0;
          return _this;
        }
        var _proto = ItemFallUi.prototype;
        _proto.onLoad = function onLoad() {
          this._initComp();
          this._initData();
        };
        _proto.onDestroy = function onDestroy() {}

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.setPrefDt = function setPrefDt(data) {
          this._data = data;
          this._updtPref();
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initData = function _initData() {};
        _proto._updtPref = function _updtPref() {
          // let itemId = this._data.item_id;
          // const CfgItem = UtilGame.getComConfig(itemId, this._data.color);

          // this.imgItem.node.setScale(new Vec3(CfgItem.scale, CfgItem.scale, 1));
          // App.resMgr.loadImage(this.imgItem, ModuleDef.GAME_BATTLE_B, `/images/itemFalling/${CfgItem.fall}`);
          // this.skeLight.setAnimation(0, CfgItem.color.toString(), true);
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {
          // this.imgItem = Utils.findNode(`imgItem`, this.node).getComponent(Sprite);
          // this.skeLight = Utils.findNode(`skeLight`, this.node).getComponent(sp.Skeleton);
        };
        return ItemFallUi;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemFuncUnlock.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Prompt.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Component, Prompt, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "e6407W9iFRPsqthmNCJr0mx", "itemFuncUnlock", undefined);
      var ccclass = _decorator.ccclass;
      var itemFuncUnlock = exports('itemFuncUnlock', (_dec = ccclass("itemFuncUnlock"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(itemFuncUnlock, _Component);
        function itemFuncUnlock() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this._tip = "";
          return _this;
        }
        var _proto = itemFuncUnlock.prototype;
        _proto.init = function init(id) {
          this._tip = App.lockMgr.getUnLockTips(id);
        };
        _proto.onclick = function onclick() {
          Prompt.popTip(this._tip);
        };
        return itemFuncUnlock;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemMoney.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './SoundDef.ts', './App.ts', './UtilGame.ts', './BagMgr.ts', './UIMgr.ts', './UI_ItemSourceView.ts', './Layout_UI_ItemSourceView.ts', './EventType.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, CCInteger, Sprite, Label, Button, Node, Component, Utils, SoundDef, App, UtilGame, ItemType, UIMgr, LayerType, UI_ItemSourceView, Layout_UI_ItemSourceView, EventType;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCInteger = module.CCInteger;
      Sprite = module.Sprite;
      Label = module.Label;
      Button = module.Button;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      ItemType = module.ItemType;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_ItemSourceView = module.UI_ItemSourceView;
    }, function (module) {
      Layout_UI_ItemSourceView = module.Layout_UI_ItemSourceView;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "1bbedc2RaZMBr0VjkrD+nCP", "itemMoney", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var itemMoney = exports('itemMoney', (_dec = ccclass("itemMoney"), _dec2 = property(CCInteger), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(itemMoney, _Component);
        function itemMoney() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "moneyId", _descriptor, _assertThisInitialized(_this));
          _this.imgIcon = void 0;
          _this.lblVal = void 0;
          _this.btnAdd = void 0;
          _this.seeAddFlag = false;
          _this.callFunc = null;
          _this._maxCount = 0;
          return _this;
        }
        var _proto = itemMoney.prototype;
        _proto.onLoad = function onLoad() {
          this._initComp();
          this._registEvt();
        };
        _proto.onEnable = function onEnable() {
          this.setMoneyId(this.moneyId);
        };
        _proto._initComp = function _initComp() {
          this.imgIcon = Utils.findComp("imgIcon", Sprite, this.node);
          this.lblVal = Utils.findComp("lblVal", Label, this.node);
          this.btnAdd = Utils.findComp("btnAdd", Button, this.node);
        };
        _proto._registEvt = function _registEvt() {
          App.monitorMgr.addEventListener(EventType.web_player_assets_info, this.updtVal, this);
          this.btnAdd.node.on(Button.EventType.CLICK, this.onBtnAdd, this);
          this.node.on(Node.EventType.TOUCH_END, function () {});
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.setMoneyId = function setMoneyId(moneyId, seeAddFlag, callFunc, maxCount) {
          if (seeAddFlag === void 0) {
            seeAddFlag = false;
          }
          if (callFunc === void 0) {
            callFunc = null;
          }
          if (maxCount === void 0) {
            maxCount = 0;
          }
          this.node.active = Boolean(moneyId);
          if (!moneyId) {
            return;
          }
          this.moneyId = moneyId;
          this.callFunc = callFunc;
          this.seeAddFlag = seeAddFlag;
          this._maxCount = maxCount;
          this.updtRes();
          this.updtVal();
          this.updtAdd();
        };
        _proto.setSeeAddFlag = function setSeeAddFlag(seeAddFlag) {
          this.seeAddFlag = seeAddFlag;
        };
        _proto.setAddCallFunc = function setAddCallFunc(callFunc) {
          this.callFunc = callFunc;
        }

        // 更新值
        ;

        _proto.updtVal = function updtVal() {
          var nValue = 0;
          if (this.moneyId <= 100) {
            nValue = App.roleMgr.getPlayerResCount(this.moneyId);
          } else {
            nValue = App.bagMgr.getItemCount(this.moneyId);
          }
          if (this._maxCount > 0) {
            this.lblVal.string = Utils.getNumText(nValue) + "/" + this._maxCount;
          } else {
            this.lblVal.string = Utils.getNumText(nValue);
          }
        }

        /**
         * 更新资源
         * @returns
         */;
        _proto.updtRes = function updtRes() {
          var item = App.bagMgr.getItemConfig(this.moneyId);
          if (!item) {
            return;
          }
          if (item.type === ItemType.assets) {
            UtilGame.loadAssetIcon(this.imgIcon, this.moneyId);
          } else {
            UtilGame.loadItemIcon(this.imgIcon, this.moneyId);
          }
        }

        /**
         * 更新加号符号
         */;
        _proto.updtAdd = function updtAdd() {
          this.btnAdd.node.active = this.seeAddFlag;
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.onBtnAdd = function onBtnAdd() {
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
          if (this.moneyId !== 1 && this.moneyId !== 2) {
            return;
          }
          var cfg = App.bagMgr.getItemConfig(this.moneyId);
          if (!cfg || !cfg.getAccess) return;
          var itemData = {};
          UIMgr.inst.open(UI_ItemSourceView, LayerType.panel, Layout_UI_ItemSourceView, [itemData]);
          if (this.callFunc) {
            this.callFunc();
          }
        };
        return itemMoney;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "moneyId", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 1;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ItemSelScript.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ListSelScript.ts', './ScrollListItem.ts', './TableViewCell.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Node, Component, ListSelScript, ScrollListItem, TableViewCell;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      ListSelScript = module.ListSelScript;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      TableViewCell = module.TableViewCell;
    }],
    execute: function () {
      var _dec, _dec2, _class;
      cclegacy._RF.push({}, "da96b9gEUZP4JTS9lcZRv98", "ItemSelScript", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var ItemSelScript = exports('ItemSelScript', (_dec = ccclass('ItemSelScript'), _dec2 = menu('性能优化/ItemSelScript'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ItemSelScript, _Component);
        function ItemSelScript() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.index = void 0;
          _this.isSel = void 0;
          return _this;
        }
        var _proto = ItemSelScript.prototype;
        _proto.setSel = function setSel(b) {
          var item = this.node.getComponent(ScrollListItem);
          if (item) {
            item.setSel(b);
          }
        };
        _proto.onEnable = function onEnable() {
          this.node.on(Node.EventType.TOUCH_END, this.onTouch, this);
        };
        _proto.onTouch = function onTouch() {
          // item>content>view>scrollw
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          var parent = this.node.parent;
          if (parent && parent.parent && parent.parent.parent && parent.parent.parent.getComponent(ListSelScript)) {
            var listSpt = parent.parent.parent.getComponent(ListSelScript);
            var item = this.node.getComponent(ScrollListItem);
            if (!item) {
              var item_add = this.node.getComponent(TableViewCell);
              this.index = item_add.getCellIndex();
            } else {
              this.index = item.index;
            }
            listSpt.selItem(this.index);
          }
        };
        _proto.onDestroy = function onDestroy() {
          this.node.off(Node.EventType.TOUCH_END, this.onTouch, this);
        };
        return ItemSelScript;
      }(Component)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemWxInviteRole.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollListItem.ts', './Utils.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Sprite, ScrollListItem, Utils;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Sprite = module.Sprite;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "d19ab6j8DdEUKgtTr7QpygW", "itemWxInviteRole", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      /**
       * 微信邀请列表item
       */
      var itemWxInviteRole = exports('itemWxInviteRole', (_dec = ccclass('itemWxInviteRole'), _dec2 = menu('Item/itemWxInviteRole'), _dec3 = property(Label), _dec4 = property(Label), _dec5 = property(Sprite), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(itemWxInviteRole, _ScrollListItem);
        function itemWxInviteRole() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lbName", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTime", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgHead", _descriptor3, _assertThisInitialized(_this));
          _this._data = void 0;
          return _this;
        }
        var _proto = itemWxInviteRole.prototype;
        _proto.onLoad = function onLoad() {};
        _proto.onDestroy = function onDestroy() {};
        _proto.onItemRender = function onItemRender(data) {
          this._data = data;
          this.lbName.string = data.role_name;
          this.lbTime.string = Utils.dateFormat(data.time);
        };
        return itemWxInviteRole;
      }(ScrollListItem), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lbName", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lbTime", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgHead", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/itemWxShareActivity.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Node, Component, Utils, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "21222oSkclJoaFT+sgCGRJ0", "itemWxShareActivity", undefined);
      // import { Item_prop } from '../../../base_common/item/prop/Item_prop';
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var itemWxShareActivity = exports('itemWxShareActivity', (_dec = ccclass('itemWxShareActivity'), _dec2 = property({
        type: Label,
        tooltip: 'name'
      }), _dec3 = property({
        type: Node,
        tooltip: 'nodeFinish'
      }), _dec4 = property({
        type: Node,
        tooltip: 'btnAward'
      }), _dec5 = property({
        type: Node,
        tooltip: 'imgMask'
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(itemWxShareActivity, _Component);
        function itemWxShareActivity() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "nameLabel", _descriptor, _assertThisInitialized(_this));
          // @property({ type: Item_prop, tooltip: 'item' })
          // item: Item_prop = null;
          _initializerDefineProperty(_this, "nodeFinish", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnAward", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgMask", _descriptor4, _assertThisInitialized(_this));
          _this._data = void 0;
          /**可点击领取奖励 */
          _this._canReceive = false;
          return _this;
        }
        var _proto = itemWxShareActivity.prototype;
        _proto.onEnable = function onEnable() {
          this.addEventListener();
        };
        _proto.onDisable = function onDisable() {
          this.removeEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          this.btnAward.on(Node.EventType.TOUCH_END, this.onBtnClick, this);
        };
        _proto.removeEventListener = function removeEventListener() {
          App.monitorMgr.offTarget(this);
        };
        /**
         * 设置数据
         * @param data
         */
        _proto.setData = function setData(data, info) {
          this._data = data;
          // this._info=info;
          this.updateView();
        };
        _proto.getData = function getData() {
          return this._data;
        };
        _proto.onBtnClick = function onBtnClick() {
          if (this._canReceive) {
            App.gameShareMgr.reqWxShareInviteReward();
          }
        }

        /**
         * 更新面板
         * @returns
         */;
        _proto.updateView = function updateView() {
          if (!this._data) return;
          var isGot = App.gameShareMgr.checkInviteRewardGot(this._data.id);
          var finish = App.gameShareMgr.checkInviteFinish(this._data.id);
          this.nameLabel.string = isGot ? '已领取' : Utils.getGlobalTxt(this._data.desc, this._data.target_num);
          var reward = this._data.reward[0];
          this._canReceive = finish && !isGot;
          this.nodeFinish.active = this._canReceive;
          this.imgMask.active = isGot;
          this.btnAward.active = this._canReceive;
          // if(this.item){
          //     this.item.onItemRender({item_id:reward[0],item_count:reward[1]});
          //     this.item.canClick=!this._canReceive
          //     this.item.setImgSelect(isGot);
          // }
        };

        return itemWxShareActivity;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "nameLabel", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "nodeFinish", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnAward", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "imgMask", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/JingJiChange.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './App.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './EventType.ts', './UIUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, BuildingBase, App, PlaceConfigMgr, PlaceGameMgr, EventType, UIUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "07a7fE4/cBCV6il9VnymebQ", "JingJiChange", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var JingJiChange = exports('JingJiChange', (_dec = ccclass("JingJiChange"), _dec2 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(JingJiChange, _BuildingBase);
        function JingJiChange() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lvUpImg", _descriptor, _assertThisInitialized(_this));
          _this._dataModel = void 0;
          return _this;
        }
        var _proto = JingJiChange.prototype;
        _proto.initDataModel = function initDataModel(data) {
          // 初始化数据模型
          // TODO: 根据需要实现具体逻辑
          // 初始化后更新可升级图标
          this.updateLevUpImg();
        };
        _proto.updateDataModel = function updateDataModel(data) {
          // 更新数据模型
          // TODO: 根据需要实现具体逻辑
          // 更新后刷新可升级图标
          this.updateLevUpImg();
        }

        /**
         * 组件激活时调用
         */;
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          UIUtil.showTip("功能暂未开启");
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        return JingJiChange;
      }(BuildingBase), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/JiuGuan.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './App.ts', './UIUtil.ts', './PlaceGameMgr.ts', './EventType.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, BuildingBase, App, UIUtil, PlaceGameMgr, EventType, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "8987012kDhEO5OoOu/oGQN7", "JiuGuan", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var JiuGuan = exports('JiuGuan', (_dec = ccclass("JiuGuan"), _dec2 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(JiuGuan, _BuildingBase);
        function JiuGuan() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lvUpImg", _descriptor, _assertThisInitialized(_this));
          _this._dataModel = void 0;
          return _this;
        }
        var _proto = JiuGuan.prototype;
        _proto.initDataModel = function initDataModel(data) {
          // 初始化数据模型
          // TODO: 根据需要实现具体逻辑
          // 初始化后更新可升级图标
          this.updateLevUpImg();
        };
        _proto.updateDataModel = function updateDataModel(data) {
          // 更新数据模型
          // TODO: 根据需要实现具体逻辑
          // 更新后刷新可升级图标
          this.updateLevUpImg();
        }

        /**
         * 组件激活时调用
         */;
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          UIUtil.showTip("功能暂未开启");
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        return JiuGuan;
      }(BuildingBase), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/JoystickItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, Vec3, input, Input, KeyCode, Vec2, Component, MonitorType, App, BattleUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Vec3 = module.Vec3;
      input = module.input;
      Input = module.Input;
      KeyCode = module.KeyCode;
      Vec2 = module.Vec2;
      Component = module.Component;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "3ba57S9pqVDtJglKMwhMpTf", "JoystickItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var JoystickItem = exports('JoystickItem', (_dec = ccclass("JoystickItem"), _dec2 = property({
        type: Node,
        tooltip: "杆子"
      }), _dec3 = property({
        type: Node,
        tooltip: "方向标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(JoystickItem, _Component);
        function JoystickItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "img_rod", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "img_direction", _descriptor2, _assertThisInitialized(_this));
          /** 杆子的活动半径 */
          _this.radius = 35;
          /** 摇杆初始位置 */
          _this.oriPoint = new Vec3(0, 0, 0);
          /** 当前杆子的位置 */
          _this.curPoint = new Vec3(0, 0, 0);
          _this._nType = 0;
          //类型
          _this._vJoyPos = new Array();
          _this._owner = void 0;
          _this._dirUp = 0;
          _this._dirDown = 0;
          _this._dirLeft = 0;
          _this._dirRight = 0;
          _this._keyDir = new Vec3(0, 0, 0);
          return _this;
        }
        var _proto = JoystickItem.prototype;
        _proto.onLoad = function onLoad() {
          // this._onGameSet('nJoy', App.mixMgr.getGameSet('nJoy') || 0);
          this.oriPoint = this.node.worldPosition.clone();
          this._reset();
          App.monitorMgr.addEventListener(MonitorType.game_set, this._onGameSet, this);
          input.on(Input.EventType.KEY_DOWN, this.onKeyDown, this);
          input.on(Input.EventType.KEY_UP, this.onKeyUp, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.removeEventListener(MonitorType.game_set, this._onGameSet, this);
          input.off(Input.EventType.KEY_DOWN, this.onKeyDown, this);
          input.off(Input.EventType.KEY_UP, this.onKeyUp, this);
        };
        _proto.update = function update(deltaTime) {
          if (this._dirUp + this._dirDown != 0 || this._dirLeft + this._dirRight != 0) {
            var _this$_owner;
            if ((_this$_owner = this._owner) != null && _this$_owner.checkValid()) {
              this._keyDir.x = this._dirLeft + this._dirRight;
              this._keyDir.y = this._dirUp + this._dirDown;
              this._owner.move(this._keyDir.normalize());
            }
          }
        };
        _proto.onKeyDown = function onKeyDown(event) {
          var dirKeyPress = false;
          switch (event.keyCode) {
            case KeyCode.KEY_W:
            case KeyCode.ARROW_UP:
              this._dirUp = 1;
              dirKeyPress = true;
              break;
            case KeyCode.KEY_S:
            case KeyCode.ARROW_DOWN:
              this._dirDown = -1;
              dirKeyPress = true;
              break;
            case KeyCode.KEY_A:
            case KeyCode.ARROW_LEFT:
              this._dirLeft = -1;
              dirKeyPress = true;
              break;
            case KeyCode.KEY_D:
            case KeyCode.ARROW_RIGHT:
              this._dirRight = 1;
              dirKeyPress = true;
              break;
          }
          if (dirKeyPress) {
            this._owner.setAutoFightAIActive(false);
          }
        };
        _proto.onKeyUp = function onKeyUp(event) {
          switch (event.keyCode) {
            case KeyCode.KEY_W:
            case KeyCode.ARROW_UP:
              this._dirUp = 0;
              break;
            case KeyCode.KEY_S:
            case KeyCode.ARROW_DOWN:
              this._dirDown = 0;
              break;
            case KeyCode.KEY_A:
            case KeyCode.ARROW_LEFT:
              this._dirLeft = 0;
              break;
            case KeyCode.KEY_D:
            case KeyCode.ARROW_RIGHT:
              this._dirRight = 0;
              break;
          }
          if (this._dirUp + this._dirDown + this._dirLeft + this._dirRight == 0) {
            this.onEnd();
          }
        };
        _proto._onGameSet = function _onGameSet(key, val) {
          if (val === void 0) {
            val = 0;
          }
          if (key != "nJoy") return;
          this._nType = val;
          this.node.worldPosition = this._vJoyPos[this._nType];
        };
        _proto.initJoyPos = function initJoyPos(vJoyPos) {
          this._vJoyPos = vJoyPos;
          this.node.worldPosition = this._vJoyPos[this._nType];
        };
        _proto._reset = function _reset() {
          this.curPoint.set(0, 0, 0);
          this.img_rod.position = this.curPoint;
          this.img_direction.active = false;
          this.node.uiOpacity.opacity = 255;
          if (this._vJoyPos && this._vJoyPos.length > 0) {
            this.node.worldPosition = this._vJoyPos[this._nType];
          }
        };
        _proto.onStart = function onStart(worldPos) {
          if (!this._nType) {
            this.node.worldPosition = worldPos;
          }
          this.node.uiOpacity.opacity = 125;
          if (this._nType) {
            var oriPoint = this.node.worldPosition;
            var deltaPos = new Vec2(worldPos.x - oriPoint.x, worldPos.y - oriPoint.y);
            this.onMove(deltaPos, worldPos);
          }
        };
        _proto.onMove = function onMove(deltaPos, endWorldPos) {
          var _this$_owner2;
          var oriPoint = this.node.worldPosition;
          var normalize = endWorldPos.clone().subtract(oriPoint).normalize();
          if ((_this$_owner2 = this._owner) != null && _this$_owner2.checkValid()) {
            this._owner.move(normalize);
            this._owner.setAutoFightAIActive(false);
          }
          var angle = BattleUtil.get2DAngleByPoint(oriPoint, endWorldPos);
          this.curPoint.add3f(deltaPos.x, deltaPos.y, 0);
          if (Vec3.distance(oriPoint, endWorldPos) > this.radius) {
            this.curPoint.add(normalize.multiplyScalar(deltaPos.length()));
          } else {
            this.curPoint.add3f(deltaPos.x, deltaPos.y, 0);
          }
          var dis = this.curPoint.length();
          if (dis > this.radius) {
            this.curPoint.normalize().multiplyScalar(this.radius);
          }
          this.img_direction.angle = angle;
          this.img_direction.active = true;
          this.img_rod.position = this.curPoint;

          // Utils.findManager('_xinShouManager').XunZhaoNPC();
          // let uiMain = UIMgr.inst.getOnceUi('uiMain') as Ui_main;
          // if (uiMain) {
          //     uiMain.clrVlead();
          // }
        };

        _proto.onEnd = function onEnd() {
          var _this$_owner3;
          this._reset();
          if ((_this$_owner3 = this._owner) != null && _this$_owner3.checkValid()) {
            var _this$_owner4;
            (_this$_owner4 = this._owner) == null || _this$_owner4.stopMove();
            this._owner.setAutoFightAIActive(true);
          }
        };
        _createClass(JoystickItem, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }]);
        return JoystickItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "img_rod", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "img_direction", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/jszip.min.js", ['./cjs-loader.mjs'], function (exports, module) {
  var loader;
  return {
    setters: [function (module) {
      loader = module.default;
    }],
    execute: function () {
      exports('default', void 0);
      var _cjsExports;
      var __cjsMetaURL = exports('__cjsMetaURL', module.meta.url);
      loader.define(__cjsMetaURL, function (exports$1, require, module, __filename, __dirname) {
        // #region ORIGINAL CODE

        !function (e) {
          if ("object" == typeof exports$1 && "undefined" != typeof module) {
            window.JSZip = e();
            module.exports = e();
          } else if ("function" == typeof define && define.amd) define([], e);else {
            var t;
            t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.JSZip = e();
          }
        }(function () {
          return function e(t, r, n) {
            function i(s, o) {
              if (!r[s]) {
                if (!t[s]) {
                  var u = "function" == typeof require && require;
                  if (!o && u) return u(s, !0);
                  if (a) return a(s, !0);
                  var h = new Error("Cannot find module '" + s + "'");
                  throw h.code = "MODULE_NOT_FOUND", h;
                }
                var l = r[s] = {
                  exports: {}
                };
                t[s][0].call(l.exports, function (e) {
                  var r = t[s][1][e];
                  return i(r ? r : e);
                }, l, l.exports, e, t, r, n);
              }
              return r[s].exports;
            }
            for (var a = "function" == typeof require && require, s = 0; s < n.length; s++) i(n[s]);
            return i;
          }({
            1: [function (e, t, r) {
              var n = e("./utils"),
                i = e("./support"),
                a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
              r.encode = function (e) {
                for (var t, r, i, s, o, u, h, l = [], c = 0, f = e.length, d = f, p = "string" !== n.getTypeOf(e); c < e.length;) d = f - c, p ? (t = e[c++], r = f > c ? e[c++] : 0, i = f > c ? e[c++] : 0) : (t = e.charCodeAt(c++), r = f > c ? e.charCodeAt(c++) : 0, i = f > c ? e.charCodeAt(c++) : 0), s = t >> 2, o = (3 & t) << 4 | r >> 4, u = d > 1 ? (15 & r) << 2 | i >> 6 : 64, h = d > 2 ? 63 & i : 64, l.push(a.charAt(s) + a.charAt(o) + a.charAt(u) + a.charAt(h));
                return l.join("");
              }, r.decode = function (e) {
                var t,
                  r,
                  n,
                  s,
                  o,
                  u,
                  h,
                  l = 0,
                  c = 0,
                  f = "data:";
                if (e.substr(0, f.length) === f) throw new Error("Invalid base64 input, it looks like a data url.");
                e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
                var d = 3 * e.length / 4;
                if (e.charAt(e.length - 1) === a.charAt(64) && d--, e.charAt(e.length - 2) === a.charAt(64) && d--, d % 1 !== 0) throw new Error("Invalid base64 input, bad content length.");
                var p;
                for (p = i.uint8array ? new Uint8Array(0 | d) : new Array(0 | d); l < e.length;) s = a.indexOf(e.charAt(l++)), o = a.indexOf(e.charAt(l++)), u = a.indexOf(e.charAt(l++)), h = a.indexOf(e.charAt(l++)), t = s << 2 | o >> 4, r = (15 & o) << 4 | u >> 2, n = (3 & u) << 6 | h, p[c++] = t, 64 !== u && (p[c++] = r), 64 !== h && (p[c++] = n);
                return p;
              };
            }, {
              "./support": 30,
              "./utils": 32
            }],
            2: [function (e, t, r) {
              function n(e, t, r, n, i) {
                this.compressedSize = e, this.uncompressedSize = t, this.crc32 = r, this.compression = n, this.compressedContent = i;
              }
              var i = e("./external"),
                a = e("./stream/DataWorker"),
                s = e("./stream/DataLengthProbe"),
                o = e("./stream/Crc32Probe"),
                s = e("./stream/DataLengthProbe");
              n.prototype = {
                getContentWorker: function getContentWorker() {
                  var e = new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),
                    t = this;
                  return e.on("end", function () {
                    if (this.streamInfo.data_length !== t.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
                  }), e;
                },
                getCompressedWorker: function getCompressedWorker() {
                  return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
                }
              }, n.createWorkerFrom = function (e, t, r) {
                return e.pipe(new o()).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression", t);
              }, t.exports = n;
            }, {
              "./external": 6,
              "./stream/Crc32Probe": 25,
              "./stream/DataLengthProbe": 26,
              "./stream/DataWorker": 27
            }],
            3: [function (e, t, r) {
              var n = e("./stream/GenericWorker");
              r.STORE = {
                magic: "\x00\x00",
                compressWorker: function compressWorker(e) {
                  return new n("STORE compression");
                },
                uncompressWorker: function uncompressWorker() {
                  return new n("STORE decompression");
                }
              }, r.DEFLATE = e("./flate");
            }, {
              "./flate": 7,
              "./stream/GenericWorker": 28
            }],
            4: [function (e, t, r) {
              function n() {
                for (var e, t = [], r = 0; 256 > r; r++) {
                  e = r;
                  for (var n = 0; 8 > n; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
                  t[r] = e;
                }
                return t;
              }
              function i(e, t, r, n) {
                var i = o,
                  a = n + r;
                e = -1 ^ e;
                for (var s = n; a > s; s++) e = e >>> 8 ^ i[255 & (e ^ t[s])];
                return -1 ^ e;
              }
              function a(e, t, r, n) {
                var i = o,
                  a = n + r;
                e = -1 ^ e;
                for (var s = n; a > s; s++) e = e >>> 8 ^ i[255 & (e ^ t.charCodeAt(s))];
                return -1 ^ e;
              }
              var s = e("./utils"),
                o = n();
              t.exports = function (e, t) {
                if ("undefined" == typeof e || !e.length) return 0;
                var r = "string" !== s.getTypeOf(e);
                return r ? i(0 | t, e, e.length, 0) : a(0 | t, e, e.length, 0);
              };
            }, {
              "./utils": 32
            }],
            5: [function (e, t, r) {
              r.base64 = !1, r.binary = !1, r.dir = !1, r.createFolders = !0, r.date = null, r.compression = null, r.compressionOptions = null, r.comment = null, r.unixPermissions = null, r.dosPermissions = null;
            }, {}],
            6: [function (e, t, r) {
              var n = null;
              n = "undefined" != typeof Promise ? Promise : e("lie"), t.exports = {
                Promise: n
              };
            }, {
              lie: 58
            }],
            7: [function (e, t, r) {
              function n(e, t) {
                o.call(this, "FlateWorker/" + e), this._pako = null, this._pakoAction = e, this._pakoOptions = t, this.meta = {};
              }
              var i = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array,
                a = e("pako"),
                s = e("./utils"),
                o = e("./stream/GenericWorker"),
                u = i ? "uint8array" : "array";
              r.magic = "\b\x00", s.inherits(n, o), n.prototype.processChunk = function (e) {
                this.meta = e.meta, null === this._pako && this._createPako(), this._pako.push(s.transformTo(u, e.data), !1);
              }, n.prototype.flush = function () {
                o.prototype.flush.call(this), null === this._pako && this._createPako(), this._pako.push([], !0);
              }, n.prototype.cleanUp = function () {
                o.prototype.cleanUp.call(this), this._pako = null;
              }, n.prototype._createPako = function () {
                this._pako = new a[this._pakoAction]({
                  raw: !0,
                  level: this._pakoOptions.level || -1
                });
                var e = this;
                this._pako.onData = function (t) {
                  e.push({
                    data: t,
                    meta: e.meta
                  });
                };
              }, r.compressWorker = function (e) {
                return new n("Deflate", e);
              }, r.uncompressWorker = function () {
                return new n("Inflate", {});
              };
            }, {
              "./stream/GenericWorker": 28,
              "./utils": 32,
              pako: 59
            }],
            8: [function (e, t, r) {
              function n(e, t, r, n) {
                a.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t, this.zipPlatform = r, this.encodeFileName = n, this.streamFiles = e, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
              }
              var i = e("../utils"),
                a = e("../stream/GenericWorker"),
                s = e("../utf8"),
                o = e("../crc32"),
                u = e("../signature"),
                h = function h(e, t) {
                  var r,
                    n = "";
                  for (r = 0; t > r; r++) n += String.fromCharCode(255 & e), e >>>= 8;
                  return n;
                },
                l = function l(e, t) {
                  var r = e;
                  return e || (r = t ? 16893 : 33204), (65535 & r) << 16;
                },
                c = function c(e, t) {
                  return 63 & (e || 0);
                },
                f = function f(e, t, r, n, a, _f) {
                  var d,
                    p,
                    m = e.file,
                    _ = e.compression,
                    g = _f !== s.utf8encode,
                    v = i.transformTo("string", _f(m.name)),
                    b = i.transformTo("string", s.utf8encode(m.name)),
                    w = m.comment,
                    y = i.transformTo("string", _f(w)),
                    k = i.transformTo("string", s.utf8encode(w)),
                    x = b.length !== m.name.length,
                    S = k.length !== w.length,
                    z = "",
                    E = "",
                    C = "",
                    A = m.dir,
                    I = m.date,
                    O = {
                      crc32: 0,
                      compressedSize: 0,
                      uncompressedSize: 0
                    };
                  (!t || r) && (O.crc32 = e.crc32, O.compressedSize = e.compressedSize, O.uncompressedSize = e.uncompressedSize);
                  var B = 0;
                  t && (B |= 8), g || !x && !S || (B |= 2048);
                  var R = 0,
                    T = 0;
                  A && (R |= 16), "UNIX" === a ? (T = 798, R |= l(m.unixPermissions, A)) : (T = 20, R |= c(m.dosPermissions)), d = I.getUTCHours(), d <<= 6, d |= I.getUTCMinutes(), d <<= 5, d |= I.getUTCSeconds() / 2, p = I.getUTCFullYear() - 1980, p <<= 4, p |= I.getUTCMonth() + 1, p <<= 5, p |= I.getUTCDate(), x && (E = h(1, 1) + h(o(v), 4) + b, z += "up" + h(E.length, 2) + E), S && (C = h(1, 1) + h(o(y), 4) + k, z += "uc" + h(C.length, 2) + C);
                  var D = "";
                  D += "\n\x00", D += h(B, 2), D += _.magic, D += h(d, 2), D += h(p, 2), D += h(O.crc32, 4), D += h(O.compressedSize, 4), D += h(O.uncompressedSize, 4), D += h(v.length, 2), D += h(z.length, 2);
                  var F = u.LOCAL_FILE_HEADER + D + v + z,
                    N = u.CENTRAL_FILE_HEADER + h(T, 2) + D + h(y.length, 2) + "\x00\x00\x00\x00" + h(R, 4) + h(n, 4) + v + z + y;
                  return {
                    fileRecord: F,
                    dirRecord: N
                  };
                },
                d = function d(e, t, r, n, a) {
                  var o = i.transformTo("string", a(n));
                  return u.CENTRAL_DIRECTORY_END + "\x00\x00\x00\x00" + h(e, 2) + h(e, 2) + h(t, 4) + h(r, 4) + h(o.length, 2) + o;
                },
                p = function p(e) {
                  return u.DATA_DESCRIPTOR + h(e.crc32, 4) + h(e.compressedSize, 4) + h(e.uncompressedSize, 4);
                };
              i.inherits(n, a), n.prototype.push = function (e) {
                var t = e.meta.percent || 0,
                  r = this.entriesCount,
                  n = this._sources.length;
                this.accumulate ? this.contentBuffer.push(e) : (this.bytesWritten += e.data.length, a.prototype.push.call(this, {
                  data: e.data,
                  meta: {
                    currentFile: this.currentFile,
                    percent: r ? (t + 100 * (r - n - 1)) / r : 100
                  }
                }));
              }, n.prototype.openedSource = function (e) {
                this.currentSourceOffset = this.bytesWritten, this.currentFile = e.file.name;
                var t = this.streamFiles && !e.file.dir;
                if (t) {
                  var r = f(e, t, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
                  this.push({
                    data: r.fileRecord,
                    meta: {
                      percent: 0
                    }
                  });
                } else this.accumulate = !0;
              }, n.prototype.closedSource = function (e) {
                this.accumulate = !1;
                var t = this.streamFiles && !e.file.dir,
                  r = f(e, t, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
                if (this.dirRecords.push(r.dirRecord), t) this.push({
                  data: p(e),
                  meta: {
                    percent: 100
                  }
                });else for (this.push({
                  data: r.fileRecord,
                  meta: {
                    percent: 0
                  }
                }); this.contentBuffer.length;) this.push(this.contentBuffer.shift());
                this.currentFile = null;
              }, n.prototype.flush = function () {
                for (var e = this.bytesWritten, t = 0; t < this.dirRecords.length; t++) this.push({
                  data: this.dirRecords[t],
                  meta: {
                    percent: 100
                  }
                });
                var r = this.bytesWritten - e,
                  n = d(this.dirRecords.length, r, e, this.zipComment, this.encodeFileName);
                this.push({
                  data: n,
                  meta: {
                    percent: 100
                  }
                });
              }, n.prototype.prepareNextSource = function () {
                this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
              }, n.prototype.registerPrevious = function (e) {
                this._sources.push(e);
                var t = this;
                return e.on("data", function (e) {
                  t.processChunk(e);
                }), e.on("end", function () {
                  t.closedSource(t.previous.streamInfo), t._sources.length ? t.prepareNextSource() : t.end();
                }), e.on("error", function (e) {
                  t.error(e);
                }), this;
              }, n.prototype.resume = function () {
                return a.prototype.resume.call(this) ? !this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0) : !1;
              }, n.prototype.error = function (e) {
                var t = this._sources;
                if (!a.prototype.error.call(this, e)) return !1;
                for (var r = 0; r < t.length; r++) try {
                  t[r].error(e);
                } catch (e) {}
                return !0;
              }, n.prototype.lock = function () {
                a.prototype.lock.call(this);
                for (var e = this._sources, t = 0; t < e.length; t++) e[t].lock();
              }, t.exports = n;
            }, {
              "../crc32": 4,
              "../signature": 23,
              "../stream/GenericWorker": 28,
              "../utf8": 31,
              "../utils": 32
            }],
            9: [function (e, t, r) {
              var n = e("../compressions"),
                i = e("./ZipFileWorker"),
                a = function a(e, t) {
                  var r = e || t,
                    i = n[r];
                  if (!i) throw new Error(r + " is not a valid compression method !");
                  return i;
                };
              r.generateWorker = function (e, t, r) {
                var n = new i(t.streamFiles, r, t.platform, t.encodeFileName),
                  s = 0;
                try {
                  e.forEach(function (e, r) {
                    s++;
                    var i = a(r.options.compression, t.compression),
                      o = r.options.compressionOptions || t.compressionOptions || {},
                      u = r.dir,
                      h = r.date;
                    r._compressWorker(i, o).withStreamInfo("file", {
                      name: e,
                      dir: u,
                      date: h,
                      comment: r.comment || "",
                      unixPermissions: r.unixPermissions,
                      dosPermissions: r.dosPermissions
                    }).pipe(n);
                  }), n.entriesCount = s;
                } catch (o) {
                  n.error(o);
                }
                return n;
              };
            }, {
              "../compressions": 3,
              "./ZipFileWorker": 8
            }],
            10: [function (e, t, r) {
              function n() {
                if (!(this instanceof n)) return new n();
                if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
                this.files = {}, this.comment = null, this.root = "", this.clone = function () {
                  var e = new n();
                  for (var t in this) "function" != typeof this[t] && (e[t] = this[t]);
                  return e;
                };
              }
              n.prototype = e("./object"), n.prototype.loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.1.5", n.loadAsync = function (e, t) {
                return new n().loadAsync(e, t);
              }, n.external = e("./external"), t.exports = n;
            }, {
              "./defaults": 5,
              "./external": 6,
              "./load": 11,
              "./object": 15,
              "./support": 30
            }],
            11: [function (e, t, r) {
              function n(e) {
                return new a.Promise(function (t, r) {
                  var n = e.decompressed.getContentWorker().pipe(new u());
                  n.on("error", function (e) {
                    r(e);
                  }).on("end", function () {
                    n.streamInfo.crc32 !== e.decompressed.crc32 ? r(new Error("Corrupted zip : CRC32 mismatch")) : t();
                  }).resume();
                });
              }
              var i = e("./utils"),
                a = e("./external"),
                s = e("./utf8"),
                i = e("./utils"),
                o = e("./zipEntries"),
                u = e("./stream/Crc32Probe"),
                h = e("./nodejsUtils");
              t.exports = function (e, t) {
                var r = this;
                return t = i.extend(t || {}, {
                  base64: !1,
                  checkCRC32: !1,
                  optimizedBinaryString: !1,
                  createFolders: !1,
                  decodeFileName: s.utf8decode
                }), h.isNode && h.isStream(e) ? a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : i.prepareContent("the loaded zip file", e, !0, t.optimizedBinaryString, t.base64).then(function (e) {
                  var r = new o(t);
                  return r.load(e), r;
                }).then(function (e) {
                  var r = [a.Promise.resolve(e)],
                    i = e.files;
                  if (t.checkCRC32) for (var s = 0; s < i.length; s++) r.push(n(i[s]));
                  return a.Promise.all(r);
                }).then(function (e) {
                  for (var n = e.shift(), i = n.files, a = 0; a < i.length; a++) {
                    var s = i[a];
                    r.file(s.fileNameStr, s.decompressed, {
                      binary: !0,
                      optimizedBinaryString: !0,
                      date: s.date,
                      dir: s.dir,
                      comment: s.fileCommentStr.length ? s.fileCommentStr : null,
                      unixPermissions: s.unixPermissions,
                      dosPermissions: s.dosPermissions,
                      createFolders: t.createFolders
                    });
                  }
                  return n.zipComment.length && (r.comment = n.zipComment), r;
                });
              };
            }, {
              "./external": 6,
              "./nodejsUtils": 14,
              "./stream/Crc32Probe": 25,
              "./utf8": 31,
              "./utils": 32,
              "./zipEntries": 33
            }],
            12: [function (e, t, r) {
              function n(e, t) {
                a.call(this, "Nodejs stream input adapter for " + e), this._upstreamEnded = !1, this._bindStream(t);
              }
              var i = e("../utils"),
                a = e("../stream/GenericWorker");
              i.inherits(n, a), n.prototype._bindStream = function (e) {
                var t = this;
                this._stream = e, e.pause(), e.on("data", function (e) {
                  t.push({
                    data: e,
                    meta: {
                      percent: 0
                    }
                  });
                }).on("error", function (e) {
                  t.isPaused ? this.generatedError = e : t.error(e);
                }).on("end", function () {
                  t.isPaused ? t._upstreamEnded = !0 : t.end();
                });
              }, n.prototype.pause = function () {
                return a.prototype.pause.call(this) ? (this._stream.pause(), !0) : !1;
              }, n.prototype.resume = function () {
                return a.prototype.resume.call(this) ? (this._upstreamEnded ? this.end() : this._stream.resume(), !0) : !1;
              }, t.exports = n;
            }, {
              "../stream/GenericWorker": 28,
              "../utils": 32
            }],
            13: [function (e, t, r) {
              function n(e, t, r) {
                i.call(this, t), this._helper = e;
                var n = this;
                e.on("data", function (e, t) {
                  n.push(e) || n._helper.pause(), r && r(t);
                }).on("error", function (e) {
                  n.emit("error", e);
                }).on("end", function () {
                  n.push(null);
                });
              }
              var i = e("readable-stream").Readable,
                a = e("../utils");
              a.inherits(n, i), n.prototype._read = function () {
                this._helper.resume();
              }, t.exports = n;
            }, {
              "../utils": 32,
              "readable-stream": 16
            }],
            14: [function (e, t, r) {
              t.exports = {
                isNode: "undefined" != typeof Buffer,
                newBufferFrom: function newBufferFrom(e, t) {
                  return new Buffer(e, t);
                },
                allocBuffer: function allocBuffer(e) {
                  return Buffer.alloc ? Buffer.alloc(e) : new Buffer(e);
                },
                isBuffer: function isBuffer(e) {
                  return Buffer.isBuffer(e);
                },
                isStream: function isStream(e) {
                  return e && "function" == typeof e.on && "function" == typeof e.pause && "function" == typeof e.resume;
                }
              };
            }, {}],
            15: [function (e, t, r) {
              function n(e) {
                return "[object RegExp]" === Object.prototype.toString.call(e);
              }
              var i = e("./utf8"),
                a = e("./utils"),
                s = e("./stream/GenericWorker"),
                o = e("./stream/StreamHelper"),
                u = e("./defaults"),
                h = e("./compressedObject"),
                l = e("./zipObject"),
                c = e("./generate"),
                f = e("./nodejsUtils"),
                d = e("./nodejs/NodejsStreamInputAdapter"),
                p = function p(e, t, r) {
                  var n,
                    i = a.getTypeOf(t),
                    o = a.extend(r || {}, u);
                  o.date = o.date || new Date(), null !== o.compression && (o.compression = o.compression.toUpperCase()), "string" == typeof o.unixPermissions && (o.unixPermissions = parseInt(o.unixPermissions, 8)), o.unixPermissions && 16384 & o.unixPermissions && (o.dir = !0), o.dosPermissions && 16 & o.dosPermissions && (o.dir = !0), o.dir && (e = _(e)), o.createFolders && (n = m(e)) && g.call(this, n, !0);
                  var c = "string" === i && o.binary === !1 && o.base64 === !1;
                  r && "undefined" != typeof r.binary || (o.binary = !c);
                  var p = t instanceof h && 0 === t.uncompressedSize;
                  (p || o.dir || !t || 0 === t.length) && (o.base64 = !1, o.binary = !0, t = "", o.compression = "STORE", i = "string");
                  var v = null;
                  v = t instanceof h || t instanceof s ? t : f.isNode && f.isStream(t) ? new d(e, t) : a.prepareContent(e, t, o.binary, o.optimizedBinaryString, o.base64);
                  var b = new l(e, v, o);
                  this.files[e] = b;
                },
                m = function m(e) {
                  "/" === e.slice(-1) && (e = e.substring(0, e.length - 1));
                  var t = e.lastIndexOf("/");
                  return t > 0 ? e.substring(0, t) : "";
                },
                _ = function _(e) {
                  return "/" !== e.slice(-1) && (e += "/"), e;
                },
                g = function g(e, t) {
                  return t = "undefined" != typeof t ? t : u.createFolders, e = _(e), this.files[e] || p.call(this, e, null, {
                    dir: !0,
                    createFolders: t
                  }), this.files[e];
                },
                v = {
                  load: function load() {
                    throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
                  },
                  forEach: function forEach(e) {
                    var t, r, n;
                    for (t in this.files) this.files.hasOwnProperty(t) && (n = this.files[t], r = t.slice(this.root.length, t.length), r && t.slice(0, this.root.length) === this.root && e(r, n));
                  },
                  filter: function filter(e) {
                    var t = [];
                    return this.forEach(function (r, n) {
                      e(r, n) && t.push(n);
                    }), t;
                  },
                  file: function file(e, t, r) {
                    if (1 === arguments.length) {
                      if (n(e)) {
                        var i = e;
                        return this.filter(function (e, t) {
                          return !t.dir && i.test(e);
                        });
                      }
                      var a = this.files[this.root + e];
                      return a && !a.dir ? a : null;
                    }
                    return e = this.root + e, p.call(this, e, t, r), this;
                  },
                  folder: function folder(e) {
                    if (!e) return this;
                    if (n(e)) return this.filter(function (t, r) {
                      return r.dir && e.test(t);
                    });
                    var t = this.root + e,
                      r = g.call(this, t),
                      i = this.clone();
                    return i.root = r.name, i;
                  },
                  remove: function remove(e) {
                    e = this.root + e;
                    var t = this.files[e];
                    if (t || ("/" !== e.slice(-1) && (e += "/"), t = this.files[e]), t && !t.dir) delete this.files[e];else for (var r = this.filter(function (t, r) {
                        return r.name.slice(0, e.length) === e;
                      }), n = 0; n < r.length; n++) delete this.files[r[n].name];
                    return this;
                  },
                  generate: function generate(e) {
                    throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
                  },
                  generateInternalStream: function generateInternalStream(e) {
                    var t,
                      r = {};
                    try {
                      if (r = a.extend(e || {}, {
                        streamFiles: !1,
                        compression: "STORE",
                        compressionOptions: null,
                        type: "",
                        platform: "DOS",
                        comment: null,
                        mimeType: "application/zip",
                        encodeFileName: i.utf8encode
                      }), r.type = r.type.toLowerCase(), r.compression = r.compression.toUpperCase(), "binarystring" === r.type && (r.type = "string"), !r.type) throw new Error("No output type specified.");
                      a.checkSupport(r.type), ("darwin" === r.platform || "freebsd" === r.platform || "linux" === r.platform || "sunos" === r.platform) && (r.platform = "UNIX"), "win32" === r.platform && (r.platform = "DOS");
                      var n = r.comment || this.comment || "";
                      t = c.generateWorker(this, r, n);
                    } catch (u) {
                      t = new s("error"), t.error(u);
                    }
                    return new o(t, r.type || "string", r.mimeType);
                  },
                  generateAsync: function generateAsync(e, t) {
                    return this.generateInternalStream(e).accumulate(t);
                  },
                  generateNodeStream: function generateNodeStream(e, t) {
                    return e = e || {}, e.type || (e.type = "nodebuffer"), this.generateInternalStream(e).toNodejsStream(t);
                  }
                };
              t.exports = v;
            }, {
              "./compressedObject": 2,
              "./defaults": 5,
              "./generate": 9,
              "./nodejs/NodejsStreamInputAdapter": 12,
              "./nodejsUtils": 14,
              "./stream/GenericWorker": 28,
              "./stream/StreamHelper": 29,
              "./utf8": 31,
              "./utils": 32,
              "./zipObject": 35
            }],
            16: [function (e, t, r) {
              t.exports = e("stream");
            }, {
              stream: void 0
            }],
            17: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
                for (var t = 0; t < this.data.length; t++) e[t] = 255 & e[t];
              }
              var i = e("./DataReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.byteAt = function (e) {
                return this.data[this.zero + e];
              }, n.prototype.lastIndexOfSignature = function (e) {
                for (var t = e.charCodeAt(0), r = e.charCodeAt(1), n = e.charCodeAt(2), i = e.charCodeAt(3), a = this.length - 4; a >= 0; --a) if (this.data[a] === t && this.data[a + 1] === r && this.data[a + 2] === n && this.data[a + 3] === i) return a - this.zero;
                return -1;
              }, n.prototype.readAndCheckSignature = function (e) {
                var t = e.charCodeAt(0),
                  r = e.charCodeAt(1),
                  n = e.charCodeAt(2),
                  i = e.charCodeAt(3),
                  a = this.readData(4);
                return t === a[0] && r === a[1] && n === a[2] && i === a[3];
              }, n.prototype.readData = function (e) {
                if (this.checkOffset(e), 0 === e) return [];
                var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./DataReader": 18
            }],
            18: [function (e, t, r) {
              function n(e) {
                this.data = e, this.length = e.length, this.index = 0, this.zero = 0;
              }
              var i = e("../utils");
              n.prototype = {
                checkOffset: function checkOffset(e) {
                  this.checkIndex(this.index + e);
                },
                checkIndex: function checkIndex(e) {
                  if (this.length < this.zero + e || 0 > e) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e + "). Corrupted zip ?");
                },
                setIndex: function setIndex(e) {
                  this.checkIndex(e), this.index = e;
                },
                skip: function skip(e) {
                  this.setIndex(this.index + e);
                },
                byteAt: function byteAt(e) {},
                readInt: function readInt(e) {
                  var t,
                    r = 0;
                  for (this.checkOffset(e), t = this.index + e - 1; t >= this.index; t--) r = (r << 8) + this.byteAt(t);
                  return this.index += e, r;
                },
                readString: function readString(e) {
                  return i.transformTo("string", this.readData(e));
                },
                readData: function readData(e) {},
                lastIndexOfSignature: function lastIndexOfSignature(e) {},
                readAndCheckSignature: function readAndCheckSignature(e) {},
                readDate: function readDate() {
                  var e = this.readInt(4);
                  return new Date(Date.UTC((e >> 25 & 127) + 1980, (e >> 21 & 15) - 1, e >> 16 & 31, e >> 11 & 31, e >> 5 & 63, (31 & e) << 1));
                }
              }, t.exports = n;
            }, {
              "../utils": 32
            }],
            19: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
              }
              var i = e("./Uint8ArrayReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.readData = function (e) {
                this.checkOffset(e);
                var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./Uint8ArrayReader": 21
            }],
            20: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
              }
              var i = e("./DataReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.byteAt = function (e) {
                return this.data.charCodeAt(this.zero + e);
              }, n.prototype.lastIndexOfSignature = function (e) {
                return this.data.lastIndexOf(e) - this.zero;
              }, n.prototype.readAndCheckSignature = function (e) {
                var t = this.readData(4);
                return e === t;
              }, n.prototype.readData = function (e) {
                this.checkOffset(e);
                var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./DataReader": 18
            }],
            21: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
              }
              var i = e("./ArrayReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.readData = function (e) {
                if (this.checkOffset(e), 0 === e) return new Uint8Array(0);
                var t = this.data.subarray(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./ArrayReader": 17
            }],
            22: [function (e, t, r) {
              var n = e("../utils"),
                i = e("../support"),
                a = e("./ArrayReader"),
                s = e("./StringReader"),
                o = e("./NodeBufferReader"),
                u = e("./Uint8ArrayReader");
              t.exports = function (e) {
                var t = n.getTypeOf(e);
                return n.checkSupport(t), "string" !== t || i.uint8array ? "nodebuffer" === t ? new o(e) : i.uint8array ? new u(n.transformTo("uint8array", e)) : new a(n.transformTo("array", e)) : new s(e);
              };
            }, {
              "../support": 30,
              "../utils": 32,
              "./ArrayReader": 17,
              "./NodeBufferReader": 19,
              "./StringReader": 20,
              "./Uint8ArrayReader": 21
            }],
            23: [function (e, t, r) {
              r.LOCAL_FILE_HEADER = "PK", r.CENTRAL_FILE_HEADER = "PK", r.CENTRAL_DIRECTORY_END = "PK", r.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK", r.ZIP64_CENTRAL_DIRECTORY_END = "PK", r.DATA_DESCRIPTOR = "PK\b";
            }, {}],
            24: [function (e, t, r) {
              function n(e) {
                i.call(this, "ConvertWorker to " + e), this.destType = e;
              }
              var i = e("./GenericWorker"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.processChunk = function (e) {
                this.push({
                  data: a.transformTo(this.destType, e.data),
                  meta: e.meta
                });
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./GenericWorker": 28
            }],
            25: [function (e, t, r) {
              function n() {
                i.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
              }
              var i = e("./GenericWorker"),
                a = e("../crc32"),
                s = e("../utils");
              s.inherits(n, i), n.prototype.processChunk = function (e) {
                this.streamInfo.crc32 = a(e.data, this.streamInfo.crc32 || 0), this.push(e);
              }, t.exports = n;
            }, {
              "../crc32": 4,
              "../utils": 32,
              "./GenericWorker": 28
            }],
            26: [function (e, t, r) {
              function n(e) {
                a.call(this, "DataLengthProbe for " + e), this.propName = e, this.withStreamInfo(e, 0);
              }
              var i = e("../utils"),
                a = e("./GenericWorker");
              i.inherits(n, a), n.prototype.processChunk = function (e) {
                if (e) {
                  var t = this.streamInfo[this.propName] || 0;
                  this.streamInfo[this.propName] = t + e.data.length;
                }
                a.prototype.processChunk.call(this, e);
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./GenericWorker": 28
            }],
            27: [function (e, t, r) {
              function n(e) {
                a.call(this, "DataWorker");
                var t = this;
                this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, e.then(function (e) {
                  t.dataIsReady = !0, t.data = e, t.max = e && e.length || 0, t.type = i.getTypeOf(e), t.isPaused || t._tickAndRepeat();
                }, function (e) {
                  t.error(e);
                });
              }
              var i = e("../utils"),
                a = e("./GenericWorker"),
                s = 16384;
              i.inherits(n, a), n.prototype.cleanUp = function () {
                a.prototype.cleanUp.call(this), this.data = null;
              }, n.prototype.resume = function () {
                return a.prototype.resume.call(this) ? (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, i.delay(this._tickAndRepeat, [], this)), !0) : !1;
              }, n.prototype._tickAndRepeat = function () {
                this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (i.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
              }, n.prototype._tick = function () {
                if (this.isPaused || this.isFinished) return !1;
                var e = s,
                  t = null,
                  r = Math.min(this.max, this.index + e);
                if (this.index >= this.max) return this.end();
                switch (this.type) {
                  case "string":
                    t = this.data.substring(this.index, r);
                    break;
                  case "uint8array":
                    t = this.data.subarray(this.index, r);
                    break;
                  case "array":
                  case "nodebuffer":
                    t = this.data.slice(this.index, r);
                }
                return this.index = r, this.push({
                  data: t,
                  meta: {
                    percent: this.max ? this.index / this.max * 100 : 0
                  }
                });
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./GenericWorker": 28
            }],
            28: [function (e, t, r) {
              function n(e) {
                this.name = e || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = {
                  data: [],
                  end: [],
                  error: []
                }, this.previous = null;
              }
              n.prototype = {
                push: function push(e) {
                  this.emit("data", e);
                },
                end: function end() {
                  if (this.isFinished) return !1;
                  this.flush();
                  try {
                    this.emit("end"), this.cleanUp(), this.isFinished = !0;
                  } catch (e) {
                    this.emit("error", e);
                  }
                  return !0;
                },
                error: function error(e) {
                  return this.isFinished ? !1 : (this.isPaused ? this.generatedError = e : (this.isFinished = !0, this.emit("error", e), this.previous && this.previous.error(e), this.cleanUp()), !0);
                },
                on: function on(e, t) {
                  return this._listeners[e].push(t), this;
                },
                cleanUp: function cleanUp() {
                  this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
                },
                emit: function emit(e, t) {
                  if (this._listeners[e]) for (var r = 0; r < this._listeners[e].length; r++) this._listeners[e][r].call(this, t);
                },
                pipe: function pipe(e) {
                  return e.registerPrevious(this);
                },
                registerPrevious: function registerPrevious(e) {
                  if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
                  this.streamInfo = e.streamInfo, this.mergeStreamInfo(), this.previous = e;
                  var t = this;
                  return e.on("data", function (e) {
                    t.processChunk(e);
                  }), e.on("end", function () {
                    t.end();
                  }), e.on("error", function (e) {
                    t.error(e);
                  }), this;
                },
                pause: function pause() {
                  return this.isPaused || this.isFinished ? !1 : (this.isPaused = !0, this.previous && this.previous.pause(), !0);
                },
                resume: function resume() {
                  if (!this.isPaused || this.isFinished) return !1;
                  this.isPaused = !1;
                  var e = !1;
                  return this.generatedError && (this.error(this.generatedError), e = !0), this.previous && this.previous.resume(), !e;
                },
                flush: function flush() {},
                processChunk: function processChunk(e) {
                  this.push(e);
                },
                withStreamInfo: function withStreamInfo(e, t) {
                  return this.extraStreamInfo[e] = t, this.mergeStreamInfo(), this;
                },
                mergeStreamInfo: function mergeStreamInfo() {
                  for (var e in this.extraStreamInfo) this.extraStreamInfo.hasOwnProperty(e) && (this.streamInfo[e] = this.extraStreamInfo[e]);
                },
                lock: function lock() {
                  if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
                  this.isLocked = !0, this.previous && this.previous.lock();
                },
                toString: function toString() {
                  var e = "Worker " + this.name;
                  return this.previous ? this.previous + " -> " + e : e;
                }
              }, t.exports = n;
            }, {}],
            29: [function (e, t, r) {
              function n(e, t, r) {
                switch (e) {
                  case "blob":
                    return o.newBlob(o.transformTo("arraybuffer", t), r);
                  case "base64":
                    return l.encode(t);
                  default:
                    return o.transformTo(e, t);
                }
              }
              function i(e, t) {
                var r,
                  n = 0,
                  i = null,
                  a = 0;
                for (r = 0; r < t.length; r++) a += t[r].length;
                switch (e) {
                  case "string":
                    return t.join("");
                  case "array":
                    return Array.prototype.concat.apply([], t);
                  case "uint8array":
                    for (i = new Uint8Array(a), r = 0; r < t.length; r++) i.set(t[r], n), n += t[r].length;
                    return i;
                  case "nodebuffer":
                    return Buffer.concat(t);
                  default:
                    throw new Error("concat : unsupported type '" + e + "'");
                }
              }
              function a(e, t) {
                return new f.Promise(function (r, a) {
                  var s = [],
                    o = e._internalType,
                    u = e._outputType,
                    h = e._mimeType;
                  e.on("data", function (e, r) {
                    s.push(e), t && t(r);
                  }).on("error", function (e) {
                    s = [], a(e);
                  }).on("end", function () {
                    try {
                      var e = n(u, i(o, s), h);
                      r(e);
                    } catch (t) {
                      a(t);
                    }
                    s = [];
                  }).resume();
                });
              }
              function s(e, t, r) {
                var n = t;
                switch (t) {
                  case "blob":
                  case "arraybuffer":
                    n = "uint8array";
                    break;
                  case "base64":
                    n = "string";
                }
                try {
                  this._internalType = n, this._outputType = t, this._mimeType = r, o.checkSupport(n), this._worker = e.pipe(new u(n)), e.lock();
                } catch (i) {
                  this._worker = new h("error"), this._worker.error(i);
                }
              }
              var o = e("../utils"),
                u = e("./ConvertWorker"),
                h = e("./GenericWorker"),
                l = e("../base64"),
                c = e("../support"),
                f = e("../external"),
                d = null;
              if (c.nodestream) try {
                d = e("../nodejs/NodejsStreamOutputAdapter");
              } catch (p) {}
              s.prototype = {
                accumulate: function accumulate(e) {
                  return a(this, e);
                },
                on: function on(e, t) {
                  var r = this;
                  return "data" === e ? this._worker.on(e, function (e) {
                    t.call(r, e.data, e.meta);
                  }) : this._worker.on(e, function () {
                    o.delay(t, arguments, r);
                  }), this;
                },
                resume: function resume() {
                  return o.delay(this._worker.resume, [], this._worker), this;
                },
                pause: function pause() {
                  return this._worker.pause(), this;
                },
                toNodejsStream: function toNodejsStream(e) {
                  if (o.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method");
                  return new d(this, {
                    objectMode: "nodebuffer" !== this._outputType
                  }, e);
                }
              }, t.exports = s;
            }, {
              "../base64": 1,
              "../external": 6,
              "../nodejs/NodejsStreamOutputAdapter": 13,
              "../support": 30,
              "../utils": 32,
              "./ConvertWorker": 24,
              "./GenericWorker": 28
            }],
            30: [function (e, t, r) {
              if (r.base64 = !0, r.array = !0, r.string = !0, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof Buffer, r.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer) r.blob = !1;else {
                var n = new ArrayBuffer(0);
                try {
                  r.blob = 0 === new Blob([n], {
                    type: "application/zip"
                  }).size;
                } catch (i) {
                  try {
                    var a = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder,
                      s = new a();
                    s.append(n), r.blob = 0 === s.getBlob("application/zip").size;
                  } catch (i) {
                    r.blob = !1;
                  }
                }
              }
              try {
                r.nodestream = !!e("readable-stream").Readable;
              } catch (i) {
                r.nodestream = !1;
              }
            }, {
              "readable-stream": 16
            }],
            31: [function (e, t, r) {
              function n() {
                u.call(this, "utf-8 decode"), this.leftOver = null;
              }
              function i() {
                u.call(this, "utf-8 encode");
              }
              for (var a = e("./utils"), s = e("./support"), o = e("./nodejsUtils"), u = e("./stream/GenericWorker"), h = new Array(256), l = 0; 256 > l; l++) h[l] = l >= 252 ? 6 : l >= 248 ? 5 : l >= 240 ? 4 : l >= 224 ? 3 : l >= 192 ? 2 : 1;
              h[254] = h[254] = 1;
              var c = function c(e) {
                  var t,
                    r,
                    n,
                    i,
                    a,
                    o = e.length,
                    u = 0;
                  for (i = 0; o > i; i++) r = e.charCodeAt(i), 55296 === (64512 & r) && o > i + 1 && (n = e.charCodeAt(i + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++)), u += 128 > r ? 1 : 2048 > r ? 2 : 65536 > r ? 3 : 4;
                  for (t = s.uint8array ? new Uint8Array(u) : new Array(u), a = 0, i = 0; u > a; i++) r = e.charCodeAt(i), 55296 === (64512 & r) && o > i + 1 && (n = e.charCodeAt(i + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++)), 128 > r ? t[a++] = r : 2048 > r ? (t[a++] = 192 | r >>> 6, t[a++] = 128 | 63 & r) : 65536 > r ? (t[a++] = 224 | r >>> 12, t[a++] = 128 | r >>> 6 & 63, t[a++] = 128 | 63 & r) : (t[a++] = 240 | r >>> 18, t[a++] = 128 | r >>> 12 & 63, t[a++] = 128 | r >>> 6 & 63, t[a++] = 128 | 63 & r);
                  return t;
                },
                f = function f(e, t) {
                  var r;
                  for (t = t || e.length, t > e.length && (t = e.length), r = t - 1; r >= 0 && 128 === (192 & e[r]);) r--;
                  return 0 > r ? t : 0 === r ? t : r + h[e[r]] > t ? r : t;
                },
                d = function d(e) {
                  var t,
                    r,
                    n,
                    i,
                    s = e.length,
                    o = new Array(2 * s);
                  for (r = 0, t = 0; s > t;) if (n = e[t++], 128 > n) o[r++] = n;else if (i = h[n], i > 4) o[r++] = 65533, t += i - 1;else {
                    for (n &= 2 === i ? 31 : 3 === i ? 15 : 7; i > 1 && s > t;) n = n << 6 | 63 & e[t++], i--;
                    i > 1 ? o[r++] = 65533 : 65536 > n ? o[r++] = n : (n -= 65536, o[r++] = 55296 | n >> 10 & 1023, o[r++] = 56320 | 1023 & n);
                  }
                  return o.length !== r && (o.subarray ? o = o.subarray(0, r) : o.length = r), a.applyFromCharCode(o);
                };
              r.utf8encode = function (e) {
                return s.nodebuffer ? o.newBufferFrom(e, "utf-8") : c(e);
              }, r.utf8decode = function (e) {
                return s.nodebuffer ? a.transformTo("nodebuffer", e).toString("utf-8") : (e = a.transformTo(s.uint8array ? "uint8array" : "array", e), d(e));
              }, a.inherits(n, u), n.prototype.processChunk = function (e) {
                var t = a.transformTo(s.uint8array ? "uint8array" : "array", e.data);
                if (this.leftOver && this.leftOver.length) {
                  if (s.uint8array) {
                    var n = t;
                    t = new Uint8Array(n.length + this.leftOver.length), t.set(this.leftOver, 0), t.set(n, this.leftOver.length);
                  } else t = this.leftOver.concat(t);
                  this.leftOver = null;
                }
                var i = f(t),
                  o = t;
                i !== t.length && (s.uint8array ? (o = t.subarray(0, i), this.leftOver = t.subarray(i, t.length)) : (o = t.slice(0, i), this.leftOver = t.slice(i, t.length))), this.push({
                  data: r.utf8decode(o),
                  meta: e.meta
                });
              }, n.prototype.flush = function () {
                this.leftOver && this.leftOver.length && (this.push({
                  data: r.utf8decode(this.leftOver),
                  meta: {}
                }), this.leftOver = null);
              }, r.Utf8DecodeWorker = n, a.inherits(i, u), i.prototype.processChunk = function (e) {
                this.push({
                  data: r.utf8encode(e.data),
                  meta: e.meta
                });
              }, r.Utf8EncodeWorker = i;
            }, {
              "./nodejsUtils": 14,
              "./stream/GenericWorker": 28,
              "./support": 30,
              "./utils": 32
            }],
            32: [function (e, t, r) {
              function n(e) {
                var t = null;
                return t = u.uint8array ? new Uint8Array(e.length) : new Array(e.length), a(e, t);
              }
              function i(e) {
                return e;
              }
              function a(e, t) {
                for (var r = 0; r < e.length; ++r) t[r] = 255 & e.charCodeAt(r);
                return t;
              }
              function s(e) {
                var t = 65536,
                  n = r.getTypeOf(e),
                  i = !0;
                if ("uint8array" === n ? i = d.applyCanBeUsed.uint8array : "nodebuffer" === n && (i = d.applyCanBeUsed.nodebuffer), i) for (; t > 1;) try {
                  return d.stringifyByChunk(e, n, t);
                } catch (a) {
                  t = Math.floor(t / 2);
                }
                return d.stringifyByChar(e);
              }
              function o(e, t) {
                for (var r = 0; r < e.length; r++) t[r] = e[r];
                return t;
              }
              var u = e("./support"),
                h = e("./base64"),
                l = e("./nodejsUtils"),
                c = e("core-js/library/fn/set-immediate"),
                f = e("./external");
              r.newBlob = function (e, t) {
                r.checkSupport("blob");
                try {
                  return new Blob([e], {
                    type: t
                  });
                } catch (n) {
                  try {
                    var i = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder,
                      a = new i();
                    return a.append(e), a.getBlob(t);
                  } catch (n) {
                    throw new Error("Bug : can't construct the Blob.");
                  }
                }
              };
              var d = {
                stringifyByChunk: function stringifyByChunk(e, t, r) {
                  var n = [],
                    i = 0,
                    a = e.length;
                  if (r >= a) return String.fromCharCode.apply(null, e);
                  for (; a > i;) "array" === t || "nodebuffer" === t ? n.push(String.fromCharCode.apply(null, e.slice(i, Math.min(i + r, a)))) : n.push(String.fromCharCode.apply(null, e.subarray(i, Math.min(i + r, a)))), i += r;
                  return n.join("");
                },
                stringifyByChar: function stringifyByChar(e) {
                  for (var t = "", r = 0; r < e.length; r++) t += String.fromCharCode(e[r]);
                  return t;
                },
                applyCanBeUsed: {
                  uint8array: function () {
                    try {
                      return u.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length;
                    } catch (e) {
                      return !1;
                    }
                  }(),
                  nodebuffer: function () {
                    try {
                      return u.nodebuffer && 1 === String.fromCharCode.apply(null, l.allocBuffer(1)).length;
                    } catch (e) {
                      return !1;
                    }
                  }()
                }
              };
              r.applyFromCharCode = s;
              var p = {};
              p.string = {
                string: i,
                array: function array(e) {
                  return a(e, new Array(e.length));
                },
                arraybuffer: function arraybuffer(e) {
                  return p.string.uint8array(e).buffer;
                },
                uint8array: function uint8array(e) {
                  return a(e, new Uint8Array(e.length));
                },
                nodebuffer: function nodebuffer(e) {
                  return a(e, l.allocBuffer(e.length));
                }
              }, p.array = {
                string: s,
                array: i,
                arraybuffer: function arraybuffer(e) {
                  return new Uint8Array(e).buffer;
                },
                uint8array: function uint8array(e) {
                  return new Uint8Array(e);
                },
                nodebuffer: function nodebuffer(e) {
                  return l.newBufferFrom(e);
                }
              }, p.arraybuffer = {
                string: function string(e) {
                  return s(new Uint8Array(e));
                },
                array: function array(e) {
                  return o(new Uint8Array(e), new Array(e.byteLength));
                },
                arraybuffer: i,
                uint8array: function uint8array(e) {
                  return new Uint8Array(e);
                },
                nodebuffer: function nodebuffer(e) {
                  return l.newBufferFrom(new Uint8Array(e));
                }
              }, p.uint8array = {
                string: s,
                array: function array(e) {
                  return o(e, new Array(e.length));
                },
                arraybuffer: function arraybuffer(e) {
                  return e.buffer;
                },
                uint8array: i,
                nodebuffer: function nodebuffer(e) {
                  return l.newBufferFrom(e);
                }
              }, p.nodebuffer = {
                string: s,
                array: function array(e) {
                  return o(e, new Array(e.length));
                },
                arraybuffer: function arraybuffer(e) {
                  return p.nodebuffer.uint8array(e).buffer;
                },
                uint8array: function uint8array(e) {
                  return o(e, new Uint8Array(e.length));
                },
                nodebuffer: i
              }, r.transformTo = function (e, t) {
                if (t || (t = ""), !e) return t;
                r.checkSupport(e);
                var n = r.getTypeOf(t),
                  i = p[n][e](t);
                return i;
              }, r.getTypeOf = function (e) {
                return "string" == typeof e ? "string" : "[object Array]" === Object.prototype.toString.call(e) ? "array" : u.nodebuffer && l.isBuffer(e) ? "nodebuffer" : u.uint8array && e instanceof Uint8Array ? "uint8array" : u.arraybuffer && e instanceof ArrayBuffer ? "arraybuffer" : void 0;
              }, r.checkSupport = function (e) {
                var t = u[e.toLowerCase()];
                if (!t) throw new Error(e + " is not supported by this platform");
              }, r.MAX_VALUE_16BITS = 65535, r.MAX_VALUE_32BITS = -1, r.pretty = function (e) {
                var t,
                  r,
                  n = "";
                for (r = 0; r < (e || "").length; r++) t = e.charCodeAt(r), n += "\\x" + (16 > t ? "0" : "") + t.toString(16).toUpperCase();
                return n;
              }, r.delay = function (e, t, r) {
                c(function () {
                  e.apply(r || null, t || []);
                });
              }, r.inherits = function (e, t) {
                var r = function r() {};
                r.prototype = t.prototype, e.prototype = new r();
              }, r.extend = function () {
                var e,
                  t,
                  r = {};
                for (e = 0; e < arguments.length; e++) for (t in arguments[e]) arguments[e].hasOwnProperty(t) && "undefined" == typeof r[t] && (r[t] = arguments[e][t]);
                return r;
              }, r.prepareContent = function (e, t, i, a, s) {
                var o = f.Promise.resolve(t).then(function (e) {
                  var t = u.blob && (e instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(e)));
                  return t && "undefined" != typeof FileReader ? new f.Promise(function (t, r) {
                    var n = new FileReader();
                    n.onload = function (e) {
                      t(e.target.result);
                    }, n.onerror = function (e) {
                      r(e.target.error);
                    }, n.readAsArrayBuffer(e);
                  }) : e;
                });
                return o.then(function (t) {
                  var o = r.getTypeOf(t);
                  return o ? ("arraybuffer" === o ? t = r.transformTo("uint8array", t) : "string" === o && (s ? t = h.decode(t) : i && a !== !0 && (t = n(t))), t) : f.Promise.reject(new Error("Can't read the data of '" + e + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
                });
              };
            }, {
              "./base64": 1,
              "./external": 6,
              "./nodejsUtils": 14,
              "./support": 30,
              "core-js/library/fn/set-immediate": 36
            }],
            33: [function (e, t, r) {
              function n(e) {
                this.files = [], this.loadOptions = e;
              }
              var i = e("./reader/readerFor"),
                a = e("./utils"),
                s = e("./signature"),
                o = e("./zipEntry"),
                u = (e("./utf8"), e("./support"));
              n.prototype = {
                checkSignature: function checkSignature(e) {
                  if (!this.reader.readAndCheckSignature(e)) {
                    this.reader.index -= 4;
                    var t = this.reader.readString(4);
                    throw new Error("Corrupted zip or bug: unexpected signature (" + a.pretty(t) + ", expected " + a.pretty(e) + ")");
                  }
                },
                isSignature: function isSignature(e, t) {
                  var r = this.reader.index;
                  this.reader.setIndex(e);
                  var n = this.reader.readString(4),
                    i = n === t;
                  return this.reader.setIndex(r), i;
                },
                readBlockEndOfCentral: function readBlockEndOfCentral() {
                  this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
                  var e = this.reader.readData(this.zipCommentLength),
                    t = u.uint8array ? "uint8array" : "array",
                    r = a.transformTo(t, e);
                  this.zipComment = this.loadOptions.decodeFileName(r);
                },
                readBlockZip64EndOfCentral: function readBlockZip64EndOfCentral() {
                  this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
                  for (var e, t, r, n = this.zip64EndOfCentralSize - 44, i = 0; n > i;) e = this.reader.readInt(2), t = this.reader.readInt(4), r = this.reader.readData(t), this.zip64ExtensibleData[e] = {
                    id: e,
                    length: t,
                    value: r
                  };
                },
                readBlockZip64EndOfCentralLocator: function readBlockZip64EndOfCentralLocator() {
                  if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), this.disksCount > 1) throw new Error("Multi-volumes zip are not supported");
                },
                readLocalFiles: function readLocalFiles() {
                  var e, t;
                  for (e = 0; e < this.files.length; e++) t = this.files[e], this.reader.setIndex(t.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), t.readLocalPart(this.reader), t.handleUTF8(), t.processAttributes();
                },
                readCentralDir: function readCentralDir() {
                  var e;
                  for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);) e = new o({
                    zip64: this.zip64
                  }, this.loadOptions), e.readCentralPart(this.reader), this.files.push(e);
                  if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && 0 === this.files.length) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
                },
                readEndOfCentral: function readEndOfCentral() {
                  var e = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
                  if (0 > e) {
                    var t = !this.isSignature(0, s.LOCAL_FILE_HEADER);
                    throw t ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory");
                  }
                  this.reader.setIndex(e);
                  var r = e;
                  if (this.checkSignature(s.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === a.MAX_VALUE_16BITS || this.diskWithCentralDirStart === a.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === a.MAX_VALUE_16BITS || this.centralDirRecords === a.MAX_VALUE_16BITS || this.centralDirSize === a.MAX_VALUE_32BITS || this.centralDirOffset === a.MAX_VALUE_32BITS) {
                    if (this.zip64 = !0, e = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), 0 > e) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
                    if (this.reader.setIndex(e), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
                    this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
                  }
                  var n = this.centralDirOffset + this.centralDirSize;
                  this.zip64 && (n += 20, n += 12 + this.zip64EndOfCentralSize);
                  var i = r - n;
                  if (i > 0) this.isSignature(r, s.CENTRAL_FILE_HEADER) || (this.reader.zero = i);else if (0 > i) throw new Error("Corrupted zip: missing " + Math.abs(i) + " bytes.");
                },
                prepareReader: function prepareReader(e) {
                  this.reader = i(e);
                },
                load: function load(e) {
                  this.prepareReader(e), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
                }
              }, t.exports = n;
            }, {
              "./reader/readerFor": 22,
              "./signature": 23,
              "./support": 30,
              "./utf8": 31,
              "./utils": 32,
              "./zipEntry": 34
            }],
            34: [function (e, t, r) {
              function n(e, t) {
                this.options = e, this.loadOptions = t;
              }
              var i = e("./reader/readerFor"),
                a = e("./utils"),
                s = e("./compressedObject"),
                o = e("./crc32"),
                u = e("./utf8"),
                h = e("./compressions"),
                l = e("./support"),
                c = 0,
                f = 3,
                d = function d(e) {
                  for (var t in h) if (h.hasOwnProperty(t) && h[t].magic === e) return h[t];
                  return null;
                };
              n.prototype = {
                isEncrypted: function isEncrypted() {
                  return 1 === (1 & this.bitFlag);
                },
                useUTF8: function useUTF8() {
                  return 2048 === (2048 & this.bitFlag);
                },
                readLocalPart: function readLocalPart(e) {
                  var t, r;
                  if (e.skip(22), this.fileNameLength = e.readInt(2), r = e.readInt(2), this.fileName = e.readData(this.fileNameLength), e.skip(r), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");
                  if (t = d(this.compressionMethod), null === t) throw new Error("Corrupted zip : compression " + a.pretty(this.compressionMethod) + " unknown (inner file : " + a.transformTo("string", this.fileName) + ")");
                  this.decompressed = new s(this.compressedSize, this.uncompressedSize, this.crc32, t, e.readData(this.compressedSize));
                },
                readCentralPart: function readCentralPart(e) {
                  this.versionMadeBy = e.readInt(2), e.skip(2), this.bitFlag = e.readInt(2), this.compressionMethod = e.readString(2), this.date = e.readDate(), this.crc32 = e.readInt(4), this.compressedSize = e.readInt(4), this.uncompressedSize = e.readInt(4);
                  var t = e.readInt(2);
                  if (this.extraFieldsLength = e.readInt(2), this.fileCommentLength = e.readInt(2), this.diskNumberStart = e.readInt(2), this.internalFileAttributes = e.readInt(2), this.externalFileAttributes = e.readInt(4), this.localHeaderOffset = e.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
                  e.skip(t), this.readExtraFields(e), this.parseZIP64ExtraField(e), this.fileComment = e.readData(this.fileCommentLength);
                },
                processAttributes: function processAttributes() {
                  this.unixPermissions = null, this.dosPermissions = null;
                  var e = this.versionMadeBy >> 8;
                  this.dir = 16 & this.externalFileAttributes ? !0 : !1, e === c && (this.dosPermissions = 63 & this.externalFileAttributes), e === f && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = !0);
                },
                parseZIP64ExtraField: function parseZIP64ExtraField(e) {
                  if (this.extraFields[1]) {
                    var t = i(this.extraFields[1].value);
                    this.uncompressedSize === a.MAX_VALUE_32BITS && (this.uncompressedSize = t.readInt(8)), this.compressedSize === a.MAX_VALUE_32BITS && (this.compressedSize = t.readInt(8)), this.localHeaderOffset === a.MAX_VALUE_32BITS && (this.localHeaderOffset = t.readInt(8)), this.diskNumberStart === a.MAX_VALUE_32BITS && (this.diskNumberStart = t.readInt(4));
                  }
                },
                readExtraFields: function readExtraFields(e) {
                  var t,
                    r,
                    n,
                    i = e.index + this.extraFieldsLength;
                  for (this.extraFields || (this.extraFields = {}); e.index < i;) t = e.readInt(2), r = e.readInt(2), n = e.readData(r), this.extraFields[t] = {
                    id: t,
                    length: r,
                    value: n
                  };
                },
                handleUTF8: function handleUTF8() {
                  var e = l.uint8array ? "uint8array" : "array";
                  if (this.useUTF8()) this.fileNameStr = u.utf8decode(this.fileName), this.fileCommentStr = u.utf8decode(this.fileComment);else {
                    var t = this.findExtraFieldUnicodePath();
                    if (null !== t) this.fileNameStr = t;else {
                      var r = a.transformTo(e, this.fileName);
                      this.fileNameStr = this.loadOptions.decodeFileName(r);
                    }
                    var n = this.findExtraFieldUnicodeComment();
                    if (null !== n) this.fileCommentStr = n;else {
                      var i = a.transformTo(e, this.fileComment);
                      this.fileCommentStr = this.loadOptions.decodeFileName(i);
                    }
                  }
                },
                findExtraFieldUnicodePath: function findExtraFieldUnicodePath() {
                  var e = this.extraFields[28789];
                  if (e) {
                    var t = i(e.value);
                    return 1 !== t.readInt(1) ? null : o(this.fileName) !== t.readInt(4) ? null : u.utf8decode(t.readData(e.length - 5));
                  }
                  return null;
                },
                findExtraFieldUnicodeComment: function findExtraFieldUnicodeComment() {
                  var e = this.extraFields[25461];
                  if (e) {
                    var t = i(e.value);
                    return 1 !== t.readInt(1) ? null : o(this.fileComment) !== t.readInt(4) ? null : u.utf8decode(t.readData(e.length - 5));
                  }
                  return null;
                }
              }, t.exports = n;
            }, {
              "./compressedObject": 2,
              "./compressions": 3,
              "./crc32": 4,
              "./reader/readerFor": 22,
              "./support": 30,
              "./utf8": 31,
              "./utils": 32
            }],
            35: [function (e, t, r) {
              var n = e("./stream/StreamHelper"),
                i = e("./stream/DataWorker"),
                a = e("./utf8"),
                s = e("./compressedObject"),
                o = e("./stream/GenericWorker"),
                u = function u(e, t, r) {
                  this.name = e, this.dir = r.dir, this.date = r.date, this.comment = r.comment, this.unixPermissions = r.unixPermissions, this.dosPermissions = r.dosPermissions, this._data = t, this._dataBinary = r.binary, this.options = {
                    compression: r.compression,
                    compressionOptions: r.compressionOptions
                  };
                };
              u.prototype = {
                internalStream: function internalStream(e) {
                  var t = null,
                    r = "string";
                  try {
                    if (!e) throw new Error("No output type specified.");
                    r = e.toLowerCase();
                    var i = "string" === r || "text" === r;
                    ("binarystring" === r || "text" === r) && (r = "string"), t = this._decompressWorker();
                    var s = !this._dataBinary;
                    s && !i && (t = t.pipe(new a.Utf8EncodeWorker())), !s && i && (t = t.pipe(new a.Utf8DecodeWorker()));
                  } catch (u) {
                    t = new o("error"), t.error(u);
                  }
                  return new n(t, r, "");
                },
                async: function async(e, t) {
                  return this.internalStream(e).accumulate(t);
                },
                nodeStream: function nodeStream(e, t) {
                  return this.internalStream(e || "nodebuffer").toNodejsStream(t);
                },
                _compressWorker: function _compressWorker(e, t) {
                  if (this._data instanceof s && this._data.compression.magic === e.magic) return this._data.getCompressedWorker();
                  var r = this._decompressWorker();
                  return this._dataBinary || (r = r.pipe(new a.Utf8EncodeWorker())), s.createWorkerFrom(r, e, t);
                },
                _decompressWorker: function _decompressWorker() {
                  return this._data instanceof s ? this._data.getContentWorker() : this._data instanceof o ? this._data : new i(this._data);
                }
              };
              for (var h = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], l = function l() {
                  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
                }, c = 0; c < h.length; c++) u.prototype[h[c]] = l;
              t.exports = u;
            }, {
              "./compressedObject": 2,
              "./stream/DataWorker": 27,
              "./stream/GenericWorker": 28,
              "./stream/StreamHelper": 29,
              "./utf8": 31
            }],
            36: [function (e, t, r) {
              e("../modules/web.immediate"), t.exports = e("../modules/_core").setImmediate;
            }, {
              "../modules/_core": 40,
              "../modules/web.immediate": 56
            }],
            37: [function (e, t, r) {
              t.exports = function (e) {
                if ("function" != typeof e) throw TypeError(e + " is not a function!");
                return e;
              };
            }, {}],
            38: [function (e, t, r) {
              var n = e("./_is-object");
              t.exports = function (e) {
                if (!n(e)) throw TypeError(e + " is not an object!");
                return e;
              };
            }, {
              "./_is-object": 51
            }],
            39: [function (e, t, r) {
              var n = {}.toString;
              t.exports = function (e) {
                return n.call(e).slice(8, -1);
              };
            }, {}],
            40: [function (e, t, r) {
              var n = t.exports = {
                version: "2.3.0"
              };
              "number" == typeof __e && (__e = n);
            }, {}],
            41: [function (e, t, r) {
              var n = e("./_a-function");
              t.exports = function (e, t, r) {
                if (n(e), void 0 === t) return e;
                switch (r) {
                  case 1:
                    return function (r) {
                      return e.call(t, r);
                    };
                  case 2:
                    return function (r, n) {
                      return e.call(t, r, n);
                    };
                  case 3:
                    return function (r, n, i) {
                      return e.call(t, r, n, i);
                    };
                }
                return function () {
                  return e.apply(t, arguments);
                };
              };
            }, {
              "./_a-function": 37
            }],
            42: [function (e, t, r) {
              t.exports = !e("./_fails")(function () {
                return 7 != Object.defineProperty({}, "a", {
                  get: function get() {
                    return 7;
                  }
                }).a;
              });
            }, {
              "./_fails": 45
            }],
            43: [function (e, t, r) {
              var n = e("./_is-object"),
                i = e("./_global").document,
                a = n(i) && n(i.createElement);
              t.exports = function (e) {
                return a ? i.createElement(e) : {};
              };
            }, {
              "./_global": 46,
              "./_is-object": 51
            }],
            44: [function (e, t, r) {
              var n = e("./_global"),
                i = e("./_core"),
                a = e("./_ctx"),
                s = e("./_hide"),
                o = "prototype",
                u = function u(e, t, r) {
                  var h,
                    l,
                    c,
                    f = e & u.F,
                    d = e & u.G,
                    p = e & u.S,
                    m = e & u.P,
                    _ = e & u.B,
                    g = e & u.W,
                    v = d ? i : i[t] || (i[t] = {}),
                    b = v[o],
                    w = d ? n : p ? n[t] : (n[t] || {})[o];
                  d && (r = t);
                  for (h in r) l = !f && w && void 0 !== w[h], l && h in v || (c = l ? w[h] : r[h], v[h] = d && "function" != typeof w[h] ? r[h] : _ && l ? a(c, n) : g && w[h] == c ? function (e) {
                    var t = function t(_t2, r, n) {
                      if (this instanceof e) {
                        switch (arguments.length) {
                          case 0:
                            return new e();
                          case 1:
                            return new e(_t2);
                          case 2:
                            return new e(_t2, r);
                        }
                        return new e(_t2, r, n);
                      }
                      return e.apply(this, arguments);
                    };
                    return t[o] = e[o], t;
                  }(c) : m && "function" == typeof c ? a(Function.call, c) : c, m && ((v.virtual || (v.virtual = {}))[h] = c, e & u.R && b && !b[h] && s(b, h, c)));
                };
              u.F = 1, u.G = 2, u.S = 4, u.P = 8, u.B = 16, u.W = 32, u.U = 64, u.R = 128, t.exports = u;
            }, {
              "./_core": 40,
              "./_ctx": 41,
              "./_global": 46,
              "./_hide": 47
            }],
            45: [function (e, t, r) {
              t.exports = function (e) {
                try {
                  return !!e();
                } catch (t) {
                  return !0;
                }
              };
            }, {}],
            46: [function (e, t, r) {
              var n = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
              "number" == typeof __g && (__g = n);
            }, {}],
            47: [function (e, t, r) {
              var n = e("./_object-dp"),
                i = e("./_property-desc");
              t.exports = e("./_descriptors") ? function (e, t, r) {
                return n.f(e, t, i(1, r));
              } : function (e, t, r) {
                return e[t] = r, e;
              };
            }, {
              "./_descriptors": 42,
              "./_object-dp": 52,
              "./_property-desc": 53
            }],
            48: [function (e, t, r) {
              t.exports = e("./_global").document && document.documentElement;
            }, {
              "./_global": 46
            }],
            49: [function (e, t, r) {
              t.exports = !e("./_descriptors") && !e("./_fails")(function () {
                return 7 != Object.defineProperty(e("./_dom-create")("div"), "a", {
                  get: function get() {
                    return 7;
                  }
                }).a;
              });
            }, {
              "./_descriptors": 42,
              "./_dom-create": 43,
              "./_fails": 45
            }],
            50: [function (e, t, r) {
              t.exports = function (e, t, r) {
                var n = void 0 === r;
                switch (t.length) {
                  case 0:
                    return n ? e() : e.call(r);
                  case 1:
                    return n ? e(t[0]) : e.call(r, t[0]);
                  case 2:
                    return n ? e(t[0], t[1]) : e.call(r, t[0], t[1]);
                  case 3:
                    return n ? e(t[0], t[1], t[2]) : e.call(r, t[0], t[1], t[2]);
                  case 4:
                    return n ? e(t[0], t[1], t[2], t[3]) : e.call(r, t[0], t[1], t[2], t[3]);
                }
                return e.apply(r, t);
              };
            }, {}],
            51: [function (e, t, r) {
              t.exports = function (e) {
                return "object" == typeof e ? null !== e : "function" == typeof e;
              };
            }, {}],
            52: [function (e, t, r) {
              var n = e("./_an-object"),
                i = e("./_ie8-dom-define"),
                a = e("./_to-primitive"),
                s = Object.defineProperty;
              r.f = e("./_descriptors") ? Object.defineProperty : function (e, t, r) {
                if (n(e), t = a(t, !0), n(r), i) try {
                  return s(e, t, r);
                } catch (o) {}
                if ("get" in r || "set" in r) throw TypeError("Accessors not supported!");
                return "value" in r && (e[t] = r.value), e;
              };
            }, {
              "./_an-object": 38,
              "./_descriptors": 42,
              "./_ie8-dom-define": 49,
              "./_to-primitive": 55
            }],
            53: [function (e, t, r) {
              t.exports = function (e, t) {
                return {
                  enumerable: !(1 & e),
                  configurable: !(2 & e),
                  writable: !(4 & e),
                  value: t
                };
              };
            }, {}],
            54: [function (e, t, r) {
              var n,
                i,
                a,
                s = e("./_ctx"),
                o = e("./_invoke"),
                u = e("./_html"),
                h = e("./_dom-create"),
                l = e("./_global"),
                c = l.process,
                f = l.setImmediate,
                d = l.clearImmediate,
                p = l.MessageChannel,
                m = 0,
                _ = {},
                g = "onreadystatechange",
                v = function v() {
                  var e = +this;
                  if (_.hasOwnProperty(e)) {
                    var t = _[e];
                    delete _[e], t();
                  }
                },
                b = function b(e) {
                  v.call(e.data);
                };
              f && d || (f = function f(e) {
                for (var t = [], r = 1; arguments.length > r;) t.push(arguments[r++]);
                return _[++m] = function () {
                  o("function" == typeof e ? e : Function(e), t);
                }, n(m), m;
              }, d = function d(e) {
                delete _[e];
              }, "process" == e("./_cof")(c) ? n = function n(e) {
                c.nextTick(s(v, e, 1));
              } : p ? (i = new p(), a = i.port2, i.port1.onmessage = b, n = s(a.postMessage, a, 1)) : l.addEventListener && "function" == typeof postMessage && !l.importScripts ? (n = function n(e) {
                l.postMessage(e + "", "*");
              }, l.addEventListener("message", b, !1)) : n = g in h("script") ? function (e) {
                u.appendChild(h("script"))[g] = function () {
                  u.removeChild(this), v.call(e);
                };
              } : function (e) {
                setTimeout(s(v, e, 1), 0);
              }), t.exports = {
                set: f,
                clear: d
              };
            }, {
              "./_cof": 39,
              "./_ctx": 41,
              "./_dom-create": 43,
              "./_global": 46,
              "./_html": 48,
              "./_invoke": 50
            }],
            55: [function (e, t, r) {
              var n = e("./_is-object");
              t.exports = function (e, t) {
                if (!n(e)) return e;
                var r, i;
                if (t && "function" == typeof (r = e.toString) && !n(i = r.call(e))) return i;
                if ("function" == typeof (r = e.valueOf) && !n(i = r.call(e))) return i;
                if (!t && "function" == typeof (r = e.toString) && !n(i = r.call(e))) return i;
                throw TypeError("Can't convert object to primitive value");
              };
            }, {
              "./_is-object": 51
            }],
            56: [function (e, t, r) {
              var n = e("./_export"),
                i = e("./_task");
              n(n.G + n.B, {
                setImmediate: i.set,
                clearImmediate: i.clear
              });
            }, {
              "./_export": 44,
              "./_task": 54
            }],
            57: [function (e, t, r) {
              (function (e) {
                function r() {
                  l = !0;
                  for (var e, t, r = c.length; r;) {
                    for (t = c, c = [], e = -1; ++e < r;) t[e]();
                    r = c.length;
                  }
                  l = !1;
                }
                function n(e) {
                  1 !== c.push(e) || l || i();
                }
                var i,
                  a = e.MutationObserver || e.WebKitMutationObserver;
                if (a) {
                  var s = 0,
                    o = new a(r),
                    u = e.document.createTextNode("");
                  o.observe(u, {
                    characterData: !0
                  }), i = function i() {
                    u.data = s = ++s % 2;
                  };
                } else if (e.setImmediate || "undefined" == typeof e.MessageChannel) i = "document" in e && "onreadystatechange" in e.document.createElement("script") ? function () {
                  var t = e.document.createElement("script");
                  t.onreadystatechange = function () {
                    r(), t.onreadystatechange = null, t.parentNode.removeChild(t), t = null;
                  }, e.document.documentElement.appendChild(t);
                } : function () {
                  setTimeout(r, 0);
                };else {
                  var h = new e.MessageChannel();
                  h.port1.onmessage = r, i = function i() {
                    h.port2.postMessage(0);
                  };
                }
                var l,
                  c = [];
                t.exports = n;
              }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
            }, {}],
            58: [function (e, t, r) {
              function n() {}
              function i(e) {
                if ("function" != typeof e) throw new TypeError("resolver must be a function");
                this.state = v, this.queue = [], this.outcome = void 0, e !== n && u(this, e);
              }
              function a(e, t, r) {
                this.promise = e, "function" == typeof t && (this.onFulfilled = t, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r && (this.onRejected = r, this.callRejected = this.otherCallRejected);
              }
              function s(e, t, r) {
                p(function () {
                  var n;
                  try {
                    n = t(r);
                  } catch (i) {
                    return m.reject(e, i);
                  }
                  n === e ? m.reject(e, new TypeError("Cannot resolve promise with itself")) : m.resolve(e, n);
                });
              }
              function o(e) {
                var t = e && e.then;
                return !e || "object" != typeof e && "function" != typeof e || "function" != typeof t ? void 0 : function () {
                  t.apply(e, arguments);
                };
              }
              function u(e, t) {
                function r(t) {
                  a || (a = !0, m.reject(e, t));
                }
                function n(t) {
                  a || (a = !0, m.resolve(e, t));
                }
                function i() {
                  t(n, r);
                }
                var a = !1,
                  s = h(i);
                "error" === s.status && r(s.value);
              }
              function h(e, t) {
                var r = {};
                try {
                  r.value = e(t), r.status = "success";
                } catch (n) {
                  r.status = "error", r.value = n;
                }
                return r;
              }
              function l(e) {
                return e instanceof this ? e : m.resolve(new this(n), e);
              }
              function c(e) {
                var t = new this(n);
                return m.reject(t, e);
              }
              function f(e) {
                function t(e, t) {
                  function n(e) {
                    s[t] = e, ++o !== i || a || (a = !0, m.resolve(h, s));
                  }
                  r.resolve(e).then(n, function (e) {
                    a || (a = !0, m.reject(h, e));
                  });
                }
                var r = this;
                if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
                var i = e.length,
                  a = !1;
                if (!i) return this.resolve([]);
                for (var s = new Array(i), o = 0, u = -1, h = new this(n); ++u < i;) t(e[u], u);
                return h;
              }
              function d(e) {
                function t(e) {
                  r.resolve(e).then(function (e) {
                    a || (a = !0, m.resolve(o, e));
                  }, function (e) {
                    a || (a = !0, m.reject(o, e));
                  });
                }
                var r = this;
                if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
                var i = e.length,
                  a = !1;
                if (!i) return this.resolve([]);
                for (var s = -1, o = new this(n); ++s < i;) t(e[s]);
                return o;
              }
              var p = e("immediate"),
                m = {},
                _ = ["REJECTED"],
                g = ["FULFILLED"],
                v = ["PENDING"];
              t.exports = i, i.prototype["catch"] = function (e) {
                return this.then(null, e);
              }, i.prototype.then = function (e, t) {
                if ("function" != typeof e && this.state === g || "function" != typeof t && this.state === _) return this;
                var r = new this.constructor(n);
                if (this.state !== v) {
                  var i = this.state === g ? e : t;
                  s(r, i, this.outcome);
                } else this.queue.push(new a(r, e, t));
                return r;
              }, a.prototype.callFulfilled = function (e) {
                m.resolve(this.promise, e);
              }, a.prototype.otherCallFulfilled = function (e) {
                s(this.promise, this.onFulfilled, e);
              }, a.prototype.callRejected = function (e) {
                m.reject(this.promise, e);
              }, a.prototype.otherCallRejected = function (e) {
                s(this.promise, this.onRejected, e);
              }, m.resolve = function (e, t) {
                var r = h(o, t);
                if ("error" === r.status) return m.reject(e, r.value);
                var n = r.value;
                if (n) u(e, n);else {
                  e.state = g, e.outcome = t;
                  for (var i = -1, a = e.queue.length; ++i < a;) e.queue[i].callFulfilled(t);
                }
                return e;
              }, m.reject = function (e, t) {
                e.state = _, e.outcome = t;
                for (var r = -1, n = e.queue.length; ++r < n;) e.queue[r].callRejected(t);
                return e;
              }, i.resolve = l, i.reject = c, i.all = f, i.race = d;
            }, {
              immediate: 57
            }],
            59: [function (e, t, r) {
              var n = e("./lib/utils/common").assign,
                i = e("./lib/deflate"),
                a = e("./lib/inflate"),
                s = e("./lib/zlib/constants"),
                o = {};
              n(o, i, a, s), t.exports = o;
            }, {
              "./lib/deflate": 60,
              "./lib/inflate": 61,
              "./lib/utils/common": 62,
              "./lib/zlib/constants": 65
            }],
            60: [function (e, t, r) {
              function n(e) {
                if (!(this instanceof n)) return new n(e);
                this.options = u.assign({
                  level: v,
                  method: w,
                  chunkSize: 16384,
                  windowBits: 15,
                  memLevel: 8,
                  strategy: b,
                  to: ""
                }, e || {});
                var t = this.options;
                t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new c(), this.strm.avail_out = 0;
                var r = o.deflateInit2(this.strm, t.level, t.method, t.windowBits, t.memLevel, t.strategy);
                if (r !== m) throw new Error(l[r]);
                if (t.header && o.deflateSetHeader(this.strm, t.header), t.dictionary) {
                  var i;
                  if (i = "string" == typeof t.dictionary ? h.string2buf(t.dictionary) : "[object ArrayBuffer]" === f.call(t.dictionary) ? new Uint8Array(t.dictionary) : t.dictionary, r = o.deflateSetDictionary(this.strm, i), r !== m) throw new Error(l[r]);
                  this._dict_set = !0;
                }
              }
              function i(e, t) {
                var r = new n(t);
                if (r.push(e, !0), r.err) throw r.msg || l[r.err];
                return r.result;
              }
              function a(e, t) {
                return t = t || {}, t.raw = !0, i(e, t);
              }
              function s(e, t) {
                return t = t || {}, t.gzip = !0, i(e, t);
              }
              var o = e("./zlib/deflate"),
                u = e("./utils/common"),
                h = e("./utils/strings"),
                l = e("./zlib/messages"),
                c = e("./zlib/zstream"),
                f = Object.prototype.toString,
                d = 0,
                p = 4,
                m = 0,
                _ = 1,
                g = 2,
                v = -1,
                b = 0,
                w = 8;
              n.prototype.push = function (e, t) {
                var r,
                  n,
                  i = this.strm,
                  a = this.options.chunkSize;
                if (this.ended) return !1;
                n = t === ~~t ? t : t === !0 ? p : d, "string" == typeof e ? i.input = h.string2buf(e) : "[object ArrayBuffer]" === f.call(e) ? i.input = new Uint8Array(e) : i.input = e, i.next_in = 0, i.avail_in = i.input.length;
                do {
                  if (0 === i.avail_out && (i.output = new u.Buf8(a), i.next_out = 0, i.avail_out = a), r = o.deflate(i, n), r !== _ && r !== m) return this.onEnd(r), this.ended = !0, !1;
                  (0 === i.avail_out || 0 === i.avail_in && (n === p || n === g)) && ("string" === this.options.to ? this.onData(h.buf2binstring(u.shrinkBuf(i.output, i.next_out))) : this.onData(u.shrinkBuf(i.output, i.next_out)));
                } while ((i.avail_in > 0 || 0 === i.avail_out) && r !== _);
                return n === p ? (r = o.deflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === m) : n === g ? (this.onEnd(m), i.avail_out = 0, !0) : !0;
              }, n.prototype.onData = function (e) {
                this.chunks.push(e);
              }, n.prototype.onEnd = function (e) {
                e === m && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = u.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
              }, r.Deflate = n, r.deflate = i, r.deflateRaw = a, r.gzip = s;
            }, {
              "./utils/common": 62,
              "./utils/strings": 63,
              "./zlib/deflate": 67,
              "./zlib/messages": 72,
              "./zlib/zstream": 74
            }],
            61: [function (e, t, r) {
              function n(e) {
                if (!(this instanceof n)) return new n(e);
                this.options = o.assign({
                  chunkSize: 16384,
                  windowBits: 0,
                  to: ""
                }, e || {});
                var t = this.options;
                t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(t.windowBits >= 0 && t.windowBits < 16) || e && e.windowBits || (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && 0 === (15 & t.windowBits) && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new c(), this.strm.avail_out = 0;
                var r = s.inflateInit2(this.strm, t.windowBits);
                if (r !== h.Z_OK) throw new Error(l[r]);
                this.header = new f(), s.inflateGetHeader(this.strm, this.header);
              }
              function i(e, t) {
                var r = new n(t);
                if (r.push(e, !0), r.err) throw r.msg || l[r.err];
                return r.result;
              }
              function a(e, t) {
                return t = t || {}, t.raw = !0, i(e, t);
              }
              var s = e("./zlib/inflate"),
                o = e("./utils/common"),
                u = e("./utils/strings"),
                h = e("./zlib/constants"),
                l = e("./zlib/messages"),
                c = e("./zlib/zstream"),
                f = e("./zlib/gzheader"),
                d = Object.prototype.toString;
              n.prototype.push = function (e, t) {
                var r,
                  n,
                  i,
                  a,
                  l,
                  c,
                  f = this.strm,
                  p = this.options.chunkSize,
                  m = this.options.dictionary,
                  _ = !1;
                if (this.ended) return !1;
                n = t === ~~t ? t : t === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, "string" == typeof e ? f.input = u.binstring2buf(e) : "[object ArrayBuffer]" === d.call(e) ? f.input = new Uint8Array(e) : f.input = e, f.next_in = 0, f.avail_in = f.input.length;
                do {
                  if (0 === f.avail_out && (f.output = new o.Buf8(p), f.next_out = 0, f.avail_out = p), r = s.inflate(f, h.Z_NO_FLUSH), r === h.Z_NEED_DICT && m && (c = "string" == typeof m ? u.string2buf(m) : "[object ArrayBuffer]" === d.call(m) ? new Uint8Array(m) : m, r = s.inflateSetDictionary(this.strm, c)), r === h.Z_BUF_ERROR && _ === !0 && (r = h.Z_OK, _ = !1), r !== h.Z_STREAM_END && r !== h.Z_OK) return this.onEnd(r), this.ended = !0, !1;
                  f.next_out && (0 === f.avail_out || r === h.Z_STREAM_END || 0 === f.avail_in && (n === h.Z_FINISH || n === h.Z_SYNC_FLUSH)) && ("string" === this.options.to ? (i = u.utf8border(f.output, f.next_out), a = f.next_out - i, l = u.buf2string(f.output, i), f.next_out = a, f.avail_out = p - a, a && o.arraySet(f.output, f.output, i, a, 0), this.onData(l)) : this.onData(o.shrinkBuf(f.output, f.next_out))), 0 === f.avail_in && 0 === f.avail_out && (_ = !0);
                } while ((f.avail_in > 0 || 0 === f.avail_out) && r !== h.Z_STREAM_END);
                return r === h.Z_STREAM_END && (n = h.Z_FINISH), n === h.Z_FINISH ? (r = s.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === h.Z_OK) : n === h.Z_SYNC_FLUSH ? (this.onEnd(h.Z_OK), f.avail_out = 0, !0) : !0;
              }, n.prototype.onData = function (e) {
                this.chunks.push(e);
              }, n.prototype.onEnd = function (e) {
                e === h.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
              }, r.Inflate = n, r.inflate = i, r.inflateRaw = a, r.ungzip = i;
            }, {
              "./utils/common": 62,
              "./utils/strings": 63,
              "./zlib/constants": 65,
              "./zlib/gzheader": 68,
              "./zlib/inflate": 70,
              "./zlib/messages": 72,
              "./zlib/zstream": 74
            }],
            62: [function (e, t, r) {
              var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
              r.assign = function (e) {
                for (var t = Array.prototype.slice.call(arguments, 1); t.length;) {
                  var r = t.shift();
                  if (r) {
                    if ("object" != typeof r) throw new TypeError(r + "must be non-object");
                    for (var n in r) r.hasOwnProperty(n) && (e[n] = r[n]);
                  }
                }
                return e;
              }, r.shrinkBuf = function (e, t) {
                return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e);
              };
              var i = {
                  arraySet: function arraySet(e, t, r, n, i) {
                    if (t.subarray && e.subarray) return void e.set(t.subarray(r, r + n), i);
                    for (var a = 0; n > a; a++) e[i + a] = t[r + a];
                  },
                  flattenChunks: function flattenChunks(e) {
                    var t, r, n, i, a, s;
                    for (n = 0, t = 0, r = e.length; r > t; t++) n += e[t].length;
                    for (s = new Uint8Array(n), i = 0, t = 0, r = e.length; r > t; t++) a = e[t], s.set(a, i), i += a.length;
                    return s;
                  }
                },
                a = {
                  arraySet: function arraySet(e, t, r, n, i) {
                    for (var a = 0; n > a; a++) e[i + a] = t[r + a];
                  },
                  flattenChunks: function flattenChunks(e) {
                    return [].concat.apply([], e);
                  }
                };
              r.setTyped = function (e) {
                e ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, i)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, a));
              }, r.setTyped(n);
            }, {}],
            63: [function (e, t, r) {
              function n(e, t) {
                if (65537 > t && (e.subarray && s || !e.subarray && a)) return String.fromCharCode.apply(null, i.shrinkBuf(e, t));
                for (var r = "", n = 0; t > n; n++) r += String.fromCharCode(e[n]);
                return r;
              }
              var i = e("./common"),
                a = !0,
                s = !0;
              try {
                String.fromCharCode.apply(null, [0]);
              } catch (o) {
                a = !1;
              }
              try {
                String.fromCharCode.apply(null, new Uint8Array(1));
              } catch (o) {
                s = !1;
              }
              for (var u = new i.Buf8(256), h = 0; 256 > h; h++) u[h] = h >= 252 ? 6 : h >= 248 ? 5 : h >= 240 ? 4 : h >= 224 ? 3 : h >= 192 ? 2 : 1;
              u[254] = u[254] = 1, r.string2buf = function (e) {
                var t,
                  r,
                  n,
                  a,
                  s,
                  o = e.length,
                  u = 0;
                for (a = 0; o > a; a++) r = e.charCodeAt(a), 55296 === (64512 & r) && o > a + 1 && (n = e.charCodeAt(a + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), a++)), u += 128 > r ? 1 : 2048 > r ? 2 : 65536 > r ? 3 : 4;
                for (t = new i.Buf8(u), s = 0, a = 0; u > s; a++) r = e.charCodeAt(a), 55296 === (64512 & r) && o > a + 1 && (n = e.charCodeAt(a + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), a++)), 128 > r ? t[s++] = r : 2048 > r ? (t[s++] = 192 | r >>> 6, t[s++] = 128 | 63 & r) : 65536 > r ? (t[s++] = 224 | r >>> 12, t[s++] = 128 | r >>> 6 & 63, t[s++] = 128 | 63 & r) : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63, t[s++] = 128 | r >>> 6 & 63, t[s++] = 128 | 63 & r);
                return t;
              }, r.buf2binstring = function (e) {
                return n(e, e.length);
              }, r.binstring2buf = function (e) {
                for (var t = new i.Buf8(e.length), r = 0, n = t.length; n > r; r++) t[r] = e.charCodeAt(r);
                return t;
              }, r.buf2string = function (e, t) {
                var r,
                  i,
                  a,
                  s,
                  o = t || e.length,
                  h = new Array(2 * o);
                for (i = 0, r = 0; o > r;) if (a = e[r++], 128 > a) h[i++] = a;else if (s = u[a], s > 4) h[i++] = 65533, r += s - 1;else {
                  for (a &= 2 === s ? 31 : 3 === s ? 15 : 7; s > 1 && o > r;) a = a << 6 | 63 & e[r++], s--;
                  s > 1 ? h[i++] = 65533 : 65536 > a ? h[i++] = a : (a -= 65536, h[i++] = 55296 | a >> 10 & 1023, h[i++] = 56320 | 1023 & a);
                }
                return n(h, i);
              }, r.utf8border = function (e, t) {
                var r;
                for (t = t || e.length, t > e.length && (t = e.length), r = t - 1; r >= 0 && 128 === (192 & e[r]);) r--;
                return 0 > r ? t : 0 === r ? t : r + u[e[r]] > t ? r : t;
              };
            }, {
              "./common": 62
            }],
            64: [function (e, t, r) {
              function n(e, t, r, n) {
                for (var i = 65535 & e | 0, a = e >>> 16 & 65535 | 0, s = 0; 0 !== r;) {
                  s = r > 2e3 ? 2e3 : r, r -= s;
                  do i = i + t[n++] | 0, a = a + i | 0; while (--s);
                  i %= 65521, a %= 65521;
                }
                return i | a << 16 | 0;
              }
              t.exports = n;
            }, {}],
            65: [function (e, t, r) {
              t.exports = {
                Z_NO_FLUSH: 0,
                Z_PARTIAL_FLUSH: 1,
                Z_SYNC_FLUSH: 2,
                Z_FULL_FLUSH: 3,
                Z_FINISH: 4,
                Z_BLOCK: 5,
                Z_TREES: 6,
                Z_OK: 0,
                Z_STREAM_END: 1,
                Z_NEED_DICT: 2,
                Z_ERRNO: -1,
                Z_STREAM_ERROR: -2,
                Z_DATA_ERROR: -3,
                Z_BUF_ERROR: -5,
                Z_NO_COMPRESSION: 0,
                Z_BEST_SPEED: 1,
                Z_BEST_COMPRESSION: 9,
                Z_DEFAULT_COMPRESSION: -1,
                Z_FILTERED: 1,
                Z_HUFFMAN_ONLY: 2,
                Z_RLE: 3,
                Z_FIXED: 4,
                Z_DEFAULT_STRATEGY: 0,
                Z_BINARY: 0,
                Z_TEXT: 1,
                Z_UNKNOWN: 2,
                Z_DEFLATED: 8
              };
            }, {}],
            66: [function (e, t, r) {
              function n() {
                for (var e, t = [], r = 0; 256 > r; r++) {
                  e = r;
                  for (var n = 0; 8 > n; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
                  t[r] = e;
                }
                return t;
              }
              function i(e, t, r, n) {
                var i = a,
                  s = n + r;
                e ^= -1;
                for (var o = n; s > o; o++) e = e >>> 8 ^ i[255 & (e ^ t[o])];
                return -1 ^ e;
              }
              var a = n();
              t.exports = i;
            }, {}],
            67: [function (e, t, r) {
              function n(e, t) {
                return e.msg = D[t], t;
              }
              function i(e) {
                return (e << 1) - (e > 4 ? 9 : 0);
              }
              function a(e) {
                for (var t = e.length; --t >= 0;) e[t] = 0;
              }
              function s(e) {
                var t = e.state,
                  r = t.pending;
                r > e.avail_out && (r = e.avail_out), 0 !== r && (O.arraySet(e.output, t.pending_buf, t.pending_out, r, e.next_out), e.next_out += r, t.pending_out += r, e.total_out += r, e.avail_out -= r, t.pending -= r, 0 === t.pending && (t.pending_out = 0));
              }
              function o(e, t) {
                B._tr_flush_block(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, s(e.strm);
              }
              function u(e, t) {
                e.pending_buf[e.pending++] = t;
              }
              function h(e, t) {
                e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t;
              }
              function l(e, t, r, n) {
                var i = e.avail_in;
                return i > n && (i = n), 0 === i ? 0 : (e.avail_in -= i, O.arraySet(t, e.input, e.next_in, i, r), 1 === e.state.wrap ? e.adler = R(e.adler, t, i, r) : 2 === e.state.wrap && (e.adler = T(e.adler, t, i, r)), e.next_in += i, e.total_in += i, i);
              }
              function c(e, t) {
                var r,
                  n,
                  i = e.max_chain_length,
                  a = e.strstart,
                  s = e.prev_length,
                  o = e.nice_match,
                  u = e.strstart > e.w_size - ct ? e.strstart - (e.w_size - ct) : 0,
                  h = e.window,
                  l = e.w_mask,
                  c = e.prev,
                  f = e.strstart + lt,
                  d = h[a + s - 1],
                  p = h[a + s];
                e.prev_length >= e.good_match && (i >>= 2), o > e.lookahead && (o = e.lookahead);
                do if (r = t, h[r + s] === p && h[r + s - 1] === d && h[r] === h[a] && h[++r] === h[a + 1]) {
                  a += 2, r++;
                  do ; while (h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && f > a);
                  if (n = lt - (f - a), a = f - lt, n > s) {
                    if (e.match_start = t, s = n, n >= o) break;
                    d = h[a + s - 1], p = h[a + s];
                  }
                } while ((t = c[t & l]) > u && 0 !== --i);
                return s <= e.lookahead ? s : e.lookahead;
              }
              function f(e) {
                var t,
                  r,
                  n,
                  i,
                  a,
                  s = e.w_size;
                do {
                  if (i = e.window_size - e.lookahead - e.strstart, e.strstart >= s + (s - ct)) {
                    O.arraySet(e.window, e.window, s, s, 0), e.match_start -= s, e.strstart -= s, e.block_start -= s, r = e.hash_size, t = r;
                    do n = e.head[--t], e.head[t] = n >= s ? n - s : 0; while (--r);
                    r = s, t = r;
                    do n = e.prev[--t], e.prev[t] = n >= s ? n - s : 0; while (--r);
                    i += s;
                  }
                  if (0 === e.strm.avail_in) break;
                  if (r = l(e.strm, e.window, e.strstart + e.lookahead, i), e.lookahead += r, e.lookahead + e.insert >= ht) for (a = e.strstart - e.insert, e.ins_h = e.window[a], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[a + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[a + ht - 1]) & e.hash_mask, e.prev[a & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = a, a++, e.insert--, !(e.lookahead + e.insert < ht)););
                } while (e.lookahead < ct && 0 !== e.strm.avail_in);
              }
              function d(e, t) {
                var r = 65535;
                for (r > e.pending_buf_size - 5 && (r = e.pending_buf_size - 5);;) {
                  if (e.lookahead <= 1) {
                    if (f(e), 0 === e.lookahead && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  e.strstart += e.lookahead, e.lookahead = 0;
                  var n = e.block_start + r;
                  if ((0 === e.strstart || e.strstart >= n) && (e.lookahead = e.strstart - n, e.strstart = n, o(e, !1), 0 === e.strm.avail_out)) return wt;
                  if (e.strstart - e.block_start >= e.w_size - ct && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = 0, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.strstart > e.block_start && (o(e, !1), 0 === e.strm.avail_out) ? wt : wt;
              }
              function p(e, t) {
                for (var r, n;;) {
                  if (e.lookahead < ct) {
                    if (f(e), e.lookahead < ct && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  if (r = 0, e.lookahead >= ht && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== r && e.strstart - r <= e.w_size - ct && (e.match_length = c(e, r)), e.match_length >= ht) {
                    if (n = B._tr_tally(e, e.strstart - e.match_start, e.match_length - ht), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= ht) {
                      e.match_length--;
                      do e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart; while (0 !== --e.match_length);
                      e.strstart++;
                    } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
                  } else n = B._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
                  if (n && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = e.strstart < ht - 1 ? e.strstart : ht - 1, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function m(e, t) {
                for (var r, n, i;;) {
                  if (e.lookahead < ct) {
                    if (f(e), e.lookahead < ct && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  if (r = 0, e.lookahead >= ht && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = ht - 1, 0 !== r && e.prev_length < e.max_lazy_match && e.strstart - r <= e.w_size - ct && (e.match_length = c(e, r), e.match_length <= 5 && (e.strategy === K || e.match_length === ht && e.strstart - e.match_start > 4096) && (e.match_length = ht - 1)), e.prev_length >= ht && e.match_length <= e.prev_length) {
                    i = e.strstart + e.lookahead - ht, n = B._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - ht), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
                    do ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart); while (0 !== --e.prev_length);
                    if (e.match_available = 0, e.match_length = ht - 1, e.strstart++, n && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                  } else if (e.match_available) {
                    if (n = B._tr_tally(e, 0, e.window[e.strstart - 1]), n && o(e, !1), e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return wt;
                  } else e.match_available = 1, e.strstart++, e.lookahead--;
                }
                return e.match_available && (n = B._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < ht - 1 ? e.strstart : ht - 1, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function _(e, t) {
                for (var r, n, i, a, s = e.window;;) {
                  if (e.lookahead <= lt) {
                    if (f(e), e.lookahead <= lt && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  if (e.match_length = 0, e.lookahead >= ht && e.strstart > 0 && (i = e.strstart - 1, n = s[i], n === s[++i] && n === s[++i] && n === s[++i])) {
                    a = e.strstart + lt;
                    do ; while (n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && a > i);
                    e.match_length = lt - (a - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
                  }
                  if (e.match_length >= ht ? (r = B._tr_tally(e, 1, e.match_length - ht), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (r = B._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), r && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = 0, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function g(e, t) {
                for (var r;;) {
                  if (0 === e.lookahead && (f(e), 0 === e.lookahead)) {
                    if (t === F) return wt;
                    break;
                  }
                  if (e.match_length = 0, r = B._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, r && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = 0, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function v(e, t, r, n, i) {
                this.good_length = e, this.max_lazy = t, this.nice_length = r, this.max_chain = n, this.func = i;
              }
              function b(e) {
                e.window_size = 2 * e.w_size, a(e.head), e.max_lazy_match = I[e.level].max_lazy, e.good_match = I[e.level].good_length, e.nice_match = I[e.level].nice_length, e.max_chain_length = I[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = ht - 1, e.match_available = 0, e.ins_h = 0;
              }
              function w() {
                this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Q, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new O.Buf16(2 * ot), this.dyn_dtree = new O.Buf16(2 * (2 * at + 1)), this.bl_tree = new O.Buf16(2 * (2 * st + 1)), a(this.dyn_ltree), a(this.dyn_dtree), a(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new O.Buf16(ut + 1), this.heap = new O.Buf16(2 * it + 1), a(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new O.Buf16(2 * it + 1), a(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
              }
              function y(e) {
                var t;
                return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = J, t = e.state, t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? dt : vt, e.adler = 2 === t.wrap ? 0 : 1, t.last_flush = F, B._tr_init(t), j) : n(e, W);
              }
              function k(e) {
                var t = y(e);
                return t === j && b(e.state), t;
              }
              function x(e, t) {
                return e && e.state ? 2 !== e.state.wrap ? W : (e.state.gzhead = t, j) : W;
              }
              function S(e, t, r, i, a, s) {
                if (!e) return W;
                var o = 1;
                if (t === G && (t = 6), 0 > i ? (o = 0, i = -i) : i > 15 && (o = 2, i -= 16), 1 > a || a > $ || r !== Q || 8 > i || i > 15 || 0 > t || t > 9 || 0 > s || s > V) return n(e, W);
                8 === i && (i = 9);
                var u = new w();
                return e.state = u, u.strm = e, u.wrap = o, u.gzhead = null, u.w_bits = i, u.w_size = 1 << u.w_bits, u.w_mask = u.w_size - 1, u.hash_bits = a + 7, u.hash_size = 1 << u.hash_bits, u.hash_mask = u.hash_size - 1, u.hash_shift = ~~((u.hash_bits + ht - 1) / ht), u.window = new O.Buf8(2 * u.w_size), u.head = new O.Buf16(u.hash_size), u.prev = new O.Buf16(u.w_size), u.lit_bufsize = 1 << a + 6, u.pending_buf_size = 4 * u.lit_bufsize, u.pending_buf = new O.Buf8(u.pending_buf_size), u.d_buf = 1 * u.lit_bufsize, u.l_buf = 3 * u.lit_bufsize, u.level = t, u.strategy = s, u.method = r, k(e);
              }
              function z(e, t) {
                return S(e, t, Q, et, tt, q);
              }
              function E(e, t) {
                var r, o, l, c;
                if (!e || !e.state || t > L || 0 > t) return e ? n(e, W) : W;
                if (o = e.state, !e.output || !e.input && 0 !== e.avail_in || o.status === bt && t !== U) return n(e, 0 === e.avail_out ? H : W);
                if (o.strm = e, r = o.last_flush, o.last_flush = t, o.status === dt) if (2 === o.wrap) e.adler = 0, u(o, 31), u(o, 139), u(o, 8), o.gzhead ? (u(o, (o.gzhead.text ? 1 : 0) + (o.gzhead.hcrc ? 2 : 0) + (o.gzhead.extra ? 4 : 0) + (o.gzhead.name ? 8 : 0) + (o.gzhead.comment ? 16 : 0)), u(o, 255 & o.gzhead.time), u(o, o.gzhead.time >> 8 & 255), u(o, o.gzhead.time >> 16 & 255), u(o, o.gzhead.time >> 24 & 255), u(o, 9 === o.level ? 2 : o.strategy >= Y || o.level < 2 ? 4 : 0), u(o, 255 & o.gzhead.os), o.gzhead.extra && o.gzhead.extra.length && (u(o, 255 & o.gzhead.extra.length), u(o, o.gzhead.extra.length >> 8 & 255)), o.gzhead.hcrc && (e.adler = T(e.adler, o.pending_buf, o.pending, 0)), o.gzindex = 0, o.status = pt) : (u(o, 0), u(o, 0), u(o, 0), u(o, 0), u(o, 0), u(o, 9 === o.level ? 2 : o.strategy >= Y || o.level < 2 ? 4 : 0), u(o, St), o.status = vt);else {
                  var f = Q + (o.w_bits - 8 << 4) << 8,
                    d = -1;
                  d = o.strategy >= Y || o.level < 2 ? 0 : o.level < 6 ? 1 : 6 === o.level ? 2 : 3, f |= d << 6, 0 !== o.strstart && (f |= ft), f += 31 - f % 31, o.status = vt, h(o, f), 0 !== o.strstart && (h(o, e.adler >>> 16), h(o, 65535 & e.adler)), e.adler = 1;
                }
                if (o.status === pt) if (o.gzhead.extra) {
                  for (l = o.pending; o.gzindex < (65535 & o.gzhead.extra.length) && (o.pending !== o.pending_buf_size || (o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), s(e), l = o.pending, o.pending !== o.pending_buf_size));) u(o, 255 & o.gzhead.extra[o.gzindex]), o.gzindex++;
                  o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), o.gzindex === o.gzhead.extra.length && (o.gzindex = 0, o.status = mt);
                } else o.status = mt;
                if (o.status === mt) if (o.gzhead.name) {
                  l = o.pending;
                  do {
                    if (o.pending === o.pending_buf_size && (o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), s(e), l = o.pending, o.pending === o.pending_buf_size)) {
                      c = 1;
                      break;
                    }
                    c = o.gzindex < o.gzhead.name.length ? 255 & o.gzhead.name.charCodeAt(o.gzindex++) : 0, u(o, c);
                  } while (0 !== c);
                  o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), 0 === c && (o.gzindex = 0, o.status = _t);
                } else o.status = _t;
                if (o.status === _t) if (o.gzhead.comment) {
                  l = o.pending;
                  do {
                    if (o.pending === o.pending_buf_size && (o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), s(e), l = o.pending, o.pending === o.pending_buf_size)) {
                      c = 1;
                      break;
                    }
                    c = o.gzindex < o.gzhead.comment.length ? 255 & o.gzhead.comment.charCodeAt(o.gzindex++) : 0, u(o, c);
                  } while (0 !== c);
                  o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), 0 === c && (o.status = gt);
                } else o.status = gt;
                if (o.status === gt && (o.gzhead.hcrc ? (o.pending + 2 > o.pending_buf_size && s(e), o.pending + 2 <= o.pending_buf_size && (u(o, 255 & e.adler), u(o, e.adler >> 8 & 255), e.adler = 0, o.status = vt)) : o.status = vt), 0 !== o.pending) {
                  if (s(e), 0 === e.avail_out) return o.last_flush = -1, j;
                } else if (0 === e.avail_in && i(t) <= i(r) && t !== U) return n(e, H);
                if (o.status === bt && 0 !== e.avail_in) return n(e, H);
                if (0 !== e.avail_in || 0 !== o.lookahead || t !== F && o.status !== bt) {
                  var p = o.strategy === Y ? g(o, t) : o.strategy === X ? _(o, t) : I[o.level].func(o, t);
                  if ((p === kt || p === xt) && (o.status = bt), p === wt || p === kt) return 0 === e.avail_out && (o.last_flush = -1), j;
                  if (p === yt && (t === N ? B._tr_align(o) : t !== L && (B._tr_stored_block(o, 0, 0, !1), t === P && (a(o.head), 0 === o.lookahead && (o.strstart = 0, o.block_start = 0, o.insert = 0))), s(e), 0 === e.avail_out)) return o.last_flush = -1, j;
                }
                return t !== U ? j : o.wrap <= 0 ? Z : (2 === o.wrap ? (u(o, 255 & e.adler), u(o, e.adler >> 8 & 255), u(o, e.adler >> 16 & 255), u(o, e.adler >> 24 & 255), u(o, 255 & e.total_in), u(o, e.total_in >> 8 & 255), u(o, e.total_in >> 16 & 255), u(o, e.total_in >> 24 & 255)) : (h(o, e.adler >>> 16), h(o, 65535 & e.adler)), s(e), o.wrap > 0 && (o.wrap = -o.wrap), 0 !== o.pending ? j : Z);
              }
              function C(e) {
                var t;
                return e && e.state ? (t = e.state.status, t !== dt && t !== pt && t !== mt && t !== _t && t !== gt && t !== vt && t !== bt ? n(e, W) : (e.state = null, t === vt ? n(e, M) : j)) : W;
              }
              function A(e, t) {
                var r,
                  n,
                  i,
                  s,
                  o,
                  u,
                  h,
                  l,
                  c = t.length;
                if (!e || !e.state) return W;
                if (r = e.state, s = r.wrap, 2 === s || 1 === s && r.status !== dt || r.lookahead) return W;
                for (1 === s && (e.adler = R(e.adler, t, c, 0)), r.wrap = 0, c >= r.w_size && (0 === s && (a(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0), l = new O.Buf8(r.w_size), O.arraySet(l, t, c - r.w_size, r.w_size, 0), t = l, c = r.w_size), o = e.avail_in, u = e.next_in, h = e.input, e.avail_in = c, e.next_in = 0, e.input = t, f(r); r.lookahead >= ht;) {
                  n = r.strstart, i = r.lookahead - (ht - 1);
                  do r.ins_h = (r.ins_h << r.hash_shift ^ r.window[n + ht - 1]) & r.hash_mask, r.prev[n & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = n, n++; while (--i);
                  r.strstart = n, r.lookahead = ht - 1, f(r);
                }
                return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = ht - 1, r.match_available = 0, e.next_in = u, e.input = h, e.avail_in = o, r.wrap = s, j;
              }
              var I,
                O = e("../utils/common"),
                B = e("./trees"),
                R = e("./adler32"),
                T = e("./crc32"),
                D = e("./messages"),
                F = 0,
                N = 1,
                P = 3,
                U = 4,
                L = 5,
                j = 0,
                Z = 1,
                W = -2,
                M = -3,
                H = -5,
                G = -1,
                K = 1,
                Y = 2,
                X = 3,
                V = 4,
                q = 0,
                J = 2,
                Q = 8,
                $ = 9,
                et = 15,
                tt = 8,
                rt = 29,
                nt = 256,
                it = nt + 1 + rt,
                at = 30,
                st = 19,
                ot = 2 * it + 1,
                ut = 15,
                ht = 3,
                lt = 258,
                ct = lt + ht + 1,
                ft = 32,
                dt = 42,
                pt = 69,
                mt = 73,
                _t = 91,
                gt = 103,
                vt = 113,
                bt = 666,
                wt = 1,
                yt = 2,
                kt = 3,
                xt = 4,
                St = 3;
              I = [new v(0, 0, 0, 0, d), new v(4, 4, 8, 4, p), new v(4, 5, 16, 8, p), new v(4, 6, 32, 32, p), new v(4, 4, 16, 16, m), new v(8, 16, 32, 32, m), new v(8, 16, 128, 128, m), new v(8, 32, 128, 256, m), new v(32, 128, 258, 1024, m), new v(32, 258, 258, 4096, m)], r.deflateInit = z, r.deflateInit2 = S, r.deflateReset = k, r.deflateResetKeep = y, r.deflateSetHeader = x, r.deflate = E, r.deflateEnd = C, r.deflateSetDictionary = A, r.deflateInfo = "pako deflate (from Nodeca project)";
            }, {
              "../utils/common": 62,
              "./adler32": 64,
              "./crc32": 66,
              "./messages": 72,
              "./trees": 73
            }],
            68: [function (e, t, r) {
              function n() {
                this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
              }
              t.exports = n;
            }, {}],
            69: [function (e, t, r) {
              var n = 30,
                i = 12;
              t.exports = function (e, t) {
                var r, a, s, o, u, h, l, c, f, d, p, m, _, g, v, b, w, y, k, x, S, z, E, C, A;
                r = e.state, a = e.next_in, C = e.input, s = a + (e.avail_in - 5), o = e.next_out, A = e.output, u = o - (t - e.avail_out), h = o + (e.avail_out - 257), l = r.dmax, c = r.wsize, f = r.whave, d = r.wnext, p = r.window, m = r.hold, _ = r.bits, g = r.lencode, v = r.distcode, b = (1 << r.lenbits) - 1, w = (1 << r.distbits) - 1;
                e: do {
                  15 > _ && (m += C[a++] << _, _ += 8, m += C[a++] << _, _ += 8), y = g[m & b];
                  t: for (;;) {
                    if (k = y >>> 24, m >>>= k, _ -= k, k = y >>> 16 & 255, 0 === k) A[o++] = 65535 & y;else {
                      if (!(16 & k)) {
                        if (0 === (64 & k)) {
                          y = g[(65535 & y) + (m & (1 << k) - 1)];
                          continue t;
                        }
                        if (32 & k) {
                          r.mode = i;
                          break e;
                        }
                        e.msg = "invalid literal/length code", r.mode = n;
                        break e;
                      }
                      x = 65535 & y, k &= 15, k && (k > _ && (m += C[a++] << _, _ += 8), x += m & (1 << k) - 1, m >>>= k, _ -= k), 15 > _ && (m += C[a++] << _, _ += 8, m += C[a++] << _, _ += 8), y = v[m & w];
                      r: for (;;) {
                        if (k = y >>> 24, m >>>= k, _ -= k, k = y >>> 16 & 255, !(16 & k)) {
                          if (0 === (64 & k)) {
                            y = v[(65535 & y) + (m & (1 << k) - 1)];
                            continue r;
                          }
                          e.msg = "invalid distance code", r.mode = n;
                          break e;
                        }
                        if (S = 65535 & y, k &= 15, k > _ && (m += C[a++] << _, _ += 8, k > _ && (m += C[a++] << _, _ += 8)), S += m & (1 << k) - 1, S > l) {
                          e.msg = "invalid distance too far back", r.mode = n;
                          break e;
                        }
                        if (m >>>= k, _ -= k, k = o - u, S > k) {
                          if (k = S - k, k > f && r.sane) {
                            e.msg = "invalid distance too far back", r.mode = n;
                            break e;
                          }
                          if (z = 0, E = p, 0 === d) {
                            if (z += c - k, x > k) {
                              x -= k;
                              do A[o++] = p[z++]; while (--k);
                              z = o - S, E = A;
                            }
                          } else if (k > d) {
                            if (z += c + d - k, k -= d, x > k) {
                              x -= k;
                              do A[o++] = p[z++]; while (--k);
                              if (z = 0, x > d) {
                                k = d, x -= k;
                                do A[o++] = p[z++]; while (--k);
                                z = o - S, E = A;
                              }
                            }
                          } else if (z += d - k, x > k) {
                            x -= k;
                            do A[o++] = p[z++]; while (--k);
                            z = o - S, E = A;
                          }
                          for (; x > 2;) A[o++] = E[z++], A[o++] = E[z++], A[o++] = E[z++], x -= 3;
                          x && (A[o++] = E[z++], x > 1 && (A[o++] = E[z++]));
                        } else {
                          z = o - S;
                          do A[o++] = A[z++], A[o++] = A[z++], A[o++] = A[z++], x -= 3; while (x > 2);
                          x && (A[o++] = A[z++], x > 1 && (A[o++] = A[z++]));
                        }
                        break;
                      }
                    }
                    break;
                  }
                } while (s > a && h > o);
                x = _ >> 3, a -= x, _ -= x << 3, m &= (1 << _) - 1, e.next_in = a, e.next_out = o, e.avail_in = s > a ? 5 + (s - a) : 5 - (a - s), e.avail_out = h > o ? 257 + (h - o) : 257 - (o - h), r.hold = m, r.bits = _;
              };
            }, {}],
            70: [function (e, t, r) {
              function n(e) {
                return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24);
              }
              function i() {
                this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new v.Buf16(320), this.work = new v.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
              }
              function a(e) {
                var t;
                return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = P, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new v.Buf32(mt), t.distcode = t.distdyn = new v.Buf32(_t), t.sane = 1, t.back = -1, I) : R;
              }
              function s(e) {
                var t;
                return e && e.state ? (t = e.state, t.wsize = 0, t.whave = 0, t.wnext = 0, a(e)) : R;
              }
              function o(e, t) {
                var r, n;
                return e && e.state ? (n = e.state, 0 > t ? (r = 0, t = -t) : (r = (t >> 4) + 1, 48 > t && (t &= 15)), t && (8 > t || t > 15) ? R : (null !== n.window && n.wbits !== t && (n.window = null), n.wrap = r, n.wbits = t, s(e))) : R;
              }
              function u(e, t) {
                var r, n;
                return e ? (n = new i(), e.state = n, n.window = null, r = o(e, t), r !== I && (e.state = null), r) : R;
              }
              function h(e) {
                return u(e, vt);
              }
              function l(e) {
                if (bt) {
                  var t;
                  for (_ = new v.Buf32(512), g = new v.Buf32(32), t = 0; 144 > t;) e.lens[t++] = 8;
                  for (; 256 > t;) e.lens[t++] = 9;
                  for (; 280 > t;) e.lens[t++] = 7;
                  for (; 288 > t;) e.lens[t++] = 8;
                  for (k(S, e.lens, 0, 288, _, 0, e.work, {
                    bits: 9
                  }), t = 0; 32 > t;) e.lens[t++] = 5;
                  k(z, e.lens, 0, 32, g, 0, e.work, {
                    bits: 5
                  }), bt = !1;
                }
                e.lencode = _, e.lenbits = 9, e.distcode = g, e.distbits = 5;
              }
              function c(e, t, r, n) {
                var i,
                  a = e.state;
                return null === a.window && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new v.Buf8(a.wsize)), n >= a.wsize ? (v.arraySet(a.window, t, r - a.wsize, a.wsize, 0), a.wnext = 0, a.whave = a.wsize) : (i = a.wsize - a.wnext, i > n && (i = n), v.arraySet(a.window, t, r - n, i, a.wnext), n -= i, n ? (v.arraySet(a.window, t, r - n, n, 0), a.wnext = n, a.whave = a.wsize) : (a.wnext += i, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += i))), 0;
              }
              function f(e, t) {
                var r,
                  i,
                  a,
                  s,
                  o,
                  u,
                  h,
                  f,
                  d,
                  p,
                  m,
                  _,
                  g,
                  mt,
                  _t,
                  gt,
                  vt,
                  bt,
                  wt,
                  yt,
                  kt,
                  xt,
                  St,
                  zt,
                  Et = 0,
                  Ct = new v.Buf8(4),
                  At = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
                if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) return R;
                r = e.state, r.mode === X && (r.mode = V), o = e.next_out, a = e.output, h = e.avail_out, s = e.next_in, i = e.input, u = e.avail_in, f = r.hold, d = r.bits, p = u, m = h, xt = I;
                e: for (;;) switch (r.mode) {
                  case P:
                    if (0 === r.wrap) {
                      r.mode = V;
                      break;
                    }
                    for (; 16 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (2 & r.wrap && 35615 === f) {
                      r.check = 0, Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0), f = 0, d = 0, r.mode = U;
                      break;
                    }
                    if (r.flags = 0, r.head && (r.head.done = !1), !(1 & r.wrap) || (((255 & f) << 8) + (f >> 8)) % 31) {
                      e.msg = "incorrect header check", r.mode = ft;
                      break;
                    }
                    if ((15 & f) !== N) {
                      e.msg = "unknown compression method", r.mode = ft;
                      break;
                    }
                    if (f >>>= 4, d -= 4, kt = (15 & f) + 8, 0 === r.wbits) r.wbits = kt;else if (kt > r.wbits) {
                      e.msg = "invalid window size", r.mode = ft;
                      break;
                    }
                    r.dmax = 1 << kt, e.adler = r.check = 1, r.mode = 512 & f ? K : X, f = 0, d = 0;
                    break;
                  case U:
                    for (; 16 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (r.flags = f, (255 & r.flags) !== N) {
                      e.msg = "unknown compression method", r.mode = ft;
                      break;
                    }
                    if (57344 & r.flags) {
                      e.msg = "unknown header flags set", r.mode = ft;
                      break;
                    }
                    r.head && (r.head.text = f >> 8 & 1), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0)), f = 0, d = 0, r.mode = L;
                  case L:
                    for (; 32 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    r.head && (r.head.time = f), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, Ct[2] = f >>> 16 & 255, Ct[3] = f >>> 24 & 255, r.check = w(r.check, Ct, 4, 0)), f = 0, d = 0, r.mode = j;
                  case j:
                    for (; 16 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    r.head && (r.head.xflags = 255 & f, r.head.os = f >> 8), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0)), f = 0, d = 0, r.mode = Z;
                  case Z:
                    if (1024 & r.flags) {
                      for (; 16 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.length = f, r.head && (r.head.extra_len = f), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0)), f = 0, d = 0;
                    } else r.head && (r.head.extra = null);
                    r.mode = W;
                  case W:
                    if (1024 & r.flags && (_ = r.length, _ > u && (_ = u), _ && (r.head && (kt = r.head.extra_len - r.length, r.head.extra || (r.head.extra = new Array(r.head.extra_len)), v.arraySet(r.head.extra, i, s, _, kt)), 512 & r.flags && (r.check = w(r.check, i, _, s)), u -= _, s += _, r.length -= _), r.length)) break e;
                    r.length = 0, r.mode = M;
                  case M:
                    if (2048 & r.flags) {
                      if (0 === u) break e;
                      _ = 0;
                      do kt = i[s + _++], r.head && kt && r.length < 65536 && (r.head.name += String.fromCharCode(kt)); while (kt && u > _);
                      if (512 & r.flags && (r.check = w(r.check, i, _, s)), u -= _, s += _, kt) break e;
                    } else r.head && (r.head.name = null);
                    r.length = 0, r.mode = H;
                  case H:
                    if (4096 & r.flags) {
                      if (0 === u) break e;
                      _ = 0;
                      do kt = i[s + _++], r.head && kt && r.length < 65536 && (r.head.comment += String.fromCharCode(kt)); while (kt && u > _);
                      if (512 & r.flags && (r.check = w(r.check, i, _, s)), u -= _, s += _, kt) break e;
                    } else r.head && (r.head.comment = null);
                    r.mode = G;
                  case G:
                    if (512 & r.flags) {
                      for (; 16 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      if (f !== (65535 & r.check)) {
                        e.msg = "header crc mismatch", r.mode = ft;
                        break;
                      }
                      f = 0, d = 0;
                    }
                    r.head && (r.head.hcrc = r.flags >> 9 & 1, r.head.done = !0), e.adler = r.check = 0, r.mode = X;
                    break;
                  case K:
                    for (; 32 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    e.adler = r.check = n(f), f = 0, d = 0, r.mode = Y;
                  case Y:
                    if (0 === r.havedict) return e.next_out = o, e.avail_out = h, e.next_in = s, e.avail_in = u, r.hold = f, r.bits = d, B;
                    e.adler = r.check = 1, r.mode = X;
                  case X:
                    if (t === C || t === A) break e;
                  case V:
                    if (r.last) {
                      f >>>= 7 & d, d -= 7 & d, r.mode = ht;
                      break;
                    }
                    for (; 3 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    switch (r.last = 1 & f, f >>>= 1, d -= 1, 3 & f) {
                      case 0:
                        r.mode = q;
                        break;
                      case 1:
                        if (l(r), r.mode = rt, t === A) {
                          f >>>= 2, d -= 2;
                          break e;
                        }
                        break;
                      case 2:
                        r.mode = $;
                        break;
                      case 3:
                        e.msg = "invalid block type", r.mode = ft;
                    }
                    f >>>= 2, d -= 2;
                    break;
                  case q:
                    for (f >>>= 7 & d, d -= 7 & d; 32 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if ((65535 & f) !== (f >>> 16 ^ 65535)) {
                      e.msg = "invalid stored block lengths", r.mode = ft;
                      break;
                    }
                    if (r.length = 65535 & f, f = 0, d = 0, r.mode = J, t === A) break e;
                  case J:
                    r.mode = Q;
                  case Q:
                    if (_ = r.length) {
                      if (_ > u && (_ = u), _ > h && (_ = h), 0 === _) break e;
                      v.arraySet(a, i, s, _, o), u -= _, s += _, h -= _, o += _, r.length -= _;
                      break;
                    }
                    r.mode = X;
                    break;
                  case $:
                    for (; 14 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (r.nlen = (31 & f) + 257, f >>>= 5, d -= 5, r.ndist = (31 & f) + 1, f >>>= 5, d -= 5, r.ncode = (15 & f) + 4, f >>>= 4, d -= 4, r.nlen > 286 || r.ndist > 30) {
                      e.msg = "too many length or distance symbols", r.mode = ft;
                      break;
                    }
                    r.have = 0, r.mode = et;
                  case et:
                    for (; r.have < r.ncode;) {
                      for (; 3 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.lens[At[r.have++]] = 7 & f, f >>>= 3, d -= 3;
                    }
                    for (; r.have < 19;) r.lens[At[r.have++]] = 0;
                    if (r.lencode = r.lendyn, r.lenbits = 7, St = {
                      bits: r.lenbits
                    }, xt = k(x, r.lens, 0, 19, r.lencode, 0, r.work, St), r.lenbits = St.bits, xt) {
                      e.msg = "invalid code lengths set", r.mode = ft;
                      break;
                    }
                    r.have = 0, r.mode = tt;
                  case tt:
                    for (; r.have < r.nlen + r.ndist;) {
                      for (; Et = r.lencode[f & (1 << r.lenbits) - 1], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= _t);) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      if (16 > vt) f >>>= _t, d -= _t, r.lens[r.have++] = vt;else {
                        if (16 === vt) {
                          for (zt = _t + 2; zt > d;) {
                            if (0 === u) break e;
                            u--, f += i[s++] << d, d += 8;
                          }
                          if (f >>>= _t, d -= _t, 0 === r.have) {
                            e.msg = "invalid bit length repeat", r.mode = ft;
                            break;
                          }
                          kt = r.lens[r.have - 1], _ = 3 + (3 & f), f >>>= 2, d -= 2;
                        } else if (17 === vt) {
                          for (zt = _t + 3; zt > d;) {
                            if (0 === u) break e;
                            u--, f += i[s++] << d, d += 8;
                          }
                          f >>>= _t, d -= _t, kt = 0, _ = 3 + (7 & f), f >>>= 3, d -= 3;
                        } else {
                          for (zt = _t + 7; zt > d;) {
                            if (0 === u) break e;
                            u--, f += i[s++] << d, d += 8;
                          }
                          f >>>= _t, d -= _t, kt = 0, _ = 11 + (127 & f), f >>>= 7, d -= 7;
                        }
                        if (r.have + _ > r.nlen + r.ndist) {
                          e.msg = "invalid bit length repeat", r.mode = ft;
                          break;
                        }
                        for (; _--;) r.lens[r.have++] = kt;
                      }
                    }
                    if (r.mode === ft) break;
                    if (0 === r.lens[256]) {
                      e.msg = "invalid code -- missing end-of-block", r.mode = ft;
                      break;
                    }
                    if (r.lenbits = 9, St = {
                      bits: r.lenbits
                    }, xt = k(S, r.lens, 0, r.nlen, r.lencode, 0, r.work, St), r.lenbits = St.bits, xt) {
                      e.msg = "invalid literal/lengths set", r.mode = ft;
                      break;
                    }
                    if (r.distbits = 6, r.distcode = r.distdyn, St = {
                      bits: r.distbits
                    }, xt = k(z, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, St), r.distbits = St.bits, xt) {
                      e.msg = "invalid distances set", r.mode = ft;
                      break;
                    }
                    if (r.mode = rt, t === A) break e;
                  case rt:
                    r.mode = nt;
                  case nt:
                    if (u >= 6 && h >= 258) {
                      e.next_out = o, e.avail_out = h, e.next_in = s, e.avail_in = u, r.hold = f, r.bits = d, y(e, m), o = e.next_out, a = e.output, h = e.avail_out, s = e.next_in, i = e.input, u = e.avail_in, f = r.hold, d = r.bits, r.mode === X && (r.back = -1);
                      break;
                    }
                    for (r.back = 0; Et = r.lencode[f & (1 << r.lenbits) - 1], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= _t);) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (gt && 0 === (240 & gt)) {
                      for (bt = _t, wt = gt, yt = vt; Et = r.lencode[yt + ((f & (1 << bt + wt) - 1) >> bt)], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= bt + _t);) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      f >>>= bt, d -= bt, r.back += bt;
                    }
                    if (f >>>= _t, d -= _t, r.back += _t, r.length = vt, 0 === gt) {
                      r.mode = ut;
                      break;
                    }
                    if (32 & gt) {
                      r.back = -1, r.mode = X;
                      break;
                    }
                    if (64 & gt) {
                      e.msg = "invalid literal/length code", r.mode = ft;
                      break;
                    }
                    r.extra = 15 & gt, r.mode = it;
                  case it:
                    if (r.extra) {
                      for (zt = r.extra; zt > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.length += f & (1 << r.extra) - 1, f >>>= r.extra, d -= r.extra, r.back += r.extra;
                    }
                    r.was = r.length, r.mode = at;
                  case at:
                    for (; Et = r.distcode[f & (1 << r.distbits) - 1], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= _t);) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (0 === (240 & gt)) {
                      for (bt = _t, wt = gt, yt = vt; Et = r.distcode[yt + ((f & (1 << bt + wt) - 1) >> bt)], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= bt + _t);) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      f >>>= bt, d -= bt, r.back += bt;
                    }
                    if (f >>>= _t, d -= _t, r.back += _t, 64 & gt) {
                      e.msg = "invalid distance code", r.mode = ft;
                      break;
                    }
                    r.offset = vt, r.extra = 15 & gt, r.mode = st;
                  case st:
                    if (r.extra) {
                      for (zt = r.extra; zt > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.offset += f & (1 << r.extra) - 1, f >>>= r.extra, d -= r.extra, r.back += r.extra;
                    }
                    if (r.offset > r.dmax) {
                      e.msg = "invalid distance too far back", r.mode = ft;
                      break;
                    }
                    r.mode = ot;
                  case ot:
                    if (0 === h) break e;
                    if (_ = m - h, r.offset > _) {
                      if (_ = r.offset - _, _ > r.whave && r.sane) {
                        e.msg = "invalid distance too far back", r.mode = ft;
                        break;
                      }
                      _ > r.wnext ? (_ -= r.wnext, g = r.wsize - _) : g = r.wnext - _, _ > r.length && (_ = r.length), mt = r.window;
                    } else mt = a, g = o - r.offset, _ = r.length;
                    _ > h && (_ = h), h -= _, r.length -= _;
                    do a[o++] = mt[g++]; while (--_);
                    0 === r.length && (r.mode = nt);
                    break;
                  case ut:
                    if (0 === h) break e;
                    a[o++] = r.length, h--, r.mode = nt;
                    break;
                  case ht:
                    if (r.wrap) {
                      for (; 32 > d;) {
                        if (0 === u) break e;
                        u--, f |= i[s++] << d, d += 8;
                      }
                      if (m -= h, e.total_out += m, r.total += m, m && (e.adler = r.check = r.flags ? w(r.check, a, m, o - m) : b(r.check, a, m, o - m)), m = h, (r.flags ? f : n(f)) !== r.check) {
                        e.msg = "incorrect data check", r.mode = ft;
                        break;
                      }
                      f = 0, d = 0;
                    }
                    r.mode = lt;
                  case lt:
                    if (r.wrap && r.flags) {
                      for (; 32 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      if (f !== (4294967295 & r.total)) {
                        e.msg = "incorrect length check", r.mode = ft;
                        break;
                      }
                      f = 0, d = 0;
                    }
                    r.mode = ct;
                  case ct:
                    xt = O;
                    break e;
                  case ft:
                    xt = T;
                    break e;
                  case dt:
                    return D;
                  case pt:
                  default:
                    return R;
                }
                return e.next_out = o, e.avail_out = h, e.next_in = s, e.avail_in = u, r.hold = f, r.bits = d, (r.wsize || m !== e.avail_out && r.mode < ft && (r.mode < ht || t !== E)) && c(e, e.output, e.next_out, m - e.avail_out) ? (r.mode = dt, D) : (p -= e.avail_in, m -= e.avail_out, e.total_in += p, e.total_out += m, r.total += m, r.wrap && m && (e.adler = r.check = r.flags ? w(r.check, a, m, e.next_out - m) : b(r.check, a, m, e.next_out - m)), e.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === X ? 128 : 0) + (r.mode === rt || r.mode === J ? 256 : 0), (0 === p && 0 === m || t === E) && xt === I && (xt = F), xt);
              }
              function d(e) {
                if (!e || !e.state) return R;
                var t = e.state;
                return t.window && (t.window = null), e.state = null, I;
              }
              function p(e, t) {
                var r;
                return e && e.state ? (r = e.state, 0 === (2 & r.wrap) ? R : (r.head = t, t.done = !1, I)) : R;
              }
              function m(e, t) {
                var r,
                  n,
                  a = t.length;
                return e && e.state ? (r = e.state, 0 !== r.wrap && r.mode !== Y ? R : r.mode === Y && (n = 1, n = b(n, t, a, 0), n !== r.check) ? T : c(e, t, a, a) ? (r.mode = dt, D) : (r.havedict = 1, I)) : R;
              }
              var _,
                g,
                v = e("../utils/common"),
                b = e("./adler32"),
                w = e("./crc32"),
                y = e("./inffast"),
                k = e("./inftrees"),
                x = 0,
                S = 1,
                z = 2,
                E = 4,
                C = 5,
                A = 6,
                I = 0,
                O = 1,
                B = 2,
                R = -2,
                T = -3,
                D = -4,
                F = -5,
                N = 8,
                P = 1,
                U = 2,
                L = 3,
                j = 4,
                Z = 5,
                W = 6,
                M = 7,
                H = 8,
                G = 9,
                K = 10,
                Y = 11,
                X = 12,
                V = 13,
                q = 14,
                J = 15,
                Q = 16,
                $ = 17,
                et = 18,
                tt = 19,
                rt = 20,
                nt = 21,
                it = 22,
                at = 23,
                st = 24,
                ot = 25,
                ut = 26,
                ht = 27,
                lt = 28,
                ct = 29,
                ft = 30,
                dt = 31,
                pt = 32,
                mt = 852,
                _t = 592,
                gt = 15,
                vt = gt,
                bt = !0;
              r.inflateReset = s, r.inflateReset2 = o, r.inflateResetKeep = a, r.inflateInit = h, r.inflateInit2 = u, r.inflate = f, r.inflateEnd = d, r.inflateGetHeader = p, r.inflateSetDictionary = m, r.inflateInfo = "pako inflate (from Nodeca project)";
            }, {
              "../utils/common": 62,
              "./adler32": 64,
              "./crc32": 66,
              "./inffast": 69,
              "./inftrees": 71
            }],
            71: [function (e, t, r) {
              var n = e("../utils/common"),
                i = 15,
                a = 852,
                s = 592,
                o = 0,
                u = 1,
                h = 2,
                l = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0],
                c = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78],
                f = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0],
                d = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
              t.exports = function (e, t, r, p, m, _, g, v) {
                var b,
                  w,
                  y,
                  k,
                  x,
                  S,
                  z,
                  E,
                  C,
                  A = v.bits,
                  I = 0,
                  O = 0,
                  B = 0,
                  R = 0,
                  T = 0,
                  D = 0,
                  F = 0,
                  N = 0,
                  P = 0,
                  U = 0,
                  L = null,
                  j = 0,
                  Z = new n.Buf16(i + 1),
                  W = new n.Buf16(i + 1),
                  M = null,
                  H = 0;
                for (I = 0; i >= I; I++) Z[I] = 0;
                for (O = 0; p > O; O++) Z[t[r + O]]++;
                for (T = A, R = i; R >= 1 && 0 === Z[R]; R--);
                if (T > R && (T = R), 0 === R) return m[_++] = 20971520, m[_++] = 20971520, v.bits = 1, 0;
                for (B = 1; R > B && 0 === Z[B]; B++);
                for (B > T && (T = B), N = 1, I = 1; i >= I; I++) if (N <<= 1, N -= Z[I], 0 > N) return -1;
                if (N > 0 && (e === o || 1 !== R)) return -1;
                for (W[1] = 0, I = 1; i > I; I++) W[I + 1] = W[I] + Z[I];
                for (O = 0; p > O; O++) 0 !== t[r + O] && (g[W[t[r + O]]++] = O);
                if (e === o ? (L = M = g, S = 19) : e === u ? (L = l, j -= 257, M = c, H -= 257, S = 256) : (L = f, M = d, S = -1), U = 0, O = 0, I = B, x = _, D = T, F = 0, y = -1, P = 1 << T, k = P - 1, e === u && P > a || e === h && P > s) return 1;
                for (;;) {
                  z = I - F, g[O] < S ? (E = 0, C = g[O]) : g[O] > S ? (E = M[H + g[O]], C = L[j + g[O]]) : (E = 96, C = 0), b = 1 << I - F, w = 1 << D, B = w;
                  do w -= b, m[x + (U >> F) + w] = z << 24 | E << 16 | C | 0; while (0 !== w);
                  for (b = 1 << I - 1; U & b;) b >>= 1;
                  if (0 !== b ? (U &= b - 1, U += b) : U = 0, O++, 0 === --Z[I]) {
                    if (I === R) break;
                    I = t[r + g[O]];
                  }
                  if (I > T && (U & k) !== y) {
                    for (0 === F && (F = T), x += B, D = I - F, N = 1 << D; R > D + F && (N -= Z[D + F], !(0 >= N));) D++, N <<= 1;
                    if (P += 1 << D, e === u && P > a || e === h && P > s) return 1;
                    y = U & k, m[y] = T << 24 | D << 16 | x - _ | 0;
                  }
                }
                return 0 !== U && (m[x + U] = I - F << 24 | 64 << 16 | 0), v.bits = T, 0;
              };
            }, {
              "../utils/common": 62
            }],
            72: [function (e, t, r) {
              t.exports = {
                2: "need dictionary",
                1: "stream end",
                0: "",
                "-1": "file error",
                "-2": "stream error",
                "-3": "data error",
                "-4": "insufficient memory",
                "-5": "buffer error",
                "-6": "incompatible version"
              };
            }, {}],
            73: [function (e, t, r) {
              function n(e) {
                for (var t = e.length; --t >= 0;) e[t] = 0;
              }
              function i(e, t, r, n, i) {
                this.static_tree = e, this.extra_bits = t, this.extra_base = r, this.elems = n, this.max_length = i, this.has_stree = e && e.length;
              }
              function a(e, t) {
                this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
              }
              function s(e) {
                return 256 > e ? ut[e] : ut[256 + (e >>> 7)];
              }
              function o(e, t) {
                e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255;
              }
              function u(e, t, r) {
                e.bi_valid > V - r ? (e.bi_buf |= t << e.bi_valid & 65535, o(e, e.bi_buf), e.bi_buf = t >> V - e.bi_valid, e.bi_valid += r - V) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += r);
              }
              function h(e, t, r) {
                u(e, r[2 * t], r[2 * t + 1]);
              }
              function l(e, t) {
                var r = 0;
                do r |= 1 & e, e >>>= 1, r <<= 1; while (--t > 0);
                return r >>> 1;
              }
              function c(e) {
                16 === e.bi_valid ? (o(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
              }
              function f(e, t) {
                var r,
                  n,
                  i,
                  a,
                  s,
                  o,
                  u = t.dyn_tree,
                  h = t.max_code,
                  l = t.stat_desc.static_tree,
                  c = t.stat_desc.has_stree,
                  f = t.stat_desc.extra_bits,
                  d = t.stat_desc.extra_base,
                  p = t.stat_desc.max_length,
                  m = 0;
                for (a = 0; X >= a; a++) e.bl_count[a] = 0;
                for (u[2 * e.heap[e.heap_max] + 1] = 0, r = e.heap_max + 1; Y > r; r++) n = e.heap[r], a = u[2 * u[2 * n + 1] + 1] + 1, a > p && (a = p, m++), u[2 * n + 1] = a, n > h || (e.bl_count[a]++, s = 0, n >= d && (s = f[n - d]), o = u[2 * n], e.opt_len += o * (a + s), c && (e.static_len += o * (l[2 * n + 1] + s)));
                if (0 !== m) {
                  do {
                    for (a = p - 1; 0 === e.bl_count[a];) a--;
                    e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[p]--, m -= 2;
                  } while (m > 0);
                  for (a = p; 0 !== a; a--) for (n = e.bl_count[a]; 0 !== n;) i = e.heap[--r], i > h || (u[2 * i + 1] !== a && (e.opt_len += (a - u[2 * i + 1]) * u[2 * i], u[2 * i + 1] = a), n--);
                }
              }
              function d(e, t, r) {
                var n,
                  i,
                  a = new Array(X + 1),
                  s = 0;
                for (n = 1; X >= n; n++) a[n] = s = s + r[n - 1] << 1;
                for (i = 0; t >= i; i++) {
                  var o = e[2 * i + 1];
                  0 !== o && (e[2 * i] = l(a[o]++, o));
                }
              }
              function p() {
                var e,
                  t,
                  r,
                  n,
                  a,
                  s = new Array(X + 1);
                for (r = 0, n = 0; W - 1 > n; n++) for (lt[n] = r, e = 0; e < 1 << tt[n]; e++) ht[r++] = n;
                for (ht[r - 1] = n, a = 0, n = 0; 16 > n; n++) for (ct[n] = a, e = 0; e < 1 << rt[n]; e++) ut[a++] = n;
                for (a >>= 7; G > n; n++) for (ct[n] = a << 7, e = 0; e < 1 << rt[n] - 7; e++) ut[256 + a++] = n;
                for (t = 0; X >= t; t++) s[t] = 0;
                for (e = 0; 143 >= e;) st[2 * e + 1] = 8, e++, s[8]++;
                for (; 255 >= e;) st[2 * e + 1] = 9, e++, s[9]++;
                for (; 279 >= e;) st[2 * e + 1] = 7, e++, s[7]++;
                for (; 287 >= e;) st[2 * e + 1] = 8, e++, s[8]++;
                for (d(st, H + 1, s), e = 0; G > e; e++) ot[2 * e + 1] = 5, ot[2 * e] = l(e, 5);
                ft = new i(st, tt, M + 1, H, X), dt = new i(ot, rt, 0, G, X), pt = new i(new Array(0), nt, 0, K, q);
              }
              function m(e) {
                var t;
                for (t = 0; H > t; t++) e.dyn_ltree[2 * t] = 0;
                for (t = 0; G > t; t++) e.dyn_dtree[2 * t] = 0;
                for (t = 0; K > t; t++) e.bl_tree[2 * t] = 0;
                e.dyn_ltree[2 * J] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
              }
              function _(e) {
                e.bi_valid > 8 ? o(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
              }
              function g(e, t, r, n) {
                _(e), n && (o(e, r), o(e, ~r)), R.arraySet(e.pending_buf, e.window, t, r, e.pending), e.pending += r;
              }
              function v(e, t, r, n) {
                var i = 2 * t,
                  a = 2 * r;
                return e[i] < e[a] || e[i] === e[a] && n[t] <= n[r];
              }
              function b(e, t, r) {
                for (var n = e.heap[r], i = r << 1; i <= e.heap_len && (i < e.heap_len && v(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !v(t, n, e.heap[i], e.depth));) e.heap[r] = e.heap[i], r = i, i <<= 1;
                e.heap[r] = n;
              }
              function w(e, t, r) {
                var n,
                  i,
                  a,
                  o,
                  l = 0;
                if (0 !== e.last_lit) do n = e.pending_buf[e.d_buf + 2 * l] << 8 | e.pending_buf[e.d_buf + 2 * l + 1], i = e.pending_buf[e.l_buf + l], l++, 0 === n ? h(e, i, t) : (a = ht[i], h(e, a + M + 1, t), o = tt[a], 0 !== o && (i -= lt[a], u(e, i, o)), n--, a = s(n), h(e, a, r), o = rt[a], 0 !== o && (n -= ct[a], u(e, n, o))); while (l < e.last_lit);
                h(e, J, t);
              }
              function y(e, t) {
                var r,
                  n,
                  i,
                  a = t.dyn_tree,
                  s = t.stat_desc.static_tree,
                  o = t.stat_desc.has_stree,
                  u = t.stat_desc.elems,
                  h = -1;
                for (e.heap_len = 0, e.heap_max = Y, r = 0; u > r; r++) 0 !== a[2 * r] ? (e.heap[++e.heap_len] = h = r, e.depth[r] = 0) : a[2 * r + 1] = 0;
                for (; e.heap_len < 2;) i = e.heap[++e.heap_len] = 2 > h ? ++h : 0, a[2 * i] = 1, e.depth[i] = 0, e.opt_len--, o && (e.static_len -= s[2 * i + 1]);
                for (t.max_code = h, r = e.heap_len >> 1; r >= 1; r--) b(e, a, r);
                i = u;
                do r = e.heap[1], e.heap[1] = e.heap[e.heap_len--], b(e, a, 1), n = e.heap[1], e.heap[--e.heap_max] = r, e.heap[--e.heap_max] = n, a[2 * i] = a[2 * r] + a[2 * n], e.depth[i] = (e.depth[r] >= e.depth[n] ? e.depth[r] : e.depth[n]) + 1, a[2 * r + 1] = a[2 * n + 1] = i, e.heap[1] = i++, b(e, a, 1); while (e.heap_len >= 2);
                e.heap[--e.heap_max] = e.heap[1], f(e, t), d(a, h, e.bl_count);
              }
              function k(e, t, r) {
                var n,
                  i,
                  a = -1,
                  s = t[1],
                  o = 0,
                  u = 7,
                  h = 4;
                for (0 === s && (u = 138, h = 3), t[2 * (r + 1) + 1] = 65535, n = 0; r >= n; n++) i = s, s = t[2 * (n + 1) + 1], ++o < u && i === s || (h > o ? e.bl_tree[2 * i] += o : 0 !== i ? (i !== a && e.bl_tree[2 * i]++, e.bl_tree[2 * Q]++) : 10 >= o ? e.bl_tree[2 * $]++ : e.bl_tree[2 * et]++, o = 0, a = i, 0 === s ? (u = 138, h = 3) : i === s ? (u = 6, h = 3) : (u = 7, h = 4));
              }
              function x(e, t, r) {
                var n,
                  i,
                  a = -1,
                  s = t[1],
                  o = 0,
                  l = 7,
                  c = 4;
                for (0 === s && (l = 138, c = 3), n = 0; r >= n; n++) if (i = s, s = t[2 * (n + 1) + 1], !(++o < l && i === s)) {
                  if (c > o) {
                    do h(e, i, e.bl_tree); while (0 !== --o);
                  } else 0 !== i ? (i !== a && (h(e, i, e.bl_tree), o--), h(e, Q, e.bl_tree), u(e, o - 3, 2)) : 10 >= o ? (h(e, $, e.bl_tree), u(e, o - 3, 3)) : (h(e, et, e.bl_tree), u(e, o - 11, 7));
                  o = 0, a = i, 0 === s ? (l = 138, c = 3) : i === s ? (l = 6, c = 3) : (l = 7, c = 4);
                }
              }
              function S(e) {
                var t;
                for (k(e, e.dyn_ltree, e.l_desc.max_code), k(e, e.dyn_dtree, e.d_desc.max_code), y(e, e.bl_desc), t = K - 1; t >= 3 && 0 === e.bl_tree[2 * it[t] + 1]; t--);
                return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
              }
              function z(e, t, r, n) {
                var i;
                for (u(e, t - 257, 5), u(e, r - 1, 5), u(e, n - 4, 4), i = 0; n > i; i++) u(e, e.bl_tree[2 * it[i] + 1], 3);
                x(e, e.dyn_ltree, t - 1), x(e, e.dyn_dtree, r - 1);
              }
              function E(e) {
                var t,
                  r = 4093624447;
                for (t = 0; 31 >= t; t++, r >>>= 1) if (1 & r && 0 !== e.dyn_ltree[2 * t]) return D;
                if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e.dyn_ltree[26]) return F;
                for (t = 32; M > t; t++) if (0 !== e.dyn_ltree[2 * t]) return F;
                return D;
              }
              function C(e) {
                mt || (p(), mt = !0), e.l_desc = new a(e.dyn_ltree, ft), e.d_desc = new a(e.dyn_dtree, dt), e.bl_desc = new a(e.bl_tree, pt), e.bi_buf = 0, e.bi_valid = 0, m(e);
              }
              function A(e, t, r, n) {
                u(e, (P << 1) + (n ? 1 : 0), 3), g(e, t, r, !0);
              }
              function I(e) {
                u(e, U << 1, 3), h(e, J, st), c(e);
              }
              function O(e, t, r, n) {
                var i,
                  a,
                  s = 0;
                e.level > 0 ? (e.strm.data_type === N && (e.strm.data_type = E(e)), y(e, e.l_desc), y(e, e.d_desc), s = S(e), i = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, i >= a && (i = a)) : i = a = r + 5, i >= r + 4 && -1 !== t ? A(e, t, r, n) : e.strategy === T || a === i ? (u(e, (U << 1) + (n ? 1 : 0), 3), w(e, st, ot)) : (u(e, (L << 1) + (n ? 1 : 0), 3), z(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, s + 1), w(e, e.dyn_ltree, e.dyn_dtree)), m(e), n && _(e);
              }
              function B(e, t, r) {
                return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & r, e.last_lit++, 0 === t ? e.dyn_ltree[2 * r]++ : (e.matches++, t--, e.dyn_ltree[2 * (ht[r] + M + 1)]++, e.dyn_dtree[2 * s(t)]++), e.last_lit === e.lit_bufsize - 1;
              }
              var R = e("../utils/common"),
                T = 4,
                D = 0,
                F = 1,
                N = 2,
                P = 0,
                U = 1,
                L = 2,
                j = 3,
                Z = 258,
                W = 29,
                M = 256,
                H = M + 1 + W,
                G = 30,
                K = 19,
                Y = 2 * H + 1,
                X = 15,
                V = 16,
                q = 7,
                J = 256,
                Q = 16,
                $ = 17,
                et = 18,
                tt = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0],
                rt = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],
                nt = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7],
                it = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
                at = 512,
                st = new Array(2 * (H + 2));
              n(st);
              var ot = new Array(2 * G);
              n(ot);
              var ut = new Array(at);
              n(ut);
              var ht = new Array(Z - j + 1);
              n(ht);
              var lt = new Array(W);
              n(lt);
              var ct = new Array(G);
              n(ct);
              var ft,
                dt,
                pt,
                mt = !1;
              r._tr_init = C, r._tr_stored_block = A, r._tr_flush_block = O, r._tr_tally = B, r._tr_align = I;
            }, {
              "../utils/common": 62
            }],
            74: [function (e, t, r) {
              function n() {
                this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
              }
              t.exports = n;
            }, {}]
          }, {}, [10])(10);
        }), !function (e) {
          if ("object" == typeof exports$1 && "undefined" != typeof module) {
            window.JSZip = e();
            module.exports = e();
          } else if ("function" == typeof define && define.amd) define([], e);else {
            var t;
            t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.JSZip = e();
          }
        }(function () {
          return function e(t, r, n) {
            function i(s, o) {
              if (!r[s]) {
                if (!t[s]) {
                  var u = "function" == typeof require && require;
                  if (!o && u) return u(s, !0);
                  if (a) return a(s, !0);
                  var h = new Error("Cannot find module '" + s + "'");
                  throw h.code = "MODULE_NOT_FOUND", h;
                }
                var l = r[s] = {
                  exports: {}
                };
                t[s][0].call(l.exports, function (e) {
                  var r = t[s][1][e];
                  return i(r ? r : e);
                }, l, l.exports, e, t, r, n);
              }
              return r[s].exports;
            }
            for (var a = "function" == typeof require && require, s = 0; s < n.length; s++) i(n[s]);
            return i;
          }({
            1: [function (e, t, r) {
              var n = e("./utils"),
                i = e("./support"),
                a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
              r.encode = function (e) {
                for (var t, r, i, s, o, u, h, l = [], c = 0, f = e.length, d = f, p = "string" !== n.getTypeOf(e); c < e.length;) d = f - c, p ? (t = e[c++], r = f > c ? e[c++] : 0, i = f > c ? e[c++] : 0) : (t = e.charCodeAt(c++), r = f > c ? e.charCodeAt(c++) : 0, i = f > c ? e.charCodeAt(c++) : 0), s = t >> 2, o = (3 & t) << 4 | r >> 4, u = d > 1 ? (15 & r) << 2 | i >> 6 : 64, h = d > 2 ? 63 & i : 64, l.push(a.charAt(s) + a.charAt(o) + a.charAt(u) + a.charAt(h));
                return l.join("");
              }, r.decode = function (e) {
                var t,
                  r,
                  n,
                  s,
                  o,
                  u,
                  h,
                  l = 0,
                  c = 0,
                  f = "data:";
                if (e.substr(0, f.length) === f) throw new Error("Invalid base64 input, it looks like a data url.");
                e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
                var d = 3 * e.length / 4;
                if (e.charAt(e.length - 1) === a.charAt(64) && d--, e.charAt(e.length - 2) === a.charAt(64) && d--, d % 1 !== 0) throw new Error("Invalid base64 input, bad content length.");
                var p;
                for (p = i.uint8array ? new Uint8Array(0 | d) : new Array(0 | d); l < e.length;) s = a.indexOf(e.charAt(l++)), o = a.indexOf(e.charAt(l++)), u = a.indexOf(e.charAt(l++)), h = a.indexOf(e.charAt(l++)), t = s << 2 | o >> 4, r = (15 & o) << 4 | u >> 2, n = (3 & u) << 6 | h, p[c++] = t, 64 !== u && (p[c++] = r), 64 !== h && (p[c++] = n);
                return p;
              };
            }, {
              "./support": 30,
              "./utils": 32
            }],
            2: [function (e, t, r) {
              function n(e, t, r, n, i) {
                this.compressedSize = e, this.uncompressedSize = t, this.crc32 = r, this.compression = n, this.compressedContent = i;
              }
              var i = e("./external"),
                a = e("./stream/DataWorker"),
                s = e("./stream/DataLengthProbe"),
                o = e("./stream/Crc32Probe"),
                s = e("./stream/DataLengthProbe");
              n.prototype = {
                getContentWorker: function getContentWorker() {
                  var e = new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),
                    t = this;
                  return e.on("end", function () {
                    if (this.streamInfo.data_length !== t.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
                  }), e;
                },
                getCompressedWorker: function getCompressedWorker() {
                  return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
                }
              }, n.createWorkerFrom = function (e, t, r) {
                return e.pipe(new o()).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression", t);
              }, t.exports = n;
            }, {
              "./external": 6,
              "./stream/Crc32Probe": 25,
              "./stream/DataLengthProbe": 26,
              "./stream/DataWorker": 27
            }],
            3: [function (e, t, r) {
              var n = e("./stream/GenericWorker");
              r.STORE = {
                magic: "\x00\x00",
                compressWorker: function compressWorker(e) {
                  return new n("STORE compression");
                },
                uncompressWorker: function uncompressWorker() {
                  return new n("STORE decompression");
                }
              }, r.DEFLATE = e("./flate");
            }, {
              "./flate": 7,
              "./stream/GenericWorker": 28
            }],
            4: [function (e, t, r) {
              function n() {
                for (var e, t = [], r = 0; 256 > r; r++) {
                  e = r;
                  for (var n = 0; 8 > n; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
                  t[r] = e;
                }
                return t;
              }
              function i(e, t, r, n) {
                var i = o,
                  a = n + r;
                e ^= -1;
                for (var s = n; a > s; s++) e = e >>> 8 ^ i[255 & (e ^ t[s])];
                return -1 ^ e;
              }
              function a(e, t, r, n) {
                var i = o,
                  a = n + r;
                e ^= -1;
                for (var s = n; a > s; s++) e = e >>> 8 ^ i[255 & (e ^ t.charCodeAt(s))];
                return -1 ^ e;
              }
              var s = e("./utils"),
                o = n();
              t.exports = function (e, t) {
                if ("undefined" == typeof e || !e.length) return 0;
                var r = "string" !== s.getTypeOf(e);
                return r ? i(0 | t, e, e.length, 0) : a(0 | t, e, e.length, 0);
              };
            }, {
              "./utils": 32
            }],
            5: [function (e, t, r) {
              r.base64 = !1, r.binary = !1, r.dir = !1, r.createFolders = !0, r.date = null, r.compression = null, r.compressionOptions = null, r.comment = null, r.unixPermissions = null, r.dosPermissions = null;
            }, {}],
            6: [function (e, t, r) {
              var n = null;
              n = "undefined" != typeof Promise ? Promise : e("lie"), t.exports = {
                Promise: n
              };
            }, {
              lie: 58
            }],
            7: [function (e, t, r) {
              function n(e, t) {
                o.call(this, "FlateWorker/" + e), this._pako = null, this._pakoAction = e, this._pakoOptions = t, this.meta = {};
              }
              var i = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array,
                a = e("pako"),
                s = e("./utils"),
                o = e("./stream/GenericWorker"),
                u = i ? "uint8array" : "array";
              r.magic = "\b\x00", s.inherits(n, o), n.prototype.processChunk = function (e) {
                this.meta = e.meta, null === this._pako && this._createPako(), this._pako.push(s.transformTo(u, e.data), !1);
              }, n.prototype.flush = function () {
                o.prototype.flush.call(this), null === this._pako && this._createPako(), this._pako.push([], !0);
              }, n.prototype.cleanUp = function () {
                o.prototype.cleanUp.call(this), this._pako = null;
              }, n.prototype._createPako = function () {
                this._pako = new a[this._pakoAction]({
                  raw: !0,
                  level: this._pakoOptions.level || -1
                });
                var e = this;
                this._pako.onData = function (t) {
                  e.push({
                    data: t,
                    meta: e.meta
                  });
                };
              }, r.compressWorker = function (e) {
                return new n("Deflate", e);
              }, r.uncompressWorker = function () {
                return new n("Inflate", {});
              };
            }, {
              "./stream/GenericWorker": 28,
              "./utils": 32,
              pako: 59
            }],
            8: [function (e, t, r) {
              function n(e, t, r, n) {
                a.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t, this.zipPlatform = r, this.encodeFileName = n, this.streamFiles = e, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
              }
              var i = e("../utils"),
                a = e("../stream/GenericWorker"),
                s = e("../utf8"),
                o = e("../crc32"),
                u = e("../signature"),
                h = function h(e, t) {
                  var r,
                    n = "";
                  for (r = 0; t > r; r++) n += String.fromCharCode(255 & e), e >>>= 8;
                  return n;
                },
                l = function l(e, t) {
                  var r = e;
                  return e || (r = t ? 16893 : 33204), (65535 & r) << 16;
                },
                c = function c(e, t) {
                  return 63 & (e || 0);
                },
                f = function f(e, t, r, n, a, _f2) {
                  var d,
                    p,
                    m = e.file,
                    _ = e.compression,
                    g = _f2 !== s.utf8encode,
                    v = i.transformTo("string", _f2(m.name)),
                    b = i.transformTo("string", s.utf8encode(m.name)),
                    w = m.comment,
                    y = i.transformTo("string", _f2(w)),
                    k = i.transformTo("string", s.utf8encode(w)),
                    x = b.length !== m.name.length,
                    S = k.length !== w.length,
                    z = "",
                    E = "",
                    C = "",
                    A = m.dir,
                    I = m.date,
                    O = {
                      crc32: 0,
                      compressedSize: 0,
                      uncompressedSize: 0
                    };
                  t && !r || (O.crc32 = e.crc32, O.compressedSize = e.compressedSize, O.uncompressedSize = e.uncompressedSize);
                  var B = 0;
                  t && (B |= 8), g || !x && !S || (B |= 2048);
                  var R = 0,
                    T = 0;
                  A && (R |= 16), "UNIX" === a ? (T = 798, R |= l(m.unixPermissions, A)) : (T = 20, R |= c(m.dosPermissions)), d = I.getUTCHours(), d <<= 6, d |= I.getUTCMinutes(), d <<= 5, d |= I.getUTCSeconds() / 2, p = I.getUTCFullYear() - 1980, p <<= 4, p |= I.getUTCMonth() + 1, p <<= 5, p |= I.getUTCDate(), x && (E = h(1, 1) + h(o(v), 4) + b, z += "up" + h(E.length, 2) + E), S && (C = h(1, 1) + h(o(y), 4) + k, z += "uc" + h(C.length, 2) + C);
                  var D = "";
                  D += "\n\x00", D += h(B, 2), D += _.magic, D += h(d, 2), D += h(p, 2), D += h(O.crc32, 4), D += h(O.compressedSize, 4), D += h(O.uncompressedSize, 4), D += h(v.length, 2), D += h(z.length, 2);
                  var F = u.LOCAL_FILE_HEADER + D + v + z,
                    N = u.CENTRAL_FILE_HEADER + h(T, 2) + D + h(y.length, 2) + "\x00\x00\x00\x00" + h(R, 4) + h(n, 4) + v + z + y;
                  return {
                    fileRecord: F,
                    dirRecord: N
                  };
                },
                d = function d(e, t, r, n, a) {
                  var o = i.transformTo("string", a(n));
                  return u.CENTRAL_DIRECTORY_END + "\x00\x00\x00\x00" + h(e, 2) + h(e, 2) + h(t, 4) + h(r, 4) + h(o.length, 2) + o;
                },
                p = function p(e) {
                  return u.DATA_DESCRIPTOR + h(e.crc32, 4) + h(e.compressedSize, 4) + h(e.uncompressedSize, 4);
                };
              i.inherits(n, a), n.prototype.push = function (e) {
                var t = e.meta.percent || 0,
                  r = this.entriesCount,
                  n = this._sources.length;
                this.accumulate ? this.contentBuffer.push(e) : (this.bytesWritten += e.data.length, a.prototype.push.call(this, {
                  data: e.data,
                  meta: {
                    currentFile: this.currentFile,
                    percent: r ? (t + 100 * (r - n - 1)) / r : 100
                  }
                }));
              }, n.prototype.openedSource = function (e) {
                this.currentSourceOffset = this.bytesWritten, this.currentFile = e.file.name;
                var t = this.streamFiles && !e.file.dir;
                if (t) {
                  var r = f(e, t, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
                  this.push({
                    data: r.fileRecord,
                    meta: {
                      percent: 0
                    }
                  });
                } else this.accumulate = !0;
              }, n.prototype.closedSource = function (e) {
                this.accumulate = !1;
                var t = this.streamFiles && !e.file.dir,
                  r = f(e, t, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
                if (this.dirRecords.push(r.dirRecord), t) this.push({
                  data: p(e),
                  meta: {
                    percent: 100
                  }
                });else for (this.push({
                  data: r.fileRecord,
                  meta: {
                    percent: 0
                  }
                }); this.contentBuffer.length;) this.push(this.contentBuffer.shift());
                this.currentFile = null;
              }, n.prototype.flush = function () {
                for (var e = this.bytesWritten, t = 0; t < this.dirRecords.length; t++) this.push({
                  data: this.dirRecords[t],
                  meta: {
                    percent: 100
                  }
                });
                var r = this.bytesWritten - e,
                  n = d(this.dirRecords.length, r, e, this.zipComment, this.encodeFileName);
                this.push({
                  data: n,
                  meta: {
                    percent: 100
                  }
                });
              }, n.prototype.prepareNextSource = function () {
                this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
              }, n.prototype.registerPrevious = function (e) {
                this._sources.push(e);
                var t = this;
                return e.on("data", function (e) {
                  t.processChunk(e);
                }), e.on("end", function () {
                  t.closedSource(t.previous.streamInfo), t._sources.length ? t.prepareNextSource() : t.end();
                }), e.on("error", function (e) {
                  t.error(e);
                }), this;
              }, n.prototype.resume = function () {
                return !!a.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
              }, n.prototype.error = function (e) {
                var t = this._sources;
                if (!a.prototype.error.call(this, e)) return !1;
                for (var r = 0; r < t.length; r++) try {
                  t[r].error(e);
                } catch (e) {}
                return !0;
              }, n.prototype.lock = function () {
                a.prototype.lock.call(this);
                for (var e = this._sources, t = 0; t < e.length; t++) e[t].lock();
              }, t.exports = n;
            }, {
              "../crc32": 4,
              "../signature": 23,
              "../stream/GenericWorker": 28,
              "../utf8": 31,
              "../utils": 32
            }],
            9: [function (e, t, r) {
              var n = e("../compressions"),
                i = e("./ZipFileWorker"),
                a = function a(e, t) {
                  var r = e || t,
                    i = n[r];
                  if (!i) throw new Error(r + " is not a valid compression method !");
                  return i;
                };
              r.generateWorker = function (e, t, r) {
                var n = new i(t.streamFiles, r, t.platform, t.encodeFileName),
                  s = 0;
                try {
                  e.forEach(function (e, r) {
                    s++;
                    var i = a(r.options.compression, t.compression),
                      o = r.options.compressionOptions || t.compressionOptions || {},
                      u = r.dir,
                      h = r.date;
                    r._compressWorker(i, o).withStreamInfo("file", {
                      name: e,
                      dir: u,
                      date: h,
                      comment: r.comment || "",
                      unixPermissions: r.unixPermissions,
                      dosPermissions: r.dosPermissions
                    }).pipe(n);
                  }), n.entriesCount = s;
                } catch (o) {
                  n.error(o);
                }
                return n;
              };
            }, {
              "../compressions": 3,
              "./ZipFileWorker": 8
            }],
            10: [function (e, t, r) {
              function n() {
                if (!(this instanceof n)) return new n();
                if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
                this.files = {}, this.comment = null, this.root = "", this.clone = function () {
                  var e = new n();
                  for (var t in this) "function" != typeof this[t] && (e[t] = this[t]);
                  return e;
                };
              }
              n.prototype = e("./object"), n.prototype.loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.1.5", n.loadAsync = function (e, t) {
                return new n().loadAsync(e, t);
              }, n.external = e("./external"), t.exports = n;
            }, {
              "./defaults": 5,
              "./external": 6,
              "./load": 11,
              "./object": 15,
              "./support": 30
            }],
            11: [function (e, t, r) {
              function n(e) {
                return new a.Promise(function (t, r) {
                  var n = e.decompressed.getContentWorker().pipe(new u());
                  n.on("error", function (e) {
                    r(e);
                  }).on("end", function () {
                    n.streamInfo.crc32 !== e.decompressed.crc32 ? r(new Error("Corrupted zip : CRC32 mismatch")) : t();
                  }).resume();
                });
              }
              var i = e("./utils"),
                a = e("./external"),
                s = e("./utf8"),
                i = e("./utils"),
                o = e("./zipEntries"),
                u = e("./stream/Crc32Probe"),
                h = e("./nodejsUtils");
              t.exports = function (e, t) {
                var r = this;
                return t = i.extend(t || {}, {
                  base64: !1,
                  checkCRC32: !1,
                  optimizedBinaryString: !1,
                  createFolders: !1,
                  decodeFileName: s.utf8decode
                }), h.isNode && h.isStream(e) ? a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : i.prepareContent("the loaded zip file", e, !0, t.optimizedBinaryString, t.base64).then(function (e) {
                  var r = new o(t);
                  return r.load(e), r;
                }).then(function (e) {
                  var r = [a.Promise.resolve(e)],
                    i = e.files;
                  if (t.checkCRC32) for (var s = 0; s < i.length; s++) r.push(n(i[s]));
                  return a.Promise.all(r);
                }).then(function (e) {
                  for (var n = e.shift(), i = n.files, a = 0; a < i.length; a++) {
                    var s = i[a];
                    r.file(s.fileNameStr, s.decompressed, {
                      binary: !0,
                      optimizedBinaryString: !0,
                      date: s.date,
                      dir: s.dir,
                      comment: s.fileCommentStr.length ? s.fileCommentStr : null,
                      unixPermissions: s.unixPermissions,
                      dosPermissions: s.dosPermissions,
                      createFolders: t.createFolders
                    });
                  }
                  return n.zipComment.length && (r.comment = n.zipComment), r;
                });
              };
            }, {
              "./external": 6,
              "./nodejsUtils": 14,
              "./stream/Crc32Probe": 25,
              "./utf8": 31,
              "./utils": 32,
              "./zipEntries": 33
            }],
            12: [function (e, t, r) {
              function n(e, t) {
                a.call(this, "Nodejs stream input adapter for " + e), this._upstreamEnded = !1, this._bindStream(t);
              }
              var i = e("../utils"),
                a = e("../stream/GenericWorker");
              i.inherits(n, a), n.prototype._bindStream = function (e) {
                var t = this;
                this._stream = e, e.pause(), e.on("data", function (e) {
                  t.push({
                    data: e,
                    meta: {
                      percent: 0
                    }
                  });
                }).on("error", function (e) {
                  t.isPaused ? this.generatedError = e : t.error(e);
                }).on("end", function () {
                  t.isPaused ? t._upstreamEnded = !0 : t.end();
                });
              }, n.prototype.pause = function () {
                return !!a.prototype.pause.call(this) && (this._stream.pause(), !0);
              }, n.prototype.resume = function () {
                return !!a.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
              }, t.exports = n;
            }, {
              "../stream/GenericWorker": 28,
              "../utils": 32
            }],
            13: [function (e, t, r) {
              function n(e, t, r) {
                i.call(this, t), this._helper = e;
                var n = this;
                e.on("data", function (e, t) {
                  n.push(e) || n._helper.pause(), r && r(t);
                }).on("error", function (e) {
                  n.emit("error", e);
                }).on("end", function () {
                  n.push(null);
                });
              }
              var i = e("readable-stream").Readable,
                a = e("../utils");
              a.inherits(n, i), n.prototype._read = function () {
                this._helper.resume();
              }, t.exports = n;
            }, {
              "../utils": 32,
              "readable-stream": 16
            }],
            14: [function (e, t, r) {
              t.exports = {
                isNode: "undefined" != typeof Buffer,
                newBufferFrom: function newBufferFrom(e, t) {
                  return new Buffer(e, t);
                },
                allocBuffer: function allocBuffer(e) {
                  return Buffer.alloc ? Buffer.alloc(e) : new Buffer(e);
                },
                isBuffer: function isBuffer(e) {
                  return Buffer.isBuffer(e);
                },
                isStream: function isStream(e) {
                  return e && "function" == typeof e.on && "function" == typeof e.pause && "function" == typeof e.resume;
                }
              };
            }, {}],
            15: [function (e, t, r) {
              function n(e) {
                return "[object RegExp]" === Object.prototype.toString.call(e);
              }
              var i = e("./utf8"),
                a = e("./utils"),
                s = e("./stream/GenericWorker"),
                o = e("./stream/StreamHelper"),
                u = e("./defaults"),
                h = e("./compressedObject"),
                l = e("./zipObject"),
                c = e("./generate"),
                f = e("./nodejsUtils"),
                d = e("./nodejs/NodejsStreamInputAdapter"),
                p = function p(e, t, r) {
                  var n,
                    i = a.getTypeOf(t),
                    o = a.extend(r || {}, u);
                  o.date = o.date || new Date(), null !== o.compression && (o.compression = o.compression.toUpperCase()), "string" == typeof o.unixPermissions && (o.unixPermissions = parseInt(o.unixPermissions, 8)), o.unixPermissions && 16384 & o.unixPermissions && (o.dir = !0), o.dosPermissions && 16 & o.dosPermissions && (o.dir = !0), o.dir && (e = _(e)), o.createFolders && (n = m(e)) && g.call(this, n, !0);
                  var c = "string" === i && o.binary === !1 && o.base64 === !1;
                  r && "undefined" != typeof r.binary || (o.binary = !c);
                  var p = t instanceof h && 0 === t.uncompressedSize;
                  (p || o.dir || !t || 0 === t.length) && (o.base64 = !1, o.binary = !0, t = "", o.compression = "STORE", i = "string");
                  var v = null;
                  v = t instanceof h || t instanceof s ? t : f.isNode && f.isStream(t) ? new d(e, t) : a.prepareContent(e, t, o.binary, o.optimizedBinaryString, o.base64);
                  var b = new l(e, v, o);
                  this.files[e] = b;
                },
                m = function m(e) {
                  "/" === e.slice(-1) && (e = e.substring(0, e.length - 1));
                  var t = e.lastIndexOf("/");
                  return t > 0 ? e.substring(0, t) : "";
                },
                _ = function _(e) {
                  return "/" !== e.slice(-1) && (e += "/"), e;
                },
                g = function g(e, t) {
                  return t = "undefined" != typeof t ? t : u.createFolders, e = _(e), this.files[e] || p.call(this, e, null, {
                    dir: !0,
                    createFolders: t
                  }), this.files[e];
                },
                v = {
                  load: function load() {
                    throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
                  },
                  forEach: function forEach(e) {
                    var t, r, n;
                    for (t in this.files) this.files.hasOwnProperty(t) && (n = this.files[t], r = t.slice(this.root.length, t.length), r && t.slice(0, this.root.length) === this.root && e(r, n));
                  },
                  filter: function filter(e) {
                    var t = [];
                    return this.forEach(function (r, n) {
                      e(r, n) && t.push(n);
                    }), t;
                  },
                  file: function file(e, t, r) {
                    if (1 === arguments.length) {
                      if (n(e)) {
                        var i = e;
                        return this.filter(function (e, t) {
                          return !t.dir && i.test(e);
                        });
                      }
                      var a = this.files[this.root + e];
                      return a && !a.dir ? a : null;
                    }
                    return e = this.root + e, p.call(this, e, t, r), this;
                  },
                  folder: function folder(e) {
                    if (!e) return this;
                    if (n(e)) return this.filter(function (t, r) {
                      return r.dir && e.test(t);
                    });
                    var t = this.root + e,
                      r = g.call(this, t),
                      i = this.clone();
                    return i.root = r.name, i;
                  },
                  remove: function remove(e) {
                    e = this.root + e;
                    var t = this.files[e];
                    if (t || ("/" !== e.slice(-1) && (e += "/"), t = this.files[e]), t && !t.dir) delete this.files[e];else for (var r = this.filter(function (t, r) {
                        return r.name.slice(0, e.length) === e;
                      }), n = 0; n < r.length; n++) delete this.files[r[n].name];
                    return this;
                  },
                  generate: function generate(e) {
                    throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
                  },
                  generateInternalStream: function generateInternalStream(e) {
                    var t,
                      r = {};
                    try {
                      if (r = a.extend(e || {}, {
                        streamFiles: !1,
                        compression: "STORE",
                        compressionOptions: null,
                        type: "",
                        platform: "DOS",
                        comment: null,
                        mimeType: "application/zip",
                        encodeFileName: i.utf8encode
                      }), r.type = r.type.toLowerCase(), r.compression = r.compression.toUpperCase(), "binarystring" === r.type && (r.type = "string"), !r.type) throw new Error("No output type specified.");
                      a.checkSupport(r.type), "darwin" !== r.platform && "freebsd" !== r.platform && "linux" !== r.platform && "sunos" !== r.platform || (r.platform = "UNIX"), "win32" === r.platform && (r.platform = "DOS");
                      var n = r.comment || this.comment || "";
                      t = c.generateWorker(this, r, n);
                    } catch (u) {
                      t = new s("error"), t.error(u);
                    }
                    return new o(t, r.type || "string", r.mimeType);
                  },
                  generateAsync: function generateAsync(e, t) {
                    return this.generateInternalStream(e).accumulate(t);
                  },
                  generateNodeStream: function generateNodeStream(e, t) {
                    return e = e || {}, e.type || (e.type = "nodebuffer"), this.generateInternalStream(e).toNodejsStream(t);
                  }
                };
              t.exports = v;
            }, {
              "./compressedObject": 2,
              "./defaults": 5,
              "./generate": 9,
              "./nodejs/NodejsStreamInputAdapter": 12,
              "./nodejsUtils": 14,
              "./stream/GenericWorker": 28,
              "./stream/StreamHelper": 29,
              "./utf8": 31,
              "./utils": 32,
              "./zipObject": 35
            }],
            16: [function (e, t, r) {
              t.exports = e("stream");
            }, {
              stream: void 0
            }],
            17: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
                for (var t = 0; t < this.data.length; t++) e[t] = 255 & e[t];
              }
              var i = e("./DataReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.byteAt = function (e) {
                return this.data[this.zero + e];
              }, n.prototype.lastIndexOfSignature = function (e) {
                for (var t = e.charCodeAt(0), r = e.charCodeAt(1), n = e.charCodeAt(2), i = e.charCodeAt(3), a = this.length - 4; a >= 0; --a) if (this.data[a] === t && this.data[a + 1] === r && this.data[a + 2] === n && this.data[a + 3] === i) return a - this.zero;
                return -1;
              }, n.prototype.readAndCheckSignature = function (e) {
                var t = e.charCodeAt(0),
                  r = e.charCodeAt(1),
                  n = e.charCodeAt(2),
                  i = e.charCodeAt(3),
                  a = this.readData(4);
                return t === a[0] && r === a[1] && n === a[2] && i === a[3];
              }, n.prototype.readData = function (e) {
                if (this.checkOffset(e), 0 === e) return [];
                var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./DataReader": 18
            }],
            18: [function (e, t, r) {
              function n(e) {
                this.data = e, this.length = e.length, this.index = 0, this.zero = 0;
              }
              var i = e("../utils");
              n.prototype = {
                checkOffset: function checkOffset(e) {
                  this.checkIndex(this.index + e);
                },
                checkIndex: function checkIndex(e) {
                  if (this.length < this.zero + e || 0 > e) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e + "). Corrupted zip ?");
                },
                setIndex: function setIndex(e) {
                  this.checkIndex(e), this.index = e;
                },
                skip: function skip(e) {
                  this.setIndex(this.index + e);
                },
                byteAt: function byteAt(e) {},
                readInt: function readInt(e) {
                  var t,
                    r = 0;
                  for (this.checkOffset(e), t = this.index + e - 1; t >= this.index; t--) r = (r << 8) + this.byteAt(t);
                  return this.index += e, r;
                },
                readString: function readString(e) {
                  return i.transformTo("string", this.readData(e));
                },
                readData: function readData(e) {},
                lastIndexOfSignature: function lastIndexOfSignature(e) {},
                readAndCheckSignature: function readAndCheckSignature(e) {},
                readDate: function readDate() {
                  var e = this.readInt(4);
                  return new Date(Date.UTC((e >> 25 & 127) + 1980, (e >> 21 & 15) - 1, e >> 16 & 31, e >> 11 & 31, e >> 5 & 63, (31 & e) << 1));
                }
              }, t.exports = n;
            }, {
              "../utils": 32
            }],
            19: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
              }
              var i = e("./Uint8ArrayReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.readData = function (e) {
                this.checkOffset(e);
                var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./Uint8ArrayReader": 21
            }],
            20: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
              }
              var i = e("./DataReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.byteAt = function (e) {
                return this.data.charCodeAt(this.zero + e);
              }, n.prototype.lastIndexOfSignature = function (e) {
                return this.data.lastIndexOf(e) - this.zero;
              }, n.prototype.readAndCheckSignature = function (e) {
                var t = this.readData(4);
                return e === t;
              }, n.prototype.readData = function (e) {
                this.checkOffset(e);
                var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./DataReader": 18
            }],
            21: [function (e, t, r) {
              function n(e) {
                i.call(this, e);
              }
              var i = e("./ArrayReader"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.readData = function (e) {
                if (this.checkOffset(e), 0 === e) return new Uint8Array(0);
                var t = this.data.subarray(this.zero + this.index, this.zero + this.index + e);
                return this.index += e, t;
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./ArrayReader": 17
            }],
            22: [function (e, t, r) {
              var n = e("../utils"),
                i = e("../support"),
                a = e("./ArrayReader"),
                s = e("./StringReader"),
                o = e("./NodeBufferReader"),
                u = e("./Uint8ArrayReader");
              t.exports = function (e) {
                var t = n.getTypeOf(e);
                return n.checkSupport(t), "string" !== t || i.uint8array ? "nodebuffer" === t ? new o(e) : i.uint8array ? new u(n.transformTo("uint8array", e)) : new a(n.transformTo("array", e)) : new s(e);
              };
            }, {
              "../support": 30,
              "../utils": 32,
              "./ArrayReader": 17,
              "./NodeBufferReader": 19,
              "./StringReader": 20,
              "./Uint8ArrayReader": 21
            }],
            23: [function (e, t, r) {
              r.LOCAL_FILE_HEADER = "PK", r.CENTRAL_FILE_HEADER = "PK", r.CENTRAL_DIRECTORY_END = "PK", r.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK", r.ZIP64_CENTRAL_DIRECTORY_END = "PK", r.DATA_DESCRIPTOR = "PK\b";
            }, {}],
            24: [function (e, t, r) {
              function n(e) {
                i.call(this, "ConvertWorker to " + e), this.destType = e;
              }
              var i = e("./GenericWorker"),
                a = e("../utils");
              a.inherits(n, i), n.prototype.processChunk = function (e) {
                this.push({
                  data: a.transformTo(this.destType, e.data),
                  meta: e.meta
                });
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./GenericWorker": 28
            }],
            25: [function (e, t, r) {
              function n() {
                i.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
              }
              var i = e("./GenericWorker"),
                a = e("../crc32"),
                s = e("../utils");
              s.inherits(n, i), n.prototype.processChunk = function (e) {
                this.streamInfo.crc32 = a(e.data, this.streamInfo.crc32 || 0), this.push(e);
              }, t.exports = n;
            }, {
              "../crc32": 4,
              "../utils": 32,
              "./GenericWorker": 28
            }],
            26: [function (e, t, r) {
              function n(e) {
                a.call(this, "DataLengthProbe for " + e), this.propName = e, this.withStreamInfo(e, 0);
              }
              var i = e("../utils"),
                a = e("./GenericWorker");
              i.inherits(n, a), n.prototype.processChunk = function (e) {
                if (e) {
                  var t = this.streamInfo[this.propName] || 0;
                  this.streamInfo[this.propName] = t + e.data.length;
                }
                a.prototype.processChunk.call(this, e);
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./GenericWorker": 28
            }],
            27: [function (e, t, r) {
              function n(e) {
                a.call(this, "DataWorker");
                var t = this;
                this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, e.then(function (e) {
                  t.dataIsReady = !0, t.data = e, t.max = e && e.length || 0, t.type = i.getTypeOf(e), t.isPaused || t._tickAndRepeat();
                }, function (e) {
                  t.error(e);
                });
              }
              var i = e("../utils"),
                a = e("./GenericWorker"),
                s = 16384;
              i.inherits(n, a), n.prototype.cleanUp = function () {
                a.prototype.cleanUp.call(this), this.data = null;
              }, n.prototype.resume = function () {
                return !!a.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, i.delay(this._tickAndRepeat, [], this)), !0);
              }, n.prototype._tickAndRepeat = function () {
                this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (i.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
              }, n.prototype._tick = function () {
                if (this.isPaused || this.isFinished) return !1;
                var e = s,
                  t = null,
                  r = Math.min(this.max, this.index + e);
                if (this.index >= this.max) return this.end();
                switch (this.type) {
                  case "string":
                    t = this.data.substring(this.index, r);
                    break;
                  case "uint8array":
                    t = this.data.subarray(this.index, r);
                    break;
                  case "array":
                  case "nodebuffer":
                    t = this.data.slice(this.index, r);
                }
                return this.index = r, this.push({
                  data: t,
                  meta: {
                    percent: this.max ? this.index / this.max * 100 : 0
                  }
                });
              }, t.exports = n;
            }, {
              "../utils": 32,
              "./GenericWorker": 28
            }],
            28: [function (e, t, r) {
              function n(e) {
                this.name = e || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = {
                  data: [],
                  end: [],
                  error: []
                }, this.previous = null;
              }
              n.prototype = {
                push: function push(e) {
                  this.emit("data", e);
                },
                end: function end() {
                  if (this.isFinished) return !1;
                  this.flush();
                  try {
                    this.emit("end"), this.cleanUp(), this.isFinished = !0;
                  } catch (e) {
                    this.emit("error", e);
                  }
                  return !0;
                },
                error: function error(e) {
                  return !this.isFinished && (this.isPaused ? this.generatedError = e : (this.isFinished = !0, this.emit("error", e), this.previous && this.previous.error(e), this.cleanUp()), !0);
                },
                on: function on(e, t) {
                  return this._listeners[e].push(t), this;
                },
                cleanUp: function cleanUp() {
                  this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
                },
                emit: function emit(e, t) {
                  if (this._listeners[e]) for (var r = 0; r < this._listeners[e].length; r++) this._listeners[e][r].call(this, t);
                },
                pipe: function pipe(e) {
                  return e.registerPrevious(this);
                },
                registerPrevious: function registerPrevious(e) {
                  if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
                  this.streamInfo = e.streamInfo, this.mergeStreamInfo(), this.previous = e;
                  var t = this;
                  return e.on("data", function (e) {
                    t.processChunk(e);
                  }), e.on("end", function () {
                    t.end();
                  }), e.on("error", function (e) {
                    t.error(e);
                  }), this;
                },
                pause: function pause() {
                  return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
                },
                resume: function resume() {
                  if (!this.isPaused || this.isFinished) return !1;
                  this.isPaused = !1;
                  var e = !1;
                  return this.generatedError && (this.error(this.generatedError), e = !0), this.previous && this.previous.resume(), !e;
                },
                flush: function flush() {},
                processChunk: function processChunk(e) {
                  this.push(e);
                },
                withStreamInfo: function withStreamInfo(e, t) {
                  return this.extraStreamInfo[e] = t, this.mergeStreamInfo(), this;
                },
                mergeStreamInfo: function mergeStreamInfo() {
                  for (var e in this.extraStreamInfo) this.extraStreamInfo.hasOwnProperty(e) && (this.streamInfo[e] = this.extraStreamInfo[e]);
                },
                lock: function lock() {
                  if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
                  this.isLocked = !0, this.previous && this.previous.lock();
                },
                toString: function toString() {
                  var e = "Worker " + this.name;
                  return this.previous ? this.previous + " -> " + e : e;
                }
              }, t.exports = n;
            }, {}],
            29: [function (e, t, r) {
              function n(e, t, r) {
                switch (e) {
                  case "blob":
                    return o.newBlob(o.transformTo("arraybuffer", t), r);
                  case "base64":
                    return l.encode(t);
                  default:
                    return o.transformTo(e, t);
                }
              }
              function i(e, t) {
                var r,
                  n = 0,
                  i = null,
                  a = 0;
                for (r = 0; r < t.length; r++) a += t[r].length;
                switch (e) {
                  case "string":
                    return t.join("");
                  case "array":
                    return Array.prototype.concat.apply([], t);
                  case "uint8array":
                    for (i = new Uint8Array(a), r = 0; r < t.length; r++) i.set(t[r], n), n += t[r].length;
                    return i;
                  case "nodebuffer":
                    return Buffer.concat(t);
                  default:
                    throw new Error("concat : unsupported type '" + e + "'");
                }
              }
              function a(e, t) {
                return new f.Promise(function (r, a) {
                  var s = [],
                    o = e._internalType,
                    u = e._outputType,
                    h = e._mimeType;
                  e.on("data", function (e, r) {
                    s.push(e), t && t(r);
                  }).on("error", function (e) {
                    s = [], a(e);
                  }).on("end", function () {
                    try {
                      var e = n(u, i(o, s), h);
                      r(e);
                    } catch (t) {
                      a(t);
                    }
                    s = [];
                  }).resume();
                });
              }
              function s(e, t, r) {
                var n = t;
                switch (t) {
                  case "blob":
                  case "arraybuffer":
                    n = "uint8array";
                    break;
                  case "base64":
                    n = "string";
                }
                try {
                  this._internalType = n, this._outputType = t, this._mimeType = r, o.checkSupport(n), this._worker = e.pipe(new u(n)), e.lock();
                } catch (i) {
                  this._worker = new h("error"), this._worker.error(i);
                }
              }
              var o = e("../utils"),
                u = e("./ConvertWorker"),
                h = e("./GenericWorker"),
                l = e("../base64"),
                c = e("../support"),
                f = e("../external"),
                d = null;
              if (c.nodestream) try {
                d = e("../nodejs/NodejsStreamOutputAdapter");
              } catch (p) {}
              s.prototype = {
                accumulate: function accumulate(e) {
                  return a(this, e);
                },
                on: function on(e, t) {
                  var r = this;
                  return "data" === e ? this._worker.on(e, function (e) {
                    t.call(r, e.data, e.meta);
                  }) : this._worker.on(e, function () {
                    o.delay(t, arguments, r);
                  }), this;
                },
                resume: function resume() {
                  return o.delay(this._worker.resume, [], this._worker), this;
                },
                pause: function pause() {
                  return this._worker.pause(), this;
                },
                toNodejsStream: function toNodejsStream(e) {
                  if (o.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method");
                  return new d(this, {
                    objectMode: "nodebuffer" !== this._outputType
                  }, e);
                }
              }, t.exports = s;
            }, {
              "../base64": 1,
              "../external": 6,
              "../nodejs/NodejsStreamOutputAdapter": 13,
              "../support": 30,
              "../utils": 32,
              "./ConvertWorker": 24,
              "./GenericWorker": 28
            }],
            30: [function (e, t, r) {
              if (r.base64 = !0, r.array = !0, r.string = !0, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof Buffer, r.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer) r.blob = !1;else {
                var n = new ArrayBuffer(0);
                try {
                  r.blob = 0 === new Blob([n], {
                    type: "application/zip"
                  }).size;
                } catch (i) {
                  try {
                    var a = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder,
                      s = new a();
                    s.append(n), r.blob = 0 === s.getBlob("application/zip").size;
                  } catch (i) {
                    r.blob = !1;
                  }
                }
              }
              try {
                r.nodestream = !!e("readable-stream").Readable;
              } catch (i) {
                r.nodestream = !1;
              }
            }, {
              "readable-stream": 16
            }],
            31: [function (e, t, r) {
              function n() {
                u.call(this, "utf-8 decode"), this.leftOver = null;
              }
              function i() {
                u.call(this, "utf-8 encode");
              }
              for (var a = e("./utils"), s = e("./support"), o = e("./nodejsUtils"), u = e("./stream/GenericWorker"), h = new Array(256), l = 0; 256 > l; l++) h[l] = l >= 252 ? 6 : l >= 248 ? 5 : l >= 240 ? 4 : l >= 224 ? 3 : l >= 192 ? 2 : 1;
              h[254] = h[254] = 1;
              var c = function c(e) {
                  var t,
                    r,
                    n,
                    i,
                    a,
                    o = e.length,
                    u = 0;
                  for (i = 0; o > i; i++) r = e.charCodeAt(i), 55296 === (64512 & r) && o > i + 1 && (n = e.charCodeAt(i + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++)), u += 128 > r ? 1 : 2048 > r ? 2 : 65536 > r ? 3 : 4;
                  for (t = s.uint8array ? new Uint8Array(u) : new Array(u), a = 0, i = 0; u > a; i++) r = e.charCodeAt(i), 55296 === (64512 & r) && o > i + 1 && (n = e.charCodeAt(i + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++)), 128 > r ? t[a++] = r : 2048 > r ? (t[a++] = 192 | r >>> 6, t[a++] = 128 | 63 & r) : 65536 > r ? (t[a++] = 224 | r >>> 12, t[a++] = 128 | r >>> 6 & 63, t[a++] = 128 | 63 & r) : (t[a++] = 240 | r >>> 18, t[a++] = 128 | r >>> 12 & 63, t[a++] = 128 | r >>> 6 & 63, t[a++] = 128 | 63 & r);
                  return t;
                },
                f = function f(e, t) {
                  var r;
                  for (t = t || e.length, t > e.length && (t = e.length), r = t - 1; r >= 0 && 128 === (192 & e[r]);) r--;
                  return 0 > r ? t : 0 === r ? t : r + h[e[r]] > t ? r : t;
                },
                d = function d(e) {
                  var t,
                    r,
                    n,
                    i,
                    s = e.length,
                    o = new Array(2 * s);
                  for (r = 0, t = 0; s > t;) if (n = e[t++], 128 > n) o[r++] = n;else if (i = h[n], i > 4) o[r++] = 65533, t += i - 1;else {
                    for (n &= 2 === i ? 31 : 3 === i ? 15 : 7; i > 1 && s > t;) n = n << 6 | 63 & e[t++], i--;
                    i > 1 ? o[r++] = 65533 : 65536 > n ? o[r++] = n : (n -= 65536, o[r++] = 55296 | n >> 10 & 1023, o[r++] = 56320 | 1023 & n);
                  }
                  return o.length !== r && (o.subarray ? o = o.subarray(0, r) : o.length = r), a.applyFromCharCode(o);
                };
              r.utf8encode = function (e) {
                return s.nodebuffer ? o.newBufferFrom(e, "utf-8") : c(e);
              }, r.utf8decode = function (e) {
                return s.nodebuffer ? a.transformTo("nodebuffer", e).toString("utf-8") : (e = a.transformTo(s.uint8array ? "uint8array" : "array", e), d(e));
              }, a.inherits(n, u), n.prototype.processChunk = function (e) {
                var t = a.transformTo(s.uint8array ? "uint8array" : "array", e.data);
                if (this.leftOver && this.leftOver.length) {
                  if (s.uint8array) {
                    var n = t;
                    t = new Uint8Array(n.length + this.leftOver.length), t.set(this.leftOver, 0), t.set(n, this.leftOver.length);
                  } else t = this.leftOver.concat(t);
                  this.leftOver = null;
                }
                var i = f(t),
                  o = t;
                i !== t.length && (s.uint8array ? (o = t.subarray(0, i), this.leftOver = t.subarray(i, t.length)) : (o = t.slice(0, i), this.leftOver = t.slice(i, t.length))), this.push({
                  data: r.utf8decode(o),
                  meta: e.meta
                });
              }, n.prototype.flush = function () {
                this.leftOver && this.leftOver.length && (this.push({
                  data: r.utf8decode(this.leftOver),
                  meta: {}
                }), this.leftOver = null);
              }, r.Utf8DecodeWorker = n, a.inherits(i, u), i.prototype.processChunk = function (e) {
                this.push({
                  data: r.utf8encode(e.data),
                  meta: e.meta
                });
              }, r.Utf8EncodeWorker = i;
            }, {
              "./nodejsUtils": 14,
              "./stream/GenericWorker": 28,
              "./support": 30,
              "./utils": 32
            }],
            32: [function (e, t, r) {
              function n(e) {
                var t = null;
                return t = u.uint8array ? new Uint8Array(e.length) : new Array(e.length), a(e, t);
              }
              function i(e) {
                return e;
              }
              function a(e, t) {
                for (var r = 0; r < e.length; ++r) t[r] = 255 & e.charCodeAt(r);
                return t;
              }
              function s(e) {
                var t = 65536,
                  n = r.getTypeOf(e),
                  i = !0;
                if ("uint8array" === n ? i = d.applyCanBeUsed.uint8array : "nodebuffer" === n && (i = d.applyCanBeUsed.nodebuffer), i) for (; t > 1;) try {
                  return d.stringifyByChunk(e, n, t);
                } catch (a) {
                  t = Math.floor(t / 2);
                }
                return d.stringifyByChar(e);
              }
              function o(e, t) {
                for (var r = 0; r < e.length; r++) t[r] = e[r];
                return t;
              }
              var u = e("./support"),
                h = e("./base64"),
                l = e("./nodejsUtils"),
                c = e("core-js/library/fn/set-immediate"),
                f = e("./external");
              r.newBlob = function (e, t) {
                r.checkSupport("blob");
                try {
                  return new Blob([e], {
                    type: t
                  });
                } catch (n) {
                  try {
                    var i = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder,
                      a = new i();
                    return a.append(e), a.getBlob(t);
                  } catch (n) {
                    throw new Error("Bug : can't construct the Blob.");
                  }
                }
              };
              var d = {
                stringifyByChunk: function stringifyByChunk(e, t, r) {
                  var n = [],
                    i = 0,
                    a = e.length;
                  if (r >= a) return String.fromCharCode.apply(null, e);
                  for (; a > i;) "array" === t || "nodebuffer" === t ? n.push(String.fromCharCode.apply(null, e.slice(i, Math.min(i + r, a)))) : n.push(String.fromCharCode.apply(null, e.subarray(i, Math.min(i + r, a)))), i += r;
                  return n.join("");
                },
                stringifyByChar: function stringifyByChar(e) {
                  for (var t = "", r = 0; r < e.length; r++) t += String.fromCharCode(e[r]);
                  return t;
                },
                applyCanBeUsed: {
                  uint8array: function () {
                    try {
                      return u.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length;
                    } catch (e) {
                      return !1;
                    }
                  }(),
                  nodebuffer: function () {
                    try {
                      return u.nodebuffer && 1 === String.fromCharCode.apply(null, l.allocBuffer(1)).length;
                    } catch (e) {
                      return !1;
                    }
                  }()
                }
              };
              r.applyFromCharCode = s;
              var p = {};
              p.string = {
                string: i,
                array: function array(e) {
                  return a(e, new Array(e.length));
                },
                arraybuffer: function arraybuffer(e) {
                  return p.string.uint8array(e).buffer;
                },
                uint8array: function uint8array(e) {
                  return a(e, new Uint8Array(e.length));
                },
                nodebuffer: function nodebuffer(e) {
                  return a(e, l.allocBuffer(e.length));
                }
              }, p.array = {
                string: s,
                array: i,
                arraybuffer: function arraybuffer(e) {
                  return new Uint8Array(e).buffer;
                },
                uint8array: function uint8array(e) {
                  return new Uint8Array(e);
                },
                nodebuffer: function nodebuffer(e) {
                  return l.newBufferFrom(e);
                }
              }, p.arraybuffer = {
                string: function string(e) {
                  return s(new Uint8Array(e));
                },
                array: function array(e) {
                  return o(new Uint8Array(e), new Array(e.byteLength));
                },
                arraybuffer: i,
                uint8array: function uint8array(e) {
                  return new Uint8Array(e);
                },
                nodebuffer: function nodebuffer(e) {
                  return l.newBufferFrom(new Uint8Array(e));
                }
              }, p.uint8array = {
                string: s,
                array: function array(e) {
                  return o(e, new Array(e.length));
                },
                arraybuffer: function arraybuffer(e) {
                  return e.buffer;
                },
                uint8array: i,
                nodebuffer: function nodebuffer(e) {
                  return l.newBufferFrom(e);
                }
              }, p.nodebuffer = {
                string: s,
                array: function array(e) {
                  return o(e, new Array(e.length));
                },
                arraybuffer: function arraybuffer(e) {
                  return p.nodebuffer.uint8array(e).buffer;
                },
                uint8array: function uint8array(e) {
                  return o(e, new Uint8Array(e.length));
                },
                nodebuffer: i
              }, r.transformTo = function (e, t) {
                if (t || (t = ""), !e) return t;
                r.checkSupport(e);
                var n = r.getTypeOf(t),
                  i = p[n][e](t);
                return i;
              }, r.getTypeOf = function (e) {
                return "string" == typeof e ? "string" : "[object Array]" === Object.prototype.toString.call(e) ? "array" : u.nodebuffer && l.isBuffer(e) ? "nodebuffer" : u.uint8array && e instanceof Uint8Array ? "uint8array" : u.arraybuffer && e instanceof ArrayBuffer ? "arraybuffer" : void 0;
              }, r.checkSupport = function (e) {
                var t = u[e.toLowerCase()];
                if (!t) throw new Error(e + " is not supported by this platform");
              }, r.MAX_VALUE_16BITS = 65535, r.MAX_VALUE_32BITS = -1, r.pretty = function (e) {
                var t,
                  r,
                  n = "";
                for (r = 0; r < (e || "").length; r++) t = e.charCodeAt(r), n += "\\x" + (16 > t ? "0" : "") + t.toString(16).toUpperCase();
                return n;
              }, r.delay = function (e, t, r) {
                c(function () {
                  e.apply(r || null, t || []);
                });
              }, r.inherits = function (e, t) {
                var r = function r() {};
                r.prototype = t.prototype, e.prototype = new r();
              }, r.extend = function () {
                var e,
                  t,
                  r = {};
                for (e = 0; e < arguments.length; e++) for (t in arguments[e]) arguments[e].hasOwnProperty(t) && "undefined" == typeof r[t] && (r[t] = arguments[e][t]);
                return r;
              }, r.prepareContent = function (e, t, i, a, s) {
                var o = f.Promise.resolve(t).then(function (e) {
                  var t = u.blob && (e instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(e)));
                  return t && "undefined" != typeof FileReader ? new f.Promise(function (t, r) {
                    var n = new FileReader();
                    n.onload = function (e) {
                      t(e.target.result);
                    }, n.onerror = function (e) {
                      r(e.target.error);
                    }, n.readAsArrayBuffer(e);
                  }) : e;
                });
                return o.then(function (t) {
                  var o = r.getTypeOf(t);
                  return o ? ("arraybuffer" === o ? t = r.transformTo("uint8array", t) : "string" === o && (s ? t = h.decode(t) : i && a !== !0 && (t = n(t))), t) : f.Promise.reject(new Error("Can't read the data of '" + e + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
                });
              };
            }, {
              "./base64": 1,
              "./external": 6,
              "./nodejsUtils": 14,
              "./support": 30,
              "core-js/library/fn/set-immediate": 36
            }],
            33: [function (e, t, r) {
              function n(e) {
                this.files = [], this.loadOptions = e;
              }
              var i = e("./reader/readerFor"),
                a = e("./utils"),
                s = e("./signature"),
                o = e("./zipEntry"),
                u = (e("./utf8"), e("./support"));
              n.prototype = {
                checkSignature: function checkSignature(e) {
                  if (!this.reader.readAndCheckSignature(e)) {
                    this.reader.index -= 4;
                    var t = this.reader.readString(4);
                    throw new Error("Corrupted zip or bug: unexpected signature (" + a.pretty(t) + ", expected " + a.pretty(e) + ")");
                  }
                },
                isSignature: function isSignature(e, t) {
                  var r = this.reader.index;
                  this.reader.setIndex(e);
                  var n = this.reader.readString(4),
                    i = n === t;
                  return this.reader.setIndex(r), i;
                },
                readBlockEndOfCentral: function readBlockEndOfCentral() {
                  this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
                  var e = this.reader.readData(this.zipCommentLength),
                    t = u.uint8array ? "uint8array" : "array",
                    r = a.transformTo(t, e);
                  this.zipComment = this.loadOptions.decodeFileName(r);
                },
                readBlockZip64EndOfCentral: function readBlockZip64EndOfCentral() {
                  this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
                  for (var e, t, r, n = this.zip64EndOfCentralSize - 44, i = 0; n > i;) e = this.reader.readInt(2), t = this.reader.readInt(4), r = this.reader.readData(t), this.zip64ExtensibleData[e] = {
                    id: e,
                    length: t,
                    value: r
                  };
                },
                readBlockZip64EndOfCentralLocator: function readBlockZip64EndOfCentralLocator() {
                  if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), this.disksCount > 1) throw new Error("Multi-volumes zip are not supported");
                },
                readLocalFiles: function readLocalFiles() {
                  var e, t;
                  for (e = 0; e < this.files.length; e++) t = this.files[e], this.reader.setIndex(t.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), t.readLocalPart(this.reader), t.handleUTF8(), t.processAttributes();
                },
                readCentralDir: function readCentralDir() {
                  var e;
                  for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);) e = new o({
                    zip64: this.zip64
                  }, this.loadOptions), e.readCentralPart(this.reader), this.files.push(e);
                  if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && 0 === this.files.length) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
                },
                readEndOfCentral: function readEndOfCentral() {
                  var e = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
                  if (0 > e) {
                    var t = !this.isSignature(0, s.LOCAL_FILE_HEADER);
                    throw t ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory");
                  }
                  this.reader.setIndex(e);
                  var r = e;
                  if (this.checkSignature(s.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === a.MAX_VALUE_16BITS || this.diskWithCentralDirStart === a.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === a.MAX_VALUE_16BITS || this.centralDirRecords === a.MAX_VALUE_16BITS || this.centralDirSize === a.MAX_VALUE_32BITS || this.centralDirOffset === a.MAX_VALUE_32BITS) {
                    if (this.zip64 = !0, e = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), 0 > e) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
                    if (this.reader.setIndex(e), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
                    this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
                  }
                  var n = this.centralDirOffset + this.centralDirSize;
                  this.zip64 && (n += 20, n += 12 + this.zip64EndOfCentralSize);
                  var i = r - n;
                  if (i > 0) this.isSignature(r, s.CENTRAL_FILE_HEADER) || (this.reader.zero = i);else if (0 > i) throw new Error("Corrupted zip: missing " + Math.abs(i) + " bytes.");
                },
                prepareReader: function prepareReader(e) {
                  this.reader = i(e);
                },
                load: function load(e) {
                  this.prepareReader(e), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
                }
              }, t.exports = n;
            }, {
              "./reader/readerFor": 22,
              "./signature": 23,
              "./support": 30,
              "./utf8": 31,
              "./utils": 32,
              "./zipEntry": 34
            }],
            34: [function (e, t, r) {
              function n(e, t) {
                this.options = e, this.loadOptions = t;
              }
              var i = e("./reader/readerFor"),
                a = e("./utils"),
                s = e("./compressedObject"),
                o = e("./crc32"),
                u = e("./utf8"),
                h = e("./compressions"),
                l = e("./support"),
                c = 0,
                f = 3,
                d = function d(e) {
                  for (var t in h) if (h.hasOwnProperty(t) && h[t].magic === e) return h[t];
                  return null;
                };
              n.prototype = {
                isEncrypted: function isEncrypted() {
                  return 1 === (1 & this.bitFlag);
                },
                useUTF8: function useUTF8() {
                  return 2048 === (2048 & this.bitFlag);
                },
                readLocalPart: function readLocalPart(e) {
                  var t, r;
                  if (e.skip(22), this.fileNameLength = e.readInt(2), r = e.readInt(2), this.fileName = e.readData(this.fileNameLength), e.skip(r), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");
                  if (t = d(this.compressionMethod), null === t) throw new Error("Corrupted zip : compression " + a.pretty(this.compressionMethod) + " unknown (inner file : " + a.transformTo("string", this.fileName) + ")");
                  this.decompressed = new s(this.compressedSize, this.uncompressedSize, this.crc32, t, e.readData(this.compressedSize));
                },
                readCentralPart: function readCentralPart(e) {
                  this.versionMadeBy = e.readInt(2), e.skip(2), this.bitFlag = e.readInt(2), this.compressionMethod = e.readString(2), this.date = e.readDate(), this.crc32 = e.readInt(4), this.compressedSize = e.readInt(4), this.uncompressedSize = e.readInt(4);
                  var t = e.readInt(2);
                  if (this.extraFieldsLength = e.readInt(2), this.fileCommentLength = e.readInt(2), this.diskNumberStart = e.readInt(2), this.internalFileAttributes = e.readInt(2), this.externalFileAttributes = e.readInt(4), this.localHeaderOffset = e.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
                  e.skip(t), this.readExtraFields(e), this.parseZIP64ExtraField(e), this.fileComment = e.readData(this.fileCommentLength);
                },
                processAttributes: function processAttributes() {
                  this.unixPermissions = null, this.dosPermissions = null;
                  var e = this.versionMadeBy >> 8;
                  this.dir = !!(16 & this.externalFileAttributes), e === c && (this.dosPermissions = 63 & this.externalFileAttributes), e === f && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = !0);
                },
                parseZIP64ExtraField: function parseZIP64ExtraField(e) {
                  if (this.extraFields[1]) {
                    var t = i(this.extraFields[1].value);
                    this.uncompressedSize === a.MAX_VALUE_32BITS && (this.uncompressedSize = t.readInt(8)), this.compressedSize === a.MAX_VALUE_32BITS && (this.compressedSize = t.readInt(8)), this.localHeaderOffset === a.MAX_VALUE_32BITS && (this.localHeaderOffset = t.readInt(8)), this.diskNumberStart === a.MAX_VALUE_32BITS && (this.diskNumberStart = t.readInt(4));
                  }
                },
                readExtraFields: function readExtraFields(e) {
                  var t,
                    r,
                    n,
                    i = e.index + this.extraFieldsLength;
                  for (this.extraFields || (this.extraFields = {}); e.index < i;) t = e.readInt(2), r = e.readInt(2), n = e.readData(r), this.extraFields[t] = {
                    id: t,
                    length: r,
                    value: n
                  };
                },
                handleUTF8: function handleUTF8() {
                  var e = l.uint8array ? "uint8array" : "array";
                  if (this.useUTF8()) this.fileNameStr = u.utf8decode(this.fileName), this.fileCommentStr = u.utf8decode(this.fileComment);else {
                    var t = this.findExtraFieldUnicodePath();
                    if (null !== t) this.fileNameStr = t;else {
                      var r = a.transformTo(e, this.fileName);
                      this.fileNameStr = this.loadOptions.decodeFileName(r);
                    }
                    var n = this.findExtraFieldUnicodeComment();
                    if (null !== n) this.fileCommentStr = n;else {
                      var i = a.transformTo(e, this.fileComment);
                      this.fileCommentStr = this.loadOptions.decodeFileName(i);
                    }
                  }
                },
                findExtraFieldUnicodePath: function findExtraFieldUnicodePath() {
                  var e = this.extraFields[28789];
                  if (e) {
                    var t = i(e.value);
                    return 1 !== t.readInt(1) ? null : o(this.fileName) !== t.readInt(4) ? null : u.utf8decode(t.readData(e.length - 5));
                  }
                  return null;
                },
                findExtraFieldUnicodeComment: function findExtraFieldUnicodeComment() {
                  var e = this.extraFields[25461];
                  if (e) {
                    var t = i(e.value);
                    return 1 !== t.readInt(1) ? null : o(this.fileComment) !== t.readInt(4) ? null : u.utf8decode(t.readData(e.length - 5));
                  }
                  return null;
                }
              }, t.exports = n;
            }, {
              "./compressedObject": 2,
              "./compressions": 3,
              "./crc32": 4,
              "./reader/readerFor": 22,
              "./support": 30,
              "./utf8": 31,
              "./utils": 32
            }],
            35: [function (e, t, r) {
              var n = e("./stream/StreamHelper"),
                i = e("./stream/DataWorker"),
                a = e("./utf8"),
                s = e("./compressedObject"),
                o = e("./stream/GenericWorker"),
                u = function u(e, t, r) {
                  this.name = e, this.dir = r.dir, this.date = r.date, this.comment = r.comment, this.unixPermissions = r.unixPermissions, this.dosPermissions = r.dosPermissions, this._data = t, this._dataBinary = r.binary, this.options = {
                    compression: r.compression,
                    compressionOptions: r.compressionOptions
                  };
                };
              u.prototype = {
                internalStream: function internalStream(e) {
                  var t = null,
                    r = "string";
                  try {
                    if (!e) throw new Error("No output type specified.");
                    r = e.toLowerCase();
                    var i = "string" === r || "text" === r;
                    "binarystring" !== r && "text" !== r || (r = "string"), t = this._decompressWorker();
                    var s = !this._dataBinary;
                    s && !i && (t = t.pipe(new a.Utf8EncodeWorker())), !s && i && (t = t.pipe(new a.Utf8DecodeWorker()));
                  } catch (u) {
                    t = new o("error"), t.error(u);
                  }
                  return new n(t, r, "");
                },
                async: function async(e, t) {
                  return this.internalStream(e).accumulate(t);
                },
                nodeStream: function nodeStream(e, t) {
                  return this.internalStream(e || "nodebuffer").toNodejsStream(t);
                },
                _compressWorker: function _compressWorker(e, t) {
                  if (this._data instanceof s && this._data.compression.magic === e.magic) return this._data.getCompressedWorker();
                  var r = this._decompressWorker();
                  return this._dataBinary || (r = r.pipe(new a.Utf8EncodeWorker())), s.createWorkerFrom(r, e, t);
                },
                _decompressWorker: function _decompressWorker() {
                  return this._data instanceof s ? this._data.getContentWorker() : this._data instanceof o ? this._data : new i(this._data);
                }
              };
              for (var h = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], l = function l() {
                  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
                }, c = 0; c < h.length; c++) u.prototype[h[c]] = l;
              t.exports = u;
            }, {
              "./compressedObject": 2,
              "./stream/DataWorker": 27,
              "./stream/GenericWorker": 28,
              "./stream/StreamHelper": 29,
              "./utf8": 31
            }],
            36: [function (e, t, r) {
              e("../modules/web.immediate"), t.exports = e("../modules/_core").setImmediate;
            }, {
              "../modules/_core": 40,
              "../modules/web.immediate": 56
            }],
            37: [function (e, t, r) {
              t.exports = function (e) {
                if ("function" != typeof e) throw TypeError(e + " is not a function!");
                return e;
              };
            }, {}],
            38: [function (e, t, r) {
              var n = e("./_is-object");
              t.exports = function (e) {
                if (!n(e)) throw TypeError(e + " is not an object!");
                return e;
              };
            }, {
              "./_is-object": 51
            }],
            39: [function (e, t, r) {
              var n = {}.toString;
              t.exports = function (e) {
                return n.call(e).slice(8, -1);
              };
            }, {}],
            40: [function (e, t, r) {
              var n = t.exports = {
                version: "2.3.0"
              };
              "number" == typeof __e && (__e = n);
            }, {}],
            41: [function (e, t, r) {
              var n = e("./_a-function");
              t.exports = function (e, t, r) {
                if (n(e), void 0 === t) return e;
                switch (r) {
                  case 1:
                    return function (r) {
                      return e.call(t, r);
                    };
                  case 2:
                    return function (r, n) {
                      return e.call(t, r, n);
                    };
                  case 3:
                    return function (r, n, i) {
                      return e.call(t, r, n, i);
                    };
                }
                return function () {
                  return e.apply(t, arguments);
                };
              };
            }, {
              "./_a-function": 37
            }],
            42: [function (e, t, r) {
              t.exports = !e("./_fails")(function () {
                return 7 != Object.defineProperty({}, "a", {
                  get: function get() {
                    return 7;
                  }
                }).a;
              });
            }, {
              "./_fails": 45
            }],
            43: [function (e, t, r) {
              var n = e("./_is-object"),
                i = e("./_global").document,
                a = n(i) && n(i.createElement);
              t.exports = function (e) {
                return a ? i.createElement(e) : {};
              };
            }, {
              "./_global": 46,
              "./_is-object": 51
            }],
            44: [function (e, t, r) {
              var n = e("./_global"),
                i = e("./_core"),
                a = e("./_ctx"),
                s = e("./_hide"),
                o = "prototype",
                u = function u(e, t, r) {
                  var h,
                    l,
                    c,
                    f = e & u.F,
                    d = e & u.G,
                    p = e & u.S,
                    m = e & u.P,
                    _ = e & u.B,
                    g = e & u.W,
                    v = d ? i : i[t] || (i[t] = {}),
                    b = v[o],
                    w = d ? n : p ? n[t] : (n[t] || {})[o];
                  d && (r = t);
                  for (h in r) l = !f && w && void 0 !== w[h], l && h in v || (c = l ? w[h] : r[h], v[h] = d && "function" != typeof w[h] ? r[h] : _ && l ? a(c, n) : g && w[h] == c ? function (e) {
                    var t = function t(_t3, r, n) {
                      if (this instanceof e) {
                        switch (arguments.length) {
                          case 0:
                            return new e();
                          case 1:
                            return new e(_t3);
                          case 2:
                            return new e(_t3, r);
                        }
                        return new e(_t3, r, n);
                      }
                      return e.apply(this, arguments);
                    };
                    return t[o] = e[o], t;
                  }(c) : m && "function" == typeof c ? a(Function.call, c) : c, m && ((v.virtual || (v.virtual = {}))[h] = c, e & u.R && b && !b[h] && s(b, h, c)));
                };
              u.F = 1, u.G = 2, u.S = 4, u.P = 8, u.B = 16, u.W = 32, u.U = 64, u.R = 128, t.exports = u;
            }, {
              "./_core": 40,
              "./_ctx": 41,
              "./_global": 46,
              "./_hide": 47
            }],
            45: [function (e, t, r) {
              t.exports = function (e) {
                try {
                  return !!e();
                } catch (t) {
                  return !0;
                }
              };
            }, {}],
            46: [function (e, t, r) {
              var n = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
              "number" == typeof __g && (__g = n);
            }, {}],
            47: [function (e, t, r) {
              var n = e("./_object-dp"),
                i = e("./_property-desc");
              t.exports = e("./_descriptors") ? function (e, t, r) {
                return n.f(e, t, i(1, r));
              } : function (e, t, r) {
                return e[t] = r, e;
              };
            }, {
              "./_descriptors": 42,
              "./_object-dp": 52,
              "./_property-desc": 53
            }],
            48: [function (e, t, r) {
              t.exports = e("./_global").document && document.documentElement;
            }, {
              "./_global": 46
            }],
            49: [function (e, t, r) {
              t.exports = !e("./_descriptors") && !e("./_fails")(function () {
                return 7 != Object.defineProperty(e("./_dom-create")("div"), "a", {
                  get: function get() {
                    return 7;
                  }
                }).a;
              });
            }, {
              "./_descriptors": 42,
              "./_dom-create": 43,
              "./_fails": 45
            }],
            50: [function (e, t, r) {
              t.exports = function (e, t, r) {
                var n = void 0 === r;
                switch (t.length) {
                  case 0:
                    return n ? e() : e.call(r);
                  case 1:
                    return n ? e(t[0]) : e.call(r, t[0]);
                  case 2:
                    return n ? e(t[0], t[1]) : e.call(r, t[0], t[1]);
                  case 3:
                    return n ? e(t[0], t[1], t[2]) : e.call(r, t[0], t[1], t[2]);
                  case 4:
                    return n ? e(t[0], t[1], t[2], t[3]) : e.call(r, t[0], t[1], t[2], t[3]);
                }
                return e.apply(r, t);
              };
            }, {}],
            51: [function (e, t, r) {
              t.exports = function (e) {
                return "object" == typeof e ? null !== e : "function" == typeof e;
              };
            }, {}],
            52: [function (e, t, r) {
              var n = e("./_an-object"),
                i = e("./_ie8-dom-define"),
                a = e("./_to-primitive"),
                s = Object.defineProperty;
              r.f = e("./_descriptors") ? Object.defineProperty : function (e, t, r) {
                if (n(e), t = a(t, !0), n(r), i) try {
                  return s(e, t, r);
                } catch (o) {}
                if ("get" in r || "set" in r) throw TypeError("Accessors not supported!");
                return "value" in r && (e[t] = r.value), e;
              };
            }, {
              "./_an-object": 38,
              "./_descriptors": 42,
              "./_ie8-dom-define": 49,
              "./_to-primitive": 55
            }],
            53: [function (e, t, r) {
              t.exports = function (e, t) {
                return {
                  enumerable: !(1 & e),
                  configurable: !(2 & e),
                  writable: !(4 & e),
                  value: t
                };
              };
            }, {}],
            54: [function (e, t, r) {
              var n,
                i,
                a,
                s = e("./_ctx"),
                o = e("./_invoke"),
                u = e("./_html"),
                h = e("./_dom-create"),
                l = e("./_global"),
                c = l.process,
                f = l.setImmediate,
                d = l.clearImmediate,
                p = l.MessageChannel,
                m = 0,
                _ = {},
                g = "onreadystatechange",
                v = function v() {
                  var e = +this;
                  if (_.hasOwnProperty(e)) {
                    var t = _[e];
                    delete _[e], t();
                  }
                },
                b = function b(e) {
                  v.call(e.data);
                };
              f && d || (f = function f(e) {
                for (var t = [], r = 1; arguments.length > r;) t.push(arguments[r++]);
                return _[++m] = function () {
                  o("function" == typeof e ? e : Function(e), t);
                }, n(m), m;
              }, d = function d(e) {
                delete _[e];
              }, "process" == e("./_cof")(c) ? n = function n(e) {
                c.nextTick(s(v, e, 1));
              } : p ? (i = new p(), a = i.port2, i.port1.onmessage = b, n = s(a.postMessage, a, 1)) : l.addEventListener && "function" == typeof postMessage && !l.importScripts ? (n = function n(e) {
                l.postMessage(e + "", "*");
              }, l.addEventListener("message", b, !1)) : n = g in h("script") ? function (e) {
                u.appendChild(h("script"))[g] = function () {
                  u.removeChild(this), v.call(e);
                };
              } : function (e) {
                setTimeout(s(v, e, 1), 0);
              }), t.exports = {
                set: f,
                clear: d
              };
            }, {
              "./_cof": 39,
              "./_ctx": 41,
              "./_dom-create": 43,
              "./_global": 46,
              "./_html": 48,
              "./_invoke": 50
            }],
            55: [function (e, t, r) {
              var n = e("./_is-object");
              t.exports = function (e, t) {
                if (!n(e)) return e;
                var r, i;
                if (t && "function" == typeof (r = e.toString) && !n(i = r.call(e))) return i;
                if ("function" == typeof (r = e.valueOf) && !n(i = r.call(e))) return i;
                if (!t && "function" == typeof (r = e.toString) && !n(i = r.call(e))) return i;
                throw TypeError("Can't convert object to primitive value");
              };
            }, {
              "./_is-object": 51
            }],
            56: [function (e, t, r) {
              var n = e("./_export"),
                i = e("./_task");
              n(n.G + n.B, {
                setImmediate: i.set,
                clearImmediate: i.clear
              });
            }, {
              "./_export": 44,
              "./_task": 54
            }],
            57: [function (e, t, r) {
              (function (e) {
                function r() {
                  l = !0;
                  for (var e, t, r = c.length; r;) {
                    for (t = c, c = [], e = -1; ++e < r;) t[e]();
                    r = c.length;
                  }
                  l = !1;
                }
                function n(e) {
                  1 !== c.push(e) || l || i();
                }
                var i,
                  a = e.MutationObserver || e.WebKitMutationObserver;
                if (a) {
                  var s = 0,
                    o = new a(r),
                    u = e.document.createTextNode("");
                  o.observe(u, {
                    characterData: !0
                  }), i = function i() {
                    u.data = s = ++s % 2;
                  };
                } else if (e.setImmediate || "undefined" == typeof e.MessageChannel) i = "document" in e && "onreadystatechange" in e.document.createElement("script") ? function () {
                  var t = e.document.createElement("script");
                  t.onreadystatechange = function () {
                    r(), t.onreadystatechange = null, t.parentNode.removeChild(t), t = null;
                  }, e.document.documentElement.appendChild(t);
                } : function () {
                  setTimeout(r, 0);
                };else {
                  var h = new e.MessageChannel();
                  h.port1.onmessage = r, i = function i() {
                    h.port2.postMessage(0);
                  };
                }
                var l,
                  c = [];
                t.exports = n;
              }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
            }, {}],
            58: [function (e, t, r) {
              function n() {}
              function i(e) {
                if ("function" != typeof e) throw new TypeError("resolver must be a function");
                this.state = v, this.queue = [], this.outcome = void 0, e !== n && u(this, e);
              }
              function a(e, t, r) {
                this.promise = e, "function" == typeof t && (this.onFulfilled = t, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r && (this.onRejected = r, this.callRejected = this.otherCallRejected);
              }
              function s(e, t, r) {
                p(function () {
                  var n;
                  try {
                    n = t(r);
                  } catch (i) {
                    return m.reject(e, i);
                  }
                  n === e ? m.reject(e, new TypeError("Cannot resolve promise with itself")) : m.resolve(e, n);
                });
              }
              function o(e) {
                var t = e && e.then;
                return !e || "object" != typeof e && "function" != typeof e || "function" != typeof t ? void 0 : function () {
                  t.apply(e, arguments);
                };
              }
              function u(e, t) {
                function r(t) {
                  a || (a = !0, m.reject(e, t));
                }
                function n(t) {
                  a || (a = !0, m.resolve(e, t));
                }
                function i() {
                  t(n, r);
                }
                var a = !1,
                  s = h(i);
                "error" === s.status && r(s.value);
              }
              function h(e, t) {
                var r = {};
                try {
                  r.value = e(t), r.status = "success";
                } catch (n) {
                  r.status = "error", r.value = n;
                }
                return r;
              }
              function l(e) {
                return e instanceof this ? e : m.resolve(new this(n), e);
              }
              function c(e) {
                var t = new this(n);
                return m.reject(t, e);
              }
              function f(e) {
                function t(e, t) {
                  function n(e) {
                    s[t] = e, ++o !== i || a || (a = !0, m.resolve(h, s));
                  }
                  r.resolve(e).then(n, function (e) {
                    a || (a = !0, m.reject(h, e));
                  });
                }
                var r = this;
                if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
                var i = e.length,
                  a = !1;
                if (!i) return this.resolve([]);
                for (var s = new Array(i), o = 0, u = -1, h = new this(n); ++u < i;) t(e[u], u);
                return h;
              }
              function d(e) {
                function t(e) {
                  r.resolve(e).then(function (e) {
                    a || (a = !0, m.resolve(o, e));
                  }, function (e) {
                    a || (a = !0, m.reject(o, e));
                  });
                }
                var r = this;
                if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
                var i = e.length,
                  a = !1;
                if (!i) return this.resolve([]);
                for (var s = -1, o = new this(n); ++s < i;) t(e[s]);
                return o;
              }
              var p = e("immediate"),
                m = {},
                _ = ["REJECTED"],
                g = ["FULFILLED"],
                v = ["PENDING"];
              t.exports = i, i.prototype["catch"] = function (e) {
                return this.then(null, e);
              }, i.prototype.then = function (e, t) {
                if ("function" != typeof e && this.state === g || "function" != typeof t && this.state === _) return this;
                var r = new this.constructor(n);
                if (this.state !== v) {
                  var i = this.state === g ? e : t;
                  s(r, i, this.outcome);
                } else this.queue.push(new a(r, e, t));
                return r;
              }, a.prototype.callFulfilled = function (e) {
                m.resolve(this.promise, e);
              }, a.prototype.otherCallFulfilled = function (e) {
                s(this.promise, this.onFulfilled, e);
              }, a.prototype.callRejected = function (e) {
                m.reject(this.promise, e);
              }, a.prototype.otherCallRejected = function (e) {
                s(this.promise, this.onRejected, e);
              }, m.resolve = function (e, t) {
                var r = h(o, t);
                if ("error" === r.status) return m.reject(e, r.value);
                var n = r.value;
                if (n) u(e, n);else {
                  e.state = g, e.outcome = t;
                  for (var i = -1, a = e.queue.length; ++i < a;) e.queue[i].callFulfilled(t);
                }
                return e;
              }, m.reject = function (e, t) {
                e.state = _, e.outcome = t;
                for (var r = -1, n = e.queue.length; ++r < n;) e.queue[r].callRejected(t);
                return e;
              }, i.resolve = l, i.reject = c, i.all = f, i.race = d;
            }, {
              immediate: 57
            }],
            59: [function (e, t, r) {
              var n = e("./lib/utils/common").assign,
                i = e("./lib/deflate"),
                a = e("./lib/inflate"),
                s = e("./lib/zlib/constants"),
                o = {};
              n(o, i, a, s), t.exports = o;
            }, {
              "./lib/deflate": 60,
              "./lib/inflate": 61,
              "./lib/utils/common": 62,
              "./lib/zlib/constants": 65
            }],
            60: [function (e, t, r) {
              function n(e) {
                if (!(this instanceof n)) return new n(e);
                this.options = u.assign({
                  level: v,
                  method: w,
                  chunkSize: 16384,
                  windowBits: 15,
                  memLevel: 8,
                  strategy: b,
                  to: ""
                }, e || {});
                var t = this.options;
                t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new c(), this.strm.avail_out = 0;
                var r = o.deflateInit2(this.strm, t.level, t.method, t.windowBits, t.memLevel, t.strategy);
                if (r !== m) throw new Error(l[r]);
                if (t.header && o.deflateSetHeader(this.strm, t.header), t.dictionary) {
                  var i;
                  if (i = "string" == typeof t.dictionary ? h.string2buf(t.dictionary) : "[object ArrayBuffer]" === f.call(t.dictionary) ? new Uint8Array(t.dictionary) : t.dictionary, r = o.deflateSetDictionary(this.strm, i), r !== m) throw new Error(l[r]);
                  this._dict_set = !0;
                }
              }
              function i(e, t) {
                var r = new n(t);
                if (r.push(e, !0), r.err) throw r.msg || l[r.err];
                return r.result;
              }
              function a(e, t) {
                return t = t || {}, t.raw = !0, i(e, t);
              }
              function s(e, t) {
                return t = t || {}, t.gzip = !0, i(e, t);
              }
              var o = e("./zlib/deflate"),
                u = e("./utils/common"),
                h = e("./utils/strings"),
                l = e("./zlib/messages"),
                c = e("./zlib/zstream"),
                f = Object.prototype.toString,
                d = 0,
                p = 4,
                m = 0,
                _ = 1,
                g = 2,
                v = -1,
                b = 0,
                w = 8;
              n.prototype.push = function (e, t) {
                var r,
                  n,
                  i = this.strm,
                  a = this.options.chunkSize;
                if (this.ended) return !1;
                n = t === ~~t ? t : t === !0 ? p : d, "string" == typeof e ? i.input = h.string2buf(e) : "[object ArrayBuffer]" === f.call(e) ? i.input = new Uint8Array(e) : i.input = e, i.next_in = 0, i.avail_in = i.input.length;
                do {
                  if (0 === i.avail_out && (i.output = new u.Buf8(a), i.next_out = 0, i.avail_out = a), r = o.deflate(i, n), r !== _ && r !== m) return this.onEnd(r), this.ended = !0, !1;
                  0 !== i.avail_out && (0 !== i.avail_in || n !== p && n !== g) || ("string" === this.options.to ? this.onData(h.buf2binstring(u.shrinkBuf(i.output, i.next_out))) : this.onData(u.shrinkBuf(i.output, i.next_out)));
                } while ((i.avail_in > 0 || 0 === i.avail_out) && r !== _);
                return n === p ? (r = o.deflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === m) : n !== g || (this.onEnd(m), i.avail_out = 0, !0);
              }, n.prototype.onData = function (e) {
                this.chunks.push(e);
              }, n.prototype.onEnd = function (e) {
                e === m && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = u.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
              }, r.Deflate = n, r.deflate = i, r.deflateRaw = a, r.gzip = s;
            }, {
              "./utils/common": 62,
              "./utils/strings": 63,
              "./zlib/deflate": 67,
              "./zlib/messages": 72,
              "./zlib/zstream": 74
            }],
            61: [function (e, t, r) {
              function n(e) {
                if (!(this instanceof n)) return new n(e);
                this.options = o.assign({
                  chunkSize: 16384,
                  windowBits: 0,
                  to: ""
                }, e || {});
                var t = this.options;
                t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(t.windowBits >= 0 && t.windowBits < 16) || e && e.windowBits || (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && 0 === (15 & t.windowBits) && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new c(), this.strm.avail_out = 0;
                var r = s.inflateInit2(this.strm, t.windowBits);
                if (r !== h.Z_OK) throw new Error(l[r]);
                this.header = new f(), s.inflateGetHeader(this.strm, this.header);
              }
              function i(e, t) {
                var r = new n(t);
                if (r.push(e, !0), r.err) throw r.msg || l[r.err];
                return r.result;
              }
              function a(e, t) {
                return t = t || {}, t.raw = !0, i(e, t);
              }
              var s = e("./zlib/inflate"),
                o = e("./utils/common"),
                u = e("./utils/strings"),
                h = e("./zlib/constants"),
                l = e("./zlib/messages"),
                c = e("./zlib/zstream"),
                f = e("./zlib/gzheader"),
                d = Object.prototype.toString;
              n.prototype.push = function (e, t) {
                var r,
                  n,
                  i,
                  a,
                  l,
                  c,
                  f = this.strm,
                  p = this.options.chunkSize,
                  m = this.options.dictionary,
                  _ = !1;
                if (this.ended) return !1;
                n = t === ~~t ? t : t === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, "string" == typeof e ? f.input = u.binstring2buf(e) : "[object ArrayBuffer]" === d.call(e) ? f.input = new Uint8Array(e) : f.input = e, f.next_in = 0, f.avail_in = f.input.length;
                do {
                  if (0 === f.avail_out && (f.output = new o.Buf8(p), f.next_out = 0, f.avail_out = p), r = s.inflate(f, h.Z_NO_FLUSH), r === h.Z_NEED_DICT && m && (c = "string" == typeof m ? u.string2buf(m) : "[object ArrayBuffer]" === d.call(m) ? new Uint8Array(m) : m, r = s.inflateSetDictionary(this.strm, c)), r === h.Z_BUF_ERROR && _ === !0 && (r = h.Z_OK, _ = !1), r !== h.Z_STREAM_END && r !== h.Z_OK) return this.onEnd(r), this.ended = !0, !1;
                  f.next_out && (0 !== f.avail_out && r !== h.Z_STREAM_END && (0 !== f.avail_in || n !== h.Z_FINISH && n !== h.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i = u.utf8border(f.output, f.next_out), a = f.next_out - i, l = u.buf2string(f.output, i), f.next_out = a, f.avail_out = p - a, a && o.arraySet(f.output, f.output, i, a, 0), this.onData(l)) : this.onData(o.shrinkBuf(f.output, f.next_out)))), 0 === f.avail_in && 0 === f.avail_out && (_ = !0);
                } while ((f.avail_in > 0 || 0 === f.avail_out) && r !== h.Z_STREAM_END);
                return r === h.Z_STREAM_END && (n = h.Z_FINISH), n === h.Z_FINISH ? (r = s.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === h.Z_OK) : n !== h.Z_SYNC_FLUSH || (this.onEnd(h.Z_OK), f.avail_out = 0, !0);
              }, n.prototype.onData = function (e) {
                this.chunks.push(e);
              }, n.prototype.onEnd = function (e) {
                e === h.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
              }, r.Inflate = n, r.inflate = i, r.inflateRaw = a, r.ungzip = i;
            }, {
              "./utils/common": 62,
              "./utils/strings": 63,
              "./zlib/constants": 65,
              "./zlib/gzheader": 68,
              "./zlib/inflate": 70,
              "./zlib/messages": 72,
              "./zlib/zstream": 74
            }],
            62: [function (e, t, r) {
              var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
              r.assign = function (e) {
                for (var t = Array.prototype.slice.call(arguments, 1); t.length;) {
                  var r = t.shift();
                  if (r) {
                    if ("object" != typeof r) throw new TypeError(r + "must be non-object");
                    for (var n in r) r.hasOwnProperty(n) && (e[n] = r[n]);
                  }
                }
                return e;
              }, r.shrinkBuf = function (e, t) {
                return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e);
              };
              var i = {
                  arraySet: function arraySet(e, t, r, n, i) {
                    if (t.subarray && e.subarray) return void e.set(t.subarray(r, r + n), i);
                    for (var a = 0; n > a; a++) e[i + a] = t[r + a];
                  },
                  flattenChunks: function flattenChunks(e) {
                    var t, r, n, i, a, s;
                    for (n = 0, t = 0, r = e.length; r > t; t++) n += e[t].length;
                    for (s = new Uint8Array(n), i = 0, t = 0, r = e.length; r > t; t++) a = e[t], s.set(a, i), i += a.length;
                    return s;
                  }
                },
                a = {
                  arraySet: function arraySet(e, t, r, n, i) {
                    for (var a = 0; n > a; a++) e[i + a] = t[r + a];
                  },
                  flattenChunks: function flattenChunks(e) {
                    return [].concat.apply([], e);
                  }
                };
              r.setTyped = function (e) {
                e ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, i)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, a));
              }, r.setTyped(n);
            }, {}],
            63: [function (e, t, r) {
              function n(e, t) {
                if (65537 > t && (e.subarray && s || !e.subarray && a)) return String.fromCharCode.apply(null, i.shrinkBuf(e, t));
                for (var r = "", n = 0; t > n; n++) r += String.fromCharCode(e[n]);
                return r;
              }
              var i = e("./common"),
                a = !0,
                s = !0;
              try {
                String.fromCharCode.apply(null, [0]);
              } catch (o) {
                a = !1;
              }
              try {
                String.fromCharCode.apply(null, new Uint8Array(1));
              } catch (o) {
                s = !1;
              }
              for (var u = new i.Buf8(256), h = 0; 256 > h; h++) u[h] = h >= 252 ? 6 : h >= 248 ? 5 : h >= 240 ? 4 : h >= 224 ? 3 : h >= 192 ? 2 : 1;
              u[254] = u[254] = 1, r.string2buf = function (e) {
                var t,
                  r,
                  n,
                  a,
                  s,
                  o = e.length,
                  u = 0;
                for (a = 0; o > a; a++) r = e.charCodeAt(a), 55296 === (64512 & r) && o > a + 1 && (n = e.charCodeAt(a + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), a++)), u += 128 > r ? 1 : 2048 > r ? 2 : 65536 > r ? 3 : 4;
                for (t = new i.Buf8(u), s = 0, a = 0; u > s; a++) r = e.charCodeAt(a), 55296 === (64512 & r) && o > a + 1 && (n = e.charCodeAt(a + 1), 56320 === (64512 & n) && (r = 65536 + (r - 55296 << 10) + (n - 56320), a++)), 128 > r ? t[s++] = r : 2048 > r ? (t[s++] = 192 | r >>> 6, t[s++] = 128 | 63 & r) : 65536 > r ? (t[s++] = 224 | r >>> 12, t[s++] = 128 | r >>> 6 & 63, t[s++] = 128 | 63 & r) : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63, t[s++] = 128 | r >>> 6 & 63, t[s++] = 128 | 63 & r);
                return t;
              }, r.buf2binstring = function (e) {
                return n(e, e.length);
              }, r.binstring2buf = function (e) {
                for (var t = new i.Buf8(e.length), r = 0, n = t.length; n > r; r++) t[r] = e.charCodeAt(r);
                return t;
              }, r.buf2string = function (e, t) {
                var r,
                  i,
                  a,
                  s,
                  o = t || e.length,
                  h = new Array(2 * o);
                for (i = 0, r = 0; o > r;) if (a = e[r++], 128 > a) h[i++] = a;else if (s = u[a], s > 4) h[i++] = 65533, r += s - 1;else {
                  for (a &= 2 === s ? 31 : 3 === s ? 15 : 7; s > 1 && o > r;) a = a << 6 | 63 & e[r++], s--;
                  s > 1 ? h[i++] = 65533 : 65536 > a ? h[i++] = a : (a -= 65536, h[i++] = 55296 | a >> 10 & 1023, h[i++] = 56320 | 1023 & a);
                }
                return n(h, i);
              }, r.utf8border = function (e, t) {
                var r;
                for (t = t || e.length, t > e.length && (t = e.length), r = t - 1; r >= 0 && 128 === (192 & e[r]);) r--;
                return 0 > r ? t : 0 === r ? t : r + u[e[r]] > t ? r : t;
              };
            }, {
              "./common": 62
            }],
            64: [function (e, t, r) {
              function n(e, t, r, n) {
                for (var i = 65535 & e | 0, a = e >>> 16 & 65535 | 0, s = 0; 0 !== r;) {
                  s = r > 2e3 ? 2e3 : r, r -= s;
                  do i = i + t[n++] | 0, a = a + i | 0; while (--s);
                  i %= 65521, a %= 65521;
                }
                return i | a << 16 | 0;
              }
              t.exports = n;
            }, {}],
            65: [function (e, t, r) {
              t.exports = {
                Z_NO_FLUSH: 0,
                Z_PARTIAL_FLUSH: 1,
                Z_SYNC_FLUSH: 2,
                Z_FULL_FLUSH: 3,
                Z_FINISH: 4,
                Z_BLOCK: 5,
                Z_TREES: 6,
                Z_OK: 0,
                Z_STREAM_END: 1,
                Z_NEED_DICT: 2,
                Z_ERRNO: -1,
                Z_STREAM_ERROR: -2,
                Z_DATA_ERROR: -3,
                Z_BUF_ERROR: -5,
                Z_NO_COMPRESSION: 0,
                Z_BEST_SPEED: 1,
                Z_BEST_COMPRESSION: 9,
                Z_DEFAULT_COMPRESSION: -1,
                Z_FILTERED: 1,
                Z_HUFFMAN_ONLY: 2,
                Z_RLE: 3,
                Z_FIXED: 4,
                Z_DEFAULT_STRATEGY: 0,
                Z_BINARY: 0,
                Z_TEXT: 1,
                Z_UNKNOWN: 2,
                Z_DEFLATED: 8
              };
            }, {}],
            66: [function (e, t, r) {
              function n() {
                for (var e, t = [], r = 0; 256 > r; r++) {
                  e = r;
                  for (var n = 0; 8 > n; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
                  t[r] = e;
                }
                return t;
              }
              function i(e, t, r, n) {
                var i = a,
                  s = n + r;
                e ^= -1;
                for (var o = n; s > o; o++) e = e >>> 8 ^ i[255 & (e ^ t[o])];
                return -1 ^ e;
              }
              var a = n();
              t.exports = i;
            }, {}],
            67: [function (e, t, r) {
              function n(e, t) {
                return e.msg = D[t], t;
              }
              function i(e) {
                return (e << 1) - (e > 4 ? 9 : 0);
              }
              function a(e) {
                for (var t = e.length; --t >= 0;) e[t] = 0;
              }
              function s(e) {
                var t = e.state,
                  r = t.pending;
                r > e.avail_out && (r = e.avail_out), 0 !== r && (O.arraySet(e.output, t.pending_buf, t.pending_out, r, e.next_out), e.next_out += r, t.pending_out += r, e.total_out += r, e.avail_out -= r, t.pending -= r, 0 === t.pending && (t.pending_out = 0));
              }
              function o(e, t) {
                B._tr_flush_block(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, s(e.strm);
              }
              function u(e, t) {
                e.pending_buf[e.pending++] = t;
              }
              function h(e, t) {
                e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t;
              }
              function l(e, t, r, n) {
                var i = e.avail_in;
                return i > n && (i = n), 0 === i ? 0 : (e.avail_in -= i, O.arraySet(t, e.input, e.next_in, i, r), 1 === e.state.wrap ? e.adler = R(e.adler, t, i, r) : 2 === e.state.wrap && (e.adler = T(e.adler, t, i, r)), e.next_in += i, e.total_in += i, i);
              }
              function c(e, t) {
                var r,
                  n,
                  i = e.max_chain_length,
                  a = e.strstart,
                  s = e.prev_length,
                  o = e.nice_match,
                  u = e.strstart > e.w_size - ct ? e.strstart - (e.w_size - ct) : 0,
                  h = e.window,
                  l = e.w_mask,
                  c = e.prev,
                  f = e.strstart + lt,
                  d = h[a + s - 1],
                  p = h[a + s];
                e.prev_length >= e.good_match && (i >>= 2), o > e.lookahead && (o = e.lookahead);
                do if (r = t, h[r + s] === p && h[r + s - 1] === d && h[r] === h[a] && h[++r] === h[a + 1]) {
                  a += 2, r++;
                  do ; while (h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && h[++a] === h[++r] && f > a);
                  if (n = lt - (f - a), a = f - lt, n > s) {
                    if (e.match_start = t, s = n, n >= o) break;
                    d = h[a + s - 1], p = h[a + s];
                  }
                } while ((t = c[t & l]) > u && 0 !== --i);
                return s <= e.lookahead ? s : e.lookahead;
              }
              function f(e) {
                var t,
                  r,
                  n,
                  i,
                  a,
                  s = e.w_size;
                do {
                  if (i = e.window_size - e.lookahead - e.strstart, e.strstart >= s + (s - ct)) {
                    O.arraySet(e.window, e.window, s, s, 0), e.match_start -= s, e.strstart -= s, e.block_start -= s, r = e.hash_size, t = r;
                    do n = e.head[--t], e.head[t] = n >= s ? n - s : 0; while (--r);
                    r = s, t = r;
                    do n = e.prev[--t], e.prev[t] = n >= s ? n - s : 0; while (--r);
                    i += s;
                  }
                  if (0 === e.strm.avail_in) break;
                  if (r = l(e.strm, e.window, e.strstart + e.lookahead, i), e.lookahead += r, e.lookahead + e.insert >= ht) for (a = e.strstart - e.insert, e.ins_h = e.window[a], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[a + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[a + ht - 1]) & e.hash_mask, e.prev[a & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = a, a++, e.insert--, !(e.lookahead + e.insert < ht)););
                } while (e.lookahead < ct && 0 !== e.strm.avail_in);
              }
              function d(e, t) {
                var r = 65535;
                for (r > e.pending_buf_size - 5 && (r = e.pending_buf_size - 5);;) {
                  if (e.lookahead <= 1) {
                    if (f(e), 0 === e.lookahead && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  e.strstart += e.lookahead, e.lookahead = 0;
                  var n = e.block_start + r;
                  if ((0 === e.strstart || e.strstart >= n) && (e.lookahead = e.strstart - n, e.strstart = n, o(e, !1), 0 === e.strm.avail_out)) return wt;
                  if (e.strstart - e.block_start >= e.w_size - ct && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = 0, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.strstart > e.block_start && (o(e, !1), 0 === e.strm.avail_out) ? wt : wt;
              }
              function p(e, t) {
                for (var r, n;;) {
                  if (e.lookahead < ct) {
                    if (f(e), e.lookahead < ct && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  if (r = 0, e.lookahead >= ht && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== r && e.strstart - r <= e.w_size - ct && (e.match_length = c(e, r)), e.match_length >= ht) {
                    if (n = B._tr_tally(e, e.strstart - e.match_start, e.match_length - ht), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= ht) {
                      e.match_length--;
                      do e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart; while (0 !== --e.match_length);
                      e.strstart++;
                    } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
                  } else n = B._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
                  if (n && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = e.strstart < ht - 1 ? e.strstart : ht - 1, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function m(e, t) {
                for (var r, n, i;;) {
                  if (e.lookahead < ct) {
                    if (f(e), e.lookahead < ct && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  if (r = 0, e.lookahead >= ht && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = ht - 1, 0 !== r && e.prev_length < e.max_lazy_match && e.strstart - r <= e.w_size - ct && (e.match_length = c(e, r), e.match_length <= 5 && (e.strategy === K || e.match_length === ht && e.strstart - e.match_start > 4096) && (e.match_length = ht - 1)), e.prev_length >= ht && e.match_length <= e.prev_length) {
                    i = e.strstart + e.lookahead - ht, n = B._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - ht), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
                    do ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + ht - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart); while (0 !== --e.prev_length);
                    if (e.match_available = 0, e.match_length = ht - 1, e.strstart++, n && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                  } else if (e.match_available) {
                    if (n = B._tr_tally(e, 0, e.window[e.strstart - 1]), n && o(e, !1), e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return wt;
                  } else e.match_available = 1, e.strstart++, e.lookahead--;
                }
                return e.match_available && (n = B._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < ht - 1 ? e.strstart : ht - 1, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function _(e, t) {
                for (var r, n, i, a, s = e.window;;) {
                  if (e.lookahead <= lt) {
                    if (f(e), e.lookahead <= lt && t === F) return wt;
                    if (0 === e.lookahead) break;
                  }
                  if (e.match_length = 0, e.lookahead >= ht && e.strstart > 0 && (i = e.strstart - 1, n = s[i], n === s[++i] && n === s[++i] && n === s[++i])) {
                    a = e.strstart + lt;
                    do ; while (n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && n === s[++i] && a > i);
                    e.match_length = lt - (a - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
                  }
                  if (e.match_length >= ht ? (r = B._tr_tally(e, 1, e.match_length - ht), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (r = B._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), r && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = 0, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function g(e, t) {
                for (var r;;) {
                  if (0 === e.lookahead && (f(e), 0 === e.lookahead)) {
                    if (t === F) return wt;
                    break;
                  }
                  if (e.match_length = 0, r = B._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, r && (o(e, !1), 0 === e.strm.avail_out)) return wt;
                }
                return e.insert = 0, t === U ? (o(e, !0), 0 === e.strm.avail_out ? kt : xt) : e.last_lit && (o(e, !1), 0 === e.strm.avail_out) ? wt : yt;
              }
              function v(e, t, r, n, i) {
                this.good_length = e, this.max_lazy = t, this.nice_length = r, this.max_chain = n, this.func = i;
              }
              function b(e) {
                e.window_size = 2 * e.w_size, a(e.head), e.max_lazy_match = I[e.level].max_lazy, e.good_match = I[e.level].good_length, e.nice_match = I[e.level].nice_length, e.max_chain_length = I[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = ht - 1, e.match_available = 0, e.ins_h = 0;
              }
              function w() {
                this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Q, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new O.Buf16(2 * ot), this.dyn_dtree = new O.Buf16(2 * (2 * at + 1)), this.bl_tree = new O.Buf16(2 * (2 * st + 1)), a(this.dyn_ltree), a(this.dyn_dtree), a(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new O.Buf16(ut + 1), this.heap = new O.Buf16(2 * it + 1), a(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new O.Buf16(2 * it + 1), a(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
              }
              function y(e) {
                var t;
                return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = J, t = e.state, t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? dt : vt, e.adler = 2 === t.wrap ? 0 : 1, t.last_flush = F, B._tr_init(t), j) : n(e, W);
              }
              function k(e) {
                var t = y(e);
                return t === j && b(e.state), t;
              }
              function x(e, t) {
                return e && e.state ? 2 !== e.state.wrap ? W : (e.state.gzhead = t, j) : W;
              }
              function S(e, t, r, i, a, s) {
                if (!e) return W;
                var o = 1;
                if (t === G && (t = 6), 0 > i ? (o = 0, i = -i) : i > 15 && (o = 2, i -= 16), 1 > a || a > $ || r !== Q || 8 > i || i > 15 || 0 > t || t > 9 || 0 > s || s > V) return n(e, W);
                8 === i && (i = 9);
                var u = new w();
                return e.state = u, u.strm = e, u.wrap = o, u.gzhead = null, u.w_bits = i, u.w_size = 1 << u.w_bits, u.w_mask = u.w_size - 1, u.hash_bits = a + 7, u.hash_size = 1 << u.hash_bits, u.hash_mask = u.hash_size - 1, u.hash_shift = ~~((u.hash_bits + ht - 1) / ht), u.window = new O.Buf8(2 * u.w_size), u.head = new O.Buf16(u.hash_size), u.prev = new O.Buf16(u.w_size), u.lit_bufsize = 1 << a + 6, u.pending_buf_size = 4 * u.lit_bufsize, u.pending_buf = new O.Buf8(u.pending_buf_size), u.d_buf = 1 * u.lit_bufsize, u.l_buf = 3 * u.lit_bufsize, u.level = t, u.strategy = s, u.method = r, k(e);
              }
              function z(e, t) {
                return S(e, t, Q, et, tt, q);
              }
              function E(e, t) {
                var r, o, l, c;
                if (!e || !e.state || t > L || 0 > t) return e ? n(e, W) : W;
                if (o = e.state, !e.output || !e.input && 0 !== e.avail_in || o.status === bt && t !== U) return n(e, 0 === e.avail_out ? H : W);
                if (o.strm = e, r = o.last_flush, o.last_flush = t, o.status === dt) if (2 === o.wrap) e.adler = 0, u(o, 31), u(o, 139), u(o, 8), o.gzhead ? (u(o, (o.gzhead.text ? 1 : 0) + (o.gzhead.hcrc ? 2 : 0) + (o.gzhead.extra ? 4 : 0) + (o.gzhead.name ? 8 : 0) + (o.gzhead.comment ? 16 : 0)), u(o, 255 & o.gzhead.time), u(o, o.gzhead.time >> 8 & 255), u(o, o.gzhead.time >> 16 & 255), u(o, o.gzhead.time >> 24 & 255), u(o, 9 === o.level ? 2 : o.strategy >= Y || o.level < 2 ? 4 : 0), u(o, 255 & o.gzhead.os), o.gzhead.extra && o.gzhead.extra.length && (u(o, 255 & o.gzhead.extra.length), u(o, o.gzhead.extra.length >> 8 & 255)), o.gzhead.hcrc && (e.adler = T(e.adler, o.pending_buf, o.pending, 0)), o.gzindex = 0, o.status = pt) : (u(o, 0), u(o, 0), u(o, 0), u(o, 0), u(o, 0), u(o, 9 === o.level ? 2 : o.strategy >= Y || o.level < 2 ? 4 : 0), u(o, St), o.status = vt);else {
                  var f = Q + (o.w_bits - 8 << 4) << 8,
                    d = -1;
                  d = o.strategy >= Y || o.level < 2 ? 0 : o.level < 6 ? 1 : 6 === o.level ? 2 : 3, f |= d << 6, 0 !== o.strstart && (f |= ft), f += 31 - f % 31, o.status = vt, h(o, f), 0 !== o.strstart && (h(o, e.adler >>> 16), h(o, 65535 & e.adler)), e.adler = 1;
                }
                if (o.status === pt) if (o.gzhead.extra) {
                  for (l = o.pending; o.gzindex < (65535 & o.gzhead.extra.length) && (o.pending !== o.pending_buf_size || (o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), s(e), l = o.pending, o.pending !== o.pending_buf_size));) u(o, 255 & o.gzhead.extra[o.gzindex]), o.gzindex++;
                  o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), o.gzindex === o.gzhead.extra.length && (o.gzindex = 0, o.status = mt);
                } else o.status = mt;
                if (o.status === mt) if (o.gzhead.name) {
                  l = o.pending;
                  do {
                    if (o.pending === o.pending_buf_size && (o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), s(e), l = o.pending, o.pending === o.pending_buf_size)) {
                      c = 1;
                      break;
                    }
                    c = o.gzindex < o.gzhead.name.length ? 255 & o.gzhead.name.charCodeAt(o.gzindex++) : 0, u(o, c);
                  } while (0 !== c);
                  o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), 0 === c && (o.gzindex = 0, o.status = _t);
                } else o.status = _t;
                if (o.status === _t) if (o.gzhead.comment) {
                  l = o.pending;
                  do {
                    if (o.pending === o.pending_buf_size && (o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), s(e), l = o.pending, o.pending === o.pending_buf_size)) {
                      c = 1;
                      break;
                    }
                    c = o.gzindex < o.gzhead.comment.length ? 255 & o.gzhead.comment.charCodeAt(o.gzindex++) : 0, u(o, c);
                  } while (0 !== c);
                  o.gzhead.hcrc && o.pending > l && (e.adler = T(e.adler, o.pending_buf, o.pending - l, l)), 0 === c && (o.status = gt);
                } else o.status = gt;
                if (o.status === gt && (o.gzhead.hcrc ? (o.pending + 2 > o.pending_buf_size && s(e), o.pending + 2 <= o.pending_buf_size && (u(o, 255 & e.adler), u(o, e.adler >> 8 & 255), e.adler = 0, o.status = vt)) : o.status = vt), 0 !== o.pending) {
                  if (s(e), 0 === e.avail_out) return o.last_flush = -1, j;
                } else if (0 === e.avail_in && i(t) <= i(r) && t !== U) return n(e, H);
                if (o.status === bt && 0 !== e.avail_in) return n(e, H);
                if (0 !== e.avail_in || 0 !== o.lookahead || t !== F && o.status !== bt) {
                  var p = o.strategy === Y ? g(o, t) : o.strategy === X ? _(o, t) : I[o.level].func(o, t);
                  if (p !== kt && p !== xt || (o.status = bt), p === wt || p === kt) return 0 === e.avail_out && (o.last_flush = -1), j;
                  if (p === yt && (t === N ? B._tr_align(o) : t !== L && (B._tr_stored_block(o, 0, 0, !1), t === P && (a(o.head), 0 === o.lookahead && (o.strstart = 0, o.block_start = 0, o.insert = 0))), s(e), 0 === e.avail_out)) return o.last_flush = -1, j;
                }
                return t !== U ? j : o.wrap <= 0 ? Z : (2 === o.wrap ? (u(o, 255 & e.adler), u(o, e.adler >> 8 & 255), u(o, e.adler >> 16 & 255), u(o, e.adler >> 24 & 255), u(o, 255 & e.total_in), u(o, e.total_in >> 8 & 255), u(o, e.total_in >> 16 & 255), u(o, e.total_in >> 24 & 255)) : (h(o, e.adler >>> 16), h(o, 65535 & e.adler)), s(e), o.wrap > 0 && (o.wrap = -o.wrap), 0 !== o.pending ? j : Z);
              }
              function C(e) {
                var t;
                return e && e.state ? (t = e.state.status, t !== dt && t !== pt && t !== mt && t !== _t && t !== gt && t !== vt && t !== bt ? n(e, W) : (e.state = null, t === vt ? n(e, M) : j)) : W;
              }
              function A(e, t) {
                var r,
                  n,
                  i,
                  s,
                  o,
                  u,
                  h,
                  l,
                  c = t.length;
                if (!e || !e.state) return W;
                if (r = e.state, s = r.wrap, 2 === s || 1 === s && r.status !== dt || r.lookahead) return W;
                for (1 === s && (e.adler = R(e.adler, t, c, 0)), r.wrap = 0, c >= r.w_size && (0 === s && (a(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0), l = new O.Buf8(r.w_size), O.arraySet(l, t, c - r.w_size, r.w_size, 0), t = l, c = r.w_size), o = e.avail_in, u = e.next_in, h = e.input, e.avail_in = c, e.next_in = 0, e.input = t, f(r); r.lookahead >= ht;) {
                  n = r.strstart, i = r.lookahead - (ht - 1);
                  do r.ins_h = (r.ins_h << r.hash_shift ^ r.window[n + ht - 1]) & r.hash_mask, r.prev[n & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = n, n++; while (--i);
                  r.strstart = n, r.lookahead = ht - 1, f(r);
                }
                return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = ht - 1, r.match_available = 0, e.next_in = u, e.input = h, e.avail_in = o, r.wrap = s, j;
              }
              var I,
                O = e("../utils/common"),
                B = e("./trees"),
                R = e("./adler32"),
                T = e("./crc32"),
                D = e("./messages"),
                F = 0,
                N = 1,
                P = 3,
                U = 4,
                L = 5,
                j = 0,
                Z = 1,
                W = -2,
                M = -3,
                H = -5,
                G = -1,
                K = 1,
                Y = 2,
                X = 3,
                V = 4,
                q = 0,
                J = 2,
                Q = 8,
                $ = 9,
                et = 15,
                tt = 8,
                rt = 29,
                nt = 256,
                it = nt + 1 + rt,
                at = 30,
                st = 19,
                ot = 2 * it + 1,
                ut = 15,
                ht = 3,
                lt = 258,
                ct = lt + ht + 1,
                ft = 32,
                dt = 42,
                pt = 69,
                mt = 73,
                _t = 91,
                gt = 103,
                vt = 113,
                bt = 666,
                wt = 1,
                yt = 2,
                kt = 3,
                xt = 4,
                St = 3;
              I = [new v(0, 0, 0, 0, d), new v(4, 4, 8, 4, p), new v(4, 5, 16, 8, p), new v(4, 6, 32, 32, p), new v(4, 4, 16, 16, m), new v(8, 16, 32, 32, m), new v(8, 16, 128, 128, m), new v(8, 32, 128, 256, m), new v(32, 128, 258, 1024, m), new v(32, 258, 258, 4096, m)], r.deflateInit = z, r.deflateInit2 = S, r.deflateReset = k, r.deflateResetKeep = y, r.deflateSetHeader = x, r.deflate = E, r.deflateEnd = C, r.deflateSetDictionary = A, r.deflateInfo = "pako deflate (from Nodeca project)";
            }, {
              "../utils/common": 62,
              "./adler32": 64,
              "./crc32": 66,
              "./messages": 72,
              "./trees": 73
            }],
            68: [function (e, t, r) {
              function n() {
                this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
              }
              t.exports = n;
            }, {}],
            69: [function (e, t, r) {
              var n = 30,
                i = 12;
              t.exports = function (e, t) {
                var r, a, s, o, u, h, l, c, f, d, p, m, _, g, v, b, w, y, k, x, S, z, E, C, A;
                r = e.state, a = e.next_in, C = e.input, s = a + (e.avail_in - 5), o = e.next_out, A = e.output, u = o - (t - e.avail_out), h = o + (e.avail_out - 257), l = r.dmax, c = r.wsize, f = r.whave, d = r.wnext, p = r.window, m = r.hold, _ = r.bits, g = r.lencode, v = r.distcode, b = (1 << r.lenbits) - 1, w = (1 << r.distbits) - 1;
                e: do {
                  15 > _ && (m += C[a++] << _, _ += 8, m += C[a++] << _, _ += 8), y = g[m & b];
                  t: for (;;) {
                    if (k = y >>> 24, m >>>= k, _ -= k, k = y >>> 16 & 255, 0 === k) A[o++] = 65535 & y;else {
                      if (!(16 & k)) {
                        if (0 === (64 & k)) {
                          y = g[(65535 & y) + (m & (1 << k) - 1)];
                          continue t;
                        }
                        if (32 & k) {
                          r.mode = i;
                          break e;
                        }
                        e.msg = "invalid literal/length code", r.mode = n;
                        break e;
                      }
                      x = 65535 & y, k &= 15, k && (k > _ && (m += C[a++] << _, _ += 8), x += m & (1 << k) - 1, m >>>= k, _ -= k), 15 > _ && (m += C[a++] << _, _ += 8, m += C[a++] << _, _ += 8), y = v[m & w];
                      r: for (;;) {
                        if (k = y >>> 24, m >>>= k, _ -= k, k = y >>> 16 & 255, !(16 & k)) {
                          if (0 === (64 & k)) {
                            y = v[(65535 & y) + (m & (1 << k) - 1)];
                            continue r;
                          }
                          e.msg = "invalid distance code", r.mode = n;
                          break e;
                        }
                        if (S = 65535 & y, k &= 15, k > _ && (m += C[a++] << _, _ += 8, k > _ && (m += C[a++] << _, _ += 8)), S += m & (1 << k) - 1, S > l) {
                          e.msg = "invalid distance too far back", r.mode = n;
                          break e;
                        }
                        if (m >>>= k, _ -= k, k = o - u, S > k) {
                          if (k = S - k, k > f && r.sane) {
                            e.msg = "invalid distance too far back", r.mode = n;
                            break e;
                          }
                          if (z = 0, E = p, 0 === d) {
                            if (z += c - k, x > k) {
                              x -= k;
                              do A[o++] = p[z++]; while (--k);
                              z = o - S, E = A;
                            }
                          } else if (k > d) {
                            if (z += c + d - k, k -= d, x > k) {
                              x -= k;
                              do A[o++] = p[z++]; while (--k);
                              if (z = 0, x > d) {
                                k = d, x -= k;
                                do A[o++] = p[z++]; while (--k);
                                z = o - S, E = A;
                              }
                            }
                          } else if (z += d - k, x > k) {
                            x -= k;
                            do A[o++] = p[z++]; while (--k);
                            z = o - S, E = A;
                          }
                          for (; x > 2;) A[o++] = E[z++], A[o++] = E[z++], A[o++] = E[z++], x -= 3;
                          x && (A[o++] = E[z++], x > 1 && (A[o++] = E[z++]));
                        } else {
                          z = o - S;
                          do A[o++] = A[z++], A[o++] = A[z++], A[o++] = A[z++], x -= 3; while (x > 2);
                          x && (A[o++] = A[z++], x > 1 && (A[o++] = A[z++]));
                        }
                        break;
                      }
                    }
                    break;
                  }
                } while (s > a && h > o);
                x = _ >> 3, a -= x, _ -= x << 3, m &= (1 << _) - 1, e.next_in = a, e.next_out = o, e.avail_in = s > a ? 5 + (s - a) : 5 - (a - s), e.avail_out = h > o ? 257 + (h - o) : 257 - (o - h), r.hold = m, r.bits = _;
              };
            }, {}],
            70: [function (e, t, r) {
              function n(e) {
                return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24);
              }
              function i() {
                this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new v.Buf16(320), this.work = new v.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
              }
              function a(e) {
                var t;
                return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = P, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new v.Buf32(mt), t.distcode = t.distdyn = new v.Buf32(_t), t.sane = 1, t.back = -1, I) : R;
              }
              function s(e) {
                var t;
                return e && e.state ? (t = e.state, t.wsize = 0, t.whave = 0, t.wnext = 0, a(e)) : R;
              }
              function o(e, t) {
                var r, n;
                return e && e.state ? (n = e.state, 0 > t ? (r = 0, t = -t) : (r = (t >> 4) + 1, 48 > t && (t &= 15)), t && (8 > t || t > 15) ? R : (null !== n.window && n.wbits !== t && (n.window = null), n.wrap = r, n.wbits = t, s(e))) : R;
              }
              function u(e, t) {
                var r, n;
                return e ? (n = new i(), e.state = n, n.window = null, r = o(e, t), r !== I && (e.state = null), r) : R;
              }
              function h(e) {
                return u(e, vt);
              }
              function l(e) {
                if (bt) {
                  var t;
                  for (_ = new v.Buf32(512), g = new v.Buf32(32), t = 0; 144 > t;) e.lens[t++] = 8;
                  for (; 256 > t;) e.lens[t++] = 9;
                  for (; 280 > t;) e.lens[t++] = 7;
                  for (; 288 > t;) e.lens[t++] = 8;
                  for (k(S, e.lens, 0, 288, _, 0, e.work, {
                    bits: 9
                  }), t = 0; 32 > t;) e.lens[t++] = 5;
                  k(z, e.lens, 0, 32, g, 0, e.work, {
                    bits: 5
                  }), bt = !1;
                }
                e.lencode = _, e.lenbits = 9, e.distcode = g, e.distbits = 5;
              }
              function c(e, t, r, n) {
                var i,
                  a = e.state;
                return null === a.window && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new v.Buf8(a.wsize)), n >= a.wsize ? (v.arraySet(a.window, t, r - a.wsize, a.wsize, 0), a.wnext = 0, a.whave = a.wsize) : (i = a.wsize - a.wnext, i > n && (i = n), v.arraySet(a.window, t, r - n, i, a.wnext), n -= i, n ? (v.arraySet(a.window, t, r - n, n, 0), a.wnext = n, a.whave = a.wsize) : (a.wnext += i, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += i))), 0;
              }
              function f(e, t) {
                var r,
                  i,
                  a,
                  s,
                  o,
                  u,
                  h,
                  f,
                  d,
                  p,
                  m,
                  _,
                  g,
                  mt,
                  _t,
                  gt,
                  vt,
                  bt,
                  wt,
                  yt,
                  kt,
                  xt,
                  St,
                  zt,
                  Et = 0,
                  Ct = new v.Buf8(4),
                  At = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
                if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) return R;
                r = e.state, r.mode === X && (r.mode = V), o = e.next_out, a = e.output, h = e.avail_out, s = e.next_in, i = e.input, u = e.avail_in, f = r.hold, d = r.bits, p = u, m = h, xt = I;
                e: for (;;) switch (r.mode) {
                  case P:
                    if (0 === r.wrap) {
                      r.mode = V;
                      break;
                    }
                    for (; 16 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (2 & r.wrap && 35615 === f) {
                      r.check = 0, Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0), f = 0, d = 0, r.mode = U;
                      break;
                    }
                    if (r.flags = 0, r.head && (r.head.done = !1), !(1 & r.wrap) || (((255 & f) << 8) + (f >> 8)) % 31) {
                      e.msg = "incorrect header check", r.mode = ft;
                      break;
                    }
                    if ((15 & f) !== N) {
                      e.msg = "unknown compression method", r.mode = ft;
                      break;
                    }
                    if (f >>>= 4, d -= 4, kt = (15 & f) + 8, 0 === r.wbits) r.wbits = kt;else if (kt > r.wbits) {
                      e.msg = "invalid window size", r.mode = ft;
                      break;
                    }
                    r.dmax = 1 << kt, e.adler = r.check = 1, r.mode = 512 & f ? K : X, f = 0, d = 0;
                    break;
                  case U:
                    for (; 16 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (r.flags = f, (255 & r.flags) !== N) {
                      e.msg = "unknown compression method", r.mode = ft;
                      break;
                    }
                    if (57344 & r.flags) {
                      e.msg = "unknown header flags set", r.mode = ft;
                      break;
                    }
                    r.head && (r.head.text = f >> 8 & 1), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0)), f = 0, d = 0, r.mode = L;
                  case L:
                    for (; 32 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    r.head && (r.head.time = f), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, Ct[2] = f >>> 16 & 255, Ct[3] = f >>> 24 & 255, r.check = w(r.check, Ct, 4, 0)), f = 0, d = 0, r.mode = j;
                  case j:
                    for (; 16 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    r.head && (r.head.xflags = 255 & f, r.head.os = f >> 8), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0)), f = 0, d = 0, r.mode = Z;
                  case Z:
                    if (1024 & r.flags) {
                      for (; 16 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.length = f, r.head && (r.head.extra_len = f), 512 & r.flags && (Ct[0] = 255 & f, Ct[1] = f >>> 8 & 255, r.check = w(r.check, Ct, 2, 0)), f = 0, d = 0;
                    } else r.head && (r.head.extra = null);
                    r.mode = W;
                  case W:
                    if (1024 & r.flags && (_ = r.length, _ > u && (_ = u), _ && (r.head && (kt = r.head.extra_len - r.length, r.head.extra || (r.head.extra = new Array(r.head.extra_len)), v.arraySet(r.head.extra, i, s, _, kt)), 512 & r.flags && (r.check = w(r.check, i, _, s)), u -= _, s += _, r.length -= _), r.length)) break e;
                    r.length = 0, r.mode = M;
                  case M:
                    if (2048 & r.flags) {
                      if (0 === u) break e;
                      _ = 0;
                      do kt = i[s + _++], r.head && kt && r.length < 65536 && (r.head.name += String.fromCharCode(kt)); while (kt && u > _);
                      if (512 & r.flags && (r.check = w(r.check, i, _, s)), u -= _, s += _, kt) break e;
                    } else r.head && (r.head.name = null);
                    r.length = 0, r.mode = H;
                  case H:
                    if (4096 & r.flags) {
                      if (0 === u) break e;
                      _ = 0;
                      do kt = i[s + _++], r.head && kt && r.length < 65536 && (r.head.comment += String.fromCharCode(kt)); while (kt && u > _);
                      if (512 & r.flags && (r.check = w(r.check, i, _, s)), u -= _, s += _, kt) break e;
                    } else r.head && (r.head.comment = null);
                    r.mode = G;
                  case G:
                    if (512 & r.flags) {
                      for (; 16 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      if (f !== (65535 & r.check)) {
                        e.msg = "header crc mismatch", r.mode = ft;
                        break;
                      }
                      f = 0, d = 0;
                    }
                    r.head && (r.head.hcrc = r.flags >> 9 & 1, r.head.done = !0), e.adler = r.check = 0, r.mode = X;
                    break;
                  case K:
                    for (; 32 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    e.adler = r.check = n(f), f = 0, d = 0, r.mode = Y;
                  case Y:
                    if (0 === r.havedict) return e.next_out = o, e.avail_out = h, e.next_in = s, e.avail_in = u, r.hold = f, r.bits = d, B;
                    e.adler = r.check = 1, r.mode = X;
                  case X:
                    if (t === C || t === A) break e;
                  case V:
                    if (r.last) {
                      f >>>= 7 & d, d -= 7 & d, r.mode = ht;
                      break;
                    }
                    for (; 3 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    switch (r.last = 1 & f, f >>>= 1, d -= 1, 3 & f) {
                      case 0:
                        r.mode = q;
                        break;
                      case 1:
                        if (l(r), r.mode = rt, t === A) {
                          f >>>= 2, d -= 2;
                          break e;
                        }
                        break;
                      case 2:
                        r.mode = $;
                        break;
                      case 3:
                        e.msg = "invalid block type", r.mode = ft;
                    }
                    f >>>= 2, d -= 2;
                    break;
                  case q:
                    for (f >>>= 7 & d, d -= 7 & d; 32 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if ((65535 & f) !== (f >>> 16 ^ 65535)) {
                      e.msg = "invalid stored block lengths", r.mode = ft;
                      break;
                    }
                    if (r.length = 65535 & f, f = 0, d = 0, r.mode = J, t === A) break e;
                  case J:
                    r.mode = Q;
                  case Q:
                    if (_ = r.length) {
                      if (_ > u && (_ = u), _ > h && (_ = h), 0 === _) break e;
                      v.arraySet(a, i, s, _, o), u -= _, s += _, h -= _, o += _, r.length -= _;
                      break;
                    }
                    r.mode = X;
                    break;
                  case $:
                    for (; 14 > d;) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (r.nlen = (31 & f) + 257, f >>>= 5, d -= 5, r.ndist = (31 & f) + 1, f >>>= 5, d -= 5, r.ncode = (15 & f) + 4, f >>>= 4, d -= 4, r.nlen > 286 || r.ndist > 30) {
                      e.msg = "too many length or distance symbols", r.mode = ft;
                      break;
                    }
                    r.have = 0, r.mode = et;
                  case et:
                    for (; r.have < r.ncode;) {
                      for (; 3 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.lens[At[r.have++]] = 7 & f, f >>>= 3, d -= 3;
                    }
                    for (; r.have < 19;) r.lens[At[r.have++]] = 0;
                    if (r.lencode = r.lendyn, r.lenbits = 7, St = {
                      bits: r.lenbits
                    }, xt = k(x, r.lens, 0, 19, r.lencode, 0, r.work, St), r.lenbits = St.bits, xt) {
                      e.msg = "invalid code lengths set", r.mode = ft;
                      break;
                    }
                    r.have = 0, r.mode = tt;
                  case tt:
                    for (; r.have < r.nlen + r.ndist;) {
                      for (; Et = r.lencode[f & (1 << r.lenbits) - 1], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= _t);) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      if (16 > vt) f >>>= _t, d -= _t, r.lens[r.have++] = vt;else {
                        if (16 === vt) {
                          for (zt = _t + 2; zt > d;) {
                            if (0 === u) break e;
                            u--, f += i[s++] << d, d += 8;
                          }
                          if (f >>>= _t, d -= _t, 0 === r.have) {
                            e.msg = "invalid bit length repeat", r.mode = ft;
                            break;
                          }
                          kt = r.lens[r.have - 1], _ = 3 + (3 & f), f >>>= 2, d -= 2;
                        } else if (17 === vt) {
                          for (zt = _t + 3; zt > d;) {
                            if (0 === u) break e;
                            u--, f += i[s++] << d, d += 8;
                          }
                          f >>>= _t, d -= _t, kt = 0, _ = 3 + (7 & f), f >>>= 3, d -= 3;
                        } else {
                          for (zt = _t + 7; zt > d;) {
                            if (0 === u) break e;
                            u--, f += i[s++] << d, d += 8;
                          }
                          f >>>= _t, d -= _t, kt = 0, _ = 11 + (127 & f), f >>>= 7, d -= 7;
                        }
                        if (r.have + _ > r.nlen + r.ndist) {
                          e.msg = "invalid bit length repeat", r.mode = ft;
                          break;
                        }
                        for (; _--;) r.lens[r.have++] = kt;
                      }
                    }
                    if (r.mode === ft) break;
                    if (0 === r.lens[256]) {
                      e.msg = "invalid code -- missing end-of-block", r.mode = ft;
                      break;
                    }
                    if (r.lenbits = 9, St = {
                      bits: r.lenbits
                    }, xt = k(S, r.lens, 0, r.nlen, r.lencode, 0, r.work, St), r.lenbits = St.bits, xt) {
                      e.msg = "invalid literal/lengths set", r.mode = ft;
                      break;
                    }
                    if (r.distbits = 6, r.distcode = r.distdyn, St = {
                      bits: r.distbits
                    }, xt = k(z, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, St), r.distbits = St.bits, xt) {
                      e.msg = "invalid distances set", r.mode = ft;
                      break;
                    }
                    if (r.mode = rt, t === A) break e;
                  case rt:
                    r.mode = nt;
                  case nt:
                    if (u >= 6 && h >= 258) {
                      e.next_out = o, e.avail_out = h, e.next_in = s, e.avail_in = u, r.hold = f, r.bits = d, y(e, m), o = e.next_out, a = e.output, h = e.avail_out, s = e.next_in, i = e.input, u = e.avail_in, f = r.hold, d = r.bits, r.mode === X && (r.back = -1);
                      break;
                    }
                    for (r.back = 0; Et = r.lencode[f & (1 << r.lenbits) - 1], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= _t);) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (gt && 0 === (240 & gt)) {
                      for (bt = _t, wt = gt, yt = vt; Et = r.lencode[yt + ((f & (1 << bt + wt) - 1) >> bt)], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= bt + _t);) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      f >>>= bt, d -= bt, r.back += bt;
                    }
                    if (f >>>= _t, d -= _t, r.back += _t, r.length = vt, 0 === gt) {
                      r.mode = ut;
                      break;
                    }
                    if (32 & gt) {
                      r.back = -1, r.mode = X;
                      break;
                    }
                    if (64 & gt) {
                      e.msg = "invalid literal/length code", r.mode = ft;
                      break;
                    }
                    r.extra = 15 & gt, r.mode = it;
                  case it:
                    if (r.extra) {
                      for (zt = r.extra; zt > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.length += f & (1 << r.extra) - 1, f >>>= r.extra, d -= r.extra, r.back += r.extra;
                    }
                    r.was = r.length, r.mode = at;
                  case at:
                    for (; Et = r.distcode[f & (1 << r.distbits) - 1], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= _t);) {
                      if (0 === u) break e;
                      u--, f += i[s++] << d, d += 8;
                    }
                    if (0 === (240 & gt)) {
                      for (bt = _t, wt = gt, yt = vt; Et = r.distcode[yt + ((f & (1 << bt + wt) - 1) >> bt)], _t = Et >>> 24, gt = Et >>> 16 & 255, vt = 65535 & Et, !(d >= bt + _t);) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      f >>>= bt, d -= bt, r.back += bt;
                    }
                    if (f >>>= _t, d -= _t, r.back += _t, 64 & gt) {
                      e.msg = "invalid distance code", r.mode = ft;
                      break;
                    }
                    r.offset = vt, r.extra = 15 & gt, r.mode = st;
                  case st:
                    if (r.extra) {
                      for (zt = r.extra; zt > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      r.offset += f & (1 << r.extra) - 1, f >>>= r.extra, d -= r.extra, r.back += r.extra;
                    }
                    if (r.offset > r.dmax) {
                      e.msg = "invalid distance too far back", r.mode = ft;
                      break;
                    }
                    r.mode = ot;
                  case ot:
                    if (0 === h) break e;
                    if (_ = m - h, r.offset > _) {
                      if (_ = r.offset - _, _ > r.whave && r.sane) {
                        e.msg = "invalid distance too far back", r.mode = ft;
                        break;
                      }
                      _ > r.wnext ? (_ -= r.wnext, g = r.wsize - _) : g = r.wnext - _, _ > r.length && (_ = r.length), mt = r.window;
                    } else mt = a, g = o - r.offset, _ = r.length;
                    _ > h && (_ = h), h -= _, r.length -= _;
                    do a[o++] = mt[g++]; while (--_);
                    0 === r.length && (r.mode = nt);
                    break;
                  case ut:
                    if (0 === h) break e;
                    a[o++] = r.length, h--, r.mode = nt;
                    break;
                  case ht:
                    if (r.wrap) {
                      for (; 32 > d;) {
                        if (0 === u) break e;
                        u--, f |= i[s++] << d, d += 8;
                      }
                      if (m -= h, e.total_out += m, r.total += m, m && (e.adler = r.check = r.flags ? w(r.check, a, m, o - m) : b(r.check, a, m, o - m)), m = h, (r.flags ? f : n(f)) !== r.check) {
                        e.msg = "incorrect data check", r.mode = ft;
                        break;
                      }
                      f = 0, d = 0;
                    }
                    r.mode = lt;
                  case lt:
                    if (r.wrap && r.flags) {
                      for (; 32 > d;) {
                        if (0 === u) break e;
                        u--, f += i[s++] << d, d += 8;
                      }
                      if (f !== (4294967295 & r.total)) {
                        e.msg = "incorrect length check", r.mode = ft;
                        break;
                      }
                      f = 0, d = 0;
                    }
                    r.mode = ct;
                  case ct:
                    xt = O;
                    break e;
                  case ft:
                    xt = T;
                    break e;
                  case dt:
                    return D;
                  case pt:
                  default:
                    return R;
                }
                return e.next_out = o, e.avail_out = h, e.next_in = s, e.avail_in = u, r.hold = f, r.bits = d, (r.wsize || m !== e.avail_out && r.mode < ft && (r.mode < ht || t !== E)) && c(e, e.output, e.next_out, m - e.avail_out) ? (r.mode = dt, D) : (p -= e.avail_in, m -= e.avail_out, e.total_in += p, e.total_out += m, r.total += m, r.wrap && m && (e.adler = r.check = r.flags ? w(r.check, a, m, e.next_out - m) : b(r.check, a, m, e.next_out - m)), e.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === X ? 128 : 0) + (r.mode === rt || r.mode === J ? 256 : 0), (0 === p && 0 === m || t === E) && xt === I && (xt = F), xt);
              }
              function d(e) {
                if (!e || !e.state) return R;
                var t = e.state;
                return t.window && (t.window = null), e.state = null, I;
              }
              function p(e, t) {
                var r;
                return e && e.state ? (r = e.state, 0 === (2 & r.wrap) ? R : (r.head = t, t.done = !1, I)) : R;
              }
              function m(e, t) {
                var r,
                  n,
                  a = t.length;
                return e && e.state ? (r = e.state, 0 !== r.wrap && r.mode !== Y ? R : r.mode === Y && (n = 1, n = b(n, t, a, 0), n !== r.check) ? T : c(e, t, a, a) ? (r.mode = dt, D) : (r.havedict = 1, I)) : R;
              }
              var _,
                g,
                v = e("../utils/common"),
                b = e("./adler32"),
                w = e("./crc32"),
                y = e("./inffast"),
                k = e("./inftrees"),
                x = 0,
                S = 1,
                z = 2,
                E = 4,
                C = 5,
                A = 6,
                I = 0,
                O = 1,
                B = 2,
                R = -2,
                T = -3,
                D = -4,
                F = -5,
                N = 8,
                P = 1,
                U = 2,
                L = 3,
                j = 4,
                Z = 5,
                W = 6,
                M = 7,
                H = 8,
                G = 9,
                K = 10,
                Y = 11,
                X = 12,
                V = 13,
                q = 14,
                J = 15,
                Q = 16,
                $ = 17,
                et = 18,
                tt = 19,
                rt = 20,
                nt = 21,
                it = 22,
                at = 23,
                st = 24,
                ot = 25,
                ut = 26,
                ht = 27,
                lt = 28,
                ct = 29,
                ft = 30,
                dt = 31,
                pt = 32,
                mt = 852,
                _t = 592,
                gt = 15,
                vt = gt,
                bt = !0;
              r.inflateReset = s, r.inflateReset2 = o, r.inflateResetKeep = a, r.inflateInit = h, r.inflateInit2 = u, r.inflate = f, r.inflateEnd = d, r.inflateGetHeader = p, r.inflateSetDictionary = m, r.inflateInfo = "pako inflate (from Nodeca project)";
            }, {
              "../utils/common": 62,
              "./adler32": 64,
              "./crc32": 66,
              "./inffast": 69,
              "./inftrees": 71
            }],
            71: [function (e, t, r) {
              var n = e("../utils/common"),
                i = 15,
                a = 852,
                s = 592,
                o = 0,
                u = 1,
                h = 2,
                l = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0],
                c = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78],
                f = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0],
                d = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
              t.exports = function (e, t, r, p, m, _, g, v) {
                var b,
                  w,
                  y,
                  k,
                  x,
                  S,
                  z,
                  E,
                  C,
                  A = v.bits,
                  I = 0,
                  O = 0,
                  B = 0,
                  R = 0,
                  T = 0,
                  D = 0,
                  F = 0,
                  N = 0,
                  P = 0,
                  U = 0,
                  L = null,
                  j = 0,
                  Z = new n.Buf16(i + 1),
                  W = new n.Buf16(i + 1),
                  M = null,
                  H = 0;
                for (I = 0; i >= I; I++) Z[I] = 0;
                for (O = 0; p > O; O++) Z[t[r + O]]++;
                for (T = A, R = i; R >= 1 && 0 === Z[R]; R--);
                if (T > R && (T = R), 0 === R) return m[_++] = 20971520, m[_++] = 20971520, v.bits = 1, 0;
                for (B = 1; R > B && 0 === Z[B]; B++);
                for (B > T && (T = B), N = 1, I = 1; i >= I; I++) if (N <<= 1, N -= Z[I], 0 > N) return -1;
                if (N > 0 && (e === o || 1 !== R)) return -1;
                for (W[1] = 0, I = 1; i > I; I++) W[I + 1] = W[I] + Z[I];
                for (O = 0; p > O; O++) 0 !== t[r + O] && (g[W[t[r + O]]++] = O);
                if (e === o ? (L = M = g, S = 19) : e === u ? (L = l, j -= 257, M = c, H -= 257, S = 256) : (L = f, M = d, S = -1), U = 0, O = 0, I = B, x = _, D = T, F = 0, y = -1, P = 1 << T, k = P - 1, e === u && P > a || e === h && P > s) return 1;
                for (;;) {
                  z = I - F, g[O] < S ? (E = 0, C = g[O]) : g[O] > S ? (E = M[H + g[O]], C = L[j + g[O]]) : (E = 96, C = 0), b = 1 << I - F, w = 1 << D, B = w;
                  do w -= b, m[x + (U >> F) + w] = z << 24 | E << 16 | C | 0; while (0 !== w);
                  for (b = 1 << I - 1; U & b;) b >>= 1;
                  if (0 !== b ? (U &= b - 1, U += b) : U = 0, O++, 0 === --Z[I]) {
                    if (I === R) break;
                    I = t[r + g[O]];
                  }
                  if (I > T && (U & k) !== y) {
                    for (0 === F && (F = T), x += B, D = I - F, N = 1 << D; R > D + F && (N -= Z[D + F], !(0 >= N));) D++, N <<= 1;
                    if (P += 1 << D, e === u && P > a || e === h && P > s) return 1;
                    y = U & k, m[y] = T << 24 | D << 16 | x - _ | 0;
                  }
                }
                return 0 !== U && (m[x + U] = I - F << 24 | 64 << 16 | 0), v.bits = T, 0;
              };
            }, {
              "../utils/common": 62
            }],
            72: [function (e, t, r) {
              t.exports = {
                2: "need dictionary",
                1: "stream end",
                0: "",
                "-1": "file error",
                "-2": "stream error",
                "-3": "data error",
                "-4": "insufficient memory",
                "-5": "buffer error",
                "-6": "incompatible version"
              };
            }, {}],
            73: [function (e, t, r) {
              function n(e) {
                for (var t = e.length; --t >= 0;) e[t] = 0;
              }
              function i(e, t, r, n, i) {
                this.static_tree = e, this.extra_bits = t, this.extra_base = r, this.elems = n, this.max_length = i, this.has_stree = e && e.length;
              }
              function a(e, t) {
                this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
              }
              function s(e) {
                return 256 > e ? ut[e] : ut[256 + (e >>> 7)];
              }
              function o(e, t) {
                e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255;
              }
              function u(e, t, r) {
                e.bi_valid > V - r ? (e.bi_buf |= t << e.bi_valid & 65535, o(e, e.bi_buf), e.bi_buf = t >> V - e.bi_valid, e.bi_valid += r - V) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += r);
              }
              function h(e, t, r) {
                u(e, r[2 * t], r[2 * t + 1]);
              }
              function l(e, t) {
                var r = 0;
                do r |= 1 & e, e >>>= 1, r <<= 1; while (--t > 0);
                return r >>> 1;
              }
              function c(e) {
                16 === e.bi_valid ? (o(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
              }
              function f(e, t) {
                var r,
                  n,
                  i,
                  a,
                  s,
                  o,
                  u = t.dyn_tree,
                  h = t.max_code,
                  l = t.stat_desc.static_tree,
                  c = t.stat_desc.has_stree,
                  f = t.stat_desc.extra_bits,
                  d = t.stat_desc.extra_base,
                  p = t.stat_desc.max_length,
                  m = 0;
                for (a = 0; X >= a; a++) e.bl_count[a] = 0;
                for (u[2 * e.heap[e.heap_max] + 1] = 0, r = e.heap_max + 1; Y > r; r++) n = e.heap[r], a = u[2 * u[2 * n + 1] + 1] + 1, a > p && (a = p, m++), u[2 * n + 1] = a, n > h || (e.bl_count[a]++, s = 0, n >= d && (s = f[n - d]), o = u[2 * n], e.opt_len += o * (a + s), c && (e.static_len += o * (l[2 * n + 1] + s)));
                if (0 !== m) {
                  do {
                    for (a = p - 1; 0 === e.bl_count[a];) a--;
                    e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[p]--, m -= 2;
                  } while (m > 0);
                  for (a = p; 0 !== a; a--) for (n = e.bl_count[a]; 0 !== n;) i = e.heap[--r], i > h || (u[2 * i + 1] !== a && (e.opt_len += (a - u[2 * i + 1]) * u[2 * i], u[2 * i + 1] = a), n--);
                }
              }
              function d(e, t, r) {
                var n,
                  i,
                  a = new Array(X + 1),
                  s = 0;
                for (n = 1; X >= n; n++) a[n] = s = s + r[n - 1] << 1;
                for (i = 0; t >= i; i++) {
                  var o = e[2 * i + 1];
                  0 !== o && (e[2 * i] = l(a[o]++, o));
                }
              }
              function p() {
                var e,
                  t,
                  r,
                  n,
                  a,
                  s = new Array(X + 1);
                for (r = 0, n = 0; W - 1 > n; n++) for (lt[n] = r, e = 0; e < 1 << tt[n]; e++) ht[r++] = n;
                for (ht[r - 1] = n, a = 0, n = 0; 16 > n; n++) for (ct[n] = a, e = 0; e < 1 << rt[n]; e++) ut[a++] = n;
                for (a >>= 7; G > n; n++) for (ct[n] = a << 7, e = 0; e < 1 << rt[n] - 7; e++) ut[256 + a++] = n;
                for (t = 0; X >= t; t++) s[t] = 0;
                for (e = 0; 143 >= e;) st[2 * e + 1] = 8, e++, s[8]++;
                for (; 255 >= e;) st[2 * e + 1] = 9, e++, s[9]++;
                for (; 279 >= e;) st[2 * e + 1] = 7, e++, s[7]++;
                for (; 287 >= e;) st[2 * e + 1] = 8, e++, s[8]++;
                for (d(st, H + 1, s), e = 0; G > e; e++) ot[2 * e + 1] = 5, ot[2 * e] = l(e, 5);
                ft = new i(st, tt, M + 1, H, X), dt = new i(ot, rt, 0, G, X), pt = new i(new Array(0), nt, 0, K, q);
              }
              function m(e) {
                var t;
                for (t = 0; H > t; t++) e.dyn_ltree[2 * t] = 0;
                for (t = 0; G > t; t++) e.dyn_dtree[2 * t] = 0;
                for (t = 0; K > t; t++) e.bl_tree[2 * t] = 0;
                e.dyn_ltree[2 * J] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
              }
              function _(e) {
                e.bi_valid > 8 ? o(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
              }
              function g(e, t, r, n) {
                _(e), n && (o(e, r), o(e, ~r)), R.arraySet(e.pending_buf, e.window, t, r, e.pending), e.pending += r;
              }
              function v(e, t, r, n) {
                var i = 2 * t,
                  a = 2 * r;
                return e[i] < e[a] || e[i] === e[a] && n[t] <= n[r];
              }
              function b(e, t, r) {
                for (var n = e.heap[r], i = r << 1; i <= e.heap_len && (i < e.heap_len && v(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !v(t, n, e.heap[i], e.depth));) e.heap[r] = e.heap[i], r = i, i <<= 1;
                e.heap[r] = n;
              }
              function w(e, t, r) {
                var n,
                  i,
                  a,
                  o,
                  l = 0;
                if (0 !== e.last_lit) do n = e.pending_buf[e.d_buf + 2 * l] << 8 | e.pending_buf[e.d_buf + 2 * l + 1], i = e.pending_buf[e.l_buf + l], l++, 0 === n ? h(e, i, t) : (a = ht[i], h(e, a + M + 1, t), o = tt[a], 0 !== o && (i -= lt[a], u(e, i, o)), n--, a = s(n), h(e, a, r), o = rt[a], 0 !== o && (n -= ct[a], u(e, n, o))); while (l < e.last_lit);
                h(e, J, t);
              }
              function y(e, t) {
                var r,
                  n,
                  i,
                  a = t.dyn_tree,
                  s = t.stat_desc.static_tree,
                  o = t.stat_desc.has_stree,
                  u = t.stat_desc.elems,
                  h = -1;
                for (e.heap_len = 0, e.heap_max = Y, r = 0; u > r; r++) 0 !== a[2 * r] ? (e.heap[++e.heap_len] = h = r, e.depth[r] = 0) : a[2 * r + 1] = 0;
                for (; e.heap_len < 2;) i = e.heap[++e.heap_len] = 2 > h ? ++h : 0, a[2 * i] = 1, e.depth[i] = 0, e.opt_len--, o && (e.static_len -= s[2 * i + 1]);
                for (t.max_code = h, r = e.heap_len >> 1; r >= 1; r--) b(e, a, r);
                i = u;
                do r = e.heap[1], e.heap[1] = e.heap[e.heap_len--], b(e, a, 1), n = e.heap[1], e.heap[--e.heap_max] = r, e.heap[--e.heap_max] = n, a[2 * i] = a[2 * r] + a[2 * n], e.depth[i] = (e.depth[r] >= e.depth[n] ? e.depth[r] : e.depth[n]) + 1, a[2 * r + 1] = a[2 * n + 1] = i, e.heap[1] = i++, b(e, a, 1); while (e.heap_len >= 2);
                e.heap[--e.heap_max] = e.heap[1], f(e, t), d(a, h, e.bl_count);
              }
              function k(e, t, r) {
                var n,
                  i,
                  a = -1,
                  s = t[1],
                  o = 0,
                  u = 7,
                  h = 4;
                for (0 === s && (u = 138, h = 3), t[2 * (r + 1) + 1] = 65535, n = 0; r >= n; n++) i = s, s = t[2 * (n + 1) + 1], ++o < u && i === s || (h > o ? e.bl_tree[2 * i] += o : 0 !== i ? (i !== a && e.bl_tree[2 * i]++, e.bl_tree[2 * Q]++) : 10 >= o ? e.bl_tree[2 * $]++ : e.bl_tree[2 * et]++, o = 0, a = i, 0 === s ? (u = 138, h = 3) : i === s ? (u = 6, h = 3) : (u = 7, h = 4));
              }
              function x(e, t, r) {
                var n,
                  i,
                  a = -1,
                  s = t[1],
                  o = 0,
                  l = 7,
                  c = 4;
                for (0 === s && (l = 138, c = 3), n = 0; r >= n; n++) if (i = s, s = t[2 * (n + 1) + 1], !(++o < l && i === s)) {
                  if (c > o) {
                    do h(e, i, e.bl_tree); while (0 !== --o);
                  } else 0 !== i ? (i !== a && (h(e, i, e.bl_tree), o--), h(e, Q, e.bl_tree), u(e, o - 3, 2)) : 10 >= o ? (h(e, $, e.bl_tree), u(e, o - 3, 3)) : (h(e, et, e.bl_tree), u(e, o - 11, 7));
                  o = 0, a = i, 0 === s ? (l = 138, c = 3) : i === s ? (l = 6, c = 3) : (l = 7, c = 4);
                }
              }
              function S(e) {
                var t;
                for (k(e, e.dyn_ltree, e.l_desc.max_code), k(e, e.dyn_dtree, e.d_desc.max_code), y(e, e.bl_desc), t = K - 1; t >= 3 && 0 === e.bl_tree[2 * it[t] + 1]; t--);
                return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
              }
              function z(e, t, r, n) {
                var i;
                for (u(e, t - 257, 5), u(e, r - 1, 5), u(e, n - 4, 4), i = 0; n > i; i++) u(e, e.bl_tree[2 * it[i] + 1], 3);
                x(e, e.dyn_ltree, t - 1), x(e, e.dyn_dtree, r - 1);
              }
              function E(e) {
                var t,
                  r = 4093624447;
                for (t = 0; 31 >= t; t++, r >>>= 1) if (1 & r && 0 !== e.dyn_ltree[2 * t]) return D;
                if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e.dyn_ltree[26]) return F;
                for (t = 32; M > t; t++) if (0 !== e.dyn_ltree[2 * t]) return F;
                return D;
              }
              function C(e) {
                mt || (p(), mt = !0), e.l_desc = new a(e.dyn_ltree, ft), e.d_desc = new a(e.dyn_dtree, dt), e.bl_desc = new a(e.bl_tree, pt), e.bi_buf = 0, e.bi_valid = 0, m(e);
              }
              function A(e, t, r, n) {
                u(e, (P << 1) + (n ? 1 : 0), 3), g(e, t, r, !0);
              }
              function I(e) {
                u(e, U << 1, 3), h(e, J, st), c(e);
              }
              function O(e, t, r, n) {
                var i,
                  a,
                  s = 0;
                e.level > 0 ? (e.strm.data_type === N && (e.strm.data_type = E(e)), y(e, e.l_desc), y(e, e.d_desc), s = S(e), i = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, i >= a && (i = a)) : i = a = r + 5, i >= r + 4 && -1 !== t ? A(e, t, r, n) : e.strategy === T || a === i ? (u(e, (U << 1) + (n ? 1 : 0), 3), w(e, st, ot)) : (u(e, (L << 1) + (n ? 1 : 0), 3), z(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, s + 1), w(e, e.dyn_ltree, e.dyn_dtree)), m(e), n && _(e);
              }
              function B(e, t, r) {
                return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & r, e.last_lit++, 0 === t ? e.dyn_ltree[2 * r]++ : (e.matches++, t--, e.dyn_ltree[2 * (ht[r] + M + 1)]++, e.dyn_dtree[2 * s(t)]++), e.last_lit === e.lit_bufsize - 1;
              }
              var R = e("../utils/common"),
                T = 4,
                D = 0,
                F = 1,
                N = 2,
                P = 0,
                U = 1,
                L = 2,
                j = 3,
                Z = 258,
                W = 29,
                M = 256,
                H = M + 1 + W,
                G = 30,
                K = 19,
                Y = 2 * H + 1,
                X = 15,
                V = 16,
                q = 7,
                J = 256,
                Q = 16,
                $ = 17,
                et = 18,
                tt = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0],
                rt = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],
                nt = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7],
                it = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
                at = 512,
                st = new Array(2 * (H + 2));
              n(st);
              var ot = new Array(2 * G);
              n(ot);
              var ut = new Array(at);
              n(ut);
              var ht = new Array(Z - j + 1);
              n(ht);
              var lt = new Array(W);
              n(lt);
              var ct = new Array(G);
              n(ct);
              var ft,
                dt,
                pt,
                mt = !1;
              r._tr_init = C, r._tr_stored_block = A, r._tr_flush_block = O, r._tr_tally = B, r._tr_align = I;
            }, {
              "../utils/common": 62
            }],
            74: [function (e, t, r) {
              function n() {
                this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
              }
              t.exports = n;
            }, {}]
          }, {}, [10])(10);
        });
        var saveAs = saveAs || function (e) {
          if (!("undefined" == typeof e || "undefined" != typeof navigator && /MSIE [1-9]\./.test(navigator.userAgent))) {
            var t = e.document,
              r = function r() {
                return e.URL || e.webkitURL || e;
              },
              n = t.createElement("a"),
              i = ("download" in n),
              a = function a(e) {
                var t = new MouseEvent("click");
                e.dispatchEvent(t);
              },
              s = /constructor/i.test(e.HTMLElement) || e.safari,
              o = /CriOS\/[\d]+/.test(navigator.userAgent),
              u = e.setImmediate || e.setTimeout,
              h = function h(e) {
                u(function () {
                  throw e;
                }, 0);
              },
              l = "application/octet-stream",
              c = 4e4,
              f = function f(e) {
                var t = function t() {
                  "string" == typeof e ? r().revokeObjectURL(e) : e.remove();
                };
                setTimeout(t, c);
              },
              d = function d(e, t, r) {
                t = [].concat(t);
                for (var n = t.length; n--;) {
                  var i = e["on" + t[n]];
                  if ("function" == typeof i) try {
                    i.call(e, r || e);
                  } catch (a) {
                    h(a);
                  }
                }
              },
              p = function p(e) {
                return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob([String.fromCharCode(65279), e], {
                  type: e.type
                }) : e;
              },
              m = function m(t, h, c) {
                c || (t = p(t));
                var m,
                  _ = this,
                  g = t.type,
                  v = g === l,
                  b = function b() {
                    d(_, "writestart progress write writeend".split(" "));
                  },
                  w = function w() {
                    if ((o || v && s) && e.FileReader) {
                      var n = new FileReader();
                      return n.onloadend = function () {
                        var t = o ? n.result : n.result.replace(/^data:[^;]*;/, "data:attachment/file;"),
                          r = e.open(t, "_blank");
                        r || (e.location.href = t), t = void 0, _.readyState = _.DONE, b();
                      }, n.readAsDataURL(t), void (_.readyState = _.INIT);
                    }
                    if (m || (m = r().createObjectURL(t)), v) e.location.href = m;else {
                      var i = e.open(m, "_blank");
                      i || (e.location.href = m);
                    }
                    _.readyState = _.DONE, b(), f(m);
                  };
                return _.readyState = _.INIT, i ? (m = r().createObjectURL(t), void u(function () {
                  n.href = m, n.download = h, a(n), b(), f(m), _.readyState = _.DONE;
                }, 0)) : void w();
              },
              _ = m.prototype,
              g = function g(e, t, r) {
                return new m(e, t || e.name || "download", r);
              };
            return "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function (e, t, r) {
              return t = t || e.name || "download", r || (e = p(e)), navigator.msSaveOrOpenBlob(e, t);
            } : (_.abort = function () {}, _.readyState = _.INIT = 0, _.WRITING = 1, _.DONE = 2, _.error = _.onwritestart = _.onprogress = _.onwrite = _.onabort = _.onerror = _.onwriteend = null, g);
          }
        }("undefined" != typeof self && self || "undefined" != typeof window && window || this);

        // #endregion ORIGINAL CODE

        _cjsExports = exports('default', module.exports);
      }, {});
    }
  };
});

System.register("chunks:///_virtual/jszip.min.mjs_cjs=&original=.js", ['./jszip.min.js', './cjs-loader.mjs'], function (exports, module) {
  var __cjsMetaURL, loader;
  return {
    setters: [function (module) {
      __cjsMetaURL = module.__cjsMetaURL;
      var _setter = {};
      _setter.__cjsMetaURL = module.__cjsMetaURL;
      _setter.default = module.default;
      exports(_setter);
    }, function (module) {
      loader = module.default;
    }],
    execute: function () {
      // I am the facade module who provides access to the CommonJS module './jszip.min.js'~
      if (!__cjsMetaURL) {
        loader.throwInvalidWrapper('./jszip.min.js', module.meta.url);
      }
      loader.require(__cjsMetaURL);
    }
  };
});

System.register("chunks:///_virtual/LanguageMgr.ts", ['cc', './DBRecord.ts'], function (exports) {
  var cclegacy, DBRecord;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "323f2SLDT1Om4V+T7F07fGz", "LanguageMgr", undefined);
      var LanguageMgr = exports('LanguageMgr', /*#__PURE__*/function () {
        function LanguageMgr() {
          this.lan = "cn";
          this._res = null;
        }
        var _proto = LanguageMgr.prototype;
        _proto.init = function init() {
          this._res = DBRecord._getRes("DuoYuYan");
        };
        _proto.getTextById = function getTextById(id) {
          return this._res[id] ? this._res[id][this.lan] : "";
        };
        _proto.getErrCode = function getErrCode(id) {
          var info = DBRecord._getRes("CuoWuMa")[id];
          if (!info) return "";
          return info.descrip;
        };
        _proto.format = function format(target) {
          if (!target) return "";
          var str = "";
          var list = target.split("${}");
          for (var i = 0; i < list.length; i++) {
            str += list[i];
            if ((arguments.length <= 1 ? 0 : arguments.length - 1) > i) str += i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1];
          }
          return str;
        };
        _proto.getQualityName = function getQualityName(quality) {
          return this.getTextById(70 + quality);
        };
        _proto.getQualityStr = function getQualityStr(quality) {
          switch (quality) {
            case 1:
              return "#c2c2c2";
            case 2:
              return "#42d8d9";
            case 3:
              return "#46a1ff";
            case 4:
              return "#e23cf6";
            case 5:
              return "#fffc00";
            case 6:
              return "#91f42f";
            case 7:
              return "#ff872f";
            case 8:
              return "#ff872f";
            case 9:
              return "#ff5154";
            case 10:
              return "#ff5154";
            case 11:
              return "#ff5599";
            case 12:
              return "#ff5599";
            case 13:
              return "#ff4242";
            case 14:
              return "#ff4242";
          }
          return "";
        }
        /** 获取登录语言 */;
        _proto.getLoginLanguage = function getLoginLanguage(id) {
          var cfg = DBRecord.fetchId("DengLuDuoYuYan", id);
          if (!cfg) return "";
          return cfg[this.lan];
        };
        return LanguageMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_BattleSettingView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Sprite, Button, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Sprite = module.Sprite;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "98eae8+watKM5p7eZStNTJg", "Layout_BattleSettingView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property,
        menu = _decorator.menu;
      var Layout_BattleSettingView = exports('Layout_BattleSettingView', (_dec = ccclass("Layout_BattleSettingView"), _dec2 = menu("Layout/Layout_BattleSettingView"), _dec3 = property(Label), _dec4 = property(Sprite), _dec5 = property(Button), _dec6 = property(Button), _dec7 = property(Button), _dec8 = property({
        type: ScrollList
      }), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_BattleSettingView, _EventAgent);
        function Layout_BattleSettingView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "titleLab", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBackBat", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnRest", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnContinue", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemScroll", _descriptor6, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_BattleSettingView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "titleLab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnBackBat", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnRest", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnContinue", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "itemScroll", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_Defeat.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "f098d3XT6hHDZaTTwAByQtX", "Layout_Defeat", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_Defeat = exports('Layout_Defeat', (_dec = ccclass('Layout_Defeat'), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(Layout_Defeat, _Component);
        function Layout_Defeat() {
          return _Component.apply(this, arguments) || this;
        }
        var _proto = Layout_Defeat.prototype;
        _proto.start = function start() {};
        _proto.update = function update(deltaTime) {};
        return Layout_Defeat;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_HeroSkillItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "c6c95O9b5pLypxtwq8AF91k", "Layout_HeroSkillItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_HeroSkillItem = exports('Layout_HeroSkillItem', (_dec = ccclass("Layout_HeroSkillItem"), _dec2 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_HeroSkillItem, _EventAgent);
        function Layout_HeroSkillItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnClick", _descriptor, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_HeroSkillItem;
      }(EventAgent), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnClick", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_item_server.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "34f63R2NxVIUpvT7PiBlDDh", "Layout_item_server", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_item_server = exports('Layout_item_server', (_dec = ccclass('Layout_item_server'), _dec2 = menu("Layout/Layout_item_server"), _dec3 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_item_server, _EventAgent);
        function Layout_item_server() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnTest", _descriptor, _assertThisInitialized(_this));
          _this.abc = "你好0";
          return _this;
        }
        return Layout_item_server;
      }(EventAgent), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnTest", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_itemProp.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "36054FnLVhOYr9K58nFhDfa", "Layout_itemProp", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_itemProp = exports('Layout_itemProp', (_dec = ccclass('Layout_itemProp'), _dec2 = menu("Layout/Layout_itemProp"), _dec3 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_itemProp, _EventAgent);
        function Layout_itemProp() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnClick", _descriptor, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_itemProp;
      }(EventAgent), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnClick", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_TeamHeroItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "60847NEMzdCLYdf35oFs+Wg", "Layout_TeamHeroItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_TeamHeroItem = exports('Layout_TeamHeroItem', (_dec = ccclass("Layout_TeamHeroItem"), _dec2 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_TeamHeroItem, _EventAgent);
        function Layout_TeamHeroItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnClick", _descriptor, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_TeamHeroItem;
      }(EventAgent), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnClick", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_TeamMyItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "a8bb3o07oRIebCp0YDyDOLS", "Layout_TeamMyItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_TeamMyItem = exports('Layout_TeamMyItem', (_dec = ccclass('Layout_TeamMyItem'), _dec2 = property(Button), _dec3 = property(ScrollList), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_TeamMyItem, _EventAgent);
        function Layout_TeamMyItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** 名称修改按钮 */
          _initializerDefineProperty(_this, "btnChange", _descriptor, _assertThisInitialized(_this));
          /** 使用按钮 */
          _initializerDefineProperty(_this, "btnUse", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_TeamMyItem;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnChange", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnUse", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_TeamSoldierItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "0491aShYxRH6YmtHdtNAGFV", "Layout_TeamSoldierItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_TeamSoldierItem = exports('Layout_TeamSoldierItem', (_dec = ccclass("Layout_TeamSoldierItem"), _dec2 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_TeamSoldierItem, _EventAgent);
        function Layout_TeamSoldierItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnClick", _descriptor, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_TeamSoldierItem;
      }(EventAgent), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnClick", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_BagView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, ToggleContainer, Node, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      ToggleContainer = module.ToggleContainer;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "2000alPqIpL04gjUbCrFmr8", "Layout_UI_BagView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_BagView = exports('Layout_UI_BagView', (_dec = ccclass("Layout_UI_BagView"), _dec2 = property({
        type: Button,
        tooltip: "关闭按钮"
      }), _dec3 = property({
        type: ScrollList,
        tooltip: "滚动列表"
      }), _dec4 = property({
        type: ToggleContainer,
        tooltip: "单选切换组"
      }), _dec5 = property({
        type: Node,
        tooltip: "无数据节点"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_BagView, _EventAgent);
        function Layout_UI_BagView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnClose", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollList", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleGroup", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "noDataNode", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_BagView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnClose", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "scrollList", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "toggleGroup", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "noDataNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_BuildUpgradeView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './CostItem.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Node, ProgressBar, ScrollView, Slider, EventAgent, CostItem, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      ScrollView = module.ScrollView;
      Slider = module.Slider;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24;
      cclegacy._RF.push({}, "b2a72MRHLdAcY+JfN+y+Iz9", "Layout_UI_BuildUpgradeView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_BuildUpgradeView = exports('Layout_UI_BuildUpgradeView', (_dec = ccclass("Layout_UI_BuildUpgradeView"), _dec2 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "返回按钮"
      }), _dec3 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "建筑名称"
      }), _dec4 = property({
        type: Label,
        displayName: "建筑等级 ",
        tooltip: "建筑等级"
      }), _dec5 = property({
        type: Node,
        displayName: "效果总节点",
        tooltip: "效果总节点"
      }), _dec6 = property({
        type: ScrollList,
        displayName: "效果滚动列表",
        tooltip: "效果滚动列表"
      }), _dec7 = property({
        type: Node,
        displayName: "条件节点",
        tooltip: "条件节点"
      }), _dec8 = property({
        type: ScrollList,
        displayName: "条件滚动列表",
        tooltip: "条件滚动列表"
      }), _dec9 = property({
        type: Node,
        displayName: "加速节点",
        tooltip: "加速节点"
      }), _dec10 = property({
        type: Button,
        displayName: "升级按钮",
        tooltip: "升级按钮"
      }), _dec11 = property({
        type: Button,
        displayName: "返回按钮2",
        tooltip: "返回按钮2"
      }), _dec12 = property({
        type: ProgressBar,
        displayName: "进度条",
        tooltip: "进度条"
      }), _dec13 = property({
        type: Label,
        displayName: "升级需要时间",
        tooltip: "升级需要时间"
      }), _dec14 = property({
        type: Label,
        displayName: "剩余时间文本",
        tooltip: "剩余时间文本"
      }), _dec15 = property({
        type: Button,
        displayName: "加速按钮",
        tooltip: "加速按钮"
      }), _dec16 = property({
        type: CostItem,
        displayName: "消耗项",
        tooltip: "消耗项"
      }), _dec17 = property({
        type: Button,
        displayName: "使用按钮",
        tooltip: "使用按钮"
      }), _dec18 = property({
        type: Button,
        displayName: "减少按钮",
        tooltip: "减少使用数量"
      }), _dec19 = property({
        type: Button,
        displayName: "增加按钮",
        tooltip: "增加使用数量"
      }), _dec20 = property({
        type: ScrollView,
        displayName: "道具列表滚动视图",
        tooltip: "显示可用的加速道具"
      }), _dec21 = property({
        type: Node,
        displayName: "道具列表内容",
        tooltip: "道具列表项的父节点容器"
      }), _dec22 = property({
        type: Node,
        displayName: "道具项预制体",
        tooltip: "道具列表项的预制体模板"
      }), _dec23 = property({
        type: Slider,
        displayName: "数量滑动条",
        tooltip: "调节使用数量"
      }), _dec24 = property({
        type: Label,
        displayName: "当前数量",
        tooltip: "显示当前选择的数量"
      }), _dec25 = property({
        type: Label,
        displayName: "总加速时间",
        tooltip: "显示总共可以加速的时间"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_BuildUpgradeView, _EventAgent);
        function Layout_UI_BuildUpgradeView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildName2", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtCurLevel2", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "xiaoguoNode", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "xgScrollList", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "tiaojianNode", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "tjScrollList", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jiasuNode", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUpgrade", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "progressBar", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upNeedTimeLab", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtRemainingTime", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnQuick", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "costItem", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUse", _descriptor16, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnSub", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnAdd", _descriptor18, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemListScrollView", _descriptor19, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemListContent", _descriptor20, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemPrefab", _descriptor21, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "countSlider", _descriptor22, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtCurrentCount", _descriptor23, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "totalTimeLab", _descriptor24, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_BuildUpgradeView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "buildName2", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "txtCurLevel2", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "xiaoguoNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "xgScrollList", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "tiaojianNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "tjScrollList", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "jiasuNode", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "btnUpgrade", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "upNeedTimeLab", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "txtRemainingTime", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "btnQuick", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "costItem", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "btnUse", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "btnSub", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "btnAdd", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "itemListScrollView", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "itemListContent", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "itemPrefab", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "countSlider", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "txtCurrentCount", [_dec24], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "totalTimeLab", [_dec25], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_ChooseHeroView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "39c76U6UbBIf6hi1qnmQ6Gb", "Layout_UI_ChooseHeroView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_ChooseHeroView = exports('Layout_UI_ChooseHeroView', (_dec = ccclass("Layout_UI_ChooseHeroView"), _dec2 = property({
        type: Button,
        displayName: "图片按钮",
        tooltip: "返回按钮"
      }), _dec3 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "返回按钮"
      }), _dec4 = property({
        type: ScrollList,
        displayName: "英雄列表",
        tooltip: "英雄列表"
      }), _dec5 = property({
        type: Node,
        displayName: "无数据节点",
        tooltip: "无数据节点"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_ChooseHeroView, _EventAgent);
        function Layout_UI_ChooseHeroView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollList", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "noDataNode", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_ChooseHeroView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "scrollList", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "noDataNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_GetHeroView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ActionFramesItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Sprite, Label, EventAgent, ActionFramesItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
      Sprite = module.Sprite;
      Label = module.Label;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "68ff0vND9VBn7RcJ/dR4YYX", "Layout_UI_GetHeroView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_GetHeroView = exports('Layout_UI_GetHeroView', (_dec = ccclass("Layout_UI_GetHeroView"), _dec2 = property({
        type: Button
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Node
      }), _dec7 = property([Sprite]), _dec8 = property(ActionFramesItem), _dec9 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_GetHeroView, _EventAgent);
        function Layout_UI_GetHeroView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** back背景 */
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          /** 信息节点 */
          _initializerDefineProperty(_this, "infoNode", _descriptor2, _assertThisInitialized(_this));
          /** 英雄职业icon */
          _initializerDefineProperty(_this, "jobSp", _descriptor3, _assertThisInitialized(_this));
          /** 英雄名称 */
          _initializerDefineProperty(_this, "nameLabel", _descriptor4, _assertThisInitialized(_this));
          /** 英雄星星亮节点*/
          _initializerDefineProperty(_this, "starNode", _descriptor5, _assertThisInitialized(_this));
          /** 英雄星星亮列表*/
          _initializerDefineProperty(_this, "starList", _descriptor6, _assertThisInitialized(_this));
          /** 帧模型展示 */
          _initializerDefineProperty(_this, "action", _descriptor7, _assertThisInitialized(_this));
          /** 提示关闭文本 */
          _initializerDefineProperty(_this, "closeLabel", _descriptor8, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_GetHeroView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "infoNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "jobSp", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "nameLabel", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "starNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "starList", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "action", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "closeLabel", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_GetRewardView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "33df3mdBmREGo2QylSYUB7g", "Layout_UI_GetRewardView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_GetRewardView = exports('Layout_UI_GetRewardView', (_dec = ccclass("Layout_UI_GetRewardView"), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_UI_GetRewardView, _Layout_uiListBase);
        function Layout_UI_GetRewardView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bgNode", _descriptor3, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_GetRewardView;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "bgNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_GMView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollList.ts', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, ScrollList, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "51ccflN+lJJl5Fg49xXpTo6", "Layout_UI_GMView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * GM界面布局
       */
      var Layout_UI_GMView = exports('Layout_UI_GMView', (_dec = ccclass("Layout_UI_GMView"), _dec2 = property({
        type: Button,
        tooltip: "返回按钮"
      }), _dec3 = property({
        type: Button,
        tooltip: "返回按钮"
      }), _dec4 = property({
        type: ScrollList,
        tooltip: "GM命令列表"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_GMView, _EventAgent);
        function Layout_UI_GMView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollList", _descriptor3, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_GMView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "scrollList", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_HeroAttributeTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Label, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
      Label = module.Label;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
      cclegacy._RF.push({}, "f23ceZl1ipAJZlYJe8yN5k9", "Layout_UI_HeroAttributeTips", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_HeroAttributeTips = exports('Layout_UI_HeroAttributeTips', (_dec = ccclass("Layout_UI_HeroAttributeTips"), _dec2 = property({
        type: Button
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Node
      }), _dec7 = property({
        type: Label
      }), _dec8 = property({
        type: Node
      }), _dec9 = property([Label]), _dec10 = property({
        type: Node
      }), _dec11 = property({
        type: Label
      }), _dec12 = property({
        type: Node
      }), _dec13 = property([Label]), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_HeroAttributeTips, _EventAgent);
        function Layout_UI_HeroAttributeTips() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** back背景 */
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          /** 属性接节点 */
          _initializerDefineProperty(_this, "contentNode", _descriptor2, _assertThisInitialized(_this));
          /** 重生时间节点 */
          _initializerDefineProperty(_this, "timeNode", _descriptor3, _assertThisInitialized(_this));
          /** 重生时间文本 */
          _initializerDefineProperty(_this, "timeLabel", _descriptor4, _assertThisInitialized(_this));
          /** 基础属性标题节点 */
          _initializerDefineProperty(_this, "ordinaryTitleNode", _descriptor5, _assertThisInitialized(_this));
          /** 基础属性标题文本 */
          _initializerDefineProperty(_this, "ordTitleLabel", _descriptor6, _assertThisInitialized(_this));
          /** 基础属性节点 */
          _initializerDefineProperty(_this, "ordinaryNode", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "ordLabes", _descriptor8, _assertThisInitialized(_this));
          /** 基础属性标题节点 */
          _initializerDefineProperty(_this, "seniorTitleNode", _descriptor9, _assertThisInitialized(_this));
          /** 基础属性标题文本 */
          _initializerDefineProperty(_this, "seniorTitleLabel", _descriptor10, _assertThisInitialized(_this));
          /** 基础属性节点 */
          _initializerDefineProperty(_this, "seniorNode", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "seniorLabes", _descriptor12, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_HeroAttributeTips;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "contentNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "timeNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "timeLabel", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "ordinaryTitleNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "ordTitleLabel", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "ordinaryNode", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "ordLabes", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "seniorTitleNode", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "seniorTitleLabel", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "seniorNode", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "seniorLabes", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_HeroCultivateView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './AttrItem.ts', './CostItem.ts', './ScrollList.ts', './ActionFramesItem.ts', './UpAttrTipsItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Sprite, Label, Button, ProgressBar, Toggle, EventAgent, AttrItem, CostItem, ScrollList, ActionFramesItem, UpAttrTipsItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      Label = module.Label;
      Button = module.Button;
      ProgressBar = module.ProgressBar;
      Toggle = module.Toggle;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      AttrItem = module.AttrItem;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      UpAttrTipsItem = module.UpAttrTipsItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44, _descriptor45, _descriptor46;
      cclegacy._RF.push({}, "f41d2BOor1GR5Dd08sYgdUh", "Layout_UI_HeroCultivateView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_HeroCultivateView = exports('Layout_UI_HeroCultivateView', (_dec = ccclass("Layout_UI_HeroCultivateView"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Sprite
      }), _dec6 = property({
        type: Label
      }), _dec7 = property({
        type: Node
      }), _dec8 = property({
        type: Node
      }), _dec9 = property({
        type: Node
      }), _dec10 = property([Sprite]), _dec11 = property(UpAttrTipsItem), _dec12 = property({
        type: Node
      }), _dec13 = property({
        type: Label
      }), _dec14 = property({
        type: Label
      }), _dec15 = property({
        type: Button
      }), _dec16 = property({
        type: Node
      }), _dec17 = property({
        type: Node
      }), _dec18 = property([AttrItem]), _dec19 = property({
        type: ScrollList
      }), _dec20 = property({
        type: Label
      }), _dec21 = property({
        type: Button
      }), _dec22 = property({
        type: Label
      }), _dec23 = property(CostItem), _dec24 = property({
        type: Button
      }), _dec25 = property({
        type: Label
      }), _dec26 = property(CostItem), _dec27 = property({
        type: Node
      }), _dec28 = property({
        type: Label
      }), _dec29 = property({
        type: Label
      }), _dec30 = property({
        type: Label
      }), _dec31 = property({
        type: Label
      }), _dec32 = property(CostItem), _dec33 = property(CostItem), _dec34 = property({
        type: Button
      }), _dec35 = property({
        type: Node
      }), _dec36 = property({
        type: ProgressBar
      }), _dec37 = property({
        type: Label
      }), _dec38 = property({
        type: Sprite
      }), _dec39 = property({
        type: Sprite
      }), _dec40 = property({
        type: Button
      }), _dec41 = property({
        type: Node
      }), _dec42 = property({
        type: Node
      }), _dec43 = property({
        type: ScrollList
      }), _dec44 = property([Toggle]), _dec45 = property({
        type: Node
      }), _dec46 = property({
        type: Button
      }), _dec47 = property(ActionFramesItem), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_HeroCultivateView, _EventAgent);
        function Layout_UI_HeroCultivateView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** top信息节点 */
          _initializerDefineProperty(_this, "infoNode", _descriptor, _assertThisInitialized(_this));
          /** top信息左边英雄展示节点 */
          _initializerDefineProperty(_this, "leftNode", _descriptor2, _assertThisInitialized(_this));
          /** 模型展示节点 */
          _initializerDefineProperty(_this, "heroNode", _descriptor3, _assertThisInitialized(_this));
          /** 英雄职业icon */
          _initializerDefineProperty(_this, "jobSp", _descriptor4, _assertThisInitialized(_this));
          /** 英雄名字*/
          _initializerDefineProperty(_this, "nameLab", _descriptor5, _assertThisInitialized(_this));
          /** 英雄星星展示节点*/
          _initializerDefineProperty(_this, "starNode", _descriptor6, _assertThisInitialized(_this));
          /** 英雄星星底节点*/
          _initializerDefineProperty(_this, "diNode", _descriptor7, _assertThisInitialized(_this));
          /** 英雄星星亮节点*/
          _initializerDefineProperty(_this, "hasNode", _descriptor8, _assertThisInitialized(_this));
          /** 英雄星星亮列表*/
          _initializerDefineProperty(_this, "starList", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upAttrTipsItem", _descriptor10, _assertThisInitialized(_this));
          /** top培养信息节点 */
          _initializerDefineProperty(_this, "cultivateNode", _descriptor11, _assertThisInitialized(_this));
          /** 英雄等级文本 */
          _initializerDefineProperty(_this, "lvLab", _descriptor12, _assertThisInitialized(_this));
          /** 英雄阶级文本 */
          _initializerDefineProperty(_this, "stageLab", _descriptor13, _assertThisInitialized(_this));
          /** 英雄详细按钮 */
          _initializerDefineProperty(_this, "detailedBtn", _descriptor14, _assertThisInitialized(_this));
          /** 英雄升级节点 */
          _initializerDefineProperty(_this, "levelNode", _descriptor15, _assertThisInitialized(_this));
          /** 英雄属性节点 */
          _initializerDefineProperty(_this, "typeNode", _descriptor16, _assertThisInitialized(_this));
          /** 英雄属性节点 */
          _initializerDefineProperty(_this, "typeList", _descriptor17, _assertThisInitialized(_this));
          /** 技能显示列表 */
          _initializerDefineProperty(_this, "skillScroll", _descriptor18, _assertThisInitialized(_this));
          /** 英雄升级条件提示文本 */
          _initializerDefineProperty(_this, "lvMaxLab", _descriptor19, _assertThisInitialized(_this));
          /** 英雄升级按钮 */
          _initializerDefineProperty(_this, "lvBtn", _descriptor20, _assertThisInitialized(_this));
          /** 英雄升级按钮Label */
          _initializerDefineProperty(_this, "lvBtnName", _descriptor21, _assertThisInitialized(_this));
          /** 英雄升级消耗item */
          _initializerDefineProperty(_this, "lvCostItem", _descriptor22, _assertThisInitialized(_this));
          /** 英雄突破按钮 */
          _initializerDefineProperty(_this, "stageBtn", _descriptor23, _assertThisInitialized(_this));
          /** 英雄升阶按钮Label */
          _initializerDefineProperty(_this, "stageBtnName", _descriptor24, _assertThisInitialized(_this));
          /** 英雄升阶消耗item */
          _initializerDefineProperty(_this, "stageCostItem", _descriptor25, _assertThisInitialized(_this));
          /** 升星节点 */
          _initializerDefineProperty(_this, "upStarNode", _descriptor26, _assertThisInitialized(_this));
          /** 当前星级效果等级 */
          _initializerDefineProperty(_this, "curStgLab", _descriptor27, _assertThisInitialized(_this));
          /** 当前星级效果描述 */
          _initializerDefineProperty(_this, "curDescLab", _descriptor28, _assertThisInitialized(_this));
          /** 下级星级效果等级 */
          _initializerDefineProperty(_this, "nextStgLab", _descriptor29, _assertThisInitialized(_this));
          /** 下级星级效果描述 */
          _initializerDefineProperty(_this, "nextDescLab", _descriptor30, _assertThisInitialized(_this));
          /** 英雄升星消耗item1 */
          _initializerDefineProperty(_this, "upStarCost1", _descriptor31, _assertThisInitialized(_this));
          /** 英雄升星消耗item2 */
          _initializerDefineProperty(_this, "upStarCost2", _descriptor32, _assertThisInitialized(_this));
          /** 英雄升星按钮 */
          _initializerDefineProperty(_this, "upStarBtn", _descriptor33, _assertThisInitialized(_this));
          /** 英雄激活节点 */
          _initializerDefineProperty(_this, "actNode", _descriptor34, _assertThisInitialized(_this));
          /** 英雄碎片收集进度条 */
          _initializerDefineProperty(_this, "debrisBar", _descriptor35, _assertThisInitialized(_this));
          /** 英雄碎片收集进度文本 */
          _initializerDefineProperty(_this, "debrisBarLab", _descriptor36, _assertThisInitialized(_this));
          /** 英雄碎片品质背景 */
          _initializerDefineProperty(_this, "debrisSp", _descriptor37, _assertThisInitialized(_this));
          /** 英雄碎片icon */
          _initializerDefineProperty(_this, "debrisIcon", _descriptor38, _assertThisInitialized(_this));
          /** 英雄碎片添加按钮 */
          _initializerDefineProperty(_this, "debrisAddBtn", _descriptor39, _assertThisInitialized(_this));
          /** top升阶信息节点 */
          _initializerDefineProperty(_this, "stageNode", _descriptor40, _assertThisInitialized(_this));
          /** 英雄列表节点 */
          _initializerDefineProperty(_this, "listNode", _descriptor41, _assertThisInitialized(_this));
          /** 英雄列表节点 */
          _initializerDefineProperty(_this, "heroScroll", _descriptor42, _assertThisInitialized(_this));
          /** tab按钮列表 */
          _initializerDefineProperty(_this, "tabBtn", _descriptor43, _assertThisInitialized(_this));
          /** 底部返回节点 */
          _initializerDefineProperty(_this, "bottomNode", _descriptor44, _assertThisInitialized(_this));
          /** 返回按钮 */
          _initializerDefineProperty(_this, "btnBack", _descriptor45, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "action", _descriptor46, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_HeroCultivateView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "infoNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "leftNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "heroNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "jobSp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "starNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "diNode", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "hasNode", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "starList", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "upAttrTipsItem", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "cultivateNode", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "lvLab", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "stageLab", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "detailedBtn", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "levelNode", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "typeNode", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "typeList", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "skillScroll", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "lvMaxLab", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "lvBtn", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "lvBtnName", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "lvCostItem", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "stageBtn", [_dec24], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "stageBtnName", [_dec25], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "stageCostItem", [_dec26], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "upStarNode", [_dec27], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "curStgLab", [_dec28], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "curDescLab", [_dec29], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor29 = _applyDecoratedDescriptor(_class2.prototype, "nextStgLab", [_dec30], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor30 = _applyDecoratedDescriptor(_class2.prototype, "nextDescLab", [_dec31], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor31 = _applyDecoratedDescriptor(_class2.prototype, "upStarCost1", [_dec32], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor32 = _applyDecoratedDescriptor(_class2.prototype, "upStarCost2", [_dec33], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor33 = _applyDecoratedDescriptor(_class2.prototype, "upStarBtn", [_dec34], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor34 = _applyDecoratedDescriptor(_class2.prototype, "actNode", [_dec35], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor35 = _applyDecoratedDescriptor(_class2.prototype, "debrisBar", [_dec36], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor36 = _applyDecoratedDescriptor(_class2.prototype, "debrisBarLab", [_dec37], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor37 = _applyDecoratedDescriptor(_class2.prototype, "debrisSp", [_dec38], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor38 = _applyDecoratedDescriptor(_class2.prototype, "debrisIcon", [_dec39], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor39 = _applyDecoratedDescriptor(_class2.prototype, "debrisAddBtn", [_dec40], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor40 = _applyDecoratedDescriptor(_class2.prototype, "stageNode", [_dec41], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor41 = _applyDecoratedDescriptor(_class2.prototype, "listNode", [_dec42], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor42 = _applyDecoratedDescriptor(_class2.prototype, "heroScroll", [_dec43], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor43 = _applyDecoratedDescriptor(_class2.prototype, "tabBtn", [_dec44], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor44 = _applyDecoratedDescriptor(_class2.prototype, "bottomNode", [_dec45], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor45 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec46], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor46 = _applyDecoratedDescriptor(_class2.prototype, "action", [_dec47], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_HeroSkillActivityTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './HeroSkillItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, EventAgent, HeroSkillItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      HeroSkillItem = module.HeroSkillItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "cd26cofpZ5LP6TyFbyfQbG4", "Layout_UI_HeroSkillActivityTips", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_HeroSkillActivityTips = exports('Layout_UI_HeroSkillActivityTips', (_dec = ccclass("Layout_UI_HeroSkillActivityTips"), _dec2 = property({
        type: Button
      }), _dec3 = property(HeroSkillItem), _dec4 = property({
        type: Label
      }), _dec5 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_HeroSkillActivityTips, _EventAgent);
        function Layout_UI_HeroSkillActivityTips() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** back背景 */
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          /** 技能item */
          _initializerDefineProperty(_this, "skillItem", _descriptor2, _assertThisInitialized(_this));
          /** 技能名称文本 */
          _initializerDefineProperty(_this, "skillNameLab", _descriptor3, _assertThisInitialized(_this));
          /** 技能描述文本 */
          _initializerDefineProperty(_this, "skillDesc", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_HeroSkillActivityTips;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "skillItem", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "skillNameLab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "skillDesc", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_HeroSkillDescTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './HeroSkillItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, EventAgent, HeroSkillItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      HeroSkillItem = module.HeroSkillItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "61b2egH3qtFyoSaRxE6aJ54", "Layout_UI_HeroSkillDescTips", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_HeroSkillDescTips = exports('Layout_UI_HeroSkillDescTips', (_dec = ccclass("Layout_UI_HeroSkillDescTips"), _dec2 = property({
        type: Button
      }), _dec3 = property(HeroSkillItem), _dec4 = property({
        type: Label
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Label
      }), _dec7 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_HeroSkillDescTips, _EventAgent);
        function Layout_UI_HeroSkillDescTips() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** back背景 */
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          /** 技能item */
          _initializerDefineProperty(_this, "skillItem", _descriptor2, _assertThisInitialized(_this));
          /** 技能名称文本 */
          _initializerDefineProperty(_this, "skillNameLab", _descriptor3, _assertThisInitialized(_this));
          /** 技能描述文本 */
          _initializerDefineProperty(_this, "skillDesc", _descriptor4, _assertThisInitialized(_this));
          /** 技能激活条件文本 */
          _initializerDefineProperty(_this, "actLab", _descriptor5, _assertThisInitialized(_this));
          /** 技能类型文本 */
          _initializerDefineProperty(_this, "skillTypeLab", _descriptor6, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_HeroSkillDescTips;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "skillItem", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "skillNameLab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "skillDesc", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "actLab", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "skillTypeLab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_ItemDetailView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Item_prop.ts', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, RichText, Item_prop, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      RichText = module.RichText;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "d0d44exOyZP7bD5vx8IbmVM", "Layout_UI_ItemDetailView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_ItemDetailView = exports('Layout_UI_ItemDetailView', (_dec = ccclass("Layout_UI_ItemDetailView"), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Item_prop), _dec7 = property(Label), _dec8 = property(Label), _dec9 = property(RichText), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_ItemDetailView, _EventAgent);
        function Layout_UI_ItemDetailView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sourceBtn", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "useBtn", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemProp", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemName", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemNum", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailTxt", _descriptor8, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_ItemDetailView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "sourceBtn", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "useBtn", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "itemProp", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "itemName", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "itemNum", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "detailTxt", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_ItemSourceView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts', './Item_prop.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, RichText, EventAgent, ScrollList, Item_prop;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      RichText = module.RichText;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      Item_prop = module.Item_prop;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "2a42bEy56BG8oPj+b6CDnCJ", "Layout_UI_ItemSourceView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_ItemSourceView = exports('Layout_UI_ItemSourceView', (_dec = ccclass("Layout_UI_ItemSourceView"), _dec2 = property({
        type: Button,
        tooltip: "背景关闭按钮"
      }), _dec3 = property({
        type: Item_prop,
        tooltip: "道具显示"
      }), _dec4 = property({
        type: Label,
        tooltip: "道具名称"
      }), _dec5 = property({
        type: Label,
        tooltip: "道具数量"
      }), _dec6 = property({
        type: RichText,
        tooltip: "道具描述"
      }), _dec7 = property({
        type: ScrollList,
        tooltip: "来源列表"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_ItemSourceView, _EventAgent);
        function Layout_UI_ItemSourceView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemProp", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemName", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemNum", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailTxt", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollList", _descriptor6, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_ItemSourceView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "itemProp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "itemName", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "itemNum", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "detailTxt", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "scrollList", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_MainView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './RoleItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, EventAgent, RoleItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      RoleItem = module.RoleItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22;
      cclegacy._RF.push({}, "83f9bDx1m9I4aSJsN9hz5+B", "Layout_UI_MainView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_MainView = exports('Layout_UI_MainView', (_dec = ccclass("Layout_UI_MainView"), _dec2 = property({
        type: Button,
        tooltip: "设置按钮"
      }), _dec3 = property({
        type: RoleItem,
        tooltip: "头像组件框"
      }), _dec4 = property({
        type: Node,
        tooltip: "货币总节点"
      }), _dec5 = property({
        type: Button,
        tooltip: "任务按钮"
      }), _dec6 = property({
        type: Button,
        tooltip: "邮件按钮"
      }), _dec7 = property({
        type: Button,
        tooltip: "排行榜按钮"
      }), _dec8 = property({
        type: Node,
        tooltip: "左侧按钮区域"
      }), _dec9 = property({
        type: Button,
        tooltip: "切换按钮"
      }), _dec10 = property({
        type: Button,
        tooltip: "英雄出征按钮"
      }), _dec11 = property({
        type: Button,
        tooltip: "英雄首充按钮"
      }), _dec12 = property({
        type: Button,
        tooltip: "福利按钮"
      }), _dec13 = property({
        type: Button,
        tooltip: "活动按钮"
      }), _dec14 = property({
        type: Button,
        tooltip: "宝箱按钮"
      }), _dec15 = property({
        type: Button,
        tooltip: "战斗按钮"
      }), _dec16 = property({
        type: Button,
        tooltip: "阵容按钮"
      }), _dec17 = property({
        type: Button,
        tooltip: "背包按钮"
      }), _dec18 = property({
        type: Button,
        tooltip: "商店按钮"
      }), _dec19 = property({
        type: Button,
        tooltip: "联盟按钮"
      }), _dec20 = property({
        type: Button,
        tooltip: "野外按钮"
      }), _dec21 = property({
        type: Button,
        tooltip: "GM按钮"
      }), _dec22 = property({
        type: Button,
        tooltip: "放大地图按钮"
      }), _dec23 = property({
        type: Button,
        tooltip: "缩小地图按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_MainView, _EventAgent);
        function Layout_UI_MainView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "setBtn", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "roleItem", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "moneyNode", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuTaskBtn", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuEmailBtn", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuRankBtn", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "leftBg", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "switchBtn", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "yxczBtn", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuCCBtn", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuFLBtn", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuHDBtn", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "baoxiangBtn", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuFightBtn", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuZRBtn", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuBagBtn", _descriptor16, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuShopBtn", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuLMBtn", _descriptor18, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "MenuYWBtn", _descriptor19, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "GMBtn", _descriptor20, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "TestBigBtn", _descriptor21, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "TestSmallBtn", _descriptor22, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_MainView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "setBtn", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "roleItem", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "moneyNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "MenuTaskBtn", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "MenuEmailBtn", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "MenuRankBtn", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "leftBg", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "switchBtn", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "yxczBtn", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "MenuCCBtn", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "MenuFLBtn", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "MenuHDBtn", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "baoxiangBtn", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "MenuFightBtn", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "MenuZRBtn", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "MenuBagBtn", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "MenuShopBtn", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "MenuLMBtn", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "MenuYWBtn", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "GMBtn", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "TestBigBtn", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "TestSmallBtn", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_PlaceGetRewardView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Node, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "54fc9WrFvxNjYuMH3/ElDoC", "Layout_UI_PlaceGetRewardView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_PlaceGetRewardView = exports('Layout_UI_PlaceGetRewardView', (_dec = ccclass("Layout_UI_PlaceGetRewardView"), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Label), _dec6 = property(Node), _dec7 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_PlaceGetRewardView, _EventAgent);
        function Layout_UI_PlaceGetRewardView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "closeBtn", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lingquBtn", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "title", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "rewardLayout", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemPropPrefab", _descriptor6, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_PlaceGetRewardView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "closeBtn", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lingquBtn", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "title", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "rewardLayout", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "itemPropPrefab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_PlaceTaskView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './CostItem.ts', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Node, CostItem, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      Node = module.Node;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18;
      cclegacy._RF.push({}, "a56e8qt6r1NsYgylsq2b2pg", "Layout_UI_PlaceTaskView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_PlaceTaskView = exports('Layout_UI_PlaceTaskView', (_dec = ccclass("Layout_UI_PlaceTaskView"), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Label), _dec6 = property(Label), _dec7 = property(Label), _dec8 = property(Node), _dec9 = property(Node), _dec10 = property(Node), _dec11 = property(Node), _dec12 = property(Node), _dec13 = property(Node), _dec14 = property(Node), _dec15 = property(Node), _dec16 = property(Button), _dec17 = property(Node), _dec18 = property(Button), _dec19 = property(CostItem), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_PlaceTaskView, _EventAgent);
        function Layout_UI_PlaceTaskView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "wenhaoBtn", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "closeBtn", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTaskName", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTaskDesc", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbCostTime", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bingCellParent", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bingLiCellPrefab", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jiantou", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "rewardLayout", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemPropPrefab", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bottomNode1", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "taskSelectLayout", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "taskSelectItem", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "receiveBtn", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bottomNode2", _descriptor16, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "quickBtn", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cellCost", _descriptor18, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_PlaceTaskView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "wenhaoBtn", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "closeBtn", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "lbTaskName", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "lbTaskDesc", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lbCostTime", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "bingCellParent", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "bingLiCellPrefab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "jiantou", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "rewardLayout", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "itemPropPrefab", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "bottomNode1", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "taskSelectLayout", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "taskSelectItem", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "receiveBtn", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "bottomNode2", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "quickBtn", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "cellCost", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_RenameView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './CostItem.ts', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Node, EditBox, CostItem, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      Node = module.Node;
      EditBox = module.EditBox;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
      cclegacy._RF.push({}, "12c52WhbTJDQbM7tDWQw77O", "Layout_UI_RenameView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_RenameView = exports('Layout_UI_RenameView', (_dec = ccclass("Layout_UI_RenameView"), _dec2 = property({
        type: Button,
        tooltip: "蒙层关闭按钮"
      }), _dec3 = property({
        type: Label,
        tooltip: "标签"
      }), _dec4 = property({
        type: Node,
        tooltip: "对的打勾图标"
      }), _dec5 = property({
        type: Node,
        tooltip: "名称错误的图标"
      }), _dec6 = property({
        type: EditBox,
        tooltip: "输入框"
      }), _dec7 = property({
        type: Label,
        tooltip: "提示文本"
      }), _dec8 = property({
        type: Label,
        tooltip: "可以使用"
      }), _dec9 = property({
        type: Label,
        tooltip: "已被使用"
      }), _dec10 = property({
        type: CostItem,
        tooltip: "消耗显示组件"
      }), _dec11 = property({
        type: Button,
        tooltip: "使用按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_RenameView, _EventAgent);
        function Layout_UI_RenameView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTitle", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "gouImg", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "wrongImg", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "edtName", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTip1", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTip2", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTip3", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cellCost", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUse", _descriptor10, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_RenameView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lbTitle", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "gouImg", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "wrongImg", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "edtName", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lbTip1", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lbTip2", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "lbTip3", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "cellCost", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "btnUse", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_RoleInfoView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RoleItem.ts', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, RoleItem, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
    }, function (module) {
      RoleItem = module.RoleItem;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
      cclegacy._RF.push({}, "5f56czwqNRF7bafxi5+fnzv", "Layout_UI_RoleInfoView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_RoleInfoView = exports('Layout_UI_RoleInfoView', (_dec = ccclass("Layout_UI_RoleInfoView"), _dec2 = property({
        type: Button,
        tooltip: "蒙层关闭按钮"
      }), _dec3 = property({
        type: Button,
        tooltip: "关闭按钮"
      }), _dec4 = property({
        type: Label,
        tooltip: "等级值"
      }), _dec5 = property({
        type: RoleItem,
        tooltip: "角色头像组件"
      }), _dec6 = property({
        type: Label,
        tooltip: "昵称文本"
      }), _dec7 = property({
        type: Button,
        tooltip: "编辑昵称按钮"
      }), _dec8 = property({
        type: Label,
        tooltip: "用户ID值"
      }), _dec9 = property({
        type: Button,
        tooltip: "复制ID按钮"
      }), _dec10 = property({
        type: Label,
        tooltip: "区服值"
      }), _dec11 = property({
        type: Label,
        tooltip: "联盟名称"
      }), _dec12 = property({
        type: Button,
        tooltip: "装扮按钮"
      }), _dec13 = property({
        type: Button,
        tooltip: "兑换码按钮"
      }), _dec14 = property({
        type: Button,
        tooltip: "设置按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_RoleInfoView, _EventAgent);
        function Layout_UI_RoleInfoView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbLevel", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "roleItem", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbName", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnName", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbxId", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnId", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbsvName", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbLm", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnZb", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnDhm", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnSetting", _descriptor13, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_RoleInfoView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lbLevel", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "roleItem", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "lbName", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "btnName", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lbxId", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "btnId", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "lbsvName", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "lbLm", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "btnZb", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "btnDhm", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "btnSetting", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_ServerListView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "652569dHQRBi4Dya34danvd", "Layout_UI_ServerListView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_ServerListView = exports('Layout_UI_ServerListView', (_dec = ccclass('Layout_UI_ServerListView'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(ScrollList), _dec5 = property(ScrollList), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_ServerListView, _EventAgent);
        function Layout_UI_ServerListView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnClose", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollTab", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollServer", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_ServerListView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnClose", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "scrollTab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "scrollServer", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_SettingView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Toggle, Slider, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Toggle = module.Toggle;
      Slider = module.Slider;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "8fe26O4gldAz64/6WRbSbHT", "Layout_UI_SettingView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_SettingView = exports('Layout_UI_SettingView', (_dec = ccclass("Layout_UI_SettingView"), _dec2 = property({
        type: Button,
        tooltip: "蒙层关闭按钮"
      }), _dec3 = property({
        type: Toggle,
        tooltip: "音乐开关"
      }), _dec4 = property({
        type: Slider,
        tooltip: "音乐音量滑动条"
      }), _dec5 = property({
        type: Toggle,
        tooltip: "音效开关"
      }), _dec6 = property({
        type: Slider,
        tooltip: "音效音量滑动条"
      }), _dec7 = property({
        type: Toggle,
        tooltip: "伤害飘字开关"
      }), _dec8 = property({
        type: Toggle,
        tooltip: "技能特效开关"
      }), _dec9 = property({
        type: Button,
        tooltip: "切换账号按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_SettingView, _EventAgent);
        function Layout_UI_SettingView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleMusic", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sliderMusic", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleSound", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "sliderSound", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleDamage", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleSkillEffect", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnChange", _descriptor8, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_SettingView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "toggleMusic", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "sliderMusic", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "toggleSound", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "sliderSound", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "toggleDamage", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "toggleSkillEffect", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "btnChange", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_SheBeiUgradeView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './CostItem.ts', './SheBei.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Node, EventAgent, CostItem, SheBei;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      SheBei = module.SheBei;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
      cclegacy._RF.push({}, "f0341A+HoZKmZGPyOcBMRgA", "Layout_UI_SheBeiUgradeView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_SheBeiUpgradeView = exports('Layout_UI_SheBeiUpgradeView', (_dec = ccclass("Layout_UI_SheBeiUpgradeView"), _dec2 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "返回按钮"
      }), _dec3 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "建筑名称"
      }), _dec4 = property({
        type: Label,
        displayName: "当前等级文本",
        tooltip: "当前等级文本"
      }), _dec5 = property({
        type: Button,
        displayName: "跳转到升级按钮",
        tooltip: "跳转到升级按钮"
      }), _dec6 = property({
        type: Node,
        displayName: "英雄主宰节点",
        tooltip: "英雄主宰节点"
      }), _dec7 = property({
        type: Node,
        displayName: "设备节点",
        tooltip: "设备节点"
      }), _dec8 = property({
        type: Node,
        displayName: "设备节点",
        tooltip: "设备节点"
      }), _dec9 = property({
        type: Node,
        displayName: "设备详情",
        tooltip: "设备详情"
      }), _dec10 = property({
        type: SheBei,
        displayName: "设备组件",
        tooltip: "设备详情组件"
      }), _dec11 = property({
        type: Label,
        displayName: "详情名称",
        tooltip: "详情名称"
      }), _dec12 = property({
        type: Label,
        displayName: "详情文本",
        tooltip: "详情文本"
      }), _dec13 = property({
        type: Label,
        displayName: "当前人数",
        tooltip: "当前人数"
      }), _dec14 = property({
        type: Label,
        displayName: "下一等级人数",
        tooltip: "下一等级人数"
      }), _dec15 = property({
        type: CostItem,
        displayName: "设备升级消耗",
        tooltip: "设备消耗项"
      }), _dec16 = property({
        type: Button,
        displayName: "设备升级按钮",
        tooltip: "设备升级按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_SheBeiUpgradeView, _EventAgent);
        function Layout_UI_SheBeiUpgradeView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildName1", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtCurLevel", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnJumpUp", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "yxzzNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shebeiNode", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shebeiItem", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailSheBei", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "dtSheBei", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailName", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailTxt", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "curPersonNum", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nextPersonNum", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shebeiCostItem", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnSheBeiUp", _descriptor15, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_SheBeiUpgradeView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "buildName1", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "txtCurLevel", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnJumpUp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "yxzzNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "shebeiNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "shebeiItem", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "detailSheBei", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "dtSheBei", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "detailName", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "detailTxt", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "curPersonNum", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "nextPersonNum", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "shebeiCostItem", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "btnSheBeiUp", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_SheBeiUpgradeView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './CostItem.ts', './SheBei.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Label, Prefab, ProgressBar, EventAgent, CostItem, SheBei, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
      Label = module.Label;
      Prefab = module.Prefab;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      SheBei = module.SheBei;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38;
      cclegacy._RF.push({}, "70144eF/shNTL2fJeEvEXRk", "Layout_UI_SheBeiUpgradeView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_SheBeiUgradeView = exports('Layout_UI_SheBeiUgradeView', (_dec = ccclass("Layout_UI_SheBeiUgradeView"), _dec2 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "返回按钮"
      }), _dec3 = property({
        type: Node,
        displayName: "页面1",
        tooltip: "页面1"
      }), _dec4 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "建筑名称"
      }), _dec5 = property({
        type: Label,
        displayName: "当前等级文本",
        tooltip: "当前等级文本"
      }), _dec6 = property({
        type: Button,
        displayName: "跳转到升级按钮",
        tooltip: "跳转到升级按钮"
      }), _dec7 = property({
        type: Node,
        displayName: "英雄主宰节点",
        tooltip: "英雄主宰节点"
      }), _dec8 = property({
        type: Node,
        displayName: "设备节点",
        tooltip: "设备节点"
      }), _dec9 = property({
        type: Prefab,
        displayName: "设备预制体",
        tooltip: "设备预制体"
      }), _dec10 = property({
        type: Node,
        displayName: "设备详情",
        tooltip: "设备详情"
      }), _dec11 = property({
        type: SheBei,
        displayName: "设备组件",
        tooltip: "设备详情组件"
      }), _dec12 = property({
        type: Label,
        displayName: "详情名称",
        tooltip: "详情名称"
      }), _dec13 = property({
        type: Label,
        displayName: "详情文本",
        tooltip: "详情文本"
      }), _dec14 = property({
        type: Label,
        displayName: "当前人数",
        tooltip: "当前人数"
      }), _dec15 = property({
        type: Label,
        displayName: "下一等级人数",
        tooltip: "下一等级人数"
      }), _dec16 = property({
        type: CostItem,
        displayName: "设备升级消耗",
        tooltip: "设备消耗项"
      }), _dec17 = property({
        type: Button,
        displayName: "设备升级按钮",
        tooltip: "设备升级按钮"
      }), _dec18 = property({
        type: Node,
        displayName: "页面2",
        tooltip: "页面2"
      }), _dec19 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "建筑名称"
      }), _dec20 = property({
        type: Label,
        displayName: "建筑等级 ",
        tooltip: "建筑等级"
      }), _dec21 = property({
        type: Node,
        displayName: "建筑节点",
        tooltip: "建筑节点"
      }), _dec22 = property({
        type: Prefab,
        displayName: "建筑预制体",
        tooltip: "建筑预制体"
      }), _dec23 = property({
        type: Node,
        displayName: "英雄列表节点",
        tooltip: "英雄列表节点"
      }), _dec24 = property({
        type: Prefab,
        displayName: "英雄item预制体",
        tooltip: "英雄item预制体"
      }), _dec25 = property({
        type: Node,
        displayName: "效果总节点",
        tooltip: "效果总节点"
      }), _dec26 = property({
        type: Node,
        displayName: "效果Cell父节点",
        tooltip: "效果Cell父节点"
      }), _dec27 = property({
        type: Node,
        displayName: "效果单元格",
        tooltip: "效果单元格"
      }), _dec28 = property({
        type: Node,
        displayName: "条件节点",
        tooltip: "条件节点"
      }), _dec29 = property({
        type: ScrollList,
        displayName: "下拉框",
        tooltip: "条件下拉框"
      }), _dec30 = property({
        type: Node,
        displayName: "加速节点",
        tooltip: "加速节点"
      }), _dec31 = property({
        type: Button,
        displayName: "升级按钮",
        tooltip: "升级按钮"
      }), _dec32 = property({
        type: Button,
        displayName: "返回按钮2",
        tooltip: "返回按钮2"
      }), _dec33 = property({
        type: ProgressBar,
        displayName: "进度条",
        tooltip: "进度条"
      }), _dec34 = property({
        type: Label,
        displayName: "升级需要时间",
        tooltip: "升级需要时间"
      }), _dec35 = property({
        type: Label,
        displayName: "剩余时间文本",
        tooltip: "剩余时间文本"
      }), _dec36 = property({
        type: Button,
        displayName: "升级按钮",
        tooltip: "升级按钮"
      }), _dec37 = property({
        type: Button,
        displayName: "加速按钮",
        tooltip: "加速按钮"
      }), _dec38 = property({
        type: CostItem,
        displayName: "消耗项",
        tooltip: "消耗项"
      }), _dec39 = property({
        type: Button,
        displayName: "加速按钮",
        tooltip: "加速按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_SheBeiUgradeView, _EventAgent);
        function Layout_UI_SheBeiUgradeView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          // 通用按钮
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          // Page1 UI组件
          _initializerDefineProperty(_this, "page1", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildName1", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtCurLevel", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnJumpUp", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "yxzzNode", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shebeiNode", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shebeiPrefab", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailSheBei", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "dtSheBei", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailName", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "detailTxt", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "curPersonNum", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "nextPersonNum", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "shebeiCostItem", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnSheBeiUp", _descriptor16, _assertThisInitialized(_this));
          // Page2 UI组件
          _initializerDefineProperty(_this, "page2", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildName2", _descriptor18, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtCurLevel2", _descriptor19, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jianzuNode", _descriptor20, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jianzuPrefab", _descriptor21, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroNode", _descriptor22, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroPrefab", _descriptor23, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "xiaoguoNode", _descriptor24, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "xiaoguoParent", _descriptor25, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "xiaoguoCellNode", _descriptor26, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "tiaojianNode", _descriptor27, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "tjScrollList", _descriptor28, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "quickNode", _descriptor29, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUpgrade", _descriptor30, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor31, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "progressBar", _descriptor32, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upNeedTimeLab", _descriptor33, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtRemainingTime", _descriptor34, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUpgrage", _descriptor35, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnQuick", _descriptor36, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "costItem", _descriptor37, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnJiashu", _descriptor38, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_SheBeiUgradeView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "page1", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildName1", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "txtCurLevel", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnJumpUp", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "yxzzNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "shebeiNode", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "shebeiPrefab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "detailSheBei", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "dtSheBei", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "detailName", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "detailTxt", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "curPersonNum", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "nextPersonNum", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "shebeiCostItem", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "btnSheBeiUp", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "page2", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "buildName2", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "txtCurLevel2", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "jianzuNode", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "jianzuPrefab", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "heroNode", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "heroPrefab", [_dec24], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "xiaoguoNode", [_dec25], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "xiaoguoParent", [_dec26], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "xiaoguoCellNode", [_dec27], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "tiaojianNode", [_dec28], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "tjScrollList", [_dec29], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor29 = _applyDecoratedDescriptor(_class2.prototype, "quickNode", [_dec30], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor30 = _applyDecoratedDescriptor(_class2.prototype, "btnUpgrade", [_dec31], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor31 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec32], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor32 = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec33], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor33 = _applyDecoratedDescriptor(_class2.prototype, "upNeedTimeLab", [_dec34], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor34 = _applyDecoratedDescriptor(_class2.prototype, "txtRemainingTime", [_dec35], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor35 = _applyDecoratedDescriptor(_class2.prototype, "btnUpgrage", [_dec36], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor36 = _applyDecoratedDescriptor(_class2.prototype, "btnQuick", [_dec37], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor37 = _applyDecoratedDescriptor(_class2.prototype, "costItem", [_dec38], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor38 = _applyDecoratedDescriptor(_class2.prototype, "btnJiashu", [_dec39], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_SoldierCultivateView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './AttrItem.ts', './CostItem.ts', './ScrollList.ts', './ActionFramesItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Sprite, Label, RichText, Button, Toggle, EventAgent, AttrItem, CostItem, ScrollList, ActionFramesItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      Label = module.Label;
      RichText = module.RichText;
      Button = module.Button;
      Toggle = module.Toggle;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      AttrItem = module.AttrItem;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27;
      cclegacy._RF.push({}, "28b0bj8DNNA374cNeTyTH77", "Layout_UI_SoldierCultivateView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_SoldierCultivateView = exports('Layout_UI_SoldierCultivateView', (_dec = ccclass("Layout_UI_SoldierCultivateView"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Sprite
      }), _dec6 = property({
        type: Sprite
      }), _dec7 = property({
        type: Label
      }), _dec8 = property({
        type: RichText
      }), _dec9 = property(CostItem), _dec10 = property(CostItem), _dec11 = property({
        type: Button
      }), _dec12 = property({
        type: Label
      }), _dec13 = property({
        type: Button
      }), _dec14 = property({
        type: Label
      }), _dec15 = property({
        type: Label
      }), _dec16 = property({
        type: Node
      }), _dec17 = property({
        type: Label
      }), _dec18 = property({
        type: Label
      }), _dec19 = property({
        type: Node
      }), _dec20 = property([AttrItem]), _dec21 = property({
        type: Label
      }), _dec22 = property({
        type: Node
      }), _dec23 = property({
        type: ScrollList
      }), _dec24 = property({
        type: ScrollList
      }), _dec25 = property([Toggle]), _dec26 = property({
        type: Node
      }), _dec27 = property({
        type: Button
      }), _dec28 = property(ActionFramesItem), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_SoldierCultivateView, _EventAgent);
        function Layout_UI_SoldierCultivateView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** top信息节点 */
          _initializerDefineProperty(_this, "infoNode", _descriptor, _assertThisInitialized(_this));
          /** top信息左边英雄展示节点 */
          _initializerDefineProperty(_this, "leftNode", _descriptor2, _assertThisInitialized(_this));
          /** 模型展示节点 */
          _initializerDefineProperty(_this, "soldierNode", _descriptor3, _assertThisInitialized(_this));
          /** 立绘展示sprite */
          _initializerDefineProperty(_this, "iconSp", _descriptor4, _assertThisInitialized(_this));
          /** 兵种icon */
          _initializerDefineProperty(_this, "jobSp", _descriptor5, _assertThisInitialized(_this));
          /** 士兵名字*/
          _initializerDefineProperty(_this, "nameLab", _descriptor6, _assertThisInitialized(_this));
          /** 士兵克制描述 */
          _initializerDefineProperty(_this, "hitDescLab", _descriptor7, _assertThisInitialized(_this));
          /** 消耗item1 */
          _initializerDefineProperty(_this, "costItem1", _descriptor8, _assertThisInitialized(_this));
          /** 消耗item2 */
          _initializerDefineProperty(_this, "costItem2", _descriptor9, _assertThisInitialized(_this));
          /** 士兵升级按钮 */
          _initializerDefineProperty(_this, "lvBtn", _descriptor10, _assertThisInitialized(_this));
          /** 士兵升级按钮Label */
          _initializerDefineProperty(_this, "lvBtnName", _descriptor11, _assertThisInitialized(_this));
          /** 士兵突破按钮 */
          _initializerDefineProperty(_this, "stageBtn", _descriptor12, _assertThisInitialized(_this));
          /** 士兵升阶按钮Label */
          _initializerDefineProperty(_this, "stageBtnName", _descriptor13, _assertThisInitialized(_this));
          /** 士兵升级上限条件 */
          _initializerDefineProperty(_this, "lvMaxLab", _descriptor14, _assertThisInitialized(_this));
          /** top培养信息节点 */
          _initializerDefineProperty(_this, "cultivateNode", _descriptor15, _assertThisInitialized(_this));
          /** 士兵等级文本 */
          _initializerDefineProperty(_this, "lvLab", _descriptor16, _assertThisInitialized(_this));
          /** 士兵阶级文本 */
          _initializerDefineProperty(_this, "stageLab", _descriptor17, _assertThisInitialized(_this));
          /** 士兵属性节点 */
          _initializerDefineProperty(_this, "typeNode", _descriptor18, _assertThisInitialized(_this));
          /** 士兵属性列表 */
          _initializerDefineProperty(_this, "typeList", _descriptor19, _assertThisInitialized(_this));
          /** 兵种简介文本 */
          _initializerDefineProperty(_this, "descLab", _descriptor20, _assertThisInitialized(_this));
          /** top升阶信息节点 */
          _initializerDefineProperty(_this, "stageNode", _descriptor21, _assertThisInitialized(_this));
          /** 士兵阶级描述列表 */
          _initializerDefineProperty(_this, "descScroll", _descriptor22, _assertThisInitialized(_this));
          /** 士兵列表 */
          _initializerDefineProperty(_this, "soldierScroll", _descriptor23, _assertThisInitialized(_this));
          /** tab按钮列表 */
          _initializerDefineProperty(_this, "tabBtn", _descriptor24, _assertThisInitialized(_this));
          /** 底部返回节点 */
          _initializerDefineProperty(_this, "bottomNode", _descriptor25, _assertThisInitialized(_this));
          /** 返回按钮 */
          _initializerDefineProperty(_this, "btnBack", _descriptor26, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "action", _descriptor27, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_SoldierCultivateView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "infoNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "leftNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "soldierNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "iconSp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "jobSp", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "hitDescLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "costItem1", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "costItem2", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "lvBtn", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "lvBtnName", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "stageBtn", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "stageBtnName", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "lvMaxLab", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "cultivateNode", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "lvLab", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "stageLab", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "typeNode", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "typeList", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "descLab", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "stageNode", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "descScroll", [_dec23], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "soldierScroll", [_dec24], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "tabBtn", [_dec25], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "bottomNode", [_dec26], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec27], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "action", [_dec28], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_SpeedUpView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './CostItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, ProgressBar, Node, Slider, EventAgent, CostItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      ProgressBar = module.ProgressBar;
      Node = module.Node;
      Slider = module.Slider;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      CostItem = module.CostItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
      cclegacy._RF.push({}, "a1b2cPUXm96i5wNHi86S1xt", "Layout_UI_SpeedUpView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 建造加速界面布局类
       */
      var Layout_UI_SpeedUpView = exports('Layout_UI_SpeedUpView', (_dec = ccclass("Layout_UI_SpeedUpView"), _dec2 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "点击返回按钮"
      }), _dec3 = property({
        type: Button,
        displayName: "立即完成按钮",
        tooltip: "立即完成按钮"
      }), _dec4 = property({
        type: Button,
        displayName: "使用按钮",
        tooltip: "使用选中的加速道具"
      }), _dec5 = property({
        type: Button,
        displayName: "减少按钮",
        tooltip: "减少使用数量"
      }), _dec6 = property({
        type: Button,
        displayName: "增加按钮",
        tooltip: "增加使用数量"
      }), _dec7 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "建筑名称"
      }), _dec8 = property({
        type: ProgressBar,
        displayName: "进度条",
        tooltip: "进度条"
      }), _dec9 = property({
        type: Label,
        displayName: "剩余时间",
        tooltip: "剩余时间"
      }), _dec10 = property({
        type: CostItem,
        displayName: "消耗项",
        tooltip: "消耗项"
      }), _dec11 = property({
        type: Node,
        displayName: "道具列表内容",
        tooltip: "道具列表项的父节点容器"
      }), _dec12 = property({
        type: Slider,
        displayName: "数量滑动条",
        tooltip: "调节使用数量"
      }), _dec13 = property({
        type: Label,
        displayName: "当前数量",
        tooltip: "显示当前选择的数量"
      }), _dec14 = property({
        type: Label,
        displayName: "总加速时间",
        tooltip: "显示总共可以加速的时间"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_SpeedUpView, _EventAgent);
        function Layout_UI_SpeedUpView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnNow", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUse", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnSub", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnAdd", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildNameLab", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "progressBar", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lastTimeLab", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "costItem", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemListContent", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "countSlider", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "txtCurrentCount", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "totalTimeLab", _descriptor13, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_SpeedUpView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnNow", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnUse", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnSub", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnAdd", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "buildNameLab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "lastTimeLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "costItem", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "itemListContent", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "countSlider", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "txtCurrentCount", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "totalTimeLab", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_TeamHeroListView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Sprite, Node, Label, Toggle, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      Toggle = module.Toggle;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "ae10eoj/fdDNbp26rchgvo4", "Layout_UI_TeamHeroListView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_TeamHeroListView = exports('Layout_UI_TeamHeroListView', (_dec = ccclass("Layout_UI_TeamHeroListView"), _dec2 = property({
        type: Button
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Button
      }), _dec7 = property({
        type: ScrollList
      }), _dec8 = property([Toggle]), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_TeamHeroListView, _EventAgent);
        function Layout_UI_TeamHeroListView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** 背景精灵 */
          _initializerDefineProperty(_this, "bgClose", _descriptor, _assertThisInitialized(_this));
          /** 背景 */
          _initializerDefineProperty(_this, "bgSp", _descriptor2, _assertThisInitialized(_this));
          /** 标题Node */
          _initializerDefineProperty(_this, "titleNode", _descriptor3, _assertThisInitialized(_this));
          /** 标题标签 */
          _initializerDefineProperty(_this, "nameLab", _descriptor4, _assertThisInitialized(_this));
          /** 关闭按钮 */
          _initializerDefineProperty(_this, "btnClose", _descriptor5, _assertThisInitialized(_this));
          /** 滚动视图 */
          _initializerDefineProperty(_this, "heroScroll", _descriptor6, _assertThisInitialized(_this));
          /** 英雄类型选择按钮 */
          _initializerDefineProperty(_this, "toggles", _descriptor7, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_TeamHeroListView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bgClose", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "bgSp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "titleNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnClose", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "heroScroll", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "toggles", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_TeamMainView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './HeroAvatarItem.ts', './SoldierAvatarItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Sprite, Button, Label, EventAgent, HeroAvatarItem, SoldierAvatarItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      Button = module.Button;
      Label = module.Label;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      HeroAvatarItem = module.HeroAvatarItem;
    }, function (module) {
      SoldierAvatarItem = module.SoldierAvatarItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
      cclegacy._RF.push({}, "ec6a4O9y+xFuKGteC+pQ+lG", "Layout_UI_TeamMainView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_TeamMainView = exports('Layout_UI_TeamMainView', (_dec = ccclass("Layout_UI_TeamMainView"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Button
      }), _dec5 = property({
        type: Button
      }), _dec6 = property({
        type: Button
      }), _dec7 = property({
        type: Node
      }), _dec8 = property({
        type: Button
      }), _dec9 = property({
        type: Button
      }), _dec10 = property({
        type: Label
      }), _dec11 = property([HeroAvatarItem]), _dec12 = property([SoldierAvatarItem]), _dec13 = property({
        type: Button
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_TeamMainView, _EventAgent);
        function Layout_UI_TeamMainView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "content", _descriptor, _assertThisInitialized(_this));
          /** 背景 */
          _initializerDefineProperty(_this, "bgSp", _descriptor2, _assertThisInitialized(_this));
          /** 返回按钮 */
          _initializerDefineProperty(_this, "backBtn", _descriptor3, _assertThisInitialized(_this));
          /** 招募按钮 */
          _initializerDefineProperty(_this, "recruitBtn", _descriptor4, _assertThisInitialized(_this));
          /** 阵容编辑按钮 */
          _initializerDefineProperty(_this, "teamEditBtn", _descriptor5, _assertThisInitialized(_this));
          /** 培养入口Node */
          _initializerDefineProperty(_this, "cultivateNode", _descriptor6, _assertThisInitialized(_this));
          /** 点将台入口按钮 */
          _initializerDefineProperty(_this, "btnGeneral", _descriptor7, _assertThisInitialized(_this));
          /** 练兵台入口按钮 */
          _initializerDefineProperty(_this, "btnTraining", _descriptor8, _assertThisInitialized(_this));
          /** 编队名称 */
          _initializerDefineProperty(_this, "nameLab", _descriptor9, _assertThisInitialized(_this));
          /** 英雄阵容列表 */
          _initializerDefineProperty(_this, "heroList", _descriptor10, _assertThisInitialized(_this));
          /** 士兵阵容列表 */
          _initializerDefineProperty(_this, "soldierList", _descriptor11, _assertThisInitialized(_this));
          /** 战斗确定按钮 */
          _initializerDefineProperty(_this, "challengeBtn", _descriptor12, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_TeamMainView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "content", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "bgSp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "backBtn", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "recruitBtn", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "teamEditBtn", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "cultivateNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "btnGeneral", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "btnTraining", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "heroList", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "soldierList", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "challengeBtn", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_TeamMyView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "f1d26/McuVIgobjQFOaXpDR", "Layout_UI_TeamMyView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_TeamMyView = exports('Layout_UI_TeamMyView', (_dec = ccclass("Layout_UI_TeamMyView"), _dec2 = property({
        type: Button
      }), _dec3 = property(Button), _dec4 = property(ScrollList), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_TeamMyView, _EventAgent);
        function Layout_UI_TeamMyView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** 背景精灵 */
          _initializerDefineProperty(_this, "bgClose", _descriptor, _assertThisInitialized(_this));
          /** 关闭按钮 */
          _initializerDefineProperty(_this, "btnClose", _descriptor2, _assertThisInitialized(_this));
          /** 我的阵容列表 */
          _initializerDefineProperty(_this, "teamScroll", _descriptor3, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_TeamMyView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bgClose", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnClose", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "teamScroll", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_TeamSoldierListView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Sprite, Node, Label, Toggle, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      Toggle = module.Toggle;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "ab592bdXoFMgLgME2FwQ8Zo", "Layout_UI_TeamSoldierListView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_TeamSoldierListView = exports('Layout_UI_TeamSoldierListView', (_dec = ccclass("Layout_UI_TeamSoldierListView"), _dec2 = property({
        type: Button
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Node
      }), _dec5 = property({
        type: Label
      }), _dec6 = property({
        type: Button
      }), _dec7 = property({
        type: ScrollList
      }), _dec8 = property([Toggle]), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_TeamSoldierListView, _EventAgent);
        function Layout_UI_TeamSoldierListView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          /** 背景精灵 */
          _initializerDefineProperty(_this, "bgClose", _descriptor, _assertThisInitialized(_this));
          /** 背景 */
          _initializerDefineProperty(_this, "bgSp", _descriptor2, _assertThisInitialized(_this));
          /** 标题Node */
          _initializerDefineProperty(_this, "titleNode", _descriptor3, _assertThisInitialized(_this));
          /** 标题标签 */
          _initializerDefineProperty(_this, "nameLab", _descriptor4, _assertThisInitialized(_this));
          /** 关闭按钮 */
          _initializerDefineProperty(_this, "btnClose", _descriptor5, _assertThisInitialized(_this));
          /** 滚动视图 */
          _initializerDefineProperty(_this, "soldierScroll", _descriptor6, _assertThisInitialized(_this));
          /** 士兵类型选择按钮 */
          _initializerDefineProperty(_this, "toggles", _descriptor7, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_TeamSoldierListView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bgClose", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "bgSp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "titleNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnClose", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "soldierScroll", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "toggles", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_TrainingView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './CostItem.ts', './HeroAvatarItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Sprite, Slider, Toggle, EventAgent, CostItem, HeroAvatarItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      Sprite = module.Sprite;
      Slider = module.Slider;
      Toggle = module.Toggle;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      HeroAvatarItem = module.HeroAvatarItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21;
      cclegacy._RF.push({}, "eb44c9sIgpIcbXU7OFDKKes", "Layout_UI_TrainingView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 兵营训练界面布局类
       */
      var Layout_UI_TrainingView = exports('Layout_UI_TrainingView', (_dec = ccclass("Layout_UI_TrainingView"), _dec2 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "点击关闭训练界面"
      }), _dec3 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "显示当前兵营的名称（步兵营/弓兵营/骑兵营）"
      }), _dec4 = property({
        type: Label,
        displayName: "建筑等级",
        tooltip: "显示当前兵营的等级信息"
      }), _dec5 = property({
        type: Label,
        displayName: "驻扎英雄",
        tooltip: "显示当前驻扎的英雄名称"
      }), _dec6 = property({
        type: Label,
        displayName: "驻扎英雄等级",
        tooltip: "显示当前驻扎的英雄等级"
      }), _dec7 = property({
        type: HeroAvatarItem,
        displayName: "英雄组件",
        tooltip: "显示当前驻扎的英雄信息"
      }), _dec8 = property({
        type: Sprite,
        displayName: "加层道具图标",
        tooltip: "加层道具图标"
      }), _dec9 = property({
        type: Label,
        displayName: "加层文本",
        tooltip: "英雄加层文本"
      }), _dec10 = property({
        type: Label,
        displayName: "人口文本",
        tooltip: "人口"
      }), _dec11 = property({
        type: Label,
        displayName: "服役名字",
        tooltip: "服役名字"
      }), _dec12 = property({
        type: Label,
        displayName: "服役人数",
        tooltip: "人口"
      }), _dec13 = property({
        type: Label,
        displayName: "训练人数",
        tooltip: "显示当前训练人数"
      }), _dec14 = property({
        type: Label,
        displayName: "预备步兵名称",
        tooltip: "预备步兵"
      }), _dec15 = property({
        type: Label,
        displayName: "预备步兵",
        tooltip: "预备步兵"
      }), _dec16 = property({
        type: Slider,
        displayName: "滑动条",
        tooltip: "滑动条"
      }), _dec17 = property({
        type: Button,
        displayName: "减少数量按钮",
        tooltip: "点击减少训练数量"
      }), _dec18 = property({
        type: Button,
        displayName: "增加数量按钮",
        tooltip: "点击增加训练数量"
      }), _dec19 = property({
        type: Label,
        displayName: "训练数量标签",
        tooltip: "显示当前设置的训练数量"
      }), _dec20 = property({
        type: Button,
        displayName: "开始训练按钮",
        tooltip: "点击开始训练士兵"
      }), _dec21 = property({
        type: Toggle,
        displayName: "自动训练开关",
        tooltip: "自动训练开关"
      }), _dec22 = property({
        type: CostItem,
        displayName: "消耗组件",
        tooltip: "消耗组件"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_TrainingView, _EventAgent);
        function Layout_UI_TrainingView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          // 通用按钮
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          // 建筑信息
          _initializerDefineProperty(_this, "buildNameLab", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildLevelLab", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "zzyxName", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroLevelLab", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "zzyxHeroItem", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "itemIcon", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "zengyiLab", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "personNum", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "fuyuName", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "fyBubingNum", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "xlNum", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "yubeiName", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "ybBubingNum", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "slider", _descriptor15, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnSub", _descriptor16, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnAdd", _descriptor17, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "trainCount", _descriptor18, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "trainBtn", _descriptor19, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggle", _descriptor20, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "costItem", _descriptor21, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_TrainingView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "buildNameLab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildLevelLab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "zzyxName", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "heroLevelLab", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "zzyxHeroItem", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "itemIcon", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "zengyiLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "personNum", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "fuyuName", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "fyBubingNum", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "xlNum", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "yubeiName", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "ybBubingNum", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "slider", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "btnSub", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "btnAdd", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "trainCount", [_dec19], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "trainBtn", [_dec20], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "toggle", [_dec21], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "costItem", [_dec22], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_UnLockView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Label, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
      Label = module.Label;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "69306TgOu5Gr6ICBp4VJJLc", "Layout_UI_UnLockView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 建筑解锁界面布局类
       */
      var Layout_UI_UnLockView = exports('Layout_UI_UnLockView', (_dec = ccclass("Layout_UI_UnLockView"), _dec2 = property({
        type: Button,
        displayName: "返回按钮",
        tooltip: "返回按钮"
      }), _dec3 = property({
        type: Node,
        displayName: "显示页面",
        tooltip: "显示页面"
      }), _dec4 = property({
        type: Label,
        displayName: "建筑名称",
        tooltip: "建筑名称"
      }), _dec5 = property({
        type: Button,
        displayName: "建造按钮",
        tooltip: "建造按钮"
      }), _dec6 = property({
        type: Label,
        displayName: "建造时间标签",
        tooltip: "建造时间标签"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_UI_UnLockView, _Layout_uiListBase);
        function Layout_UI_UnLockView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          // 通用按钮
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "panel", _descriptor2, _assertThisInitialized(_this));
          // 建筑信息显示
          _initializerDefineProperty(_this, "txtBuildingName", _descriptor3, _assertThisInitialized(_this));
          // 建造按钮
          _initializerDefineProperty(_this, "btnBuild", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildTimeLab", _descriptor5, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_UnLockView;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "panel", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "txtBuildingName", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnBuild", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "buildTimeLab", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_ZhuangBanView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts', './RoleItem.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, EventAgent, ScrollList, RoleItem;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      RoleItem = module.RoleItem;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "5864eLIKwBHrLho2OwTr9we", "Layout_UI_ZhuangBanView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_ZhuangBanView = exports('Layout_UI_ZhuangBanView', (_dec = ccclass("Layout_UI_ZhuangBanView"), _dec2 = property({
        type: Button,
        tooltip: "蒙层关闭按钮"
      }), _dec3 = property({
        type: ScrollList,
        tooltip: "头像列表滚动视图"
      }), _dec4 = property({
        type: Button,
        tooltip: "确认按钮"
      }), _dec5 = property({
        type: RoleItem,
        tooltip: "当前使用中的头像"
      }), _dec6 = property({
        type: Node,
        tooltip: "不可用的节点"
      }), _dec7 = property({
        type: Node,
        tooltip: "在使用中节点"
      }), _dec8 = property({
        type: Node,
        tooltip: "未获得节点"
      }), _dec9 = property({
        type: Node,
        tooltip: "解锁条件"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_ZhuangBanView, _EventAgent);
        function Layout_UI_ZhuangBanView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollList", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnConfirm", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "curRoleItem", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "canotUseNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hadLabNode", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "noUseLab", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unlockLab", _descriptor8, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_ZhuangBanView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "scrollList", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnConfirm", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "curRoleItem", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "canotUseNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "hadLabNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "noUseLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "unlockLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_UI_ZiYuanGetView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts', './ScrollList.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent, ScrollList;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "5a370cz5WhBFp+maJdUaBwD", "Layout_UI_ZiYuanGetView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_UI_ZiYuanGetView = exports('Layout_UI_ZiYuanGetView', (_dec = ccclass("Layout_UI_ZiYuanGetView"), _dec2 = property({
        type: Button,
        tooltip: "蒙层点击按钮"
      }), _dec3 = property({
        type: Button,
        tooltip: "关闭按钮"
      }), _dec4 = property({
        type: ScrollList,
        tooltip: "资源列表"
      }), _dec5 = property({
        type: Button,
        tooltip: "一键领取按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_UI_ZiYuanGetView, _EventAgent);
        function Layout_UI_ZiYuanGetView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "ziYuanScrollList", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnOneKey", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_UI_ZiYuanGetView;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "ziYuanScrollList", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnOneKey", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiAge.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "e3a48HOMjlNYaMzKyo29q+t", "Layout_uiAge", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiAge = exports('Layout_uiAge', (_dec = ccclass("Layout_uiAge"), _dec2 = menu("Layout/Layout_uiAge"), _dec3 = property(Button), _dec4 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiAge, _EventAgent);
        function Layout_uiAge() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiAge;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiAgreement.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "dde39h62hJMDoRYpgcBUb3c", "Layout_uiAgreement", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiAgreement = exports('Layout_uiAgreement', (_dec = ccclass('Layout_uiAgreement'), _dec2 = menu("Layout/Layout_uiAgreement"), _dec3 = property(Button), _dec4 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiAgreement, _EventAgent);
        function Layout_uiAgreement() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiAgreement;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiDefeat.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "044a0lvkjRAeK+ChccowaRp", "Layout_uiDefeat", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiDefeat = exports('Layout_uiDefeat', (_dec = ccclass("Layout_uiDefeat"), _dec2 = menu("Layout/Layout_uiDefeat"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_uiDefeat, _Layout_uiListBase);
        function Layout_uiDefeat() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnRest", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnData", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiDefeat;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnRest", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnData", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiDingYue.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "0fe7fURcwBCm6d0G12QOVje", "Layout_uiDingYue", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      /**
       * 微信订阅
       */
      var Layout_uiDingYue = exports('Layout_uiDingYue', (_dec = ccclass('Layout_uiDingYue'), _dec2 = menu('Layout/Layout_uiDingYue'), _dec3 = property(Button), _dec4 = property(Node), _dec5 = property(Node), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_uiDingYue, _Layout_uiListBase);
        function Layout_uiDingYue() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnExpl", _descriptor3, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiDingYue;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnExpl", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiEmail.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "860741JX5tAgquYF/zR28u2", "Layout_uiEmail", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiEmail = exports('Layout_uiEmail', (_dec = ccclass("Layout_uiEmail"), _dec2 = menu("Layout/Layout_uiEmail"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_uiEmail, _Layout_uiListBase);
        function Layout_uiEmail() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnDelete", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnGet", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiEmail;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnDelete", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnGet", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiEmailInfo.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "21733/cGwJF2qNv6QQtBs7+", "Layout_uiEmailInfo", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiEmailInfo = exports('Layout_uiEmailInfo', (_dec = ccclass("Layout_uiEmailInfo"), _dec2 = menu("Layout/Layout_uiEmailInfo"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_uiEmailInfo, _Layout_uiListBase);
        function Layout_uiEmailInfo() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnClick", _descriptor3, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiEmailInfo;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnClick", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiListBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Prefab, ScrollView, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Prefab = module.Prefab;
      ScrollView = module.ScrollView;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "d019cdugx1BXYhiuy7Tmtn2", "Layout_uiListBase", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiListBase = exports('Layout_uiListBase', (_dec = ccclass('Layout_uiListBase'), _dec2 = menu('Z框架基类/Layout_uiListBase'), _dec3 = property(Prefab), _dec4 = property({
        type: ScrollView
      }), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiListBase, _EventAgent);
        function Layout_uiListBase() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "itemPrefab", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "scrollView", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiListBase;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "itemPrefab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "scrollView", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiLogin.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, sp, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      sp = module.sp;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "efbd0BcMMxJ9LMf/HbZUK/S", "Layout_uiLogin", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiLogin = exports('Layout_uiLogin', (_dec = ccclass("Layout_uiLogin"), _dec2 = menu("Layout/Layout_uiLogin"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Button), _dec7 = property(Button), _dec8 = property(sp.Skeleton), _dec9 = property(Button), _dec10 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiLogin, _EventAgent);
        function Layout_uiLogin() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnEnter", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnTest", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgQufu", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnAge", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnNotice", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bgSpine", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUser", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnPrivacy", _descriptor8, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiLogin;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnEnter", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnTest", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgQufu", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnAge", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnNotice", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "bgSpine", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "btnUser", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "btnPrivacy", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiNotice.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "9109d8K0dhIXKozVs6P5IOQ", "Layout_uiNotice", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiNotice = exports('Layout_uiNotice', (_dec = ccclass("Layout_uiNotice"), _dec2 = menu("Layout/Layout_uiNotice"), _dec3 = property(Button), _dec4 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiNotice, _EventAgent);
        function Layout_uiNotice() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiNotice;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiPromptAgreement.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "313a6PD7/VEbq3L0plyudE1", "Layout_uiPromptAgreement", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiPromptAgreement = exports('Layout_uiPromptAgreement', (_dec = ccclass('Layout_uiPromptAgreement'), _dec2 = menu("Layout/Layout_uiPromptAgreement"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Button), _dec7 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiPromptAgreement, _EventAgent);
        function Layout_uiPromptAgreement() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnCancel", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnOk", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnUser", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnPrivacy", _descriptor5, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiPromptAgreement;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnCancel", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnOk", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnUser", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnPrivacy", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiPromptWarn.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, RichText, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Label = module.Label;
      RichText = module.RichText;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
      cclegacy._RF.push({}, "2f49332CEBEOqcQfqPA0+zU", "Layout_uiPromptWarn", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiPromptWarn = exports('Layout_uiPromptWarn', (_dec = ccclass("Layout_uiPromptWarn"), _dec2 = menu("Layout/Layout_uiPromptWarn"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Label), _dec7 = property(RichText), _dec8 = property(Label), _dec9 = property(Label), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiPromptWarn, _EventAgent);
        function Layout_uiPromptWarn() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnOK", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "titleLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "descRichText", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "warnLab", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnLab", _descriptor7, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiPromptWarn;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnOK", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "titleLab", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "descRichText", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "warnLab", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "btnLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiPromptWindow.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "a8003Y1UhpJJLuitb+YOOk0", "Layout_uiPromptWindow", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Layout_uiPromptWindow = exports('Layout_uiPromptWindow', (_dec = ccclass("Layout_uiPromptWindow"), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiPromptWindow, _EventAgent);
        function Layout_uiPromptWindow() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnCancel", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnOk", _descriptor3, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiPromptWindow;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnCancel", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnOk", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiVictory.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "0f95fvIrZdPx6nXmixHjLnk", "Layout_uiVictory", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiVictory = exports('Layout_uiVictory', (_dec = ccclass("Layout_uiVictory"), _dec2 = menu("Layout/Layout_uiVictory"), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Button), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_uiVictory, _Layout_uiListBase);
        function Layout_uiVictory() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnNext", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnData", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiVictory;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnNext", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "btnData", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiWxInvite.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_uiListBase.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, Layout_uiListBase;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      Layout_uiListBase = module.Layout_uiListBase;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "63c04Tj7jBNpKbR5ClvFj37", "Layout_uiWxInvite", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiWxInvite = exports('Layout_uiWxInvite', (_dec = ccclass('Layout_uiWxInvite'), _dec2 = menu("Layout/Layout_uiWxInvite"), _dec3 = property(Button), _dec4 = property(Node), _dec5 = property({
        type: Node,
        tooltip: '标签父节点'
      }), _dec6 = property({
        type: Node,
        tooltip: '标签'
      }), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Layout_uiListBase) {
        _inheritsLoose(Layout_uiWxInvite, _Layout_uiListBase);
        function Layout_uiWxInvite() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Layout_uiListBase.call.apply(_Layout_uiListBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "togglesParent", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "pages", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiWxInvite;
      }(Layout_uiListBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "togglesParent", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "pages", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Layout_uiWxShareActivity.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './EventAgent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Node, EventAgent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Button = module.Button;
      Node = module.Node;
    }, function (module) {
      EventAgent = module.EventAgent;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "6d654MYUd9AELi7q+dA6tW2", "Layout_uiWxShareActivity", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var Layout_uiWxShareActivity = exports('Layout_uiWxShareActivity', (_dec = ccclass('Layout_uiWxShareActivity'), _dec2 = menu('Layout/Layout_uiWxShareActivity'), _dec3 = property({
        type: Button,
        tooltip: '返回按钮'
      }), _dec4 = property({
        type: Button,
        tooltip: '返回按钮'
      }), _dec5 = property({
        type: Node,
        tooltip: '标签父节点'
      }), _dec6 = property({
        type: Node,
        tooltip: '标签'
      }), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_EventAgent) {
        _inheritsLoose(Layout_uiWxShareActivity, _EventAgent);
        function Layout_uiWxShareActivity() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _EventAgent.call.apply(_EventAgent, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "btnBack", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgBack", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "togglesParent", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "pages", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        return Layout_uiWxShareActivity;
      }(EventAgent), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "btnBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgBack", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "togglesParent", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "pages", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LightningBullet.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletBase.ts', './BattleDefine.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, BulletBase, GameBattle;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      BulletBase = module.BulletBase;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "73975tp/qRLvKz4B0TjQ6Mf", "LightningBullet", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var LightningBullet = exports('LightningBullet', (_dec = ccclass("LightningBullet"), _dec(_class = /*#__PURE__*/function (_BulletBase) {
        _inheritsLoose(LightningBullet, _BulletBase);
        function LightningBullet() {
          return _BulletBase.apply(this, arguments) || this;
        }
        var _proto = LightningBullet.prototype;
        _proto.init = function init() {
          _BulletBase.prototype.init.call(this);
          this._type = GameBattle.BulletType.Remote;
        };
        _proto.reuse = function reuse() {
          _BulletBase.prototype.reuse.call(this);
        };
        _proto.recovery = function recovery() {
          _BulletBase.prototype.recovery.call(this);
        };
        _proto.onUpdate = function onUpdate(dt) {
          _BulletBase.prototype.onUpdate.call(this, dt);
        };
        _proto.launch = function launch() {
          _BulletBase.prototype.launch.call(this);
          this.view.playDefault(true);
        };
        _proto.load = /*#__PURE__*/function () {
          var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cfg) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _BulletBase.prototype.load.call(this, cfg);
                  this._type = cfg.type;
                case 2:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function load(_x) {
            return _load.apply(this, arguments);
          }
          return load;
        }()
        /**
         * 碰撞检测
         * @param target 目标对象
         * @returns
         */;

        _proto.checkHit = function checkHit(target) {
          var selfBox = this.getBoundingBoxToWorld();
          var targetBox = target.getBoundingBoxToWorld();
          return selfBox.intersects(targetBox);
        };
        return LightningBullet;
      }(BulletBase)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ListSelScript.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollList.ts', './VirtualList.ts', './TableView.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, CCInteger, Component, ScrollList, VirtualList, TableView;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCInteger = module.CCInteger;
      Component = module.Component;
    }, function (module) {
      ScrollList = module.ScrollList;
    }, function (module) {
      VirtualList = module.default;
    }, function (module) {
      TableView = module.TableView;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "92908sxoyVFOYb8VJvj0eFL", "ListSelScript", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      //选择list，用来绑定list, list里的item需使用ItemSelScript

      var ListSelScript = exports('ListSelScript', (_dec = ccclass('ListSelScript'), _dec2 = menu("性能优化/ListSelScript"), _dec3 = property(CCInteger), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ListSelScript, _Component);
        function ListSelScript() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /**选择类型，0单选，-1可取消选择，其他正数是多选数量 */
          _initializerDefineProperty(_this, "selType", _descriptor, _assertThisInitialized(_this));
          /**选择回调 */
          _this.selCb = void 0;
          /**选中idx */
          _this.m_selIdxArr = [];
          return _this;
        }
        var _proto = ListSelScript.prototype;
        _proto.onEnable = function onEnable() {}
        /**设置选中list中的第idx项item */;
        _proto.selItem = function selItem(idx) {
          var isSel = true;
          var old_idx = -1;
          var sroList = this.node.getComponent(ScrollList) || this.node.getComponent(TableView) || this.node.getComponent(VirtualList);
          if (!sroList) return;
          if (this.selType == -1 && this.m_selIdxArr.indexOf(idx) != -1) {
            //可取消选择，且已选中时，操作取消选中
            sroList.selItem(idx, false);
            this.m_selIdxArr = [];
            isSel = false;
            old_idx = idx;
          } else if (this.selType <= 0) {
            //单选
            var old = this.m_selIdxArr[0];
            if (old == idx) return; //重复选择
            old != undefined && sroList.selItem(old, false);
            sroList.selItem(idx, true);
            this.m_selIdxArr = [idx];
            old_idx = old;
          } else {
            //多选
            var _arrIdx = this.m_selIdxArr.indexOf(idx);
            if (_arrIdx != -1) {
              this.m_selIdxArr.splice(_arrIdx, 1);
              sroList.selItem(idx, false);
              isSel = false;
              old_idx = idx;
            } else {
              if (this.m_selIdxArr.length < this.selType) {
                this.m_selIdxArr.push(idx);
                sroList.selItem(idx, true);
              }
            }
          }
          if (this.selCb) {
            this.selCb(idx, isSel, old_idx);
          }
        }
        /**
         * 清理所有选中
         * tips:重置list数据前需调用清理
         */;
        _proto.clearSel = function clearSel() {
          var sroList = this.node.getComponent(ScrollList) || this.node.getComponent(TableView) || this.node.getComponent(VirtualList);
          if (!sroList) return;
          for (var _iterator = _createForOfIteratorHelperLoose(this.m_selIdxArr), _step; !(_step = _iterator()).done;) {
            var idx = _step.value;
            sroList.selItem(idx, false);
          }
          this.m_selIdxArr = [];
        };
        _createClass(ListSelScript, [{
          key: "selIdxArr",
          get: /**获得选中集合 */
          function get() {
            return this.m_selIdxArr;
          }
        }]);
        return ListSelScript;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "selType", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LockMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './uiFunctionUnlock.ts', './MonitorType.ts', './DBRecord.ts', './Utils.ts', './UIMgr.ts', './UtilityPlatform.ts', './UtilGame.ts', './SystemDef.ts', './App.ts', './GameDef.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, uiFunctionUnlock, MonitorType, DBRecord, Utils, UIMgr, LayerType, UtilityPlatform, UtilGame, SYS_ID, App, GameDef;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      uiFunctionUnlock = module.uiFunctionUnlock;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      SYS_ID = module.SYS_ID;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "dcebd+8s01CX7nf74goA86q", "LockMgr", undefined);
      /** 解锁条件类型 */
      var UnlockConditionType = exports('UnlockConditionType', /*#__PURE__*/function (UnlockConditionType) {
        UnlockConditionType[UnlockConditionType["PassGuanQia"] = 1] = "PassGuanQia";
        UnlockConditionType[UnlockConditionType["PlayerLevel"] = 2] = "PlayerLevel";
        UnlockConditionType[UnlockConditionType["PreFunc"] = 3] = "PreFunc";
        UnlockConditionType[UnlockConditionType["AccRecharge"] = 4] = "AccRecharge";
        UnlockConditionType[UnlockConditionType["EquipId"] = 5] = "EquipId";
        UnlockConditionType[UnlockConditionType["OpenServerDays"] = 6] = "OpenServerDays";
        UnlockConditionType[UnlockConditionType["RechargeId"] = 7] = "RechargeId";
        UnlockConditionType[UnlockConditionType["GetItemByType"] = 8] = "GetItemByType";
        return UnlockConditionType;
      }({}));

      // ghjgjuy:
      // [1，关卡id]
      // [2，玩家等级]
      // [3，前置功能id]

      var LockMgr = exports('LockMgr', /*#__PURE__*/function () {
        function LockMgr() {
          /** 状态检查函数 */
          this._checkFunc = [];
          this._flags = {};
          this._funcList = [];
          this._showing = false;
          // private _bReady: boolean = false
          this._isInt_reCheck = false;
          /**特权卡红点状态 key: 系统ID value: 是否显示红点 */
          this._privilegeCardRed = {};
          // 当前注册进来的一次性特权卡解锁系统ID
          this._privilegeCardSysIds = [SYS_ID.PetCard, SYS_ID.TeQuanKa, SYS_ID.Fashion, SYS_ID.XiLian, SYS_ID.FuShi];
          this._checkFunc[UnlockConditionType.PassGuanQia] = this.checkGuanQia.bind(this);
          this._checkFunc[UnlockConditionType.PlayerLevel] = this.checkLv.bind(this);
          this._checkFunc[UnlockConditionType.PreFunc] = this.checkQianZhi.bind(this);
          this._checkFunc[UnlockConditionType.EquipId] = this.checkXinShou.bind(this);
        }
        var _proto = LockMgr.prototype;
        _proto._resetData = function _resetData() {
          this._flags = {};
          this._funcList = [];
          this._showing = false;
          // this._bReady = false
          this._privilegeCardRed = {};
        };
        _proto.init = function init() {
          this._resetData();
          // App.monitorMgr.addEventListener(MonitorType.web_function_unlock_90022, this.web_function_unlock_90022, this);
          App.monitorMgr.addEventListener(MonitorType.web_function_unlock_96002, this.web_function_unlock_96002, this);
          App.monitorMgr.addEventListener(MonitorType.web_function_unlock_96001, this.web_function_unlock_96001, this);
          // App.monitorMgr.addEventListener(MonitorType.activity_update, this.checkFuncUnlock, this);
          // App.monitorMgr.addEventListener(MonitorType.web_battle_pass_List, this.checkFuncUnlock, this);
        };

        _proto.dispose = function dispose() {
          this._resetData();
          App.monitorMgr.offTarget(this);
        };
        _proto.checkCondition = function checkCondition(condition) {
          for (var i = 0; i < condition.length; i++) {
            var type = condition[i][0];
            var param = condition[i][1];
            var func = this._checkFunc[type];
            if (!func) return false;
            if (!func(param)) {
              return false;
            }
          }
          return true;
        };
        _proto.getSysIdByUi = function getSysIdByUi(uiName) {
          var sysId = 0;
          var GongNengJieSuo_ = DBRecord.fetchAll("GongNengJieSuo");
          for (var _key in GongNengJieSuo_) {
            var _GongNengJieSuo = GongNengJieSuo_[_key];
            if (_GongNengJieSuo.getAccessUI === uiName) return _GongNengJieSuo.id;
          }
          return sysId;
        }

        //一些需要额外条件才能开放的功能
        ;

        _proto.checkFuncUnlock = function checkFuncUnlock() {
          //增加首充特殊情况。全部档位充值领取完 入口消失
          if (this._flags[1000]) ;
          // //签到领完后关闭
          // if (this._flags[1600]) {
          //     this._flags[1600] = !App.activityManager.is_finish_sign_7_allGgot();
          // }
          // //问卷调查
          // if (this._flags[4000]) {
          //     if (App.mixMgr._questionnaireData) {
          //         this._flags[4000] = !App.mixMgr.hasSubmitQuestionaire();
          //     }
          // }

          // RPK社区
          if (this._flags[4601]) ;

          // 微信分享
          if (this._flags[4602]) ;
        };
        _proto.getGuanQiaFunction = function getGuanQiaFunction(id0, id1) {
          var vGongNengJieSuo = DBRecord.fetchAll("GongNengJieSuo");
          var mFuncId = {};
          for (var dx0 = 0; dx0 < vGongNengJieSuo.length; dx0++) {
            var oGongNengJieSuo = vGongNengJieSuo[dx0];
            if (!oGongNengJieSuo.show) {
              continue;
            }
            var v_need = oGongNengJieSuo.need;
            for (var dx1 = 0; dx1 < v_need.length; dx1++) {
              var c_need = v_need[dx1];
              if (c_need[0] !== 1) {
                continue;
              }
              if (c_need[1] < id0 || c_need[1] > id1) {
                continue;
              }
              mFuncId[c_need[1]] = oGongNengJieSuo.id;
              // vFuncId.push({ id: oGongNengJieSuo.id, pass: c_need[1] })
            }
          }

          var vFuncId = [];
          for (var _key2 in mFuncId) {
            vFuncId.push(mFuncId[_key2]);
          }
          return vFuncId;
        };
        _proto.checkGuanQia = function checkGuanQia(guanka_id) {
          var cur_guanka_id = App.battleMgr.tongguanGuanQiaId;
          return cur_guanka_id >= guanka_id;
        };
        _proto.checkLv = function checkLv(lv) {
          var roleInfo = App.roleMgr.roleInfo;
          var cur_lv = roleInfo.role_level;
          return cur_lv >= lv;
        };
        _proto.checkQianZhi = function checkQianZhi(function_id) {
          return Boolean(this._flags[function_id]);
        };
        _proto.checkXinShou = function checkXinShou(step_id) {
          // return Utils.findManager('_xinShouManager').getStep() >= step_id;
        };
        _proto.web_function_unlock_96002 = function web_function_unlock_96002(obj) {
          console.log("功能解锁 web_function_unlock_96002", obj);
          var str = App.saveDataMgr.get("lockManager_waitting_show_id_arr" + ("" + UtilityPlatform.getInstance().uid), "");
          var arr = str.split("_");
          var list = obj.id_list;
          for (var _iterator = _createForOfIteratorHelperLoose(list), _step; !(_step = _iterator()).done;) {
            var data = _step.value;
            var cfg = DBRecord.fetchId("GongNengJieSuo", data);
            this._flags[data] = true;

            // 功能解锁时触发特权卡红点
            this.onFunctionUnlock(data);
            if (cfg.pop === 1 && arr.indexOf(data + "") === -1) {
              this._funcList.push(data);
              arr.push(data + "");
            }
          }
          this.checkFuncUnlock();
          var nstr = "";
          for (var _iterator2 = _createForOfIteratorHelperLoose(arr), _step2; !(_step2 = _iterator2()).done;) {
            var _data = _step2.value;
            nstr += "_" + _data;
          }
          console.log("写入本地缓存当前等待开启展示的功能ID", arr);
          App.saveDataMgr.set("lockManager_waitting_show_id_arr" + ("" + UtilityPlatform.getInstance().uid), nstr);
        };
        _proto.web_function_unlock_96001 = function web_function_unlock_96001(obj) {
          console.log("功能解锁 web_function_unlock_96001", obj);
          this._flags = {};
          var list = obj.id_list;
          var cfg = DBRecord.fetchAll("GongNengJieSuo");
          for (var _iterator3 = _createForOfIteratorHelperLoose(cfg), _step3; !(_step3 = _iterator3()).done;) {
            var data = _step3.value;
            this._flags[data.id] = list.indexOf(data.id) !== -1;
          }
          this.checkFuncUnlock();
          var str = App.saveDataMgr.get("lockManager_waitting_show_id_arr" + ("" + UtilityPlatform.getInstance().uid), "");
          var arr = str.split("_");
          for (var _iterator4 = _createForOfIteratorHelperLoose(arr), _step4; !(_step4 = _iterator4()).done;) {
            var _data2 = _step4.value;
            if (Number(_data2)) this._funcList.push(Number(_data2));
          }
          // for (let data of list) {
          //     this._flags[data.id] = data.unlock
          // }

          // this._bReady = true
        };

        _proto.initItemFuncUnlock = function initItemFuncUnlock() {
          for (var id in this._flags) {
            if (!this._flags[id]) {
              var cfg = DBRecord.fetchId("GongNengJieSuo", id);
              if (cfg.entranceNode) {
                var ui = UIMgr.inst.getUiNode(cfg.entranceNode[0]);
              }
            }
          }
        };
        _proto.cs_setFuncUnlock = function cs_setFuncUnlock(function_id) {
          // let obj: m_proto.ICS_90021 = {
          //     func: {
          //         id: function_id,
          //         unlock: true
          //     }
          // }
          // netChannel.game.send(MonitorType.web_function_unlock_90021, obj)
          var str = App.saveDataMgr.get("lockManager_waitting_show_id_arr" + ("" + UtilityPlatform.getInstance().uid), "");
          var arr = str.split("_");
          var nstr = "";
          for (var _iterator5 = _createForOfIteratorHelperLoose(arr), _step5; !(_step5 = _iterator5()).done;) {
            var data = _step5.value;
            if (data !== function_id + "") nstr += "_" + data;
          }
          console.log("写入本地缓存当前等待开启展示的功能ID", arr);
          App.saveDataMgr.set("lockManager_waitting_show_id_arr" + ("" + UtilityPlatform.getInstance().uid), nstr);
          this._flags[function_id] = true;
          var cfg = DBRecord.fetchId("GongNengJieSuo", function_id);
          if (cfg.entranceNode) {
            var ui = UIMgr.inst.getUiNode(cfg.entranceNode[0]);
            if (ui) {
              var entranceNode = Utils.findNodeList(cfg.entranceNode, ui);
              entranceNode && (entranceNode.active = true);
            }
          }
        }

        // public cs_getFuncUnlock() {
        //     netChannel.game.send(MonitorType.web_function_unlock_90022)
        // }
        ;

        _proto.cs_getFuncUnlock = function cs_getFuncUnlock() {
          // netChannel.game.send(MonitorType.web_function_unlock_90022)
        };
        _proto.needShow = function needShow() {
          return this._funcList.length > 0 && !this._showing;
        };
        _proto.showFuncUnlock = function showFuncUnlock() {
          var _this = this;
          if (this._funcList.length === 0) return;
          this._showing = true;
          var id = this._funcList.shift();
          UIMgr.inst.open(uiFunctionUnlock, LayerType.panel, null, [id, function () {
            if (_this._funcList.length > 0) {
              _this.showFuncUnlock();
            } else {
              _this._showing = false;
            }
          }]);
          var uiMain = UIMgr.inst.getOnceUi("uiMain");
        };
        _proto.checkFuncLock = function checkFuncLock(function_id) {
          if (function_id === SYS_ID.Questionnaire) {
            //问卷调查
            if (!this._flags[function_id]) {
              return false;
            }
            return true;
          } else if (function_id === SYS_ID.LingLu) ;
          return Boolean(this._flags[function_id]);
        }

        /**
         * 获取功能解锁提示
         * @param function_id 功能ID
         * @returns 提示字符串
         */;
        _proto.getUnLockTips = function getUnLockTips(function_id) {
          var cfg = DBRecord.fetchId("GongNengJieSuo", function_id);
          //审核中，需要充值的解锁提示使用通用提示
          if (cfg.charge) {
            if (GameDef.shenHeZhong) {
              return Utils.getGlobalTxt(15);
            }
          }

          //活动开启检测
          // let activityId = Utils.JUMP_CHECK_ACTIVITY_ID[function_id];
          // if (activityId) {
          //     let isActivityOpen = App.activityManager.getActivityDataType(activityId);
          //     if (!isActivityOpen) {
          //         return Utils.getGlobalTxt(70006);
          //     }
          // }

          var str = "";
          var condition = cfg.need;
          if (condition.length === 1) {
            var type = condition[0][0];
            var param = condition[0][1];
            switch (type) {
              case UnlockConditionType.PassGuanQia:
                str = Utils.getGlobalTxt(70001, Utils.getGuanQiaName(param));
                break;
              case UnlockConditionType.PlayerLevel:
                //9999级解锁特殊处理
                if (param < 9999) {
                  if (param === 0) {
                    param = 1;
                  }
                  str = Utils.getGlobalTxt(70002, param);
                }
                break;
              case UnlockConditionType.PreFunc:
                if (function_id !== param) {
                  str = this.getUnLockTips(param);
                }
                break;
              case UnlockConditionType.OpenServerDays:
                str = Utils.getGlobalTxt(70003, param);
                break;
              case UnlockConditionType.GetItemByType:
                str = Utils.getGlobalTxt(131, UtilGame.getGlobalTxt(5500 + param));
                break;
            }
          } else if (condition.length === 2) {
            var type1 = condition[0][0];
            var param1 = condition[0][1];
            var type2 = condition[1][0];
            var param2 = condition[1][1];
            if (type1 === UnlockConditionType.PassGuanQia && type2 === UnlockConditionType.OpenServerDays) {
              str = UtilGame.formateStr(App.languageMgr.getTextById(70004), param2, Utils.getGuanQiaName(param1));
            } else if (type1 === UnlockConditionType.OpenServerDays && type2 === UnlockConditionType.PassGuanQia) {
              str = UtilGame.formateStr(App.languageMgr.getTextById(70004), param1, Utils.getGuanQiaName(param2));
            } else if (type1 === UnlockConditionType.PlayerLevel && type2 === UnlockConditionType.OpenServerDays) {
              str = UtilGame.formateStr(App.languageMgr.getTextById(70005), param2, param1);
            } else if (type1 === UnlockConditionType.OpenServerDays && type2 === UnlockConditionType.PlayerLevel) {
              str = UtilGame.formateStr(App.languageMgr.getTextById(70005), param1, param2);
            } else if (type1 === UnlockConditionType.OpenServerDays && type2 === UnlockConditionType.GetItemByType) {
              str = UtilGame.formateStr(App.languageMgr.getTextById(7518), param1, param2);
            }
          }
          if (str.length === 0) {
            str = Utils.getGlobalTxt(15);
          }
          return str;
        }

        /**
         * 设置特权卡红点状态
         * @param sysId 系统ID
         * @param show 是否显示红点
         */;
        _proto.setPrivilegeCardRed = function setPrivilegeCardRed(sysId, show) {
          this._privilegeCardRed[sysId] = show;
          if (show) {
            App.monitorMgr.dispatchEvent(MonitorType.RedPointUpdate_PrivilegeCard, sysId);
          }
        }

        /**
         * 检查特权卡红点状态
         * @param sysId 系统ID
         * @returns 是否显示红点
         */;
        _proto.checkPrivilegeCardRed = function checkPrivilegeCardRed(sysId) {
          return this._privilegeCardRed[sysId] || false;
        }

        /**
         * 清除特权卡红点状态
         * @param sysId 系统ID
         */;
        _proto.clearPrivilegeCardRed = function clearPrivilegeCardRed(sysId) {
          if (this._privilegeCardRed[sysId]) {
            this._privilegeCardRed[sysId] = false;
            App.monitorMgr.dispatchEvent(MonitorType.RedPointUpdate_PrivilegeCard, sysId);
          }
        }

        /**
         * 功能解锁时触发特权卡红点显示
         * @param sysId 系统ID
         */;
        _proto.onFunctionUnlock = function onFunctionUnlock(sysId) {
          if (this._privilegeCardSysIds.includes(sysId)) {
            this.setPrivilegeCardRed(sysId, true);
          }
        }

        /**
         * 检查是否有任何特权卡红点
         * @returns 是否有红点
         */;
        _proto.checkAllPrivilegeCardRed = function checkAllPrivilegeCardRed() {
          var _this2 = this;
          return this._privilegeCardSysIds.some(function (sysId) {
            return _this2.checkPrivilegeCardRed(sysId);
          });
        };
        return LockMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LockTargetCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './App.ts'], function (exports) {
  var _createClass, cclegacy, Vec3, GameBattle, App;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a47af9afSBLMI20tKK49zs4", "LockTargetCtrl", undefined);

      /**
       * 锁定目标控制器
       */
      var LockTargetCtrl = exports('LockTargetCtrl', /*#__PURE__*/function () {
        function LockTargetCtrl() {
          /** 可供锁定目标类型列表 */
          this._targetTypes = [];
          this._changeHandler = void 0;
          /** 范围 */
          this._range = [];
          /** 持有者 */
          this._owner = void 0;
          /** 已锁定的目标 */
          this._target = void 0;
          this._isSummon = false;
          /** 目标列表缓存,避免每次创建新数组 */
          this._targetListCache = [];
        }
        var _proto = LockTargetCtrl.prototype;
        _proto.reset = function reset() {
          this._targetTypes.length = 0;
          this._range.length = 0;
          this._target = null;
          this._targetListCache.length = 0;
        };
        _proto._monsterUpdate = function _monsterUpdate(dt) {
          var _this = this;
          if (!App.battleMgr.isInBattle()) {
            return;
          }
          if (App.battleMgr.getCurrentFrame() === 0) {
            return;
          }
          // 查找最近的hero或soldier作为目标
          var closestTarget = null;
          var minDistance = Number.MAX_VALUE;
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 使用try-catch避免类型比较错误
            var isHeroOrSoldierEntity = false;
            try {
              isHeroOrSoldierEntity = entity.type === GameBattle.RoleType.Hero || entity.type === GameBattle.RoleType.Soldier;
            } catch (e) {
              // 忽略类型错误
            }
            if (isHeroOrSoldierEntity) {
              if (entity.checkValid()) {
                var distance = Vec3.distance(entity.node.worldPosition, _this._owner.node.worldPosition);
                if (distance < minDistance) {
                  minDistance = distance;
                  closestTarget = entity;
                }
              }
            }
            return false;
          });
          if (!closestTarget) return;
          if (this._owner.state.isAttacking()) return; //攻击中不切换锁定目标
          if (this._owner.state.isSkilling()) return; //释放技能中不切换锁定目标

          if (minDistance >= this._range[0] && minDistance < this._range[1]) {
            this._target = closestTarget;
          } else {
            this._target = null;
          }
        };
        _proto._playerUpdate = function _playerUpdate(dt) {
          var _this2 = this;
          if (!App.battleMgr.isInBattle()) {
            return;
          }
          if (App.battleMgr.getCurrentFrame() === 0) {
            return;
          }
          if (!this._owner) return;
          if (this._targetTypes.length === 0) return;
          if (this._owner.state.isAttacking()) return; //攻击中不切换锁定目标
          if (this._owner.state.isSkilling()) return; //释放技能中不切换锁定目标

          this._targetListCache.length = 0;
          var targetList = this._targetListCache;
          // 避免类型比较警告，我们只需要一个标志位而不需要直接类型比较
          var isHeroOrSoldier = false;
          try {
            isHeroOrSoldier = this.owner.type === GameBattle.RoleType.Hero || this.owner.type === GameBattle.RoleType.Soldier;
          } catch (e) {
            // 忽略类型不兼容的错误
          }
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            if (!entity.checkValid()) return false;
            if (entity.invulnerable) return false;
            if (_this2._targetTypes.findIndex(function (value) {
              return value === entity.type;
            }) === -1) return false;
            if (_this2._isSummon && entity.masterId === _this2._owner.masterId) return false;
            if (entity.masterId === _this2._owner.uid) return false;
            if (!entity.node.active) {
              //保留原有逻辑，但移除player自动战斗相关的引用
              return false;
            }
            // 保留原有的目标过滤逻辑，但移除player相关的引用

            var distance = Vec3.distance(entity.node.worldPosition, _this2._owner.node.worldPosition);
            var vector = entity.node.worldPosition.clone().subtract(_this2._owner.node.worldPosition);
            var isFacing = vector.x > 0 && _this2._owner.isFaceRight(); //是否为角色当前的朝向

            for (var i = 0; i < _this2._range.length; i++) {
              var range = _this2._range[i];
              if (distance > range) continue;
              targetList.push({
                target: entity,
                rangeType: i,
                isFacing: isFacing,
                distance: distance,
                hp: entity.roleVO.curHP
              });
              break;
            }
            return false;
          });
          var isChange = false;
          if (targetList.length === 0) {
            if (this._target) {
              var zhuiji = false;
              if (this.owner.needZhuiJi()) {
                var monster = this.owner;
                if (monster && this._target.checkValid()) {
                  var distance = Vec3.distance(this._target.node.worldPosition, this._owner.node.worldPosition);
                  var tuozhanDis = monster._monsterAI._targetDistance;
                  var isValidTarget = true;
                  //木桩模式暂停战斗时木桩无敌，不攻击。
                  if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.MuZhuang) {
                    if (this._target.invulnerable) {
                      isValidTarget = false;
                    }
                  }
                  if (isValidTarget && distance < tuozhanDis) {
                    zhuiji = true;
                  }
                }
              }
              if (!zhuiji) {
                this._target = null;
                isChange = true;
              }
            }
          } else {
            targetList.sort(function (a, b) {
              //高优先范围内目标>角色当前朝向>距离最近>绝对值血量最少>随机
              if (a.rangeType !== b.rangeType) return a.rangeType - b.rangeType;
              if (a.isFacing !== b.isFacing) return a.isFacing ? -1 : 1;
              if (a.distance !== b.distance) return a.distance - b.distance;
              if (a.hp !== b.hp) return a.hp - b.hp;
              return 0;
            });
            if (this._target) {
              // 已有目标逻辑处理
              var data = targetList.find(function (v) {
                return v.target.uid === _this2._target.uid;
              });
              if ((data == null ? void 0 : data.rangeType) !== 0) {
                // 不在高优先级范围了，更改目标
                this._target = targetList[0].target;
                isChange = true;
              }
            } else {
              this._target = targetList[0].target;
              isChange = true;
            }
          }
          if (isChange) {
            var _this$_changeHandler;
            (_this$_changeHandler = this._changeHandler) == null || _this$_changeHandler.call(this);
          }
          this._owner.setTargetInfo(this._target);
        };
        _proto.update = function update(dt) {}

        /**
         * 获取指定类型rolebase
         * @param type 指定类型
         * @param rangeRadius 范围半径
         * @param id 指定id
         * @param num 指定数量
         */;
        _proto.getTargetByType = function getTargetByType(type, rangeRadius, id, num) {
          var _this3 = this;
          var targetList = [];
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            if (entity.type !== type) return false;
            if (id && type === GameBattle.RoleType.Monster) {
              var monsterVO = entity.roleVO;
              if (monsterVO.id !== id) return false;
            }
            if (num) {
              if (targetList.length >= num) {
                return true;
              }
            }
            if (!entity.checkValid()) return false;
            var distance = Vec3.distance(entity.node.worldPosition, _this3._owner.node.worldPosition);
            var vector = entity.node.worldPosition.clone().subtract(_this3._owner.node.worldPosition);
            var isFacing = vector.x > 0 && _this3._owner.isFaceRight(); //是否为角色当前的朝向

            for (var i = 0; i < rangeRadius.length; i++) {
              var range = rangeRadius[i];
              if (distance > range) continue;
              targetList.push(entity);
              break;
            }
            return false;
          });
          return targetList;
        };
        _proto.getNewTarget = function getNewTarget(target) {}

        /**
         * 添加目标类型
         * @param types
         */;
        _proto.addTargetTypes = function addTargetTypes(types) {
          if (Array.isArray(types)) {
            this._targetTypes = this._targetTypes.concat(types);
          } else if (typeof types === "number") {
            this._targetTypes.push(types);
          }
        }

        /**
         * 设置目标变化回调函数
         * @param handler
         */;
        _proto.setChangeHandler = function setChangeHandler(handler) {
          if (typeof handler === "function") {
            this._changeHandler = handler;
          }
          if (!App.battleMgr.isInBattle()) {
            this.update = function () {};
            return;
          }
          // 避免类型比较警告，使用安全的方式判断角色类型
          var isHeroOrSoldier = false;
          try {
            isHeroOrSoldier = this._owner.type === GameBattle.RoleType.Hero || this._owner.type === GameBattle.RoleType.Soldier;
          } catch (e) {
            // 忽略类型不兼容的错误
          }

          // Hero和Soldier使用_playerUpdate索敌逻辑
          if (isHeroOrSoldier) {
            if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
              this.update = this._jingJiChangUpdate;
              this.addTargetTypes(GameBattle.RoleType.Enemy);
            } else {
              this.update = this._playerUpdate;
            }
          } else {
            if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.XinShou) {
              //新手副本怪物需要攻击玩家的友军
              this.addTargetTypes(GameBattle.RoleType.Monster);
              this.update = this._playerUpdate;
            } else if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.JingJiChang) {
              this.addTargetTypes(GameBattle.RoleType.Hero);
              this.update = this._jingJiChangEnemyUpdate;
            } else {
              // 直接使用_monsterUpdate方法，因为此处的_owner类型不可能是Soldier
              this.update = this._monsterUpdate;
            }
          }
        };
        _proto._jingJiChangUpdate = function _jingJiChangUpdate(dt) {
          var _this4 = this;
          if (!App.battleMgr.isInBattle()) {
            return;
          }
          if (App.battleMgr.getCurrentFrame() === 0) {
            return;
          }

          // 竞技场模式下，查找最近的敌人作为目标
          var closestEnemy = null;
          var minDistance = Number.MAX_VALUE;
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 使用安全方式检查实体类型
            var isEnemy = false;
            try {
              isEnemy = entity.type === GameBattle.RoleType.Enemy;
            } catch (e) {
              // 忽略类型错误
            }
            if (isEnemy) {
              if (entity.checkValid()) {
                var distance = Vec3.distance(entity.node.worldPosition, _this4._owner.node.worldPosition);
                if (distance < minDistance) {
                  minDistance = distance;
                  closestEnemy = entity;
                }
              }
            }
            return false;
          });
          if (!closestEnemy) return;
          if (minDistance < this._range[1]) {
            this._target = closestEnemy;
          } else {
            this._target = null;
          }
        };
        _proto._jingJiChangEnemyUpdate = function _jingJiChangEnemyUpdate(dt) {
          var _this5 = this;
          if (!App.battleMgr.isInBattle()) {
            return;
          }
          if (App.battleMgr.getCurrentFrame() === 0) {
            return;
          }

          // 查找最近的hero作为目标
          var closestHero = null;
          var minDistance = Number.MAX_VALUE;
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 使用安全方式检查实体类型
            var isHero = false;
            try {
              isHero = entity.type === GameBattle.RoleType.Hero;
            } catch (e) {
              // 忽略类型错误
            }
            if (isHero) {
              if (entity.checkValid()) {
                var distance = Vec3.distance(entity.node.worldPosition, _this5._owner.node.worldPosition);
                if (distance < minDistance) {
                  minDistance = distance;
                  closestHero = entity;
                }
              }
            }
            return false;
          });
          if (!closestHero) return;
          if (minDistance < this._range[1]) {
            this._target = closestHero;
          } else {
            this._target = null;
          }
        };
        _createClass(LockTargetCtrl, [{
          key: "range",
          get: function get() {
            return this._range;
          },
          set: function set(v) {
            this._range = v;
          }
        }, {
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
            // this._isSummon = v.isSummon();
          }
        }, {
          key: "target",
          get: function get() {
            return this._target;
          },
          set: function set(v) {
            this._target = v;
          }
        }]);
        return LockTargetCtrl;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Logger.ts", ['cc', './GameDef.ts'], function (exports) {
  var cclegacy, sys, log, GameDef;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      sys = module.sys;
      log = module.log;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      var _LOG_COLOR_MAP;
      cclegacy._RF.push({}, "8d20diMPCFONZQLKkfMAwG+", "Logger", undefined);
      var LogType = /*#__PURE__*/function (LogType) {
        LogType[LogType["Null"] = 0] = "Null";
        LogType[LogType["Net"] = 1] = "Net";
        LogType[LogType["Model"] = 2] = "Model";
        LogType[LogType["Business"] = 4] = "Business";
        LogType[LogType["View"] = 8] = "View";
        LogType[LogType["Config"] = 16] = "Config";
        LogType[LogType["Trace"] = 32] = "Trace";
        LogType[LogType["ERROR"] = 64] = "ERROR";
        return LogType;
      }(LogType || {});
      var names = {
        "1": "网络日志",
        "2": "数据日志",
        "4": "业务日志",
        "8": "视图日志",
        "16": "配置日志",
        "32": "标准日志",
        "64": "错误日志"
      };

      /** 日志颜色配置 */
      var LOG_COLOR_MAP = (_LOG_COLOR_MAP = {}, _LOG_COLOR_MAP[LogType.Null] = "#ffffff", _LOG_COLOR_MAP[LogType.Net] = "#ee7700", _LOG_COLOR_MAP[LogType.Model] = "Violet", _LOG_COLOR_MAP[LogType.Business] = "#3a5fcd", _LOG_COLOR_MAP[LogType.View] = "green", _LOG_COLOR_MAP[LogType.Config] = "gray", _LOG_COLOR_MAP[LogType.Trace] = "white", _LOG_COLOR_MAP[LogType.ERROR] = "red", _LOG_COLOR_MAP);

      /** 
       * 日志管理 
       * @example
      log.trace("默认标准日志");
      log.logConfig("灰色配置日志");
      log.logNet("橙色网络日志");
      log.logModel("紫色数据日志");
      log.logBusiness("蓝色业务日志");
      log.logView("绿色视图日志");
       */
      var Logger = exports('Logger', /*#__PURE__*/function () {
        function Logger() {
          this._tags = 0;
          this._init();
        }
        var _proto = Logger.prototype;
        _proto._init = function _init() {
          this._tags = !GameDef.LOG ? LogType.Null : LogType.Net | LogType.Model | LogType.Business | LogType.View | LogType.Config | LogType.Trace | LogType.ERROR;
        };
        _proto.resetTags = function resetTags() {
          this._init();
        }

        /**
         * 设置显示的日志类型，默认值为不显示任何类型日志
         * @example
         */;
        _proto.setTags = function setTags(tag) {
          if (tag === void 0) {
            tag = LogType.Null;
          }
          this._tags = tag;
        }

        /**
         * 记录开始计时
         * @param describe  标题描述
         * @example
         */;
        _proto.start = function start(describe) {
          if (describe === void 0) {
            describe = "Time";
          }
          console.time(describe);
        }

        /**
         * 打印范围内时间消耗
         * @param describe  标题描述
         * @example
         */;
        _proto.end = function end(describe) {
          if (describe === void 0) {
            describe = "Time";
          }
          console.timeEnd(describe);
        }

        /**
         * 打印表格
         * @param msg       日志消息
         * @param describe  标题描述
         * @example
            const object: any = {uid:1000, name:"oops"};
            log.table(object);
         */;
        _proto.table = function table(msg) {
          if (!this._isOpen(LogType.Trace)) {
            return;
          }
          console.table(msg);
        }

        /**
         * 打印标准日志
         * @param msg       日志消息
         * @param describe  标题描述
         * @param args      任意参数
         */;
        _proto.trace = function trace(msg, describe) {
          for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
            args[_key - 2] = arguments[_key];
          }
          this._print.apply(this, [LogType.Trace, msg, describe].concat(args));
        }

        /**
         * 打印错误日志
         * @param msg       日志消息
         * @param describe  标题描述
         * @param args      任意参数
         */;
        _proto.logError = function logError(msg, describe) {
          for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
            args[_key2 - 2] = arguments[_key2];
          }
          this._print.apply(this, [LogType.ERROR, msg, describe].concat(args));
        }

        /**
         * 打印网络层日志
         * @param msg       日志消息
         * @param args      标题描述
         * @param args      任意参数
         */;
        _proto.logNet = function logNet(msg, describe) {
          for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
            args[_key3 - 2] = arguments[_key3];
          }
          this._print.apply(this, [LogType.Net, msg, describe].concat(args));
        }

        /**
         * 打印数据层日志
         * @param msg       日志消息
         * @param describe  标题描述
         * @param args      任意参数
         */;
        _proto.logModel = function logModel(msg, describe) {
          for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
            args[_key4 - 2] = arguments[_key4];
          }
          this._print.apply(this, [LogType.Model, msg, describe].concat(args));
        }

        /**
         * 打印业务层日志
         * @param msg       日志消息
         * @param describe  标题描述
         * @param args      任意参数
         */;
        _proto.logBusiness = function logBusiness(msg, describe) {
          for (var _len5 = arguments.length, args = new Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) {
            args[_key5 - 2] = arguments[_key5];
          }
          this._print.apply(this, [LogType.Business, msg, describe].concat(args));
        }

        /**
         * 打印视图日志
         * @param msg       日志消息
         * @param describe  标题描述
         * @param args      任意参数
         */;
        _proto.logView = function logView(msg, describe) {
          for (var _len6 = arguments.length, args = new Array(_len6 > 2 ? _len6 - 2 : 0), _key6 = 2; _key6 < _len6; _key6++) {
            args[_key6 - 2] = arguments[_key6];
          }
          this._print.apply(this, [LogType.View, msg, describe].concat(args));
        }

        /** 打印配置日志 */;
        _proto.logConfig = function logConfig(msg, describe) {
          for (var _len7 = arguments.length, args = new Array(_len7 > 2 ? _len7 - 2 : 0), _key7 = 2; _key7 < _len7; _key7++) {
            args[_key7 - 2] = arguments[_key7];
          }
          this._print.apply(this, [LogType.Config, msg, describe].concat(args));
        };
        _proto._isOpen = function _isOpen(tag) {
          return (this._tags & tag) !== 0;
        }

        /**
         * 输出日志
         * @param tag       日志类型
         * @param msg       日志内容
         * @param color     日志文本颜色
         * @param describe  日志标题描述
         */;
        _proto._print = function _print(tag, _msg, describe) {
          // 标记没有打开，不打印该日志
          if (!this._isOpen(tag)) {
            return;
          }
          var backLog = console.log || log;
          var type = names[tag];
          var color = LOG_COLOR_MAP[tag];
          var msg = _msg;
          // 移动端 输出字符串
          if (sys.isNative) {
            if (Object.prototype.toString.call(msg) === "[object Object]") {
              msg = JSON.stringify(msg);
            }
          }
          var caller = this.getFuncCaller() || "未知"; // this._stack(5);
          for (var _len8 = arguments.length, args = new Array(_len8 > 3 ? _len8 - 3 : 0), _key8 = 3; _key8 < _len8; _key8++) {
            args[_key8 - 3] = arguments[_key8];
          }
          if (sys.isNative) {
            if (describe) {
              if (args.length > 0) {
                backLog(type + " " + this._getDateString() + " " + caller + " " + describe + " " + msg + " " + this._formatArgs.apply(this, args));
              } else {
                backLog(type + " " + this._getDateString() + " " + caller + " " + describe + " " + msg + " ");
              }
            } else {
              if (args.length > 0) {
                backLog(type + " " + this._getDateString() + " " + caller + " " + msg + " " + this._formatArgs.apply(this, args));
              } else {
                backLog(type + " " + this._getDateString() + " " + caller + " " + msg + " ");
              }
            }
          } else {
            if (describe) {
              if (args.length > 0) {
                backLog.apply(void 0, ["%c%s%c%s%c%s %c%s%c%s%c%s%c%s %o", "background: " + color + "; border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: #fff;", type, "", " ", "color:black;", this._getDateString(), "font-weight: bold;border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: " + color + ";", caller, "", " ", "border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px;color: #fff;background: " + color + ";", "" + describe, "", ":", msg].concat(args));
              } else {
                backLog("%c%s%c%s%c%s %c%s%c%s%c%s%c%s %o", "background: " + color + "; border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: #fff;", type, "", " ", "color:black;", this._getDateString(), "font-weight: bold;border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: " + color + ";", caller, "", " ", "border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px;color: #fff;background: " + color + ";", "" + describe, "", ":", msg);
              }
            } else {
              if (args.length > 0) {
                backLog.apply(void 0, ["%c%s%c%s%c%s %c%s%c%s", "background: " + color + "; border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: #fff;", type, "", " ", "color:black;", this._getDateString(), "font-weight: bold;border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: " + color + ";", caller, "", "", msg].concat(args));
              } else {
                backLog("%c%s%c%s%c%s %c%s%c%s %o", "background: " + color + "; border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: #fff;", type, "", " ", "color:black;", this._getDateString(), "font-weight: bold;border:1px solid " + color + "; padding: 1px; border-radius: 2px 2px 2px 2px; color: " + color + ";", caller, "", "", msg);
              }
            }
          }
        };
        _proto.getFuncCaller = function getFuncCaller() {
          var callstack = new Error().stack.split("\n");
          var target = callstack[4];
          if (!target) return;
          var matchArray = target.match(/at (.+?) /);
          if (!(matchArray != null && matchArray[1])) return;
          return matchArray[1];
        };
        _proto._stack = function _stack(index) {
          var e = new Error();
          var lines = e.stack.split("\n");
          var result = [];
          lines.forEach(function (line) {
            var subLine = line.substring(7);
            var lineBreak = subLine.split(" ");
            if (lineBreak.length < 2) {
              result.push(lineBreak[0]);
            } else {
              var _result$push;
              result.push((_result$push = {}, _result$push[lineBreak[0]] = lineBreak[1], _result$push));
            }
          });
          var list = [];
          if (index < result.length - 1) {
            var value;
            for (var a in result[index]) {
              var splitList2 = a.split(".");
              if (splitList2.length === 2) {
                list = splitList2.concat();
              } else {
                value = result[index][a];
                var start = value.lastIndexOf("/");
                var end = value.lastIndexOf(".");
                if (start > -1 && end > -1) {
                  var r = value.substring(start + 1, end);
                  list.push(r);
                } else {
                  list.push(value);
                }
              }
            }
          }

          // if (list.length == 1) {
          //     // return "[" + list[0] + ".ts]";
          //     return list[0] + ".ts";
          // }
          if (list.length === 2) {
            return list[0] + ".ts->" + list[1];
            // return "[" + list[0] + ".ts->" + list[1] + "]";
          }

          var target = result[4];
          if (!target) {
            return "未知";
          }
          var str = Object.keys(target)[0];
          if (str === "Function.get") {
            str = Object.keys(result[5])[0];
          }
          list = str.split(".");
          if (!list[1]) {
            return list[0];
          }
          return list[0] + ".ts->" + list[1];
          // return "未知";
        };

        _proto._getDateString = function _getDateString() {
          var d = new Date();
          var str = d.getHours().toString();
          var timeStr = "";
          timeStr += (str.length === 1 ? "0" + str : str) + ":";
          str = d.getMinutes().toString();
          timeStr += (str.length === 1 ? "0" + str : str) + ":";
          str = d.getSeconds().toString();
          timeStr += (str.length === 1 ? "0" + str : str) + ":";
          str = d.getMilliseconds().toString();
          if (str.length === 1) str = "00" + str;
          if (str.length === 2) str = "0" + str;
          timeStr += str;
          timeStr = "[" + timeStr + "]";
          return timeStr;
        }

        /**
         * 支持原生平台直接打印object和array 类型数据
         * @param args
         * @returns
         */;
        _proto._formatArgs = function _formatArgs() {
          for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
            args[_key9] = arguments[_key9];
          }
          return args;
        };
        return Logger;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LoginConfig.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "075a8CnPGpA05VWmh2siXmV", "LoginConfig", undefined);
      /**
       * 登录相关配置常量
       */
      var LoginConfig = exports('LoginConfig', function LoginConfig() {});

      /**
       * 登录API方法名
       */
      /** 服务器CA密钥 */
      LoginConfig.SERVER_CA = "hDJ^54D@!&DH*Sdh18(Sahjig123";
      /** 默认渠道ID */
      LoginConfig.CHANNEL_ID = 666;
      /** 默认游戏渠道ID */
      LoginConfig.GAME_CHANNEL_ID = 666666;
      /** 默认平台ID */
      LoginConfig.PLATFORM_ID = 6;
      /** 默认服务器ID */
      LoginConfig.DEFAULT_SERVER_ID = 15;
      /** 默认OpenID前缀 */
      LoginConfig.OPENID_PREFIX = "666666_";
      /** 默认包名 */
      LoginConfig.PACKAGE_NAME = "packageName";
      /** 默认协议 */
      LoginConfig.PROTOCOL = "ws";
      /** 默认账号ID（测试用） */
      LoginConfig.DEFAULT_ACCOUNT_ID = "172";
      /** 默认主机（测试用） */
      LoginConfig.DEFAULT_HOST = "192.168.110.3";
      /** 默认端口（测试用） */
      LoginConfig.DEFAULT_PORT = "8002";
      var LoginMethod = exports('LoginMethod', /*#__PURE__*/function (LoginMethod) {
        LoginMethod["ACCOUNT_TO_USER"] = "account2user";
        LoginMethod["ACCOUNT_TO_SESSION"] = "account2Session";
        LoginMethod["GET_SERVER_LIST"] = "get_server_list";
        return LoginMethod;
      }({}));

      /**
       * 设备信息接口
       */

      /**
       * 登录请求参数接口
       */
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LoginDaDian.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './GameDef.ts'], function (exports) {
  var _createClass, cclegacy, game, Game;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      game = module.game;
      Game = module.Game;
    }, null],
    execute: function () {
      cclegacy._RF.push({}, "535ffV5Ep9PEqVvC/l/l5Dy", "LoginDaDian", undefined);
      var LoginDaDianType = exports('LoginDaDianType', /*#__PURE__*/function (LoginDaDianType) {
        LoginDaDianType[LoginDaDianType["loadCode"] = 0] = "loadCode";
        LoginDaDianType[LoginDaDianType["initSdk"] = 1] = "initSdk";
        LoginDaDianType[LoginDaDianType["sdkBack"] = 2] = "sdkBack";
        LoginDaDianType[LoginDaDianType["loadServerCfg"] = 3] = "loadServerCfg";
        LoginDaDianType[LoginDaDianType["loadServerCfgBack"] = 4] = "loadServerCfgBack";
        LoginDaDianType[LoginDaDianType["loadServerList"] = 5] = "loadServerList";
        LoginDaDianType[LoginDaDianType["loadServerListBack"] = 6] = "loadServerListBack";
        LoginDaDianType[LoginDaDianType["loadRoleInfo"] = 7] = "loadRoleInfo";
        LoginDaDianType[LoginDaDianType["loadRoleInfoBack"] = 8] = "loadRoleInfoBack";
        LoginDaDianType[LoginDaDianType["bootLoadJson"] = 9] = "bootLoadJson";
        LoginDaDianType[LoginDaDianType["bootLoadPrefab"] = 10] = "bootLoadPrefab";
        LoginDaDianType[LoginDaDianType["bootEnd"] = 11] = "bootEnd";
        LoginDaDianType[LoginDaDianType["wsConnect"] = 12] = "wsConnect";
        LoginDaDianType[LoginDaDianType["wsConnectSuc"] = 13] = "wsConnectSuc";
        LoginDaDianType[LoginDaDianType["protocol10001"] = 14] = "protocol10001";
        LoginDaDianType[LoginDaDianType["protocol10001Back"] = 15] = "protocol10001Back";
        LoginDaDianType[LoginDaDianType["protocol10002"] = 16] = "protocol10002";
        LoginDaDianType[LoginDaDianType["protocol10002Back"] = 17] = "protocol10002Back";
        LoginDaDianType[LoginDaDianType["protocol10003"] = 18] = "protocol10003";
        LoginDaDianType[LoginDaDianType["protocol10003Back"] = 19] = "protocol10003Back";
        LoginDaDianType[LoginDaDianType["protocol10021"] = 20] = "protocol10021";
        LoginDaDianType[LoginDaDianType["protocol10021Back"] = 21] = "protocol10021Back";
        LoginDaDianType[LoginDaDianType["enterLoadPrefab"] = 22] = "enterLoadPrefab";
        LoginDaDianType[LoginDaDianType["enterLoadMusic"] = 23] = "enterLoadMusic";
        LoginDaDianType[LoginDaDianType["enterLoadEnd"] = 24] = "enterLoadEnd";
        LoginDaDianType[LoginDaDianType["sdkSendCreator"] = 25] = "sdkSendCreator";
        LoginDaDianType[LoginDaDianType["sdkSendCreatorBack"] = 26] = "sdkSendCreatorBack";
        LoginDaDianType[LoginDaDianType["sendChangeJob"] = 27] = "sendChangeJob";
        LoginDaDianType[LoginDaDianType["sendChangeJobBack"] = 28] = "sendChangeJobBack";
        LoginDaDianType[LoginDaDianType["loadXinshouMap"] = 29] = "loadXinshouMap";
        LoginDaDianType[LoginDaDianType["selectServer"] = 10001] = "selectServer";
        LoginDaDianType[LoginDaDianType["createRoleError"] = 10002] = "createRoleError";
        return LoginDaDianType;
      }({}));
      var LoginDaDian = exports('LoginDaDian', /*#__PURE__*/function () {
        function LoginDaDian() {}
        LoginDaDian.daDian = function daDian(seq, info, uid, sererId) {
          return;
        }

        //生成一个UUID
        ;

        LoginDaDian.getUUID = function getUUID() {
          var uuid = localStorage.getItem("__device__uuid__");
          if (!uuid) {
            uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
              var r = Math.random() * 16 | 0,
                v = c === "x" ? r : r & 0x3 | 0x8;
              return v.toString(16);
            });
            localStorage.setItem("__device__uuid__", uuid);
          }
          return uuid;
        };
        _createClass(LoginDaDian, null, [{
          key: "deviceId",
          get: function get() {
            if (LoginDaDian._deviceId === "") {
              //获取一个UUID
              LoginDaDian._deviceId = LoginDaDian.getUUID();
            }
            return LoginDaDian._deviceId;
          }
        }]);
        return LoginDaDian;
      }());

      // function registerReportError() {
      //     console.log(`注册错误报告回调`);
      //     if (sys.platform !== sys.Platform.WECHAT_GAME) return;

      //     let timeHandler = null;
      //     let uri = GameDef.SERVER_URL_RELEASE + "/base/gameErrorLog";
      //     if (DEBUG) {
      //         uri = "http://192.168.67.129:8002/base/gameErrorLog";
      //     }
      //     let ReportError = (str: string) => {
      //         if (timeHandler) {
      //             return;
      //         }
      //         let sid = 0;
      //         let mgr = App; //App.loginMgr.selServer ? App.loginMgr.selServer.sid : 0;
      //         if (mgr["loginManager"]) {
      //             sid = mgr["loginManager"].selServer ? mgr["loginManager"].selServer.sid : 0;
      //         }
      //         let params = {
      //             createTime: Math.floor(Date.now() / 1000),
      //             deviceId: LoginDaDian.deviceId,
      //             err: str,
      //             serverId: sid,
      //             uid: UtilityPlatform.getInstance().uid
      //         };
      //         var xhr = new XMLHttpRequest();
      //         xhr.open("POST", uri, true);
      //         xhr.setRequestHeader("Content-Type", "application/json");
      //         xhr.send(JSON.stringify(params));
      //         console.error("ReportError", params);
      //         timeHandler = setTimeout(() => {
      //             timeHandler = null;
      //         }, 10000);
      //     };

      //     // wx.onError(function (e) {
      //     //     console.error('ReportError onError', e);
      //     //     let str = e.message + '\n' + e.stack;
      //     //     ReportError(str);
      //     // });
      //     // wx.onUnhandledRejection(function ({ reason }) {
      //     //     console.error('ReportError onUnhandledRejection', reason);
      //     //     let e = reason;
      //     //     let str = e.message + '\n' + e.stack;
      //     //     ReportError(str);
      //     // });
      // }

      // registerReportError();
      LoginDaDian._deviceId = "";
      game.once(Game.EVENT_GAME_INITED, function () {
        // LoginDaDian.daDian(LoginDaDianType.loadCode, 'load code suc', '', 0);
      });
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LoginMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './Http.ts', './NetChannelMgr.ts', './Prompt.ts', './UIMgr.ts', './UtilityPlatform.ts', './GameBoot.ts', './Item_server.ts', './App.ts', './PlaceGameMgr.ts', './UI_MainView.ts', './Layout_UI_MainView.ts', './EventType.ts', './GameDef.ts', './LoginReqBuilder.ts', './TeamMgr.ts', './BattleDefine.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, MonitorType, ModType, Http, netChannel, Prompt, UIMgr, LayerType, UtilityPlatform, GameBoot, ServerState, App, PlaceGameMgr, UI_MainView, Layout_UI_MainView, EventType, GameDef, LoginReqBuilder, TeamMgr, GameBattle;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      Http = module.Http;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      GameBoot = module.GameBoot;
    }, function (module) {
      ServerState = module.ServerState;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      UI_MainView = module.UI_MainView;
    }, function (module) {
      Layout_UI_MainView = module.Layout_UI_MainView;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      GameDef = module.default;
    }, function (module) {
      LoginReqBuilder = module.LoginReqBuilder;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b4f04UsFDtHuI+uhlqfZixh", "LoginMgr", undefined);

      //配置的prot str 如果为“” 则走 url

      //选服管理类
      var LoginMgr = exports('LoginMgr', /*#__PURE__*/function () {
        function LoginMgr() {
          this._serverCache = void 0;
          this._defaultServerData = void 0;
          //默认选择区服， 1.游戏进入初始化，2.玩家收到选择
          /** 当前会话数据 */
          this._sessionData = void 0;
          //后端返回数据
          this._uid = "4332087";
          //测试用，正常是sdk返回
          // 账号ID
          this._actId = "179";
          this._serListArr = void 0;
          //服列表
          this._serRoleListArr = void 0;
          //已拥有角色的服列表
          this._serListTabArr = void 0;
          //服列表-分tab数组
          //**后台返回的原始区服列表数据 */
          this._oriSerListArr = void 0;
          this.serverTimestamp = void 0;
          ////服务器时间戳   秒
          this.serverOpenTimestamp = void 0;
          ////服务器开服时间戳   秒
          this.serverCreateTimestamp = void 0;
          ////服务器创角时间戳   秒
          this._shiftTime = 0;
          //本地时间偏差
          this.testOpenId = "";
          // config.testOpenId + "";// 35412590; //sdk返回的uid 赋值给它
          /**选中的服务器 */
          this.selServer = void 0;
          /**在所有服都没角色 */
          this.isNewPlayer = false;
          //SOP上报的ID
          this._sopId = 0;
          /** 在本服是否有角色 */
          this.hasRole = false;
          this.reloadEndFlag = false;
          /** 加载所有怪物动画完成 */
          this.loadAllMonsterSpineComplete = false;
          /**是否需要在进游戏后进行分享打点，新玩家需要 */
          this.needPostShareLog = false;
        }
        var _proto = LoginMgr.prototype;
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(EventType.loading_end_to_mainGame, this.loading_end_to_mainGame, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserLogin, this.resUserLogin, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserLoad, this.recPlayerInfo, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserHeart, this.resUserHeart, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserKick, this.resUserKick, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResPermanentDataChange, this.resPermanentDataChange, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDungeonInfo, this.resDungeonInfo, this);
        };
        _proto.init = function init() {
          this.reset();
          this.addEventListeners();
        };
        _proto.dispose = function dispose() {
          this.reset();
          App.monitorMgr.offTarget(this);
          this.hasRole = false;
        };
        _proto.reset = function reset() {
          this._defaultServerData = null;
          this._oriSerListArr = null;
          this._serListArr = null;
          this._serRoleListArr = null;
          this._serListTabArr = null;
          this._sessionData = null;
          this._uid = "";
          this._actId = "";
          this._shiftTime = 0;
          this._sopId = 0;
          this.hasRole = false;
        };
        _proto.setDefaultServerData = function setDefaultServerData(defaultServerData) {
          this._defaultServerData = defaultServerData;
        };
        _proto.getDefaultServerData = function getDefaultServerData() {
          return this._defaultServerData;
        };
        _proto.getServerTimestamp = function getServerTimestamp() {
          return this.serverTimestamp;
        };
        _proto.getServerTimeExact = function getServerTimeExact() {
          return new Date().getTime() + this._shiftTime;
        };
        _proto.setTimeStamp = function setTimeStamp(time) {
          this.serverTimestamp = time;
        };
        //初始化服务器列表
        _proto.initSerList = function initSerList() {
          var cb = function cb() {
            App.loginMgr.getSerCacheByHttp();
          };
          this.getSerListByHttp(cb);
        }

        /**
         * 获取服务器列表
         * @param cb 回调函数
         */;
        _proto.getSerListByHttp = function getSerListByHttp(cb) {
          var _this = this;
          Http.Get_pro(GameDef.serverList, function (result) {
            App.log.logNet("getSerListByHttp", "协议", result);
            var serverData = Array.isArray(result) ? result : [];
            var processedData = serverData.map(function (region) {
              var models = Array.isArray(region.models) ? region.models : [];
              var processedModels = models.map(function (server, index) {
                var wsUrl = "ws://" + server.host + ":" + server.port;
                return {
                  sid: index + 1,
                  // 使用索引作为服务器ID
                  sstate: 1,
                  // 假设服务器状态为正常
                  sname: server.server,
                  // 服务器名称
                  ip: wsUrl,
                  // WebSocket地址
                  stime: Date.now(),
                  // 当前时间戳
                  role_name: "",
                  // 角色名称（默认空）
                  role_level: 0,
                  // 角色等级（默认0）
                  host: server.host,
                  // 服务器主机地址
                  port: server.port,
                  // 服务器端口
                  last_time: 0 // 最后登录时间（默认0）
                };
              });

              return {
                regionId: region.regionId || 0,
                regionName: region.regionName || "未知区域",
                models: processedModels
              };
            });
            _this._oriSerListArr = processedData;
            _this._serListArr = _this.parseServerList(processedData);
            _this.initServerTabs();
            if (cb) {
              cb();
            }
            // App.loginMgr.getSerCacheByHttp();
          }, function (error) {
            App.log.logError("[LoginMgr] 获取服务器列表失败", error);
            Prompt.popTip("获取服务器列表失败");
          });
        }

        /**
         * 解析服务器列表数据
         * @param regionData 区服数据
         * @returns 服务器列表
         */;
        _proto.parseServerList = function parseServerList(regionData) {
          var serverList = [];
          if (!regionData || !Array.isArray(regionData)) {
            console.warn("[LoginMgr] 服务器列表数据为空");
            return serverList;
          }
          for (var _iterator = _createForOfIteratorHelperLoose(regionData), _step; !(_step = _iterator()).done;) {
            var region = _step.value;
            if (!region.models || !Array.isArray(region.models)) {
              continue;
            }
            for (var _iterator2 = _createForOfIteratorHelperLoose(region.models), _step2; !(_step2 = _iterator2()).done;) {
              var server = _step2.value;
              serverList.push(server);
              console.log("[LoginMgr] \u6DFB\u52A0\u670D\u52A1\u5668: " + server.sname + " (sid:" + server.sid + ")");
            }
          }
          return serverList;
        }

        /**
         * 获取用户信息
         * @param accountId 账号ID
         * @param defaultSer 默认服务器
         */;
        _proto.account2User = /*#__PURE__*/
        function () {
          var _account2User = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(accountId, defaultSer) {
            var account_id, builder, params, uri, that;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  account_id = accountId;
                  builder = new LoginReqBuilder(this.selServer);
                  params = builder.account2User(account_id);
                  uri = builder.getApiUrl(); // eslint-disable-next-line @typescript-eslint/no-this-alias
                  that = this;
                  return _context.abrupt("return", new Promise(function (resolve, reject) {
                    Http.Post(uri, params, function (result) {
                      var _result$data;
                      console.warn("[LoginMgr] account2user 回调", result);
                      var users = (_result$data = result.data) == null ? void 0 : _result$data.users;
                      if (users && users[0]) {
                        that.uid = users[0].uid + "";
                        console.log("[LoginMgr] 获取到UID:", that.uid);
                      } else {
                        that.uid = "0";
                        console.warn("[LoginMgr] 未获取到用户信息，使用默认UID: 0");
                      }
                      resolve();
                    });
                  }));
                case 6:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function account2User(_x, _x2) {
            return _account2User.apply(this, arguments);
          }
          return account2User;
        }()
        /**
         * 获取Session信息
         * @param accountId 账号ID
         * @param defaultSer 默认服务器
         */;

        _proto.account2Session = /*#__PURE__*/
        function () {
          var _account2Session = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(accountId, defaultSer) {
            var _this2 = this;
            var builder, params, uri;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  builder = new LoginReqBuilder(this.selServer);
                  params = builder.account2Session(accountId, Number(this.uid));
                  uri = builder.getApiUrl();
                  return _context2.abrupt("return", new Promise(function (resolve, reject) {
                    Http.Post(uri, params, function (result) {
                      var data = result.data;
                      _this2.setActId(accountId);
                      App.saveDataMgr.set("local_actid", accountId);
                      App.log.logNet("account2Session", "网络连接", result);
                      if (!data) {
                        reject(new Error("account2Session failed: " + result.errmsg));
                        return;
                      }
                      _this2._sessionData = data;
                      GameDef.SERVER_URL = "ws://" + data.gate + ":" + data.port;
                      resolve();
                    });
                  }));
                case 4:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function account2Session(_x3, _x4) {
            return _account2Session.apply(this, arguments);
          }
          return account2Session;
        }() /**每次进入登录界面，重新请求服务器列表 */;
        _proto.reqServerList = function reqServerList(cb) {
          var _this3 = this;
          this.getSerListByHttp(function () {
            _this3.getRoleInof(function (result) {
              console.warn("ServerListNew,reqServerList,result== ", result);
              cb();
            });
          });
        }

        /**
         * 前端设置服务器上一次登录的服务器ID
         * @param sid 服务器id
         */;
        _proto.setLastSidByClient = function setLastSidByClient(sid) {
          this.serverCache.last_sid = sid;
        }

        /**获取服务器缓存列表 */;
        _proto.getSerCacheByHttp = function getSerCacheByHttp() {
          var _this4 = this;
          if (this._serverCache) {
            App.monitorMgr.dispatchEvent(EventType.login_ser_refresh, this._serverCache);
            App.monitorMgr.dispatchEvent(EventType.loading_auto_close);
            return;
          }
          this.getRoleInof(function () {
            var isNewPlayer = Object.keys(_this4._serverCache.recently_smap).length === 0;
            console.warn("getRoleInof result,isNewPlayer = ", isNewPlayer);
            _this4.needPostShareLog = isNewPlayer;
            if (isNewPlayer) {
              //服务器列表限制登录
              var serverCache = _this4._serverCache;
              if (serverCache && serverCache.err_code) {
                //被封号了
                Prompt.popTip("账号封禁中");
                return;
              }
              if (serverCache && serverCache.server_state) {
                Prompt.popTip("服务器维护中");
                return;
              }
              // App.loginMgr.selServer = defaultSer;
              var defaultSer = _this4._serListArr[0];
              console.warn("getRoleInof, new player,defaultSer,privacyOpen ******** ", defaultSer, defaultSer.ip, GameDef.privacyOpen);
              _this4.selServer = defaultSer;
              _this4.isNewPlayer = true;
              if (GameDef.privacyOpen) {
                GameBoot.Instance.onPreloadingComplete();
              } else {
                GameDef.SERVER_URL = defaultSer.ip;
                //自动创角
                netChannel.gameCreate();

                // LoginDaDian.daDian(LoginDaDianType.wsConnect, 'ws connect by new', UtilityPlatform.getInstance().uid, defaultSer.sid);
                netChannel.gameConnect(GameDef.SERVER_URL, function () {});
              }
            }
          });
        };
        _proto.getRoleInof = function getRoleInof(cb) {
          var _recently_smap;
          var site = UtilityPlatform.getInstance().site;
          var url = GameDef.newServerRoleInfo + "?site=" + site + "&uid=" + this.getActId();

          // LoginDaDian.daDian(LoginDaDianType.loadRoleInfo, 'loadRoleInfo', this._uid, 0);
          // Http.Get_pro(
          //     url,
          //     (result) => {
          this._serverCache = {
            server_state: 0,
            err_code: 0,
            limit_smap: {},
            recently_smap: (_recently_smap = {}, _recently_smap["1"] = {
              role_name: "角色1",
              role_level: 1,
              last_time: 1864316432,
              serverModel: {
                sid: 1,
                sstate: 1,
                sname: "测试服1",
                ip: "ws://192.168.110.3:20100",
                stime: 1111,
                role_name: "角色1",
                role_level: 1,
                last_time: 1864316432
              }
            }, _recently_smap),
            last_sid: 1,
            white: true
          };
          if (!this._serverCache.recently_smap) {
            this._serverCache.recently_smap = {};
          }
          this.initRoleList();
          App.monitorMgr.dispatchEvent(EventType.login_ser_refresh, this._serverCache);
          App.monitorMgr.dispatchEvent(EventType.loading_auto_close);
          cb();
        };
        _proto.initServerTabs = function initServerTabs() {
          this._serListTabArr = [];
          for (var regionIndex = 0; regionIndex < this._oriSerListArr.length; regionIndex++) {
            var region = this._oriSerListArr[regionIndex];
            var zid = region.regionId;
            var data = {
              zid: zid,
              datas: [],
              zname: region.regionName
            };
            this._serListTabArr.push(data);
            for (var serverIndex = 0; serverIndex < region.models.length; serverIndex++) {
              var server = region.models[serverIndex];
              data.datas.push(server);
            }
          }
        };
        _proto.initRoleList = function initRoleList() {
          this._serRoleListArr = [];
          var recently_smap = this._serverCache.recently_smap;
          if (recently_smap) {
            var serverMap = new Set();
            for (var index = 0; index < this._serListArr.length; index++) {
              var element = this._serListArr[index];
              var _data = recently_smap[element.sid];
              serverMap.add(element.sid);
              if (_data) {
                element.role_name = _data.role_name;
                element.role_level = _data.role_level;
                element.last_time = _data.last_time;
                this._serRoleListArr.push(element);
              }
            }

            //现在后台获取服务器列表的接口只给最新的20个服，玩家有些角色在老的服务器，添加到列表中
            for (var key in recently_smap) {
              if (Object.prototype.hasOwnProperty.call(recently_smap, key)) {
                var _element = recently_smap[key].serverModel;
                if (!serverMap.has(+key)) {
                  _element.role_name = recently_smap[key].role_name;
                  _element.role_level = recently_smap[key].role_level;
                  _element.last_time = recently_smap[key].last_time;
                  this._serListArr.push(_element);
                  this._serRoleListArr.push(_element);
                }
              }
            }
            this._serRoleListArr.sort(function (a, b) {
              return b.last_time - a.last_time;
            });
          }

          //玩家有角色的服务器，放到第一个页签
          var data = {
            zid: 0,
            datas: this._serRoleListArr,
            zname: "最近登录"
          };
          this._serListTabArr.unshift(data);
        }

        /**
         * 获取服务器列表
         * @returns
         */;
        _proto.getSerListArr = function getSerListArr() {
          return this._serListArr;
        }

        /**
         * 获取服务器tab列表
         * @returns
         */;
        _proto.getSerListTabArr = function getSerListTabArr() {
          return this._serListTabArr;
        }

        /**
         * 获取玩家有角色的服务器列表
         * @returns
         */;
        _proto.getSerRoleListArr = function getSerRoleListArr() {
          return this._serRoleListArr;
        };
        //---------------------------------------------------------         华丽分割线(协议部分)         --------------------------------------------------------------------------------------------
        _proto.reqUserLogin = function reqUserLogin() {
          var obj = {
            uid: this._sessionData.uid,
            subid: this._sessionData.subid,
            token: this._sessionData.secret
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUserLogin, obj);
        }

        /**
         * 登录返回
         * @param obj
         */;
        _proto.resUserLogin = function resUserLogin(obj) {
          var selServer = App.loginMgr.selServer;
          if (selServer) {
            this.setLastSidByClient(selServer.sid);
          }
          App.roleMgr.reqPlayerInfo();
        }

        /**
         * 进入游戏前请求数据同步
         */;
        _proto.reqBeforeEnterGame = function reqBeforeEnterGame() {
          PlaceGameMgr.inst.reqLoadBuilding();
          App.bagMgr.reqLoadBag();
          PlaceGameMgr.inst.reqAssignHeroInfo();
          TeamMgr.inst.reqHeroList();
        }

        /**
         * 接收玩家信息
         */;
        _proto.recPlayerInfo = function recPlayerInfo(_obj) {
          this.reqBeforeEnterGame();
          this.loading_end_to_mainGame();
        }

        /**
         * 加载结束，进入主城
         */;
        _proto.loading_end_to_mainGame = function loading_end_to_mainGame() {
          UIMgr.inst.openOnce(UI_MainView, LayerType.main, Layout_UI_MainView, null, function () {
            UIMgr.inst.closeUIByName(LayerType.load, "uiLoading");
            UIMgr.inst.closeUIByName(LayerType.panel, "UI_LoginView");
            GameBoot.Instance.closeProgressBar(true);
          });
        }

        /**
         * 断线重连
         */;
        _proto.cs_web_reconnect = /*#__PURE__*/
        function () {
          var _cs_web_reconnect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  if (!(!this._actId || !this.uid)) {
                    _context3.next = 4;
                    break;
                  }
                  Prompt.popTip("重连失败，请重新登录");
                  App.goToLoginMain();
                  return _context3.abrupt("return");
                case 4:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this);
          }));
          function cs_web_reconnect() {
            return _cs_web_reconnect.apply(this, arguments);
          }
          return cs_web_reconnect;
        }()
        /**
         * 心跳返回
         * @param obj
         */;

        _proto.resUserHeart = function resUserHeart(obj) {
          this.setTimeStamp(obj.time);
          this._shiftTime = obj.time * 1000 - new Date().getTime();
        }

        //---------------------------------------------------------         通知(协议部分)         --------------------------------------------------------------------------------------------

        /**
         * 被踢下线
         * @param obj
         */;
        _proto.resUserKick = function resUserKick(msg) {
          var funcOk = function funcOk() {
            Prompt.popTip("重新登录");
            App.goToLoginMain();
          };
          netChannel.gameClose();
          if (msg.code === 1008) {
            Prompt.popTipWindow("温馨提示", "账号在其它地方登录了", funcOk, "确定");
          } else {
            Prompt.popTipWindow("温馨提示", App.languageMgr.getTextById(22), funcOk, "确定");
          }
        };
        _proto.resPermanentDataChange = function resPermanentDataChange(msg) {
          console.log("数据变化通知：", msg.attrname, msg.attrvalue);
        };
        _proto.resDungeonInfo = function resDungeonInfo(msg) {
          if (!msg || msg.code !== 200) {
            return;
          }
          TeamMgr.inst.reqHeroList();
          TeamMgr.inst.reqSoldierList();
          TeamMgr.inst.reqFormationInfo();

          // 保存副本信息供战斗使用
          App.dungeonBattleMgr.setPushDungeonInfo(msg);

          // 弹出通用提示窗口
          var title = "副本挑战";
          var desc = "\u68C0\u6D4B\u5230\u60A8\u6709\u672A\u5B8C\u6210\u7684\u526F\u672C\u6311\u6218\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F";
          var funcOk = function funcOk() {
            // 点击继续挑战
            App.dungeonBattleMgr.continueChallengeDungeon(msg.dungeon_id);
          };
          var funcCancel = function funcCancel() {
            // 点击取消，发送战斗结算给后端
            App.dungeonBattleMgr.reqBattleSettle(msg.dungeon_id, GameBattle.BattleResult.Defeat);
          };
          Prompt.popTipWindow(title, desc, funcOk, "继续挑战", funcCancel, "取消");
        };
        _proto.getSopServerDay = function getSopServerDay() {
          return this._sopId;
        };
        _proto.setActId = function setActId(id) {
          this._actId = id;
        };
        _proto.getActId = function getActId() {
          return this._actId;
        }

        /**
         * 是否忽略服务器的爆满状态
         */;
        _proto.checkIgnoreBaoMan = function checkIgnoreBaoMan() {
          return true;
        }

        /**
         * 是否忽略服务器维护状态
         * @returns
         */;
        _proto.checkIgnoreWeiHu = function checkIgnoreWeiHu() {
          return this.checkIsWhiteList();
        }

        /**
         * 当前玩家是否在白名单中
         */;
        _proto.checkIsWhiteList = function checkIsWhiteList() {
          return this._serverCache && this._serverCache.white;
        }

        /**
         * 检查是否可以自动登录特定服务器
         * @returns 是否可以登录
         */;
        _proto.checkCanAutoLogin = function checkCanAutoLogin(server) {
          if (!server) {
            return false;
          }
          //服务器列表限制登录
          var serverCache = App.loginMgr.serverCache;
          if (!serverCache) {
            return false;
          }
          if (serverCache && serverCache.err_code) {
            //被封号了
            return false;
          }
          if (serverCache && serverCache.server_state) {
            return false;
          }
          switch (server.sstate) {
            case ServerState.WeiHu:
              if (!App.loginMgr.checkIgnoreWeiHu()) {
                return false;
              }
              break;
            case ServerState.BaoMan:
              var hasRole = !!serverCache.recently_smap[server.sid];
              if (!hasRole && !App.loginMgr.checkIgnoreBaoMan()) {
                return false;
              }
              break;
          }
          return true;
        }

        /**
         * 获取登录服务器
         */;
        _proto.getLoginServer = function getLoginServer(serverCache) {
          var serListArr = App.loginMgr.getSerListArr();
          var defaultSer;
          if (!serverCache.err_code && serverCache.last_sid > 0) {
            for (var index = 0; index < serListArr.length; index++) {
              var element = serListArr[index];
              if (element.sid === serverCache.last_sid) {
                defaultSer = element;
                break;
              }
            }
            if (!defaultSer) {
              defaultSer = serListArr[0];
            }
            // defaultSer = serListArr[serverCache.last_sid - 1];
          } else {
            defaultSer = serListArr[0];
          }
          return defaultSer;
        }

        /**
         * 登录服务器
         */;
        _proto.loginServer = /*#__PURE__*/
        function () {
          var _loginServer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(server, _fromUILogin) {
            var _this5 = this;
            var result;
            return _regeneratorRuntime().wrap(function _callee4$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  GameBoot.startShowLagLoading(2000, 5, 0, 3);
                  _context4.prev = 1;
                  _context4.next = 4;
                  return this.account2User(this._actId, server);
                case 4:
                  _context4.next = 6;
                  return this.account2Session(this._actId, server);
                case 6:
                  netChannel.gameCreate();
                  result = netChannel.gameConnect(GameDef.SERVER_URL, function () {
                    App.log.logNet("socket连接成功");
                    GameBoot.clearShowLagLoading();
                    if (GameDef.showUserEdit && _this5._actId) {
                      App.loginMgr.reqUserLogin();
                    } else {
                      App.loginMgr.reqUserLogin();
                    }
                  });
                  return _context4.abrupt("return", result);
                case 11:
                  _context4.prev = 11;
                  _context4.t0 = _context4["catch"](1);
                  GameBoot.clearShowLagLoading();
                  return _context4.abrupt("return", false);
                case 15:
                case "end":
                  return _context4.stop();
              }
            }, _callee4, this, [[1, 11]]);
          }));
          function loginServer(_x5, _x6) {
            return _loginServer.apply(this, arguments);
          }
          return loginServer;
        }();
        _createClass(LoginMgr, [{
          key: "serverCache",
          get: function get() {
            return this._serverCache;
          }
        }, {
          key: "uid",
          get: function get() {
            return this._uid;
          },
          set: function set(uid) {
            this._uid = uid;
          }
        }]);
        return LoginMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/LoginReqBuilder.ts", ['cc', './App.ts', './LoginConfig.ts'], function (exports) {
  var cclegacy, App, LoginConfig, LoginMethod;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      LoginConfig = module.LoginConfig;
      LoginMethod = module.LoginMethod;
    }],
    execute: function () {
      cclegacy._RF.push({}, "5eb7aCshfxE64osZk+IfnD7", "LoginReqBuilder", undefined);

      /**
       * 登录请求构建器
       * 统一构建登录相关的HTTP请求参数
       */
      var LoginReqBuilder = exports('LoginReqBuilder', /*#__PURE__*/function () {
        function LoginReqBuilder(server) {
          var _server$port;
          this.host = void 0;
          this.port = void 0;
          this.host = (server == null ? void 0 : server.host) || LoginConfig.DEFAULT_HOST;
          this.port = (server == null || (_server$port = server.port) == null ? void 0 : _server$port.toString()) || LoginConfig.DEFAULT_PORT;
        }

        /**
         * 获取API地址
         */
        var _proto = LoginReqBuilder.prototype;
        _proto.getApiUrl = function getApiUrl() {
          return "http://" + this.host + ":" + this.port + "/api";
        }

        /**
         * 获取WebSocket地址
         */;
        _proto.getWsUrl = function getWsUrl() {
          return "ws://" + this.host + ":" + this.port;
        }

        /**
         * 获取默认设备信息
         */;
        _proto.getDefaultDeviceInfo = function getDefaultDeviceInfo() {
          return {
            android_imei: "",
            cpu_amount: 0,
            cpu_model: "",
            device_name: "device_name",
            device_uuid: "device_uuid",
            ios_idfa: "",
            net_type: "wifi",
            os_type: "pc",
            os_ver: "",
            ram_size: 0,
            rom_size: 0,
            screen_height: 1334,
            screen_width: 750,
            user_agent: "-1"
          };
        }

        /**
         * 构建基础请求参数
         */;
        _proto.buildBaseParams = function buildBaseParams(accountId, uid) {
          if (uid === void 0) {
            uid = 0;
          }
          return {
            account_id: accountId,
            channel_id: LoginConfig.CHANNEL_ID,
            friend_id: 0,
            game_channel_id: LoginConfig.GAME_CHANNEL_ID,
            openid: LoginConfig.OPENID_PREFIX + "170",
            originip: this.host,
            originport: this.port,
            package_name: LoginConfig.PACKAGE_NAME,
            parent_id: 0,
            platform_id: LoginConfig.PLATFORM_ID,
            protocol: LoginConfig.PROTOCOL,
            qqhall_openkey: "",
            serverid: LoginConfig.DEFAULT_SERVER_ID,
            show_server_id: LoginConfig.DEFAULT_SERVER_ID,
            uid: uid
          };
        }

        /**
         * 构建 account2user 请求
         */;
        _proto.account2User = function account2User(accountId) {
          if (!accountId) {
            App.log.logError("账号ID为空 请检查");
          }
          var account_id = accountId;
          return {
            module: "login",
            server_ca: LoginConfig.SERVER_CA,
            method: LoginMethod.ACCOUNT_TO_USER,
            host: this.host + ":" + this.port,
            parms: this.buildBaseParams(account_id, 0)
          };
        }

        /**
         * 构建 account2Session 请求
         */;
        _proto.account2Session = function account2Session(accountId, uid) {
          if (!accountId) {
            App.log.logError("account2Session  账号ID为空 请检查");
          }
          var params = this.buildBaseParams(accountId, uid);

          // account2Session 需要额外的设备信息
          params.device = this.getDefaultDeviceInfo();
          return {
            module: "login",
            server_ca: LoginConfig.SERVER_CA,
            method: LoginMethod.ACCOUNT_TO_SESSION,
            host: this.host + ":" + this.port,
            parms: params
          };
        }

        /**
         * 构建获取服务器列表请求
         */;
        _proto.getServerListParams = function getServerListParams(accountId) {
          if (!accountId) {
            App.log.logError("getServerListParams  账号ID为空 请检查");
          }
          var account_id = accountId;
          var params = this.buildBaseParams(account_id, 0);
          params.device = this.getDefaultDeviceInfo();
          return {
            module: "login",
            server_ca: LoginConfig.SERVER_CA,
            method: LoginMethod.GET_SERVER_LIST,
            host: this.host + ":" + this.port,
            parms: params
          };
        };
        return LoginReqBuilder;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/main", ['./debug-view-runtime-control.ts', './jszip.min.mjs_cjs=&original=.js', './App.ts', './GameBoot.ts', './Singleton.ts', './SingletonRegistry.ts', './deviceTopPx.ts', './ActionFramesItem.ts', './CostItem.ts', './RoleItem.ts', './Item_prop.ts', './Layout_itemProp.ts', './SlotComponent.ts', './SlotController.ts', './Ui_loading.ts', './myUiEnterLoading.ts', './itemFuncUnlock.ts', './uiFunctionUnlock.ts', './Layout_UI_GetRewardView.ts', './UI_GetRewardView.ts', './Ui_loading2.ts', './Layout_uiAge.ts', './Layout_uiNotice.ts', './Ui_age.ts', './Ui_notice.ts', './Ui_prompt.ts', './Layout_uiPromptWarn.ts', './Layout_uiPromptWindow.ts', './Ui_promptWindow.ts', './uiPromptQuan.ts', './RedPointCompont.ts', './RedPointScript.ts', './uiBroadcast.ts', './uiGongGao.ts', './uiPowerUp.ts', './uiPromptCheck.ts', './uiPromptSaiJi.ts', './uiToDyKefu.ts', './EventType.ts', './GameConfig.ts', './GameDef.ts', './ModuleDef.ts', './MonitorType.ts', './RedPointEnum.ts', './SoundDef.ts', './SystemDef.ts', './UIPageDef.ts', './GameBattleEnum.ts', './FlashDragonBones.ts', './FlashSpine.ts', './FlashSprite.ts', './FlashSpriteRed.ts', './ActionShadow.ts', './CameraShake.ts', './EffectMgr.ts', './cc-button.ts', './cc-extension.ts', './cc-node.ts', './GameShareMgr.ts', './MixMgr.ts', './SubscribeMgr.ts', './ADMgr.ts', './BroadcastMgr.ts', './LanguageMgr.ts', './LockMgr.ts', './MonitorMgr.ts', './NodePoolMgr.ts', './PlatformMgr.ts', './PromiseMgr.ts', './ResMgr.ts', './SaveDataMgr.ts', './ScheduleMgr.ts', './SpineMgr.ts', './NetChannelMgr.ts', './NetGameTips.ts', './NetInterface.ts', './NetNode.ts', './WebSock.ts', './SoundEffect.ts', './SoundMgr.ts', './SoundMusic.ts', './BagMgr.ts', './RoleMgr.ts', './AIFollow.ts', './BaseAi.ts', './BossAI.ts', './HeroAI.ts', './MonsterAI.ts', './SoldierAI.ts', './MonsterAIStateBase.ts', './MonsterFSM.ts', './RoleFSM.ts', './AnimationResourceManager.ts', './AutoBattleMgr.ts', './AxingManager.ts', './BattleBigMap.ts', './BattleDefine.ts', './BattleGlobalData.ts', './BattleMgr.ts', './BattleNewMgr.ts', './BattleNpcCtrl.ts', './ItemBattleNpc.ts', './Buff.ts', './BuffBox.ts', './BuffEffect.ts', './itemBuffIcon.ts', './BulletAttack.ts', './BulletBase.ts', './BulletCtrl.ts', './BulletEffect.ts', './BulletMovement.ts', './BulletMovement_Arrow.ts', './BulletVO.ts', './MyBulletLauncher.ts', './AdsorptionBullet.ts', './CircularBullet.ts', './FollowBullet.ts', './LightningBullet.ts', './MeleeBullet.ts', './RemoteBullet.ts', './City.ts', './CityLane.ts', './DamageTips.ts', './DungeonBattleMgr.ts', './HPBar.ts', './HeroHPBar.ts', './Layout_uiDefeat.ts', './Layout_uiVictory.ts', './MonsterSpawnMgr.ts', './MoraleSystem.ts', './LockTargetCtrl.ts', './RoleBase.ts', './RoleCtrl.ts', './RoleDebugComp.ts', './RoleFactory.ts', './HeroVO.ts', './MonsterVO.ts', './RoleBaseVO.ts', './SoldierVO.ts', './Hero.ts', './Monster.ts', './MonsterUi.ts', './Soldier.ts', './HeroSkill.ts', './MonsterSkill.ts', './PlayerSkill.ts', './RoleSkill.ts', './SoldierSkill.ts', './SkillCtrl.ts', './SkillEffect.ts', './SkillVO.ts', './SoldierSpawnMgr.ts', './FallingPropCtrl.ts', './ItemFallUi.ts', './ItemFallingProp.ts', './Layout_Defeat.ts', './ui_Defeat.ts', './ui_Victory.ts', './ChatMgr.ts', './EmailMgr.ts', './LoginConfig.ts', './LoginMgr.ts', './LoginReqBuilder.ts', './MapMgr.ts', './RedPointEnum2.ts', './RedPointMgr.ts', './SkillMgr.ts', './GameStateMgr.ts', './TeamMgr.ts', './UtilityAndroid.ts', './UtilityH5Sdk.ts', './UtilityPlatform.ts', './UtilityTT.ts', './UtilityWeb.ts', './UtilityWx.ts', './BattleUtil.ts', './CommonCfgUtil.ts', './DBRecord.ts', './DBRecordTypes.ts', './FakeProgressBar.ts', './FrameUtil.ts', './Http.ts', './Logger.ts', './LoginDaDian.ts', './MathUtils.ts', './ModuleContext.ts', './MultSpine.ts', './MultTextures.ts', './Prompt.ts', './RandomUtils.ts', './SpineRunner.ts', './SpineUtils.ts', './UIUtil.ts', './UtilGame.ts', './Utils.ts', './openadsdk.ts', './EventAgent.ts', './ItemSelScript.ts', './Layout_uiListBase.ts', './ListSelScript.ts', './ReDefineTableViewRender.ts', './ScrollList.ts', './ScrollListItem.ts', './ScrollListLayout.ts', './TableView.ts', './TableViewCell.ts', './UIActionMgr.ts', './UIBase.ts', './UIListBase.ts', './UIMgr.ts', './VirtualList.ts', './Layout_UI_BagView.ts', './Layout_UI_ItemDetailView.ts', './Layout_UI_ItemSourceView.ts', './UI_BagView.ts', './UI_ItemDetailView.ts', './UI_ItemSourceView.ts', './BattleMainView.ts', './BattleMainViewCtrl.ts', './BattleMiniMapCtrl.ts', './BattleCtrlView.ts', './BattleDebugNewView.ts', './BattleDebugView.ts', './BattleHeroHeadsItem.ts', './BattleHeroStancesItem.ts', './BattleSettingView.ts', './BattleSoldierHeadItem.ts', './BattleTipsItem.ts', './BattleUISkillItem.ts', './BattleUIView.ts', './JoystickItem.ts', './Layout_BattleSettingView.ts', './PlayerCamera.ts', './EffectNode.ts', './BattleMap.ts', './BattleMapBg.ts', './Item_BattleMap.ts', './BattleProprMgr.ts', './BattleProps.ts', './BattlePropsSec.ts', './BattlePropsSpecial.ts', './BattleSkillProps.ts', './BattleUISysDef.ts', './Formula.ts', './Layout_uiEmail.ts', './Layout_uiEmailInfo.ts', './Ui_email.ts', './Ui_emailInfo.ts', './Layout_UI_GMView.ts', './UI_GMView.ts', './uiGameLoading.ts', './Item_server.ts', './Layout_item_server.ts', './Layout_UI_ServerListView.ts', './Layout_uiAgreement.ts', './Layout_uiLogin.ts', './Layout_uiPromptAgreement.ts', './UI_LoginView.ts', './UI_ServerListView.ts', './Ui_agreement.ts', './Ui_promptAgreement.ts', './Layout_UI_MainView.ts', './Layout_uiDingYue.ts', './Layout_uiWxInvite.ts', './Layout_uiWxShareActivity.ts', './NPCDirectionTip.ts', './UI_MainView.ts', './Ui_DYReward.ts', './MenuItem.ts', './itemDingYue.ts', './itemDouyinDiamond.ts', './itemMoney.ts', './itemWxInviteRole.ts', './itemWxShareActivity.ts', './widgetDingYueToggle.ts', './uiDingYue.ts', './uiWxInvite.ts', './uiWxShareActivity.ts', './BuildingCtrl.ts', './HexMapCtrl.ts', './PlaceConfigMgr.ts', './PlaceGameEnum.ts', './PlaceGameMgr.ts', './TrainingMgr.ts', './BuBingYing.ts', './BuildingBase.ts', './CaiKuangChang.ts', './DiBiao.ts', './DiBiaoModel.ts', './FaMuChang.ts', './FuHuaZhongXin.ts', './GongBingYing.ts', './GongHui.ts', './JingJiChange.ts', './JiuGuan.ts', './MoFang.ts', './QiBingYing.ts', './ShangDian.ts', './ZhiHuiBu.ts', './BingYingModel.ts', './BuildingModel.ts', './FuHuaModel.ts', './ResBuildingModel.ts', './ZhiHuiBuModel.ts', './Animal.ts', './MovingSoldierNPC.ts', './TrainingNPC.ts', './BuildItem.ts', './ConditionCell.ts', './HeroZhiPaiItem.ts', './MoneyTips.ts', './SheBei.ts', './ZiYuanCellItem.ts', './Layout_UI_BuildUpgradeView.ts', './Layout_UI_ChooseHeroView.ts', './Layout_UI_SheBeiUgradeView.ts', './Layout_UI_SheBeiUpgradeView.ts', './Layout_UI_SpeedUpView.ts', './Layout_UI_TrainingView.ts', './Layout_UI_UnLockView.ts', './Layout_UI_ZiYuanGetView.ts', './UI_BuildUpgradeView.ts', './UI_ChooseHeroView.ts', './UI_SheBeiUpgradeView.ts', './UI_SpeedUpView.ts', './UI_TrainingView.ts', './UI_UnLockView.ts', './UI_ZiYuanGetView.ts', './Layout_UI_GetHeroView.ts', './UI_GetHeroView.ts', './Layout_UI_RenameView.ts', './Layout_UI_RoleInfoView.ts', './Layout_UI_SettingView.ts', './Layout_UI_ZhuangBanView.ts', './UI_RenameView.ts', './UI_RoleInfoView.ts', './UI_SettingView.ts', './UI_ZhuangBanView.ts', './AttrItem.ts', './HeroAvatarItem.ts', './HeroSkillItem.ts', './Layout_HeroSkillItem.ts', './Layout_TeamHeroItem.ts', './Layout_TeamMyItem.ts', './Layout_TeamSoldierItem.ts', './Layout_UI_TeamMyView.ts', './SoldierAvatarItem.ts', './StageDescItem.ts', './TeamHeroItem.ts', './TeamMyItem.ts', './TeamSoldierItem.ts', './UpAttrTipsItem.ts', './Layout_UI_HeroAttributeTips.ts', './Layout_UI_HeroSkillActivityTips.ts', './Layout_UI_HeroSkillDescTips.ts', './UI_HeroAttributeTips.ts', './UI_HeroSkillActivityTips.ts', './UI_HeroSkillDescTips.ts', './Layout_UI_HeroCultivateView.ts', './Layout_UI_SoldierCultivateView.ts', './Layout_UI_TeamHeroListView.ts', './Layout_UI_TeamMainView.ts', './Layout_UI_TeamSoldierListView.ts', './UI_HeroCultivateView.ts', './UI_SoldierCultivateView.ts', './UI_TeamHeroListView.ts', './UI_TeamMainView.ts', './UI_TeamMyView.ts', './UI_TeamSoldierListView.ts', './BingLiCell.ts', './TaskSelectItem.ts', './Layout_UI_PlaceGetRewardView.ts', './Layout_UI_PlaceTaskView.ts', './UI_PlaceGetRewardView.ts', './UI_PlaceTaskView.ts', './GlobalData.ts', './HotUpdateConfig.ts', './HotUpdateView.ts', './ZipHotUpdateView.ts', './proto.mjs_cjs=&original=.js', './BaseSpine.ts', './HeroModelFrameAnimation.ts', './HeroModelSpine.ts', './ModelFrameAnimation.ts', './ModelSpine.ts', './MonsterModelFrameAnimation.ts', './MonsterModelSpine.ts', './PlayerModelSpine.ts', './SoldierModelFrameAnimation.ts', './SoldierModelSpine.ts', './SpineFlashWhiteComp.ts'], function () {
  return {
    setters: [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null],
    execute: function () {}
  };
});

System.register("chunks:///_virtual/MapMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './Utils.ts', './ModuleDef.ts', './BattleDefine.ts', './MathUtils.ts', './MonitorType.ts', './BattleBigMap.ts', './GameConfig.ts', './AxingManager.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, UITransform, v2, sp, Vec3, tween, instantiate, Label, v3, DBRecord, Utils, ModuleDef, GameBattle, MathUtils, MonitorType, BattleBigMap, GameConfig, FindPathDeepType, App, AxingManager, BattleUtil;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      UITransform = module.UITransform;
      v2 = module.v2;
      sp = module.sp;
      Vec3 = module.Vec3;
      tween = module.tween;
      instantiate = module.instantiate;
      Label = module.Label;
      v3 = module.v3;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      BattleBigMap = module.BattleBigMap;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      FindPathDeepType = module.FindPathDeepType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      AxingManager = module.AxingManager;
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b79cfejRWBHqaHPNlTv26LC", "MapMgr", undefined);

      /**
       * 地图导航点，用于玩家自动战斗路线导航
       */

      var MapMgr = exports('MapMgr', /*#__PURE__*/function () {
        function MapMgr() {
          this.tar = 0;
          this._mapWidth = 0;
          this._mapHeight = 0;
          this._tiledHeight = null;
          this._tiledWidth = null;
          this._ui = null;
          this._tiledMap = null;
          this._tiledLayer = null;
          this._mapFlag = {};
          this._canOut = true;
          this._aXing = AxingManager.getInstance();
          this._userNode = null;
          this._curMapData = null;
          this._lastMapTiles = null;
          this._mapid = "";
          this.grassLayer = null;
          this._physicalMap = null;
          /**当前地块id */
          this._diKuaiId = void 0;
          this._tempV3 = new Vec3();
          this._tempPos = new Vec3();
          /**导航点列表 */
          this.wayPointList = [];
          /**当前玩家所在地块索引 */
          this.curDiKuaiIndex = 0;
          /**导航点调试标记预制体 */
          this.wayPointPrefab = null;
          /**导航点层名称 */
          this.wayPointLayerName = "wayPoint";
          /**导航点距离对比时，下游导航点相对于上游导航点的优先距离 */
          this.wayPointDisOffset = 200;
          /**导航点到达的判定距离 */
          this.wayPointArrivedDis = 300;
          this.wayPointArrivedDis2 = 150;
          /**导航点到达的判定时间间隔 */
          this.checkWayPointArrivedTime = 0;
        }
        var _proto = MapMgr.prototype;
        /**
         * 设置地图
         * @param tiledMap 需要处理的地图
         * @param canOut 能否走出地图, 多地图拼接的场景需要为true 单地图为false
         * @param userNode 需要处理与地图中元素遮挡关系的节点
         */
        _proto.setMap = function setMap(tiledMap, canOut, userNode, diKuaiId) {
          // this._mapid = this._tiledMap.node.uuid
          this._tiledMap = tiledMap;
          this._tiledLayer = tiledMap.getLayer("physicalLayer");
          this._ui = this._tiledMap.node.getComponent(UITransform);
          this._tiledHeight = this._tiledMap.getTileSize().height;
          this._tiledWidth = this._tiledMap.getTileSize().width;
          this._mapHeight = this._tiledMap.getMapSize().height;
          this._mapWidth = this._tiledMap.getMapSize().width;
          this.canOut = canOut;
          this._diKuaiId = diKuaiId;
          this.initMonsterData(diKuaiId, false, this._ui);
          console.log("initMonsterData");
          var tiles = this._tiledLayer.tiles;
          // this._aXing.initMapData_zhangaiwu(this._mapWidth, this._mapHeight, tiles)
          // this._curMapData = [...this._aXing.map2d.data]

          AxingManager.getInstance().initMapData_zhangaiwu(this._mapWidth, this._mapHeight, tiles);
          //当前所在地图数据
          this._curMapData = this._aXing.tilesToMapData(this._mapWidth, this._mapHeight, tiles);
          this._userNode = userNode;
          // let grassLayer = tiledMap.getLayer('grass1');
          // if (grassLayer && userNode) {
          //     grassLayer.removeUserNode(userNode!);
          //     grassLayer.addUserNode(userNode!);
          // }

          this.initEffect();
          this._physicalMap = [];
          var index = 0;
          for (var j = 0; j < this._mapHeight; j++) {
            this._physicalMap[j] = [];
            for (var i = 0; i < this._mapWidth; i++) {
              this._physicalMap[j][i] = tiles[index++];
            }
          }
          App.monitorMgr.dispatchEvent(MonitorType.battle_mpa_loaded, tiledMap);
        };
        _proto.getMap = function getMap() {
          return this._tiledMap;
        };
        _proto.clearMap = function clearMap(mOther) {
          if (mOther === void 0) {
            mOther = {};
          }
          this._lastMapTiles = null;
          this._mapFlag = {};
          this._mapid = "";
          this.grassLayer = null;
          if (this._userNode) {
            if (this._tiledMap.node) {
              var grassLayer = this._tiledMap.getLayer("grass1");
              if (grassLayer) {
                grassLayer.removeUserNode(this._userNode);
                for (var key in mOther) grassLayer.removeUserNode(mOther[key].node);
              }
            }
            this._userNode = null;
          }
        };
        _proto.initMonsterData = /*#__PURE__*/function () {
          var _initMonsterData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(diKuaiId, chongfu, ui) {
            var uuid, dbr, list, monsterBorn, born_list, BATCH_SIZE, processed, batchCount, i, data, index, monster_group_id, count;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (chongfu === void 0) {
                    chongfu = false;
                  }
                  if (!GameConfig.DebugInfo.noMonster) {
                    _context.next = 4;
                    break;
                  }
                  return _context.abrupt("return");
                case 4:
                  uuid = this._tiledMap.node.uuid;
                  if (!(this._mapFlag[uuid] && !chongfu)) {
                    _context.next = 7;
                    break;
                  }
                  return _context.abrupt("return");
                case 7:
                  if (diKuaiId) {
                    _context.next = 11;
                    break;
                  }
                  diKuaiId = this._diKuaiId;
                  if (diKuaiId) {
                    _context.next = 11;
                    break;
                  }
                  return _context.abrupt("return");
                case 11:
                  dbr = DBRecord.fetchId("DiKuai", diKuaiId);
                  this._mapFlag[uuid] = true;
                  list = dbr.moster_born;
                  if (list) {
                    _context.next = 16;
                    break;
                  }
                  return _context.abrupt("return");
                case 16:
                  console.log("moster_born", list);
                  monsterBorn = this._tiledMap.getObjectGroup("monsterBorn");
                  if (monsterBorn) {
                    _context.next = 20;
                    break;
                  }
                  return _context.abrupt("return");
                case 20:
                  born_list = [];
                  monsterBorn.getObjects().forEach(function (e) {
                    // console.log(e)
                    var id = e["bornID"];
                    if (born_list[id]) console.error("出生点id相同");
                    born_list[id] = e;
                  });
                  BATCH_SIZE = 2; // 每帧处理的组数
                  processed = 0;
                case 25:
                  if (!(processed < list.length)) {
                    _context.next = 48;
                    break;
                  }
                  if (this._tiledMap.node) {
                    _context.next = 28;
                    break;
                  }
                  return _context.abrupt("return");
                case 28:
                  batchCount = Math.min(BATCH_SIZE, list.length - processed);
                  _context.next = 31;
                  return new Promise(function (resolve) {
                    return requestAnimationFrame(resolve);
                  });
                case 31:
                  i = 0;
                case 32:
                  if (!(i < batchCount)) {
                    _context.next = 45;
                    break;
                  }
                  data = list[processed + i];
                  index = data[0];
                  monster_group_id = data[1];
                  count = data[2];
                  if (this._tiledMap.node) {
                    _context.next = 39;
                    break;
                  }
                  return _context.abrupt("return");
                case 39:
                  _context.next = 41;
                  return this.createOneMapMonster(count, born_list[index], DBRecord.fetchId("GuaiWuZu", monster_group_id), uuid, ui);
                case 41:
                case 42:
                  i++;
                  _context.next = 32;
                  break;
                case 45:
                  processed += batchCount;
                  _context.next = 25;
                  break;
                case 48:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function initMonsterData(_x, _x2, _x3) {
            return _initMonsterData.apply(this, arguments);
          }
          return initMonsterData;
        }();
        _proto.createOneMapMonster = /*#__PURE__*/function () {
          var _createOneMapMonster = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(count, born_data, monster_group, uuid, _ui) {
            var BATCH_SIZE, created, x, y, batchCount, i, monster_id, world_pos;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  BATCH_SIZE = 5; // 每帧创建的怪物数量
                  created = 0;
                  x = 0, y = 0;
                case 3:
                  if (!(created < count)) {
                    _context2.next = 28;
                    break;
                  }
                  batchCount = Math.min(BATCH_SIZE, count - created);
                  i = 0;
                case 6:
                  if (!(i < batchCount)) {
                    _context2.next = 23;
                    break;
                  }
                  //TODO  屏蔽，已经传入_ui给mapPointToWorldPostion()了，需要测试玩家反复在两个地图块分界处进出时是否有问题
                  // let curUuid = this._tiledMap.node.uuid;
                  // if (uuid != curUuid) {
                  //     return;
                  // }
                  monster_id = BattleUtil.getValueByProbability(monster_group.probability);
                  world_pos = new Vec3();
                case 9:
                  x = Math.random() * born_data.width + born_data.x;
                  y = born_data.y - Math.random() * born_data.height; //tliedMap坐标系为左上为(0,0)
                  world_pos.set(this.mapPointToWorldPostion(x, y, _ui));
                  if (!this.checkCanMove(world_pos)) {
                    _context2.next = 15;
                    break;
                  }
                  return _context2.abrupt("break", 17);
                case 15:
                  _context2.next = 9;
                  break;
                case 17:
                  if (this._tiledMap.node) {
                    _context2.next = 19;
                    break;
                  }
                  return _context2.abrupt("return");
                case 19:
                  App.battleMgr.roleCtrl.createMonster({
                    id: monster_id,
                    position: world_pos
                  });
                case 20:
                  i++;
                  _context2.next = 6;
                  break;
                case 23:
                  created += batchCount;
                  _context2.next = 26;
                  return new Promise(function (resolve) {
                    return requestAnimationFrame(resolve);
                  });
                case 26:
                  _context2.next = 3;
                  break;
                case 28:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function createOneMapMonster(_x4, _x5, _x6, _x7, _x8) {
            return _createOneMapMonster.apply(this, arguments);
          }
          return createOneMapMonster;
        }()
        /**
         * 获取出生点坐标
         */;

        _proto.getBornPosition = function getBornPosition() {
          var data = this._tiledMap.getObjectGroup("startLocation").getObjects()[0];
          var y = this._tiledMap.getMapSize().height * this._tiledMap.getTileSize().height - data.offset.y;
          // data.offset.y = y
          // return  data.offset
          var world_pos = this.mapPointToWorldPostion(data.offset.x, y);
          return world_pos;
        };
        _proto.checkCanMove = function checkCanMove(worldPosition, isPlayerOrBoss) {
          this._ui.convertToNodeSpaceAR(worldPosition, this._tempPos);
          var x = Math.floor(this._tempPos.x / this._tiledWidth);
          var y = this._mapHeight - Math.floor(this._tempPos.y / this._tiledHeight) - 1;
          if (isPlayerOrBoss) {
            if (x < 0 || y < 0 || x >= this._mapWidth || y >= this._mapHeight) {
              //走出当前地图块了、目标位置不阻挡
              return this._canOut && !this.checkBlock(worldPosition);
            }
          }
          return !this.checkBlock(worldPosition);
        }

        /**
         * 检测某个位置是否阻挡
         * @param worldPosition
         * @returns
         */;
        _proto.checkBlock = function checkBlock(worldPosition) {
          var gridPos = BattleBigMap.getInstance().pointToBigMapGrid(worldPosition);
          return BattleBigMap.getInstance().isBlock(gridPos.x, gridPos.y);
        }

        /**
         * 设置道路可行走状态
         * @param x y 地图块坐标
         * @param val 0不可行走 1可行走
         */;
        _proto.setRoadBlock = function setRoadBlock(x, y, val) {
          if (val === void 0) {
            val = 0;
          }
          if (this._physicalMap[y]) {
            this._physicalMap[y][x] = val;
          }
          if (AxingManager.USE_NEW_DATA) {
            BattleBigMap.getInstance().modifyMapPhysicsData(x, y, this._tiledMap, val);
          }
        };
        _proto.mapPointToWorldPostion = function mapPointToWorldPostion(x, y, _ui) {
          var ui = _ui || this._ui;
          this._tempV3.set(x, y, 0);
          ui.convertToWorldSpaceAR(this._tempV3, this._tempPos);
          // console.log('world_pos', world_pos, x, y, this._tiledMap.node.anchor_x, this._tiledMap.node.anchor_y)
          return this._tempPos;
        };
        _proto.pointToTMGrid = function pointToTMGrid(point) {
          this._ui.convertToNodeSpaceAR(point, this._tempPos);
          var x = Math.floor(this._tempPos.x / this._tiledWidth);
          var y = this._mapHeight - Math.floor(this._tempPos.y / this._tiledHeight) - 1;
          return v2(x, y);
        };
        _proto.pointToNavgatorGrid = function pointToNavgatorGrid(point) {
          var rows = this.aXing.map2d.data.length;
          var columns = this.aXing.map2d.data[0].length;
          var row = rows - 1 - Math.floor(point.y / this._tiledHeight);
          var column = Math.floor(point.x / this._tiledWidth);
          return v2(row, column);
        }

        //参数为世界坐标
        ;

        _proto.getMoveVector = function getMoveVector(start_point, target_point, isInCity, maxDepthValue) {
          return this._aXing.Astar_use_new(start_point, target_point, isInCity, maxDepthValue);
        };
        _proto.getBossBornPosition = function getBossBornPosition(hero_worldPos) {
          var group = this._tiledMap.getObjectGroup("bossLocation");
          if (group) {
            var data = group.getObjects()[0];
            if (data) {
              var y = this._tiledMap.getMapSize().height * this._tiledMap.getTileSize().height - data.offset.y;
              hero_worldPos = this.mapPointToWorldPostion(data.offset.x, y);
              // hero_worldPos = data.offset.copyAsVec3()
              return hero_worldPos;
            }
          }
          var hero_gridPos = this.pointToTMGrid(hero_worldPos);
          // while (true) {
          for (var i = 0; i < 100; i++) {
            var x = Utils.GetRandomNum(3, 7) * (Math.random() > 0.5 ? 1 : -1) + hero_gridPos.x;
            var _y = Utils.GetRandomNum(3, 7) * (Math.random() > 0.5 ? 1 : -1) + hero_gridPos.y;
            if (x < 0 || _y < 0 || x >= this._mapWidth || _y >= this._mapHeight) {
              continue;
            }
            console.log("x, y", x, _y);
            if (this._tiledLayer.getTileGIDAt(x, _y) > 0) {
              return this.mapPointToWorldPostion(x * this._tiledWidth, (this._mapHeight - _y) * this._tiledHeight);
            }
          }
          return hero_worldPos;
        }

        /**
         * 获取Boss出生点位置坐标
         */;
        _proto.getGatePostion = function getGatePostion() {
          var tiles = this._curMapData;
          var points = [];
          for (var i = 0; i < this._mapHeight; i++) {
            if (tiles[i][0] === 0) {
              //转化为行列
              console.log("出口在左边");
              var p = this.mapPointToWorldPostion(0, (this._mapHeight - 1 - i) * this._tiledHeight);
              points.push([2, p.clone()]);
              break;
            }
          }
          for (var _i = 0; _i < this._mapHeight; _i++) {
            if (tiles[_i][this._mapWidth - 1] === 0) {
              console.log("出口在右边");
              var _p = this.mapPointToWorldPostion((this._mapWidth - 1) * this._tiledWidth, (this._mapHeight - 1 - _i) * this._tiledHeight);
              points.push([4, _p.clone()]);
              break;
            }
          }
          for (var _i2 = 0; _i2 < this._mapWidth; _i2++) {
            if (tiles[0][_i2] === 0) {
              console.log("出口在上边");
              var _p2 = this.mapPointToWorldPostion(_i2 * this._tiledWidth, (this._mapHeight - 1) * this._tiledHeight);
              points.push([1, _p2.clone()]);
              break;
            }
          }
          for (var _i3 = 0; _i3 < this._mapWidth; _i3++) {
            if (tiles[this._mapWidth - 1][_i3] === 0) {
              console.log("出口在下边");
              var _p3 = this.mapPointToWorldPostion(_i3 * this._tiledWidth, 0);
              points.push([3, _p3.clone()]);
              break;
            }
          }
          return points;
        }

        //初始化地图上的动效
        ;

        _proto.initEffect = function initEffect() {
          var effectLayer = this._tiledMap.getObjectGroup("class1");
          var grassLayer = this._tiledMap.getLayer("grass1");
          this.grassLayer = grassLayer;
          if (effectLayer) {
            var data = effectLayer.getObjects();
            App.resMgr.loadAssetByBundleDir(ModuleDef.SPINE, "TMXGrass", sp.SkeletonData, null, function (assets) {
              var _map = {};
              for (var i = assets.length; i--;) {
                var sk = assets[i];
                _map[sk.name] = sk;
              }
              for (var j = 0; j < data.length; j++) {
                var name = data[j].name;
                var skData = _map[name];
                var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.itemTMXGrass);
                var _sk = node.getComponent(sp.Skeleton);
                _sk.skeletonData = skData;
                grassLayer.addUserNode(node);
                node.setPosition(data[j].x, data[j].y + node.anchor_y * node.h);
                _sk.setAnimation(0, "animation", true);
              }
            });
          }
        }

        /**
         * 获取一定范围内的可行走区域
         */;
        _proto.getSafePostion = function getSafePostion(position, range) {
          var minx = position.x - range;
          var maxx = position.x + range;
          var miny = position.y - range;
          var maxy = position.y + range;
          // while (true) {
          for (var i = 0; i < 100; i++) {
            var x = MathUtils.randomInt(minx, maxx);
            var y = MathUtils.randomInt(miny, maxy);
            this._tempV3.set(x, y);
            if (App.mapMgr.checkCanMove(this._tempV3)) {
              return this._tempV3;
            }
          }
          return position;
        };
        _proto.init = function init() {
          this.preLoadDebugWayPointSign();
        };
        _proto.dispose = function dispose() {
          this.clearMapWayPoint();
        };
        /**
         * 添加地图导航点
         * @param tiledMap 地块
         * @param diKuaiId 地块id
         */
        _proto.addMapWayPoint = function addMapWayPoint(tiledMap, diKuaiId) {
          var _this = this;
          if (!diKuaiId) {
            console.warn("WayPoint addMapWayPoint diKuaiId is undefined:", diKuaiId);
            return;
          }
          var wayPoint = tiledMap.getObjectGroup(this.wayPointLayerName);
          if (!wayPoint) {
            console.warn("WayPoint addMapWayPoint 导航点层不存在:", diKuaiId);
            return;
          }
          var wayPointObjs = wayPoint.getObjects();
          wayPointObjs.sort(function (a, b) {
            return a["index"] - b["index"];
          });
          var wayPointList = [];
          var trans = tiledMap.node.getComponent(UITransform);
          var tempV3 = new Vec3();
          var pos = new Vec3();
          var _loop = function _loop() {
            var wayPointObj = wayPointObjs[index];
            tempV3.set(wayPointObj["x"], wayPointObj["y"], 0);
            trans.convertToWorldSpaceAR(tempV3, pos);
            //console.log('wayPointObj init pos:', diKuaiId, wayPointObj.x, wayPointObj.y, pos);
            var wayPointData = {
              index: wayPointObj["index"],
              x: Math.floor(pos.x),
              y: Math.floor(pos.y),
              arrived: false,
              diKuaiId: diKuaiId,
              diKuaiIndex: _this.wayPointList.length,
              signNode: null
            };
            {
              if (wayPointList.find(function (item) {
                return item.index === wayPointData.index;
              })) {
                console.error("WayPoint addMapWayPoint 导航点索引重复:", wayPointData.index, diKuaiId);
              }
            }
            wayPointList.push(wayPointData);
            _this.addDebugWayPointSign(wayPointData, wayPointObj["x"], wayPointObj["y"], tiledMap);
            //this.addDebugWayPointSign(wayPointData, Math.floor(pos.x), Math.floor(pos.y), tiledMap, true);
            // console.log('WayPoint addMapWayPoint 导航点:', wayPointData, diKuaiId);
          };

          for (var index = 0; index < wayPointObjs.length; index++) {
            _loop();
          }
          this.wayPointList.push(wayPointList);
          // console.log('WayPoint addMapWayPoint 导航点列表:', wayPointList);
        }

        /**
         * 清除地图导航点
         */;
        _proto.clearMapWayPoint = function clearMapWayPoint() {
          this.wayPointList = [];
          this.curDiKuaiIndex = 0;
        }

        /**
         * 检查是否存在导航点
         * @returns 是否存在导航点
         */;
        _proto.checkHasWayPoint = function checkHasWayPoint() {
          return this.wayPointList.length > 0;
        }

        /**
         * 寻找下一个导航点
         * @param x 当前坐标x
         * @param y 当前坐标y
         * @returns 下一个导航点
         */;
        _proto.findWayPoint = function findWayPoint(x, y) {
          var _this2 = this;
          if (!App.battleMgr.isInBattle()) {
            return null;
          }
          if (this.wayPointList.length <= 0) {
            return null;
          }
          //寻找当前地块的所有导航点，加上下一个地块的第一个导航点
          var wayPointList = [].concat(this.wayPointList[this.curDiKuaiIndex]);
          if (this.wayPointList[this.curDiKuaiIndex + 1]) {
            wayPointList.push(this.wayPointList[this.curDiKuaiIndex + 1][0]);
          }
          if (!wayPointList || wayPointList.length <= 0) {
            return null;
          }
          var playerPos = App.battleMgr.roleCtrl.player.node.worldPosition;
          //确认寻路可达
          var findPathFunc = function findPathFunc(wayPoint) {
            var pos = App.mapMgr.getMoveVector(playerPos, v3(wayPoint.x, wayPoint.y, 0), false, FindPathDeepType.AutoFightFindEnemy);
            var isOk = true;
            if (pos.x === 0 && pos.y === 0) {
              var disX = Math.abs(playerPos.x - wayPoint.x);
              var disY = Math.abs(playerPos.y - wayPoint.y);
              if (disX > 50 || disY > 50) {
                //寻路失败
                isOk = false;
              }
            }
            return isOk;
          };
          var wayPointDisMin = Number.MAX_VALUE;
          var disMinIndex = -1;
          //优先寻找未到达的点
          var unArrivedList = [];
          for (var index = wayPointList.length - 1; index >= 0; index--) {
            var _wayPoint = wayPointList[index];
            if (!_wayPoint.arrived) {
              unArrivedList.push(_wayPoint);
            } else {
              break;
            }
          }
          // let unArrivedList = wayPointList.filter((item) => !item.arrived);
          for (var _index = 0; _index < unArrivedList.length; _index++) {
            var _wayPoint2 = unArrivedList[_index];
            //let offset = index === 0 ? 0 : this.wayPointDisOffset;
            var dis = Math.sqrt((_wayPoint2.x - x) * (_wayPoint2.x - x) + (_wayPoint2.y - y) * (_wayPoint2.y - y));
            if (dis < wayPointDisMin) {
              wayPointDisMin = dis;
              disMinIndex = _index;
            }
          }
          if (disMinIndex >= 0) {
            var _wayPoint3 = unArrivedList[disMinIndex];
            var isOk = findPathFunc(_wayPoint3);
            if (isOk) {
              console.log("WayPoint findWayPoint 找到导航点(优先未到达)******:", _wayPoint3.index, _wayPoint3.diKuaiId, _wayPoint3.diKuaiIndex);
              this.setWayPointAsTargetDebug(_wayPoint3);
              return _wayPoint3;
            } else {
              var wayPointIndex = wayPointList.findIndex(function (item) {
                return item === _wayPoint3;
              });
              console.warn("WayPoint findWayPoint 剔除不可达导航点(优先未到达):", _wayPoint3.index, _wayPoint3.diKuaiId, _wayPoint3.diKuaiIndex, wayPointIndex);
              if (wayPointIndex !== -1) {
                wayPointList.splice(wayPointIndex, 1);
              }
            }
          }
          var findFunc = function findFunc() {
            disMinIndex = -1;
            wayPointDisMin = Number.MAX_VALUE;
            if (wayPointList.length <= 0) {
              console.warn("WayPoint findWayPoint 未找到导航点(递归退出) !!!!!!!:", _this2.curDiKuaiIndex, wayPointList, _this2.wayPointList);
              return null;
            }
            for (var _index2 = 0; _index2 < wayPointList.length; _index2++) {
              var _wayPoint4 = wayPointList[_index2];
              var offset = _index2 === 0 ? 0 : _this2.wayPointDisOffset;
              var _dis = Math.sqrt((_wayPoint4.x - x) * (_wayPoint4.x - x) + (_wayPoint4.y - y) * (_wayPoint4.y - y));
              if (_dis - offset < wayPointDisMin) {
                wayPointDisMin = _dis;
                disMinIndex = _index2;
              }
            }
            if (disMinIndex >= 0) {
              var _wayPoint5 = wayPointList[disMinIndex];
              var _isOk = findPathFunc(_wayPoint5);
              if (_isOk) {
                console.log("WayPoint findWayPoint 找到导航点******:", _wayPoint5.index, _wayPoint5.diKuaiId, _wayPoint5.diKuaiIndex);
                //this.setWayPointAsTargetDebug(wayPoint);
                return _wayPoint5;
              } else {
                var _wayPointIndex = wayPointList.findIndex(function (item) {
                  return item === _wayPoint5;
                });
                console.warn("WayPoint findWayPoint 剔除不可达导航点:", _wayPoint5.index, _wayPoint5.diKuaiId, _wayPoint5.diKuaiIndex, _wayPointIndex);
                if (_wayPointIndex !== -1) {
                  wayPointList.splice(_wayPointIndex, 1);
                }
                return findFunc();
              }
            }
          };
          var wayPoint = findFunc();
          if (wayPoint) {
            this.setWayPointAsTargetDebug(wayPoint);
            return wayPoint;
          } else {
            console.warn("WayPoint findWayPoint 未找到导航点 !!!!!!!:", this.curDiKuaiIndex, wayPointList, this.wayPointList);
            return null;
          }
        }

        /**
         * 获取下一个导航点
         * @param wayPoint 当前导航点
         * @returns 下一个导航点
         */;
        _proto.getNextWayPoint = function getNextWayPoint(wayPoint) {
          if (!App.battleMgr.isInBattle()) {
            return null;
          }
          var wayPointList = this.wayPointList[wayPoint.diKuaiIndex];
          if (!wayPointList || wayPointList.length <= 0) {
            return null;
          }
          if (wayPoint.index === wayPointList.length) {
            var nextDiKuaiWayPointList = this.wayPointList[wayPoint.diKuaiIndex + 1];
            if (nextDiKuaiWayPointList) {
              console.log("WayPoint getNextWayPoint 找到下一个地块导航点:", nextDiKuaiWayPointList[0], wayPoint);
              this.setWayPointAsTargetDebug(nextDiKuaiWayPointList[0]);
              return nextDiKuaiWayPointList[0];
            }
          } else {
            console.log("WayPoint getNextWayPoint 找到当前地块下一个导航点:", wayPointList[wayPoint.index], wayPoint);
            this.setWayPointAsTargetDebug(wayPointList[wayPoint.index]);
            return wayPointList[wayPoint.index];
          }
          console.log("WayPoint getNextWayPoint 未找到下一个导航点:", wayPoint);
          return null;
        }

        /**
         * 设置导航点为目标点，用于调试
         * @param wayPoint 导航点
         */;
        _proto.setWayPointAsTargetDebug = function setWayPointAsTargetDebug(wayPoint) {
          if (!GameConfig.DebugInfo.autoFightDebug) {
            return;
          }
          if (!App.battleMgr.isInBattle()) {
            return;
          }

          //Prompt.popTip(`WayPoint : 地块${wayPoint.diKuaiIndex}_${wayPoint.diKuaiId}_${wayPoint.index}`);

          var labelTarget = wayPoint.signNode.getChildByName("LabelTarget");
          labelTarget.active = true;
          labelTarget.setScale(new Vec3(3, 3, 1));
          tween(labelTarget).to(0.35, {
            scale: new Vec3(1, 1, 1)
          }).delay(1).call(function () {
            labelTarget.active = false;
          }).start();
        }

        /**
         * 预加载导航点调试标记
         */;
        _proto.preLoadDebugWayPointSign = function preLoadDebugWayPointSign() {
          var _this3 = this;
          if (this.wayPointPrefab) {
            return;
          }
          App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/WayPoint", function (err, prefab) {
            if (err) {
              return;
            }
            _this3.wayPointPrefab = prefab;
          });
        }

        /**
         * 添加导航点调试标记
         */;
        _proto.addDebugWayPointSign = function addDebugWayPointSign(wayPoint, localX, localY, tielMap, inBigMap) {
          if (inBigMap === void 0) {
            inBigMap = false;
          }
          if (!GameConfig.DebugInfo.autoFightDebug) {
            return;
          }
          if (!this.wayPointPrefab) {
            return;
          }
          var wayPointSign = instantiate(this.wayPointPrefab);
          wayPointSign.getChildByName("LabelIndex").getComponent(Label).string = wayPoint.index.toString();
          wayPointSign.getChildByName("LabelDiKuai").getComponent(Label).string = "地块" + wayPoint.diKuaiIndex + "_" + wayPoint.diKuaiId;
          var start_point = BattleBigMap.getInstance().pointToBigMapGrid(v3(wayPoint.x, wayPoint.y, 0));
          wayPointSign.getChildByName("LabelPos").getComponent(Label).string = "( " + Math.floor(wayPoint.x) + "," + Math.floor(wayPoint.y) + "_" + start_point.x + "," + start_point.y + " )";
          wayPoint.signNode = wayPointSign;
          wayPointSign.setPosition(localX, localY);
          if (inBigMap) {
            wayPointSign.setParent(BattleBigMap.getInstance().debugLayer);
          } else {
            wayPointSign.setParent(tielMap.node);
          }
        }

        /**
         * 检查导航点是否到达
         * @param wayPoint 导航点
         * @param posX 当前玩家坐标x
         * @param posY 当前玩家坐标y
         * @returns 是否到达
         */;
        _proto.checkWayPointArrived = function checkWayPointArrived(wayPoint, posX, posY) {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          var dis = (wayPoint.x - posX) * (wayPoint.x - posX) + (wayPoint.y - posY) * (wayPoint.y - posY);
          if (dis <= this.wayPointArrivedDis2 * this.wayPointArrivedDis2) {
            return true;
          }
          return false;
        }

        /**
         * 检查当前地块的导航点是否到达
         * @param posX 当前玩家坐标x
         * @param posY 当前玩家坐标y
         */;
        _proto.checkWayPointArrivedCurDiKuai = function checkWayPointArrivedCurDiKuai(dt, posX, posY) {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // if (!App.autoFightManager.hasAutoFightPrivilege()) {
          //     return;
          // }

          this.checkWayPointArrivedTime += dt;
          if (this.checkWayPointArrivedTime < 0.5) {
            return;
          }
          this.checkWayPointArrivedTime = 0;
          var wayPointList = this.wayPointList[this.curDiKuaiIndex];
          if (!wayPointList || wayPointList.length <= 0) {
            return;
          }
          for (var index = 0; index < wayPointList.length; index++) {
            var wayPoint = wayPointList[index];
            if (wayPoint.arrived) {
              continue;
            }
            var dis = (wayPoint.x - posX) * (wayPoint.x - posX) + (wayPoint.y - posY) * (wayPoint.y - posY);
            if (dis <= this.wayPointArrivedDis * this.wayPointArrivedDis) {
              //console.log('WayPoint checkWayPointArrivedCurDiKuai 导航点到达:', wayPoint);
              wayPoint.arrived = true;
              wayPoint.signNode && (wayPoint.signNode.getChildByName("LabelArrived").active = true);
            }
          }
        }

        /**
         * 设置当前地块所有导航点为已到达
         */;
        _proto.setAllWayPointArrivedCurDiKuai = function setAllWayPointArrivedCurDiKuai() {
          if (!App.battleMgr.isInBattle()) {
            return;
          }
          var wayPointList = this.wayPointList[this.curDiKuaiIndex];
          if (!wayPointList || wayPointList.length <= 0) {
            return;
          }
          for (var index = 0; index < wayPointList.length; index++) {
            var wayPoint = wayPointList[index];
            wayPoint.arrived = true;
            wayPoint.signNode && (wayPoint.signNode.getChildByName("LabelArrived").active = true);
            //console.log('WayPoint setAllWayPointArrivedCurDiKuai:', wayPoint);
          }
        };

        _createClass(MapMgr, [{
          key: "mapWidth",
          get: function get() {
            return this._mapWidth;
          }
        }, {
          key: "mapHeight",
          get:
          //出口方向
          function get() {
            return this._mapHeight;
          }
        }, {
          key: "tiledHeight",
          get: function get() {
            return this._tiledHeight;
          }
        }, {
          key: "tiledWidth",
          get: function get() {
            return this._tiledWidth;
          }
        }, {
          key: "canOut",
          get: function get() {
            return this._canOut;
          },
          set: function set(v) {
            this._canOut = v;
          }
        }, {
          key: "aXing",
          get: function get() {
            return this._aXing;
          }
        }]);
        return MapMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MathUtils.ts", ['cc'], function (exports) {
  var cclegacy, Vec2, v2;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      Vec2 = module.Vec2;
      v2 = module.v2;
    }],
    execute: function () {
      cclegacy._RF.push({}, "0efee80tH1CP7N/NQrevO95", "MathUtils", undefined);

      /**
       * 数学的工具类
       */
      var MathUtils = exports('default', /*#__PURE__*/function () {
        function MathUtils() {}
        var _proto = MathUtils.prototype;
        /**
         * 返回给定范围内的随机数值,整数包括左右边界
         * @param min 最小值
         * @param max 最大值
         * @param isInt 是否整数化
         * @returns {number}
         */
        _proto.getFloatValue = function getFloatValue(min, max, isInt) {
          var dv = max - min;
          if (dv === 0) {
            return min;
          }
          if (dv < 0) {
            return 0;
          }
          if (isInt) {
            var _val = min + Math.floor(Math.random() * (dv + 1));
            return _val;
          }
          var val = min + Math.random() * dv;
          return val;
        }

        /**
         * 随机从left,right,不包含right
         * @param left
         * @param right
         * @returns
         */;
        MathUtils.randomInt = function randomInt(left, right) {
          return Math.floor(this.random(right, left));
        }

        /**
         * 是否近似
         * @param left
         * @param right
         * @param delta
         * @returns
         */;
        MathUtils.approximately = function approximately(left, right, delta) {
          if (delta === void 0) {
            delta = 0.001;
          }
          return Math.abs(left - right) <= delta;
        };
        MathUtils.Clamp = function Clamp(value, left, right) {
          value = value >= right ? right : value;
          value = value <= left ? left : value;
          return value;
        }

        // public Clamp01(value: number) {
        //     value = this.Clamp(value, 0, 1);
        //     return value;
        // }

        // /**
        //  * 获取两点之间的角度
        //  * @param pointA 点A
        //  * @param PointB 点B
        //  */
        // public static getAngle(startPoint: Vec2, endPoint: Vec2): number {
        //     let pointX: number = endPoint.x - startPoint.x;
        //     let pointY: number = endPoint.y - startPoint.x;
        //     let theta: number = 360 * Math.atan(pointY / pointX) / (2 * Math.PI);
        //     return theta;
        // }

        /**
         * 获取两点之间的角度
         * @param start 开始位置
         * @param end 目标位置
         */;
        MathUtils.getAngle = function getAngle(start, end) {
          // let dx = end.x - start.x;
          // let dy = end.y - start.y;
          // let dir = v2(dx, dy);
          // let angle = dir.signAngle(v2(1, 0));
          // let degree = angle / Math.PI * 180;
          // return -degree;
          var angle = Math.atan2(end.y - start.y, end.x - start.x) * 180 / Math.PI;
          return angle;
        }

        /**
         * 获取两点之间的直线距离
         * @param startPoint 开始位置
         * @param endPoint 目标位置
         */;
        MathUtils.getDistance = function getDistance(startPoint, endPoint) {
          var pointX = endPoint.x - startPoint.x;
          var pointY = endPoint.y - startPoint.y;
          return Math.sqrt(pointX * pointX + pointY * pointY);
        }

        /**
         * 获取两点之间的直线距离平方（性能比较好不用开方）
         * @param startPoint 开始位置
         * @param endPoint 目标位置
         */;
        MathUtils.getDistanceNotSqrt = function getDistanceNotSqrt(startPoint, endPoint) {
          var pointX = endPoint.x - startPoint.x;
          var pointY = endPoint.y - startPoint.y;
          return pointX * pointX + pointY * pointY;
        }

        /**
         * 2阶贝塞尔
         * @param p0 起点
         * @param p1 拉力点
         * @param p2 终点
         * @param callBackPoint 返回值
         */;
        MathUtils.bessel2eLevel = function bessel2eLevel(t, p0, p1, p2) {
          var temp = 1 - t;
          var tx = temp * temp * p0.x + 2 * t * temp * p1.x + t * t * p2.x;
          var ty = temp * temp * p0.y + 2 * t * temp * p1.y + t * t * p2.y;
          return new Vec2(tx, ty);
        }

        /**
         * 3阶贝塞尔
         * @param p0 起点
         * @param p1 拉力点
         * @param p2 拉力点
         * @param p3 拉力点
         * @param callBackPoint 返回值
         */;
        MathUtils.bassel3Level = function bassel3Level(t, p0, p1, p2, p3) {
          var temp = 1 - t;
          var tx = p0.x * temp * temp * temp + 3 * p1.x * t * temp * temp + 3 * p2.x * t * t * temp + p3.x * t * t * t;
          var ty = p0.y * temp * temp * temp + 3 * p1.y * t * temp * temp + 3 * p2.y * t * t * temp + p3.y * t * t * t;
          return new Vec2(tx, ty);
        }

        /**
         * 获取一定范围的随机数 不包含最大数
         * @param min 最小数
         * @param max 最大数
         */;
        MathUtils.random = function random(max, min) {
          if (max === void 0) {
            max = 1;
          }
          if (min === void 0) {
            min = 0;
          }
          if (max === 1 && min === 0) {
            return Math.random();
          } else {
            return min + Math.random() * (max - min);
          }
        }

        /**
         * 根据权重数组获得随机数
         * @param weights 权重数组
         */;
        MathUtils.randomByWeight = function randomByWeight(weights) {
          var index = 0;
          var sum = 0;
          weights.forEach(function (element) {
            sum += element;
          });
          var temp = this.random(sum);
          sum = 0;
          for (var i = 0; i < weights.length; i++) {
            index = i;
            sum += weights[i];
            if (sum > temp) break;
          }
          return index;
        }

        /**
         * 保留不为0的小数
         * @param x
         * @param decimal 小数点位数(默认保留2位)
         */;
        MathUtils.toDecimal = function toDecimal(num, decimal) {
          if (decimal === void 0) {
            decimal = 2;
          }
          if (isNaN(num)) {
            return 0;
          }
          decimal = Math.pow(10, decimal);
          var f = Math.round(num * decimal) / decimal;
          return f;
        };
        MathUtils.inverseArithmetic = function inverseArithmetic(a1, diff, s) {
          if (diff === 0) return s * 1 / a1;
          var a = diff / 2;
          var b = a1 - a;
          var c = -s;
          return (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);
        };
        MathUtils.arithmetic = function arithmetic(a1, diff, n) {
          return (a1 * 2 + (n - 1) * diff) * n / 2;
        }

        /**
         * 返回num以10为底的对数(即num是10的多少次方)
         * @param num
         */;
        MathUtils.log10 = function log10(num) {
          return Math.floor(Math.log(num) / Math.log(10));
        }

        /**
         * 打乱数组
         * @param heap
         */;
        MathUtils.mix = function mix(heap) {
          var len = heap.length;
          for (var i = 0; i < len; i++) {
            var lastIndex = len - 1 - i;
            var index = this.randomInt(0, lastIndex + 1);
            var c = heap[index];
            heap[index] = heap[lastIndex];
            heap[lastIndex] = c;
          }
          return heap;
        }

        /**
         * 已知圆心,半径,角度,求圆上的点坐标
         * @param pos 圆心坐标
         * @param radius 半径
         * @param angle 角度
         */;
        MathUtils.posInCircle = function posInCircle(pos, radius, angle) {
          var newPos = Vec2.ZERO;
          newPos.x = pos.x + radius * Math.cos(angle * Math.PI / 180);
          newPos.y = pos.y + radius * Math.sin(angle * Math.PI / 180);
          return newPos;
        }

        /**
         * 获取绝对值
         * @param num
         * @returns
         */;
        MathUtils.abs = function abs(num) {
          return Math.abs(num);
        }
        /**
         * 角度转方向向量
         * @param num
         * @returns
         */;
        MathUtils.angleToDirection = function angleToDirection(angle) {
          // 将角度转换为弧度
          var radians = angle * (Math.PI / 180);

          // 计算方向向量
          var x = Math.cos(radians);
          var y = Math.sin(radians);
          return v2(x, y); // 返回一个方向向量
        };

        return MathUtils;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MeleeBullet.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletBase.ts', './BattleDefine.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, Vec2, BulletBase, GameBattle;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec2 = module.Vec2;
    }, function (module) {
      BulletBase = module.BulletBase;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "60112SsB89PYZ80HyepVK34", "MeleeBullet", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 近战子弹
       */
      var MeleeBullet = exports('MeleeBullet', (_dec = ccclass("MeleeBullet"), _dec(_class = /*#__PURE__*/function (_BulletBase) {
        _inheritsLoose(MeleeBullet, _BulletBase);
        function MeleeBullet() {
          var _this;
          _this = _BulletBase.call(this) || this;
          _this.tempLocalPoints = [];
          _this.tempWorldPoints1 = [];
          _this.tempWorldPoints2 = [];
          _this.tempLocalPoints[0] = new Vec2();
          _this.tempLocalPoints[1] = new Vec2();
          _this.tempLocalPoints[2] = new Vec2();
          _this.tempLocalPoints[3] = new Vec2();
          _this.tempWorldPoints1[0] = new Vec2();
          _this.tempWorldPoints1[1] = new Vec2();
          _this.tempWorldPoints1[2] = new Vec2();
          _this.tempWorldPoints1[3] = new Vec2();
          _this.tempWorldPoints2[0] = new Vec2();
          _this.tempWorldPoints2[1] = new Vec2();
          _this.tempWorldPoints2[2] = new Vec2();
          _this.tempWorldPoints2[3] = new Vec2();
          return _this;
        }
        var _proto = MeleeBullet.prototype;
        _proto.init = function init() {
          _BulletBase.prototype.init.call(this);
          this._type = GameBattle.BulletType.Melee;
        };
        _proto.reuse = function reuse() {
          _BulletBase.prototype.reuse.call(this);
        };
        _proto.recovery = function recovery() {
          _BulletBase.prototype.recovery.call(this);
        };
        _proto.launch = function launch(bulletLauncherData) {
          _BulletBase.prototype.launch.call(this, bulletLauncherData);
        }

        // override getBoundingBoxToWorld(): Rect {
        //     return this._owner?.getBoundingBoxToWorld();
        // }

        // 获取节点的四个顶点在世界坐标系中的位置
        ;

        _proto.getWorldPoints = function getWorldPoints(node, index) {
          var worldMatrix = node.getWorldMatrix();

          // 获取节点的宽度和高度
          var width = node.w;
          var height = node.h;

          // 节点的四个顶点（局部坐标系）
          this.tempLocalPoints[0].set(-node.anchor_x * width, -node.anchor_y * height);
          this.tempLocalPoints[1].set((1 - node.anchor_x) * width, -node.anchor_y * height);
          this.tempLocalPoints[2].set((1 - node.anchor_x) * width, (1 - node.anchor_y) * height);
          this.tempLocalPoints[3].set(-node.anchor_x * width, (1 - node.anchor_y) * height);

          // 转换为世界坐标系的点
          // 手动应用矩阵变换，将局部坐标转换为世界坐标
          // let counter = 0;
          // const worldPoints: Vec2[] = this.tempLocalPoints.map((localPoint) => {
          //     const x = worldMatrix.m00 * localPoint.x + worldMatrix.m04 * localPoint.y + worldMatrix.m12;
          //     const y = worldMatrix.m01 * localPoint.x + worldMatrix.m05 * localPoint.y + worldMatrix.m13;
          //     let temp=index===1?this.tempWorldPoints1:this.tempWorldPoints2;
          //     temp[counter].set(x, y);
          //     counter++;
          //     return temp[counter-1];
          // });

          var worldPoints = [];
          for (var i = 0; i < this.tempLocalPoints.length; i++) {
            var localPoint = this.tempLocalPoints[i];
            var x = worldMatrix.m00 * localPoint.x + worldMatrix.m04 * localPoint.y + worldMatrix.m12;
            var y = worldMatrix.m01 * localPoint.x + worldMatrix.m05 * localPoint.y + worldMatrix.m13;
            var temp = index === 1 ? this.tempWorldPoints1 : this.tempWorldPoints2;
            temp[i].set(x, y);
            worldPoints.push(temp[i]);
          }
          return worldPoints;
        }

        // 分离轴检测（SAT算法）
        // 检测两个多边形是否相交
        ;

        _proto.isIntersecting = function isIntersecting(pointsA, pointsB) {
          var polygons = [pointsA, pointsB];
          for (var _i = 0, _polygons = polygons; _i < _polygons.length; _i++) {
            var points = _polygons[_i];
            for (var i = 0; i < points.length; i++) {
              var p1 = points[i];
              var p2 = points[(i + 1) % points.length];

              // 计算边的法向量（即分离轴）
              var axis = new Vec2(p2.y - p1.y, p1.x - p2.x);
              axis.normalize();

              // 投影多边形A和B到分离轴上
              var minA = Infinity,
                maxA = -Infinity;
              var minB = Infinity,
                maxB = -Infinity;
              for (var _iterator = _createForOfIteratorHelperLoose(pointsA), _step; !(_step = _iterator()).done;) {
                var p = _step.value;
                var projection = p.dot(axis);
                minA = Math.min(minA, projection);
                maxA = Math.max(maxA, projection);
              }
              for (var _iterator2 = _createForOfIteratorHelperLoose(pointsB), _step2; !(_step2 = _iterator2()).done;) {
                var _p = _step2.value;
                var _projection = _p.dot(axis);
                minB = Math.min(minB, _projection);
                maxB = Math.max(maxB, _projection);
              }

              // 检查投影是否分离
              if (maxA < minB || maxB < minA) {
                return false; // 分离轴存在，两个矩形不相交
              }
            }
          }

          return true; // 没有分离轴，两个矩形相交
        }

        // 主函数：判断两个节点是否相交
        ;

        _proto.isRectIntersecting = function isRectIntersecting(nodeA, nodeB) {
          var pointsA = this.getWorldPoints(nodeA, 1);
          var pointsB = this.getWorldPoints(nodeB, 2);
          return this.isIntersecting(pointsA, pointsB);
        };
        _proto.checkHit = function checkHit(target) {
          var selfBox = this.hitBox.getBoundingBoxToWorld();
          var targetBox = target.getBoundingBoxToWorld();
          if (selfBox.intersects(targetBox)) {
            //粗过滤
            // let ret = this.isRectIntersecting(this.hitBox.node, target.view.node);
            return true;
          } else {
            return false;
          }
        };
        _proto.onUpdate = function onUpdate(dt) {
          _BulletBase.prototype.onUpdate.call(this, dt);
        };
        return MeleeBullet;
      }(BulletBase)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MenuItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Color, Label, Sprite, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Color = module.Color;
      Label = module.Label;
      Sprite = module.Sprite;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "805f6lQ+7dLTJpN7DthsWR9", "MenuItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var MenuItem = exports('MenuItem', (_dec = ccclass("MenuItem"), _dec2 = property(Node), _dec3 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(MenuItem, _Component);
        function MenuItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "unlock", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lock", _descriptor2, _assertThisInitialized(_this));
          _this._isUnlocked = true;
          return _this;
        }
        var _proto = MenuItem.prototype;
        _proto.start = function start() {
          this.updateMenuState();
        }

        /**
         * 设置菜单项的解锁状态
         * @param unlocked 是否解锁
         */;
        _proto.setUnlocked = function setUnlocked(unlocked) {
          if (this._isUnlocked === unlocked) return;
          this._isUnlocked = unlocked;
          this.updateMenuState();
        }

        /**
         * 获取当前解锁状态
         */;
        _proto.isUnlocked = function isUnlocked() {
          return this._isUnlocked;
        };
        _proto.updateMenuState = function updateMenuState() {
          if (this._isUnlocked) {
            if (this.unlock) {
              this.setNodeColor(this.unlock, new Color(255, 255, 255, 255));
            }
            if (this.lock) {
              this.lock.active = false;
            }
          } else {
            if (this.lock) {
              this.lock.active = true;
              this.setNodeColor(this.unlock, new Color(34, 34, 34, 255));
            }
          }
        };
        _proto.setNodeColor = function setNodeColor(node, color) {
          if (!node) return;
          var label = node.getComponent(Label);
          if (label) {
            label.color = color;
          }
          var sprite = node.getComponent(Sprite);
          if (sprite) {
            sprite.color = color;
          }
          for (var i = 0; i < node.children.length; i++) {
            var child = node.children[i];
            this.setNodeColor(child, color);
          }
        };
        _proto.update = function update(deltaTime) {};
        return MenuItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "unlock", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lock", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MixMgr.ts", ['cc', './DBRecord.ts', './Utils.ts', './MonitorType.ts', './NetChannelMgr.ts', './UtilityPlatform.ts', './App.ts', './EventType.ts', './UtilGame.ts'], function (exports) {
  var cclegacy, DBRecord, Utils, MonitorType, netChannel, UtilityPlatform, App, EventType, UtilGame;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      cclegacy._RF.push({}, "6ebbfWgCMhP5or/meUAcERd", "MixMgr", undefined);
      var MixMgr = exports('MixMgr', /*#__PURE__*/function () {
        function MixMgr() {
          this._mGameSet = void 0;
          /**弹出首充界面时间戳记录 (解锁后每天弹一次)*/
          this.popFirsRechargeRecord = void 0;
          //公告信息
          this._noticeData = void 0;
          //RPK信息
          this._rpkClubDb = void 0;
          this._rpkSvrDb = void 0;
          this._rpkActiDb = void 0;
          /**是否同意用户协议和隐私协议记录key*/
          this.IS_AGREE_USER_AND_PRIVACY_KEY = "isAgreeUserAndPrivacy";
          /**是否勾选了自动登录*/
          this.IS_AUTO_LOGIN = "isAutoLogin";
        }
        var _proto = MixMgr.prototype;
        /**
         * 重置数据
         */
        _proto._resetData = function _resetData() {
          this._mGameSet = undefined;
          this._noticeData = undefined;
          this._rpkSvrDb = {};
          this._rpkClubDb = {};
          this._rpkActiDb = [];
          this.initGameSet();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(EventType.ui_open, this.onUiOpen, this);
        }

        /**
         * 管理器初始化
         */;
        _proto.init = function init() {
          this._resetData();
          this.addEventListener();
          if (!this.getIsAutoLoginInitialized()) {
            this.setIsAutoLogin(true);
          }
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * UI打开事件
         * @param data UI数据
         */;
        _proto.onUiOpen = function onUiOpen(data) {}

        /**
         * 获取关卡配置
         * @param type 关卡类型
         * @param difficulty 难度
         * @param map_level 地图等级
         * @returns
         */;
        _proto.getGuanQiaCfg = function getGuanQiaCfg(type, difficulty, map_level) {
          var list = DBRecord.fetchAll("GuanQia");
          for (var i = 0; i < list.length; i++) {
            var cfg = list[i];
            if (cfg.type == type && cfg.difficulty == difficulty && cfg.map_level == map_level) return cfg;
          }
        }

        /**
         * 请求看完广告后
         * @param id 消息ID
         * @param msg 消息内容
         */;
        _proto.reqAfterAd = function reqAfterAd(id, msg) {
          Utils.ad_video(function (success) {
            if (success) {
              netChannel.game.send(id, msg);
            } else {
              console.log("观看广告失败");
              {
                netChannel.game.send(id, msg);
              }
            }
          }, 1);
        }

        /**
         * 获取游戏设置
         * @param key 设置key
         * @returns
         */;
        _proto.getGameSet = function getGameSet(key) {
          return key == undefined ? this._mGameSet : this._mGameSet[key];
        }

        /**
         * 设置游戏设置
         * @param key 设置key
         * @param val 设置值
         */;
        _proto.setGameSet = function setGameSet(key, val) {
          if (this._mGameSet[key] == val) {
            return;
          }
          this._mGameSet[key] = val;
          App.saveDataMgr.set("game_set_", this._mGameSet);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, key, val);
        }

        /**
         * 初始化游戏设置
         */;
        _proto.initGameSet = function initGameSet() {
          var mGameSet = {};
          var sGameSet = App.saveDataMgr.get("game_set_");
          if (sGameSet) {
            mGameSet = JSON.parse(sGameSet);
          } else {
            mGameSet.bVoice = true;
            mGameSet.nVoice = 100;
            mGameSet.bMusic = true;
            mGameSet.nMusic = 100;
            mGameSet.bDamage = true;
            mGameSet.bSkillEffect = true;
          }
          this._mGameSet = mGameSet;
        }

        /**
         * 获取SDK数据
         * @returns SDK数据
         */;
        _proto.newSdkData = function newSdkData() {
          var sdkData = {
            sid: App.loginMgr.selServer.sid + "",
            // 服务器id
            roleid: App.roleMgr.getRoleUd(),
            // 角色id
            rolename: App.roleMgr.getRoleName(),
            //角色名
            vip: "0",
            level: App.roleMgr.getRoleLv().toString() //用户等级
          };

          return sdkData;
        }

        /**
         * 设置公告数据
         * @param data 公告数据
         */;
        _proto.setNoticeData = function setNoticeData(data) {
          this._noticeData = data;
        }

        /**
         * 获取公告数据
         * @returns 公告数据
         */;
        _proto.getNoticeData = function getNoticeData() {
          return this._noticeData;
        }

        //RPK社群-----------------------------------------------------------------------------------------------------------
        ;

        _proto.reqRPKClubData = function reqRPKClubData() {
          UtilityPlatform.getInstance().getGameClubData([{
            type: 1
          }, {
            type: 5
          }, {
            type: 4
          }]);
        };
        _proto.recRPKAward0 = function recRPKAward0(msg) {
          if (msg.err_code) {
            return;
          }

          // this._rpkSvrDb[msg.id] = StateAward.got;
          UtilGame.showCommonAward(msg.item_list);
          App.monitorMgr.dispatchEvent(MonitorType.rpk_club_data0);
        };
        _proto.recRPKAward1 = function recRPKAward1(msg) {
          for (var dx0 = 0; dx0 < msg.receive_list.length; dx0++) {
            var oData = msg.receive_list[dx0];
            // if (oData.num >= 1) {
            //     this._rpkSvrDb[oData.id] = StateAward.got;
            // }
          }

          App.monitorMgr.dispatchEvent(MonitorType.rpk_club_data0);
        };
        _proto.setRPKClubDb = function setRPKClubDb(type, value) {
          this._rpkClubDb[type] = value;
        };
        _proto.getRPKClubDb = function getRPKClubDb(type) {
          return type == undefined ? this._rpkClubDb : this._rpkClubDb[type];
        };
        _proto.getRPKSvrDb = function getRPKSvrDb(page) {
          return page == undefined ? this._rpkSvrDb : this._rpkSvrDb[page];
        };
        _proto.getRPKActiDb = function getRPKActiDb(dx0) {
          return dx0 == undefined ? this._rpkActiDb : this._rpkActiDb[dx0];
        };
        _proto.setRPKActiDb = function setRPKActiDb(vActiDb0) {
          vActiDb0 = vActiDb0 || [];
          var vActiDb1 = [];
          for (var dx0 = 0; dx0 < vActiDb0.length; dx0++) {
            var oActiDb = vActiDb0[dx0];
            if (!Number(oActiDb.isEnable)) {
              continue;
            }
            if (oActiDb.communityType == 2) {
              continue;
            }
            vActiDb1.push(oActiDb);
          }
          vActiDb1.sort(function (A, B) {
            if (A.seq != B.seq) {
              return A.seq - B.seq;
            }
            return A.communityType - B.communityType;
          });
          this._rpkActiDb = vActiDb1;
        }

        /**
         * 设置是否同意用户协议和隐私协议
         */;
        _proto.setIsAgreeUserAndPrivacy = function setIsAgreeUserAndPrivacy(isAgree) {
          App.saveDataMgr.set(App.mixMgr.IS_AGREE_USER_AND_PRIVACY_KEY, isAgree ? "1" : "0");
        }

        /**
         * 获取是否同意用户协议和隐私协议
         */;
        _proto.getIsAgreeUserAndPrivacy = function getIsAgreeUserAndPrivacy() {
          return App.saveDataMgr.get(App.mixMgr.IS_AGREE_USER_AND_PRIVACY_KEY) == "1";
        }

        /**
         * 设置是否勾选了自动登录
         */;
        _proto.setIsAutoLogin = function setIsAutoLogin(isAutoLogin) {
          App.saveDataMgr.set(App.mixMgr.IS_AUTO_LOGIN, isAutoLogin ? "2" : "1");
        }

        /**
         * 获取是否勾选了自动登录
         */;
        _proto.getIsAutoLogin = function getIsAutoLogin() {
          return App.saveDataMgr.get(App.mixMgr.IS_AUTO_LOGIN) == "2";
        }

        /**
         * 获取自动登录是否初始话过
         */;
        _proto.getIsAutoLoginInitialized = function getIsAutoLoginInitialized() {
          var isInit = App.saveDataMgr.get(App.mixMgr.IS_AUTO_LOGIN);
          return isInit;
        };
        return MixMgr;
      }());
      /**弹出首充界面记录key*/
      MixMgr.POP_FIRST_RECHARGE_KEY = "popFirsRechargeRecord";
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ModelFrameAnimation.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './AnimationResourceManager.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Sprite, UITransform, Component, AnimationResourceManager;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      UITransform = module.UITransform;
      Component = module.Component;
    }, function (module) {
      AnimationResourceManager = module.AnimationResourceManager;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "0c767IwM8VNE7jWrq5zXVJq", "ModelFrameAnimation", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 帧动画模型基类
       */
      var ModelFrameAnimation = exports('ModelFrameAnimation', (_dec = ccclass("ModelFrameAnimation"), _dec2 = property({
        type: Sprite,
        tooltip: "模型部件：躯干"
      }), _dec3 = property({
        type: UITransform,
        tooltip: "碰撞盒"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ModelFrameAnimation, _Component);
        function ModelFrameAnimation() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "sprite_body", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "uif_box", _descriptor2, _assertThisInitialized(_this));
          /** 部件列表 */
          _this._parts = [];
          _this._owne = null;
          /** 是否翻转 */
          _this._isFlipX = false;
          _this.currentAction = "";
          _this.currentFrames = [];
          _this.currentFrameIndex = 0;
          _this.isPlaying = false;
          _this.frameRate = 20;
          _this.isLoop = true;
          _this.accumulator = 0;
          _this.animationEndCallback = null;
          _this.frameCallback = null;
          _this.animationStartCallback = null;
          _this.animationName = "";
          _this.moduleType = "";
          _this.executeFrame = -1;
          _this.hasCustomExecuteFrame = false;
          return _this;
        }
        var _proto = ModelFrameAnimation.prototype;
        _proto.init = function init() {
          this.uif_box = this.node.getComponent(UITransform);
          // 初始化部件列表
          if (this.sprite_body) {
            this._parts.push(this.sprite_body);
          }
        }

        /**
         * 加载动画数据（由子类实现具体逻辑）
         */;
        /**
         * 播放动画
         */
        _proto.play = /*#__PURE__*/
        function () {
          var _play = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(animationName, isLoop, onComplete) {
            var lastFrameIndex;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (isLoop === void 0) {
                    isLoop = true;
                  }
                  if (this.animationName) {
                    _context.next = 4;
                    break;
                  }
                  console.error("Animation name not set");
                  return _context.abrupt("return");
                case 4:
                  if (!(this.isPlaying === true && this.currentAction === animationName)) {
                    _context.next = 6;
                    break;
                  }
                  return _context.abrupt("return");
                case 6:
                  this.stop();
                  this.currentAction = animationName;
                  this.isLoop = isLoop;
                  if (onComplete) {
                    this.animationEndCallback = onComplete;
                  }
                  _context.prev = 10;
                  _context.next = 13;
                  return AnimationResourceManager.getInstance().getAnimationFrames(this.moduleType, this.animationName, animationName);
                case 13:
                  this.currentFrames = _context.sent;
                  if (this.currentFrames.length > 0) {
                    this.currentFrameIndex = 0;
                    // 设置特定帧回调帧数默认值
                    lastFrameIndex = this.currentFrames.length - 1;
                    if (!this.hasCustomExecuteFrame || this.executeFrame < 0) {
                      this.executeFrame = lastFrameIndex;
                      this.hasCustomExecuteFrame = false;
                    } else if (this.executeFrame > lastFrameIndex) {
                      this.executeFrame = lastFrameIndex;
                    }
                    // 使用sprite_body代替原来的sprite
                    if (this.sprite_body) {
                      this.sprite_body.spriteFrame = this.currentFrames[0];
                    }
                    this.isPlaying = true;
                    this.accumulator = 0;

                    // 触发开始回调
                    if (this.animationStartCallback) {
                      this.animationStartCallback({
                        name: this.currentAction,
                        frame: this.currentFrameIndex
                      });
                    }
                  }
                  _context.next = 20;
                  break;
                case 17:
                  _context.prev = 17;
                  _context.t0 = _context["catch"](10);
                  console.error("Failed to play animation: " + animationName, _context.t0);
                case 20:
                case "end":
                  return _context.stop();
              }
            }, _callee, this, [[10, 17]]);
          }));
          function play(_x, _x2, _x3) {
            return _play.apply(this, arguments);
          }
          return play;
        }()
        /**
         * 添加动画到队列
         */;

        _proto.addAnimation = /*#__PURE__*/
        function () {
          var _addAnimation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(animationName, isLoop) {
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  if (isLoop === void 0) {
                    isLoop = true;
                  }
                  _context2.next = 3;
                  return this.play(animationName, isLoop);
                case 3:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function addAnimation(_x4, _x5) {
            return _addAnimation.apply(this, arguments);
          }
          return addAnimation;
        }()
        /**
         * 停止动画
         */;

        _proto.stop = function stop() {
          this.isPlaying = false;
          this.currentFrames = [];
          this.currentFrameIndex = 0;
          this.accumulator = 0;
          // this.currentAction = "Idle";
        }

        /**
         * 设置帧事件处理器
         */;
        _proto.setFrameEventHandler = function setFrameEventHandler(handler, executeFrame) {
          this.frameCallback = handler;
          if (typeof executeFrame === "number" && !Number.isNaN(executeFrame)) {
            this.executeFrame = executeFrame;
            this.hasCustomExecuteFrame = true;
          } else {
            this.executeFrame = -1;
            this.hasCustomExecuteFrame = false;
          }
          this.executeFrame = executeFrame || -1;
        }
        /**
         * 设置动画完成处理器
         */;
        _proto.setCompleteHandler = function setCompleteHandler(handler) {
          this.animationEndCallback = handler;
        }

        /**
         * 设置动画开始处理器
         */;
        _proto.setStartHandler = function setStartHandler(handler) {
          this.animationStartCallback = handler;
        }

        /**
         * 清除所有处理器
         */;
        _proto.clearAllHandler = function clearAllHandler() {
          this.frameCallback = null;
          this.animationEndCallback = null;
          this.animationStartCallback = null;
        }

        /**
         * 检查是否有指定动画
         */;
        _proto.hasAnimation = function hasAnimation(name) {
          // 简单实现：假设所有请求的动画都存在
          return true;
        }

        /**
         * 清除动画
         */;
        _proto.clearAnimation = function clearAnimation() {
          this.stop();
        }

        /**
         * 获取世界坐标系下包围盒
         * @returns 包围盒矩形
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          if (this.uif_box) {
            return this.uif_box.getBoundingBoxToWorld();
          }
          // 如果没有碰撞盒，返回空矩形
          return {
            x: 0,
            y: 0,
            width: 0,
            height: 0
          };
        }

        /**
         * 获取Idle动画帧数据
         */;
        _proto.getIdleFrames = /*#__PURE__*/
        function () {
          var _getIdleFrames = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
            var frames;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  if (!(!this.animationName || !this.moduleType)) {
                    _context3.next = 2;
                    break;
                  }
                  return _context3.abrupt("return", []);
                case 2:
                  _context3.prev = 2;
                  _context3.next = 5;
                  return AnimationResourceManager.getInstance().getAnimationFrames(this.moduleType, this.animationName, "Idle");
                case 5:
                  frames = _context3.sent;
                  return _context3.abrupt("return", frames);
                case 9:
                  _context3.prev = 9;
                  _context3.t0 = _context3["catch"](2);
                  console.error("Failed to get Idle frames", _context3.t0);
                  return _context3.abrupt("return", []);
                case 13:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this, [[2, 9]]);
          }));
          function getIdleFrames() {
            return _getIdleFrames.apply(this, arguments);
          }
          return getIdleFrames;
        }()
        /**
         * 更新动画
         */;

        _proto.update = function update(deltaTime) {
          if (!this.isPlaying || this.currentFrames.length === 0) return;
          var frameTime = 1 / this.frameRate;
          this.accumulator += deltaTime;
          while (this.accumulator >= frameTime) {
            this.currentFrameIndex++;

            // 检查是否播放完成
            if (this.currentFrameIndex >= this.currentFrames.length) {
              if (this.isLoop) {
                this.currentFrameIndex = 0;
              } else {
                this.currentFrameIndex = this.currentFrames.length - 1;
                this.isPlaying = false;

                // 执行完成回调
                if (this.animationEndCallback) {
                  this.animationEndCallback({
                    name: this.currentAction,
                    frame: this.currentFrameIndex
                  });
                }
              }
            }

            // 更新显示帧
            if (this.sprite_body) {
              this.sprite_body.spriteFrame = this.currentFrames[this.currentFrameIndex];
            }

            // 触发帧回调（可以根据需要在特定帧触发）
            if (this.frameCallback && this.currentFrameIndex === this.executeFrame) {
              // 构造包含data属性的对象，以兼容spine事件处理格式
              this.frameCallback({
                name: this.currentAction,
                frame: this.currentFrameIndex
              });
            }
            this.accumulator -= frameTime;
          }
        };
        _proto.reset = function reset() {
          this.clearAllHandler();
          this.clearAnimation();
        };
        _createClass(ModelFrameAnimation, [{
          key: "width",
          get: /** 宽度 */
          function get() {
            return this.node.getComponent(UITransform).width;
          }

          /** 高度 */
        }, {
          key: "height",
          get: function get() {
            return this.node.getComponent(UITransform).height;
          }
        }, {
          key: "owne",
          set: function set(obj) {
            this._owne = obj;
          }
        }, {
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }
        }]);
        return ModelFrameAnimation;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "sprite_body", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "uif_box", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ModelSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BaseSpine.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, UITransform, Component, BaseSpine;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
      Component = module.Component;
    }, function (module) {
      BaseSpine = module.BaseSpine;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "68675DBM9VFG6lioDHRunSk", "ModelSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 模型基类
       */
      var ModelSpine = exports('ModelSpine', (_dec = ccclass("ModelSpine"), _dec2 = property({
        type: BaseSpine,
        tooltip: "模型部件： 躯干"
      }), _dec3 = property({
        type: UITransform,
        tooltip: "碰撞盒"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ModelSpine, _Component);
        function ModelSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          // @property(Material)
          // mtlFlashSpine:Material = null
          _initializerDefineProperty(_this, "spine_body", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "uif_box", _descriptor2, _assertThisInitialized(_this));
          /** 部件列表 */
          _this._parts = [];
          /** 是否翻转 */
          _this._isFlipX = false;
          return _this;
        }
        var _proto = ModelSpine.prototype;
        _proto.init = function init() {
          this.uif_box = this.node.getComponent(UITransform);
        }

        // setMaterial(use:boolean = true){
        //     for (const it of this._parts) {
        //         it.skeleton.customMaterial = use ? this.mtlFlashSpine : null
        //     }
        // }
        ;

        _proto.reset = function reset() {
          for (var _iterator = _createForOfIteratorHelperLoose(this._parts), _step; !(_step = _iterator()).done;) {
            var it = _step.value;
            it.reset();
          }
        };
        _proto.play = function play(animationName, isLoop) {
          //console.log('玩家释放 play', animationName, isLoop);
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._parts), _step2; !(_step2 = _iterator2()).done;) {
            var it = _step2.value;
            it.play(animationName, isLoop);
          }
        }

        /**
         * 添加动画
         * @param animationName 动画名称
         * @param isLoop 是否循环
         * @param trackIndex 轨道索引
         */;
        _proto.addAnimation = function addAnimation(animationName, isLoop, trackIndex) {
          //console.log('玩家释放 addAnimation', animationName, isLoop);
          for (var _iterator3 = _createForOfIteratorHelperLoose(this._parts), _step3; !(_step3 = _iterator3()).done;) {
            var it = _step3.value;
            it.addAnimation(animationName, isLoop, trackIndex);
          }
        };
        _proto.clearAnimation = function clearAnimation(animationName) {
          for (var _iterator4 = _createForOfIteratorHelperLoose(this._parts), _step4; !(_step4 = _iterator4()).done;) {
            var it = _step4.value;
            it.clearAnimation(animationName);
          }
        };
        _proto.loadSkeletonData = function loadSkeletonData(_data) {}

        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.uif_box.getBoundingBoxToWorld();
        }

        /**
         * 清理所有回调函数
         */;
        _proto.clearAllHandler = function clearAllHandler() {
          this.setStartHandler(null);
          this.setCompleteHandler(null);
          this.setInterruptHandler(null);
          this.setFrameEventHandler(null);
        }

        /**
         * 用来设置开始播放动画的事件监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setStartHandler = function setStartHandler(handler) {
          if (typeof handler !== "function") {
            for (var _iterator5 = _createForOfIteratorHelperLoose(this._parts), _step5; !(_step5 = _iterator5()).done;) {
              var it = _step5.value;
              it.setStartHandler(null);
            }
            return;
          }

          // let flag = false;
          // const fnHandler = () => {
          //     if (!flag) {
          //         flag = true;
          //         handler(this);
          //     }
          // }

          for (var _iterator6 = _createForOfIteratorHelperLoose(this._parts), _step6; !(_step6 = _iterator6()).done;) {
            var _it = _step6.value;
            _it.setStartHandler(handler);
          }
        }

        /**
         * 用来设置动画播放一次循环结束后的事件监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setCompleteHandler = function setCompleteHandler(handler) {
          if (typeof handler !== "function") {
            for (var _iterator7 = _createForOfIteratorHelperLoose(this._parts), _step7; !(_step7 = _iterator7()).done;) {
              var it = _step7.value;
              it.setCompleteHandler(null);
            }
            return;
          }

          // let flag = false;
          // const fnHandler = (trace:sp.spine.TrackEntry) => {
          //     if (!flag) {
          //         flag = true;
          //         handler(trace);
          //     }
          // }

          // for (const it of this._parts) {
          //     it.setCompleteHandler(fnHandler);
          // }
          for (var _iterator8 = _createForOfIteratorHelperLoose(this._parts), _step8; !(_step8 = _iterator8()).done;) {
            var _it2 = _step8.value;
            _it2.setCompleteHandler(handler);
          }
        }

        /**
         * 用来设置动画被打断的事件监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setInterruptHandler = function setInterruptHandler(handler) {
          var _this2 = this;
          if (typeof handler !== "function") {
            for (var _iterator9 = _createForOfIteratorHelperLoose(this._parts), _step9; !(_step9 = _iterator9()).done;) {
              var it = _step9.value;
              it.setInterruptHandler(null);
            }
            return;
          }
          var flag = false;
          var fnHandler = function fnHandler() {
            if (!flag) {
              flag = true;
              handler(_this2);
            }
          };
          for (var _iterator10 = _createForOfIteratorHelperLoose(this._parts), _step10; !(_step10 = _iterator10()).done;) {
            var _it3 = _step10.value;
            _it3.setInterruptHandler(fnHandler);
          }
        }

        /**
         * 用来设置动画播放过程中帧事件的监听。
         * @param handler 回调函数
         * @returns
         */;
        _proto.setFrameEventHandler = function setFrameEventHandler(handler) {
          // if (typeof (handler) !== "function") {
          //     for (const it of this._parts) {
          //         it.setFrameEventHandler(null);
          //     }
          //     return;
          // }

          // let flag = false;
          // const fnHandler = (name: string) => {
          //     if (!flag) {
          //         flag = true;
          //         handler(name, this);
          //     }
          // }

          // for (const it of this._parts) {
          //     it.setFrameEventHandler(fnHandler);
          // }

          for (var _iterator11 = _createForOfIteratorHelperLoose(this._parts), _step11; !(_step11 = _iterator11()).done;) {
            var it = _step11.value;
            it.setFrameEventHandler(handler);
          }
        };
        _proto.setTimeScale = function setTimeScale(scale) {
          for (var _iterator12 = _createForOfIteratorHelperLoose(this._parts), _step12; !(_step12 = _iterator12()).done;) {
            var it = _step12.value;
            it.setTimeScale(scale);
          }
        };
        _proto.getCurrentTime = function getCurrentTime(animationName) {
          var state = this.spine_body.skeleton.getState();
          for (var i = 0; i < state.tracks.length; i++) {
            var _trackEntry = state.tracks[i];
            if (_trackEntry && _trackEntry.animation.name === animationName) {
              var elapsedTime = _trackEntry.trackTime % _trackEntry.animationEnd;
              return elapsedTime;
            }
          }
          return 0;
        }
        /**
         * 重置某个通道的动画时间
         * @param animationName 动画名称
         */;
        _proto.resetTrackTime = function resetTrackTime(animationName) {
          var state = this.spine_body.skeleton.getState();
          for (var i = 0; i < state.tracks.length; i++) {
            var _trackEntry2 = state.tracks[i];
            if (_trackEntry2 && _trackEntry2.animation.name === animationName) {
              this.spine_body.skeleton.setAnimation(i, animationName, false);
            }
          }
        }

        /**
         * 获取当前正在播放的动画
         * @returns
         */;
        _proto.getAllPlayingAnimation = function getAllPlayingAnimation() {
          this._parts[0].getAllPlayingAnimation();
        };
        _createClass(ModelSpine, [{
          key: "width",
          get: /** 宽度 */
          function get() {
            return this.node.getComponent(UITransform).width;
          }

          /** 高度 */
        }, {
          key: "height",
          get: function get() {
            return this.node.getComponent(UITransform).height;
          }
        }, {
          key: "parts",
          get: function get() {
            return this._parts;
          }
        }, {
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-this.node.scale.x, this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }
        }]);
        return ModelSpine;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "spine_body", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "uif_box", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ModuleContext.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "2102bn13GxBPZFOlbZcQCNa", "ModuleContext", undefined);
      var PROP_MODULE = "__module__name__";
      var PROP_IMPL_CLASS = "__impl__class__";
      var defaultModule = "resources";
      var ModuleContext = exports('ModuleContext', /*#__PURE__*/function () {
        function ModuleContext() {}
        ModuleContext.setDefaultModule = function setDefaultModule(moduleName) {
          defaultModule = moduleName;
        };
        ModuleContext.getDefaultModule = function getDefaultModule() {
          return defaultModule;
        };
        ModuleContext.attachModule = function attachModule(cls, moduleName) {
          cls[PROP_MODULE] = moduleName;
          ModuleContext.clsMap[cls.prototype.constructor.name] = cls;
          ModuleContext.nameToClassMap[cls.name] = cls;
        };
        ModuleContext.getClassModule = function getClassModule(cls) {
          return cls[PROP_MODULE] || defaultModule;
        };
        ModuleContext.attachImplClass = function attachImplClass(cls, implCls) {
          cls[PROP_IMPL_CLASS] = implCls;
        };
        ModuleContext.attachModuleAndImplClass = function attachModuleAndImplClass(cls, moduleName, implCls) {
          cls[PROP_MODULE] = moduleName;
          cls[PROP_IMPL_CLASS] = implCls;
        };
        ModuleContext.getImplClass = function getImplClass(cls) {
          return cls[PROP_IMPL_CLASS] || cls;
        };
        ModuleContext.createFromModule = function createFromModule(cls) {
          var implCls = this.getImplClass(cls) || cls;
          return new implCls();
        };
        ModuleContext.getClassFromName = function getClassFromName(name) {
          if (this.nameToClassMap[name]) {
            return this.nameToClassMap[name];
          }
          if (this.clsMap[name]) {
            return this.clsMap[name];
          }
          console.warn("ModuleContext \u6CA1\u6709\u627E\u5230\u7C7B: " + name);
          return null;
        };
        ModuleContext.registerClass = function registerClass(name, cls) {
          this.nameToClassMap[name] = cls;
          this.clsMap[cls.prototype.constructor.name] = cls;
        };
        return ModuleContext;
      }());
      ModuleContext.clsMap = {};
      ModuleContext.nameToClassMap = {};
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ModuleDef.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "08883cX0ylEN7bFRqkwD4I4", "ModuleDef", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-11-13 11:20:02
       * @FilePath: \qianduan\assets\script\def\ModuleDef.ts
       * @LastEditors: heyuanguang www.heyuanguang@qq.com
       * @LastEditTime: 2025-12-16 11:24:01
       * @Description: Bundle文件夹定义
       */
      // 所有Bundle文件夹的名字
      var ModuleDef = exports('default', function ModuleDef() {});
      ModuleDef.PLACE_GAME = "PlaceGame";
      // 放置游戏
      ModuleDef.PLACE_GAME_TASK = "placlegame_task";
      // 指挥部任务系统
      ModuleDef.BASE_COMMON = "base_common";
      // 通用
      ModuleDef.GAME_MAIN = "game_main";
      // 主场景
      ModuleDef.GAME_ICON = "game_icon";
      // 游戏图标
      ModuleDef.GAME_BAG = "game_bag";
      // 背包
      ModuleDef.GAME_BATTLE = "game_battle";
      // 战斗
      ModuleDef.AUDIO = "audio";
      // 音乐 音效
      ModuleDef.GAME_EMAIL = "game_email";
      // 邮件
      ModuleDef.GAME_EQUIP = "game_equip";
      // 技能面板
      ModuleDef.SHADER = "shader";
      // 技能面板
      ModuleDef.GAME_ROLE = "game_role";
      // 角色面板
      ModuleDef.SPINE = "spine";
      // spine动画
      ModuleDef.GAME_BATTLE_B = "GameBattle";
      // 战斗
      ModuleDef.GAME_LOADING = "game_loading";
      // 加载画面
      ModuleDef.GAME_PET = "game_pet";
      // 宠物
      ModuleDef.AFFECTED = "affected";
      //子弹命中特效、buff特效
      ModuleDef.BULLET_EFFECT = "BulletEffect";
      //子弹
      ModuleDef.MONSTER = "Monster";
      //怪物
      ModuleDef.BATTLE_MAP = "battleMap";
      //战斗地图
      ModuleDef.GAME_LOGIN = "game_login";
      ModuleDef.HERO = "Hero";
      //英雄
      ModuleDef.SOLDIER = "Soldier";
      //士兵
      ModuleDef.NPC = "Npc";
      // NPC
      ModuleDef.GAME_SKILL = "game_skill";
      // 技能
      ModuleDef.GAME_SETTLEMENT = "game_settlement";
      // 结算
      ModuleDef.GAME_TEAM = "game_team";
      // 编队
      ModuleDef.GAME_RECRUITMENT = "game_recruitment";
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MoFang.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './PlaceGameMgr.ts', './App.ts', './ResBuildingModel.ts', './MonitorType.ts', './EventType.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, BuildingBase, BuildingStatus, BuildingType, PlaceGameMgr, App, ResBuildingModel, MonitorType, EventType, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      BuildingStatus = module.BuildingStatus;
      BuildingType = module.BuildingType;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ResBuildingModel = module.ResBuildingModel;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "0bf524KPtRBBpY3RYgGn0v4", "MoFang", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 磨坊建筑类
       * 负责生产食物资源
       */
      var MoFang = exports('MoFang', (_dec = ccclass("MoFang"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "存储数量",
        tooltip: "存储数量文本"
      }), _dec6 = property({
        type: ProgressBar,
        displayName: "仓库存储进度",
        tooltip: "仓库存储数量进度条"
      }), _dec7 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(MoFang, _BuildingBase);
        function MoFang() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "numLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "numProgress", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor6, _assertThisInitialized(_this));
          /**
           * 数据模型
           */
          _this._dataModel = null;
          /**
           * 建造/升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 生产定时器
           */
          _this._productionTimer = null;
          return _this;
        }
        var _proto = MoFang.prototype;
        /**
         * 组件激活时调用
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetZiYuan, this.resGetZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSendZiYuan, this.resSendZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopUpgradeTimer();
          this.stopProductionTimer();
        }

        /**
         * 开始生产定时器
         */;
        _proto.startProductionTimer = function startProductionTimer() {
          var _this2 = this;
          this.stopProductionTimer();
          if (this.dataModel.status === BuildingStatus.IDLE || this.dataModel.status === BuildingStatus.WORKING) {
            this._productionTimer = setInterval(function () {
              _this2.produceResource();
            }, this.dataModel.shengChangeTime);
          }
        }

        /**
         * 停止生产定时器
         */;
        _proto.stopProductionTimer = function stopProductionTimer() {
          if (this._productionTimer) {
            clearInterval(this._productionTimer);
            this._productionTimer = null;
          }
        }

        /**
         * 生产资源
         */;
        _proto.produceResource = function produceResource() {
          if (!this.dataModel || this.dataModel.status === BuildingStatus.BUILDING) return;
          if (this.dataModel.curCangku >= this.dataModel.maxCangku) {
            App.log.logBusiness("\u78E8\u574A\u5B58\u50A8\u5DF2\u6EE1: \u5F53\u524D=" + this.dataModel.curCangku + ", \u6700\u5927=" + this.dataModel.maxCangku);
            return;
          }
          this.dataModel.curCangku += this.dataModel.shengChangeNum[0][1];
          this.updateProductionProgress();
        }

        /**
         * 更新生产进度条
         */;
        _proto.updateProductionProgress = function updateProductionProgress() {
          if (this.numLab && this.dataModel) {
            this.numLab.string = this.dataModel.curCangku + "/" + this.dataModel.maxCangku;
          }
          if (this.numProgress && this.dataModel) {
            var progress = this.dataModel.maxCangku > 0 ? this.dataModel.curCangku / this.dataModel.maxCangku : 0;
            this.numProgress.progress = Math.max(0, Math.min(1, progress));
          }
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this.dataModel) return;
          var curLevel = this.dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 收集资源
         */;
        _proto.onCollectResClick = function onCollectResClick() {
          if (!this.dataModel) return 0;
          PlaceGameMgr.inst.reqGetZiYuan(this.dataModel.buildingUid, this.dataModel.buildType);
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.startUpgradeTimer();
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
          this.startUpgradeTimer();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }
        /**
         * 启动建造或者升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this3 = this;
          if (!this.dataModel.isUpgrading && this.dataModel.status !== BuildingStatus.BUILDING) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            return;
          }
          this.stopUpgradeTimer();
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = true;
          }
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this3.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 建造计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getBuildProgress() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = 1 - this.dataModel.getBuildProgress();
          } else {
            this.stopUpgradeTimer();
            this.updateView();
          }
        };
        _proto.resSendZiYuan = function resSendZiYuan(msg) {
          if (msg.code !== 200) {
            return;
          }
          this.updateView();
        }

        /**
         * 接受资源领取
         * @param msg
         */;
        _proto.resGetZiYuan = function resGetZiYuan(msg) {
          this.dataModel.curCangku = 0;
          this.updateView();
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this.dataModel) {
            return;
          }
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateBuildImg();
          this.updateProductionProgress();
          this.updateLevUpImg();
        }

        /**
         * 当建筑数据更新时调用
         * @param data
         * @returns
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, BuildingType.MoFang, this.dataModel.buildIndex);
          }
        }

        //======================子类虚函数=====================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.MoFang;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new ResBuildingModel(buildingIndex, buildingType, buildingUid, buildingLevel, this);
          this.dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
          this.startUpgradeTimer();
          this.startProductionTimer();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            if (this.dataModel.level > 0 && this.dataModel.checkFully()) {
              this.dataModel.status = BuildingStatus.FULLY;
            } else {
              if (this._productionTimer) {
                this.dataModel.status = BuildingStatus.WORKING;
              } else {
                this.dataModel.status = BuildingStatus.IDLE;
              }
            }
          }
          if (data) {
            if (data.ziyuans && data.ziyuans.length > 0) {
              this.dataModel.curCangku = data.ziyuans[0].num;
            } else {
              this.dataModel.curCangku = 0;
            }
            if (data.building_level !== oldLevel) {
              this.dataModel.level = data.building_level;
            }
            if (data.building_level <= 0 && data.upgrade_duration > 0) {
              this.dataModel.status = BuildingStatus.BUILDING;
              this.dataModel.isUpgrading = false;
            } else if (data.building_level > 0 && data.upgrade_duration > 0) {
              this.dataModel.isUpgrading = true;
            } else {
              this.dataModel.isUpgrading = false;
              this.dataModel.completeBuilding();
            }
            if (this.dataModel.level > 0) {
              var cfg = PlaceConfigMgr.inst.getZiyuanQuLevelConfig(this.dataModel.buildType, this.dataModel.level);
              if (cfg) {
                this.dataModel.shengChangeTime = cfg.shengchantime || 0;
              }
            }
          } else {
            this.dataModel.isUpgrading = false;
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        _createClass(MoFang, [{
          key: "dataModel",
          get: function get() {
            return this._dataModel;
          }
        }]);
        return MoFang;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "numLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "numProgress", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MoneyTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Sprite, Component, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Sprite = module.Sprite;
      Component = module.Component;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "cfe7byIdsxO6bvbwHD6g5R+", "MoneyTips", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var MoneyTips = exports('MoneyTips', (_dec = ccclass("MoneyTips"), _dec2 = property({
        type: Label
      }), _dec3 = property({
        type: Sprite
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(MoneyTips, _Component);
        function MoneyTips() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "moneyLab", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "moneyIcon", _descriptor2, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = MoneyTips.prototype;
        _proto.onEnable = function onEnable() {
          this.moneyLab.string = "";
        }

        /**
         * 展示金币
         * @param money
         */;
        _proto.shuoMoneyTip = function shuoMoneyTip(itemId, money) {
          UtilGame.loadItemIcon(this.moneyIcon, itemId);
          this.moneyLab.string = "+" + money;
        };
        return MoneyTips;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "moneyLab", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "moneyIcon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonitorMgr.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "47f0aTYe09CsKyLdUBiaSeh", "MonitorMgr", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-11-05 10:59:52
       * @FilePath: \CodeB\assets\script\frameworks\manager\base\MonitorManager.ts
       * @LastEditors: xiehande www.xiehande@qq.com
       * @LastEditTime: 2025-11-05 14:18:09
       * @Description: 事件系统管理器
       */
      /**
       * 缓存事件结构类型
       */
      var MonitorMgr = exports('MonitorMgr', /*#__PURE__*/function () {
        function MonitorMgr() {
          this._eventCacheMap = new Map();
        }
        var _proto = MonitorMgr.prototype;
        _proto.init = function init() {}
        // 注册监听
        ;

        _proto.addEventListener = function addEventListener(eventType, callback, target, isOnce) {
          var eventCacheArray = this._eventCacheMap.get(eventType);
          if (!eventCacheArray) {
            eventCacheArray = [];
          }
          var index = eventCacheArray.findIndex(function (eventCache) {
            return (eventCache == null ? void 0 : eventCache.target) === target && (eventCache == null ? void 0 : eventCache.callback) === callback;
          });
          if (index === -1) {
            eventCacheArray.push({
              target: target,
              callback: callback,
              once: isOnce
            });
            this._eventCacheMap.set(eventType, eventCacheArray);
          }
        }

        /**
         * 注销事件 移除监听
         *
         * @param eventName 事件名
         * @param callback 事件处理函数
         * @param target 事件处理函数的执行对象
         */;
        _proto.removeEventListener = function removeEventListener(eventType, callback, target) {
          var eventCacheArray = this._eventCacheMap.get(eventType);
          if (eventCacheArray) {
            if (callback && target) {
              var index = eventCacheArray.findIndex(function (eventCache) {
                return (eventCache == null ? void 0 : eventCache.target) === target && (eventCache == null ? void 0 : eventCache.callback) === callback;
              });
              if (index !== -1) {
                eventCacheArray[index] = null;
                if (eventCacheArray.filter(function (e) {
                  return e !== null;
                }).length === 0) {
                  this._eventCacheMap["delete"](eventType);
                }
              }
            } else {
              eventCacheArray = undefined;
              this._eventCacheMap["delete"](eventType);
            }
          }
        }

        /**
         * 只监听一次自动移除
         *
         * @param eventType 事件类型
         * @param func 事件处理函数
         * @param target 事件处理函数的执行对象
         */;
        _proto.once = function once(eventType, func, target) {
          this.addEventListener(eventType, func, target, true);
        }

        /**
         * 发射事件
         *
         * @param eventName 事件名
         * @param param 传递的剩余不定参数
         */;
        _proto.dispatchEvent = function dispatchEvent(eventType) {
          var eventCacheArray = this._eventCacheMap.get(eventType);
          if (eventCacheArray) {
            for (var _len = arguments.length, param = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
              param[_key - 1] = arguments[_key];
            }
            for (var i = 0; i < eventCacheArray.length; i++) {
              var eventCache = eventCacheArray[i];
              if (!eventCache) {
                continue;
              }
              eventCache.callback.apply(eventCache.target, param);
              // 只接受一次回调的事件，在触发之后就移除掉该缓存事件
              if (eventCache.once) {
                eventCacheArray[i] = null;
              }
            }
            var _eventCacheArray = eventCacheArray.filter(function (e) {
              return e !== null;
            });
            if (_eventCacheArray.length === 0) {
              this._eventCacheMap["delete"](eventType);
            } else {
              this._eventCacheMap.set(eventType, _eventCacheArray);
            }
          }
        }

        /**
         * 注销某个已经注册的对象的所有事件
         *
         * @param target 事件函数处理的执行对象
         */;
        _proto.offTarget = function offTarget(target) {
          var _this = this;
          this._eventCacheMap.forEach(function (eventCacheArray, eventName) {
            if (eventCacheArray) {
              for (var i = eventCacheArray.length - 1; i >= 0; i--) {
                var _eventCacheArray$i;
                if (((_eventCacheArray$i = eventCacheArray[i]) == null ? void 0 : _eventCacheArray$i.target) === target) {
                  eventCacheArray[i] = null;
                }
              }
              if (eventCacheArray.filter(function (e) {
                return e !== null;
              }).length === 0) {
                _this._eventCacheMap["delete"](eventName);
              }
            }
          });
        }

        /**
         * 移除所有监听
         */;
        _proto.dispose = function dispose() {
          this._eventCacheMap.clear();
        };
        _proto.getEvents = function getEvents() {
          return this._eventCacheMap;
        };
        return MonitorMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonitorType.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "bc0acWdMqRJZZZLuQ8FNgAz", "MonitorType", undefined);
      /**
       * 协议模块定义
       */
      var ModType = exports('ModType', {
        moddefult: 0,
        user: 1,
        mail: 2,
        gm: 99
      });
      /**
       * 协议事件定义
       */
      var MonitorType = exports('MonitorType', {
        cmddefult: 0,
        CMD_ReqUserLogin: 1,
        CMD_ResUserLogin: 2,
        CMD_ReqUserLoad: 3,
        CMD_ResUserLoad: 4,
        CMD_ReqUserHeart: 5,
        CMD_ResUserHeart: 6,
        CMD_ResUserKick: 7,
        CMD_ResPermanentDataChange: 8,
        CMD_ReqUpgradeBuilding: 9,
        CMD_ResUpgradeBuilding: 10,
        CMD_ResBuildingUpgradeFinish: 11,
        CMD_ReqSpeedCardUpgrade: 12,
        CMD_ResSpeedCardUpgrade: 13,
        CMD_ReqDiamondUpgrade: 14,
        CMD_ResDiamondUpgrade: 15,
        CMD_ReqShebeiUpgrade: 16,
        CMD_ResShebeiUpgrade: 17,
        CMD_ReqUserLoadBag: 18,
        CMD_ResUserLoadBag: 19,
        CMD_ReqLoadBuilding: 20,
        CMD_ResLoadBuilding: 21,
        CMD_ReqFuHua: 22,
        CMD_ResFuHua: 23,
        CMD_ReqBuild: 24,
        CMD_ResBuild: 25,
        CMD_ReqTrain: 26,
        CMD_ResTrain: 27,
        CMD_ReqGetReserve: 28,
        CMD_ResGetReserve: 29,
        CMD_ReqGetZiYuan: 30,
        CMD_ResGetZiYuan: 31,
        CMD_ResSendZiYuan: 32,
        CMD_ResGuaJiReward: 33,
        CMD_ReqOneKey: 34,
        CMD_ResOneKey: 35,
        CMD_ResBuildingDataChange: 36,
        CMD_ResRewardPopup: 37,
        CMD_ReqAcceptTask: 38,
        CMD_ResAcceptTask: 39,
        CMD_ResTaskFinish: 40,
        CMD_ReqImmFinishTask: 41,
        CMD_ResImmFinishTask: 42,
        CMD_ReqGetTaskReward: 43,
        CMD_ResGetTaskReward: 44,
        CMD_ResTrainFinish: 45,
        CMD_ResUserbagchange: 46,
        CMD_ReqHeroList: 47,
        CMD_ResHeroList: 48,
        CMD_ResNewHero: 49,
        CMD_ReqActivateHero: 50,
        CMD_ResActivateHero: 51,
        CMD_ReqUpgradeHero: 52,
        CMD_ResUpgradeHero: 53,
        CMD_ReqUpStageHero: 54,
        CMD_ResUpStageHero: 55,
        CMD_ReqUpStarHero: 56,
        CMD_ResUpStarHero: 57,
        CMD_ReqSoldierList: 58,
        CMD_ResSoldierList: 59,
        CMD_ResNewSoldier: 60,
        CMD_ReqActivateSoldier: 61,
        CMD_ResActivateSoldier: 62,
        CMD_ReqUpgradeSoldier: 63,
        CMD_ResUpgradeSoldier: 64,
        CMD_ReqUpStageSoldier: 65,
        CMD_ResUpStageSoldier: 66,
        CMD_ReqFormationInfo: 67,
        CMD_ResFormationInfo: 68,
        CMD_ReqFormationChangeName: 69,
        CMD_ResFormationChangeName: 70,
        CMD_ReqOn: 71,
        CMD_ResOn: 72,
        CMD_ReqUse: 73,
        CMD_ResUse: 74,
        CMD_ReqAKeyUseGift: 75,
        CMD_ResAKeyUseGift: 76,
        CMD_ReqUseOptionalGift: 77,
        CMD_ResUseOptionalGift: 78,
        CMD_ReqFragmentCombine: 79,
        CMD_ResFragmentCombine: 80,
        CMD_ReqRename: 81,
        CMD_ResRename: 82,
        CMD_ReqSetHead: 83,
        CMD_ResSetHead: 84,
        CMD_ReqLoadMail: 85,
        CMD_ResLoadMail: 86,
        CMD_ReqReadMail: 87,
        CMD_ResReadMail: 88,
        CMD_ReqReceiveMail: 89,
        CMD_ResReceiveMail: 90,
        CMD_ReqReadAllMail: 91,
        CMD_ResReadAllMail: 92,
        CMD_ReqDelMail: 93,
        CMD_ResDelMail: 94,
        CMD_ReqDelReadAllMail: 95,
        CMD_ResDelReadAllMail: 96,
        CMD_ResNewMailNotify: 97,
        CMD_ReqChangeEquip: 98,
        CMD_ResChangeEquip: 99,
        CMD_ReqTakeOffEquip: 100,
        CMD_ResTakeOffEquip: 101,
        CMD_ReqStrengthenEquip: 102,
        CMD_ResStrengthenEquip: 103,
        CMD_ReqDecomposeEquip: 104,
        CMD_ResDecomposeEquip: 105,
        CMD_ReqLockZhuangwuAttr: 107,
        CMD_ResLockZhuangwuAttr: 108,
        CMD_ReqStarupZhuangwu: 109,
        CMD_ResStarupZhuangwu: 110,
        CMD_ReqRefineZhuangwu: 111,
        CMD_ResRefineZhuangwu: 112,
        CMD_ReqLockEquip: 113,
        CMD_ResLockEquip: 114,
        CMD_ReqQueryZiYuanYuanInfo: 115,
        CMD_ResQueryZiYuanYuanInfo: 116,
        CMD_ReqBattleRewardInfo: 117,
        CMD_ResBattleRewardInfo: 118,
        CMD_ReqBattleHeart: 119,
        CMD_ResBattleHeart: 120,
        CMD_ReqHeadPictureList: 121,
        CMD_ResHeadPictureList: 122,
        CMD_ResAddHeadPicture: 123,
        CMD_ReqUseItem: 124,
        CMD_ResUseItem: 125,
        CMD_ReqBattleUpStage: 126,
        CMD_ResBattleUpStage: 127,
        CMD_ReqBattleSettle: 128,
        CMD_ResBattleSettle: 129,
        CMD_ReqEnterDungeon: 130,
        CMD_ResEnterDungeon: 131,
        CMD_ResDungeonInfo: 132,
        CMD_ReqReTry: 133,
        CMD_ResReTry: 134,
        CMD_ReqRecruit: 136,
        CMD_ResRecruit: 137,
        CMD_ReqAssignHeroInfo: 138,
        CMD_ResAssignHeroInfo: 139,
        CMD_ReqAssignHero: 140,
        CMD_ResAssignHero: 141,
        CMD_ResAssignHeroChange: 142,
        CMD_ResUnlockPos: 144,
        CMD_ReqGMExecute: 1000,
        CMD_ResGMExecute: 1001,
        CMD_ReqGMCommandList: 1002,
        CMD_ResGMCommandList: 1003,
        CMD_ReqGMBatchExecute: 1004,
        CMD_ResGMBatchExecute: 1005,
        saveData_setUser_end: 20000013,
        battle_create_monster: 10000301,
        battle_monster_attack_box: 10000302,
        battle_create_box: 10000303,
        battle_create_box_weapon: 10000304,
        battle_create_box_machinegun_bullet: 10000305,
        battle_box_bullet_attack_monster: 10000306,
        battle_weapon_move: 10000307,
        battle_remove_box: 10000308,
        battle_delete_monster: 10000309,
        battle_create_weapon: 10000310,
        battle_create_bullet: 10000311,
        battle_bullet_attack_monster: 10000312,
        battle_create_role_weapon: 10000313,
        battle_role_weapon_rotate: 10000315,
        battle_create_role_bullet: 10000316,
        battle_role_bullet_attack_monster: 10000317,
        battle_role_weapon_move: 10000318,
        battle_set_test_node_pos: 10000319,
        battle_role_throw_bomb: 10001320,
        battle_update_energy: 10000322,
        battle_game_fail: 10000323,
        battle_create_box_firegun_bullet: 10000324,
        battle_firegun_weapon_move: 10000325,
        battle_fire_attack_monster: 10000328,
        battle_change_fire_bullet_state: 10000329,
        battle_saw_attack_monster: 10000330,
        battle_saw_fly_out: 10000331,
        battle_saw_bullet_attack_monster: 10000332,
        battle_create_box_saw_bullet: 10000333,
        battle_monster_die: 10000334,
        battle_pause_game: 10000335,
        battle_resume_game: 10000336,
        battle_game_success: 10000338,
        battle_update_game_progress: 10000339,
        battle_role_weapon_change_spine: 10000340,
        battle_use_machineGunSkill: 10000341,
        battle_stop_use_machineGunSkill: 10000342,
        battle_use_fireGunSkill: 10000343,
        battle_stop_use_fireGunSkill: 10000344,
        battle_role_change_spine: 10000345,
        battle_add_bullet_hole: 10000346,
        battle_add_bomb_hole: 10000347,
        battle_gun_weapon_attack_affected: 10000348,
        battle_create_prop: 10000349,
        battle_ui_view_update: 10000350,
        battle_boss_hp: 10000351,
        battle_role_move: 10000352,
        battle_update_buff_ui: 10000353,
        battle_buff_attack_effect: 10000354,
        battle_show_boss_modify_map: 10000355,
        battle_flow_none: 10000001000,
        battle_flow_start: 10000001001,
        battle_flow_end: 10000001002,
        battle_flow_back_home: 10000001003,
        battle_player_none: 10000002000,
        battle_player_update_hp: 10000002001,
        battle_player_underattack: 10000002002,
        battle_player_use_skill: 10000002003,
        battle_player_dead: 10000002004,
        battle_player_update_nengliang: 10000002005,
        battle_player_get_falling_item: 10000002006,
        battle_player_lv_up: 10000002007,
        battle_player_falling_equip: 10000002008,
        battle_monster_dead_update_morale: 10000002009,
        battle_player_use_junling: 10000002010,
        battle_hero_dead: 10000002011,
        RedPointUpdate: 10000401,
        RedPointUpdate_PrivilegeCard: 10000402,
        email_update_main_view: 10000501,
        email_update_info_view: 10000502,
        skillPop_close_pop: 10000601,
        skill_update_main_view: 10000801,
        skill_update_info_view: 10000802,
        skill_update_echo_view: 10000803,
        skill_point_change: 1000084,
        game_set: 10001101,
        data_log: 10001201,
        institute_update: 10001501,
        select_level: 10001601,
        select_level_get_reward: 10001602,
        equip_exchange_update: 10001701,
        fushi_up_select: 10001801,
        shipan_up: 10001802,
        fushi_bag_up: 10001803,
        fushi_grid_state_debug: 10001804,
        fushi_merge_select: 10001805,
        fushi_merge_cover: 10001806,
        questionnaire_submit: 10001901,
        web_activity_special_gif_update: 10002001,
        red_role_adorn: 10002101,
        red_temp: 10002102,
        blood_moon_update: 10003001,
        blood_moon_get_box: 10003002,
        blood_moon_exchange_box_update: 10003003,
        guide_custom: 10004001,
        rpk_club_data0: 10005001,
        rpk_activity: 10005002,
        zhu_xian_ren_wu_update: 10005001,
        wx_share_daily_status_update: 10008001,
        wx_share_daily_success_update: 10008002,
        wx_share_invite_info_update: 10008003,
        wx_share_complete: 10008004,
        seckill_gift_free_update: 10009001,
        seckill_gift_update: 10009002,
        ding_yue_info_update: 10010001,
        dy_kefu_close_dyyy: 10017001,
        dy_cbl_state_change: 10017002,
        web_chat_gm: 2001,
        web_kick_off: 16007,
        web_skill_data: 20001,
        web_skill_add_point: 20002,
        web_skill_return_point: 20003,
        web_skill_reset: 20004,
        web_skill_use_presuppose: 20005,
        web_skill_presuppose: 20006,
        web_skill_data0: 20010,
        web_skill_learn: 20011,
        web_email_get_email: 50001,
        web_email_open_email: 50002,
        web_email_delete_email: 50003,
        web_email_one_key_delete_email: 50004,
        web_email_get_email_rwd: 50005,
        web_email_one_key_get_email_rwd: 50006,
        web_email_notice: 50601,
        web_email_notice_delete: 50602,
        web_battle_start: 30001,
        web_battle_end: 30002,
        web_battle_pick: 30003,
        web_battle_pass_List: 30011,
        web_battle_fast_reward: 30012,
        web_pass_reward: 30013,
        web_battle_time_over: 36001,
        rec_pass_data3: 36002,
        web_battle_zhuangbei_fuben: 36011,
        web_battle_trial_ticket: 36012,
        web_battle_get_trial_ticket: 30021,
        web_battle_pass_level_rank: 120003,
        web_diaoyu_rank: 120004,
        battle_dianfeng_property: 20022,
        battle_dianfeng_yitouru: 20021,
        battle_dianfeng_rset: 20023,
        player_BaseAttributes: 10022,
        change_player_skin: 16002,
        web_gem_inlay: 40013,
        web_gem_fetch: 40014,
        web_gem_merge: 40015,
        web_gem_reset: 40016,
        web_gem_data0: 40003,
        web_gem_data3: 46021,
        web_gem_master_up: 40061,
        web_gouYu_data0: 40004,
        web_gouYu_inlay: 40017,
        web_gouYu_fetch: 40018,
        web_gouYu_merge: 40019,
        web_gouYu_reset: 40020,
        web_gouYu_data3: 46022,
        event_gouYu_data3: 10000314,
        battle_add_minimap: 500001,
        battle_init_minimap: 500002,
        battle_enter_new_map: 500003,
        battle_mpa_loaded: 500004,
        web_ad_140001: 140001,
        web_ad_140002: 140002,
        web_ad_140021: 140021,
        web_ad_146001: 146001,
        web_notice_activity_seven_day_target_buy_shop: 160041,
        web_function_unlock_96001: 96001,
        web_function_unlock_96002: 96002,
        web_xsyd_flag: 96003,
        req_advert_data: 270014,
        rec_advert_data: 276005,
        web_advert_award: 270004,
        web_rpk_award0: 190002,
        rec_rpk_award1: 196001,
        web_wx_share_daily_status: 300000,
        web_wx_share_daily_success: 300001,
        web_wx_share_invite_info: 300002,
        web_wx_share_invite_reward: 300003,
        web_wx_share_invite_notice: 300004,
        web_wx_share_invite_list: 300005,
        web_wx_share_daily_reward: 300006,
        web_ding_yue_switch: 130035,
        web_ding_yue_info: 130036,
        web_ding_yue_close_reset: 130037
      });
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Monster.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './GameConfig.ts', './ModuleDef.ts', './MonitorType.ts', './MonsterModelFrameAnimation.ts', './Utils.ts', './MonsterAI.ts', './BattleDefine.ts', './RoleBase.ts', './MonsterVO.ts', './BattleProprMgr.ts', './SkillVO.ts', './MonsterSkill.ts', './BattleBigMap.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Label, Node, UITransform, Vec3, UIOpacity, v3, sp, GameConfig, ModuleDef, MonitorType, MonsterModelFrameAnimation, Utils, MonsterAI, GameBattle, RoleBase, MonsterVO, FormulaResultItem, SkillBuffTiggerTime, SkillType, RoleSkillsNames, MonsterSkill, BattleBigMap, App, BattleUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Node = module.Node;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
      UIOpacity = module.UIOpacity;
      v3 = module.v3;
      sp = module.sp;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      MonsterModelFrameAnimation = module.MonsterModelFrameAnimation;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonsterAI = module.MonsterAI;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      MonsterVO = module.MonsterVO;
    }, function (module) {
      FormulaResultItem = module.FormulaResultItem;
    }, function (module) {
      SkillBuffTiggerTime = module.SkillBuffTiggerTime;
      SkillType = module.SkillType;
      RoleSkillsNames = module.RoleSkillsNames;
    }, function (module) {
      MonsterSkill = module.MonsterSkill;
    }, function (module) {
      BattleBigMap = module.BattleBigMap;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "208e52lbClCNrAcUnnXpEp6", "Monster", undefined);
      // import { PaTaBuffTarget } from 'db://assets/script/game_moudle/game_select_level/PataManager';

      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 怪物
       */
      var Monster = exports('Monster', (_dec = ccclass("Monster"), _dec2 = property({
        type: MonsterModelFrameAnimation
      }), _dec3 = property(Label), _dec4 = property(Node), _dec5 = property(UITransform), _dec6 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_RoleBase) {
        _inheritsLoose(Monster, _RoleBase);
        function Monster() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleBase.call.apply(_RoleBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "view", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTitle", _descriptor2, _assertThisInitialized(_this));
          // @property(sp.Skeleton)
          // skillYuJing: sp.Skeleton = null
          _initializerDefineProperty(_this, "imgYingZi", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hitBox", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "uiNode", _descriptor5, _assertThisInitialized(_this));
          _this._monsterAI = new MonsterAI();
          /**是否可以跟随 */
          _this.behaviorFollowFlag = false;
          _this._isShowWarning = false;
          _this._tempSkillTimes = 0;
          _this._dt = 0;
          _this._AIdt = 0;
          _this._endActionNames = ["Hookend"];
          _this.followType = 0;
          /**
           * 仅仅死亡不携带掉落
           */
          _this._dieOnlyAni = false;
          // 奇偶帧分组
          _this._updateGroup = 0;
          _this._isRealMonster = false;
          /**
           * 刷新角色朝向
           */
          _this._targetDir = new Vec3();
          return _this;
        }
        var _proto = Monster.prototype;
        _proto._init = function _init() {
          this.view.init();
          this.view.owne = this;
          this._monsterAI.pause = false;
          this._monsterAI.stateLock = false;
          this._isDead = false;
          this.type = GameBattle.RoleType.Monster;
          this._roleVO = new MonsterVO();
          this._roleSkill = new MonsterSkill();
          this.resetSpineEvent();
        }

        /** 设置动画回调事件 */;
        _proto.resetSpineEvent = function resetSpineEvent() {
          var _this2 = this;
          this.view.clearAllHandler();
          this.view.setCompleteHandler(function (trace) {
            var eventName = trace["name"];
            if (eventName === "Attack") {
              _this2._monsterAI.stateLock = false;
              if (_this2.state.isAttacking()) {
                _this2.state.exitType(GameBattle.ActionState.Attack);
                _this2.atkSkill.end();
              }
              // this._monsterAI.stateLock = true;
              // this.atkSkill.use();
            } else if (eventName === _this2.curSkillName) {
              _this2.handleSkillComplete(true);
              // } else if (eventName === 'Hit') {
              //     this.state.exitType(GameBattle.ActionState.Affected);
            } else if (eventName === "Dead") {
              _this2.dead();
            }
          });
          this.view.setFrameEventHandler(function (param, _event) {
            // 兼容帧动画和spine动画。帧动画 param: { name, frame }, spine动画 param: spine对象
            var eventName;
            if (param && typeof param === "object") {
              if ("name" in param && typeof param.name === "string") {
                eventName = param.name; // 帧动画
              } else if ("constructor" in param && param.constructor && param.constructor.name && param.constructor.name.includes("TrackEntry")) {
                // 兼容spine
                eventName = param["name"];
              }
            }
            if (!eventName) return;
            if (eventName === "Attack") {
              if (_this2.state.isAttacking()) {
                if (_this2.roleVO.hide === 0) {
                  _this2.node.getComponent(UIOpacity).opacity = 255;
                  _this2.roleVO.hide = 1;
                  _this2.invulnerable = false;
                }
                _this2._monsterAI.stateLock = true;
                _this2.atkSkill.use();
              }
            } else if (eventName === _this2.curSkillName) {
              if (!_this2.curSkill) {
                return;
              }
              if (_this2.roleVO.hide === 0) {
                _this2.node.uiOpacity.opacity = 255;
                _this2.roleVO.hide = 1;
                _this2.invulnerable = false;
              }
              if (_this2._isDead) {
                _this2.curSkill.end();
                _this2.state.type = GameBattle.ActionState.Dead;
                _this2._monsterAI.stateLock = false;
                return;
              }

              //一个动作多次事件
              if (_this2._endActionNames.findIndex(function (val) {
                return val === eventName;
              }) !== -1) {
                return;
              }
              _this2.doRoleSkill(_this2.curSkill, eventName, _this2.roleVO.quality, eventName, function (_data) {
                _this2.curSkill.endCD();
                _this2.curSkill.use();
              });
            }
          });
          this.view.setStartHandler(function (trace) {
            var eventName = trace["name"];
            if (eventName === "Attack") {
              _this2._monsterAI.stateLock = true;
              _this2.showWarning(_this2.atkSkill);
              if (_this2.roleVO.hide === 0) {
                _this2.node.getComponent(UIOpacity).opacity = 255;
              }
            } else if (eventName === _this2.curSkillName) {
              if (!_this2.curSkill) {
                return;
              }
              _this2.publicSkillCd = _this2.roleVO.publicCD;
              var _this2$showWarning = _this2.showWarning(_this2.curSkill),
                dir = _this2$showWarning[0],
                targetPos = _this2$showWarning[1];
              _this2.curSkill.doMoveAction(dir, targetPos);
              _this2.curSkill.createBuff(SkillBuffTiggerTime.begin);
              if (_this2.roleVO.hide === 0) {
                _this2.node.getComponent(UIOpacity).opacity = 255;
              }
            } else if (eventName === "Dead") {
              // 血条消失
              _this2.hpBar.node.active = false;
              _this2.lbTitle.node.active = false;
            } else if (eventName === "Move") {
              if (_this2.roleVO.hide === 0) {
                _this2.node.getComponent(UIOpacity).opacity = 255;
              }
            }
          });
        }

        /**
         * 技能动画结束回调处理
         * @param force 强制执行
         * @returns
         */;
        _proto.handleSkillComplete = function handleSkillComplete(force) {
          if (force === void 0) {
            force = false;
          }
          if (!this.curSkill) {
            return;
          }
          //这里返回, 否则迂回和追踪技能会被打断
          if (this.curSkill && (this.curSkill.type === SkillType.YuHui || this.curSkill.type === SkillType.ZhuiZong) && !force) {
            return;
          }
          if (this._isDead) {
            this.state.exitType(GameBattle.ActionState.Skill);
            this._monsterAI.stateLock = false;
            this.curSkillName = "noSkill";
            this.curSkill.end();
            return;
          }
          this._tempSkillTimes--;
          if (this._tempSkillTimes > 0) {
            // this.state.exitType(GameBattle.ActionState.Skill)
            // this.curSkillName = ''
            this.curSkill.endAction();
            if (this.needFlip) {
              this.view.isFlipX = this.node.position.x < this.curSkill.getTarget().node.position.x;
            }
            // this.curSkill.use();
            this.state.setSkill(this.curSkill.arts_action, this.curSkill);
            // this.showWarning(this.curSkill);
            //再次开始
            return;
          }
          this.state.exitType(GameBattle.ActionState.Skill);
          this.curSkillName = "noSkill";
          this.curSkill.end();
          this._monsterAI.stateLock = false;
        };
        _proto.updtNameShow = function updtNameShow() {
          var quality = this.roleVO.quality;
          if (quality === GameBattle.MonsterQuality.Boss) {
            this.lbTitle.node.active = false;
            this.hpBar.node.active = true;
          } else {
            this.hpBar.node.active = false;
            this.lbTitle.node.active = App.mixMgr.getGameSet("bName");
          }
        };
        _proto.reuse = function reuse(_monsterId) {
          var _this3 = this;
          _RoleBase.prototype.reuse.call(this, _monsterId);
          this._updateGroup = Math.floor(Math.random() * 2);
          this.dieOnlyAni = false;
          this.setLoadCompleted(this.monsterLoadCompleted);
          this._loadView( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var s, vo, bodyPos;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _this3.isUsable = true;
                  _this3.state.init(_this3.view);
                  // 对于帧动画，使用sprite_body属性，没有skeleton和bone的概念
                  // 直接设置默认的击中位置
                  _this3.hitPos = v3(0, _this3.view.height / 2);
                  s = _this3.roleVO.size / 10000;
                  _this3.imgYingZi.setScale(s, s, s);
                  if (_this3.view) {
                    _this3.view.node.setScale(s, s, s);
                    _this3.view.isFlipX = false;
                  }
                  vo = _this3._roleVO; // vo.curHP = 10000;
                  _this3.lbTitle.string = vo.title;
                  _this3._buffBox.init(_this3);
                  _this3.hitBox.width = _this3.roleVO.crash_box[0] * s;
                  _this3.hitBox.height = _this3.roleVO.crash_box[1] * s;
                  bodyPos = _this3.view.sprite_body.node.getPosition();
                  _this3.view.sprite_body.node.setPosition(v3(bodyPos.x + _this3.roleVO.offset[0], bodyPos.y + _this3.roleVO.offset[1]));

                  // 动态设置血条位置：根据Idle动画帧高度
                  _context.next = 15;
                  return _this3.updateHpBarPosition();
                case 15:
                  _this3.lbTitle.node.y = _this3.hpBar.node.y + 30;
                  _this3._join();
                  _this3.loadCompleted == null || _this3.loadCompleted(_this3);
                  _this3.resetSpineEvent();
                  App.log.logBusiness("Monster isDead: " + _this3.isDead);
                //console.log('this.view.height', this.view.height);
                case 20:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          })));
          this._bornInit();
          App.battleMgr.skillCtrl.addAtkSkill(this, this.atkSkill);
          this.hpBar.owner = this;
          this.hpBar.node.active = true;
          this._lockTargetCtrl.range = this.roleVO.lockRange;
          {
            this.hitBox.node.children[0].active = GameConfig.DebugInfo.showMonsterBox || GameConfig.DebugInfo.showAllBox;
          }
          this._lockTargetCtrl.owner = this;
          this._lockTargetCtrl.setChangeHandler(this._onChangeLockTarget.bind(this));
          this.updtNameShow();
          this.addInitBuff();
          // this.uiNode.setParent(App.battleMgr.battleMainViewCtrl.monsterUiLayer);
        };

        _proto.monsterLoadCompleted = function monsterLoadCompleted() {
          this._monsterAI.load(this);

          // 检测周围100范围内是否有我方敌人
          // this.detectEnemyAndAttack();
        }

        /**
         * 检测周围敌人并发起攻击
         */;
        _proto.detectEnemyAndAttack = function detectEnemyAndAttack() {
          var _App$dungeonBattleMgr;
          if (this._lockTargetCtrl.target && !this._lockTargetCtrl.target.isDead) {
            // 检查是否有新的目标距离更近，目标变更为最近距离的
            var _range = this.roleVO.lockRange[1] || 1100;
            var _enemies = this.getNearbyEnemies(_range);
            if (_enemies.length > 0) {
              // 找到距离最近的敌人
              var currTarget = this._lockTargetCtrl.target;
              var monsterPos = this.node.worldPosition;
              var currDistance = currTarget ? Vec3.distance(monsterPos, currTarget.node.worldPosition) : Number.POSITIVE_INFINITY;
              var minEnemy = currTarget;
              var minDistance = currDistance;
              for (var _iterator = _createForOfIteratorHelperLoose(_enemies), _step; !(_step = _iterator()).done;) {
                var enemy = _step.value;
                if (!enemy || !enemy.node || !enemy.node.active || enemy.isDead) continue;
                var dist = Vec3.distance(monsterPos, enemy.node.worldPosition);
                if (dist < minDistance) {
                  minEnemy = enemy;
                  minDistance = dist;
                }
              }
              // 如果有更近的目标，则切换目标
              if (minEnemy !== currTarget && minEnemy !== null) {
                this._lockTargetCtrl.target = minEnemy;
              }
            }
            this._monsterAI.moveToTarget(this._lockTargetCtrl.target);
            return;
          }
          // 获取周围范围内的我方敌人
          var range = this.roleVO.lockRange[1] || 1100; //lockRange被初始化了，待查
          var enemies = this.getNearbyEnemies(range);
          if (enemies.length > 0) {
            this._monsterAI.clearCityTarget();
            // 锁定第一个敌人作为目标
            var target = enemies[0];
            this._lockTargetCtrl.target = target;

            // 移动到目标点范围并攻击
            this._monsterAI.moveToTarget(target);
          } else if ((_App$dungeonBattleMgr = App.dungeonBattleMgr) != null && _App$dungeonBattleMgr.city && !App.dungeonBattleMgr.city.isDead) {
            this._monsterAI.moveToCity();
          } else {
            var _App$dungeonBattleMgr2;
            // 如果城池已死亡或战斗已结束，停止移动（不返回出生点）
            if ((_App$dungeonBattleMgr2 = App.dungeonBattleMgr) != null && (_App$dungeonBattleMgr2 = _App$dungeonBattleMgr2.city) != null && _App$dungeonBattleMgr2.isDead) {
              this.exitMove();
              return;
            }
            // 如果没有敌人且城池还活着，执行巡逻
            this._monsterAI.patrol();
          }
        }

        /**
         * 获取周围指定范围内的我方敌人
         * @param range 检测范围
         * @returns 敌人数组
         */;
        _proto.getNearbyEnemies = function getNearbyEnemies(range) {
          if (!range) range = 1100;
          var enemies = [];
          var monsterPos = this.node.worldPosition;

          // 从战斗管理器获取所有我方角色（敌人）
          if (App.dungeonBattleMgr) {
            // 获取所有士兵
            var soldiers = App.dungeonBattleMgr.deployedSoldiers;
            for (var _iterator2 = _createForOfIteratorHelperLoose(soldiers), _step2; !(_step2 = _iterator2()).done;) {
              var soldierList = _step2.value;
              for (var _iterator4 = _createForOfIteratorHelperLoose(soldierList[1]), _step4; !(_step4 = _iterator4()).done;) {
                var soldier = _step4.value;
                if (soldier && soldier.node.active && !soldier.isDead) {
                  var distance = Vec3.distance(monsterPos, soldier.node.worldPosition);
                  // App.log.logBusiness("从战斗管理器获取所有我方角色（敌人）distance:" + distance + "==range==" + range);
                  if (distance <= range) {
                    enemies.push(soldier);
                  }
                }
              }
            }

            // 获取已部署的英雄
            var heroes = App.dungeonBattleMgr.deployedHeroes;
            for (var _iterator3 = _createForOfIteratorHelperLoose(heroes), _step3; !(_step3 = _iterator3()).done;) {
              var heroArr = _step3.value;
              var hero = heroArr[1];
              if (hero && hero.node.active && !hero.isDead) {
                var _distance = Vec3.distance(monsterPos, hero.node.worldPosition);
                if (_distance <= range) {
                  enemies.push(hero);
                }
              }
            }
          }

          // 按距离排序，最近的敌人排在前面
          enemies.sort(function (a, b) {
            var distA = Vec3.distance(monsterPos, a.node.worldPosition);
            var distB = Vec3.distance(monsterPos, b.node.worldPosition);
            return distA - distB;
          });
          return enemies;
        };
        _proto.addInitBuff = function addInitBuff() {
          var initBuffList = this.roleVO.init_buff_id;
          if (initBuffList) {
            for (var index = 0; index < initBuffList.length; index++) {
              var element = initBuffList[index];
              this._buffBox.addBuff(element, this);
            }
          }
        };
        _proto.recovery = function recovery() {
          // this.uiNode.setParent(this.node)
          this.curSkill = null;
          this.curSkillName = "noSkill";
          if (this.view) {
            this.view.clearAllHandler();
          }
          _RoleBase.prototype.recovery.call(this);
        };
        _proto.onUpdate = function onUpdate(dt) {
          _RoleBase.prototype.onUpdate.call(this, dt);
          this.publicSkillCd -= dt;
          if (this.roleVO.survivaltime > 0) {
            this.roleVO.survivaltime -= dt;
            if (this.roleVO.survivaltime < 0) {
              this.roleVO.updateCurHP(0, true);
              this._monsterAI.doDead();
            }
          }
          this._dt += dt;
          if (this._dt > 1) {
            //buff属性
            this.execBattleBufferAtti();
            this._dt = 0;
          }

          //寻路降帧 大概3帧一次
          this._AIdt += dt;
          if (this._AIdt > 0.04) {
            if (!App.battleMgr.isInBattle() || App.battleMgr.getCurrentFrame() === this._updateGroup) {
              this._monsterAI.onUpdate(this._AIdt);
            }
            this._AIdt = 0;
          }
          {
            this.hitBox.node.children[0].active = GameConfig.DebugInfo.showMonsterBox || GameConfig.DebugInfo.showAllBox;
          }
          this.detectEnemyAndAttack();
        };
        _proto.useSkill = function useSkill(skill) {
          _RoleBase.prototype.useSkill.call(this, skill);
          this._tempSkillTimes = skill.use_time;
        };
        _proto._loadView = function _loadView(_onCompleted, _onFaild) {
          var _this4 = this;
          // 统一使用帧动画加载方式
          this.view.loadAnimationData(this._roleVO.viewPath, function () {
            _this4.initStateMachine();
            _onCompleted && _onCompleted();
          }, _onFaild);
        }

        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.hitBox.getBoundingBoxToWorld();
        };
        _proto._onChangeLockTarget = function _onChangeLockTarget() {};
        _proto.attack = function attack() {
          _RoleBase.prototype.attack.call(this);
        };
        _proto.underAttack = function underAttack(damage, attrType, hit_effect, hit_type, attrUser) {
          // if (DEBUG) {
          //     if (GameConfig.DebugInfo.monsterDmgReduce) {
          //         damage = -1;
          //     }
          //     if (GameConfig.DebugInfo.monsterDmgMax) {
          //         damage *= 1000000000;
          //     }
          // }
          if (this.invulnerable) {
            return this.roleVO.curHP;
          }
          if (!this.isUsable) {
            return 0;
          }
          // let oweHp = super.underAttack(damage, attrType, hit_effect, hit_type);
          // if (this.roleVO.quality !== GameBattle.MonsterQuality.Boss) {
          //     this.state.type = GameBattle.ActionState.Affected;
          // }
          // if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.MuZhuang) {
          //     App.trialManager.totalMuZhuangHit += Math.floor(damage);
          // }

          // this._showDamageTips(damage, attrType, hit_type);
          var oweHp = _RoleBase.prototype.underAttack.call(this, damage, attrType, hit_effect, hit_type, attrUser);

          // 闪白
          if (hit_type !== FormulaResultItem._sanbi) {
            Utils.flashWhite(this.view.sprite_body.node);
          }
          this.hpBar.refreshUI();
          if (this.roleVO.curHP <= 0) {
            this._monsterAI.stateLock = false;
            this.isUsable = false;
            App.monitorMgr.dispatchEvent(MonitorType.battle_monster_die, this, attrUser);
            this.dead(); // 调用死亡方法移除模型
          }

          return oweHp;
        };
        _proto._tryAttack = function _tryAttack(dt, _force) {
          _RoleBase.prototype._tryAttack.call(this, dt);
        };
        _proto.end = function end() {
          _RoleBase.prototype.end.call(this);
        };
        _proto.dead = function dead() {
          if (this.roleVO.quality === GameBattle.MonsterQuality.Boss) {
            App.battleMgr.bossIsDead = true;
          }
          this._isDead = true;
          if (this.curSkill) {
            this.curSkill.end();
          }
          if (this.view) {
            this.view.reset();
          }
          this.node.removeFromParent();
          _RoleBase.prototype.dead.call(this);
        };
        _proto.doDead = function doDead() {
          this._monsterAI.stateLock = false;
          this.roleVO.curHP = 0;
          this.roleVO.updateCurHP(0, true);
          this._monsterAI.doDead();
        };
        _proto.getFirePosition = function getFirePosition(dummy_pos) {
          var skeleton = this.view.sprite_body;
          if (!dummy_pos || dummy_pos.length === 0) {
            return skeleton.node.worldPosition;
          }
          // const bone = skeleton.findBone(dummy_pos);
          // if (!bone) {
          return skeleton.node.worldPosition;
          // }
          // 获取骨骼的局部坐标（相对于Skeleton的坐标）
          // this._tempV3_1.set(bone.worldX, bone.worldY, 0);
          // skeleton.node.uiTransform?.convertToWorldSpaceAR(this._tempV3_1, this._tempV3_2);

          // return this._tempV3_2;
        }

        /**
         * 播放预警
         */;
        _proto.showWarning = function showWarning(skill, _cb) {
          var _skill$warning_effect;
          if (!skill) {
            return [null, null];
          }
          if (((_skill$warning_effect = skill.warning_effect) == null ? void 0 : _skill$warning_effect.length) > 0) {
            // skill.skillState = Skill_State.Doing;
            // this._monsterAI.holdState = true;
            this._isShowWarning = true;

            // eslint-disable-next-line @typescript-eslint/no-this-alias
            var that = this;
            var skillWarningNode = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillWarning);
            var seklton = skillWarningNode.getComponent(sp.Skeleton);
            var path = "SkillEffect/YuJing/" + skill.warning_effect;
            var moveDirection = skill.getTarget().node.worldPosition.clone().subtract(skill.owner.node.worldPosition).normalize();
            if (skill.warning_target === 2) {
              //生成位置在敌人脚下
              var pos = skill.getTarget().node.worldPosition.clone();
              //根据参数在目标位置做偏移
              if (skill.warning_target_value && skill.warning_target_value.length > 0) {
                var dir = skill.warning_target_value[0];
                var dis = skill.warning_target_value[1];
                var offset = 0;
                //目标背后
                if (dir === 1) {
                  offset = skill.getTarget().view.isFlipX ? -dis : dis;
                  //目标面前
                } else if (dir === 2) {
                  offset = skill.getTarget().view.isFlipX ? dis : -dis;
                }
                //确认位置可达
                var tileSize = BattleBigMap.getInstance().tileSize;
                var count = Math.ceil(Math.abs(offset / tileSize));
                var sign = -Math.sign(offset);
                for (var index = 0; index < count; index++) {
                  var checkOffset = offset + index * tileSize * sign;
                  if (!App.mapMgr.checkBlock(v3(pos.x + checkOffset, pos.y, 0))) {
                    pos.x += checkOffset;
                    break;
                  }
                }
              }
              skillWarningNode.worldPosition = pos;
              skill.targetPos = skillWarningNode.worldPosition.clone();
            } else {
              skillWarningNode.worldPosition = that.node.worldPosition;
              // skillWarningNode.worldPosition = that.getFirePosition();
            }

            App.resMgr.loadAsset(ModuleDef.SPINE, path, sp.SkeletonData, null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, res) {
              var warningLayer, redian, angle, spine, animsEnum, name;
              return _regeneratorRuntime().wrap(function _callee2$(_context2) {
                while (1) switch (_context2.prev = _context2.next) {
                  case 0:
                    if (!err) {
                      _context2.next = 3;
                      break;
                    }
                    console.error(err);
                    return _context2.abrupt("return");
                  case 3:
                    if (that.checkValid()) {
                      _context2.next = 5;
                      break;
                    }
                    return _context2.abrupt("return");
                  case 5:
                    seklton.skeletonData = res;
                    warningLayer = App.battleMgr.battleMainViewCtrl.warningLayer;
                    warningLayer.addChild(skillWarningNode);
                    that._weaponDir = moveDirection;
                    redian = Math.atan2(moveDirection.y, moveDirection.x);
                    angle = redian / Math.PI * 180;
                    skill.weaponDir = moveDirection;
                    skill.weaponAngle = angle;
                    skillWarningNode.angle = angle;
                    skillWarningNode.scale_x = 1;
                    skillWarningNode.scale_y = 1;
                    skillWarningNode.active = true;
                    if (skill.warning_proportion) {
                      skillWarningNode.setScale(skill.warning_proportion[0], skill.warning_proportion[1]);
                    }
                    spine = skillWarningNode.getComponent(sp.Skeleton);
                    animsEnum = spine.skeletonData.getAnimsEnum();
                    name = String(animsEnum[1]);
                    spine.setAnimation(0, name, false);
                    spine.setCompleteListener(function () {
                      spine.setCompleteListener(null);
                      skillWarningNode.active = false;
                      //回收
                      App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillWarning, skillWarningNode);
                      //预警播放完毕，开始boss动作
                      that._isShowWarning = false;
                    });
                  case 23:
                  case "end":
                    return _context2.stop();
                }
              }, _callee2);
            })));
            return [moveDirection, skill.targetPos];
          } else {
            return [null, null];
          }
        };
        _proto.doRoleSkill = function doRoleSkill(skillVo, actionName, _quality, eventName, cb) {
          //boss特殊技能

          // if (quality != GameBattle.MonsterQuality.Boss) {
          //     return;
          // }

          if (skillVo.type === SkillType.TuFuLaRen) {
            this.roleSkill.showHook(skillVo, actionName, null, eventName, cb);
          }
          switch (skillVo.skillID) {
            case RoleSkillsNames.JuliXuanFeng:
              cb && cb();
              break;
            // case RoleSkillsNames.RouGou:
            //     this.roleSkill.showHook(skillVo, actionName, null, eventName, cb);
            //     break;
            // case RoleSkillsNames.DuoCengRouGou:
            //     this.roleSkill.showHook(skillVo, actionName, null, eventName, cb);
            //     break;
            case RoleSkillsNames.DanGeZhenDangbo:
              cb && cb();
              break;
            case RoleSkillsNames.DuoCengZhenDangbo:
              cb && cb();
              break;
            case RoleSkillsNames.TufuBorn:
              cb && cb();
              this.roleSkill.TuFuBorn(skillVo, actionName, null);
              break;
            case RoleSkillsNames.CangBaiQiShiBorn:
              cb && cb();
              break;
            case RoleSkillsNames.KuangBao:
              cb && cb();
              break;
            case RoleSkillsNames.TianBengDiLie:
              cb && cb();
              break;
            case RoleSkillsNames.juDuPingzi:
              this.roleSkill.juDuPingzi(skillVo, actionName, null, eventName, cb);
              break;
            default:
              cb && cb();
          }
        };
        _proto._join = function _join() {
          if (this.roleVO.res_skin.length > 0) ;
        };
        _proto._bornInit = function _bornInit() {
          this.node.uiOpacity.opacity = 255;
          // 出生隐身+无敌
          if (this.roleVO.hide === 0) {
            this.node.uiOpacity.opacity = 0;
            this.invulnerable = true;
          }
        }

        /**
         * 是否为boss
         * @returns
         */;
        _proto.isBoss = function isBoss() {
          return this.roleVO.quality === GameBattle.MonsterQuality.Boss;
        };
        _proto._updateDirection = function _updateDirection(force) {
          if (force === void 0) {
            force = false;
          }
          // 检查是否可以转向
          if (!this.state.canTurn()) return;

          // 如果是怪物且正在攻击或施法，不改变方向
          if ((this.state.isAttacking() || this.state.isSkilling()) && !force) {
            return;
          }

          // 优先使用锁定目标的方向
          var target = this._lockTargetCtrl.target;
          if (target && target.node.active && this.alwaysFaceToTarget()) {
            this._targetDir.set(target.node.worldPosition);
            this._targetDir.subtract(this.node.worldPosition).normalize();
            if (this._targetDir.y !== 0 || force) {
              var direction = BattleUtil.analysisDirection(this._targetDir);
              if (direction !== GameBattle.Direction.None) {
                this.curDirection = direction;
              }
            }
          }
          // 否则使用面向方向
          else if (this._faceDirection.y !== 0) {
            var _direction = BattleUtil.analysisDirection(this._faceDirection);
            if (_direction !== GameBattle.Direction.None) {
              this.curDirection = _direction;
            }
          }
        }

        /**
         * 是否始终面向目标
         */;
        _proto.alwaysFaceToTarget = function alwaysFaceToTarget() {
          return true;
        };
        _proto.isRealMonster = function isRealMonster() {
          return this._isRealMonster;
        }

        // /**
        //  * 使用最大深度寻路的对象：boss，随从，宠物
        //  */
        // findPathUseMaxDeep() {
        //     return this.roleVO.quality === GameBattle.MonsterQuality.Boss;
        // }

        /**
         * 是否需要追击，怪物需要
         */;
        _proto.needZhuiJi = function needZhuiJi() {
          return true;
        }

        /**
         * 是否使用旧的加载spine方式，不释放。宠物、随从需要
         */;
        _proto.useOldLoadSpine = function useOldLoadSpine() {
          return false;
        }

        /**
         * 免疫吸附、拉怪
         */;
        _proto.immuneDrag = function immuneDrag() {
          return this.roleVO.immuneDrag;
        };
        _createClass(Monster, [{
          key: "roleVO",
          get: function get() {
            return this._roleVO;
          }
        }, {
          key: "roleSkill",
          get: function get() {
            return this._roleSkill;
          }
        }, {
          key: "dieOnlyAni",
          get: function get() {
            return this._dieOnlyAni;
          },
          set: function set(value) {
            this._dieOnlyAni = value;
          }
        }]);
        return Monster;
      }(RoleBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "view", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "lbTitle", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "imgYingZi", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "hitBox", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "uiNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterAI.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonsterFSM.ts', './CommonCfgUtil.ts', './BattleDefine.ts', './BaseAi.ts', './SkillVO.ts', './GameConfig.ts', './RoleBase.ts', './App.ts', './AxingManager.ts'], function (exports) {
  var _inheritsLoose, _createClass, _assertThisInitialized, cclegacy, Tween, Vec3, MonsterFSM, CommonCfgUtil, EShuoMingQuanJu, GameBattle, AI_BEHAVIOR, BaseAi, SkillType, GameConfig, RoleBase, App, FindPathDeepType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      Vec3 = module.Vec3;
    }, function (module) {
      MonsterFSM = module.MonsterFSM;
    }, function (module) {
      CommonCfgUtil = module.CommonCfgUtil;
      EShuoMingQuanJu = module.EShuoMingQuanJu;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      AI_BEHAVIOR = module.AI_BEHAVIOR;
      BaseAi = module.BaseAi;
    }, function (module) {
      SkillType = module.SkillType;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      FindPathDeepType = module.FindPathDeepType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a97a3aSKzxKyIwLE/XJDwqE", "MonsterAI", undefined);

      // Administrator:
      // 影响怪物AI行为
      // 1=木桩
      // 2=炮台
      // 3=近战莽夫
      // 4=远程莽夫

      var AI_TYPE = exports('AI_TYPE', /*#__PURE__*/function (AI_TYPE) {
        AI_TYPE[AI_TYPE["MUZHUANG"] = 1] = "MUZHUANG";
        AI_TYPE[AI_TYPE["PAOTAI"] = 2] = "PAOTAI";
        AI_TYPE[AI_TYPE["JINZHANMANGFU"] = 3] = "JINZHANMANGFU";
        AI_TYPE[AI_TYPE["YUANCHENGMANGFU"] = 4] = "YUANCHENGMANGFU";
        AI_TYPE[AI_TYPE["JINZHANWEISUO"] = 5] = "JINZHANWEISUO";
        AI_TYPE[AI_TYPE["YUANCHENGWEISUO"] = 6] = "YUANCHENGWEISUO";
        return AI_TYPE;
      }({}));
      /**
       * 怪物AI
       */
      var MonsterAI = exports('MonsterAI', /*#__PURE__*/function (_BaseAi) {
        _inheritsLoose(MonsterAI, _BaseAi);
        function MonsterAI() {
          var _this;
          _this = _BaseAi.call(this) || this;
          /** 出生点 */
          _this._homePoint = void 0;
          /** 巡逻半径 */
          _this._patrolRadius = 300;
          /** 锁敌脱战距离 */
          _this._targetDistance = 0;
          /** 出生点脱战距离 */
          _this._homeDistance = 0;
          /** 是否已脱战 */
          _this._isExitBattle = true;
          _this._monsterFSM = new MonsterFSM();
          _this.pursuitTime = 0;
          /** AI 类型 */
          _this._behaviors = [];
          _this._curBehavior = AI_BEHAVIOR.DAIJI;
          /** 状态检查函数 */
          _this._checkTypeFuncMap = {};
          /** 状态执行函数 */
          _this._doTypeFuncMap = {};
          // /** 持有者 */
          // protected _owner: Monster;
          // public get owner() { return this._owner; }
          // public set owner(v) {
          //     console.log('set owner')
          //     this._owner = v;
          // }
          _this._pause = false;
          /** 是否索敌中 */
          _this._locking = false;
          /** 是否是真实怪物 */
          // 玩家的召唤物和宠物不算真正的怪物
          _this._isRealMonster = false;
          /**
           * 状态保持
           */
          _this._stateLock = false;
          _this._curSkill = null;
          /** 最后一次使用的技能ID */
          _this.lastSkillId = 0;
          _this._testCanPursuit = -1;
          /** 共用向量 */
          _this._tempVec3 = new Vec3();
          /** 受击计时器 */
          _this._underAttackTimer = 0;
          _this._target = null;
          _this._maxLockRange = 0;
          // 相关变量
          _this._isTargetReached = false;
          _this._lastTarget = null;
          _this._frameCount = 0;
          /** 是否正在释放技能 */
          _this._isSkilling = false;
          _this._city = null;
          _this._cityTargetPos = null;
          _this._attackingCity = false;
          _this.testname = ["待机", "迂回", "脱战", "跟随", "追击", "攻击", "技能", "追逐宝箱", "开宝箱", "死亡"];
          _this._checkTypeFuncMap[AI_BEHAVIOR.ZHUIJI] = _this.checkPursuit.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.ZHUIJI] = _this.doPursuit.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.GONGJI] = _this.checkAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.GONGJI] = _this.doAttack.bind(_assertThisInitialized(_this));

          // this._checkTypeFuncMap[AI_BEHAVIOR.TUOZHAN] = this.checkExitBattle.bind(this);
          // this._doTypeFuncMap[AI_BEHAVIOR.TUOZHAN] = this.doExitBattle.bind(this);

          // this._checkTypeFuncMap[AI_BEHAVIOR.TUOZHAN] = this.checkExitBattle.bind(this)
          // this._doTypeFuncMap[AI_BEHAVIOR.TUOZHAN] = this.exitBattle.bind(this)

          _this._doTypeFuncMap[AI_BEHAVIOR.DAIJI] = _this.doDaiji.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.SIWANG] = _this.checkDead.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.SIWANG] = _this.doDead.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.SKILL] = _this.checkSkill.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.SKILL] = _this.doSkill.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.UNDERATTACK] = _this.checkUnderAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.UNDERATTACK] = _this.doUnderAttack.bind(_assertThisInitialized(_this));
          return _this;
        }
        var _proto = MonsterAI.prototype;
        _proto.onUpdate = function onUpdate(dt) {
          if (this.pursuitTime > 0) {
            this.pursuitTime -= dt;
            return;
          }
          if (this.stateLock) {
            return;
          }
          if (!this._owner || this.pause) {
            return;
          }

          // 更新受击计时器
          if (this._underAttackTimer > 0) {
            this._underAttackTimer -= dt;
            if (this._underAttackTimer <= 0) {
              this._underAttackTimer = 0;
            }
          }

          // 更新技能状态
          if (this._isSkilling && !this._owner.state.isSkilling()) {
            this._isSkilling = false;
          }
          var type = AI_BEHAVIOR.DAIJI;
          this._owner.behaviorFollowFlag = true;
          for (var i = this._behaviors.length; i--;) {
            var behavior = this._behaviors[i];
            var checkFunc = this._checkTypeFuncMap[behavior];
            if (checkFunc() && behavior >= this._curBehavior) {
              type = behavior;
              break;
            }
          }
          if (type === AI_BEHAVIOR.DAIJI && this._owner && this._owner.lockTargetCtrl.target && !this._owner.lockTargetCtrl.target.isDead) {
            return;
          }
          if (type !== this._curBehavior) {
            this._curBehavior = type;
          }
          if (this._doTypeFuncMap[type]) {
            this._doTypeFuncMap[type]();
          }
        };
        _proto.load = function load(owner) {
          var _App$dungeonBattleMgr, _App$dungeonBattleMgr2;
          _BaseAi.prototype.init.call(this, owner);
          this._owner = owner;
          this._targetDistance = CommonCfgUtil.getCommonCfgValue(EShuoMingQuanJu.ExitBattleTargetDistance);
          this._homeDistance = CommonCfgUtil.getCommonCfgValue(EShuoMingQuanJu.ExitBattleHomeDistance);
          this._monsterFSM.owner = owner;
          this._homePoint = this._owner.node.worldPosition.clone();
          this._city = (_App$dungeonBattleMgr = (_App$dungeonBattleMgr2 = App.dungeonBattleMgr) == null ? void 0 : _App$dungeonBattleMgr2.city) != null ? _App$dungeonBattleMgr : null;
          this._attackingCity = false;
          this._cityTargetPos = null;
          var aiType = this._owner.roleVO.AIType;
          this._behaviors = [];
          this._testCanPursuit = -1;

          // 其他类型怪物
          this._behaviors.push(AI_BEHAVIOR.ZHUIJI);
          this._behaviors.push(AI_BEHAVIOR.SKILL);
          if (owner.atkSkill.skillID !== 0) {
            //skillid为0则是为了不放普攻
            this._behaviors.push(AI_BEHAVIOR.GONGJI);
          }
          this._behaviors.push(AI_BEHAVIOR.SIWANG);
          this._locking = false;
          this._isRealMonster = owner.isRealMonster();
          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.None) {
            this._maxLockRange = 1000000;
          } else {
            this._maxLockRange = this._owner.roleVO.lockRange[1];
          }
        }

        /**
         * 检测死亡
         */;
        _proto.checkDead = function checkDead() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          return this._owner.roleVO.curHP <= 0;
        }

        /**
         * 播放死亡动画
         */;
        _proto.doDead = function doDead() {
          this._owner.exitMove();
          Tween.stopAllByTarget(this._owner.node);
          this._owner.state.type = GameBattle.ActionState.Dead;
          this._owner.isUsable = false;
          if (this._owner.isBoss()) {
            App.battleMgr.bossIsDead = true;
          }
        }

        /**
         * 待机
         */;
        _proto.doDaiji = function doDaiji() {
          // 即使在待机状态，也要检查是否需要避让
          var avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
          // App.log.logBusiness("怪物执行待机动作");
          if (avoidanceForce && (avoidanceForce.x !== 0 || avoidanceForce.y !== 0)) {
            // 如果有避让力，应用位置调整
            var ownerPos = this._owner.node.worldPosition;
            var newPos = ownerPos.clone().add(avoidanceForce.multiplyScalar(1.0)); // 完整应用避让力
            this._owner.node.worldPosition = newPos;
          }
          this._owner.moveDirection.set(0, 0, 0);
          this._owner.state.clearType();
          // this.owner.view.play('Idle', true)
        }

        /**
         * 检查重叠并返回避让力（不改变移动方向，只返回避让向量）
         */;
        _proto.checkOverlapAndGetAvoidanceForce = function checkOverlapAndGetAvoidanceForce() {
          var _this2 = this;
          var ownerPos = this._owner.node.worldPosition;
          var avoidanceRadius = 60; // 避让半径
          var avoidanceForce = new Vec3(0, 0, 0);
          var nearbyCount = 0;

          // 检查附近的友军（其他怪物）
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            if (entity.type === GameBattle.RoleType.Monster && entity.uid !== _this2._owner.uid) {
              var distance = Vec3.distance(entity.node.worldPosition, ownerPos);

              // 只在非常近的时候才推开
              if (distance < avoidanceRadius && distance > 0.1) {
                var repulsion = ownerPos.clone().subtract(entity.node.worldPosition);
                repulsion.normalize();

                // 距离越近，排斥力越大（使用更陡峭的曲线）
                var strength = (avoidanceRadius - distance) / avoidanceRadius;

                // 非常近时使用指数增强
                if (distance < 30) {
                  strength = Math.pow(strength, 2); // 平方
                  repulsion.multiplyScalar(strength * 5); // 5倍排斥力
                } else {
                  strength = Math.pow(strength, 3); // 三次方
                  repulsion.multiplyScalar(strength * 3); // 3倍排斥力
                }

                avoidanceForce.add(repulsion);
                nearbyCount++;
              }
            }
            return false;
          });
          return nearbyCount > 0 ? avoidanceForce : null;
        }

        /**
         * 攻击
         */;
        _proto.doAttack = function doAttack() {
          if (this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.isAttacking()) {
            // 即使在攻击状态，也要检查是否需要避让
            var _avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
            if (_avoidanceForce && (_avoidanceForce.x !== 0 || _avoidanceForce.y !== 0)) {
              var ownerPos = this._owner.node.worldPosition;
              var newPos = ownerPos.clone().add(_avoidanceForce.multiplyScalar(1.0));
              this._owner.node.worldPosition = newPos;
            }
            return;
          }

          // 攻击前也检查避让
          var avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
          if (avoidanceForce && (avoidanceForce.x !== 0 || avoidanceForce.y !== 0)) {
            var _ownerPos = this._owner.node.worldPosition;
            var _newPos = _ownerPos.clone().add(avoidanceForce.multiplyScalar(1.0));
            this._owner.node.worldPosition = _newPos;
          }
          if (this._attackingCity) {
            if (!this._isTargetReached) {
              return;
            }
          }
          this._owner.updateAttackInterval();
          this._owner.exitMove();
          this._owner.state.type = GameBattle.ActionState.Attack;
          this.atkUseTime++;
          if (this._owner.needFlip && this.target) {
            this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
          }
        }
        /**
         * 检测能否攻击
         */;
        _proto.checkAttack = function checkAttack() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 先检查是否正在攻击
          if (this._owner.state.isAttacking()) {
            // 如果正在攻击，检查目标是否还有效（攻击城墙除外）
            if (!this._attackingCity && (!this.target || this.target.isDead || !this.target.checkValid())) {
              var _this$_owner$atkSkill;
              // 目标已死亡或无效，停止攻击
              this._owner.state.exitType(GameBattle.ActionState.Attack);
              (_this$_owner$atkSkill = this._owner.atkSkill) == null || _this$_owner$atkSkill.end();
              this.findNearestEnemy();
              return false;
            }
            return true;
          }
          if (this._attackingCity) {
            return true;
          }
          if (this._owner.state.isSkilling()) {
            //已经在放技能了
            return false;
          }

          // 检查目标是否有效，如果目标死亡则重新寻找（攻击城墙除外）
          if (!this._attackingCity && (!this.target || this.target.isDead || !this.target.checkValid())) {
            this.findNearestEnemy();
            if (!this.target && !this._attackingCity) {
              return false;
            }
          }
          var ret = this._owner.checkAttack();
          if (ret) {
            this._owner.behaviorFollowFlag = false;
          } else {
            this._isTargetReached = false;
            this.moveToTarget(this.target);
          }
          return ret;
        }

        //强制技能
        ;

        _proto.forceSkill = function forceSkill(id) {
          // 检查状态
          if (this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.isSkilling()) {
            return;
          }

          // 获取技能
          var skill = App.battleMgr.skillCtrl.getSkill(this._owner.uid, id);
          if (!skill || !skill.checkCD() || !skill.checkRange()) {
            return;
          }

          // 记录技能释放日志
          if (GameConfig.DebugInfo.showMonsterSkillLog) {
            console.log("\u602A\u7269\u5F3A\u5236\u91CA\u653E\u6280\u80FD: " + skill.skillID + ", \u7C7B\u578B: " + SkillType[skill.type]);
          }

          // 标记为正在释放技能
          this._isSkilling = true;

          // 停止移动
          this._owner.exitMove();

          // 根据技能类型处理
          if (skill.type === SkillType.YuHui) {
            // 迂回类技能直接使用
            skill.use();
          } else {
            // 其他类型技能更新使用时间
            if (skill.checkUpdateUseTime()) {
              this.skillUseTime++;
            }
          }

          // 使用技能
          this._owner.useSkill(skill);

          // 设置技能状态和动作
          this._owner.state.setSkill(skill.arts_action, skill);

          // 记录最后使用的技能ID
          this.lastSkillId = skill.skillID;

          // 调整朝向
          if (this._owner.needFlip && this.target) {
            this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
          }
        }
        /**
         * 释放技能
         */;
        _proto.doSkill = function doSkill() {
          // 检查各种状态限制
          if (this._owner.state.isSkilling() || this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.type === GameBattle.ActionState.Skill || !this.target) {
            return;
          }

          // 获取要释放的技能
          var skill = this._curSkill;

          // 再次检查技能是否有效
          if (!skill || !skill.checkCD() || !skill.checkRange()) {
            // 如果当前技能无效，尝试获取新的可用技能
            skill = this._owner.getUsableSkill();
            if (!skill || !skill.checkCD() || !skill.checkRange()) {
              return;
            }
            this._curSkill = skill;
          }

          // 记录技能释放日志
          if (GameConfig.DebugInfo.showMonsterSkillLog) {
            console.log("\u602A\u7269\u91CA\u653E\u6280\u80FD: " + skill.skillID + ", \u7C7B\u578B: " + SkillType[skill.type]);
          }

          // 停止移动
          this._owner.exitMove();

          // 标记为正在释放技能
          this._isSkilling = true;

          // 根据技能类型处理
          if (skill.type === SkillType.YuHui) {
            // 迂回类技能直接使用
            skill.use();
          } else {
            // 其他类型技能更新使用时间
            if (skill.checkUpdateUseTime()) {
              this.skillUseTime++;
            }

            // 播放技能预警（如果需要）
            // this._owner.showWarning(skill, () => {});
          }

          // 使用技能
          this._owner.useSkill(skill);

          // 设置技能状态和动作
          this._owner.state.setSkill(skill.arts_action, skill);

          // 记录最后使用的技能ID
          this.lastSkillId = skill.skillID;

          // 调整朝向
          if (this._owner.needFlip && this.target) {
            this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
          }

          // 清除当前技能引用
          this._curSkill = null;
        }

        /**
         * 检测能否释放技能
         */;
        _proto.checkSkill = function checkSkill() {
          // 检查战斗状态
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 重置当前技能
          this._curSkill = null;

          // 如果正在释放技能，直接返回true
          if (this._owner.state.isSkilling() || this._isSkilling) {
            return true;
          }

          // 检查是否有可用目标
          if (!this.target || !this.target.isAlive()) {
            return false;
          }

          // 获取可用技能
          var skill = this._owner.getUsableSkill();
          if (!skill) {
            return false;
          }

          // 检查技能是否在冷却中
          if (!skill.checkCD()) {
            return false;
          }

          // 检查技能是否在范围内
          if (!skill.checkRange()) {
            return false;
          }

          // 检查怪物是否可以使用技能（能量/怒气等）
          if (!this._owner.canUseSkill(skill)) {
            return false;
          }

          // 设置当前技能
          this._curSkill = skill;

          // 记录最后一次检查到的可用技能ID
          this.lastSkillId = skill.skillID;

          // 如果是迂回类技能，优先释放
          if (skill.type === SkillType.YuHui) {
            return true;
          }

          // 如果技能没有动作动画，可以直接释放，无需等待普攻结束
          if (skill.arts_action.length === 0) {
            return true;
          }

          // 有技能动作时，需要检查是否正在进行普通攻击
          // 如果正在攻击，可以等待攻击动作结束后再释放技能
          // 这里可以添加更多的策略，比如某些重要技能可以打断普通攻击
          return !this._owner.state.isAttacking();
        }

        /**
         * 脱战
         * @returns
         */;
        _proto.doExitBattle = function doExitBattle() {}
        /**
         * 检测脱战
         * @returns
         */;
        _proto.checkExitBattle = function checkExitBattle() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          if (this._testCanPursuit > 0) return false;
          if (this._isRealMonster) {
            //怪物索敌后只有超出脱战范围才会脱战
            var target = this._owner;
            if (target) {
              //有目标, 但超出了攻击范围 脱战
              this._tempVec3.set(target.node.worldPosition);
              var targetDistance = this._tempVec3.subtract(this._owner.node.worldPosition).length();
              if (targetDistance > this._targetDistance) {
                this._locking = false;
                // console.log(`脱战22222222222原因.有目标, 但超出了攻击范围 脱战 ${targetDistance} ${this._targetDistance} 类型:${this._owner.roleVO.quality}`)
                return true;
              }
            }
          } else {
            var _target = this._owner.lockTargetCtrl.target;
            this._tempVec3.set(this._owner.node.worldPosition);
            var homeDistance = this._tempVec3.subtract(this._homePoint).length();
            if (homeDistance > this._homeDistance) {
              //不在锁敌范围里 脱战
              // console.log(`脱战原因.不在锁敌范围里 脱战`)
              this._locking = false;
              return true;
            }
            if (!_target && homeDistance > 10) {
              //没有目标， 又离开了出生地 脱战
              // console.log(`脱战原因.没有目标 ${homeDistance}`)
              this._locking = false;
              return true;
            }
            if (_target) {
              //有目标, 但超出了攻击范围 脱战
              this._tempVec3.set(_target.node.worldPosition);
              var _targetDistance = this._tempVec3.subtract(this._owner.node.worldPosition).length();
              if (_targetDistance > this._targetDistance) {
                // console.log(`脱战原因.有目标, 但超出了攻击范围 脱战 ${targetDistance} ${this._targetDistance} 类型:${this._owner.roleVO.quality}`)
                this._locking = false;
                return true;
              }
            }
          }
          return false;
        }

        /**
         * 设置受击状态
         * @param duration 持续时间
         */;
        _proto.setUnderAttack = function setUnderAttack(duration) {
          if (duration === void 0) {
            duration = 0.3;
          }
          this._underAttackTimer = duration;
          // 取消技能释放状态
          this._isSkilling = false;
          this._doTypeFuncMap[AI_BEHAVIOR.UNDERATTACK]();
        }

        /**
         * 检测是否处于受击状态
         */;
        _proto.checkUnderAttack = function checkUnderAttack() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果受击计时器大于0，则处于受击状态
          return this._underAttackTimer > 0;
        }

        /**
         * 执行受击动作
         */;
        _proto.doUnderAttack = function doUnderAttack() {
          if (this._owner.state.type === GameBattle.ActionState.Dead) {
            return;
          }

          // 播放受击动画
          // this._owner.state.type = GameBattle.ActionState.UnderAttack;
          // 取消技能释放状态
          this._isSkilling = false;

          // 减少受击计时器
          this._underAttackTimer -= 0.016; // 假设60fps，每帧减少约0.016秒
          if (this._underAttackTimer < 0) {
            this._underAttackTimer = 0;
          }
        }

        /**
         * 追击
         */;
        _proto.doPursuit = function doPursuit() {
          if (this.pause) {
            return;
          }

          // 检查当前目标是否有效
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            // 目标无效，重新寻找目标
            this.findNearestEnemy();
            if (!this.target) {
              // 没有找到目标，停止追击
              this._locking = false;
              return;
            }
          }

          // 计算从怪物到目标的方向向量
          var targetPos = this.target.node.worldPosition;
          var ownerPos = this._owner.node.worldPosition;
          var direction = targetPos.clone().subtract(ownerPos).normalize();

          // 添加单位避让逻辑，避免重叠
          direction = this.avoidOverlap(direction);
          this._locking = true;
          this._owner.move(direction, this._owner.getMoveActionState());
          if (this._owner.needFlip) {
            this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
          }
        }

        /**
         * 单位避让逻辑，避免与其他怪物重叠
         */;
        _proto.avoidOverlap = function avoidOverlap(originalDirection) {
          var _this3 = this;
          var ownerPos = this._owner.node.worldPosition;
          var avoidanceRadius = 60; // 避让半径
          var avoidanceForce = new Vec3(0, 0, 0);
          var nearbyCount = 0;
          var hasVeryClose = false; // 是否有非常近的单位

          // 检查附近的友军（其他怪物）
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 只检查同类型的怪物
            if (entity.type === GameBattle.RoleType.Monster && entity.uid !== _this3._owner.uid) {
              var distance = Vec3.distance(entity.node.worldPosition, ownerPos);

              // 如果距离小于避让半径，计算排斥力
              if (distance < avoidanceRadius && distance > 0.1) {
                var repulsion = ownerPos.clone().subtract(entity.node.worldPosition);
                repulsion.normalize();

                // 距离越近，排斥力越大（使用平方增强近距离排斥）
                var strength = (avoidanceRadius - distance) / avoidanceRadius;
                strength = strength * strength; // 平方增强

                // 如果非常近（小于20像素），标记为紧急避让
                if (distance < 30) {
                  hasVeryClose = true;
                  strength *= 2; // 双倍排斥力
                }

                repulsion.multiplyScalar(strength);
                avoidanceForce.add(repulsion);
                nearbyCount++;
              }
            }
            return false;
          });

          // 如果有附近的友军，混合原方向和避让力
          if (nearbyCount > 0) {
            avoidanceForce.normalize();

            // 根据距离动态调整权重
            var avoidWeight = hasVeryClose ? 0.7 : 0.5; // 非常近时避让权重更高
            var targetWeight = 1.0 - avoidWeight;
            var finalDirection = originalDirection.clone().multiplyScalar(targetWeight).add(avoidanceForce.multiplyScalar(avoidWeight));
            finalDirection.normalize();
            return finalDirection;
          }
          return originalDirection;
        }
        /**
         * 检测能否追击
         */;
        _proto.checkPursuit = function checkPursuit() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果没有目标，尝试寻找最近的敌人
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            this.findNearestEnemy();
          }

          // 如果还是没有目标，不追击
          if (!this.target) {
            return false;
          }
          var distance = Vec3.distance(this.target.node.worldPosition, this._owner.node.worldPosition);

          // 有目标且距离大于攻击范围且不在攻击/释放技能中就追击
          var ret = distance > this._owner.roleVO.pursuerange && !this._owner.state.isAttacking() && !this._owner.checkCanUseSkill();
          if (ret) {
            this._owner.behaviorFollowFlag = false;
          }
          return ret;
        }

        /**
         * 寻找最近的敌人目标（怪物攻击英雄和士兵，如果没有则攻击城墙）
         */;
        _proto.findNearestEnemy = function findNearestEnemy() {
          var _this4 = this,
            _App$dungeonBattleMgr3;
          var closestEnemy = null;
          // let minDistance = Number.MAX_VALUE;

          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 怪物寻找英雄和士兵类型
            if (entity.type === GameBattle.RoleType.Hero || entity.type === GameBattle.RoleType.Soldier) {
              if (entity.checkValid() && !entity.isDead) {
                var distance = Vec3.distance(entity.node.worldPosition, _this4._owner.node.worldPosition);
                var ret = distance > _this4._owner.roleVO.lockRange[0] && distance < _this4._maxLockRange && distance > _this4._owner.roleVO.pursuerange && distance < _this4._targetDistance && !_this4._owner.state.isAttacking() && !_this4._owner.checkCanUseSkill();
                App.log.logBusiness("怪物寻找英雄和士兵类型===" + ret);
                if (ret) {
                  // minDistance = distance;
                  closestEnemy = entity;
                }
              }
            }
            return false;
          });

          // 如果没有找到英雄或士兵，检查是否有城墙
          if (!closestEnemy && (_App$dungeonBattleMgr3 = App.dungeonBattleMgr) != null && _App$dungeonBattleMgr3.city) {
            // 无论城墙是否死亡，都向城墙目标点移动
            this.moveToCity();
            return;
          }

          // 更新锁定目标
          this._owner.lockTargetCtrl.target = closestEnemy;
        }

        /**
         * 巡逻（无目标时返回出生点）
         */;
        _proto.patrol = function patrol() {
          // 只有不在攻击状态且没有目标时才能巡逻
          if (this._owner.state.isAttacking() || this.target) {
            return;
          }
          var ownerPos = this._owner.node.worldPosition;

          // 如果已经到达出生点（误差5像素内），待机
          if (Vec3.distance(ownerPos, this._homePoint) <= 5) {
            this._owner.exitMove();
            this._locking = false;
            return;
          }

          // 计算向出生点方向的移动向量
          var direction = this._homePoint.clone().subtract(ownerPos).normalize();
          this._locking = true;
          this._owner.move(direction, this._owner.getMoveActionState());
        }

        /**
         * 移动到目标点范围并攻击（主函数）
         * @param target 目标角色或目标位置
         */;
        _proto.moveToTarget = function moveToTarget(target) {
          if (target instanceof Vec3 && (target.x >= GameBattle.BattleScope.big_x || target.y >= 1280 || target.x <= GameBattle.BattleScope.min_x || target.y <= 0)) {
            return;
          }
          if (target instanceof RoleBase) {
            this.clearCityTarget();
          }
          if (!this._checkBasicConditions()) {
            // 检查基本条件
            return;
          }

          // 如果已到达目标，不再移动
          if (this._isTargetReached) {
            return;
          }

          // 检查目标有效性并获取目标位置
          var targetPos = this._getTargetPosition(target);
          if (!targetPos) {
            return;
          }

          // 检查目标是否变化
          if (this._lastTarget !== target) {
            this._lastTarget = target;
            // 重置到达标志
            this._isTargetReached = false;
          }

          // 计算到目标的距离
          var distance = Vec3.distance(this._owner.node.worldPosition, targetPos);

          // 获取停止距离（技能攻击范围）
          var stopDistance = this._owner.roleVO.pursuerange;
          if (this._owner.atkSkill && this._owner.atkSkill.distance) {
            stopDistance = this._owner.atkSkill.distance[1] || this._owner.roleVO.pursuerange;
          }

          // 检查是否到达目标位置
          if (distance <= stopDistance) {
            // 到达目标位置，停止移动并攻击
            this._handleTargetReached(target);
            return;
          }
          // 执行实际的移动逻辑
          this._executeMoveLogic(target, targetPos);

          // 计算方向向量并移动
          // let direction = targetPos.clone().subtract(this._owner.node.worldPosition).normalize();
          // // 添加单位避让逻辑，避免重叠
          // direction = this.avoidOverlap(direction);
          // this._owner.move(direction, this._owner.getMoveActionState());

          // // 设置朝向
          // if (this._owner.needFlip && target instanceof RoleBase) {
          //     this._owner.view.isFlipX = this._owner.node.position.x < target.node.position.x;
          // }
        }
        /**
         * 执行实际的移动逻辑
         */;
        _proto._executeMoveLogic = function _executeMoveLogic(target, targetPos) {
          if (target instanceof Vec3) {
            this._moveToTargetPosition(target, targetPos);
            return;
          }
          // 计算到目标的距离
          var distance = Vec3.distance(this._owner.node.worldPosition, targetPos);
          var max = this._owner.atkSkill.checkRange() ? this._owner.atkSkill.distance[1] : 100;
          // 如果距离大于100，向目标移动
          if (distance > max) {
            this._isTargetReached = false;
            this._moveToTargetPosition(target, targetPos);
          } else {
            // 距离小于等于100，停止移动并攻击
            this._handleTargetReached(target);
          }
        }
        /**
         * 向目标位置移动
         */;
        _proto._moveToTargetPosition = function _moveToTargetPosition(target, targetPos) {
          if (target instanceof Vec3) {
            this._handleZeroVectorMove(target, targetPos);
            return;
          }
          // 使用getMoveVector获取正确的移动方向向量
          var pos = App.mapMgr.getMoveVector(this._owner.node.worldPosition, targetPos, false, this._owner.findPathUseMaxDeep() ? FindPathDeepType.Boss : FindPathDeepType.Normal);

          // 如果getMoveVector返回零向量，直接控制怪物位置向目标移动
          if (target instanceof RoleBase && pos.x === 0 && pos.y === 0) {
            this._handleZeroVectorMove(target, targetPos);
          } else if (pos.x !== 0 || pos.y !== 0) {
            this._handleNormalMove(target, pos);
          } else {
            this._owner.exitMove();
          }
        }

        /**
         * 处理零向量移动情况
         */;
        _proto._handleZeroVectorMove = function _handleZeroVectorMove(target, targetPos) {
          if (!this._owner || !this._owner.node) return;
          // 计算从士兵到目标的方向向量
          // const ownerPos = this._owner.node.worldPosition;
          // let direction = targetPos.clone().subtract(ownerPos).normalize();

          // // 添加单位避让逻辑，避免重叠
          // direction = this.avoidOverlap(direction);

          // this._locking = true;
          // this._owner.move(direction, this._owner.getMoveActionState());
          // if (this._owner.needFlip) {
          //     this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
          // }
          // 计算移动方向
          var dirX = targetPos.x - this._owner.node.worldPosition.x;
          var dirY = targetPos.y - this._owner.node.worldPosition.y;
          var length = Math.sqrt(dirX * dirX + dirY * dirY);
          if (length > 0.1) {
            if (this._owner.state.isAttacking()) {
              this._owner.exitMove();
              return;
            }
            this._locking = true;
            // 只有当有实际移动时才播放移动动画
            // 直接设置移动状态，确保播放移动动画
            if (this._owner.state.type !== GameBattle.ActionState.Move) {
              this._owner.state.type = GameBattle.ActionState.Move;
            }
            // 计算从士兵到目标的方向向量
            var ownerPos = this._owner.node.worldPosition;
            var direction = targetPos.clone().subtract(ownerPos).normalize();

            // 添加单位避让逻辑，避免重叠
            direction = this.avoidOverlap(direction);
            direction.x = Math.round(direction.x * 10000) / 10000;
            direction.y = Math.round(direction.y * 10000) / 10000;
            this._owner.move(direction, this._owner.getMoveActionState());
            if (this._owner.needFlip && this.target) {
              this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
            }
          } else {
            // 距离目标太近，退出移动状态
            this._owner.exitMove();
          }
        }
        /**
         * 处理正常移动情况
         */;
        _proto._handleNormalMove = function _handleNormalMove(target, pos) {
          this._locking = true;
          var ownerPos = this._owner.node.worldPosition;
          var direction = pos.clone().subtract(ownerPos).normalize();
          this._owner.move(direction, this._owner.getMoveActionState());
          if (this._owner.needFlip && target instanceof RoleBase) {
            this._owner.view.isFlipX = this._owner.node.position.x < target.node.position.x;
          }
        }
        /**
         * 移动到城墙并攻击
         */;
        _proto.moveToCity = function moveToCity() {
          var _this$_city$targetabl;
          if (!this._city) {
            return;
          }
          var cityNode = (_this$_city$targetabl = this._city.targetable) != null ? _this$_city$targetabl : this._city.node;
          if (!cityNode) {
            return;
          }
          this._attackingCity = true;
          this._cityTargetPos = cityNode.worldPosition.clone();
          // 调整Y坐标偏移，使怪物移动到城墙底部附近
          this._cityTargetPos.y = this._cityTargetPos.y + 190;
          this._cityTargetPos.x = this._owner.node.worldPosition.x;
          this._owner.lockTargetCtrl.target = null;
          this._owner.setTargetInfo(null);
          this._isTargetReached = false;
          this.moveToTarget(this._cityTargetPos);
        }

        /**
         * 清除城墙目标
         */;
        _proto.clearCityTarget = function clearCityTarget() {
          this._attackingCity = false;
          this._cityTargetPos = null;
          this._isTargetReached = false;
        }

        /**
         * 检查基本条件
         */;
        _proto._checkBasicConditions = function _checkBasicConditions() {
          if (!this._owner || this.pause || !App.battleMgr.isInBattle()) {
            return false;
          }
          return true;
        }

        /**
         * 获取目标位置
         */;
        _proto._getTargetPosition = function _getTargetPosition(target) {
          if (target instanceof Vec3) {
            return target;
          } else {
            // 如果是角色对象，获取其世界位置
            if (!target || !target.node) {
              return null;
            }
            return target.node.worldPosition;
          }
        }

        /**
         * 处理到达目标的情况
         */;
        _proto._handleTargetReached = function _handleTargetReached(target) {
          this._owner.exitMove();
          this._isTargetReached = true;

          // 如果目标是角色对象，设置为锁定目标
          if (target instanceof RoleBase) {
            this._owner.lockTargetCtrl.target = target;
          }

          // 如果是攻击城墙，将城墙设置为目标
          if (this._attackingCity && this._city) {
            this._owner.lockTargetCtrl.target = this._city; // 将城墙设置为攻击目标
            if (!this._owner.state.isAttacking() && !this._owner.state.isSkilling()) {
              this.doAttack();
            }
            return;
          }

          // 执行攻击
          if (this._owner.atkSkill && this._owner.atkSkill.skillID !== 0 && !this._owner.state.isAttacking() && !this._owner.state.isSkilling()) {
            this.doAttack();
          }
        };
        _createClass(MonsterAI, [{
          key: "pause",
          get: function get() {
            return this._pause;
          },
          set: function set(value) {
            this._pause = value;
            if (value) {
              this.doDaiji();
            }
          }
        }, {
          key: "stateLock",
          get: function get() {
            return this._stateLock;
          },
          set: function set(v) {
            this._stateLock = v;
          }
        }, {
          key: "target",
          get: function get() {
            // if (this._isRealMonster) {
            //     this._target = App.battleMgr.roleCtrl.player;
            // } else {
            this._target = this._owner.lockTargetCtrl.target;
            // }
            return this._target;
          },
          set: function set(value) {
            this._target = value;
          }
        }, {
          key: "attackingCity",
          get: function get() {
            return this._attackingCity;
          },
          set: function set(value) {
            this._attackingCity = value;
          }
        }]);
        return MonsterAI;
      }(BaseAi));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterAIStateBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts'], function (exports) {
  var _createClass, _inheritsLoose, cclegacy, GameBattle;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      cclegacy._RF.push({}, "854afqtJcJPLKyLgWcvwUoo", "MonsterAIStateBase", undefined);
      /**
       * 怪物AI行为状态基类
       */
      var MonsterAIStateBase = exports('MonsterAIStateBase', /*#__PURE__*/function () {
        function MonsterAIStateBase() {
          /** 状态类型 */
          this._type = void 0;
          /** 是否锁定 */
          this._isLock = false;
          /** 持有者 */
          this._owner = void 0;
          /** 附带机制类型 */
          this._effect = void 0;
          this._init();
        }
        var _proto = MonsterAIStateBase.prototype;
        _proto._init = function _init() {}

        /**
         * 进入时
         */;
        _proto.onEnter = function onEnter(data) {}

        /**
         * 退出时
         */;
        _proto.onExit = function onExit() {}

        /**
         * 更新
         */;
        _proto.onUpdate = function onUpdate(dt) {};
        _proto.check = function check() {
          return false;
        };
        _createClass(MonsterAIStateBase, [{
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "isLock",
          get: function get() {
            return this._isLock;
          },
          set: function set(v) {
            this._isLock = v;
          }
        }, {
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }]);
        return MonsterAIStateBase;
      }());

      /**
       * 怪物AI行为状态 —— 归位
       */
      var MAI_Homing = exports('MAI_Homing', /*#__PURE__*/function (_MonsterAIStateBase) {
        _inheritsLoose(MAI_Homing, _MonsterAIStateBase);
        function MAI_Homing() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _MonsterAIStateBase.call.apply(_MonsterAIStateBase, [this].concat(args)) || this;
          /** 归位位置 */
          _this._homePosition = void 0;
          return _this;
        }
        var _proto2 = MAI_Homing.prototype;
        _proto2._init = function _init() {
          this._type = GameBattle.MonsterAIState.Homing;
          var role = this._owner;
          this._homePosition = role.node.position;
        };
        _proto2.onEnter = function onEnter(data) {
          var role = this._owner;
        };
        _proto2.onExit = function onExit() {};
        _proto2.check = function check() {
          var role = this._owner;
          if (role.node.position.equals(this._homePosition)) return;
          var pos = role.node.position.clone().subtract(this._homePosition).normalize();
          role.move(pos);
        };
        return MAI_Homing;
      }(MonsterAIStateBase));

      /**
       * 怪物AI行为状态 —— 巡逻
       */
      var MAI_Patrol = exports('MAI_Patrol', /*#__PURE__*/function (_MonsterAIStateBase2) {
        _inheritsLoose(MAI_Patrol, _MonsterAIStateBase2);
        function MAI_Patrol() {
          return _MonsterAIStateBase2.apply(this, arguments) || this;
        }
        var _proto3 = MAI_Patrol.prototype;
        _proto3._init = function _init() {
          this._type = GameBattle.MonsterAIState.Patrol;
        };
        _proto3.onEnter = function onEnter(data) {};
        _proto3.onExit = function onExit() {};
        return MAI_Patrol;
      }(MonsterAIStateBase));

      /**
       * 怪物AI行为状态 —— 追击
       */
      var MAI_Pursuit = exports('MAI_Pursuit', /*#__PURE__*/function (_MonsterAIStateBase3) {
        _inheritsLoose(MAI_Pursuit, _MonsterAIStateBase3);
        function MAI_Pursuit() {
          return _MonsterAIStateBase3.apply(this, arguments) || this;
        }
        var _proto4 = MAI_Pursuit.prototype;
        _proto4._init = function _init() {
          this._type = GameBattle.MonsterAIState.Pursuit;
        };
        _proto4.onEnter = function onEnter(data) {};
        _proto4.onExit = function onExit() {};
        return MAI_Pursuit;
      }(MonsterAIStateBase));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterFSM.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './MonsterAIStateBase.ts'], function (exports) {
  var _createClass, cclegacy, GameBattle, MAI_Pursuit, MAI_Patrol, MAI_Homing;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      MAI_Pursuit = module.MAI_Pursuit;
      MAI_Patrol = module.MAI_Patrol;
      MAI_Homing = module.MAI_Homing;
    }],
    execute: function () {
      cclegacy._RF.push({}, "e9a8ayUNNpE46Mgw68+Xq0B", "MonsterFSM", undefined);

      /**
       * 行为动画状态机
       */
      var MonsterFSM = exports('MonsterFSM', /*#__PURE__*/function () {
        function MonsterFSM() {
          /** 当前状态 */
          this._curState = void 0;
          /** 持有者 */
          this._owner = void 0;
          /** 状态缓存 */
          this._stateCatch = new Map();
        }
        var _proto = MonsterFSM.prototype;
        _proto.reset = function reset() {
          this._curState = null;
          this._owner = null;
        }

        /**
         * 是否有效的
         * @returns
         */;
        _proto.isValid = function isValid() {
          var _this$_owner;
          return (_this$_owner = this._owner) == null ? void 0 : _this$_owner.checkValid();
        }

        /**
         * 进入时
         */;
        _proto.onEnter = function onEnter(state, data) {
          if (!this.isValid()) return;
          if (this._curState) {
            this._curState.onExit();
          }
          this._curState = this._stateCatch.get(state);
          if (!this._curState) {
            this._curState = this._createState(state);
            this._stateCatch.set(state, this._curState);
          }
          this._curState.onEnter(data);
        }

        /**
         * 退出时
         */;
        _proto.onExit = function onExit(state) {
          if (!this.isValid()) return;
        }

        /**
         * 更新
         */;
        _proto.onUpdate = function onUpdate(dt) {
          var _this$_curState;
          if (!this.isValid()) return;
          (_this$_curState = this._curState) == null || _this$_curState.onUpdate(dt);
        };
        _proto._createState = function _createState(state) {
          var stateObj;
          switch (state) {
            case GameBattle.MonsterAIState.Homing:
              stateObj = new MAI_Homing();
              break;
            case GameBattle.MonsterAIState.Patrol:
              stateObj = new MAI_Patrol();
              break;
            case GameBattle.MonsterAIState.Pursuit:
              stateObj = new MAI_Pursuit();
              break;
          }
          return stateObj;
        };
        _createClass(MonsterFSM, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }]);
        return MonsterFSM;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterModelFrameAnimation.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModelFrameAnimation.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ModuleDef, ModelFrameAnimation;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModelFrameAnimation = module.ModelFrameAnimation;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "324ceM0uixPtL1yhbDEnz8o", "MonsterModelFrameAnimation", undefined);
      var ccclass = _decorator.ccclass;
      var MonsterModelFrameAnimation = exports('MonsterModelFrameAnimation', (_dec = ccclass("MonsterModelFrameAnimation"), _dec(_class = /*#__PURE__*/function (_ModelFrameAnimation) {
        _inheritsLoose(MonsterModelFrameAnimation, _ModelFrameAnimation);
        function MonsterModelFrameAnimation() {
          return _ModelFrameAnimation.apply(this, arguments) || this;
        }
        var _proto = MonsterModelFrameAnimation.prototype;
        /**
         * 加载怪物动画数据
         */
        _proto.loadAnimationData = /*#__PURE__*/
        function () {
          var _loadAnimationData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, onCompleted, onFaild) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!(!path || path === "")) {
                    _context.next = 3;
                    break;
                  }
                  onFaild == null || onFaild(new Error("Invalid path"));
                  return _context.abrupt("return");
                case 3:
                  try {
                    // 初始化组件
                    this.init();
                    // 设置动画相关属性
                    this.animationName = path;
                    this.moduleType = ModuleDef.MONSTER;
                    onCompleted == null || onCompleted();
                  } catch (error) {
                    console.error("Failed to load monster animation data:", error);
                    onFaild == null || onFaild(error);
                  }
                case 4:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function loadAnimationData(_x, _x2, _x3) {
            return _loadAnimationData.apply(this, arguments);
          }
          return loadAnimationData;
        }();
        return MonsterModelFrameAnimation;
      }(ModelFrameAnimation)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterModelSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModelSpine.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, UITransform, ModelSpine;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
    }, function (module) {
      ModelSpine = module.ModelSpine;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "ccd04DcZCRGpIFm3JrJ/Mtd", "MonsterModelSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 怪物模型
       */
      var MonsterModelSpine = exports('MonsterModelSpine', (_dec = ccclass("MonsterModelSpine"), _dec(_class = /*#__PURE__*/function (_ModelSpine) {
        _inheritsLoose(MonsterModelSpine, _ModelSpine);
        function MonsterModelSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ModelSpine.call.apply(_ModelSpine, [this].concat(args)) || this;
          /** 是否翻转 */
          _this._isFlipX = false;
          return _this;
        }
        var _proto = MonsterModelSpine.prototype;
        _proto.init = function init() {
          this._parts = [];
          this._parts.push(this.spine_body);
        }

        // public play(animationName: string, isLoop: boolean) {
        //     this.spine_body.skeleton.setAnimation(0, animationName, isLoop);
        // }

        // override addAnimation(animationName: string, isLoop: boolean) {
        //     this.spine_body.skeleton.setAnimation(0, animationName, isLoop);
        // }
        ;

        _proto.loadSkeletonData = function loadSkeletonData(data) {
          var _this2 = this;
          var cur = 0;
          var max = 0;
          var fnUpdateProgress = function fnUpdateProgress() {
            cur++;
            if (cur === max) {
              if (_this2.node) {
                _this2.node.getComponent(UITransform).width = _this2.spine_body.getComponent(UITransform).width;
                _this2.node.getComponent(UITransform).height = _this2.spine_body.getComponent(UITransform).height;
              }
              data.onComplete();
            }
          };
          if (typeof data.body === "string") max++;
          this.spine_body.loadMonsterSkeletonData(data.body, function () {
            fnUpdateProgress();
          });
        };
        _proto.loadSkeletonDataHuoBan = function loadSkeletonDataHuoBan(data) {
          var _this3 = this;
          var cur = 0;
          var max = 0;
          var fnUpdateProgress = function fnUpdateProgress() {
            cur++;
            if (cur === max) {
              if (_this3.node) {
                _this3.node.getComponent(UITransform).width = _this3.spine_body.getComponent(UITransform).width;
                _this3.node.getComponent(UITransform).height = _this3.spine_body.getComponent(UITransform).height;
              }
              data.onComplete();
            }
          };
          if (typeof data.body === "string") max++;
          this.spine_body.loadMonsterSkeletonData2(data.body, function () {
            fnUpdateProgress();
          });
        }
        /**
         * 是否有动画名
         */;
        _proto.hasAnimation = function hasAnimation(name) {
          var animsEnum = this.spine_body.skeleton.skeletonData.getAnimsEnum();
          return !!animsEnum[name];
        };
        _proto.clearSpine = function clearSpine() {
          this.spine_body.skeleton.skeletonData = null;
        };
        _createClass(MonsterModelSpine, [{
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-this.node.scale.x, this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }
        }]);
        return MonsterModelSpine;
      }(ModelSpine)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterSkill.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RoleSkill.ts', './Utils.ts', './MonitorType.ts', './ModuleDef.ts', './BattleDefine.ts', './App.ts', './SpineUtils.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Vec3, UITransform, sp, find, RoleSkill, Utils, MonitorType, ModuleDef, GameBattle, App, SpineUtils;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      UITransform = module.UITransform;
      sp = module.sp;
      find = module.find;
    }, function (module) {
      RoleSkill = module.RoleSkill;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }, function (module) {
      SpineUtils = module.default;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "71b88dtEuVN9abMnxqDCGtN", "MonsterSkill", undefined);
      var ccclass = _decorator.ccclass;
      var MonsterSkill = exports('MonsterSkill', (_dec = ccclass("MonsterSkill"), _dec(_class = /*#__PURE__*/function (_RoleSkill) {
        _inheritsLoose(MonsterSkill, _RoleSkill);
        function MonsterSkill() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleSkill.call.apply(_RoleSkill, [this].concat(args)) || this;
          _this._isShowWarning = false;
          _this._isShowAni = false;
          return _this;
        }
        var _proto = MonsterSkill.prototype;
        _proto.init = function init(id, owner) {
          _RoleSkill.prototype.init.call(this, id, owner);
          this.initPool();
        };
        _proto.initPool = function initPool() {
          //钩子
        };
        _proto.clearPool = function clearPool() {}

        /**
         * buff效果
         * @param buff
         * @param buffEffect
         */;
        _proto.buffEffect = function buffEffect(buff, _buffEffect) {
          //获取挂点

          if (!buff.vo.vfx || !buff.vo.dummy_point) {
            return;
          }
          //
          var dur = buff.vo.time;
          if (buff.vo.duration === 3) {
            dur = Number.MAX_SAFE_INTEGER;
          }
          var guaWorld = this._owner.getMountPoint(buff.vo.dummy_point, new Vec3(0, 0, 0));
          var localPos = this._owner.getComponent(UITransform).convertToNodeSpaceAR(guaWorld);
          App.monitorMgr.dispatchEvent(MonitorType.battle_gun_weapon_attack_affected, {
            node: this._owner.node,
            effect: buff.vo.vfx,
            hit_pos: localPos,
            size: 1,
            dutation: dur / 1000
          });

          // dutation: buff.vo.time / 1000,
        }

        /**
         * 眩晕
         * @param buff
         * @param buffEffect
         */;
        _proto.XuanYun = /*#__PURE__*/
        function () {
          var _XuanYun = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(buff, buffEffect) {
            var vo;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  vo = this._owner.roleVO; //免疫拉怪的怪物，同时免疫眩晕
                  if (!(vo && vo.immuneDrag)) {
                    _context.next = 3;
                    break;
                  }
                  return _context.abrupt("return");
                case 3:
                  this._owner.pause = true;
                  this._owner.openAtk = false;
                  this._owner.state.animationType = GameBattle.ActionState.Stun;
                case 6:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function XuanYun(_x, _x2) {
            return _XuanYun.apply(this, arguments);
          }
          return XuanYun;
        }()
        /**
         * 缠绕
         * @param buff
         * @param buffEffect
         */;

        _proto.Round = function Round(buff, buffEffect) {}

        /**
         * 肉钩
         */;
        _proto.showHook = function showHook(skill, actionName, moveDirection, eventName, cb) {
          var _this2 = this;
          if (eventName.includes("Hook") && !this._isShowAni) {
            this._isShowAni = true;
            if (!skill.getTarget().node || !skill.getTarget()) {
              return;
            }
            var count = skill.bullet_number;
            count = Math.max(5, count);
            var launcherAngle = skill.launch_angle * 180 / Math.PI;
            var dir = skill.getTarget().node.worldPosition.clone().subtract(skill.owner.node.worldPosition).normalize();
            if (this._owner._weaponDir) {
              dir = this._owner._weaponDir;
            }
            if (moveDirection) {
              dir = moveDirection;
            }
            var radian = Math.atan2(dir.y, dir.x);
            var angle = radian / Math.PI * 180;
            // 初始位置要在模型中间 要保证钩子在模型中间 需要做角度偏移
            // 向下方向时，减少5度处理
            // if (angle < 0) {
            //     launcherAngle = launcherAngle - 5;
            // } else if (angle > 90 && angle < 180) {
            //     // 左边 偏移个5度
            //     launcherAngle = launcherAngle - 5;
            // }
            var _loop = function _loop() {
              var hookNode = find("/Weapons/Hook" + i, _this2._owner.node);
              // 偏转角度（单位为弧度），例如偏转15度
              var theta = launcherAngle * Math.ceil(i / 2) * (i % 2 === 0 ? -1 : 1);
              hookNode.angle = angle + 180 + theta;
              hookNode.active = true;
              var sek = hookNode.getComponent(sp.Skeleton);
              if (!sek.skeletonData) {
                return 1; // continue
              }

              sek.setCompleteListener(function (trackEntry) {
                console.log("\u94A9\u5B50\u5B8C\u6210\u540D\u79F0" + trackEntry.animation.name);
                var name = trackEntry.animation.name;
                if (name.includes("Hookstart")) {
                  sek.setAnimation(0, "Hookend", false);
                  // cb && cb('Hookend');
                } else if (name.includes("Hookend")) {
                  _this2._isShowAni = false;
                  hookNode.active = false;
                  _this2._owner._weaponDir = null;
                }
              });
              cb && cb("Hookend");
              sek.setAnimation(0, "Hookstart", false);
            };
            for (var i = 0; i < count; i++) {
              if (_loop()) continue;
            }
          }
        }

        /** 出生 */;
        _proto.TuFuBorn = function TuFuBorn(skill, actionName, moveDirection) {
          var _mapEntities = App.battleMgr.roleCtrl.entityMap;
          var player_uid = App.battleMgr.roleCtrl.player.uid;
          var isXinShouFuBen = App.battleMgr.challengeGuanQiaId === 100;
          for (var _iterator = _createForOfIteratorHelperLoose(_mapEntities), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              k = _step$value[0],
              v = _step$value[1];
            if (v.type == GameBattle.RoleType.Monster) {
              var monsterRole = v;
              //不能清除玩家的召唤物
              if (monsterRole.roleVO.quality !== GameBattle.MonsterQuality.Boss && !isXinShouFuBen && monsterRole.masterId !== player_uid) {
                //清理掉所有小怪
                monsterRole.roleVO.updateCurHP(0, true);
                monsterRole._monsterAI.doDead();
              }
            }
          }
        }
        /**
         * 剧毒瓶子
         * @param skill
         * @param actionName
         * @param moveDirection
         * @param eventName
         * @param cb
         */;
        _proto.juDuPingzi = function juDuPingzi(skill, actionName, moveDirection, eventName, cb) {
          // ○    剧毒瓶子
          // ○	锁定角色当前位置，并在角色脚下生成预警圈
          // ○	开始技能吟唱动作
          // ○	fire帧触发扔出剧毒瓶子的事件
          // ○	剧毒瓶子呈抛物线轨迹掉落到预警圈中心
          // ○	爆出毒雾，会有持续时间，站在毒雾内的角色持续受到伤害
          var player = App.battleMgr.roleCtrl.player;
          if (!player) {
            return;
          }
          if (skill.warning_effect.length > 0) {
            // skill.skillState = Skill_State.Doing;
            // this._monsterAI.holdState = true;
            this._isShowWarning = true;
            var that = this;
            // const path = "/SkillEffect/YuJing/" + that.curSkill.warning_effect
            var skillWarningNode = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillWarning);
            var seklton = skillWarningNode.getComponent(sp.Skeleton);
            var path = "SkillEffect/YuJing/" + skill.warning_effect;
            App.resMgr.loadAsset(ModuleDef.SPINE, path, sp.SkeletonData, null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, res) {
              var warningLayer, moveDirection, redian, angle, offsetX, offsetY, pos;
              return _regeneratorRuntime().wrap(function _callee3$(_context3) {
                while (1) switch (_context3.prev = _context3.next) {
                  case 0:
                    if (!err) {
                      _context3.next = 3;
                      break;
                    }
                    console.error(err);
                    return _context3.abrupt("return");
                  case 3:
                    seklton.skeletonData = res;
                    warningLayer = App.battleMgr.battleMainViewCtrl.warningLayer;
                    warningLayer.addChild(skillWarningNode);
                    moveDirection = skill.getTarget().node.worldPosition.clone().subtract(skill.owner.node.worldPosition).normalize();
                    redian = Math.atan2(moveDirection.y, moveDirection.x);
                    angle = redian / Math.PI * 180;
                    skillWarningNode.angle = angle;
                    skillWarningNode.scale_x = 1;
                    skillWarningNode.scale_y = 1;
                    offsetX = 0;
                    offsetY = 0;
                    pos = player.node.worldPosition.clone().add3f(offsetX, offsetY, 0);
                    skillWarningNode.worldPosition = pos;
                    skillWarningNode.active = true;
                    SpineUtils.spinePlayDefault(skillWarningNode.getComponent(sp.Skeleton), false, function () {});
                    seklton.setCompleteListener( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(trackEntry) {
                      return _regeneratorRuntime().wrap(function _callee2$(_context2) {
                        while (1) switch (_context2.prev = _context2.next) {
                          case 0:
                            skillWarningNode.active = false;
                            App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillWarning, skillWarningNode);
                            //预警播放完毕，开始boss动作
                            that._isShowWarning = false;
                            //吟唱
                            skill.owner.view.play("Skill", true);
                            // skill.owner.view.addAnimation('Attack', false)
                            _context2.next = 6;
                            return Utils.waitTimeAsync(skill.owner, 1);
                          case 6:
                            skill.owner.view.play("Attack", false);
                            // skill.owner.state.type = GameBattle.ActionState.Attack
                            _context2.next = 9;
                            return Utils.waitTimeAsync(skill.owner, 0.5);
                          case 9:
                            cb && cb(moveDirection);
                          case 10:
                          case "end":
                            return _context2.stop();
                        }
                      }, _callee2);
                    })));
                  case 19:
                  case "end":
                    return _context3.stop();
                }
              }, _callee3);
            })));
          } else {
            cb && cb();
          }
        };
        return MonsterSkill;
      }(RoleSkill)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterSpawnMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, v3, Component, GameBattle, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      v3 = module.v3;
      Component = module.Component;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "fcf90DxgzpLOqNN6Lbew75W", "MonsterSpawnMgr", undefined);
      var ccclass = _decorator.ccclass;

      /**
       * 怪物刷新配置
       */

      /**
       * 怪物刷新管理器
       * 负责管理敌方怪物的波次刷新、路线控制等
       */
      var MonsterSpawnMgr = exports('MonsterSpawnMgr', (_dec = ccclass("MonsterSpawnMgr"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(MonsterSpawnMgr, _Component);
        function MonsterSpawnMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          // 刷新点配置（三路）
          _this._spawnPoints = new Map([[GameBattle.LanePosition.Left, [v3(187, 1150, 0)]], [GameBattle.LanePosition.Middle, [v3(360, 1150, 0)]], [GameBattle.LanePosition.Right, [v3(533, 1150, 0)]]]);
          // 目标点配置（三路）
          _this._targetPoints = new Map([[GameBattle.LanePosition.Left, v3(187, 100, 0)], [GameBattle.LanePosition.Middle, v3(360, 100, 0)], [GameBattle.LanePosition.Right, v3(533, 100, 0)]]);
          // 当前波次索引
          _this._currentWaveIndex = 0;
          // 总波次数
          _this._totalWaves = 0;
          // 战斗开始时间
          _this._battleStartTime = 0;
          // 是否正在战斗
          _this._isBattleRunning = false;
          // 是否所有波次已刷新
          _this._allWavesSpawned = false;
          // 刷新配置列表
          _this._spawnConfigs = [];
          // 已刷新的怪物UID列表
          _this._spawnedMonsterUids = new Set();
          // 当前活跃的怪物数量
          _this._activeMonsterCount = 0;
          // 创建怪物的回调
          _this._createMonsterCallback = null;
          // 所有怪物被消灭的回调
          _this._allMonstersKilledCallback = null;
          // Boss出现回调
          _this._bossSpawnedCallback = null;
          // 波次开始回调（显示UI并倒计时）
          _this._waveStartCallback = null;
          // 是否正在等待刷新下一波
          _this._waitingForNextWave = false;
          // 当前波是否已经刷新过怪物
          _this._currentWaveSpawned = false;
          return _this;
        }
        var _proto = MonsterSpawnMgr.prototype;
        /**
         * 初始化怪物刷新管理器
         */
        _proto.init = function init(params) {
          this._spawnConfigs = params.spawnConfigs;
          this._createMonsterCallback = params.createMonsterCallback;
          this._allMonstersKilledCallback = params.allMonstersKilledCallback;
          this._bossSpawnedCallback = params.bossSpawnedCallback;
          this._waveStartCallback = params.waveStartCallback;

          // 按waveId排序配置（改为按波次顺序）
          this._spawnConfigs.sort(function (a, b) {
            return a.waveId - b.waveId;
          });

          // 计算总波次数
          var waveIds = new Set(this._spawnConfigs.map(function (config) {
            return config.waveId;
          }));
          this._totalWaves = waveIds.size;
          this.reset();
        }

        /**
         * 开始战斗
         */;
        _proto.startBattle = function startBattle() {
          this._isBattleRunning = true;
          this._battleStartTime = Date.now() / 1000;
          this._allWavesSpawned = false;
          this._waitingForNextWave = false;

          // 开始第一波
          this.startNextWave();
        }

        /**
         * 停止战斗
         */;
        _proto.stopBattle = function stopBattle() {
          this._isBattleRunning = false;
          this.unscheduleAllCallbacks();
        }

        /**
         * 更新
         */;
        _proto.update = function update(deltaTime) {
          if (!this._isBattleRunning) {
            return;
          }

          // 检查当前波次的怪物是否全部被消灭
          // 必须满足：1.不在等待状态 2.当前波已刷过怪 3.怪物全部死亡 4.还有下一波
          if (!this._waitingForNextWave && this._currentWaveSpawned && this._activeMonsterCount === 0 && this._currentWaveIndex < this._spawnConfigs.length) {
            // 当前波次怪物全部死亡，准备下一波
            this._waitingForNextWave = true;
            this._currentWaveSpawned = false; // 重置标志
            App.battleMgr.roleCtrl.recoveryAllMonster();
            // 还有下一波，开始下一波
            this.startNextWave();
          }

          // 检查是否所有波次都已完成
          if (this._currentWaveIndex >= this._spawnConfigs.length && this._currentWaveSpawned && this._activeMonsterCount === 0) {
            if (!this._allWavesSpawned) {
              this._allWavesSpawned = true;
              this.onAllMonstersKilled();
            }
          }
        }

        /**
         * 开始下一波
         */;
        _proto.startNextWave = function startNextWave() {
          var _this2 = this;
          if (this._currentWaveIndex >= this._spawnConfigs.length) {
            return;
          }
          var config = this._spawnConfigs[this._currentWaveIndex];
          var currentWaveId = config.waveId;

          // 调用波次开始回调（显示UI并倒计时3秒）
          if (this._waveStartCallback) {
            this._waveStartCallback(currentWaveId, this._totalWaves, function () {
              // 倒计时结束后开始刷怪
              _this2.scheduleSpawn(config);
              _this2._waitingForNextWave = false;
              _this2._currentWaveIndex++;
            });
          } else {
            // 如果没有回调，直接刷怪
            this.scheduleSpawn(config);
            this._waitingForNextWave = false;
            this._currentWaveIndex++;
          }
        }

        /**
         * 安排怪物刷新
         */;
        _proto.scheduleSpawn = function scheduleSpawn(config) {
          var _this3 = this;
          var isLastMonster = false;
          var _loop = function _loop() {
            var waveCfg = config.waveCfg[i];
            if (waveCfg) {
              for (var index = 0; index < waveCfg.count; index++) {
                // 添加随机延迟，避免同时出现（0.5-1秒）
                var randomDelay = 0.5 + Math.random() * 1.0;
                var totalDelay = index * waveCfg.interval + randomDelay;
                if (i === config.waveCfg.length - 1 && index === waveCfg.count - 1) {
                  isLastMonster = true;
                }
                _this3.scheduleOnce(function () {
                  if (!_this3._isBattleRunning) return;
                  var monster = _this3.spawnMonster(waveCfg);
                  if (monster && waveCfg.isBoss && _this3._bossSpawnedCallback) {
                    _this3._bossSpawnedCallback(monster);
                  }

                  // 最后一个怪物刷新后，标记当前波已刷新
                  if (isLastMonster) {
                    _this3._currentWaveSpawned = true;
                  }
                }, totalDelay);
              }
            }
          };
          for (var i = 0; i < config.waveCfg.length; i++) {
            _loop();
          }
        }

        /**
         * 生成单个怪物
         */;
        _proto.spawnMonster = function spawnMonster(config) {
          // 获取刷新点
          var spawnPoints = this._spawnPoints.get(config.lane);
          if (!spawnPoints || spawnPoints.length === 0) {
            console.error("No spawn points for lane " + config.lane);
            return null;
          }

          // 选择一个刷新点
          var spawnPoint = spawnPoints[Math.floor(Math.random() * spawnPoints.length)];

          // 计算随机偏移，避免重叠（在刷新点附近小范围随机）
          var offsetX = (Math.random() - 0.5) * 100; // -50 到 +50 像素
          var offsetY = 0; //(Math.random() - 0.5) * 50; // -25 到 +25 像素
          var finalPosition = v3(spawnPoint.x + offsetX, spawnPoint.y + offsetY, 0);

          // 生成唯一ID
          var uid = this.generateMonsterUid();

          // 创建怪物
          var monster = this._createMonsterCallback(config, finalPosition, uid);
          if (monster) {
            // 设置怪物的目标路线
            var targetPoint = this._targetPoints.get(config.lane);
            monster.curLane = config.lane;
            // if (targetPoint) {
            //     monster.setMoveTarget(targetPoint);
            //     monster.setLane(config.lane);
            // }

            // 记录
            this._spawnedMonsterUids.add(uid);
            this._activeMonsterCount++;
          }
          return monster;
        }

        /**
         * 生成怪物UID
         */;
        _proto.generateMonsterUid = function generateMonsterUid() {
          var uid;
          do {
            uid = Math.floor(Math.random() * 1000000);
          } while (this._spawnedMonsterUids.has(uid));
          return uid;
        }

        /**
         * 怪物死亡回调
         */;
        _proto.onMonsterKilled = function onMonsterKilled(monsterUid) {
          if (this._spawnedMonsterUids.has(monsterUid)) {
            this._spawnedMonsterUids["delete"](monsterUid);
            this._activeMonsterCount = Math.max(0, this._activeMonsterCount - 1);
          }
        }

        /**
         * 所有怪物被消灭
         */;
        _proto.onAllMonstersKilled = function onAllMonstersKilled() {
          if (this._allMonstersKilledCallback) {
            this._allMonstersKilledCallback();
          }
          this._isBattleRunning = false;
        }

        /**
         * 获取当前活跃的怪物数量
         */;
        /**
         * 设置刷新点
         */
        _proto.setSpawnPoints = function setSpawnPoints(lane, points) {
          this._spawnPoints.set(lane, points);
        }

        /**
         * 设置目标点
         */;
        _proto.setTargetPoints = function setTargetPoints(lane, point) {
          this._targetPoints.set(lane, point);
        }

        /**
         * 设置当前波数（用于继续战斗）
         * @param waveId 波次ID
         */;
        _proto.setCurrentWave = function setCurrentWave(waveId) {
          // 如果配置为空，直接返回
          if (this._spawnConfigs.length === 0) {
            App.log.logBusiness("\u602A\u7269\u5237\u65B0\u914D\u7F6E\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8BBE\u7F6E\u6CE2\u6570");
            return;
          }

          // 找到对应波次的索引
          var targetIndex = -1;
          for (var i = 0; i < this._spawnConfigs.length; i++) {
            if (this._spawnConfigs[i].waveId === waveId) {
              targetIndex = i;
              break;
            }
          }

          // 如果找不到对应的波次，使用最后一个波次
          if (targetIndex === -1) {
            targetIndex = this._spawnConfigs.length - 1;
            App.log.logBusiness("\u672A\u627E\u5230\u6CE2\u6B21ID=" + waveId + "\uFF0C\u4F7F\u7528\u6700\u540E\u4E00\u4E2A\u6CE2\u6B21\uFF0Cindex=" + targetIndex);
          }
          this._currentWaveIndex = targetIndex;

          // 如果已经是最后一波或之后，标记所有波次已刷新
          if (this._currentWaveIndex >= this._spawnConfigs.length - 1) {
            this._allWavesSpawned = true;
            App.log.logBusiness("\u5F53\u524D\u6CE2\u6570\u5DF2\u662F\u6700\u540E\u4E00\u6CE2\uFF0C\u6807\u8BB0\u6240\u6709\u6CE2\u6B21\u5DF2\u5237\u65B0");
          }
        }

        /**
         * 重置管理器
         */;
        _proto.reset = function reset() {
          this.stopBattle();
          this._currentWaveIndex = 0;
          this._activeMonsterCount = 0;
          this._spawnedMonsterUids.clear();
          this._allWavesSpawned = false;
          this._waitingForNextWave = false;
          this._currentWaveSpawned = false;
        }

        /**
         * 预加载指定波次的怪物
         */;
        _proto.preloadWaves = function preloadWaves(waveIds) {
          // TODO: 实现怪物预加载逻辑
          console.log("Preloading waves:", waveIds);
        };
        _createClass(MonsterSpawnMgr, [{
          key: "activeMonsterCount",
          get: function get() {
            return this._activeMonsterCount;
          }

          /**
           * 获取当前波次
           */
        }, {
          key: "currentWave",
          get: function get() {
            if (this._spawnConfigs.length === 0) {
              return 0;
            }

            // 如果还没开始刷怪，返回第一波的ID
            if (this._currentWaveIndex === 0) {
              return this._spawnConfigs[0].waveId;
            }

            // 返回当前波次的ID（已经刷新的最后一波）
            var index = Math.min(this._currentWaveIndex - 1, this._spawnConfigs.length - 1);
            return this._spawnConfigs[index].waveId;
          }

          /**
           * 获取总波次数
           */
        }, {
          key: "totalWaves",
          get: function get() {
            return this._totalWaves;
          }

          /**
           * 检查是否所有波次都已刷新
           */
        }, {
          key: "allWavesSpawned",
          get: function get() {
            return this._allWavesSpawned;
          }
        }]);
        return MonsterSpawnMgr;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterUi.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "37fffnQlSVIfKEUPA0z5DLi", "MonsterUi", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var MonsterUi = exports('MonsterUi', (_dec = ccclass('MonsterUi'), _dec2 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(MonsterUi, _Component);
        function MonsterUi() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "monsterNode", _descriptor, _assertThisInitialized(_this));
          _this._flag = 0;
          return _this;
        }
        var _proto = MonsterUi.prototype;
        _proto.start = function start() {};
        _proto.update = function update(deltaTime) {
          this._flag = 1 - this._flag;
          if (this._flag) {
            this.node.worldPosition = this.monsterNode.worldPosition;
          }
        };
        return MonsterUi;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "monsterNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MonsterVO.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleProprMgr.ts', './DBRecord.ts', './BattleDefine.ts', './RoleBaseVO.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, BattlePropertyName, DMG_ATTR_ID, DBRecord, GameBattle, RoleBaseVO;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
      DMG_ATTR_ID = module.DMG_ATTR_ID;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleBaseVO = module.RoleBaseVO;
    }],
    execute: function () {
      cclegacy._RF.push({}, "ac8bbPPJ2ZHW5Zgf39z4/Bk", "MonsterVO", undefined);

      /**
       * 怪物数据类
       */
      var MonsterVO = exports('MonsterVO', /*#__PURE__*/function (_RoleBaseVO) {
        _inheritsLoose(MonsterVO, _RoleBaseVO);
        function MonsterVO() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleBaseVO.call.apply(_RoleBaseVO, [this].concat(args)) || this;
          /** 怪物编号 */
          _this._id = 0;
          /** 名称 */
          _this._name = "";
          // /** 品质 */
          _this._quality = GameBattle.MonsterQuality.Normal;
          /** AI编号 */
          _this._aiid = 0;
          /** 进度值 */
          _this._progress = 0;
          /** 进度值 */
          _this._size = 0;
          // /**
          //  * 最小追击范围
          //  */
          // private _pursuerange;
          // public get pursuerange() {
          //     return this._pursuerange;
          // }
          // public set pursuerange(value) {
          //     this._pursuerange = value;
          // }
          /**
           * 怪物定义
           * 1=普通怪物
              2=召唤物（主人死亡后消失）
              3=召唤物（到达配置时间后消失）
              4=永远不消失
             */
          _this._definition = void 0;
          _this._morale = 1;
          /**
           * 存活时间
           */
          _this._survivaltime = -1;
          /**
           * 是否可选中
           */
          _this._selected = void 0;
          /**
           * 隐身
           */
          _this._hide = void 0;
          /**
           * 体型
           */
          _this._body_size = 1;
          /**
           * 是否可选中
           */
          _this._res_skin = "";
          _this._publicCD = 0;
          _this._monsterCfg = void 0;
          _this.hpHeight = 0;
          // /** AI */
          // public AIType: number = 0;
          /**Title */
          _this.title = "";
          /**免疫吸附、拉怪 */
          _this.immuneDrag = false;
          return _this;
        }
        var _proto = MonsterVO.prototype;
        _proto.init = function init(id, owner) {
          var _this$_lockRange, _this$crash_box, _this$crash_box2;
          // let guankaCfg: dbr.GuanQia = DBRecord.fetchId('GuanQia', App.battleMgr.challengeGuanQiaId)
          // this._atk = cfg.atk * guankaCfg.atk_coefficient / 10000
          // this._def = cfg.def * guankaCfg.def_coefficient / 10000
          // this._hp = cfg.max_hp * guankaCfg.hp_coefficient / 10000
          this.id = id;
          this._owner = owner;
          var cfg = DBRecord.fetchId("GuaiWu", id);
          this._monsterCfg = cfg;
          (_this$_lockRange = this._lockRange).push.apply(_this$_lockRange, cfg.lockrange);
          this._quality = cfg.type;
          this._viewPath = cfg.res; //`/Monster/${cfg.res}/${cfg.res}`;
          // this._viewPath = cfg.res;
          this._progress = cfg.progress;
          this._pursuerange = cfg.pursuerange;
          this._moveSpeed = cfg.movespeed;
          // this._definition = cfg.definition;
          // this._survivaltime = cfg.survivaltime || -1;
          // this._selected = cfg.selected;
          this._hide = 0; //cfg.hide;
          this._body_size = cfg.size;
          // this._res_skin = cfg.res_skin ?? "";
          cfg.crash_box && (_this$crash_box = this.crash_box).push.apply(_this$crash_box, cfg.crash_box);
          this._offset = cfg.offset;
          this._curHP = cfg.max_hp; //this.getRoleAttr(BattlePropertyName.shengming);

          this._skillIDList = [];
          this.atkId = cfg.atk_id;
          // cfg.skill_id && this._skillIDList.push(...cfg.skill_id);
          // this.AIType = cfg.job;
          // let style = DBRecord.fetchId("DuoYuYan", cfg.style)?.cn || "";
          // let name = DBRecord.fetchId("DuoYuYan", cfg.name)?.cn || "";

          // this._publicCD = cfg.publicCD ?? -1;
          this._init_buff_id = [];
          if (cfg.init_buff_id) {
            var _this$_init_buff_id;
            (_this$_init_buff_id = this._init_buff_id).push.apply(_this$_init_buff_id, cfg.init_buff_id);
          }
          this.morale = cfg.shiqi;

          // this._name = name;
          // this.title = `<${style}>${name}`;

          var jineng_cfg = DBRecord.fetchId("Skill", cfg.atk_id);
          this._atkInterval = jineng_cfg ? jineng_cfg.CD : 1;
          this._size = cfg.size;
          // this.lockOrientation = cfg.lockOrientation;

          //初始化战斗属性列表
          //战斗
          var attItem_atk = {
            id: BattlePropertyName.gongji,
            value: cfg.atk
          };
          //防御
          var attItem_def = {
            id: BattlePropertyName.fangyu,
            value: cfg.def
          };

          //最大生命
          var attItem_hp = {
            id: BattlePropertyName.shengming,
            value: cfg.max_hp
          };

          //攻速
          var attItem_atk_interval = {
            id: BattlePropertyName.gongsu,
            value: 0
          };

          //移速
          var attItem_moveSpeed = {
            id: BattlePropertyName.yisu,
            value: cfg.movespeed
          };

          //易伤
          var attItem_yishang = {
            id: BattlePropertyName.yishang,
            value: 0
          };
          this.battleAttrList.push(attItem_atk);
          this.battleAttrList.push(attItem_def);
          this.battleAttrList.push(attItem_hp);
          this.battleAttrList.push(attItem_atk_interval);
          this.battleAttrList.push(attItem_moveSpeed);
          this.battleAttrList.push(attItem_yishang);
          // this.crash_box = [80, 130];
          cfg.crash_box && (_this$crash_box2 = this.crash_box).push.apply(_this$crash_box2, cfg.crash_box);
          this.hpHeight = 90; //cfg.lifebar;
          this.immuneDrag = false; // cfg.immune_drag > 0;

          this.udtInitAttr();
        }

        //伤害属性-------------------------------------------------------------------------------------------
        ;

        _proto.udtInitAttr = function udtInitAttr() {
          var mInitAttr = {};
          for (var key in DMG_ATTR_ID) {
            mInitAttr[key] = 0;
          }
          var list = this.battleAttrList;
          if (list) {
            list.forEach(function (key, _val) {
              if (DMG_ATTR_ID[key.id]) mInitAttr[key.id] = key.value;
            });
          }

          // const GuanQia: dbr.GuanQia = DBRecord.fetchId("GuanQia", App.battleMgr.challengeGuanQiaId);
          // const GuaiWu = DBRecord.fetchId("GuaiWu", this.id) as dbr.GuaiWu;

          this.hasYiChan = false;
          // let x = 1;
          // if (GuaiWu.type === GameBattle.MonsterQuality.Boss) {
          //     mInitAttr[BattlePropertyName.abs_gongji] = Math.floor(GuaiWu.atk * GuanQia.BOSSatk_coefficient * x);
          //     mInitAttr[BattlePropertyName.abs_fangyu] = Math.floor(GuaiWu.def * GuanQia.BOSSdef_coefficient * x);
          //     mInitAttr[BattlePropertyName.abs_shengming] = Math.floor(GuaiWu.max_hp * GuanQia.BOSShp_coefficient * x);
          // }
          this._mInitAttr = mInitAttr;
          this.clrRoleAttr();
        };
        _proto.reset = function reset() {
          _RoleBaseVO.prototype.reset.call(this);
        };
        _createClass(MonsterVO, [{
          key: "id",
          get: function get() {
            return this._id;
          },
          set: function set(v) {
            this._id = v;
          }
        }, {
          key: "name",
          get: function get() {
            return this._name;
          },
          set: function set(v) {
            this._name = v;
          }
        }, {
          key: "quality",
          get: function get() {
            return this._quality;
          },
          set: function set(v) {
            this._quality = v;
          }
        }, {
          key: "aiid",
          get: function get() {
            return this._aiid;
          },
          set: function set(v) {
            this._aiid = v;
          }
        }, {
          key: "progress",
          get: function get() {
            return this._progress;
          },
          set: function set(v) {
            this._progress = v;
          }
        }, {
          key: "size",
          get: function get() {
            return this._size;
          },
          set: function set(v) {
            this._size = v;
          }
        }, {
          key: "definition",
          get: function get() {
            return this._definition;
          },
          set: function set(value) {
            this._definition = value;
          }
        }, {
          key: "morale",
          get: function get() {
            return this._morale;
          },
          set: function set(value) {
            this._morale = value;
          }
        }, {
          key: "survivaltime",
          get: function get() {
            return this._survivaltime;
          },
          set: function set(value) {
            this._survivaltime = value;
          }
        }, {
          key: "selected",
          get: function get() {
            return this._selected;
          },
          set: function set(value) {
            this._selected = value;
          }
        }, {
          key: "hide",
          get: function get() {
            return this._hide;
          },
          set: function set(value) {
            this._hide = value;
          }
        }, {
          key: "body_size",
          get: function get() {
            return this._body_size;
          },
          set: function set(value) {
            this._body_size = value;
          }
        }, {
          key: "res_skin",
          get: function get() {
            return this._res_skin;
          },
          set: function set(value) {
            this._res_skin = value;
          }
        }, {
          key: "publicCD",
          get: function get() {
            return this._publicCD;
          },
          set: function set(value) {
            this._publicCD = value;
          }
        }, {
          key: "monsterCfg",
          get: function get() {
            return this._monsterCfg;
          }
        }]);
        return MonsterVO;
      }(RoleBaseVO));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MoraleSystem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Label, Component, GameBattle;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Component = module.Component;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "453c0jnhFNJ2Z2XZdLCgcGJ", "MoraleSystem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 士气系统
       * 负责管理战斗中的士气值、兵种激活和升阶功能
       */
      var MoraleSystem = exports('MoraleSystem', (_dec = ccclass("MoraleSystem"), _dec2 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(MoraleSystem, _Component);
        function MoraleSystem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "moraleLabel", _descriptor, _assertThisInitialized(_this));
          // 当前士气值
          _this._currentMorale = 0;
          // 最大士气值
          _this._maxMorale = 1000;
          // 兵种激活状态
          _this._activatedSoldierTypes = new Set();
          // 兵种阶数信息
          _this._soldierStageMap = new Map();
          // 配置：兵种激活所需士气
          _this._activationCostConfig = new Map([[GameBattle.SoldierType.Infantry, 0],
          // 步兵默认激活
          [GameBattle.SoldierType.Archer, 100],
          // 弓兵需要100士气
          [GameBattle.SoldierType.Cavalry, 200],
          // 骑兵需要200士气
          [GameBattle.SoldierType.Mage, 250],
          // 法师需要250士气
          [GameBattle.SoldierType.Shield, 150] // 盾兵需要150士气
          ]);
          // 配置：兵种升阶所需士气
          _this._upgradeCostConfig = new Map([[1, 50],
          // 1阶升2阶
          [2, 100],
          // 2阶升3阶
          [3, 200],
          // 3阶升4阶
          [4, 300],
          // 4阶升5阶（觉醒）
          [5, 400],
          // 5阶升6阶
          [6, 500],
          // 6阶升7阶
          [7, 600],
          // 7阶升8阶
          [8, 700],
          // 8阶升9阶
          [9, 800] // 9阶升10阶
          ]);
          // 升级回调
          _this._onUpgradeCallback = null;
          // 激活回调
          _this._onActivateCallback = null;
          return _this;
        }
        var _proto = MoraleSystem.prototype;
        /**
         * 初始化士气系统
         */
        _proto.init = function init(params) {
          var _this2 = this;
          this._maxMorale = params.maxMorale || 1000;
          this._currentMorale = params.initialMorale || 0;
          this._onUpgradeCallback = params.onUpgrade;
          this._onActivateCallback = params.onActivate;

          // 初始化数据
          this._activatedSoldierTypes.clear();
          this._soldierStageMap.clear();

          // 默认激活步兵
          this._activatedSoldierTypes.add(GameBattle.SoldierType.Infantry);
          this._soldierStageMap.set(GameBattle.SoldierType.Infantry, 1);

          // 其他兵种初始为0阶
          Object.values(GameBattle.SoldierType).forEach(function (type) {
            if (type !== GameBattle.SoldierType.Infantry && typeof type === "number") {
              _this2._soldierStageMap.set(type, 0);
            }
          });
          this.updateMoraleDisplay();
        }

        /**
         * 获取当前士气值
         */;
        /**
         * 添加士气值
         */
        _proto.addMorale = function addMorale(amount) {
          var oldMorale = this._currentMorale;
          this._currentMorale += amount;

          // 确保不超过最大值
          if (this._currentMorale > this._maxMorale) {
            this._currentMorale = this._maxMorale;
          }
          this.updateMoraleDisplay();
          return this._currentMorale - oldMorale; // 返回实际增加的士气值
        }

        /**
         * 消耗士气值
         */;
        _proto.consumeMorale = function consumeMorale(amount) {
          if (this._currentMorale >= amount) {
            this._currentMorale -= amount;
            this.updateMoraleDisplay();
            return true;
          }
          return false;
        }

        /**
         * 检查兵种是否已激活
         */;
        _proto.isSoldierTypeActivated = function isSoldierTypeActivated(soldierType) {
          return this._activatedSoldierTypes.has(soldierType);
        }

        /**
         * 获取兵种当前阶数
         */;
        _proto.getSoldierStage = function getSoldierStage(soldierType) {
          return this._soldierStageMap.get(soldierType) || 0;
        }

        /**
         * 激活兵种
         */;
        _proto.activateSoldierType = function activateSoldierType(soldierType) {
          // 激活兵种
          this._activatedSoldierTypes.add(soldierType);
          this._soldierStageMap.set(soldierType, 1); // 激活后为1阶

          // 触发回调
          if (this._onActivateCallback) {
            this._onActivateCallback(soldierType);
          }
          console.log("Soldier type " + soldierType + " activated successfully");
          return true;
        }

        /**
         * 升阶兵种
         */;
        _proto.upgradeSoldierType = function upgradeSoldierType(soldierType, maxLevelLimit) {
          if (maxLevelLimit === void 0) {
            maxLevelLimit = 10;
          }
          // 检查兵种是否已激活
          if (!this.isSoldierTypeActivated(soldierType)) {
            console.log("Soldier type " + soldierType + " is not activated");
            return false;
          }
          var currentLevel = this.getSoldierStage(soldierType);

          // 检查是否已达到上限
          if (currentLevel >= maxLevelLimit) {
            console.log("Soldier type " + soldierType + " already reached max level " + maxLevelLimit);
            return false;
          }

          // 检查是否可以继续升级
          var upgradeCost = this._upgradeCostConfig.get(currentLevel);
          if (upgradeCost === undefined) {
            console.error("Upgrade cost not defined for level " + currentLevel);
            return false;
          }

          // 检查士气是否足够
          if (!this.consumeMorale(upgradeCost)) {
            console.log("Not enough morale to upgrade soldier type " + soldierType + " from level " + currentLevel + " to " + (currentLevel + 1));
            return false;
          }

          // 升阶
          var newLevel = currentLevel + 1;
          this._soldierStageMap.set(soldierType, newLevel);

          // 触发回调
          if (this._onUpgradeCallback) {
            this._onUpgradeCallback(soldierType, newLevel);
          }
          console.log("Soldier type " + soldierType + " upgraded to level " + newLevel);
          return true;
        }

        /**
         * 获取兵种激活所需士气
         */;
        _proto.getActivationCost = function getActivationCost(soldierType) {
          return this._activationCostConfig.get(soldierType) || 0;
        }

        /**
         * 获取兵种升阶所需士气
         */;
        _proto.getUpgradeCost = function getUpgradeCost(currentLevel) {
          return this._upgradeCostConfig.get(currentLevel) || 0;
        }

        /**
         * 检查是否可以激活兵种
         */;
        _proto.canActivateSoldierType = function canActivateSoldierType(soldierType) {
          if (this.isSoldierTypeActivated(soldierType)) {
            return false;
          }
          var cost = this.getActivationCost(soldierType);
          return this._currentMorale >= cost;
        }

        /**
         * 检查是否可以升阶兵种
         */;
        _proto.canUpgradeSoldierType = function canUpgradeSoldierType(soldierType, maxLevelLimit) {
          if (maxLevelLimit === void 0) {
            maxLevelLimit = 10;
          }
          if (!this.isSoldierTypeActivated(soldierType)) {
            return false;
          }
          var currentLevel = this.getSoldierStage(soldierType);
          if (currentLevel >= maxLevelLimit) {
            return false;
          }
          var upgradeCost = this.getUpgradeCost(currentLevel);
          return this._currentMorale >= upgradeCost;
        }

        /**
         * 获取所有已激活的兵种类型
         */;
        _proto.getActivatedSoldierTypes = function getActivatedSoldierTypes() {
          return Array.from(this._activatedSoldierTypes);
        }

        /**
         * 获取所有兵种的阶数信息
         */;
        _proto.getAllSoldierLevels = function getAllSoldierLevels() {
          return new Map(this._soldierStageMap);
        }

        /**
         * 更新士气显示
         */;
        _proto.updateMoraleDisplay = function updateMoraleDisplay() {
          if (this.moraleLabel) {
            this.moraleLabel.string = this._currentMorale + "/" + this._maxMorale;
          }
        }

        /**
         * 重置士气系统
         */;
        _proto.reset = function reset() {
          this._currentMorale = 0;
          this._activatedSoldierTypes.clear();
          this._soldierStageMap.clear();

          // 重新默认激活步兵
          this._activatedSoldierTypes.add(GameBattle.SoldierType.Infantry);
          this._soldierStageMap.set(GameBattle.SoldierType.Infantry, 1);
          this.updateMoraleDisplay();
        };
        _createClass(MoraleSystem, [{
          key: "currentMorale",
          get: function get() {
            return this._currentMorale;
          }

          /**
           * 设置当前士气值
           */,
          set: function set(value) {
            this._currentMorale = value;
          }

          /**
           * 获取最大士气值
           */
        }, {
          key: "maxMorale",
          get: function get() {
            return this._maxMorale;
          }

          /**
           * 获取士气百分比
           */
        }, {
          key: "moralePercentage",
          get: function get() {
            return this._currentMorale / this._maxMorale;
          }
        }]);
        return MoraleSystem;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "moraleLabel", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MovingSoldierNPC.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ActionFramesItem.ts', './ModuleDef.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Vec3, Component, ActionFramesItem, ModuleDef, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "a3f8efWXEs6LZ4fi3xtXk86", "MovingSoldierNPC", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 移动中的士兵NPC
       * 从孵化中心走向兵营
       */
      var MovingSoldierNPC = exports('MovingSoldierNPC', (_dec = ccclass("MovingSoldierNPC"), _dec2 = property(ActionFramesItem), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(MovingSoldierNPC, _Component);
        function MovingSoldierNPC() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /**
           * 序列帧动画组件
           */
          _initializerDefineProperty(_this, "actionFrames", _descriptor, _assertThisInitialized(_this));
          /**
           * NPC的唯一ID
           */
          _this._npcId = -1;
          /**
           * 移动速度
           */
          _initializerDefineProperty(_this, "moveSpeed", _descriptor2, _assertThisInitialized(_this));
          /**
           * 路径点数组
           */
          _this._pathPoints = [];
          /**
           * 当前目标路径点索引
           */
          _this._currentPointIndex = 0;
          /**
           * 到达回调
           */
          _this._onArriveCallback = null;
          /**
           * 是否已到达
           */
          _this._hasArrived = false;
          /**
           * 路径点朝向映射表
           */
          _this._faceMap = null;
          return _this;
        }
        var _proto = MovingSoldierNPC.prototype;
        _proto.onEnable = function onEnable() {
          // this.actionFrames.node.setScale(0.7, 0.7, 1);
        }

        /**
         * 开始移动到目标位置
         * @param targetPos 目标位置
         * @param onArrive 到达回调
         * @param npcId NPC ID
         * @param resourceConfig
         */;
        _proto.startMoveTo = function startMoveTo(targetPos, onArrive, npcId, resourceConfig) {
          if (npcId === void 0) {
            npcId = -1;
          }
          if (resourceConfig === void 0) {
            resourceConfig = null;
          }
          this.startMoveAlongPath([targetPos], onArrive, npcId, null, resourceConfig);
        }

        /**
         * 开始沿路径点移动
         * @param pathPoints 路径点数组
         * @param onArrive 到达终点回调
         * @param npcId NPC ID
         * @param faceMap 路径点朝向映射表
         * @param resourceConfig
         */;
        _proto.startMoveAlongPath = function startMoveAlongPath(pathPoints, onArrive, npcId, faceMap, resourceConfig) {
          if (npcId === void 0) {
            npcId = -1;
          }
          if (faceMap === void 0) {
            faceMap = null;
          }
          if (resourceConfig === void 0) {
            resourceConfig = null;
          }
          if (!pathPoints || pathPoints.length === 0) {
            return;
          }
          this._pathPoints = pathPoints;
          this._currentPointIndex = 0;
          this._onArriveCallback = onArrive;
          this._hasArrived = false;
          this._npcId = npcId;
          this._faceMap = faceMap;
          this.enabled = true;
          if (resourceConfig) {
            this.actionFrames.playWithResource(resourceConfig.module, resourceConfig.name, resourceConfig.action);
          } else {
            this.actionFrames.playWithResource(ModuleDef.NPC, "npc_xiaoji", "Move");
          }

          // 设置初始朝向
          if (this._faceMap) {
            var initialDirection = this._faceMap.get(1) || 1;
            this.setFaceDirection(initialDirection);
          }
        };
        _proto.update = function update(dt) {
          if (this._hasArrived || this._pathPoints.length === 0 || this._currentPointIndex >= this._pathPoints.length) {
            return;
          }
          var targetPos = this._pathPoints[this._currentPointIndex];
          var currentPos = this.node.getPosition();
          var direction = new Vec3();
          Vec3.subtract(direction, targetPos, currentPos);
          var distance = direction.length();
          if (distance < 1) {
            this.node.setPosition(targetPos);
            this._currentPointIndex++;
            if (this._currentPointIndex < this._pathPoints.length && this._faceMap) {
              var faceDirection = this._faceMap.get(this._currentPointIndex) || 1;
              this.setFaceDirection(faceDirection);
            }
            if (this._currentPointIndex >= this._pathPoints.length) {
              this._hasArrived = true;
              this.enabled = false;
              if (this._onArriveCallback) {
                this._onArriveCallback(this._npcId, this);
              }
            }
            return;
          }
          var moveDistance = this.moveSpeed * dt;
          if (moveDistance >= distance) {
            this.node.setPosition(targetPos);
            this._currentPointIndex++;
            if (this._currentPointIndex < this._pathPoints.length && this._faceMap) {
              var _faceDirection = this._faceMap.get(this._currentPointIndex) || 1;
              this.setFaceDirection(_faceDirection);
            }
            if (this._currentPointIndex >= this._pathPoints.length) {
              // 到达所有路径点
              this._hasArrived = true;
              this.enabled = false;
              if (this._onArriveCallback) {
                this._onArriveCallback(this._npcId, this);
              }
            }
          } else {
            direction.normalize();
            var newPos = currentPos.add(direction.multiplyScalar(moveDistance));
            this.node.setPosition(newPos);
          }
        }

        /**
         * 获取NPC ID
         */;
        _proto.stopAndDestroy = function stopAndDestroy(poolName) {
          this._hasArrived = true;
          this.enabled = false;
          this._onArriveCallback = null;
          this._pathPoints = [];

          // 重置动画状态
          this.actionFrames.stop();
          this.resetState();
          if (this.node && this.node.isValid) {
            this.node.removeFromParent();
            App.nodePoolMgr.putNode(poolName, this.node);
          }
        }

        /**
         * 重置节点状态
         */;
        _proto.resetState = function resetState() {
          this._pathPoints = [];
          this._currentPointIndex = 0;
          this._hasArrived = false;
          this._npcId = -1;
          this._faceMap = null;
          this._onArriveCallback = null;
          this.node.setPosition(0, 0, 0);
          this.node.setScale(1, 1, 1);
          this.enabled = false;
        }

        /**
         * 设置朝向
         * @param faceDirection 朝向方向，1为向左，2为向右
         */;
        _proto.setFaceDirection = function setFaceDirection(faceDirection) {
          if (faceDirection === 2) {
            this.node.setScale(new Vec3(1, 1, 1));
          } else {
            this.node.setScale(new Vec3(-1, 1, 1));
          }
        };
        _createClass(MovingSoldierNPC, [{
          key: "npcId",
          get: function get() {
            return this._npcId;
          }

          /**
           * 是否已到达
           */
        }, {
          key: "hasArrived",
          get: function get() {
            return this._hasArrived;
          }
        }]);
        return MovingSoldierNPC;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "actionFrames", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "moveSpeed", [property], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 100;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MultSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, Material, director, game, Game, sp;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Material = module.Material;
      director = module.director;
      game = module.game;
      Game = module.Game;
      sp = module.sp;
    }],
    execute: function () {
      cclegacy._RF.push({}, "2c2663Bsq9F67bl3E5pEUwf", "MultSpine", undefined);
      var _spineTexture = null;
      var _spineBuffers = null;
      var _texCaches = new Map();
      var _materialMaps = new Map();

      //@ts-ignore
      Material.prototype.spineCache = [];
      var SpineBatch = exports('SpineBatch', {
        enable: false,
        parent: null,
        next: function next() {
          _texCaches.clear();
        },
        reset: function reset() {
          this.next();
        },
        active: function active() {
          return this.enable && this.parent;
        },
        update: function update() {
          var _spineTexture2;
          if (!this.active()) return;
          var b2d = director.root.batcher2D;
          //@ts-ignore
          if (b2d && b2d.matkey !== undefined) b2d.matkey = -1;
          for (var _iterator = _createForOfIteratorHelperLoose(_materialMaps.values()), _step; !(_step = _iterator()).done;) {
            var value = _step.value;
            if (value) {
              value.n = 0;
            }
          }
          (_spineTexture2 = _spineTexture) == null || _spineTexture2.uploadData(_spineBuffers);
        }
      });

      //游戏启动前，务必加载多纹理材质
      game.once(Game.EVENT_GAME_INITED, function () {
        return;
      });

      // director.on(Director.EVENT_AFTER_DRAW, (dt) => { SpineBatch.reset(); });
      // director.on(Director.EVENT_BEFORE_COMMIT, (dt) => { SpineBatch.update(); });

      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      //以下代码，仅供测试demo使用，请不要在项目中使用
      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      var changeBatch = function changeBatch(node, batch) {
        if (!node) return;
        var skeleton = node.getComponent(sp.Skeleton);
        if (skeleton) {
          skeleton.enableBatch = batch;
          skeleton.material = null;
          //@ts-ignore
          skeleton._updateBatch();
        }
        var childs = node.children;
        for (var i = 0; i < childs.length; i++) {
          changeBatch(childs[i], batch);
        }
      };
      var switchMultSpine = exports('switchMultSpine', function switchMultSpine(useMult, useBatch) {
        SpineBatch.enable = useMult;
        if (!useMult) {
          var Skeleton = sp.Skeleton.prototype;
          Object.defineProperty(Skeleton, "enableBatch", {
            get: function get() {
              return this._enableBatch;
            },
            set: function set(value) {
              if (value !== this._enableBatch) {
                this._enableBatch = value;
                this._updateBatch();
              }
            }
          });
        } else {
          var _Skeleton = sp.Skeleton.prototype;
          Object.defineProperty(_Skeleton, "enableBatch", {
            get: function get() {
              return this._enableBatch;
            },
            set: function set(value) {
              this._enableBatch = false;
            }
          });
        }
        var scene = director.getScene();
        if (scene) {
          changeBatch(scene, useBatch);
        }
      });

      // */
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MultTextures.ts", ['cc'], function (exports) {
  var cclegacy, game, Game, UIRenderer, VERSION, Sprite, director, Director, StencilManager, assert, assetManager, Material, renderer, TiledLayer, MotionStreak, ParticleSystem2D;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      game = module.game;
      Game = module.Game;
      UIRenderer = module.UIRenderer;
      VERSION = module.VERSION;
      Sprite = module.Sprite;
      director = module.director;
      Director = module.Director;
      StencilManager = module.StencilManager;
      assert = module.assert;
      assetManager = module.assetManager;
      Material = module.Material;
      renderer = module.renderer;
      TiledLayer = module.TiledLayer;
      MotionStreak = module.MotionStreak;
      ParticleSystem2D = module.ParticleSystem2D;
    }],
    execute: function () {
      cclegacy._RF.push({}, "860b9YYaztHgpa6I6+XfOt0", "MultTextures", undefined);
      var MultBatch2D = exports('MultBatch2D', {
        enable: false,
        parent: null,
        textures: [],
        hash: 0,
        reset: function reset() {
          this.textures.length = 0;
        }
      });
      var loadMultTextures = function loadMultTextures() {
        console.error("loadMultTextures");
        MultBatch2D.enable = false; //提前加载多纹理材质
        assetManager.loadBundle("multTextures", function (err, bundle) {
          bundle.load("Mult-material", Material, function (err, material) {
            if (!err) {
              var mat = cclegacy.builtinResMgr.get("ui-sprite-material");
              if (mat) {
                MultBatch2D.hash = Material.getHash(mat);
                MultBatch2D.parent = material;
                MultBatch2D.enable = true;
                material.addRef();
              }
            }
          });
        });
      };
      var _cacheUseCount = 0;
      var _cacheMaterials = [];
      var getMultMaterial = function getMultMaterial(oldMat) {
        MultBatch2D.reset();
        if (!MultBatch2D.enable || !oldMat || !oldMat.isMultTextures) {
          return oldMat;
        }
        if (!MultBatch2D.parent || !MultBatch2D.parent.isValid) {
          loadMultTextures();
          return oldMat;
        }

        //if (!MultBatch2D.enable) return null;
        var newMat = _cacheMaterials[_cacheUseCount++];
        if (!newMat || !newMat.isValid) {
          var material = {
            parent: MultBatch2D.parent
          };
          newMat = new renderer.MaterialInstance(material);
          _cacheMaterials[_cacheUseCount - 1] = newMat;
          newMat["isMultTextures"] = true;
          newMat["cacheTextures"] = [-1];
          newMat.addRef();
        }
        return newMat;
      };

      //如果有异常组件，或者自定义组件，
      //在这进行添加排除,不参与多纹理合批
      var excludeMaterial = function excludeMaterial(uir, material) {
        if (!material) return;
        var enable = true;
        if (enable && TiledLayer) {
          enable = !(uir instanceof TiledLayer);
        }
        if (enable && MotionStreak) {
          enable = !(uir instanceof MotionStreak);
        }
        if (enable && ParticleSystem2D) {
          enable = !(uir instanceof ParticleSystem2D);
        }
        material["isMultTextures"] = false;
        if (enable && MultBatch2D.hash === material.hash) {
          material["isMultTextures"] = true;
        }
      };
      game.once(Game.EVENT_GAME_INITED, function () {
        loadMultTextures();
        var UIR = UIRenderer.prototype;
        var updateMaterial = UIR.updateMaterial;
        UIR.updateMaterial = function () {
          updateMaterial.call(this); //this.getSharedMaterial(0);
          excludeMaterial(this, this.customMaterial || this.material);
        };
      });
      game.once(Game.EVENT_ENGINE_INITED, function () {
        cclegacy.UI.RenderData.prototype.texID = -1;
        cclegacy.UI.RenderData.prototype.isSpr = false;
        cclegacy.UI.RenderData.prototype.texDirty = true;
        cclegacy.UI.RenderData.prototype.dataDirty = 0x0;
        Object.defineProperty(cclegacy.UI.RenderData.prototype, "vertDirty", {
          get: function get() {
            return this._vertDirty;
          },
          set: function set(val) {
            this._vertDirty = val;
            if (val === true && !this.isSpr) {
              this.dataDirty |= 1;
            }
            if (this._renderDrawInfo && val) {
              this._renderDrawInfo.setVertDirty(val);
            }
          }
        });
        Object.defineProperty(cclegacy.UI.RenderData.prototype, "textureDirty", {
          get: function get() {
            return this.texDirty;
          },
          set: function set(val) {
            this.texDirty = val;
            if (val === true) {
              this.texID = -1;
            }
          }
        });
        var str = VERSION.concat();
        str = str.replace(".", "").replace(".", "");
        if (parseInt(str) < 384) {
          //修复 renderManager 刷新 bug

          var UIR = UIRenderer.prototype;
          var markForUpdateRenderData = UIR.markForUpdateRenderData;
          UIR.markForUpdateRenderData = function (enable) {
            if (enable === void 0) {
              enable = true;
            }
            markForUpdateRenderData.call(this, enable);
            if (enable && this.renderData) {
              if (!this.renderData.isSpr) this.renderData.dataDirty |= 2;
            }
          };
          var updateRenderer = UIR.updateRenderer;
          UIR.updateRenderer = function () {
            updateRenderer.call(this);
            if (this.renderData) {
              if (!this.renderData.isSpr) this.renderData.dataDirty &= ~2;
            }
          };
        }
        var SPRA = cclegacy.UI.spriteAssembler;
        if (SPRA) {
          var spriteAssembler = SPRA.getAssembler;
          SPRA.getAssembler = function (sprite) {
            var spr = spriteAssembler.call(this, sprite);
            if (spr.changeUV === undefined) {
              spr.changeUV = function (s) {
                var rd = s.renderData;
                if (rd) {
                  rd.dataDirty = 1;
                  rd.isSpr = true;
                }
              };
              var UVs = spr.updateUVs;
              if (UVs) {
                if (sprite.type === Sprite.Type.FILLED && sprite.fillType !== Sprite.FillType.RADIAL) {
                  spr.updateUVs = function (s, f0, f1) {
                    UVs.call(this, s, f0, f1);
                    this.changeUV(s);
                  };
                } else {
                  spr.updateUVs = function (s) {
                    UVs.call(this, s);
                    this.changeUV(s);
                  };
                }
              }
              var verUV = spr.updateWorldVertexAndUVData;
              if (verUV) {
                spr.updateWorldVertexAndUVData = function (s, c) {
                  verUV.call(this, s, c);
                  this.changeUV(s);
                };
              }
            }
            return spr;
          };
        }
        cclegacy.internal.Batcher2D.prototype.cacheTextures = [];
        cclegacy.internal.Batcher2D.prototype.currMaterial = null;
        cclegacy.internal.Batcher2D.prototype.isMultTextures = false;
        Object.defineProperty(cclegacy.internal.Batcher2D.prototype, "_currMaterial", {
          get: function get() {
            return this.currMaterial;
          },
          set: function set(metrial) {
            if (this.currMaterial === metrial) return;
            this.currMaterial = getMultMaterial(metrial);
            if (MultBatch2D.enable) {
              this.isMultTextures = false;
              if (this.currMaterial && this.currMaterial.isMultTextures) {
                this.cacheTextures = this.currMaterial.cacheTextures;
                this.isMultTextures = true;
              }
            }
          }
        });
        director.on(Director.EVENT_AFTER_DRAW, function (dt) {
          cclegacy.internal.Batcher2D.isMultTextures = false;
          cclegacy.internal.Batcher2D._rdHash = -1;
          MultBatch2D.reset();
          _cacheUseCount = 0;
        });
        var MAX_TEX = 8;
        var _texture = {
          texture: new cclegacy.SimpleTexture(),
          defalut: new cclegacy.SimpleTexture(),
          setFrame: function setFrame(frame) {
            this.texture["_gfxSampler"] = frame.getGFXSampler();
            this.texture["_gfxTextureView"] = frame.getGFXTexture();
          }
        };
        var Stage_ENTER_LEVEL = 2;
        var Stage_ENTER_LEVEL_INVERTED = 6;
        cclegacy.internal.Batcher2D.prototype._rdHash = -1;
        //@ts-ignore

        cclegacy.internal.Batcher2D.prototype.commitComp = function (comp, renderData, frame, assembler, transform) {
          var rdHash = -1;
          var dataHash = 0;
          var mat;
          var bufferID = -1;
          if (renderData && renderData.chunk) {
            if (!renderData.isValid()) return;
            dataHash = renderData.dataHash;
            mat = renderData.material;
            bufferID = renderData.chunk.bufferId;
            // as RenderData;
            var rd = renderData;
            rdHash = bufferID << 16 | rd.layer;
          }

          // Notice: A little hack, if it is for mask, not need update here, while control by stencilManger
          if (comp.stencilStage === Stage_ENTER_LEVEL || comp.stencilStage === Stage_ENTER_LEVEL_INVERTED) {
            this._insertMaskBatch(comp);
          } else {
            comp.stencilStage = StencilManager.sharedManager.stage;
          }
          var depthStencilStateStage = comp.stencilStage;
          var texID = -1;
          var texture = null;
          var MB = MultBatch2D;
          var flushBatch = false;
          var isMultTextures = false;
          var textures = MultBatch2D.textures;
          if (MB.enable && mat && mat.isMultTextures) {
            if (frame && frame.isValid) texture = frame.getGFXTexture();
            if (texture) {
              texID = textures.indexOf(texture);
              isMultTextures = true;
              if (texID < 0) {
                if (textures.length === MAX_TEX) {
                  flushBatch = true;
                }
              }
              if (this.isMultTextures) {
                mat = this._currMaterial;
                dataHash = this._currHash;
                if (this._rdHash !== rdHash) {
                  flushBatch = true;
                  texID = -1;
                }
              }
            }
          }
          if (flushBatch || this._currHash !== dataHash || dataHash === 0 || this._currMaterial !== mat || this._currDepthStencilStateStage !== depthStencilStateStage) {
            // Merge all previous data to a render batch, and update buffer for next render data
            this.autoMergeBatches(this._currComponent);
            if (renderData && !renderData._isMeshBuffer) {
              this.updateBuffer(renderData.vertexFormat, bufferID);
            }
            this._rdHash = rdHash;
            this._currRenderData = renderData;
            this._currHash = renderData ? renderData.dataHash : 0;
            this._currComponent = comp;
            this._currTransform = transform;
            this._currMaterial = comp.getRenderMaterial(0);
            this._currDepthStencilStateStage = depthStencilStateStage;
            this._currLayer = comp.node.layer;
            if (frame) {
              {
                assert(frame.isValid, "frame should not be invalid, it may have been released");
              }
              this._currTexture = frame.getGFXTexture();
              this._currSampler = frame.getGFXSampler();
              this._currTextureHash = frame.getHash();
              this._currSamplerHash = this._currSampler.hash;
            } else {
              this._currTexture = null;
              this._currSampler = null;
              this._currTextureHash = 0;
              this._currSamplerHash = 0;
            }
          }
          assembler.fillBuffers(comp, this);
          if (isMultTextures) {
            if (texID < 0) {
              texID = textures.length;
              textures.push(texture);
              if (texID > 0) {
                //@ts-ignore
                var id = texture.objectID;
                var caches = this.cacheTextures;
                if (caches[texID] !== id) {
                  caches[texID] = id;
                  _texture.setFrame(frame);
                  var name = "texture" + texID;
                  this._currMaterial.setProperty(name, _texture.texture);
                }
              }
            }
            this._fillDatas(renderData, texID);
          }
        };
        cclegacy.internal.Batcher2D.prototype["_fillDatas"] = function (renderData, texID) {
          if (!renderData) return;
          var uvX = 0;
          var vbuf = renderData.chunk.vb;
          if (renderData.dataDirty === 1) {
            for (var i = 0, length = vbuf.length; i < length; i += 9) {
              uvX = ~~(vbuf[i + 3] * 100000);
              vbuf[i + 3] = uvX * 10 + texID;
            }
          } else {
            if (renderData.texID !== texID) {
              for (var _i = 0, _length = vbuf.length; _i < _length; _i += 9) {
                uvX = ~~(vbuf[_i + 3] * 0.1);
                vbuf[_i + 3] = uvX * 10 + texID;
              }
            }
          }
          renderData.dataDirty = 0;
          renderData.texID = texID;
        };
      });

      //*/
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/MyBulletLauncher.ts", ['cc', './BattleDefine.ts', './App.ts'], function (exports) {
  var cclegacy, Vec3, v3, GameBattle, App;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
      v3 = module.v3;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a6a39C2IelJ5abdjhj2m+6o", "MyBulletLauncher", undefined);
      var MyBulletLauncher = exports('MyBulletLauncher', /*#__PURE__*/function () {
        function MyBulletLauncher() {}
        MyBulletLauncher.addBullet = function addBullet(skillVo, bulletID, bulletVo) {
          if (!App.battleMgr.checkBattleStart()) {
            return;
          }
          var owner = skillVo.owner;
          var target = skillVo.getTarget();
          var delayTime = skillVo.launch_interval;
          var bo_shu = skillVo.launch_delay;
          var count = skillVo.bullet_number;
          var targetList = [];
          var angle = skillVo.launch_angle;
          if (bulletVo.type === GameBattle.BulletType.LockNoSame) {
            var allTargets = App.battleMgr.roleCtrl.getRolesByType(target.type);
            var range = skillVo.distance[1];
            for (var i in allTargets) {
              var role = allTargets[i];
              var distance = Vec3.distance(skillVo.owner.node.worldPosition, role.node.worldPosition);
              if (distance > range) {
                continue;
              }
              if (targetList.length === count) {
                break;
              }
              targetList.push(role);
            }
            count = Math.min(count, targetList.length);
          } else if (bulletVo.type === GameBattle.BulletType.LockNoSame2) {
            targetList = this.getTargetListLockNoSame2(skillVo, target);
            count = Math.min(count, targetList.length);
          } else if (bulletVo.type === GameBattle.BulletType.LockNoSame3) {
            var _allTargets = App.battleMgr.roleCtrl.getRolesByType(target.type);
            var _range = skillVo.distance[1];
            for (var _i in _allTargets) {
              var _role = _allTargets[_i];
              var _distance = Vec3.distance(skillVo.owner.node.worldPosition, _role.node.worldPosition);
              if (_distance > _range) {
                continue;
              }
              targetList.push(_role);
            }
            count = Math.min(count, targetList.length);
          }
          var countLockNoSame3 = 0;
          for (var j = 0; j < bo_shu; j++) {
            for (var _i2 = 0; _i2 < count; _i2++) {
              var bullet = App.battleMgr.bulletCtrl.createBullet(bulletVo);
              bullet.owner = owner;
              bullet.skill = skillVo;
              if (bulletVo.type === GameBattle.BulletType.LockNoSame3) {
                bullet.target = targetList[++countLockNoSame3 % targetList.length];
              } else {
                var isLockNoSame = bulletVo.type === GameBattle.BulletType.LockNoSame || bulletVo.type === GameBattle.BulletType.LockNoSame2;
                bullet.target = isLockNoSame ? targetList[_i2] : target;
              }
              bullet.launcherTime = j * delayTime;
              bullet.launchered = false;
              bullet.node.active = false;
              bullet.indexInSkill = j;
              this._bulletQueue.push([bullet, {
                index: _i2,
                count: count,
                angle: angle
              }]);
            }
          }
        };
        MyBulletLauncher.addSubBullet = function addSubBullet(bulletVo, skillVo, pos, count, angle, bulletTheta) {
          if (bulletTheta === void 0) {
            bulletTheta = 0;
          }
          if (!App.battleMgr.checkBattleStart()) {
            return [];
          }
          var target = skillVo.getTarget();
          var targetList = [];
          if (bulletVo.type === GameBattle.BulletType.LockNoSame) {
            var allTargets = App.battleMgr.roleCtrl.getRolesByType(target.type);
            var range = skillVo.distance[1];
            for (var i in allTargets) {
              var role = allTargets[i];
              var distance = Vec3.distance(skillVo.owner.node.worldPosition, role.node.worldPosition);
              if (distance > range) {
                continue;
              }
              if (targetList.length === count) {
                break;
              }
              targetList.push(role);
            }
            count = Math.min(count, targetList.length);
          }

          // //创建在目标身上的子弹，如果没有目标则返回
          // if(bulletVo.moveType===GameBattle.BulletMoveType.onTarget&&targetList.length<=0&&!target){
          //     return;
          // }

          var dummy_pos = skillVo.owner.getLocalMountPoint(bulletVo.position, v3(0, 0, 0));
          var fire_pos = pos.clone().add(dummy_pos);
          var list = [];
          for (var _i3 = 0; _i3 < count; _i3++) {
            var subBullet = App.battleMgr.bulletCtrl.createBullet(bulletVo);
            subBullet.owner = skillVo.owner;
            subBullet.skill = skillVo;
            // subBullet.target = target;
            subBullet.target = bulletVo.type === GameBattle.BulletType.LockNoSame ? targetList[_i3] : target;
            subBullet.launcherTime = 0;
            subBullet.launchered = false;
            subBullet.node.active = false;
            var theta = bulletTheta * Math.ceil(_i3 / 2) * (_i3 % 2 === 0 ? -1 : 1);
            subBullet.node.angle = angle + theta;
            var degrees = subBullet.node.angle; // 假设角度为 45 度
            var radians = degrees * Math.PI / 180; // 转换为弧度

            // 2. 计算方向向量的 x 和 y 分量
            var directionX = Math.cos(radians);
            var directionY = Math.sin(radians);
            subBullet.bulletMovement.direction.set(directionX, directionY);
            var p = fire_pos.clone();
            if (bulletVo.offset.length > 0) {
              // let x = Utils.GetRandomNum(bulletVo.offset[0][0], bulletVo.offset[0][1]);
              // let y = Utils.GetRandomNum(bulletVo.offset[1][0], bulletVo.offset[1][1]);
              if (bulletVo.offset[_i3]) {
                var x = bulletVo.offset[_i3][0];
                var y = bulletVo.offset[_i3][1];
                p.add3f(x, y, 0);
              }
            }
            this._subBulletQueue.push([subBullet, {
              pos: p,
              index: _i3,
              count: count,
              angle: angle
            }]);
            list.push(subBullet);
          }
          return list;
        };
        MyBulletLauncher.onUpdate = function onUpdate(dt) {
          var _this$_bulletQueue, _this$_subBulletQueue;
          var temp = [];
          while (this._bulletQueue.length > 0) {
            var data = this._bulletQueue.pop();
            var bullet = data[0];
            bullet.launcherTime -= dt;
            if (bullet.launcherTime <= 0) {
              bullet.node.active = true;
              var launcherData = data[1];
              bullet.launchered = true;
              var owner = bullet.owner;
              bullet.node.worldPosition = owner.getFirePosition(bullet.bulletVO.position);
              if (bullet.bulletVO.offset.length > 0) {
                // let x = Utils.GetRandomNum(bullet.bulletVO.offset[0][0], bullet.bulletVO.offset[0][1]);
                // let y = Utils.GetRandomNum(bullet.bulletVO.offset[1][0], bullet.bulletVO.offset[1][1]);
                if (bullet.bulletVO.offset[launcherData.index]) {
                  var x = bullet.bulletVO.offset[launcherData.index][0];
                  var y = bullet.bulletVO.offset[launcherData.index][1];
                  bullet.node.worldPosition.add3f(x, y, 0);
                }
              }
              if (bullet.bulletVO.type === GameBattle.BulletType.Melee) {
                //刀光子弹
                bullet.node.angle = 0;
                if (owner.view.isFlipX) {
                  if (bullet.bulletVO.angle_point[2] === 1 || bullet.bulletVO.crash_box_type === GameBattle.BulletHitShape.Round) {
                    //挂在施法者身上的太刀刀光，已经根据施法者朝向翻转
                    if (bullet.bulletVO.moveType !== GameBattle.BulletMoveType.InCreatorTaiDao) {
                      bullet.hitBox.anchorX = 1 - bullet.hitBox.anchorX;
                    }
                  }
                }
              } else {
                var _bullet$skill$warning;
                var angle = 0;
                var theta = launcherData.angle * Math.ceil(launcherData.index / 2) * (launcherData.index % 2 === 0 ? -1 : 1);
                if (((_bullet$skill$warning = bullet.skill.warning_effect) == null ? void 0 : _bullet$skill$warning.length) > 0) {
                  bullet.bulletMovement.direction.set(bullet.skill.weaponDir.x, bullet.skill.weaponDir.y);
                  angle = bullet.skill.weaponAngle;
                } else {
                  var target = bullet.target;
                  var startPos = bullet.node.worldPosition;
                  var pv3 = null;
                  if (!target || !target.getHitPosition) {
                    pv3 = v3(0, 0);
                  } else {
                    pv3 = target.getHitPosition();
                  }
                  var endPos = target.node.worldPosition.clone().add(pv3);
                  Vec3.subtract(bullet.bulletMovement.direction, endPos, startPos).normalize();
                  // 偏转角度（单位为弧度）
                  // theta = 0
                  // // 计算偏转后的方向向量
                  var _x = bullet.bulletMovement.direction.x * Math.cos(theta) - bullet.bulletMovement.direction.y * Math.sin(theta);
                  var _y = bullet.bulletMovement.direction.x * Math.sin(theta) + bullet.bulletMovement.direction.y * Math.cos(theta);
                  bullet.bulletMovement.direction.set(_x, _y);

                  // // 将新的飞行方向转换为子弹的旋转角度
                  var radian = Math.atan2(bullet.bulletMovement.direction.y, bullet.bulletMovement.direction.x);
                  angle = radian * (180 / Math.PI);
                }
                if (bullet.bulletVO.type === GameBattle.BulletType.NoAngle) {
                  bullet.node.angle = 0;
                } else {
                  bullet.node.angle = angle;
                }
                if (bullet.bulletVO.moveType === GameBattle.BulletMoveType.HugeBullet && bullet.bulletVO.move_param && bullet.bulletVO.move_param.length > 0) {
                  var dirOffset = void 0;
                  var turnAngle = Math.abs(bullet.bulletVO.move_param[bullet.indexInSkill]);
                  if (bullet.indexInSkill === 0) {
                    bullet.node.angle += turnAngle;
                    dirOffset = -1;
                  } else {
                    bullet.node.angle -= turnAngle;
                    dirOffset = 1;
                  }
                  var _target = bullet.target;
                  var _startPos = bullet.node.worldPosition;
                  var _pv = null;
                  if (!_target || !_target.getHitPosition) {
                    _pv = v3(0, 0, 0);
                  } else {
                    _pv = _target.getHitPosition();
                  }
                  var _endPos = _target.node.worldPosition.clone().add(_pv);
                  var dis = Vec3.distance(_startPos, _endPos);
                  var offset = dis * Math.sin(turnAngle * Math.PI / 180);
                  Vec3.subtract(bullet.bulletMovement.direction, _endPos, _startPos);
                  // 计算垂直于角度方向的偏移
                  // 将角度转换为弧度
                  var angleInRadians = bullet.node.angle * Math.PI / 180;
                  // 垂直方向的角度（原角度 + 90度）
                  var perpAngleInRadians = angleInRadians + Math.PI / 2 * dirOffset;
                  // 计算垂直方向的偏移向量
                  var offsetX = Math.cos(perpAngleInRadians) * offset;
                  var offsetY = Math.sin(perpAngleInRadians) * offset;
                  // 将子弹向垂直方向平移100单位
                  bullet.node.worldPosition.add3f(offsetX, offsetY, 0);
                  //console.log('bullet.node.angle  index', launcherData, bullet.indexInSkill);
                }
              }

              bullet.launch(launcherData);
            } else {
              temp.push(data);
            }
          }
          temp.reverse();
          (_this$_bulletQueue = this._bulletQueue).push.apply(_this$_bulletQueue, temp);
          temp = [];
          while (this._subBulletQueue.length > 0) {
            var _data = this._subBulletQueue.pop();
            var _bullet = _data[0];
            _bullet.launchered = true;
            _bullet.node.active = true;
            _bullet.node.worldPosition = _data[1].pos;
            var _launcherData = {
              index: _data[1].index,
              count: _data[1].count,
              angle: _data[1].angle
            };
            _bullet.launch(_launcherData);
          }
          (_this$_subBulletQueue = this._subBulletQueue).push.apply(_this$_subBulletQueue, temp);
        };
        MyBulletLauncher.clear = function clear() {
          MyBulletLauncher._bulletQueue = [];
          MyBulletLauncher._subBulletQueue = [];
        }

        /**
         * 给子弹分配目标：子弹类型10多重锁敌（优先锁发射方向的敌人）
         * @param skillVo
         * @param skillTarget
         * @returns
         */;
        MyBulletLauncher.getTargetListLockNoSame2 = function getTargetListLockNoSame2(skillVo, skillTarget) {
          var count = skillVo.bullet_number;
          var angle = skillVo.launch_angle;
          var targetList = [];
          var range = skillVo.distance[1];
          var skillPos = skillVo.owner.node.worldPosition;
          var allTargets = App.battleMgr.roleCtrl.getRolesByType(skillTarget.type);
          // 过滤掉距离施法者过远的目标
          var filteredTargets = [];
          //let filteredCount=0;
          for (var i in allTargets) {
            var role = allTargets[i];
            var distance = Vec3.distance(skillPos, role.node.worldPosition);
            if (distance <= range) {
              filteredTargets.push(role);
              //filteredCount++;
            }
          }

          count = Math.min(count, filteredTargets.length);

          // 检查在子弹方向的一定角度范围内
          var checkAngle = function checkAngle(index, role) {
            // 计算角色与施法者之间的角度
            var dirVector = role.node.worldPosition.clone().subtract(skillPos);
            var targetAngle = Math.atan2(dirVector.y, dirVector.x);
            if (targetAngle < 0) {
              targetAngle += 2 * Math.PI;
            }

            // 计算与子弹角度的差值
            var bulletAngle = skillVo.launch_angle * Math.ceil(index / 2) * (index % 2 === 0 ? -1 : 1);
            var angleDiff = Math.abs(targetAngle - bulletAngle);
            if (angleDiff > Math.PI) {
              angleDiff = 2 * Math.PI - angleDiff;
            }
            return angleDiff <= skillVo.launch_angle;
          };

          //let targetTempList=filteredTargets.slice();
          //优先分配子弹朝向的目标
          var resultTargetList = {};
          for (var _index = 0; _index < count; _index++) {
            for (var targetIndex = 0; targetIndex < filteredTargets.length; targetIndex++) {
              var _role2 = filteredTargets[targetIndex];
              if (checkAngle(_index, _role2)) {
                resultTargetList[_index] = _role2;
                filteredTargets.splice(targetIndex, 1);
                break;
              }
            }
          }
          //剩余目标分配
          for (var _index2 = 0; _index2 < count; _index2++) {
            if (!resultTargetList[_index2]) {
              resultTargetList[_index2] = filteredTargets.shift();
            }
          }
          for (var _index3 = 0; _index3 < count; _index3++) {
            targetList.push(resultTargetList[_index3]);
          }
          return targetList;
        };
        return MyBulletLauncher;
      }());
      MyBulletLauncher._bulletQueue = [];
      MyBulletLauncher._subBulletQueue = [];
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/myUiEnterLoading.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './GameBoot.ts', './UIMgr.ts', './ModuleDef.ts', './UtilityPlatform.ts', './LoginDaDian.ts', './App.ts', './UI_MainView.ts', './Layout_UI_MainView.ts', './EventType.ts'], function (exports) {
  var _createClass, cclegacy, GameBoot, UIMgr, LayerType, ModuleDef, UtilityPlatform, LoginDaDian, LoginDaDianType, App, UI_MainView, Layout_UI_MainView, EventType;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameBoot = module.GameBoot;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      LoginDaDian = module.LoginDaDian;
      LoginDaDianType = module.LoginDaDianType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UI_MainView = module.UI_MainView;
    }, function (module) {
      Layout_UI_MainView = module.Layout_UI_MainView;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "45ff8yNd79CqoI8zDpWmNjI", "myUiEnterLoading", undefined);
      var myUiEnterLoading = exports('myUiEnterLoading', /*#__PURE__*/function () {
        function myUiEnterLoading() {
          /**加载时间过长时显示转圈loading */
          this.showLagLoadingWait = 20;
        }
        var _proto = myUiEnterLoading.prototype;
        _proto.loadRes = function loadRes() {
          var _this = this;
          var count = 2;
          var curCount = 0;
          GameBoot.Instance.startProgressBar(false);
          this.loadMusicArr(function () {}, function () {
            curCount++;
            if (curCount === count) {
              _this.tryClose();
            }
          });
          App.resMgr.loadPrefab(ModuleDef.GAME_BATTLE_B, "prefabs/scene/BattleMainView", function (err, prefab) {
            LoginDaDian.daDian(LoginDaDianType.enterLoadPrefab, "load prefab suc", UtilityPlatform.getInstance().uid, App.loginMgr.selServer.sid);
            prefab.addRef();
            curCount++;
            if (curCount === count) {
              _this.tryClose();
            }
          });
          var info = App.languageMgr.getLoginLanguage(5);
          GameBoot.Instance.updateInfo(info);
          // GameBoot.startShowLagLoading(2000,5,this.showLagLoadingWait,5);
        };

        _proto.tryClose = function tryClose() {
          var _this2 = this;
          setTimeout(function () {
            _this2.tryClose();
          }, 500);
        };
        _proto.close = function close() {
          App.monitorMgr.dispatchEvent(EventType.loading_end_to_mainGame);
          if (UIMgr.inst.getUiNode("uiMain")) {
            GameBoot.Instance.closeProgressBar(true);
          } else {
            UIMgr.inst.openOnce(UI_MainView, LayerType.main, Layout_UI_MainView, [null, true], function () {
              GameBoot.Instance.closeProgressBar(true);
              LoginDaDian.daDian(LoginDaDianType.enterLoadEnd, "close", UtilityPlatform.getInstance().uid, App.loginMgr.selServer.sid);
              UIMgr.inst.closeAllPanel(["uiMain"]);
            });
          }
        }

        /**
         * 预加载音效
         * @param onProgress 加载进度
         * @param onComplete
         */;
        _proto.loadMusicArr = function loadMusicArr(onProgress, onComplete) {
          var arr = [20001, 20002];
          var totalCount = arr.length;
          var loadedCount = 0;

          // 创建一个加载完成的回调函数
          var onMusicLoaded = function onMusicLoaded() {
            loadedCount++;
            // 计算加载进度
            if (onProgress) {
              onProgress(loadedCount / totalCount);
            }
            // 当所有音乐都加载完成时调用 onComplete
            if (loadedCount === totalCount && onComplete) {
              onComplete();
            }
          };

          // 加载每个音乐文件
          arr.forEach(function (id) {
            App.soundMgr.preloadMusic(id, onMusicLoaded);
          });
        };
        _createClass(myUiEnterLoading, null, [{
          key: "Instance",
          get: function get() {
            if (!myUiEnterLoading._Instance) {
              myUiEnterLoading._Instance = new myUiEnterLoading();
            }
            return myUiEnterLoading._Instance;
          }
        }]);
        return myUiEnterLoading;
      }());
      myUiEnterLoading._Instance = null;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/NetChannelMgr.ts", ['cc', './NetNode.ts'], function (exports) {
  var cclegacy, NetNode;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      NetNode = module.NetNode;
    }],
    execute: function () {
      cclegacy._RF.push({}, "ed4a5v+6DdDLr5TIOZdgs2w", "NetChannelMgr", undefined);
      var NetChannelType = exports('NetChannelType', /*#__PURE__*/function (NetChannelType) {
        NetChannelType[NetChannelType["Game"] = 0] = "Game";
        return NetChannelType;
      }({}));
      /**
       * 单渠道
       */
      var NetChannelMgr = exports('NetChannelMgr', /*#__PURE__*/function () {
        function NetChannelMgr() {
          this.game = void 0;
        }
        var _proto = NetChannelMgr.prototype;
        /** 创建游戏服务器 */
        _proto.gameCreate = function gameCreate() {
          this.game = this.game ? this.game : new NetNode();
          // 游戏网络事件逻辑统一在 NetGameTips 里写
          this.game.init();
        }

        /** 连接游戏服务器 */;
        _proto.gameConnect = function gameConnect(url, cb) {
          return this.game.connect({
            url: url,
            autoReconnect: 5 // 自动重连次数
          }, cb);
        }

        /** 断开游戏服务器 */;
        _proto.gameClose = function gameClose() {
          if (this.game) {
            this.game.autoReconnect = 0;
            this.game.close();
          }
        };
        return NetChannelMgr;
      }());
      var netChannel = exports('netChannel', new NetChannelMgr());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/NetGameTips.ts", ['cc', './Prompt.ts'], function (exports) {
  var cclegacy, Prompt;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      Prompt = module.Prompt;
    }],
    execute: function () {
      cclegacy._RF.push({}, "28d1dK2DsZF/oMdRUImmVNP", "NetGameTips", undefined);
      /** 游戏服务器提示 */
      var NetGameTips = exports('NetGameTips', /*#__PURE__*/function () {
        function NetGameTips() {
          this._reconnectTipShown = false;
        }
        var _proto = NetGameTips.prototype;
        /** 连接提示 */
        _proto.connectTips = function connectTips(isShow) {
          // 连接提示不显示，避免频繁弹窗
          // 重连时已经有专门的提示
        }

        /** 重连接提示 */;
        _proto.reconnectTips = function reconnectTips(isShow) {
          if (isShow) {
            Prompt.popTip("网络连接断开，正在重连...");
            // if (!this._reconnectTipShown) {
            //     Prompt.popTip("网络连接断开，正在重连...");
            //     this._reconnectTipShown = true;
            // }
          } else {
            this._reconnectTipShown = false;
          }
        }

        /** 请求提示 */;
        _proto.requestTips = function requestTips(isShow) {
          if (isShow) {
            Prompt.popTip("这里是网络loading层...");
          } else {
            console.log("*****reconnectTips****");
          }
        }

        /** 响应错误码提示 */;
        _proto.responseErrorCode = function responseErrorCode(code) {
          console.log("游戏服务器错误码", code);
          // if (code < 0) {
          //     tips.alert("netcode_" + code, () => {
          //         // SDKPlatform.restartGame(;)
          //     });
          // }
          // else {
          //     tips.alert("netcode_" + code);
          // }
        };

        return NetGameTips;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/NetInterface.ts", ['cc'], function () {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "441decVNX5JlYHXXS/lfvPX", "NetInterface", undefined);
      /*
       * @Author: heyuanguang www.heyuanguang@qq.com
       * @Date: 2025-10-24 20:18:51
       * @LastEditors: heyuanguang www.heyuanguang@qq.com
       * @LastEditTime: 2025-10-24 20:32:12
       * @FilePath: \qianduan\assets\script\frameworks\manager\base\net\NetInterface.ts
       * @Description: 网络相关接口定义
       */
      /** 请求协议 */
      /** 响应协议 */
      /** 回调对象 */
      /** 协议辅助接口 */
      /** Socket接口 */
      /** 网络提示接口 */
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/NetNode.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './WebSock.ts', './NetGameTips.ts', './Prompt.ts', './MonitorType.ts', './proto.mjs_cjs=&original=.js', './GameConfig.ts', './App.ts', './EventType.ts', './proto.js'], function (exports) {
  var _createClass, cclegacy, WebSock, NetGameTips, Prompt, MonitorType, ModType, GameConfig, App, EventType, _cjsExports;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      WebSock = module.WebSock;
    }, function (module) {
      NetGameTips = module.NetGameTips;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, null, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      _cjsExports = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "ec9f3UzVYlBc4AMr6lfo/Pz", "NetNode", undefined);
      var NetNodeStateStrs = ["已关闭", "连接中", "验证中", "可传输数据"];

      /** 网络提示类型枚举 */
      var NetTipsType = exports('NetTipsType', /*#__PURE__*/function (NetTipsType) {
        NetTipsType[NetTipsType["Connecting"] = 0] = "Connecting";
        NetTipsType[NetTipsType["ReConnecting"] = 1] = "ReConnecting";
        NetTipsType[NetTipsType["Requesting"] = 2] = "Requesting";
        return NetTipsType;
      }({}));

      /** 网络状态枚举 */
      var NetNodeState = exports('NetNodeState', /*#__PURE__*/function (NetNodeState) {
        NetNodeState[NetNodeState["Closed"] = 0] = "Closed";
        NetNodeState[NetNodeState["Connecting"] = 1] = "Connecting";
        NetNodeState[NetNodeState["Checking"] = 2] = "Checking";
        NetNodeState[NetNodeState["Working"] = 3] = "Working";
        return NetNodeState;
      }({}));

      /** 网络连接参数 */

      /** 网络节点 */
      var NetNode = exports('NetNode', /*#__PURE__*/function () {
        function NetNode() {
          this._connectOptions = null;
          this._autoReconnect = 0;
          this._isSocketInit = false;
          // Socket是否初始化过
          this._isSocketOpen = false;
          // Socket是否连接成功过
          this._state = NetNodeState.Closed;
          // 节点当前状态
          this._socket = null;
          this._networkTips = null;
          // 网络提示ui对象（请求提示、断线重连提示等）
          // protected _protocolHelper: IProtocolHelper | null = null;               // 包解析对象
          this._connectedCallback = null;
          // 连接完成回调
          this._disconnectCallback = null;
          // 断线回调
          // protected _callbackExecuter: ExecuterFunc | null = null;                // 回调执行
          this._keepAliveTimer = null;
          // 心跳定时器
          this._receiveMsgTimer = null;
          // 接收数据定时器
          this._reconnectTimer = null;
          // 重连定时器
          this._heartTime = 5 * 1000;
          // 心跳间隔
          this._receiveTime = 5 * 60 * 1000;
          // 多久没收到数据断开
          this._reconnetTimeOut = 8000;
          // 重连间隔
          this._requests = Array();
          // 请求列表
          this._listener = {};
          // 监听者列表
          this._msgCatch = {};
          //消息缓存
          this.options = void 0;
          this._startAutoConnect = false;
        }
        var _proto = NetNode.prototype;
        // Socket对象（可能是原生socket、websocket、wx.socket...)
        /**
         * 设置网络节点状态
         * @param newState 新的状态
         */
        _proto.setState = function setState(newState) {
          if (this._state !== newState) {
            var oldStateStr = NetNodeStateStrs[this._state];
            var newStateStr = NetNodeStateStrs[newState];
            App.log.logNet("\u7F51\u7EDC\u72B6\u6001\u6539\u53D8: " + oldStateStr + " -> " + newStateStr, "网络");
            this._state = newState;
          }
        };
        /********************** 网络相关处理 *********************/
        _proto.init = function init() {
          if (!this._socket) {
            this._socket = new WebSock();
            App.log.logNet("\u7F51\u7EDC\u521D\u59CB\u5316");
          }
          // this._protocolHelper = protocol;
          this._networkTips = this._networkTips ? this._networkTips : new NetGameTips();
          // this._callbackExecuter = execFunc ? execFunc : (callback: CallbackObject, buffer: NetData) => {
          //     callback.callback.call(callback.target, buffer);
          // }
        }

        /**
         * 请求连接服务器
         * @param options 连接参数
         */;
        _proto.connect = function connect(options, cb) {
          App.log.logBusiness("请求连接服务器 connect ", "网络", options);
          this.options = options;
          if (this._state === NetNodeState.Closed) {
            if (!this._isSocketInit) {
              this.initSocket(cb);
            }
            this.setState(NetNodeState.Connecting);
            if (!this._socket.connect(options)) {
              this.updateNetTips(NetTipsType.Connecting, false);
              return false;
            }
            if (this._connectOptions === null && typeof options.autoReconnect === "number") {
              this._autoReconnect = options.autoReconnect;
              App.log.logNet("重连次数设置", "网络", this._autoReconnect);
            }
            this._connectOptions = options;
            this.updateNetTips(NetTipsType.Connecting, true);
            return true;
          }
          App.log.logNet("当前网络状态:", NetNodeStateStrs[this._state]);
          return false;
        };
        _proto.initSocket = function initSocket(cb) {
          var _this = this;
          if (this._socket) {
            this._socket.onConnected = function (event) {
              if (_this._state !== NetNodeState.Closed) {
                _this.onConnected(event);
                cb && cb();
              }
            };
            this._socket.onMessage = function (msg) {
              _this.onMessage(msg);
            };
            this._socket.onError = function (event) {
              _this.onError(event);
            };
            this._socket.onClosed = function (event) {
              _this.onClosed(event);
            };
            this._isSocketInit = true;
          }
        };
        _proto.updateNetTips = function updateNetTips(tipsType, isShow) {
          if (this._networkTips) {
            if (tipsType === NetTipsType.Requesting) {
              this._networkTips.requestTips(isShow);
            } else if (tipsType === NetTipsType.Connecting) {
              this._networkTips.connectTips(isShow);
            } else if (tipsType === NetTipsType.ReConnecting) {
              this._networkTips.reconnectTips(isShow);
            }
          }
        }

        /** 网络连接成功 */;
        _proto.onConnected = function onConnected(_event) {
          var _this2 = this;
          App.log.logNet("网络已连接", "网络", this.options, new Date());
          this._isSocketOpen = true;

          // 清理重连定时器
          if (this._reconnectTimer !== null) {
            Prompt.popTip("服务器连接成功");
            clearTimeout(this._reconnectTimer);
            this._reconnectTimer = null;
          }

          // 重置重连次数
          this._autoReconnect = this._connectOptions.autoReconnect;

          // 关闭重连提示
          this.updateNetTips(NetTipsType.ReConnecting, false);

          // 如果设置了鉴权回调（重连场景），执行鉴权流程
          if (this._connectedCallback !== null) {
            this.setState(NetNodeState.Working);
            var cb = this._connectedCallback;
            this._connectedCallback = null; // 立即清空，避免重复调用

            cb(function () {
              // 鉴权完成后的回调
              _this2.onChecked();
              _this2._startAutoConnect = true;
            });
          } else {
            // 正常登录，直接进入游戏
            this.onChecked();
            App.monitorMgr.dispatchEvent(EventType.net_checked);
            this._startAutoConnect = true;
          }
          App.log.logNet("\u7F51\u7EDC\u5DF2\u8FDE\u63A5\u5F53\u524D\u72B6\u6001\u4E3A\u3010" + NetNodeStateStrs[this._state] + "\u3011", "网络");

          // 网连接成功 关闭loading界面
          App.monitorMgr.dispatchEvent(EventType.loading_auto_close);
          setTimeout(function () {
            for (var _key in _this2._msgCatch) {
              var cached = _this2._msgCatch[_key];
              _this2.send(cached.mod, cached.cmd, cached.obj);
              delete _this2._msgCatch[_key];
            }
          }, 1000);
        }

        /** 连接验证成功，进入工作状态 */;
        _proto.onChecked = function onChecked() {
          var _this3 = this;
          App.log.logNet("连接验证成功，进入工作状态");
          this.setState(NetNodeState.Working);
          // 关闭连接或重连中的状态显示
          this.updateNetTips(NetTipsType.Connecting, false);
          this.updateNetTips(NetTipsType.ReConnecting, false);
          this._autoReconnect = this.options ? this.options.autoReconnect : 5; //重置重连参数

          // 重发待发送信息
          setTimeout(function () {
            for (var _key2 in _this3._msgCatch) {
              var cached = _this3._msgCatch[_key2];
              _this3.send(cached.mod, cached.cmd, cached.obj);
              delete _this3._msgCatch[_key2];
            }
          }, 1000);
        }

        /** 接收到一个完整的消息包 */;
        _proto.onMessage = function onMessage(data) {
          if (!(data instanceof ArrayBuffer)) return;
          this.resetHearbeatTimer();
          this.resetReceiveMsgTimer();
          var view = new Uint8Array(data);
          var headerLength = view[0] << 8 | view[1];
          var HeaderType = _cjsExports.m_proto.Header;
          var header = HeaderType.decode(view.subarray(2, 2 + headerLength));
          var protoName = _cjsExports.m_proto.CmdType[header.cmd];
          var actualProtoName = protoName != null && protoName.startsWith("CMD_") ? protoName.substring(4) : protoName;
          var ProtoType = _cjsExports.m_proto[actualProtoName];
          if (!ProtoType) {
            App.log.logError("[NetNode] \u672A\u627E\u5230\u534F\u8BAE\u7C7B\u578B: " + actualProtoName);
            return;
          }
          var body = ProtoType.decode(view.subarray(2 + headerLength));
          if (header.cmd !== MonitorType.CMD_ResUserHeart) {
            App.log.logNet("协议数据:", "服务器数据", body);
          }

          // 先分发事件
          if (header.cmd) {
            App.monitorMgr.dispatchEvent(header.cmd, body);
          }
          if (body.code !== undefined && body.code !== 200) {
            setTimeout(function () {
              Prompt.popErrorCode(body.code);
            }, 0);
          }
          App.monitorMgr.dispatchEvent(EventType.loading_auto_close);
        };
        _proto.onError = function onError(event) {
          App.log.logError("\u7F51\u7EDC\u9519\u8BEFonError", event);
          App.monitorMgr.dispatchEvent(EventType.net_on_error);
          if (this.isAutoReconnect() && this._state !== NetNodeState.Working) {
            this.setState(NetNodeState.Closed);
            this.clearTimer();
          }
        };
        //是否启动自动重连。
        _proto.onClosed = function onClosed(_event) {
          var _this4 = this;
          App.log.logError("\u7F51\u7EDC\u5173\u95EDonClosed");
          App.monitorMgr.dispatchEvent(EventType.net_on_close);
          // 如果已经在重连中，不要重复处理
          if (this._reconnectTimer) {
            App.log.logError("已经在重连中，忽略本次关闭");
            return;
          }
          this.clearTimer();
          this.setState(NetNodeState.Closed); // 确保状态正确设置为关闭

          // 执行断线回调，返回false表示不进行重连
          if (this._disconnectCallback && !this._disconnectCallback()) {
            App.log.logError("\u65AD\u5F00\u8FDE\u63A5");
            return;
          }
          this._connectedCallback = null;

          // 自动重连
          if (this.isAutoReconnect()) {
            // 显示即将重连的提示
            this.updateNetTips(NetTipsType.ReConnecting, true);
            this._connectedCallback = function () {
              App.loginMgr.cs_web_reconnect();
            };
            var doReconnect = function doReconnect() {
              if (_this4._reconnectTimer !== null) {
                clearTimeout(_this4._reconnectTimer);
                _this4._reconnectTimer = null;
              }
              if (!_this4.isAutoReconnect()) {
                App.log.logNet("停止重连");
                return;
              }
              App.log.logNet("开始重连，剩余次数:", "网络", _this4._autoReconnect);

              // 显示重连提示
              _this4.updateNetTips(NetTipsType.ReConnecting, true);

              // 确保socket已关闭
              if (_this4._socket && _this4._socket.close) {
                try {
                  _this4._socket.close();
                } catch (e) {
                  App.log.logNet("关闭socket出错", "网络", e);
                }
              }
              _this4.setState(NetNodeState.Closed);
              _this4._startAutoConnect = true;

              // 先递减重连次数
              if (_this4._autoReconnect > 0) {
                _this4._autoReconnect -= 1;
              }
              App.log.logNet("正在自动重连...");
              if (_this4._autoReconnect <= 0) {
                var funcOk = function funcOk() {
                  App.goToLoginMain();
                };
                Prompt.popNetWindow("温馨提示", "重连失败,返回主界面?", funcOk, "确定");
              }
              try {
                var connected = _this4.connect(_this4._connectOptions);
                if (!connected) {
                  App.log.logNet("重连失败，等待下次重试");
                  // 重连失败后等待更长时间再试
                  _this4._reconnectTimer = setTimeout(doReconnect, _this4._reconnetTimeOut);
                  return;
                }
              } catch (e) {
                App.log.logError("重连过程出错", "网络", e);
                // 出错后也继续尝试重连
                _this4._reconnectTimer = setTimeout(doReconnect, _this4._reconnetTimeOut);
              }
            };
            this._reconnectTimer = setTimeout(doReconnect, this._reconnetTimeOut);
          } else {
            App.log.logNet("没有自动重连 设置网络状态为关闭");
            this.setState(NetNodeState.Closed);
          }
        }

        /**
         * 断开网络
         * @param _code      关闭码
         * @param _reason    关闭原因
         */;
        _proto.close = function close(_code, _reason) {
          App.log.logNet("主动关闭网络连接");
          // 清理定时器和缓存
          this.clearTimer();
          this._listener = {};
          this._msgCatch = {};
          this._requests.length = 0;

          // 关闭网络提示
          if (this._networkTips) {
            this._networkTips.connectTips(false);
            this._networkTips.reconnectTips(false);
            this._networkTips.requestTips(false);
          }

          // 立即设置状态为关闭，避免重连时状态检查失败
          this.setState(NetNodeState.Closed);

          // 关闭 WebSocket
          if (this._socket) {
            this._socket.close();
          }
        }

        /**
         * 只是关闭Socket套接字（仍然重用缓存与当前状态）
         * @param code      关闭码
         * @param reason    关闭原因
         */;
        _proto.closeSocket = function closeSocket(code, reason) {
          App.log.logNet("关闭socket closeSocket");
          if (this._socket) {
            this._socket.close(code, reason);
            if (this._autoReconnect === 0) {
              App.goToLoginMain();
            }
          }
        }

        /**
         * 发起请求，如果当前处于重连中，进入缓存列表等待重连完成后发送
         * @param buf       网络数据
         * @param force     是否强制发送
         */;
        _proto.send = function send(mod, cmd, obj, force) {
          if (force === void 0) {
            force = false;
          }
          if (GameConfig.DebugInfo.showBattleMessageLog && cmd !== MonitorType.CMD_ReqUserHeart) {
            App.log.logNet("onSend 协议", "网络", mod, cmd, obj);
          }

          // 排除不需要重连再发协议缓存
          var shouldCache = cmd !== MonitorType.CMD_ReqUserHeart && cmd !== MonitorType.CMD_ResUserHeart && cmd !== MonitorType.CMD_ReqUserLogin;
          if (shouldCache) {
            this._msgCatch[cmd] = {
              mod: mod,
              cmd: cmd,
              obj: obj
            };
          }
          if (this._state === NetNodeState.Working || force) {
            return this._socket.send(mod, cmd, obj);
          } else if (this._state === NetNodeState.Checking || this._state === NetNodeState.Connecting) {
            this._requests.push({
              mod: mod,
              cmd: cmd,
              obj: obj
            });
            App.log.logNet("\u5F53\u524D\u72B6\u6001\u4E3A\u3010" + NetNodeStateStrs[this._state] + "\u3011,\u7E41\u5FD9\u5E76\u7F13\u51B2\u53D1\u9001\u6570\u636E", "网络");
            return 0;
          } else {
            App.log.logNet("\u5F53\u524D\u72B6\u6001\u4E3A\u3010" + NetNodeStateStrs[this._state] + "\u3011,\u8BF7\u6C42\u9519\u8BEF", "网络");
            return -1;
          }
        }

        /********************** 心跳、超时相关处理 *********************/;
        _proto.resetReceiveMsgTimer = function resetReceiveMsgTimer() {
          var _this5 = this;
          if (this._receiveMsgTimer !== null) {
            clearTimeout(this._receiveMsgTimer);
          }

          // 只有在连接状态下才启动接收消息检测
          if (this._state === NetNodeState.Working) {
            this._receiveMsgTimer = setTimeout(function () {
              _this5.closeSocket();
            }, this._receiveTime);
          }
        }

        /**
         * 发送心跳包
         */;
        _proto.reqHeartbeat = function reqHeartbeat() {
          var obj = {};
          this.send(ModType.user, MonitorType.CMD_ReqUserHeart, obj);
        }

        /**
         * 重置心跳定时器
         */;
        _proto.resetHearbeatTimer = function resetHearbeatTimer() {
          var _this6 = this;
          if (this._keepAliveTimer !== null) {
            clearTimeout(this._keepAliveTimer);
          }
          if (this._state === NetNodeState.Working) {
            this._keepAliveTimer = setTimeout(function () {
              _this6.reqHeartbeat();
            }, this._heartTime);
          }
        }

        /**
         * 清除各类定时器
         */;
        _proto.clearTimer = function clearTimer() {
          if (this._receiveMsgTimer !== null) {
            clearTimeout(this._receiveMsgTimer);
            this._receiveMsgTimer = null;
          }
          if (this._keepAliveTimer !== null) {
            clearTimeout(this._keepAliveTimer);
            this._keepAliveTimer = null;
          }
          if (this._reconnectTimer !== null) {
            clearTimeout(this._reconnectTimer);
            this._reconnectTimer = null;
          }
        }

        /** 是否自动重连接 */;
        _proto.isAutoReconnect = function isAutoReconnect() {
          return this._autoReconnect !== 0;
        }

        /** 拒绝重新连接  1状态改为closed*/;
        _proto.rejectReconnect = function rejectReconnect() {
          this._autoReconnect = 0;
          this.clearTimer();
          this.setState(NetNodeState.Closed);
          this._connectedCallback = null; // 连接回调也要去掉
          this._startAutoConnect = false;
          App.log.logNet("被挤下线，拒绝重连，改变网络状态");
        };
        _createClass(NetNode, [{
          key: "autoReconnect",
          get: function get() {
            return this._autoReconnect;
          },
          set: function set(value) {
            this._autoReconnect = value;
          }
        }]);
        return NetNode;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/NodePoolMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Singleton.ts', './ResMgr.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, warn, isValid, instantiate, NodePool, error, Prefab, Singleton, ResMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      warn = module.warn;
      isValid = module.isValid;
      instantiate = module.instantiate;
      NodePool = module.NodePool;
      error = module.error;
      Prefab = module.Prefab;
    }, function (module) {
      Singleton = module.Singleton;
    }, function (module) {
      ResMgr = module.ResMgr;
    }],
    execute: function () {
      cclegacy._RF.push({}, "5f09aSqwfRHKLRzHuWzW7qr", "NodePoolMgr", undefined);

      /**
       * 对象池对象信息
       */

      var NodePoolMgr = exports('NodePoolMgr', /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(NodePoolMgr, _Singleton);
        function NodePoolMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          _this.nodePools = new Map();
          _this.poolConfigs = new Map();
          _this.poolStats = new Map();
          _this.prefabCache = new Map();
          return _this;
        }
        var _proto = NodePoolMgr.prototype;
        _proto.init = function init() {}
        /**
         * 创建或获取对象池
         * @param poolName 池名称
         * @param prefab 预制体
         * @param config 池配置
         */;
        _proto.createPool = /*#__PURE__*/
        function () {
          var _createPool = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(poolName, prefab, config) {
            var _config, _config$preloadCount, preloadCount, _config$maxSize, maxSize, _config$autoExpandSte, autoExpandStep, _config$autoExpand, autoExpand, nodePool;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (config === void 0) {
                    config = {};
                  }
                  if (!this.nodePools.has(poolName)) {
                    _context.next = 4;
                    break;
                  }
                  warn("Pool " + poolName + " already exists");
                  return _context.abrupt("return", true);
                case 4:
                  if (!(!prefab || !isValid(prefab))) {
                    _context.next = 7;
                    break;
                  }
                  error("Invalid prefab for pool: " + poolName);
                  return _context.abrupt("return", false);
                case 7:
                  _config = config, _config$preloadCount = _config.preloadCount, preloadCount = _config$preloadCount === void 0 ? 5 : _config$preloadCount, _config$maxSize = _config.maxSize, maxSize = _config$maxSize === void 0 ? 50 : _config$maxSize, _config$autoExpandSte = _config.autoExpandStep, autoExpandStep = _config$autoExpandSte === void 0 ? 5 : _config$autoExpandSte, _config$autoExpand = _config.autoExpand, autoExpand = _config$autoExpand === void 0 ? true : _config$autoExpand;
                  nodePool = new NodePool();
                  this.nodePools.set(poolName, nodePool);
                  this.poolConfigs.set(poolName, {
                    preloadCount: preloadCount,
                    maxSize: maxSize,
                    autoExpandStep: autoExpandStep,
                    autoExpand: autoExpand
                  });
                  this.poolStats.set(poolName, {
                    name: poolName,
                    size: 0,
                    maxSize: maxSize,
                    preloadCount: preloadCount,
                    usageCount: 0,
                    lastUsed: Date.now()
                  });
                  this.prefabCache.set(poolName, prefab);
                  _context.next = 15;
                  return this.preloadNodes(poolName, prefab, preloadCount);
                case 15:
                  return _context.abrupt("return", true);
                case 16:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function createPool(_x, _x2, _x3) {
            return _createPool.apply(this, arguments);
          }
          return createPool;
        }()
        /**
         * 通过路径创建对象池
         * @param bundleName bundle名称
         * @param assetPath 资源路径
         * @param config 池配置
         */;

        _proto.createPoolByPath = /*#__PURE__*/
        function () {
          var _createPoolByPath = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(bundleName, assetPath, config) {
            var _this2 = this;
            var poolName, prefab;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  if (config === void 0) {
                    config = {};
                  }
                  poolName = this.generatePoolName(bundleName, assetPath); // 检查是否已有缓存
                  if (!this.prefabCache.has(poolName)) {
                    _context3.next = 5;
                    break;
                  }
                  prefab = this.prefabCache.get(poolName);
                  return _context3.abrupt("return", this.createPool(poolName, prefab, config));
                case 5:
                  return _context3.abrupt("return", new Promise(function (resolve) {
                    ResMgr.inst.loadAsset(bundleName, assetPath, Prefab, null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, prefab) {
                      var success;
                      return _regeneratorRuntime().wrap(function _callee2$(_context2) {
                        while (1) switch (_context2.prev = _context2.next) {
                          case 0:
                            if (!err) {
                              _context2.next = 4;
                              break;
                            }
                            error("Failed to load prefab: " + poolName, err);
                            resolve(false);
                            return _context2.abrupt("return");
                          case 4:
                            if (!(!prefab || !isValid(prefab))) {
                              _context2.next = 8;
                              break;
                            }
                            error("Invalid prefab loaded: " + poolName);
                            resolve(false);
                            return _context2.abrupt("return");
                          case 8:
                            _this2.prefabCache.set(poolName, prefab);
                            _context2.next = 11;
                            return _this2.createPool(poolName, prefab, config);
                          case 11:
                            success = _context2.sent;
                            resolve(success);
                          case 13:
                          case "end":
                            return _context2.stop();
                        }
                      }, _callee2);
                    })));
                  }));
                case 6:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this);
          }));
          function createPoolByPath(_x4, _x5, _x6) {
            return _createPoolByPath.apply(this, arguments);
          }
          return createPoolByPath;
        }()
        /**
         * @param poolName 池名称
         */;

        _proto.getNode = function getNode(poolName) {
          if (!this.nodePools.has(poolName)) {
            warn("Pool " + poolName + " does not exist");
            return null;
          }
          var nodePool = this.nodePools.get(poolName);
          var config = this.poolConfigs.get(poolName);
          var stats = this.poolStats.get(poolName);
          var node = nodePool.get();

          // 如果池为空且启用自动扩容
          if (!node && config.autoExpand && this.prefabCache.has(poolName)) {
            var prefab = this.prefabCache.get(poolName);
            this.expandPool(poolName, prefab, config.autoExpandStep || 5);
            node = nodePool.get();
          }
          if (node) {
            stats.usageCount++;
            stats.lastUsed = Date.now();
            stats.size = nodePool.size();
          }
          return node;
        }

        /**
         * 通过路径获取节点
         * @param bundleName bundle名称
         * @param assetPath 资源路径
         */;
        _proto.getNodeByPath = function getNodeByPath(bundleName, assetPath) {
          var poolName = this.generatePoolName(bundleName, assetPath);
          return this.getNode(poolName);
        }

        /**
         * 回收节点
         * @param poolName 池名称
         * @param node 要回收的节点
         */;
        _proto.putNode = function putNode(poolName, node) {
          if (!this.nodePools.has(poolName)) {
            warn("Pool " + poolName + " does not exist");
            return false;
          }
          if (!node || !isValid(node)) {
            warn("Invalid node for pool: " + poolName);
            return false;
          }
          var nodePool = this.nodePools.get(poolName);
          var config = this.poolConfigs.get(poolName);
          var stats = this.poolStats.get(poolName);

          // 检查是否超过最大大小
          if (nodePool.size() >= config.maxSize) {
            node.destroy();
            warn("Pool " + poolName + " reached max size, node destroyed");
            return false;
          }
          nodePool.put(node);
          stats.size = nodePool.size();
          stats.lastUsed = Date.now();
          return true;
        }

        /**
         * 通过路径回收节点
         * @param bundleName bundle名称
         * @param assetPath 资源路径
         * @param node 要回收的节点
         */;
        _proto.putNodeByPath = function putNodeByPath(bundleName, assetPath, node) {
          var poolName = this.generatePoolName(bundleName, assetPath);
          return this.putNode(poolName, node);
        }

        /**
         * 清理指定对象池
         * @param poolName 池名称
         */;
        _proto.clearPool = function clearPool(poolName) {
          if (this.nodePools.has(poolName)) {
            var nodePool = this.nodePools.get(poolName);
            nodePool.clear();
            this.nodePools["delete"](poolName);
            this.poolConfigs["delete"](poolName);
            this.poolStats["delete"](poolName);
          }
        }

        /**
         * 通过路径清理对象池
         * @param bundleName bundle名称
         * @param assetPath 资源路径
         */;
        _proto.clearPoolByPath = function clearPoolByPath(bundleName, assetPath) {
          var poolName = this.generatePoolName(bundleName, assetPath);
          this.clearPool(poolName);
        }

        /**
         * 清理所有对象池
         */;
        _proto.clearAllPools = function clearAllPools() {
          this.nodePools.forEach(function (pool, poolName) {
            pool.clear();
          });
          this.nodePools.clear();
          this.poolConfigs.clear();
          this.poolStats.clear();
          this.prefabCache.clear();
        }

        /**
         * 获取池信息
         * @param poolName 池名称
         */;
        _proto.getPoolInfo = function getPoolInfo(poolName) {
          return this.poolStats.get(poolName) || null;
        }

        /**
         * 获取所有池信息
         */;
        _proto.getAllPoolInfo = function getAllPoolInfo() {
          return Array.from(this.poolStats.values());
        }

        /**
         * 清理长时间未使用的池
         * @param maxIdleTime 最大空闲时间（毫秒）
         */;
        _proto.cleanupIdlePools = function cleanupIdlePools(maxIdleTime) {
          var _this3 = this;
          if (maxIdleTime === void 0) {
            maxIdleTime = 300000;
          }
          var now = Date.now();
          var cleanedCount = 0;
          this.poolStats.forEach(function (stats, poolName) {
            if (now - stats.lastUsed > maxIdleTime && stats.usageCount === 0) {
              _this3.clearPool(poolName);
              cleanedCount++;
            }
          });
          return cleanedCount;
        }

        /**
         * 生成池名称
         * @param bundleName bundle名称
         * @param assetPath 资源路径
         * @returns 池名称
         */;
        _proto.generatePoolName = function generatePoolName(bundleName, assetPath) {
          return bundleName + ":" + assetPath;
        }

        /**
         * 预加载节点
         * @param poolName
         * @param prefab
         * @param count
         */;
        _proto.preloadNodes = /*#__PURE__*/
        function () {
          var _preloadNodes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(poolName, prefab, count) {
            var nodePool, i, node, stats;
            return _regeneratorRuntime().wrap(function _callee4$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  nodePool = this.nodePools.get(poolName);
                  for (i = 0; i < count; i++) {
                    node = instantiate(prefab);
                    nodePool.put(node);
                  }
                  stats = this.poolStats.get(poolName);
                  stats.size = nodePool.size();
                case 4:
                case "end":
                  return _context4.stop();
              }
            }, _callee4, this);
          }));
          function preloadNodes(_x9, _x10, _x11) {
            return _preloadNodes.apply(this, arguments);
          }
          return preloadNodes;
        }()
        /**
         * 扩展池子
         * @param poolName
         * @param prefab
         * @param count
         * @returns
         */;

        _proto.expandPool = function expandPool(poolName, prefab, count) {
          var nodePool = this.nodePools.get(poolName);
          var config = this.poolConfigs.get(poolName);
          var stats = this.poolStats.get(poolName);

          // 检查是否超过最大大小
          if (nodePool.size() + count > config.maxSize) {
            count = config.maxSize - nodePool.size();
            if (count <= 0) return;
          }
          for (var i = 0; i < count; i++) {
            var node = instantiate(prefab);
            nodePool.put(node);
          }
          stats.size = nodePool.size();
          warn("Pool " + poolName + " auto expanded by " + count + " nodes");
        };
        return NodePoolMgr;
      }(Singleton()));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/NPCDirectionTip.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Utils.ts', './DBRecord.ts', './UIMgr.ts', './ModuleDef.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, instantiate, UITransform, Component, Utils, DBRecord, UIMgr, ModuleDef, App, BattleUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      instantiate = module.instantiate;
      UITransform = module.UITransform;
      Component = module.Component;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
      cclegacy._RF.push({}, "1bbfblHxUdEKKIpzQJ1GJCH", "NPCDirectionTip", undefined);
      // import { NPC } from '../../frameworks/manager/module/game_battle_b/Role/entity/NPC';
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var NPCDirectionTip = exports('NPCDirectionTip', (_dec = ccclass("NPCDirectionTip"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(NPCDirectionTip, _Component);
        function NPCDirectionTip() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "img_icon", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "img_arrow", _descriptor2, _assertThisInitialized(_this));
          _this._curIdx = undefined;
          _this.sysID = 0;
          _this.idx = 0;
          return _this;
        }
        var _proto = NPCDirectionTip.prototype;
        _proto.start = function start() {};
        _proto.update = function update(deltaTime) {
          this.idx++;
          {
            //this.idx % 2 == 0
            if (this._curIdx === undefined) this._curIdx = this.node.getSiblingIndex();
            this.img_icon.parent.active = false;
            this.img_arrow.active = false;
            // let sysID = App.roleMgr.guideNpcSysID;
            // if (!sysID) return
            var list = App.roleMgr.getguideNpcSysList();
            var sysID = list[this._curIdx];
            if (!sysID) {
              if (this._curIdx) {
                this.node.destroy();
              }
              return;
            }
            var childNum = this.node.parent.children.length;
            //拓展支持多个
            if (this._curIdx === 0 && list.length > childNum) {
              for (var i = childNum; i < list.length; i++) {
                var newTip = instantiate(this.node);
                newTip.parent = this.node.parent;
              }
            }
            var cfg = DBRecord.fetchId("GongNengJieSuo", sysID);
            var ui = UIMgr.inst.getUiNode(cfg.entranceNode[0]);
            if (!ui) return;
            var npc = Utils.findNodeList(cfg.entranceNode, ui);
            // if (!entranceNode) return
            // let npc: Node = entranceNode.parent;
            if (!npc) return;
            var endPos = npc.getPosition();
            // let Npc = npc.getComponent(NPC);
            // if (Npc && Npc.skeleton) {
            //     endPos.y += Npc.skeleton.getComponent(UITransform).height / 2;
            // }
            var cityModel = ui.getChildByName("cityView").getComponent(CityViewModel);
            var playerCamera = cityModel.playerCamera;
            var playerPos = playerCamera.node.getPosition();
            var halfW = 300; // ui.getComponent(UITransform).width / 2;
            var halfH = 400; //ui.getComponent(UITransform).height / 2;
            var reduceX = Math.abs(endPos.x - playerPos.x);
            var reduceY = Math.abs(endPos.y - playerPos.y);
            if (reduceX < halfW && reduceY < halfH) {
              return;
            }
            this.img_arrow.active = true;
            this.img_icon.parent.active = true;
            if (this.sysID != sysID) {
              var imgStr = DBRecord.fetchId("GongNengJieSuo", sysID).icon;
              App.resMgr.loadImage(this.img_icon.sprite, ModuleDef.GAME_SELECT_LEVEL, "/texture/" + imgStr);
            }
            this.sysID = sysID;
            var angle = BattleUtil.get2DAngleByPoint(playerPos, endPos);
            this.node.angle = angle;
            this.img_icon.parent.angle = -angle;
            this.node.setPosition(endPos);
            var halfW22 = 300;
            var halfH22 = 550;
            halfH22 = Math.min(halfH22, this.node.parent.getComponent(UITransform).height / 2 - 180);
            var x = this.node.position.x;
            var y = this.node.position.y;
            x = x < -halfW22 + playerPos.x ? -halfW22 + playerPos.x : x;
            x = x > halfW22 + playerPos.x ? halfW22 + playerPos.x : x;
            y = y < -halfH22 + playerPos.y ? -halfH22 + playerPos.y : y;
            y = y > halfH22 + playerPos.y + 180 ? halfH22 + playerPos.y + 180 : y;
            this.node.setPosition(x, y);
          }
        };
        return NPCDirectionTip;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "img_icon", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "img_arrow", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/openadsdk.ts", ['cc'], function (exports) {
  var cclegacy, native;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      native = module.native;
    }],
    execute: function () {
      cclegacy._RF.push({}, "6ebf6ghaJtDrYZXSxcSkoYU", "openadsdk", undefined);
      var sdk = {
        RewardVideoAd: "RewardVideoAd",
        SplashAd: "SplashAd",
        FullScreenVideoAd: "FullScreenVideoAd",
        BannerExpressAd: "BannerExpressAd",
        InteractionAd: "InteractionAd",
        RemBannerAd: "RemBannerAd",
        NativeExpressAd: "NativeExpressAd",
        RemExpressedAd: "RemExpressedAd",
        //mud 使用
        Js2Java_PlayVideo: "Js2Java_playVideo",
        Java2Js_PlayVideo: "Java2Js_playVideo",
        //用不上

        Js2Java_EnterGame: "Js2Java_EnterGame",
        Java2Js_EnterGameOk: "Java2Js_EnterGameOk",
        Java2Js_EnterGameFail: "Java2Js_EnterGameFail",
        Js2Java_CreateRole: "Js2Java_CreateRole",
        Java2Js_CreateRole: "Java2Js_CreateRole",
        Js2Java_upLV: "Js2Java_upLV",
        Java2Js_upLV: "Java2Js_upLV",
        //充值
        toJava_chongzhi: "toJava_chongzhi",
        toJs_chongzhi: "toJs_chongzhi",
        Js2Java_upqq: "Js2Java_upqq"
      };
      var openadsdk = exports('openadsdk', /*#__PURE__*/function () {
        function openadsdk() {}
        openadsdk.RewardVideoAd = function RewardVideoAd(callBack, callObj, json) {
          openadsdk.addCallBackAd(sdk.RewardVideoAd, callBack, callObj, json);
        };
        openadsdk.SplashAd = function SplashAd(callBack, callObj, json) {
          openadsdk.addCallBackAd(sdk.SplashAd, callBack, callObj, json);
        };
        openadsdk.FullScreenVideoAd = function FullScreenVideoAd(callBack, callObj, json) {
          openadsdk.addCallBackAd(sdk.FullScreenVideoAd, callBack, callObj, json);
        };
        openadsdk.BannerExpressAd = function BannerExpressAd(callBack, callObj, json) {
          openadsdk.addCallBackAd(sdk.BannerExpressAd, callBack, callObj, json);
        };
        openadsdk.InteractionAd = function InteractionAd(callBack, callObj, json) {
          openadsdk.addCallBackAd(sdk.InteractionAd, callBack, callObj, json);
        };
        openadsdk.NativeExpressAd = function NativeExpressAd(callBack, callObj, json) {
          openadsdk.addCallBackAd(sdk.NativeExpressAd, callBack, callObj, json);
        }
        //删除banner广告
        ;

        openadsdk.RemoveBannerAd = function RemoveBannerAd() {
          var jsondata = {};
          openadsdk.addCallBackAd(sdk.RemBannerAd, function (callBack) {}, this, JSON.stringify(jsondata));
        }
        //删除信息流广告
        //     public static RemoveExpressedAd()
        //     {
        //         let jsondata = {};
        //         openadsdk.addCallBack(sdk.RemExpressedAd, (callBack)=>{}, this, JSON.stringify(jsondata));
        //     }
        ;

        openadsdk.addCallBack = function addCallBack(type, callBack, callObj, json) {
          var funcName = type;
          console.log(" 调用java 方法= ", type);
          console.log("openadsdk.addCallBack bbbbbbbbbbbbbbbbbbbbbbbbbbb00000:");
          native.bridge.sendToNative(funcName, json);
          console.log("openadsdk.addCallBack bbbbbbbbbbbbbbbbbbbbbbbbbbb11111:");
        };
        openadsdk.addCallBackAd = function addCallBackAd(type, callBack, callObj, json) {
          // egret.ExternalInterface.addCallback("TT" + type + "-js", function (message: string) {
          //     if (callBack && callObj) {
          //         callBack.apply(callObj, [message]);
          //     }
          // });
          //TTRewardVideoAd-js
          native.bridge.onNative = function (arg0, arg1) {
            console.log("穿山甲，广告监听返回的 java 方法= ", arg0, arg1);
            if (arg0 === "TTRewardVideoAd-js") {
              if (callBack && callObj) {
                callBack.apply(callObj, [arg1]);
              }
            }
          };
          var funcName = "TT" + type;
          console.log("广告 调用java 方法= ", funcName, json);
          native.bridge.sendToNative(funcName, json);
        };
        return openadsdk;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlaceConfigMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Singleton.ts', './PlaceGameEnum.ts', './DBRecord.ts', './App.ts', './PlaceGameMgr.ts', './UtilGame.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Singleton, BuildingType, DBRecord, App, PlaceGameMgr, UtilGame;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      Singleton = module.Singleton;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "35f9d7CM0JA/YmTAcxqp0Mf", "PlaceConfigMgr", undefined);
      var ccclass = _decorator.ccclass;
      /**
       * 建筑配置管理器
       */
      var PlaceConfigMgr = exports('PlaceConfigMgr', (_dec = ccclass("PlaceConfigMgr"), _dec(_class = /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(PlaceConfigMgr, _Singleton);
        function PlaceConfigMgr() {
          return _Singleton.apply(this, arguments) || this;
        }
        var _proto = PlaceConfigMgr.prototype;
        //=====================================通用======================================
        /**
         * 获取建筑配置
         * @param type 建筑类型
         * @returns 建筑配置
         */
        _proto.getJianZhuConfig = function getJianZhuConfig(type) {
          var cfg = DBRecord.fetchId("Jianzhu", type);
          if (cfg) {
            return cfg;
          } else {
            App.log.logError("建筑配置不存在", "建筑", type);
          }
        }

        /**
         * 获取建筑名称
         */;
        _proto.getBuildingName = function getBuildingName(buildType) {
          var cfg = PlaceConfigMgr.inst.getJianZhuConfig(buildType);
          if (cfg) {
            return cfg.name;
          }
          return "未知建筑";
        };
        _proto.getBuildingIcon = function getBuildingIcon(buildType) {
          var cfg = PlaceConfigMgr.inst.getJianZhuConfig(buildType);
          if (cfg) {
            return cfg.res;
          }
          return "未知建筑";
        }

        /**
         * 通过类型获得建筑配置
         * @param buildType
         * @returns
         */;
        _proto.getBuildConfigByType = function getBuildConfigByType(buildType) {
          var cfg = null;
          switch (buildType) {
            case BuildingType.FuHua:
              cfg = DBRecord.fetchAll("Fuhuazhongxin_Lv");
              break;
            case BuildingType.BuBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Lv", {
                jianzhu: buildType
              });
              break;
            case BuildingType.GongBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Lv", {
                jianzhu: buildType
              });
              break;
            case BuildingType.QiBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Lv", {
                jianzhu: buildType
              });
              break;
            case BuildingType.ZhiHuiBu:
              cfg = DBRecord.fetchAll("Zhihuibu_Lv");
              break;
            case BuildingType.DiBiao:
              cfg = DBRecord.fetchAll("Dibiao_Lv");
              break;
            case BuildingType.MoFang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Lv", {
                jianzhu: buildType
              });
              break;
            case BuildingType.FaMuChang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Lv", {
                jianzhu: buildType
              });
              break;
            case BuildingType.CaiKuangChang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Lv", {
                jianzhu: buildType
              });
              break;
          }
          return cfg;
        };
        _proto.getBuildLevelConfigByType = function getBuildLevelConfigByType(buildType, level) {
          switch (buildType) {
            case BuildingType.FuHua:
              return this.getFuHuaLevelConfig(level);
            case BuildingType.BuBingYing:
              return this.getBingYingLevelConfig(BuildingType.BuBingYing, level);
            case BuildingType.GongBingYing:
              return this.getBingYingLevelConfig(BuildingType.GongBingYing, level);
            case BuildingType.QiBingYing:
              return this.getBingYingLevelConfig(BuildingType.QiBingYing, level);
            case BuildingType.ZhiHuiBu:
              return this.getZhiHuiBuLevelConfig(level);
            case BuildingType.DiBiao:
              return this.getDiBiaoLevelConfig(level);
            case BuildingType.MoFang:
              return this.getZiyuanQuLevelConfig(BuildingType.MoFang, level);
            case BuildingType.FaMuChang:
              return this.getZiyuanQuLevelConfig(BuildingType.FaMuChang, level);
            case BuildingType.CaiKuangChang:
              return this.getZiyuanQuLevelConfig(BuildingType.CaiKuangChang, level);
            default:
              return null;
          }
        }

        /**
         * 获得对应类型建筑对应设备，对应等级的设备等级配置
         * @param buildType
         * @param sbId
         * @param sbLevel
         * @returns
         */;
        _proto.getSheBeiLevelConfigByType = function getSheBeiLevelConfigByType(buildType, sbId, sbLevel) {
          var cfg = null;
          switch (buildType) {
            case BuildingType.FuHua:
              cfg = DBRecord.fetchKvs("Fuhuazhongxin_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.BuBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.GongBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.QiBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.ZhiHuiBu:
              cfg = DBRecord.fetchKvs("Zhihuibu_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.DiBiao:
              cfg = DBRecord.fetchKvs("Dibiao_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.MoFang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.FaMuChang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
            case BuildingType.CaiKuangChang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Shebei", {
                shebei: sbId,
                lv: sbLevel
              });
              break;
          }
          if (cfg.length > 0) {
            return cfg[0];
          }
          return null;
        }

        /**
         * 统一获取建筑配置（包含解锁条件和消耗）
         * @param buildingType 建筑类型
         * @param level 建筑等级
         * @returns 统一格式的建筑配置
         */;
        _proto.getBuildingUnLockConfig = function getBuildingUnLockConfig(buildingType, level) {
          if (level === void 0) {
            level = 1;
          }
          var levelConfig = this.getBuildLevelConfigByType(buildingType, level);
          var result = {};
          if (levelConfig) {
            if (levelConfig.jianzhulimit) {
              result.jianzhulimit = levelConfig.jianzhulimit;
            }
            if (levelConfig.cost_item) {
              result.cost_item = levelConfig.cost_item;
            }
          }
          return result;
        }

        /**
         * 获取建筑建造或升级消耗
         * @param buildingType 建筑类型
         * @param level 目标等级
         * @returns 消耗数组
         */;
        _proto.getBuildingCost = function getBuildingCost(buildingType, level) {
          var levelConfig = this.getBuildLevelConfigByType(buildingType, level);
          return (levelConfig == null ? void 0 : levelConfig.cost_item) || [];
        }

        /**
         * 获取升级时间
         */;
        _proto.getBuildingUpgradeTime = function getBuildingUpgradeTime(buildingType, level) {
          var levelConfig = this.getBuildLevelConfigByType(buildingType, level);
          return (levelConfig == null ? void 0 : levelConfig.jianzhutime) / 1000 || 0;
        }

        /**
         * 获取某个建筑最大等级
         */;
        _proto.getMaxLevelByType = function getMaxLevelByType(buildType) {
          var cfg = this.getBuildConfigByType(buildType);
          if (cfg) {
            return cfg.length || 0;
          }
          return 0;
        }

        /**
         * 获得升级需要的设备等级
         * @param level
         * @returns
         */;
        _proto.getUpgradeSheBeimax = function getUpgradeSheBeimax(buildType, level) {
          var cfg = this.getBuildLevelConfigByType(buildType, level);
          if (cfg) {
            return cfg.shebeimax || 0;
          }
          return 0;
        }

        /**
         * 获得升级需要的设备等级
         * @param buildType
         * @param level
         * @returns
         */;
        _proto.getShebeiUpgradeCost = function getShebeiUpgradeCost(buildType, sbId, sbLevel) {
          var cfg = this.getSheBeiLevelConfigByType(buildType, sbId, sbLevel);
          if (cfg) {
            return cfg.cost_item || [];
          }
          return [];
        }

        /**
         * 检测是否可以升级
         * @returns
         */;
        _proto.checkBuildCanUpgrade = function checkBuildCanUpgrade(buildType, level) {
          var maxLevel = this.getMaxLevelByType(buildType);
          if (level >= maxLevel) {
            return false;
          }
          var config = PlaceConfigMgr.inst.getBuildingUnLockConfig(buildType, level);
          var jianzhulimit = config.jianzhulimit;
          var cost_item = config.cost_item;
          for (var i = 0; i < jianzhulimit.length; i++) {
            var limit = jianzhulimit[i];
            var _maxLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(limit[0]);
            if (_maxLevel < limit[1]) {
              return false;
            }
          }
          if (!App.bagMgr.checkPropEnoughList(cost_item, false, false)) {
            return false;
          }
          return true;
        }

        //=====================================通用======================================

        //=====================================孵化中心======================================
        /**
         * 从配置获取最大人口数
         */;
        _proto.getFuHuaMaxPersonNum = function getFuHuaMaxPersonNum(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.peoplemax : 0;
        }

        /**
         * 获取食物成本
         * @returns 消耗数组
         */;
        _proto.getFuhuaFoodCost = function getFuhuaFoodCost(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.food_cost : [];
        }

        /**
         * 获取等级配置
         */;
        _proto.getFuHuaLevelConfig = function getFuHuaLevelConfig(level) {
          var cfg = DBRecord.fetchId("Fuhuazhongxin_Lv", level);
          if (!cfg) {
            App.log.logError("孵化中心配置不存在", "孵化中心", level);
          }
          return cfg;
        }

        /**
         * 升级消耗
         * @param level
         * @returns
         */;
        _proto.getFuHuaUpgradeCost = function getFuHuaUpgradeCost(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.cost_item : [];
        }

        /**
         * 孵化消耗的食物
         * @param level
         * @returns
         */;
        _proto.getFuHuaFoodCost = function getFuHuaFoodCost(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.food_cost : [];
        }

        /**
         * 获取孵化中心最大等级
         * @returns 最大等级
         */;
        _proto.getFuHuaMaxLevel = function getFuHuaMaxLevel() {
          var cfg = DBRecord.fetchAll("Fuhuazhongxin_Lv");
          return cfg.length;
        }

        /**
         * 获取孵化中心升级时所需展示
         */;
        _proto.getFuhuaUpgradeShow = function getFuhuaUpgradeShow(level) {
          var nextLevel = level + 1;
          var cfg = this.getFuHuaLevelConfig(nextLevel);
          return cfg ? cfg.jianzhuunlock : [];
        }

        /**
         * 获取建造时间（秒）
         * @param level 目标等级
         * @returns 建造时间（秒）
         */;
        _proto.getFuHuaBuildTime = function getFuHuaBuildTime(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.jianzhutime : 0;
        }

        /**
         * 获取人口容量加成
         * @param level 等级
         * @returns 人口容量
         */;
        _proto.getFuHuaPeopleMax = function getFuHuaPeopleMax(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.peoplemax : 0;
        }

        /**
         * 获取金币收益
         * @param level 等级
         * @returns 金币收益
         */;
        _proto.getFuHuaPeopleBornReward = function getFuHuaPeopleBornReward(level) {
          var cfg = this.getFuHuaLevelConfig(level);
          return cfg ? cfg.peopleborn_reward : [];
        }
        //=====================================孵化中心======================================

        //=====================================兵营======================================
        /**
         * 获取等级配置
         */;
        _proto.getBingYingLevelConfig = function getBingYingLevelConfig(buildType, level) {
          var cfgs = DBRecord.fetchKvs("Bingying_Lv", {
            jianzhu: buildType,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("兵营配置不存在", "兵营", buildType, level);
          }
          return cfgs[0];
        }

        /**
         * 获取兵营训练单个士兵的食物消耗
         * @param buildType 建筑类型
         * @param level 兵营等级
         * @param heroId 兵种ID
         * @returns 食物消耗
         */;
        _proto.getBingYingTrainFoodCost = function getBingYingTrainFoodCost(buildType, level) {
          var cfg = this.getBingYingLevelConfig(buildType, level);
          if (cfg && cfg.food_cost) {
            return cfg.food_cost;
          }
          return [];
        }

        /**
         * 获取兵营训练时间（毫秒/士兵）
         * @param buildType 建筑类型
         * @param level 兵营等级
         * @returns 训练时间（秒）
         */;
        _proto.getBingYingTrainTime = function getBingYingTrainTime(buildType, level) {
          var cfg = this.getBingYingLevelConfig(buildType, level);
          return cfg ? cfg.xunliantime / 1000 : 0;
        }

        /**
         * 获取兵营同时训练位置数
         * @param buildType 建筑类型
         * @param level 兵营等级
         * @returns 训练位置数
         */;
        _proto.getBingYingTrainMax = function getBingYingTrainMax(buildType, level) {
          var cfg = this.getBingYingLevelConfig(buildType, level);
          return cfg ? cfg.xunlianmax : 0;
        }

        /**
         * 获取兵营训练完成奖励
         * @param buildType 建筑类型
         * @param level 兵营等级
         * @returns 奖励数组
         */;
        _proto.getBingYingTrainReward = function getBingYingTrainReward(buildType, level) {
          var cfg = this.getBingYingLevelConfig(buildType, level);
          return cfg ? cfg.xunlian_reward : [];
        }

        /**
         * 获取兵营可训练的兵种列表
         * @param buildType 建筑类型
         * @param level 兵营等级
         * @returns 兵种ID数组
         */;
        _proto.getBingYingUnlockSoldiers = function getBingYingUnlockSoldiers(buildType, level) {
          var cfg = this.getBingYingLevelConfig(buildType, level);
          return cfg ? cfg.soldierunlock : [];
        }

        /**
         * 获取兵营设备等级配置
         * @param shebeiId 设备ID
         * @param level 设备等级
         * @returns 设备等级配置
         */;
        _proto.getBingYingSheBeiConfig = function getBingYingSheBeiConfig(shebeiId, level) {
          if (level <= 0) {
            return null;
          }
          var cfgs = DBRecord.fetchKvs("Bingying_Shebei", {
            shebei: shebeiId,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("兵营设备配置不存在", "设备ID", shebeiId, "等级", level);
            return null;
          }
          return cfgs[0];
        }

        //=====================================兵营======================================

        //=====================================孵化中心设备======================================
        /**
         * 获取孵化中心设备等级配置
         * @param shebeiId 设备ID
         * @param level 设备等级
         * @returns 设备等级配置
         */;
        _proto.getFuHuaSheBeiLevelConfig = function getFuHuaSheBeiLevelConfig(shebeiId, level) {
          if (level <= 0) {
            return [];
          }
          var cfgs = DBRecord.fetchKvs("Fuhuazhongxin_Shebei", {
            shebei: shebeiId,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("孵化中心设备配置不存在", "设备ID", shebeiId, "等级", level);
            return null;
          }
          return cfgs[0];
        }
        //=====================================孵化中心设备======================================

        //=====================================指挥部======================================
        /**
         * 获取等级配置
         */;
        _proto.getZhiHuiBuLevelConfig = function getZhiHuiBuLevelConfig(level) {
          var cfg = DBRecord.fetchId("Zhihuibu_Lv", level);
          if (!cfg) {
            App.log.logError("指挥部配置不存在", "指挥部", level);
          }
          return cfg;
        }

        /**
         * 获取指定等级的指挥部最大士兵人数（soldiermax）
         * @param level 指挥部等级
         * @returns 最大士兵人数
         */;
        _proto.getZhiHuiBuSoldierMax = function getZhiHuiBuSoldierMax(level) {
          var cfg = this.getZhiHuiBuLevelConfig(level);
          if (cfg) {
            return cfg.soldiermax;
          }
          return 0;
        }

        /**
         * 获取指挥部设备等级配置
         * @param shebeiId 设备ID
         * @param level 设备等级
         * @returns 设备等级配置
         */;
        _proto.getZhiHuiBuSheBeiConfig = function getZhiHuiBuSheBeiConfig(shebeiId, level) {
          var cfgs = DBRecord.fetchKvs("Zhihuibu_Shebei", {
            shebei: shebeiId,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("指挥部设备配置不存在", "设备ID", shebeiId, "等级", level);
            return null;
          }
          return cfgs[0];
        }

        /**
         * 获取指挥部解锁兵种ID提示
         * @param level
         * @returns
         */;
        _proto.getZhiHuiBuUnlockSoldiers = function getZhiHuiBuUnlockSoldiers(level) {
          var cfg = this.getZhiHuiBuLevelConfig(level);
          if (cfg) {
            return cfg.soldierunlock;
          }
          return [];
        }

        //=====================================指挥部======================================

        //=====================================地标======================================
        /**
         * 获取等级配置
         */;
        _proto.getDiBiaoLevelConfig = function getDiBiaoLevelConfig(level) {
          var cfg = DBRecord.fetchId("Dibiao_Lv", level);
          if (!cfg) {
            App.log.logError("地标配置不存在", "地标", level);
          }
          return cfg;
        }

        /**
         * 获取地标升级时所需展示
         */;
        _proto.getDiBiaoUpgradeShow = function getDiBiaoUpgradeShow(level) {
          var nextLevel = level + 1;
          var cfg = this.getBuildLevelConfigByType(BuildingType.DiBiao, nextLevel);
          return cfg ? cfg.showunlock : [];
        }

        /**
         * 获取地标设备等级配置
         * @param shebeiId 设备ID
         * @param level 设备等级
         * @returns 设备等级配置
         */;
        _proto.getDiBiaoSheBeiConfig = function getDiBiaoSheBeiConfig(shebeiId, level) {
          var cfgs = DBRecord.fetchKvs("Dibiao_Shebei", {
            shebei: shebeiId,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("地标设备配置不存在", "设备ID", shebeiId, "等级", level);
            return null;
          }
          return cfgs[0];
        }

        //=====================================地标======================================

        //=====================================资源区======================================
        /**
         * 获取等级配置
         */;
        _proto.getZiyuanQuLevelConfig = function getZiyuanQuLevelConfig(buildType, level) {
          if (level <= 0) {
            return null;
          }
          var cfgs = DBRecord.fetchKvs("Ziyuanqu_Lv", {
            jianzhu: buildType,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("资源区配置不存在", "资源区", buildType, level);
          }
          return cfgs[0];
        }

        /**
         * 获取资源区设备等级配置
         * @param shebeiId 设备ID
         * @param level 设备等级
         * @returns 设备等级配置
         */;
        _proto.getZiyuanQuSheBeiConfig = function getZiyuanQuSheBeiConfig(shebeiId, level) {
          var cfgs = DBRecord.fetchKvs("Ziyuanqu_Shebei", {
            shebei: shebeiId,
            lv: level
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logError("资源区设备配置不存在", "设备ID", shebeiId, "等级", level);
            return null;
          }
          return cfgs[0];
        }

        //=====================================资源区======================================

        // ======================设备相关======================
        /**
         * 获取设备配置
         * @param id 设备Id
         * @returns 设备配置
         */;
        _proto.getSheBeiConfig = function getSheBeiConfig(id) {
          var cfg = DBRecord.fetchId("Shebei", id);
          if (cfg) {
            return cfg;
          } else {
            App.log.logError("设备配置不存在", "设备", id);
          }
        }

        /**
         * 获取建筑需要的设备ID数组
         * @param buildingType
         * @returns
         */;
        _proto.getBuildingSheBeiConfig = function getBuildingSheBeiConfig(buildingType) {
          var cfg1 = this.getJianZhuConfig(buildingType);
          if (cfg1) {
            return cfg1.shebei;
          }
        }

        /**
         * 通过设备ID和设备等级获取
         * @param shebeiId 设备Id
         * @param lv 等级
         * @returns 设备配置
         */;
        _proto.getFuHuaSheBeiConfig = function getFuHuaSheBeiConfig(shebeiId, lv) {
          var cfg = DBRecord.fetchKey("Fuhuazhongxin_Shebei", shebeiId, lv);
          if (cfg) {
            return cfg;
          } else {
            App.log.logError("孵化中心设备配置不存在", "设备", shebeiId);
          }
        }

        /**
         * 通过设备ID获取对应建筑类型的设备最大等级
         * @param shebeiId 设备ID
         * @returns 设备最大等级
         */;
        _proto.getShebeiMaxLevel = function getShebeiMaxLevel(buildType, shebeiId) {
          var maxLevel = 0;
          var cfg = null;
          switch (buildType) {
            case BuildingType.FuHua:
              cfg = DBRecord.fetchKvs("Fuhuazhongxin_Shebei", {
                shebei: shebeiId
              });
              break;
            case BuildingType.BuBingYing:
            case BuildingType.GongBingYing:
            case BuildingType.QiBingYing:
              cfg = DBRecord.fetchKvs("Bingying_Shebei", {
                shebei: shebeiId
              });
              break;
            case BuildingType.ZhiHuiBu:
              cfg = DBRecord.fetchKvs("Zhihuibu_Shebei", {
                shebei: shebeiId
              });
              break;
            case BuildingType.DiBiao:
              cfg = DBRecord.fetchKvs("Dibiao_Shebei", {
                shebei: shebeiId
              });
              break;
            case BuildingType.MoFang:
            case BuildingType.FaMuChang:
            case BuildingType.CaiKuangChang:
              cfg = DBRecord.fetchKvs("Ziyuanqu_Shebei", {
                shebei: shebeiId
              });
              break;
          }
          if (cfg && cfg.length > 0) {
            var levels = cfg.map(function (item) {
              return item.lv;
            });
            maxLevel = Math.max.apply(Math, levels);
          }
          return maxLevel;
        }
        // ======================设备相关======================

        // ======================杂项======================
        ;

        _proto.getDiamondCost = function getDiamondCost() {
          return UtilGame.getZaXiangConfig("diamond_cost");
        };
        _proto.getSpeedCardCost = function getSpeedCardCost() {
          return UtilGame.getZaXiangConfig("speed_card_cost");
        }
        // ======================杂项======================

        /**
         * 获取士兵名称通过士兵ID
         * @param soldierType
         * @returns
         */;
        _proto.getSoldierName = function getSoldierName(soldierType) {
          var config = DBRecord.fetchId("Soldier", soldierType);
          var jzConfigs = DBRecord.fetchAll("Jianzhu");
          var showName = "";
          jzConfigs.forEach(function (jzConfig) {
            if (jzConfig.soldiertype === config.job) {
              showName = jzConfig.soldiername;
            }
          });
          return showName;
        }

        /**
         * 通过建筑获取训练士兵名称
         * @param buildType
         * @returns
         */;
        _proto.getSoldierNameByBuild = function getSoldierNameByBuild(buildType) {
          var config = this.getJianZhuConfig(buildType);
          return config.soldiername;
        }

        // ======================任务配置======================
        /**
         * 获取任务配置
         * @param taskId 任务ID
         * @returns 任务配置
         */;
        _proto.getTaskConfig = function getTaskConfig(taskId) {
          var cfg = DBRecord.fetchId("Task_Ku", taskId);
          if (cfg) {
            return cfg;
          } else {
            App.log.logError("任务配置不存在", "任务", taskId);
          }
        }
        // ======================任务配置======================
        ;

        return PlaceConfigMgr;
      }(Singleton())) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlaceGameEnum.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "0c5e9Hych9LGqqI39cLBlg0", "PlaceGameEnum", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-05-09 16:36:02
       * @FilePath: \casino-client\assets\AB\Themes\PlaceGame\scripts\PlaceGameEnum.ts
       * @LastEditors: xiehande www.xiehande@qq.com
       * @LastEditTime: 2025-12-11 19:02:08
       * @Description: 游戏内枚举类型管理
       */

      /**
       * 地图参数
       */
      var MapParams = exports('MapParams', /*#__PURE__*/function (MapParams) {
        MapParams[MapParams["mapWidth"] = 5] = "mapWidth";
        MapParams[MapParams["mapHeight"] = 5] = "mapHeight";
        MapParams[MapParams["cellWidth"] = 760] = "cellWidth";
        MapParams[MapParams["cellHeight"] = 644] = "cellHeight";
        return MapParams;
      }({}));

      /**
       * 点击建筑弹出的UI类型
       */
      var BuildingType = exports('BuildingType', /*#__PURE__*/function (BuildingType) {
        BuildingType[BuildingType["FuHua"] = 1] = "FuHua";
        BuildingType[BuildingType["ZhiHuiBu"] = 2] = "ZhiHuiBu";
        BuildingType[BuildingType["DiBiao"] = 3] = "DiBiao";
        BuildingType[BuildingType["BuBingYing"] = 4] = "BuBingYing";
        BuildingType[BuildingType["GongBingYing"] = 5] = "GongBingYing";
        BuildingType[BuildingType["QiBingYing"] = 6] = "QiBingYing";
        BuildingType[BuildingType["MoFang"] = 7] = "MoFang";
        BuildingType[BuildingType["FaMuChang"] = 8] = "FaMuChang";
        BuildingType[BuildingType["CaiKuangChang"] = 9] = "CaiKuangChang";
        BuildingType[BuildingType["ShangDian"] = 10] = "ShangDian";
        BuildingType[BuildingType["JiuGuan"] = 11] = "JiuGuan";
        BuildingType[BuildingType["GongHui"] = 12] = "GongHui";
        BuildingType[BuildingType["JingJIChang"] = 13] = "JingJIChang";
        return BuildingType;
      }({}));

      /**
       * 动物类型枚举
       */
      var AnimalType = exports('AnimalType', /*#__PURE__*/function (AnimalType) {
        AnimalType[AnimalType["CHICKEN"] = 1] = "CHICKEN";
        AnimalType[AnimalType["DUCK"] = 2] = "DUCK";
        AnimalType[AnimalType["GOOSE"] = 3] = "GOOSE";
        return AnimalType;
      }({}));

      /**
       * 建筑状态枚举
       */
      var BuildingStatus = exports('BuildingStatus', /*#__PURE__*/function (BuildingStatus) {
        BuildingStatus[BuildingStatus["LOCK"] = 0] = "LOCK";
        BuildingStatus[BuildingStatus["BUILDING"] = 1] = "BUILDING";
        BuildingStatus[BuildingStatus["IDLE"] = 3] = "IDLE";
        BuildingStatus[BuildingStatus["WORKING"] = 4] = "WORKING";
        BuildingStatus[BuildingStatus["FULLY"] = 5] = "FULLY";
        return BuildingStatus;
      }({}));

      /**
       * 士兵类型 对应Soldier配置表
       */
      var SoldierType = exports('SoldierType', /*#__PURE__*/function (SoldierType) {
        SoldierType[SoldierType["BuBing"] = 1] = "BuBing";
        SoldierType[SoldierType["GongBing"] = 2] = "GongBing";
        SoldierType[SoldierType["QiBing"] = 3] = "QiBing";
        return SoldierType;
      }({}));

      /**
       * 道具来源
       */
      var ItemUISource = exports('ItemUISource', /*#__PURE__*/function (ItemUISource) {
        ItemUISource[ItemUISource["bag"] = 0] = "bag";
        ItemUISource[ItemUISource["other"] = 1] = "other";
        return ItemUISource;
      }({}));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlaceGameMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './Singleton.ts', './BattleUtil.ts', './NetChannelMgr.ts', './MonitorType.ts', './PlaceGameEnum.ts', './UIMgr.ts', './Layout_UI_TrainingView.ts', './UI_TrainingView.ts', './UI_UnLockView.ts', './Layout_UI_UnLockView.ts', './UI_SpeedUpView.ts', './Layout_UI_SpeedUpView.ts', './EventType.ts', './PlaceConfigMgr.ts', './UI_PlaceTaskView.ts', './Layout_UI_PlaceTaskView.ts', './UI_PlaceGetRewardView.ts', './Layout_UI_PlaceGetRewardView.ts', './UI_SheBeiUpgradeView.ts', './Layout_UI_SheBeiUgradeView.ts', './UI_BuildUpgradeView.ts', './Layout_UI_BuildUpgradeView.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, App, Singleton, AxingManager, netChannel, MonitorType, ModType, BuildingType, SoldierType, UIMgr, LayerType, Layout_UI_TrainingView, UI_TrainingView, UI_UnLockView, Layout_UI_UnLockView, UI_SpeedUpView, Layout_UI_SpeedUpView, EventType, PlaceConfigMgr, UI_PlaceTaskView, Layout_UI_PlaceTaskView, UI_PlaceGetRewardView, Layout_UI_PlaceGetRewardView, UI_SheBeiUpgradeView, Layout_UI_SheBeiUpgradeView, UI_BuildUpgradeView, Layout_UI_BuildUpgradeView;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Singleton = module.Singleton;
    }, function (module) {
      AxingManager = module.AxingManager;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      BuildingType = module.BuildingType;
      SoldierType = module.SoldierType;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      Layout_UI_TrainingView = module.Layout_UI_TrainingView;
    }, function (module) {
      UI_TrainingView = module.UI_TrainingView;
    }, function (module) {
      UI_UnLockView = module.UI_UnLockView;
    }, function (module) {
      Layout_UI_UnLockView = module.Layout_UI_UnLockView;
    }, function (module) {
      UI_SpeedUpView = module.UI_SpeedUpView;
    }, function (module) {
      Layout_UI_SpeedUpView = module.Layout_UI_SpeedUpView;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      UI_PlaceTaskView = module.UI_PlaceTaskView;
    }, function (module) {
      Layout_UI_PlaceTaskView = module.Layout_UI_PlaceTaskView;
    }, function (module) {
      UI_PlaceGetRewardView = module.UI_PlaceGetRewardView;
    }, function (module) {
      Layout_UI_PlaceGetRewardView = module.Layout_UI_PlaceGetRewardView;
    }, function (module) {
      UI_SheBeiUpgradeView = module.UI_SheBeiUpgradeView;
    }, function (module) {
      Layout_UI_SheBeiUpgradeView = module.Layout_UI_SheBeiUpgradeView;
    }, function (module) {
      UI_BuildUpgradeView = module.UI_BuildUpgradeView;
    }, function (module) {
      Layout_UI_BuildUpgradeView = module.Layout_UI_BuildUpgradeView;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "2145bNzUtBK46+dS9isrlAf", "PlaceGameMgr", undefined);
      var ccclass = _decorator.ccclass;

      /**
       * 游戏管理器
       * 负责管理整个养成游戏的核心逻辑，协调建筑、资源等系统
       */
      var PlaceGameMgr = exports('PlaceGameMgr', (_dec = ccclass("PlaceGameMgr"), _dec(_class = /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(PlaceGameMgr, _Singleton);
        function PlaceGameMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          /**
           * 服务器建筑数据
           */
          _this.buildings = [];
          /**
           * 指派英雄信息列表（按 hero_id 索引）
           */
          _this._assignHeroMap = new Map();
          /**
           * 建筑控制器
           */
          _this.buildingCtrl = null;
          /**
           * 地图控制
           */
          _this.hexMapCtrl = null;
          /**
           * 自动训练状态（按建筑类型和索引存储）
           */
          _this._autoTrainMap = new Map();
          return _this;
        }
        var _proto = PlaceGameMgr.prototype;
        _proto.init = function init() {
          this._resetData();
          this.addEventListeners();
        };
        _proto.dispose = function dispose() {
          this._resetData();
          App.monitorMgr.offTarget(this);
        };
        _proto._resetData = function _resetData() {
          this._assignHeroMap.clear();
          this._autoTrainMap.clear();
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResLoadBuilding, this.resLoadBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResFuHua, this.resFuHua, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSendZiYuan, this.resSendZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAcceptTask, this.resAcceptTask, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTaskFinish, this.resTaskFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResImmFinishTask, this.resImmFinishTask, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetTaskReward, this.resGetTaskReward, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSpeedCardUpgrade, this.resSpeedCardUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetZiYuan, this.resGetZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOneKey, this.resOneKey, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResQueryZiYuanYuanInfo, this.resQueryZiYuanYuanInfo, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrain, this.resTrain, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrainFinish, this.resTrainFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetReserve, this.resGetReserve, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResShebeiUpgrade, this.resShebeiUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingDataChange, this.resBuildingDataChange, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAssignHero, this.resAssignHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAssignHeroInfo, this.resAssignHeroInfo, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAssignHeroChange, this.resAssignHeroChange, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.onResourceUpdated, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onResourceUpdated, this);
        };
        _proto.setBuildCtrl = function setBuildCtrl(buildCtrl) {
          this.buildingCtrl = buildCtrl;
        };
        _proto.setHexMapCtrl = function setHexMapCtrl(hexMapCtrl) {
          this.hexMapCtrl = hexMapCtrl;
        };
        _proto.getBuildingComp = function getBuildingComp(buildType, buildIndex) {
          if (!this.buildingCtrl) {
            return null;
          }
          return this.buildingCtrl.getBuildingComp(buildType, buildIndex);
        }

        /**
         * 通过建筑唯一ID获取建筑组件
         * @param buildingUid 建筑唯一ID
         * @returns 建筑组件，如果找不到返回null
         */;
        _proto.getBuildingCompByUid = function getBuildingCompByUid(buildingUid) {
          var building = this.buildings.find(function (b) {
            return b && b.building_uid === buildingUid;
          });
          if (building) {
            return this.getBuildingComp(building.building_id, building.sid);
          }
          return null;
        }

        /**
         * 获得存放NPC的层级
         * @returns
         */;
        _proto.getRoleLayer = function getRoleLayer() {
          return this.buildingCtrl.node.parent.getChildByName("npcLayer");
        }

        /**
         * 通过建筑类型获得该建筑类型中最大的等级
         * @param buildType 建筑类型
         * @returns
         */;
        _proto.getMaxLevelByBuildType = function getMaxLevelByBuildType(buildType) {
          if (!this.buildings || !Array.isArray(this.buildings) || this.buildings.length === 0) {
            return 0;
          }
          var maxLevel = 0;
          for (var _iterator = _createForOfIteratorHelperLoose(this.buildings), _step; !(_step = _iterator()).done;) {
            var building = _step.value;
            if (building && building.building_id === buildType) {
              var level = building.building_level || 0;
              maxLevel = Math.max(maxLevel, level);
            }
          }
          return maxLevel;
        }

        /**
         * 通过建筑类型和设备ID获取该建筑设备的最大等级
         * @param buildType 建筑类型
         * @param shebeiId 设备ID
         * @returns 设备最大等级
         */;
        _proto.getMaxShebeiLevelByBuildType = function getMaxShebeiLevelByBuildType(buildType, shebeiId) {
          if (!this.buildings || !Array.isArray(this.buildings) || this.buildings.length === 0) {
            return 0;
          }
          var maxLevel = 0;
          for (var _iterator2 = _createForOfIteratorHelperLoose(this.buildings), _step2; !(_step2 = _iterator2()).done;) {
            var building = _step2.value;
            if (building && building.building_id === buildType && building.shebeis) {
              var shebei = building.shebeis.find(function (sb) {
                return sb.shebei_id === shebeiId;
              });
              if (shebei) {
                maxLevel = Math.max(maxLevel, shebei.shebei_level || 0);
              }
            }
          }
          return maxLevel;
        }

        /**
         * 获取建筑设备的最大等级
         * @param buildingUid 建筑唯一ID
         * @param buildType 建筑类型
         * @returns 建筑设备的最大等级
         */;
        _proto.getMaxShebeiLevel = function getMaxShebeiLevel(buildingUid, buildType) {
          if (!this.buildings || !Array.isArray(this.buildings) || this.buildings.length === 0) {
            return 0;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === buildingUid && b.building_id === buildType;
          });
          if (!building || !Array.isArray(building.shebeis) || building.shebeis.length === 0) {
            return 0;
          }
          var maxLevel = 0;
          for (var _iterator3 = _createForOfIteratorHelperLoose(building.shebeis), _step3; !(_step3 = _iterator3()).done;) {
            var shebei = _step3.value;
            if (shebei && typeof shebei.shebei_level === "number") {
              maxLevel = Math.max(maxLevel, shebei.shebei_level);
            }
          }
          return maxLevel;
        }

        /**
         * 检查指定建筑的所有设备等级是否都大于等于配置的最大等级
         * @param buildingUid 建筑唯一ID
         * @param buildType 建筑类型
         * @returns
         */;
        _proto.checkAllShebeiMaxLevel = function checkAllShebeiMaxLevel(buildingUid, buildType) {
          if (!this.buildings || !Array.isArray(this.buildings) || this.buildings.length === 0) {
            return false;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === buildingUid && b.building_id === buildType;
          });
          if (!building) {
            return false;
          }
          var maxLevel = PlaceConfigMgr.inst.getUpgradeSheBeimax(buildType, building.building_level);
          if (maxLevel <= 0) return false;
          var shebeiIds = PlaceConfigMgr.inst.getBuildingSheBeiConfig(buildType);
          if (!Array.isArray(shebeiIds) || shebeiIds.length === 0) {
            return true;
          }
          var shebeiMap = new Map();
          if (building.shebeis && Array.isArray(building.shebeis)) {
            for (var _iterator4 = _createForOfIteratorHelperLoose(building.shebeis), _step4; !(_step4 = _iterator4()).done;) {
              var shebei = _step4.value;
              shebeiMap.set(shebei.shebei_id, shebei.shebei_level || 0);
            }
          }
          for (var _iterator5 = _createForOfIteratorHelperLoose(shebeiIds), _step5; !(_step5 = _iterator5()).done;) {
            var _shebeiMap$get;
            var shebeiId = _step5.value;
            var shebeiLevel = (_shebeiMap$get = shebeiMap.get(shebeiId)) != null ? _shebeiMap$get : 0;
            if (shebeiLevel < maxLevel) {
              return false;
            }
          }
          return true;
        }

        /**
         * 检查建造条件
         */;
        _proto.checkBuildCondition = function checkBuildCondition(buildType, targetLevel) {
          var config = PlaceConfigMgr.inst.getBuildingUnLockConfig(buildType, targetLevel);
          var jianzhulimit = config.jianzhulimit;
          var cost_item = config.cost_item;
          for (var i = 0; i < jianzhulimit.length; i++) {
            var limit = jianzhulimit[i];
            var maxLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(limit[0]);
            if (maxLevel < limit[1]) {
              return false;
            }
          }
          if (!cost_item || cost_item.length === 0) {
            return true;
          }
          if (!App.bagMgr.checkPropEnoughList(cost_item, false)) {
            return false;
          }
          return true;
        }

        /**
         * 获取指定孵化中心当前人口
         * @param buildingUid 孵化中心唯一ID
         * @returns 当前人口数量，如果找不到返回0
         */;
        _proto.getFuhuaCenterPeople = function getFuhuaCenterPeople() {
          var buildingUid = 0;
          var fuhuaComp = PlaceGameMgr.inst.buildingCtrl.getFuHuaComp();
          if (fuhuaComp) {
            buildingUid = fuhuaComp.dataModel.buildingUid;
          }
          if (!this.buildings || !Array.isArray(this.buildings)) {
            return 0;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === buildingUid;
          });
          if (building && typeof building.total_people === "number") {
            return building.total_people;
          }
          return 0;
        }

        /**
         * 获取某个指挥部某个兵种的服役人数
         * @param buildingUid 指挥部唯一ID
         * @param soldierType 兵种类型
         * @returns
         */;
        _proto.getServicePersonCount = function getServicePersonCount(buildingUid, soldierType) {
          if (!this.buildings || !Array.isArray(this.buildings)) {
            return 0;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === buildingUid;
          });
          if (!building || !Array.isArray(building.services)) {
            return 0;
          }
          var service = building.services.find(function (s) {
            return s.soldiertype === soldierType;
          });
          return service ? service.count || 0 : 0;
        }

        /**
         * 根据建筑类型获取建筑UID
         * @param buildingType 建筑类型
         * @returns 建筑UID，如果找不到返回0
         */;
        _proto.getBuildingUidByType = function getBuildingUidByType(buildingType) {
          var buildings = PlaceGameMgr.inst.buildings;
          if (!buildings || !Array.isArray(buildings)) {
            return 0;
          }

          // 查找对应类型的建筑
          var building = buildings.find(function (b) {
            return b.building_id === buildingType;
          });
          return building ? building.building_uid : 0;
        };
        _proto.onEnter = function onEnter() {
          App.log.logBusiness("游戏管理器: 进入城市");
          this.addEventListeners();
          App.soundMgr.stopAll();
          AxingManager.getInstance().clearCache();
          if (App.broadcastMgr.gameMsgList.length > 0) {
            App.broadcastMgr.show();
          }
        }

        /**
         * 退出游戏
         */;
        _proto.onExit = function onExit() {
          App.log.logBusiness("游戏管理器: 游戏已退出");
          App.soundMgr.stopAll();
          App.monitorMgr.offTarget(this);
        }

        /**
         * 获取指挥部中指定兵种的个数
         * @param soldierType 兵种类型
         * @returns 兵种个数
         */;
        _proto.getSoldierCount = function getSoldierCount(soldierType) {
          if (!this.buildings || !Array.isArray(this.buildings)) {
            return 0;
          }
          var comp = this.buildingCtrl.getZhiHuiBuComp();
          var buildingUid = 0;
          if (comp) {
            buildingUid = comp.dataModel.buildingUid;
            var building = this.buildings.find(function (b) {
              return b.building_uid === buildingUid;
            });
            if (!building || !Array.isArray(building.services)) {
              return 0;
            }
            var service = building.services.find(function (s) {
              return s.soldiertype === soldierType;
            });
            return service ? service.count || 0 : 0;
          }
          return 0;
        }

        /**
         * 设备升级界面
         * @param buildingUid 建筑UID
         * @param buildingType 建筑类型
         */;
        _proto.showSheBeiUpgradeView = function showSheBeiUpgradeView(buildingUid, buildingType, buildingIndex) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u663E\u793A\u5347\u7EA7\u754C\u9762 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51\u7C7B\u578B: " + buildingType);
          UIMgr.inst.openOnce(UI_SheBeiUpgradeView, LayerType.panel, Layout_UI_SheBeiUpgradeView, [{
            buildingUid: buildingUid,
            buildType: buildingType,
            buildIndex: buildingIndex
          }]);
        }

        /**
         * 建筑升级界面
         * @param buildingUid
         * @param buildingType
         * @param buildingIndex
         */;
        _proto.showBuildUpgradeView = function showBuildUpgradeView(buildingUid, buildingType, buildingIndex) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u663E\u793A\u5347\u7EA7\u754C\u9762 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51\u7C7B\u578B: " + buildingType);
          UIMgr.inst.openOnce(UI_BuildUpgradeView, LayerType.panel, Layout_UI_BuildUpgradeView, [{
            buildingUid: buildingUid,
            buildType: buildingType,
            buildIndex: buildingIndex
          }]);
        }

        /**
         * 显示建筑解锁界面
         * @param buildingType 建筑类型
         * @param position 建造位置
         */;
        _proto.showUnLockView = function showUnLockView(buildingType, buildIndex) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u663E\u793A\u5EFA\u7B51\u89E3\u9501\u754C\u9762 - \u5EFA\u7B51\u7C7B\u578B: " + buildingType + ", \u7D22\u5F15: " + buildIndex);
          UIMgr.inst.openOnce(UI_UnLockView, LayerType.panel, Layout_UI_UnLockView, [{
            buildingType: buildingType,
            buildIndex: buildIndex
          }]);
        }

        /**
         * 显示训练界面
         */;
        _proto.showTrainingView = function showTrainingView(buildingUid, buildingType, buildingIndex) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u663E\u793A\u8BAD\u7EC3\u754C\u9762 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51\u7C7B\u578B: " + buildingType + ", \u7D22\u5F15: " + buildingIndex);
          UIMgr.inst.openOnce(UI_TrainingView, LayerType.panel, Layout_UI_TrainingView, [{
            buildingUid: buildingUid,
            buildType: buildingType,
            buildIndex: buildingIndex
          }]);
        }

        /**
         * 移动地图到对应建筑所在的位置
         * @param buildingType 建筑类型
         */;
        _proto.moveToBuilding = function moveToBuilding(buildingType, callFunc, autoOpen) {
          if (autoOpen === void 0) {
            autoOpen = true;
          }
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u79FB\u52A8\u5730\u56FE\u5230\u5BF9\u5E94\u5EFA\u7B51\u6240\u5728\u7684\u4F4D\u7F6E - \u5EFA\u7B51\u7C7B\u578B: " + buildingType);
          var buildingUid = this.getBuildingUidByType(buildingType);
          var buildingComp = null;
          if (buildingUid) {
            var building = this.buildings.find(function (b) {
              return b.building_uid === buildingUid;
            });
            if (building) {
              buildingComp = this.getBuildingComp(building.building_id, building.sid);
            }
          } else {
            buildingComp = this.getBuildingComp(buildingType, 1);
          }
          if (buildingComp) {
            var buildingWorldPos = buildingComp.node.getWorldPosition();
            if (callFunc) {
              callFunc();
            }
            if (this.hexMapCtrl) {
              this.hexMapCtrl.moveToPosition(buildingWorldPos, function () {
                if (autoOpen) {
                  if (buildingComp && typeof buildingComp.onBuildingClick === "function") {
                    buildingComp.onBuildingClick();
                  }
                }
              });
            } else {
              App.log.logError("游戏管理器: 地图控制器未设置，无法移动到建筑位置");
            }
          } else {
            App.log.logError("moveToBuilding  没有找到建筑");
          }
        }

        /**
         * 检测是否有任何兵营有待服役人员
         * @returns 如果有任何兵营的待服役人员数量大于0，返回true，否则返回false
         */;
        _proto.checkReserveSoldiers = function checkReserveSoldiers() {
          // 检查步兵营
          var bubingComp = this.buildingCtrl.getBuBingYingComp();
          if (bubingComp && bubingComp.dataModel && bubingComp.dataModel.reserveCount > 0) {
            return true;
          }

          // 检查弓兵营
          var gongbingComp = this.buildingCtrl.getGongBingYingComp();
          if (gongbingComp && gongbingComp.dataModel && gongbingComp.dataModel.reserveCount > 0) {
            return true;
          }

          // 检查骑兵营
          var qibingComp = this.buildingCtrl.getQiBingYingComp();
          if (qibingComp && qibingComp.dataModel && qibingComp.dataModel.reserveCount > 0) {
            return true;
          }
          return false;
        }

        /**
         * 请求加载建筑
         */;
        _proto.reqLoadBuilding = function reqLoadBuilding() {
          App.log.logBusiness("游戏管理器: 请求加载建筑");
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqLoadBuilding, {});
        }

        /**
         * 返回建筑数据(只会包含已经解锁的建筑)
         * @param msg
         */;
        _proto.resLoadBuilding = function resLoadBuilding(msg) {
          App.log.logBusiness("游戏管理器: 接收加载建筑响应");
          if (msg && msg.buildings) {
            this.buildings = msg.buildings;
          } else {
            this.buildings = [];
          }
        }

        /**
         * 接收加载建筑响应
         * @param msg 建筑加载响应数据
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          App.log.logBusiness("游戏管理器: 接收加载建筑响应", "建筑", msg);
          var building = this.buildings.find(function (building) {
            return building.building_uid === msg.building_uid && building.building_id === msg.building_id;
          });
          if (building) {
            building.upgrade_duration = msg.upgrade_duration;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! resUpgradeBuilding 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 接收建筑升级完成响应
         * @param msg 建筑升级完成响应数据
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          var building = this.buildings.find(function (building) {
            return building.building_uid === msg.building_uid && building.building_id === msg.building_id;
          });
          if (building) {
            building.building_level = msg.level;
            building.upgrade_duration = 0;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 发送孵化请求
         */;
        _proto.reqFuHua = function reqFuHua(buildingUid, buildingId) {
          App.log.logBusiness("游戏管理器: 发送孵化请求");
          var msg = {};
          msg.building_uid = buildingUid;
          msg.building_id = buildingId;
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqFuHua, msg);
        }

        /**
         * 接收孵化响应
         * @param msg 孵化响应数据
         */;
        _proto.resFuHua = function resFuHua(msg) {
          if (msg.code !== 200) {
            App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u63A5\u6536\u5B75\u5316\u54CD\u5E94 - \u9519\u8BEF\u7801: " + msg.code + ", \u79BD\u755C\u6570\u91CF: " + msg.building_uid);
            return;
          }
          var building = this.buildings.find(function (building) {
            return building.building_uid === msg.building_uid && building.building_id === msg.building_id;
          });
          if (building) {
            building.total_people = msg.total_people;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingFHGetReward, building.building_uid);
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 发送建造请求
         * @param buildingId 建筑ID
         */;
        _proto.reqBuild = function reqBuild(buildingId, buildIndex) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u5EFA\u9020\u8BF7\u6C42 - \u5EFA\u7B51ID: " + buildingId + ", \u7D22\u5F15: " + buildIndex);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqBuild, {
            building_id: buildingId,
            sid: buildIndex
          });
        }

        /**
         * 处理建造响应
         */;
        _proto.resBuild = function resBuild(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var newBuilding = {
            building_uid: msg.building_uid,
            building_id: msg.building_id,
            building_level: 0,
            upgrade_duration: msg.upgrade_duration,
            entry_hero: 0,
            shebeis: [],
            total_people: 0,
            train_count: 0,
            services: [],
            ziyuans: [],
            sid: msg.sid,
            tasks: [],
            reserve_count: 0
          };
          var index = this.buildings.findIndex(function (building) {
            return building.building_id === msg.building_id && building.sid === msg.sid;
          });
          if (index >= 0) {
            this.buildings[index] = newBuilding;
            App.log.logError("出错!!!! 建筑是已经存在的");
          } else {
            this.buildings.push(newBuilding);
          }
          var comp = this.getBuildingComp(msg.building_id, msg.sid);
          if (comp) {
            comp.updateDataModel(newBuilding);
          } else {
            App.log.logError("出错!!!! 建筑不存在");
          }
          App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, newBuilding);
        }

        /**
         * 使用钻石立即完成
         */;
        _proto.reqDiamondUpgrade = function reqDiamondUpgrade(buildingUid, buildingId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u5347\u7EA7\u5EFA\u7B51\u8BF7\u6C42 - UID: " + buildingUid + ", \u5EFA\u7B51ID: " + buildingId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqDiamondUpgrade, {
            building_uid: buildingUid,
            building_id: buildingId
          });
        }

        /**
         * 处理钻石升级响应
         * @param msg 钻石升级响应数据
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u7B51\u5347\u7EA7\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (building) {
            return building.building_uid === msg.building_uid && building.building_id === msg.building_id;
          });
          if (building) {
            building.building_level = msg.level;
            building.upgrade_duration = 0;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 发送升级建筑请求
         * @param uid 建筑唯一ID
         * @param buildingId 建筑ID
         * @param cost 升级消耗
         */;
        _proto.reqUpgradeBuilding = function reqUpgradeBuilding(buildingUid, buildingId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u5347\u7EA7\u5EFA\u7B51\u8BF7\u6C42 - UID: " + buildingUid + ", \u5EFA\u7B51ID: " + buildingId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUpgradeBuilding, {
            building_uid: buildingUid,
            building_id: buildingId
          });
        }

        /**
         * 发送设备升级请求
         * @param uid 建筑唯一ID
         * @param shebeiId 设备ID
         */;
        _proto.reqShebeiUpgrade = function reqShebeiUpgrade(buildingUid, buildType, shebeiId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u8BBE\u5907\u5347\u7EA7\u8BF7\u6C42 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51\u7C7B\u578B: " + buildType + ", \u8BBE\u5907ID: " + shebeiId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqShebeiUpgrade, {
            building_uid: buildingUid,
            building_id: buildType,
            shebei_id: shebeiId
          });
        }

        /**
         * 设备升级返回
         * @param msg
         * @returns
         */;
        _proto.resShebeiUpgrade = function resShebeiUpgrade(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u8BBE\u5907\u5347\u7EA7\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (building) {
            return building.building_uid === msg.building_uid && building.building_id === msg.building_id;
          });
          if (building) {
            // 更新服务器数据中的设备等级
            var shebei = building.shebeis.find(function (shebei) {
              return shebei.shebei_id === msg.shebei_id;
            });
            if (shebei) {
              shebei.shebei_level = msg.level;
            } else {
              shebei = {
                shebei_id: msg.shebei_id,
                shebei_level: msg.level
              };
              if (!Array.isArray(building.shebeis)) {
                building.shebeis = [];
              }
              building.shebeis.push(shebei);
            }
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
              App.log.logBusiness("\u8BBE\u5907\u5347\u7EA7\u6210\u529F - \u5EFA\u7B51: " + building.building_id + ", \u8BBE\u5907ID: " + msg.shebei_id + ", \u7B49\u7EA7: " + msg.level);
            } else {
              App.log.logError("出错!!!! resShebeiUpgrade 建筑组件不存在");
            }
          }
        }

        /**
         * 接受后端定时推送更新协议
         * @returns
         */;
        _proto.resSendZiYuan = function resSendZiYuan(msg) {
          var _this2 = this;
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u8D44\u6E90\u5EFA\u7B51\u4ED3\u5E93\u4FE1\u606F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          if (msg.ziyuans && Array.isArray(msg.ziyuans)) {
            var _loop = function _loop() {
              var ziYuan = _step6.value;
              if (!ziYuan) return 1; // continue
              var buildingUid = ziYuan.building_uid;
              var buildingId = ziYuan.building_id;
              var items = ziYuan.items || [];
              var building = _this2.buildings.find(function (b) {
                return b.building_uid === buildingUid && b.building_id === buildingId;
              });
              if (building) {
                building.ziyuans = items;
                var comp = _this2.getBuildingComp(building.building_id, building.sid);
                if (comp) {
                  comp.updateDataModel(building);
                } else {
                  App.log.logError("\u8D44\u6E90\u63A8\u9001: \u5EFA\u7B51\u7EC4\u4EF6\u4E0D\u5B58\u5728 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51ID: " + buildingId);
                }
              } else {
                App.log.logError("\u8D44\u6E90\u63A8\u9001: \u5EFA\u7B51\u6570\u636E\u4E0D\u5B58\u5728 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51ID: " + buildingId);
              }
            };
            for (var _iterator6 = _createForOfIteratorHelperLoose(msg.ziyuans), _step6; !(_step6 = _iterator6()).done;) {
              if (_loop()) continue;
            }
          }
        }

        /**
         * 请求领取资源
         * @param buildingUid
         * @param buildType
         */;
        _proto.reqGetZiYuan = function reqGetZiYuan(buildingUid, buildType) {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqGetZiYuan, {
            building_uid: buildingUid,
            building_id: buildType
          });
        }

        /**
         * 响应领取资源
         * @param msg
         * @returns
         */;
        _proto.resGetZiYuan = function resGetZiYuan(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u8D44\u6E90\u5EFA\u7B51\u4ED3\u5E93\u4FE1\u606F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (building) {
            return building.building_uid === msg.building_uid && building.building_id === msg.building_id;
          });
          if (building) {
            building.ziyuans = [];
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! resShebeiUpgrade 建筑不存在");
            }
          }
        }

        /**
         * 请求查询资源信息
         */;
        _proto.reqQueryZiYuanYuanInfo = function reqQueryZiYuanYuanInfo() {
          App.log.logBusiness("游戏管理器: 请求查询资源信息");
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqQueryZiYuanYuanInfo, {});
        }

        /**
         * 响应查询资源信息
         */;
        _proto.resQueryZiYuanYuanInfo = function resQueryZiYuanYuanInfo(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u67E5\u8BE2\u8D44\u6E90\u4FE1\u606F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("游戏管理器: 查询资源信息成功");
        }

        /**
         * 请求一键领取资源
         */;
        _proto.reqOneKey = function reqOneKey() {
          App.log.logBusiness("游戏管理器: 发送一键领取资源请求");
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqOneKey, {});
        }

        /**
         * 响应一键领取资源
         * @param msg
         * @returns
         */;
        _proto.resOneKey = function resOneKey(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u4E00\u952E\u9886\u53D6\u8D44\u6E90\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 清空所有资源建筑的仓库
          for (var _iterator7 = _createForOfIteratorHelperLoose(this.buildings), _step7; !(_step7 = _iterator7()).done;) {
            var building = _step7.value;
            var isResourceBuilding = building.building_id === BuildingType.FaMuChang || building.building_id === BuildingType.MoFang || building.building_id === BuildingType.CaiKuangChang;
            if (isResourceBuilding && building.ziyuans && building.ziyuans.length > 0) {
              building.ziyuans = [];
              var comp = this.getBuildingComp(building.building_id, building.sid);
              if (comp) {
                comp.updateDataModel(building);
              }
            }
          }
          App.log.logBusiness("一键领取资源成功");
        }

        /**
         * 发送训练士兵请求
         * @param buildingUid 建筑唯一ID
         * @param buildingId 建筑ID
         * @param count 训练数量
         */;
        _proto.reqTrain = function reqTrain(buildingUid, buildingId, count) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u8BAD\u7EC3\u8BF7\u6C42 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51ID: " + buildingId + ", \u6570\u91CF: " + count);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqTrain, {
            building_uid: buildingUid,
            building_id: buildingId,
            count: count
          });
        }

        /**
         * 接收训练响应
         * @param msg 训练响应数据
         */;
        _proto.resTrain = function resTrain(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u8BAD\u7EC3\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === msg.building_uid && b.building_id === msg.building_id;
          });
          if (building) {
            building.train_count = msg.train_count;
            building.total_people = msg.total_people;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
          }
        }

        /**
         * 接收训练完成推送
         * @param msg 训练完成数据
         */;
        _proto.resTrainFinish = function resTrainFinish(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u8BAD\u7EC3\u5B8C\u6210\u63A8\u9001\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === msg.building_uid && b.building_id === msg.building_id;
          });
          if (building) {
            building.train_count = msg.train_count;
            building.reserve_count = msg.reserve_count;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 发送领取预备役请求
         * @param buildingUid 建筑唯一ID
         * @param buildingId 建筑ID
         */;
        _proto.reqGetReserve = function reqGetReserve(buildingUid, buildingId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u9886\u53D6\u9884\u5907\u5F79\u8BF7\u6C42 - \u5EFA\u7B51UID: " + buildingUid + ", \u5EFA\u7B51ID: " + buildingId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqGetReserve, {
            building_uid: buildingUid,
            building_id: buildingId
          });
        }

        /**
         * 接收领取预备役响应
         * @param msg 领取预备役响应数据
         */;
        _proto.resGetReserve = function resGetReserve(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u9886\u53D6\u9884\u5907\u5F79\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === msg.building_uid && b.building_id === msg.building_id;
          });
          if (building) {
            building.reserve_count = msg.reserve_count;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
            App.log.logBusiness("\u9886\u53D6\u9884\u5907\u5F79\u6210\u529F - \u9884\u5907\u5F79\u4EBA\u6570: " + msg.reserve_count);
          }
        }

        /**
         * 发送获取指派英雄信息请求
         */;
        _proto.reqAssignHeroInfo = function reqAssignHeroInfo() {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u83B7\u53D6\u6307\u6D3E\u82F1\u96C4\u4FE1\u606F\u8BF7\u6C42");
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqAssignHeroInfo, {});
        }

        /**
         * 接收获取指派英雄信息响应
         * @param msg 指派英雄信息响应数据
         */;
        _proto.resAssignHeroInfo = function resAssignHeroInfo(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u83B7\u53D6\u6307\u6D3E\u82F1\u96C4\u4FE1\u606F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this._assignHeroMap.clear();
          if (msg.heros && msg.heros.length > 0) {
            for (var _iterator8 = _createForOfIteratorHelperLoose(msg.heros), _step8; !(_step8 = _iterator8()).done;) {
              var assignHero = _step8.value;
              this._assignHeroMap.set(assignHero.hero_id, assignHero);
            }
          }
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u521D\u59CB\u5316\u6307\u6D3E\u82F1\u96C4\u4FE1\u606F\u6210\u529F - \u82F1\u96C4\u6570\u91CF: " + this._assignHeroMap.size);
        }

        /**
         * 发送指派英雄请求
         * @param type 类型：1=指派，2=取消指派
         * @param buildingUid 建筑唯一ID
         * @param buildingId 建筑ID
         * @param heroId 英雄ID
         */;
        _proto.reqAssignHero = function reqAssignHero(type, buildingUid, buildingId, heroId) {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqAssignHero, {
            type: type,
            building_uid: buildingUid,
            building_id: buildingId,
            hero_id: heroId
          });
        }

        /**
         * 进驻英雄变化通知
         * @param msg 指派英雄变化通知数据
         */;
        _proto.resAssignHeroChange = function resAssignHeroChange(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u8FDB\u9A7B\u82F1\u96C4\u53D8\u5316\u901A\u77E5\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          if (!msg.assign_hero) {
            return;
          }
          var assignHero = msg.assign_hero;
          this._assignHeroMap.set(assignHero.hero_id, assignHero);
          if (assignHero.building_uid === 0) {
            App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D6\u6D88\u6307\u6D3E\u82F1\u96C4 - \u82F1\u96C4ID: " + assignHero.hero_id);
          } else {
            App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u66F4\u65B0\u6307\u6D3E\u82F1\u96C4\u4FE1\u606F - \u82F1\u96C4ID: " + assignHero.hero_id + ", \u5EFA\u7B51UID: " + assignHero.building_uid);
          }
        }

        /**
         * 获取指定建筑的指派英雄信息
         * @param buildingUid 建筑唯一ID
         * @param buildingId 建筑ID
         * @returns 指派英雄信息，如果没有则返回 null
         */;
        _proto.getAssignHeroByBuilding = function getAssignHeroByBuilding(buildingUid, buildingId) {
          for (var _iterator9 = _createForOfIteratorHelperLoose(this._assignHeroMap.values()), _step9; !(_step9 = _iterator9()).done;) {
            var assignHero = _step9.value;
            if (assignHero.building_uid === buildingUid && assignHero.building_id === buildingId) {
              return assignHero;
            }
          }
          return null;
        }

        /**
         * 获取指定英雄的指派信息
         * @param heroId 英雄ID
         * @returns 指派英雄信息，如果没有则返回 null
         */;
        _proto.getAssignHeroByHeroId = function getAssignHeroByHeroId(heroId) {
          return this._assignHeroMap.get(heroId) || null;
        }

        /**
         * 获取所有指派英雄信息列表
         * @returns 指派英雄信息数组
         */;
        _proto.getAllAssignHeroes = function getAllAssignHeroes() {
          return Array.from(this._assignHeroMap.values());
        }

        /**
         * 接收指派英雄响应
         * @param msg 指派英雄响应数据
         */;
        _proto.resAssignHero = function resAssignHero(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u6307\u6D3E\u82F1\u96C4\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          if (!msg.assign_hero) {
            return;
          }
          var assignHero = msg.assign_hero;
          this._assignHeroMap.set(assignHero.hero_id, assignHero);
        }

        /**
         *
         * @param msg 建筑数据变化推送
         * @returns
         */;
        _proto.resBuildingDataChange = function resBuildingDataChange(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u7B51\u6570\u636E\u53D8\u5316\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var building = this.buildings.find(function (b) {
            return b.building_uid === msg.building_uid && b.building_id === msg.building_id;
          });
          if (building) {
            building.services = msg.services;
            building.total_people = msg.total_people;
            building.tasks = msg.tasks;
            building.entry_hero = msg.entry_hero;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 发送接受任务请求
         * @param taskId 任务ID
         */;
        _proto.reqAcceptTask = function reqAcceptTask(taskId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u63A5\u53D7\u4EFB\u52A1\u8BF7\u6C42 - \u4EFB\u52A1ID: " + taskId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqAcceptTask, {
            task_id: taskId
          });
        }

        /**
         * 接受任务响应
         */;
        _proto.resAcceptTask = function resAcceptTask(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u63A5\u53D7\u4EFB\u52A1\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("\u63A5\u53D7\u4EFB\u52A1\u6210\u529F - \u4EFB\u52A1ID: " + msg.task_id + ", \u4EFB\u52A1\u65F6\u957F: " + msg.task_duration + "ms, \u72B6\u6001: " + msg.state);
          var zhihuiComp = this.buildingCtrl.getZhiHuiBuComp();
          if (zhihuiComp) {
            var building_uid = zhihuiComp.dataModel.buildingUid;
            var building = this.buildings.find(function (b) {
              return b.building_uid === building_uid;
            });
            if (building && Array.isArray(building.tasks)) {
              var task = building.tasks.find(function (t) {
                return t.task_id === msg.task_id;
              });
              if (task) {
                task.task_duration = msg.task_duration;
                task.state = msg.state;
                App.log.logBusiness("\u4EFB\u52A1\u6570\u636E\u5DF2\u66F4\u65B0 - \u4EFB\u52A1ID: " + msg.task_id);
              } else {
                var newTask = {
                  task_id: msg.task_id,
                  task_duration: msg.task_duration,
                  state: msg.state
                };
                building.tasks.push(newTask);
                App.log.logBusiness("\u65B0\u4EFB\u52A1\u5DF2\u6DFB\u52A0 - \u4EFB\u52A1ID: " + msg.task_id);
              }
              var comp = this.getBuildingComp(building.building_id, building.sid);
              if (comp) {
                comp.updateDataModel(building);
              } else {
                App.log.logError("出错!!!! 建筑组件不存在");
              }
              App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
            }
          }
        }

        /**
         * 任务完成响应
         */;
        _proto.resTaskFinish = function resTaskFinish(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u4EFB\u52A1\u5B8C\u6210\u63A8\u9001\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var zhihuiComp = this.buildingCtrl.getZhiHuiBuComp();
          if (zhihuiComp) {
            var building_uid = zhihuiComp.dataModel.buildingUid;
            var building = this.buildings.find(function (b) {
              return b.building_uid === building_uid;
            });
            if (building && Array.isArray(building.tasks)) {
              var task = building.tasks.find(function (t) {
                return t.task_id === msg.task_id;
              });
              if (task) {
                task.state = msg.state;
                task.task_duration = 0;
                task.task_id = msg.task_id;
                App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
              }
            }
          }
        }

        /**
         * 发送立即完成任务请求
         * @param taskId 任务ID
         */;
        _proto.reqImmFinishTask = function reqImmFinishTask(taskId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u7ACB\u5373\u5B8C\u6210\u4EFB\u52A1\u8BF7\u6C42 - \u4EFB\u52A1ID: " + taskId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqImmFinishTask, {
            task_id: taskId
          });
        }

        /**
         * 立即完成任务响应
         */;
        _proto.resImmFinishTask = function resImmFinishTask(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u7ACB\u5373\u5B8C\u6210\u4EFB\u52A1\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("\u7ACB\u5373\u5B8C\u6210\u4EFB\u52A1\u6210\u529F - \u4EFB\u52A1ID: " + msg.task_id);
          var zhihuiComp = this.buildingCtrl.getZhiHuiBuComp();
          if (zhihuiComp) {
            var building_uid = zhihuiComp.dataModel.buildingUid;
            var building = this.buildings.find(function (b) {
              return b.building_uid === building_uid;
            });
            if (building && Array.isArray(building.tasks)) {
              var task = building.tasks.find(function (t) {
                return t.task_id === msg.task_id;
              });
              if (task) {
                task.state = msg.state;
                task.task_duration = 0;
                task.task_id = msg.task_id;
                App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
              }
            }
          }
        }

        /**
         * 发送领取任务奖励请求
         * @param taskId 任务ID
         */;
        _proto.reqGetTaskReward = function reqGetTaskReward(taskId) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u9886\u53D6\u4EFB\u52A1\u5956\u52B1\u8BF7\u6C42 - \u4EFB\u52A1ID: " + taskId);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqGetTaskReward, {
            task_id: taskId
          });
        }

        /**
         * 领取任务奖励响应
         */;
        _proto.resGetTaskReward = function resGetTaskReward(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u9886\u53D6\u4EFB\u52A1\u5956\u52B1\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("\u9886\u53D6\u4EFB\u52A1\u5956\u52B1\u6210\u529F");
        }

        /**
         * 显示指挥部任务界面
         * @param buildingUid 建筑唯一ID
         * @param buildType 建筑类型
         * @param buildIndex 建筑序号
         */;
        _proto.showTaskView = function showTaskView(tasks) {
          UIMgr.inst.openOnce(UI_PlaceTaskView, LayerType.panel, Layout_UI_PlaceTaskView, [{
            tasks: tasks
          }]);
        }

        /**
         * 显示领取奖励界面
         * @param tasks
         */;
        _proto.showTaskRewwardView = function showTaskRewwardView(tasks) {
          if (tasks.length === 0) return;
          var task = tasks.find(function (t) {
            return t.state === 2;
          });
          if (!task) return;
          UIMgr.inst.openOnce(UI_PlaceGetRewardView, LayerType.panel, Layout_UI_PlaceGetRewardView, [{
            task: task
          }]);
        }

        /**
         * 显示加速界面
         * @param buildType 建筑类型
         * @param buildIndex 建筑序号
         */;
        _proto.showSpeedUpView = function showSpeedUpView(buildType, buildIndex) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u663E\u793A\u52A0\u901F\u754C\u9762 \u5EFA\u7B51\u7C7B\u578B: " + buildType + " " + buildIndex);
          UIMgr.inst.openOnce(UI_SpeedUpView, LayerType.panel, Layout_UI_SpeedUpView, [{
            buildType: buildType,
            buildIndex: buildIndex
          }]);
        }

        /**
         * 发送使用加速卡请求
         * @param buildingUid 建筑唯一ID
         * @param buildingId 建筑ID
         * @param itemId 道具ID
         * @param itemCount 道具数量
         */;
        _proto.reqSpeedCardUpgrade = function reqSpeedCardUpgrade(buildingUid, buildingId, itemId, itemCount) {
          App.log.logBusiness("\u6E38\u620F\u7BA1\u7406\u5668: \u53D1\u9001\u4F7F\u7528\u52A0\u901F\u5361\u8BF7\u6C42 - \u5EFA\u7B51UID: " + buildingUid + ", \u9053\u5177ID: " + itemId + ", \u6570\u91CF: " + itemCount);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqSpeedCardUpgrade, {
            building_uid: buildingUid,
            building_id: buildingId,
            itemid: itemId,
            itemcount: itemCount
          });
        }

        /**
         * 使用加速卡响应
         */;
        _proto.resSpeedCardUpgrade = function resSpeedCardUpgrade(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u4F7F\u7528\u52A0\u901F\u5361\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361\u6210\u529F - \u5EFA\u7B51UID: " + msg.building_uid + ", \u5269\u4F59\u65F6\u957F: " + msg.upgrade_duration);
          var building = this.buildings.find(function (b) {
            return b.building_uid === msg.building_uid;
          });
          if (building) {
            building.building_level = msg.level;
            building.upgrade_duration = msg.upgrade_duration;
            var comp = this.getBuildingComp(building.building_id, building.sid);
            if (comp) {
              comp.updateDataModel(building);
            } else {
              App.log.logError("出错!!!! 建筑不存在");
            }
            App.monitorMgr.dispatchEvent(EventType.BuildingUpdated, building);
          }
        }

        /**
         * 自动训练相关的功能方法
         */;
        _proto.loadAutoTrainSettings = function loadAutoTrainSettings() {
          for (var _iterator10 = _createForOfIteratorHelperLoose(this.buildings), _step10; !(_step10 = _iterator10()).done;) {
            var building = _step10.value;
            if (building && building.building_uid !== undefined) {
              var key = "autoTrain_" + building.building_uid;
              var isAutoTrain = App.saveDataMgr.getBoolean(key);
              this._autoTrainMap.set(key, isAutoTrain);
            }
          }
        }

        /**
         * 设置自动训练状态
         * @param buildingUid 建筑唯一ID
         * @param isAutoTrain 是否开启自动训练
         */;
        _proto.setAutoTrainState = function setAutoTrainState(buildingUid, isAutoTrain) {
          var key = "autoTrain_" + buildingUid;
          this._autoTrainMap.set(key, isAutoTrain);
          App.saveDataMgr.set(key, isAutoTrain);
          this.onResourceUpdated();
        }

        /**
         * 获取自动训练状态
         * @param buildType 建筑类型
         * @param buildIndex 建筑索引
         * @returns 是否开启自动训练
         */;
        _proto.getAutoTrainState = function getAutoTrainState(buildingUid) {
          var key = "autoTrain_" + buildingUid;
          return this._autoTrainMap.get(key) || false;
        }

        /**
         * 资源更新时检查自动训练
         */;
        _proto.onResourceUpdated = function onResourceUpdated() {
          for (var _iterator11 = _createForOfIteratorHelperLoose(this.buildings), _step11; !(_step11 = _iterator11()).done;) {
            var building = _step11.value;
            if (building && building.building_id && building.sid > 0) {
              this.checkAutoTrain(building.building_uid);
            }
          }
        }

        /**
         * 检查并执行自动训练
         * @param buildingUid 建筑唯一ID
         * @param buildType 建筑类型
         * @param buildIndex 建筑索引
         */;
        _proto.checkAutoTrain = function checkAutoTrain(buildingUid) {
          var _soldiermax;
          var key = "autoTrain_" + buildingUid;
          if (!this._autoTrainMap.get(key)) {
            return;
          }
          var buildingComp = this.getBuildingCompByUid(buildingUid);
          if (!buildingComp) {
            return;
          }
          var dataModel = buildingComp.dataModel;
          if (!dataModel) {
            return;
          }

          // 检查是否有可用训练槽
          var availableSlots = dataModel.getAvailableXLSlots();
          if (availableSlots <= 0) {
            return;
          }
          var fuhuaComp = this.buildingCtrl.getFuHuaComp();
          if (!fuhuaComp) {
            return;
          }
          var currentPopulation = this.getFuhuaCenterPeople();
          var zhiHuiBuComp = this.buildingCtrl.getZhiHuiBuComp();
          if (!zhiHuiBuComp) {
            return;
          }
          var soldierType = SoldierType.BuBing;
          if (dataModel.buildType === BuildingType.BuBingYing) {
            soldierType = SoldierType.BuBing;
          } else if (dataModel.buildType === BuildingType.GongBingYing) {
            soldierType = SoldierType.GongBing;
          } else if (dataModel.buildType === BuildingType.QiBingYing) {
            soldierType = SoldierType.QiBing;
          }
          var serviceCount = this.getServicePersonCount(zhiHuiBuComp.dataModel.buildingUid, soldierType);
          var soldiermax = PlaceConfigMgr.inst.getZhiHuiBuSoldierMax(zhiHuiBuComp.dataModel.level);
          var maxServiceCount = ((_soldiermax = soldiermax[soldierType - 1]) == null ? void 0 : _soldiermax[1]) || 0;
          var availableService = maxServiceCount - serviceCount - dataModel.trainingCount - dataModel.reserveCount;
          var maxSlotNum = dataModel.getAvailableXLSlots();
          var trainCount = dataModel.trainingCount;
          var maxCanTrainNum = maxSlotNum - trainCount;
          var maxTrainCount = Math.min(maxCanTrainNum, Math.min(currentPopulation, availableService));
          if (maxTrainCount <= 0) {
            return;
          }

          // 检查资源是否足够
          var level = dataModel.building_level || 1;
          var baseFoodCost = PlaceConfigMgr.inst.getBingYingTrainFoodCost(dataModel.buildType, level);
          var reductionRate = dataModel.calcFoodCostReduction() / 10000;
          var costList = [];
          for (var _iterator12 = _createForOfIteratorHelperLoose(baseFoodCost), _step12; !(_step12 = _iterator12()).done;) {
            var _step12$value = _step12.value,
              itemId = _step12$value[0],
              itemCount = _step12$value[1];
            var totalCount = itemCount * maxTrainCount;
            var actualCount = Math.floor(totalCount * (1 - reductionRate));
            costList.push([itemId, actualCount]);
          }
          if (!App.bagMgr.checkPropEnoughList(costList)) {
            return;
          }
          this.reqTrain(buildingUid, dataModel.buildType, maxTrainCount);
          App.log.logBusiness("\u81EA\u52A8\u8BAD\u7EC3\u6267\u884C - \u5EFA\u7B51: " + dataModel.buildType + "_" + dataModel.buildIndex + ", \u6570\u91CF: " + maxTrainCount + ", \u6D88\u8017\u9053\u5177: " + JSON.stringify(costList));
        };
        return PlaceGameMgr;
      }(Singleton())) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlatformMgr.ts", ['cc', './GameDef.ts', './MonitorType.ts', './openadsdk.ts', './Prompt.ts', './NetChannelMgr.ts'], function (exports) {
  var cclegacy, GameDef, MonitorType, openadsdk, Prompt, netChannel;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      openadsdk = module.openadsdk;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      netChannel = module.netChannel;
    }],
    execute: function () {
      cclegacy._RF.push({}, "17bc15Y+jZL46do6M7GvZSn", "PlatformMgr", undefined);
      //usage
      // let success = ()=>{
      //     console.log("//视频成功回调");
      // }
      // let fail =()=>{
      //     console.log("//视频失败回调");
      // }
      // PlatformMgr.getInstance().video(success  , fail)  //广告
      var PlatformMgr = exports('PlatformMgr', /*#__PURE__*/function () {
        //
        function PlatformMgr() {
          /**
           * 微信广告实例
           */
          this.videoAd = void 0;
          //保存视频实例
          this.videoId = GameDef.wxVideoId;
          this.isInitVideo = false;
          this.__success = void 0;
          this.__defeated = void 0;
          this.reCount = 0;
        }

        //-------------------------------------------------------------         初始化         --------------------------------------------------------------------------------------------
        var _proto = PlatformMgr.prototype;
        _proto.init = function init() {
          // App.monitorMgr.addEventListener(MonitorType.web_ad_140002, this.sc_web_ad_140002, this);
          // App.monitorMgr.addEventListener(MonitorType.web_ad_140021, this.sc_web_ad_140021, this);
        };
        _proto.dispose = function dispose() {
          // App.monitorMgr.removeEventListener(MonitorType.web_ad_140002, this.sc_web_ad_140002, this);
          // App.monitorMgr.removeEventListener(MonitorType.web_ad_140021, this.sc_web_ad_140021, this);
        };
        _proto.video = function video(success, defeated) {
          var gamePlatform = GameDef.gamePlatform_video;
          console.log(" android  广告...................=", "_video_platform_" + (GameDef.useSkinVideo ? 99 : gamePlatform));
          var func = this["_video_platform_" + (GameDef.useSkinVideo ? 99 : gamePlatform)];
          func && func.call(this, success, defeated, 1);
        };
        _proto._video_platform_1 = function _video_platform_1(success, defeated, adCfgId) {
          var _this = this;
          console.log(" android  广告...................");
          this.__success = success;
          this.__defeated = defeated;
          var ok = function ok() {
            _this.__success();
          };
          var noOk = function noOk() {
            _this.__defeated();
          };
          this.Reward(ok, noOk, adCfgId);
        };
        _proto.Reward = function Reward(success, defeated, adCfgId) {
          // let cfgGG: dbr.guanggaoConfig = DBRecord.fetchId("guanggaoConfig_json", adCfgId);
          // if (!cfgGG) {
          //     Prompt.popTip("广告id配置异常" + adCfgId);
          //     return;
          // }

          //激励广告
          var data = {
            // is_horizontal: false,
            // userID: "user0",
            // rewardAmount: 1,
            // rewardName: "金币"
            appName: GameDef.appName,
            // appId: "5352023",
            // rewardVideo_CodeId: cfgGG.adId + ""
            appId: GameDef.appId,
            rewardVideo_CodeId: GameDef.rewardVideo_CodeId
          };
          openadsdk.RewardVideoAd(function (json) {
            console.log("激励视频广告事件:" + json);
            var data = JSON.parse(json);
            //   Prompt.popTip("广告:"+ json);
            if (data.event === "close") ;else if (data.event === "skip") {
              defeated();
            } else if (data.event === "award") {
              success();
            } else if (data.event === "fail") {
              //  let isHas =  !!UIMgr.findBySkinName("loginMainSkin"); //android 返回主界面要加这个判断了。。 android 会通知过来
              // !isHas &&  UIMgr.openOnce(view.GcParentView, "guideIdle", success);
              Prompt.popTip("友军广告拉取失败，退出游戏重进试试");
            }
            // App.timeManager.directorResume();
          }, this, JSON.stringify(data));
        };
        _proto._video_platform_2 = function _video_platform_2(success, defeated, adCfgId) {
          var _this2 = this;
          this.__success = success;
          this.__defeated = defeated;
          //TODO 平台2 视频控制  成功回调 sucees  否则 defeated
          wx.showLoading({
            title: "加载中...",
            mask: true
          });
          setTimeout(function () {
            wx.hideLoading();
          }, 2000);
          if (!this.videoAd) {
            console.log(" this.videoAd 为空，重新加载 顺便播放");
            this.initVideoAd(true);
          } else {
            console.log(" 直接 this.videoAd.show() ");
            this.videoAd.show()["catch"](function (err) {
              console.log("show 失败，重新加载");
              // this.videoAd.destroy()
              // this.videoAd = undefined
              _this2.initVideoAd(true);
              console.log("show 失败，重新加载 2222下面");
              wx.showToast({
                title: "暂无获取到广告资源"
              });
              _this2.__defeated();
            });
          }
          if (!this.isInitVideo) {
            //保证只执行一次，白鹭没事，
            this.isInitVideo = true;
            //关闭视频的回调函数
            this.videoAd.onClose(function (res) {
              // 用户点击了【关闭广告】按钮
              // 2.1.0 的基础库版本，res 是一个 undefined
              if (res && res.isEnded || res === undefined) {
                // 正常播放结束，可以下发游戏奖励
                var func = function func() {
                  // App.timeManager.directorResume();
                  // AudioMgr.inst.play('sounds/bgm');
                  _this2.__success();
                };
                setTimeout(function () {
                  //白鹭挪过来
                  func();
                }, 300);
              } else {
                wx.showToast({
                  title: "您的视频还没看完，无法获得奖励"
                });
                setTimeout(function () {
                  // App.timeManager.directorResume();
                  // AudioMgr.inst.play('sounds/bgm');
                  _this2.__defeated();
                }, 1000);
              }
            });
          }
        };
        _proto._video_platform_4 = function _video_platform_4(success, defeated, adCfgId) {
          var rData = {
            adUitld: "wx88888888888888888",
            //微信后台配置的激励视屏广告id
            time: Date.now()
          };

          // 定义参数监听定时器
          function selfOnhashchange(cbk) {
            var oldHas = decodeURI(window.location.hash);
            setTimeout(function () {
              var id = setInterval(function () {
                var hash = decodeURI(window.location.hash);
                if (oldHas !== hash) {
                  cbk && cbk(hash);
                  clearInterval(id); //检测到参数改变后 会关闭计时器
                  // hash 就是返回的内容
                  hash = hash.replace("#", "");
                  // cbk&&cbk()

                  var dataArrs = JSON.parse(hash);
                  if (dataArrs.code === 0) {
                    Prompt.popTip("广告观看成功");
                    success();
                  } else if (dataArrs.code === 1) {
                    Prompt.popTip("广告观看失败");
                    // defeated();
                    // UIMgr.openOnce(view.GcParentView, "guideIdle", success);
                  } else {
                    // Prompt.popTip("广告code =" + dataArrs.code);
                    Prompt.popTip("其他错误" + dataArrs.code);
                    // UIMgr.openOnce(view.GcParentView, "guideIdle", success);
                  }
                }
              }, 500); // 检测间隔0.5秒 可优化逻辑设置最大检测次数
            }, 1000); // 1s后开始检测
          }

          console.log("请求p8 h5 广告 ");
          // 请求广告
          selfOnhashchange(); // 此处需要再调用广告时候调用一次 用来检测链接结果
          P8MINISDK.rewardVedio(rData).then(function (res) {});
        };
        _proto.initVideoAd = function initVideoAd(show) {
          var _this3 = this;
          if (show === void 0) {
            show = false;
          }
          //初始化视频方法
          var adUnitId = GameDef.wxVideoId;
          console.log("adUnitIdxxxxxxxxxxx:" + adUnitId);
          if (!this.videoAd) {
            if (!wx.createRewardedVideoAd) {
              console.log("暂时不支持 wx.createRewardedVideoAd");
              return;
            }
            this.videoAd = wx.createRewardedVideoAd({
              adUnitId: adUnitId
            });
            //捕捉错误
            this.videoAd.onError(function (err) {
              console.log("视频加载错误失败---》", err);
            });
            this.videoAd.onLoad(function (data) {
              console.log("视频onLoad---》", data);
            });
          }
          console.log("广告id =" + adUnitId);
          var funcSucc = function funcSucc() {
            if (show) {
              _this3.videoAd.show();
              console.log("加载成功 直接展示 initVideoAd()");
            } else {
              console.log("加载成功 只是初始化 initVideoAd()");
            }
          };
          var funcFail = function funcFail(err) {
            console.log(" initVideoAd load 加载失败  重新加载= ", err);
            _this3.reCount++;
            if (_this3.reCount < 5) {
              _this3.videoAd.load().then(function () {
                funcSucc();
              })["catch"](function (err) {
                return funcFail(err);
              });
            }
          };
          this.reCount = 0;
          console.log(" this.videoAd.load//// =");
          this.videoAd.load().then(function () {
            console.log("  this.videoAd.load().then   =");
            funcSucc();
          })["catch"](function (err) {
            console.log("  this.videoAd.load.err().   =");
            funcFail(err);
          });
        }

        // ******************** 协议处理 ***********************
        //广告领取奖励
        ;

        _proto.cs_web_ad_140002 = function cs_web_ad_140002() {
          var obj = {};
          netChannel.game.send(MonitorType.web_ad_140002, obj);
        }

        // private sc_web_ad_140002(obj: m_proto.SC_140002) {
        //     if (obj.err_code == 0) {
        //         UIMgr.inst.open(uiCommonGet, LayerType.panel, Layout_uiCommonGet, [obj.item_list]);
        //     }
        // }

        // //广告领取奖励
        // public cs_web_ad_140021(id) {
        //     let obj: m_proto.ICS_140021 = {
        //         id
        //     };
        //     netChannel.game.send(MonitorType.web_ad_140021, obj);
        // }
        ;

        return PlatformMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlayerCamera.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, Camera, Vec3, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Camera = module.Camera;
      Vec3 = module.Vec3;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "11c31delYdDZLfPaeE1UkjP", "PlayerCamera", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var CAMERA_VIEW_HEIGHTS = exports('CAMERA_VIEW_HEIGHTS', [1050, 850, 650]);
      var PlayerCamera = exports('PlayerCamera', (_dec = ccclass("PlayerCamera"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(PlayerCamera, _Component);
        function PlayerCamera() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this._owner = void 0;
          _this._camera = null;
          _this._tempPosition = new Vec3();
          _this.isJJC = false;
          return _this;
        }
        var _proto = PlayerCamera.prototype;
        _proto.onLoad = function onLoad() {
          this._camera = this.node.getComponent(Camera);
        };
        _proto.updateSet = function updateSet() {
          // this._camera.orthoHeight = CAMERA_VIEW_HEIGHTS[App.mixMgr.getGameSet('nView')];
        };
        _proto.setLockTarget = function setLockTarget(owner) {
          this._owner = owner;
        };
        _proto.lateUpdate = function lateUpdate(dt) {
          if (!this._owner) return;
          // if (this.isJJC) {
          //     let enemy = App.battleMgr.roleCtrl.enemy;
          //     Vec3.lerp(this._tempPosition, this._owner.worldPosition, enemy.node.worldPosition, 0.5);
          //     this.node.setWorldPosition(this._tempPosition);
          // } else {
          this.node.setWorldPosition(this._owner.worldPosition);
          // }
        };

        _createClass(PlayerCamera, [{
          key: "camera",
          get: function get() {
            if (!this._camera) {
              this._camera = this.node.getComponent(Camera);
            }
            return this._camera;
          }
        }]);
        return PlayerCamera;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlayerModelSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BaseSpine.ts', './ModelSpine.ts', './BattleDefine.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, UITransform, sp, color, tween, BaseSpine, ModelSpine, GameBattle;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
      sp = module.sp;
      color = module.color;
      tween = module.tween;
    }, function (module) {
      BaseSpine = module.BaseSpine;
    }, function (module) {
      ModelSpine = module.ModelSpine;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "deb3dfut6JGGIvIgIU5zg+n", "PlayerModelSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 主角模型
       */
      var PlayerModelSpine = exports('PlayerModelSpine', (_dec = ccclass('PlayerModelSpine'), _dec2 = property({
        type: BaseSpine,
        tooltip: '模型部件： 头'
      }), _dec3 = property({
        type: BaseSpine,
        tooltip: '模型部件： 左手'
      }), _dec4 = property({
        type: BaseSpine,
        tooltip: '模型部件： 右手'
      }), _dec5 = property({
        type: BaseSpine,
        tooltip: '模型部件： 下肢'
      }), _dec6 = property({
        type: BaseSpine,
        tooltip: '模型部件： 特效'
      }), _dec7 = property({
        type: BaseSpine,
        tooltip: '模型部件： 翅膀'
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_ModelSpine) {
        _inheritsLoose(PlayerModelSpine, _ModelSpine);
        function PlayerModelSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ModelSpine.call.apply(_ModelSpine, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "spine_head", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spine_leftHand", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spine_rightHand", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spine_legs", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spine_effect", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "spine_wings", _descriptor6, _assertThisInitialized(_this));
          _this._allSpines = [];
          _this._tweenFlag = false;
          /** 是否翻转 */
          _this._isFlipX = false;
          return _this;
        }
        var _proto = PlayerModelSpine.prototype;
        _proto.start = function start() {};
        _proto.init = function init() {
          this._parts = [];
          this._parts.push(this.spine_body);
          // this._parts.push(this.spine_leftHand);
          // this._parts.push(this.spine_rightHand);
          // this._parts.push(this.spine_legs);
          this._parts.push(this.spine_head);
          this._parts.push(this.spine_wings);
          // this._parts.push(this.spine_effect);

          // this.spine_wings.partId = WINGS_PART;

          this.node.getComponent(UITransform).width = 20; //170;
          this.node.getComponent(UITransform).height = 40; //182;

          this._allSpines = [];
          this._allSpines.push(this.node.getChildByName('spine_body').getComponent(sp.Skeleton));
          this._allSpines.push(this.node.getChildByPath('spine_body/spineYao').getComponent(sp.Skeleton));
          this._allSpines.push(this.node.getChildByPath('spine_body/spineTou').getComponent(sp.Skeleton));
          // this._allSpines.push(this.node.getChildByPath('spine_body/spineFuShou2').getComponent(sp.Skeleton))
          // this._allSpines.push(this.node.getChildByPath('spine_body/spineFuShou').getComponent(sp.Skeleton))

          for (var _iterator = _createForOfIteratorHelperLoose(this._allSpines), _step; !(_step = _iterator()).done;) {
            var spine = _step.value;
            spine.color = color(255, 255, 255, 255);
          }
        };
        _proto.loadSkeletonData = function loadSkeletonData(data) {
          var _this2 = this;
          var cur = 0;
          var max = 0;
          var fnUpdateProgress = function fnUpdateProgress() {
            cur++;
            if (cur === max) {
              data.onComplete();
              _this2.node.getComponent(UITransform).width = 20; //170;
              _this2.node.getComponent(UITransform).height = 40; //182;
            }
          };

          if (typeof data.body === 'string') max++;
          if (typeof data.head === 'string') max++;
          // if (typeof (data.leftHand) === "string") max++;
          // if (typeof (data.rightHand) === "string") max++;
          // if (typeof (data.legs) === "string") max++;
          // if (typeof (data.effect) === "string") max++;

          this.spine_body.loadSkeletonData(data.body, function () {
            fnUpdateProgress();
          });
          this.spine_head.loadSkeletonData(data.head, function () {
            fnUpdateProgress();
          });
          // this.spine_leftHand.loadSkeletonData(data.leftHand, () => {
          //     fnUpdateProgress();
          // });
          // this.spine_rightHand.loadSkeletonData(data.rightHand, () => {
          //     fnUpdateProgress();
          // });
          // this.spine_legs.loadSkeletonData(data.legs, () => {
          //     fnUpdateProgress();
          // });
          // this.spine_effect.loadSkeletonData(data.effect, () => {
          //     fnUpdateProgress();
          // });
        };

        _proto.onDestroy = function onDestroy() {
          console.log('player view destroy');
          this._allSpines = [];
          this._tweenFlag = false;
        };
        _proto.underAttack = function underAttack() {
          var _this3 = this;
          //console.log('underAttack');
          if (this._tweenFlag) return;
          this._tweenFlag = true;
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._allSpines), _step2; !(_step2 = _iterator2()).done;) {
            var spine = _step2.value;
            tween(spine).tag(GameBattle.BattleTweenTag).delay(0.1).to(0.001, {
              color: color(255, 120, 120, 255)
            }).delay(0.1).to(0.001, {
              color: color(255, 255, 255, 255)
            }).call(function () {
              _this3._tweenFlag = false;
            }).start();
          }
        }

        /**
         * 检查玩家是否正在攻击、技能动作
         * @returns
         */;
        _proto.checkPlayerAttack = function checkPlayerAttack() {
          return this._parts[0] && this._parts[0].checkPlayerAttack();
        };
        _createClass(PlayerModelSpine, [{
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-this.node.scale.x, this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }
        }]);
        return PlayerModelSpine;
      }(ModelSpine), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "spine_head", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "spine_leftHand", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "spine_rightHand", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "spine_legs", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "spine_effect", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "spine_wings", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PlayerSkill.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RoleSkill.ts', './Utils.ts', './MonitorType.ts', './BattleDefine.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Vec3, UITransform, RoleSkill, Utils, MonitorType, GameBattle, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Vec3 = module.Vec3;
      UITransform = module.UITransform;
    }, function (module) {
      RoleSkill = module.RoleSkill;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "12aeep431hPQqXgI3tZ1ZpV", "PlayerSkill", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var PlayerSkill = exports('PlayerSkill', (_dec = ccclass("PlayerSkill"), _dec(_class = /*#__PURE__*/function (_RoleSkill) {
        _inheritsLoose(PlayerSkill, _RoleSkill);
        function PlayerSkill() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleSkill.call.apply(_RoleSkill, [this].concat(args)) || this;
          _this.timeId = 0;
          _this._scheduleId = void 0;
          return _this;
        }
        var _proto = PlayerSkill.prototype;
        _proto.init = function init(id, owner) {
          _RoleSkill.prototype.init.call(this, id, owner);
        };
        _proto.reset = function reset() {
          _RoleSkill.prototype.reset.call(this);
        }

        /**
         * 眩晕
         * @param buff
         * @param buffEffect
         */;
        _proto.XuanYun = /*#__PURE__*/
        function () {
          var _XuanYun = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(buff, buffEffect) {
            var dutation;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  this._owner.pause = true;
                  this._owner.openAtk = false;
                  this._owner.state.animationType = GameBattle.ActionState.Stun;
                  dutation = buff.vo.time / 1000 || 0;
                  _context.next = 6;
                  return Utils.waitTimeAsync(this._owner, dutation);
                case 6:
                  this._owner.pause = false;
                  this._owner.openAtk = true;
                  this._owner.state.exitType(GameBattle.ActionState.Stun);

                  // 眩晕结束后恢复移动
                  if (this._owner instanceof Player) {
                    this._owner.resumeMove();
                  }
                case 10:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function XuanYun(_x, _x2) {
            return _XuanYun.apply(this, arguments);
          }
          return XuanYun;
        }()
        /**
         * 缠绕
         * @param buff
         * @param buffEffect
         */;

        _proto.Round = /*#__PURE__*/
        function () {
          var _Round = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(buff, buffEffect) {
            var _this2 = this;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  // buff.vo.time = buff.vo.time * 100;
                  // this._owner.pause = true;
                  // this.state.type = GameBattle.ActionState.Idle
                  // 定身
                  this._owner.state.animationType = GameBattle.ActionState.Rooted;
                  this._scheduleId = App.scheduleMgr.scheduleOnce(function () {
                    if (!_this2._owner) return;
                    if (!_this2._owner.isValid) return;
                    _this2._owner.state.exitType(GameBattle.ActionState.Rooted);
                    _this2._scheduleId = null;
                  }, this, buff.vo.time / 1000);
                case 2:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function Round(_x3, _x4) {
            return _Round.apply(this, arguments);
          }
          return Round;
        }()
        /**
         * buff效果
         * @param buff
         * @param buffEffect
         */;

        _proto.buffEffect = function buffEffect(buff, _buffEffect) {
          if (!buff.vo.vfx || !buff.vo.dummy_point) {
            return;
          }
          //获取挂点
          var guaWorld = this._owner.getMountPoint(buff.vo.dummy_point, new Vec3(0, 0, 0));
          var localPos = this._owner.getComponent(UITransform).convertToNodeSpaceAR(guaWorld);
          App.monitorMgr.dispatchEvent(MonitorType.battle_buff_attack_effect, {
            node: this._owner.node,
            effect: buff.vo.vfx,
            hit_pos: localPos,
            size: 1,
            duration: buff.vo.duration,
            time: buff.vo.time / 1000
          });
        };
        return PlayerSkill;
      }(RoleSkill)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/PromiseMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _asyncToGenerator, _regeneratorRuntime, cclegacy;
  return {
    setters: [function (module) {
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "1bbb3EGo1pHiJ4zv/Kf51Yb", "PromiseMgr", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-01-19 16:36:07
       * @FilePath: \dm-gamed\assets\Script\Core\adpter\ScreenAdapter.ts
       * @LastEditors: xiehande 741687776@qq.com
       * @LastEditTime: 2025-09-22 23:43:36
       * @Description: 异步Promise管理类
       */

      /** Promise管理类 */
      var PromiseMgr = exports('PromiseMgr', /*#__PURE__*/function () {
        function PromiseMgr() {}
        var _proto = PromiseMgr.prototype;
        /**
         * 创建一个异步函数，用于执行指定的函数，并在出现错误时调用错误处理器
         *
         * @param executor 要执行的函数，返回一个Promise
         * @param errorHandler 错误处理器，可选，当executor执行出错时，会被调用并传入错误对象
         * @returns 返回Promise，当executor执行成功时，返回executor的结果；当executor执行出错时，返回错误处理器的处理结果
         */
        _proto.create = /*#__PURE__*/
        function () {
          var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(executor, errorHandler) {
            var result, handledResultOrPromise;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _context.prev = 0;
                  _context.next = 3;
                  return executor();
                case 3:
                  result = _context.sent;
                  return _context.abrupt("return", Promise.resolve(result));
                case 7:
                  _context.prev = 7;
                  _context.t0 = _context["catch"](0);
                  if (!errorHandler) {
                    _context.next = 18;
                    break;
                  }
                  handledResultOrPromise = errorHandler(_context.t0);
                  if (!(handledResultOrPromise instanceof Promise)) {
                    _context.next = 15;
                    break;
                  }
                  return _context.abrupt("return", handledResultOrPromise);
                case 15:
                  return _context.abrupt("return", Promise.resolve(handledResultOrPromise));
                case 16:
                  _context.next = 20;
                  break;
                case 18:
                  // App.error.showError(error);
                  console.log("PromiseMgr create error== ", _context.t0);
                  return _context.abrupt("return", Promise.resolve(null));
                case 20:
                case "end":
                  return _context.stop();
              }
            }, _callee, null, [[0, 7]]);
          }));
          function create(_x, _x2) {
            return _create.apply(this, arguments);
          }
          return create;
        }()
        /**
         * 等待所有 Promise 完成或拒绝，并返回一个包含每个 Promise 结果的数组。
         *
         * @param promises Promise 数组
         * @returns 返回一个包含每个 Promise 结果的数组
         */;

        _proto.allSettled = function allSettled(promises) {
          return Promise.allSettled(promises);
        }

        /**
         * 给一个 Promise 设置超时时间
         *
         * @param promise 需要设置超时时间的 Promise
         * @param ms 超时时间，单位为毫秒
         * @returns 返回一个新的 Promise，当原 Promise 在超时时间内完成，则返回原 Promise 的结果；否则，返回一个带有错误信息的 Promise，表示原 Promise 超时了
         */;
        _proto.timeout = function timeout(promise, ms) {
          return new Promise(function (resolve, reject) {
            var timeoutId = setTimeout(function () {
              reject(new Error("Promise timed out in " + ms + "ms."));
            }, ms);
            promise.then(resolve, reject)["finally"](function () {
              return clearTimeout(timeoutId);
            });
          });
        }

        /**
         * 重试一个 Promise，直到成功或达到最大重试次数。
         *
         * @param promise 要重试的 Promise。
         * @param retries 最大重试次数，默认为 3。
         * @returns 返回一个新的 Promise，当原 Promise 成功时，新 Promise 以相同的值 resolve；
         * 当原 Promise 失败且达到最大重试次数时，新 Promise 以一个错误对象 reject。
         */;
        _proto.retry = function retry(promise, retries) {
          if (retries === void 0) {
            retries = 3;
          }
          return new Promise(function (resolve, reject) {
            var attemptCount = 0;
            var attemptPromise = function attemptPromise() {
              if (attemptCount >= retries) {
                return reject(new Error("Promise was retried " + retries + " times and still failed."));
              }
              attemptCount++;
              promise.then(resolve, attemptPromise);
            };
            attemptPromise();
          });
        };
        return PromiseMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Prompt.ts", ['cc', './UIMgr.ts', './ModuleDef.ts', './ModuleContext.ts', './Ui_prompt.ts', './Ui_promptWindow.ts', './Layout_uiPromptWindow.ts', './Utils.ts', './DBRecord.ts', './uiPowerUp.ts', './App.ts'], function (exports) {
  var cclegacy, assetManager, Prefab, instantiate, Tween, UIOpacity, v3, tween, Vec3, UIMgr, LayerType, ModuleDef, ModuleContext, Ui_prompt, Ui_promptWindow, Layout_uiPromptWindow, Utils, DBRecord, uiPowerUp, App;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      assetManager = module.assetManager;
      Prefab = module.Prefab;
      instantiate = module.instantiate;
      Tween = module.Tween;
      UIOpacity = module.UIOpacity;
      v3 = module.v3;
      tween = module.tween;
      Vec3 = module.Vec3;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Ui_prompt = module.Ui_prompt;
    }, function (module) {
      Ui_promptWindow = module.Ui_promptWindow;
    }, function (module) {
      Layout_uiPromptWindow = module.Layout_uiPromptWindow;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      uiPowerUp = module.uiPowerUp;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "7ff1akC0RlFGIKHLcXqnuUl", "Prompt", undefined);
      var Prompt = exports('Prompt', /*#__PURE__*/function () {
        function Prompt() {}
        /**
         * 弹出提示
         * @param str 提示的文本，如果需要展示道具图标，文本格式为：文本#道具名称#文本，范例：获得#金币#x90000
         */
        Prompt.popTip = function popTip(desc) {
          var _this = this;
          for (var i = 0; i < this._desc_list.length; i++) {
            if (this._desc_list[i] === desc) return;
          }
          this._desc_list.push(desc);
          this._timeoutId = setTimeout(function () {
            if (_this._desc_list.length > 0) _this._desc_list.shift();else clearTimeout(_this._timeoutId);
          }, 200);
          var ui = ModuleContext.createFromModule(Ui_prompt);
          var fnLoadAndCreateFromBundle = function fnLoadAndCreateFromBundle(bundle) {
            bundle.load("prefab/view/uiPrompt", Prefab, function (err, prefab) {
              if (err) {
                console.log(err);
                return;
              }
              var node = instantiate(prefab);
              ui.setup(node, LayerType.touchTip, undefined, [desc]);
              var parent = UIMgr.inst.getLayerNode(LayerType.touchTip);
              parent.addChild(node);
              ui.onCreated(desc);
              _this._viewArr.unshift(node);
              _this.refreshTipPosition(_this._viewArr);
            });
          };
          var bundle = assetManager.getBundle(ModuleDef.BASE_COMMON);
          fnLoadAndCreateFromBundle(bundle);
        };
        Prompt.refreshTipPosition = function refreshTipPosition(viewArr) {
          var _this2 = this;
          var index = 0;
          var _loop = function _loop(_i) {
            var view = viewArr[_i];
            Tween.stopAllByTarget(view);
            view.setPosition(0, 60, 0);
            view.setPosition(view.position.x, view.position.y + index * _this2._itemH, 0);
            index++;
            var isNew = index === 1;
            var isMore = index > _this2._more_count;
            if (index >= _this2._max_count) {
              if (view.parent) {
                view.removeFromParent();
                view.destroy();
              }
              if (viewArr.length > 0) {
                viewArr.pop();
                _i--;
              }
              i = _i;
              return 1; // continue
            }

            if (isNew) view.setScale(0.5, 0.5);else view.setScale(1, 1);
            var opacityCom = view.getComponent(UIOpacity);
            opacityCom.opacity = 255;
            var viewPosition = view.position;
            var targetPosition = v3(viewPosition.x, viewPosition.y - _this2._moveDisY, 0);
            if (isNew) {
              tween(view).to(_this2._scaleTime, {
                scale: new Vec3(1, 1, 1)
              }).delay(_this2._showTime).to(_this2._moveTime, {
                position: targetPosition,
                opacity: 0
              }).call(function () {
                if (view.parent) {
                  view.removeFromParent();
                  view.destroy();
                }
                if (viewArr.length > 0) {
                  viewArr.pop();
                  _i--;
                }
              }).start();
            } else if (!isMore) {
              tween(view).delay(_this2._showTime).to(_this2._moveTime, {
                position: targetPosition,
                opacity: 0
              }).call(function () {
                if (view.parent) {
                  view.removeFromParent();
                  view.destroy();
                }
                if (viewArr.length > 0) {
                  viewArr.pop();
                  _i--;
                }
              }).start();
            } else {
              tween(view).to(_this2._moveTime, {
                position: targetPosition,
                opacity: 0
              }).call(function () {
                if (view.parent) {
                  view.removeFromParent();
                  view.destroy();
                }
                if (viewArr.length > 0) {
                  viewArr.pop();
                  _i--;
                }
              }).start();
            }
            i = _i;
          };
          for (var i = 0; i < viewArr.length; i++) {
            if (_loop(i)) continue;
          }
        }

        /**
         * 二次确认弹窗 只传funcOk的话，是纯净的确认框。
         * @param title 标题
         * @param desc 正文，富文本使用Utils的setRichText
         * @param funcOk 确定的回调函数
         * @param okStr 确定按钮的文本，默认文本为确定
         * @param funcCancel 取消的回调函数
         * @param cancelStr 取消按钮的文本，默认文本为取消
         */;
        Prompt.popTipWindow = function popTipWindow(title, desc, funcOk, okStr, funcCancel, cancelStr) {
          UIMgr.inst.open(Ui_promptWindow, LayerType.panel, Layout_uiPromptWindow, [title, desc, funcOk, okStr, funcCancel, cancelStr]);
        }

        /**
         * 用于网路退出到登录
         * @param title
         * @param desc
         * @param funcOk
         * @param okStr
         * @param funcCancel
         * @param cancelStr
         */;
        Prompt.popNetWindow = function popNetWindow(title, desc, funcOk, okStr, funcCancel, cancelStr) {
          UIMgr.inst.open(Ui_promptWindow, LayerType.load, Layout_uiPromptWindow, [title, desc, funcOk, okStr, funcCancel, cancelStr]);
        };
        Prompt.popPowerUp = function popPowerUp(vInfo) {
          var uiObj = UIMgr.inst.getOnceUi("uiPowerUp");
          if (uiObj) {
            uiObj.setViewData(vInfo);
          } else {
            UIMgr.inst.openOnce(uiPowerUp, LayerType.panel, null, [vInfo]);
          }
        }

        /**
         * 弹出错误码文本
         * @param code 错误码
         */;
        Prompt.popErrorCode = function popErrorCode(code) {
          var cfg = DBRecord.fetchId("Langconf", code);
          if (!cfg || Object.keys(cfg).length === 0) {
            App.log.logError("\u7B56\u5212\u672A\u914D\u7F6E\u9519\u8BEF\u7801\u8868\uFF0Cid=" + code);
            return;
          }
          Prompt.popTip(Utils.setRichText("<b>" + cfg.lang + "</b>"));
        };
        return Prompt;
      }());
      Prompt._viewArr = [];
      Prompt._desc_list = [];
      Prompt._timeoutId = void 0;
      Prompt.commomUiTimer = [0, 0, 0];
      Prompt._max_count = 3;
      Prompt._more_count = 5;
      Prompt._itemH = 60;
      Prompt._scaleTime = 0.2;
      Prompt._showTime = 1.5;
      //第一段时间
      Prompt._moveTime = 0.3;
      //第一段时间
      Prompt._moveDisY = -50;
      //飘字距离
      Prompt._map = void 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/proto.js", ['./cjs-loader.mjs', './minimal.js'], function (exports, module) {
  var loader, __cjsMetaURL$1;
  return {
    setters: [function (module) {
      loader = module.default;
    }, function (module) {
      __cjsMetaURL$1 = module.__cjsMetaURL;
    }],
    execute: function () {
      exports('default', void 0);
      var _cjsExports;
      var __cjsMetaURL = exports('__cjsMetaURL', module.meta.url);
      loader.define(__cjsMetaURL, function (exports$1, require, module, __filename, __dirname) {
        // #region ORIGINAL CODE
        var $protobuf = require("protobufjs/minimal"); // Common aliases
        var $Reader = $protobuf.Reader,
          $Writer = $protobuf.Writer,
          $util = $protobuf.util; // Exported root namespace
        var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
        $root.m_proto = function () {
          /**
          * Namespace m_proto.
          * @exports m_proto
          * @namespace
          */
          var m_proto = {};
          m_proto.Header = function () {
            /**
            * Properties of a Header.
            * @memberof m_proto
            * @interface IHeader
            * @property {number|null} [mod] Header mod
            * @property {number|null} [cmd] Header cmd
            */ /**
               * Constructs a new Header.
               * @memberof m_proto
               * @classdesc Represents a Header.
               * @implements IHeader
               * @constructor
               * @param {m_proto.IHeader=} [properties] Properties to set
               */
            function Header(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Header mod.
              * @member {number} mod
              * @memberof m_proto.Header
              * @instance
              */
            Header.prototype.mod = 0; /**
                                      * Header cmd.
                                      * @member {number} cmd
                                      * @memberof m_proto.Header
                                      * @instance
                                      */
            Header.prototype.cmd = 0; /**
                                      * Creates a new Header instance using the specified properties.
                                      * @function create
                                      * @memberof m_proto.Header
                                      * @static
                                      * @param {m_proto.IHeader=} [properties] Properties to set
                                      * @returns {m_proto.Header} Header instance
                                      */
            Header.create = function create(properties) {
              return new Header(properties);
            }; /**
               * Encodes the specified Header message. Does not implicitly {@link m_proto.Header.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Header
               * @static
               * @param {m_proto.IHeader} message Header message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Header.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.mod != null && Object.hasOwnProperty.call(message, "mod")) writer.uint32( /* id 1, wireType 0 =*/8).uint32(message.mod);
              if (message.cmd != null && Object.hasOwnProperty.call(message, "cmd")) writer.uint32( /* id 2, wireType 0 =*/16).uint32(message.cmd);
              return writer;
            }; /**
               * Encodes the specified Header message, length delimited. Does not implicitly {@link m_proto.Header.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Header
               * @static
               * @param {m_proto.IHeader} message Header message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Header.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a Header message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Header
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Header} Header
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Header.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Header();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.mod = reader.uint32();
                      break;
                    }
                  case 2:
                    {
                      message.cmd = reader.uint32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a Header message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Header
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Header} Header
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Header.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a Header message.
               * @function verify
               * @memberof m_proto.Header
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Header.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.mod != null && message.hasOwnProperty("mod")) if (!$util.isInteger(message.mod)) return "mod: integer expected";
              if (message.cmd != null && message.hasOwnProperty("cmd")) if (!$util.isInteger(message.cmd)) return "cmd: integer expected";
              return null;
            }; /**
               * Creates a Header message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Header
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Header} Header
               */
            Header.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Header) return object;
              var message = new $root.m_proto.Header();
              if (object.mod != null) message.mod = object.mod >>> 0;
              if (object.cmd != null) message.cmd = object.cmd >>> 0;
              return message;
            }; /**
               * Creates a plain object from a Header message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Header
               * @static
               * @param {m_proto.Header} message Header
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Header.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.mod = 0;
                object.cmd = 0;
              }
              if (message.mod != null && message.hasOwnProperty("mod")) object.mod = message.mod;
              if (message.cmd != null && message.hasOwnProperty("cmd")) object.cmd = message.cmd;
              return object;
            }; /**
               * Converts this Header to JSON.
               * @function toJSON
               * @memberof m_proto.Header
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Header.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Header
               * @function getTypeUrl
               * @memberof m_proto.Header
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Header.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Header";
            };
            return Header;
          }(); /**
               * ModType enum.
               * @name m_proto.ModType
               * @enum {number}
               * @property {number} moddefult=0 moddefult value
               * @property {number} user=1 user value
               * @property {number} mail=2 mail value
               * @property {number} equip=3 equip value
               * @property {number} recruit=4 recruit value
               * @property {number} shop=5 shop value
               * @property {number} gm=99 gm value
               */
          m_proto.ModType = function () {
            var valuesById = {},
              values = Object.create(valuesById);
            values[valuesById[0] = "moddefult"] = 0;
            values[valuesById[1] = "user"] = 1;
            values[valuesById[2] = "mail"] = 2;
            values[valuesById[3] = "equip"] = 3;
            values[valuesById[4] = "recruit"] = 4;
            values[valuesById[5] = "shop"] = 5;
            values[valuesById[99] = "gm"] = 99;
            return values;
          }(); /**
               * CmdType enum.
               * @name m_proto.CmdType
               * @enum {number}
               * @property {number} cmddefult=0 cmddefult value
               * @property {number} CMD_ReqUserLogin=1 CMD_ReqUserLogin value
               * @property {number} CMD_ResUserLogin=2 CMD_ResUserLogin value
               * @property {number} CMD_ReqUserLoad=3 CMD_ReqUserLoad value
               * @property {number} CMD_ResUserLoad=4 CMD_ResUserLoad value
               * @property {number} CMD_ReqUserHeart=5 CMD_ReqUserHeart value
               * @property {number} CMD_ResUserHeart=6 CMD_ResUserHeart value
               * @property {number} CMD_ResUserKick=7 CMD_ResUserKick value
               * @property {number} CMD_ResPermanentDataChange=8 CMD_ResPermanentDataChange value
               * @property {number} CMD_ReqUpgradeBuilding=9 CMD_ReqUpgradeBuilding value
               * @property {number} CMD_ResUpgradeBuilding=10 CMD_ResUpgradeBuilding value
               * @property {number} CMD_ResBuildingUpgradeFinish=11 CMD_ResBuildingUpgradeFinish value
               * @property {number} CMD_ReqSpeedCardUpgrade=12 CMD_ReqSpeedCardUpgrade value
               * @property {number} CMD_ResSpeedCardUpgrade=13 CMD_ResSpeedCardUpgrade value
               * @property {number} CMD_ReqDiamondUpgrade=14 CMD_ReqDiamondUpgrade value
               * @property {number} CMD_ResDiamondUpgrade=15 CMD_ResDiamondUpgrade value
               * @property {number} CMD_ReqShebeiUpgrade=16 CMD_ReqShebeiUpgrade value
               * @property {number} CMD_ResShebeiUpgrade=17 CMD_ResShebeiUpgrade value
               * @property {number} CMD_ReqUserLoadBag=18 CMD_ReqUserLoadBag value
               * @property {number} CMD_ResUserLoadBag=19 CMD_ResUserLoadBag value
               * @property {number} CMD_ReqLoadBuilding=20 CMD_ReqLoadBuilding value
               * @property {number} CMD_ResLoadBuilding=21 CMD_ResLoadBuilding value
               * @property {number} CMD_ReqFuHua=22 CMD_ReqFuHua value
               * @property {number} CMD_ResFuHua=23 CMD_ResFuHua value
               * @property {number} CMD_ReqBuild=24 CMD_ReqBuild value
               * @property {number} CMD_ResBuild=25 CMD_ResBuild value
               * @property {number} CMD_ReqTrain=26 CMD_ReqTrain value
               * @property {number} CMD_ResTrain=27 CMD_ResTrain value
               * @property {number} CMD_ReqGetReserve=28 CMD_ReqGetReserve value
               * @property {number} CMD_ResGetReserve=29 CMD_ResGetReserve value
               * @property {number} CMD_ReqGetZiYuan=30 CMD_ReqGetZiYuan value
               * @property {number} CMD_ResGetZiYuan=31 CMD_ResGetZiYuan value
               * @property {number} CMD_ResSendZiYuan=32 CMD_ResSendZiYuan value
               * @property {number} CMD_ResGuaJiReward=33 CMD_ResGuaJiReward value
               * @property {number} CMD_ReqOneKey=34 CMD_ReqOneKey value
               * @property {number} CMD_ResOneKey=35 CMD_ResOneKey value
               * @property {number} CMD_ResBuildingDataChange=36 CMD_ResBuildingDataChange value
               * @property {number} CMD_ResRewardPopup=37 CMD_ResRewardPopup value
               * @property {number} CMD_ReqAcceptTask=38 CMD_ReqAcceptTask value
               * @property {number} CMD_ResAcceptTask=39 CMD_ResAcceptTask value
               * @property {number} CMD_ResTaskFinish=40 CMD_ResTaskFinish value
               * @property {number} CMD_ReqImmFinishTask=41 CMD_ReqImmFinishTask value
               * @property {number} CMD_ResImmFinishTask=42 CMD_ResImmFinishTask value
               * @property {number} CMD_ReqGetTaskReward=43 CMD_ReqGetTaskReward value
               * @property {number} CMD_ResGetTaskReward=44 CMD_ResGetTaskReward value
               * @property {number} CMD_ResTrainFinish=45 CMD_ResTrainFinish value
               * @property {number} CMD_ResUserbagchange=46 CMD_ResUserbagchange value
               * @property {number} CMD_ReqHeroList=47 CMD_ReqHeroList value
               * @property {number} CMD_ResHeroList=48 CMD_ResHeroList value
               * @property {number} CMD_ResNewHero=49 CMD_ResNewHero value
               * @property {number} CMD_ReqActivateHero=50 CMD_ReqActivateHero value
               * @property {number} CMD_ResActivateHero=51 CMD_ResActivateHero value
               * @property {number} CMD_ReqUpgradeHero=52 CMD_ReqUpgradeHero value
               * @property {number} CMD_ResUpgradeHero=53 CMD_ResUpgradeHero value
               * @property {number} CMD_ReqUpStageHero=54 CMD_ReqUpStageHero value
               * @property {number} CMD_ResUpStageHero=55 CMD_ResUpStageHero value
               * @property {number} CMD_ReqUpStarHero=56 CMD_ReqUpStarHero value
               * @property {number} CMD_ResUpStarHero=57 CMD_ResUpStarHero value
               * @property {number} CMD_ReqSoldierList=58 CMD_ReqSoldierList value
               * @property {number} CMD_ResSoldierList=59 CMD_ResSoldierList value
               * @property {number} CMD_ResNewSoldier=60 CMD_ResNewSoldier value
               * @property {number} CMD_ReqActivateSoldier=61 CMD_ReqActivateSoldier value
               * @property {number} CMD_ResActivateSoldier=62 CMD_ResActivateSoldier value
               * @property {number} CMD_ReqUpgradeSoldier=63 CMD_ReqUpgradeSoldier value
               * @property {number} CMD_ResUpgradeSoldier=64 CMD_ResUpgradeSoldier value
               * @property {number} CMD_ReqUpStageSoldier=65 CMD_ReqUpStageSoldier value
               * @property {number} CMD_ResUpStageSoldier=66 CMD_ResUpStageSoldier value
               * @property {number} CMD_ReqFormationInfo=67 CMD_ReqFormationInfo value
               * @property {number} CMD_ResFormationInfo=68 CMD_ResFormationInfo value
               * @property {number} CMD_ReqFormationChangeName=69 CMD_ReqFormationChangeName value
               * @property {number} CMD_ResFormationChangeName=70 CMD_ResFormationChangeName value
               * @property {number} CMD_ReqOn=71 CMD_ReqOn value
               * @property {number} CMD_ResOn=72 CMD_ResOn value
               * @property {number} CMD_ReqUse=73 CMD_ReqUse value
               * @property {number} CMD_ResUse=74 CMD_ResUse value
               * @property {number} CMD_ReqAKeyUseGift=75 CMD_ReqAKeyUseGift value
               * @property {number} CMD_ResAKeyUseGift=76 CMD_ResAKeyUseGift value
               * @property {number} CMD_ReqUseOptionalGift=77 CMD_ReqUseOptionalGift value
               * @property {number} CMD_ResUseOptionalGift=78 CMD_ResUseOptionalGift value
               * @property {number} CMD_ReqFragmentCombine=79 CMD_ReqFragmentCombine value
               * @property {number} CMD_ResFragmentCombine=80 CMD_ResFragmentCombine value
               * @property {number} CMD_ReqRename=81 CMD_ReqRename value
               * @property {number} CMD_ResRename=82 CMD_ResRename value
               * @property {number} CMD_ReqSetHead=83 CMD_ReqSetHead value
               * @property {number} CMD_ResSetHead=84 CMD_ResSetHead value
               * @property {number} CMD_ReqLoadMail=85 CMD_ReqLoadMail value
               * @property {number} CMD_ResLoadMail=86 CMD_ResLoadMail value
               * @property {number} CMD_ReqReadMail=87 CMD_ReqReadMail value
               * @property {number} CMD_ResReadMail=88 CMD_ResReadMail value
               * @property {number} CMD_ReqReceiveMail=89 CMD_ReqReceiveMail value
               * @property {number} CMD_ResReceiveMail=90 CMD_ResReceiveMail value
               * @property {number} CMD_ReqReadAllMail=91 CMD_ReqReadAllMail value
               * @property {number} CMD_ResReadAllMail=92 CMD_ResReadAllMail value
               * @property {number} CMD_ReqDelMail=93 CMD_ReqDelMail value
               * @property {number} CMD_ResDelMail=94 CMD_ResDelMail value
               * @property {number} CMD_ReqDelReadAllMail=95 CMD_ReqDelReadAllMail value
               * @property {number} CMD_ResDelReadAllMail=96 CMD_ResDelReadAllMail value
               * @property {number} CMD_ResNewMailNotify=97 CMD_ResNewMailNotify value
               * @property {number} CMD_ReqChangeEquip=98 CMD_ReqChangeEquip value
               * @property {number} CMD_ResChangeEquip=99 CMD_ResChangeEquip value
               * @property {number} CMD_ReqTakeOffEquip=100 CMD_ReqTakeOffEquip value
               * @property {number} CMD_ResTakeOffEquip=101 CMD_ResTakeOffEquip value
               * @property {number} CMD_ReqStrengthenEquip=102 CMD_ReqStrengthenEquip value
               * @property {number} CMD_ResStrengthenEquip=103 CMD_ResStrengthenEquip value
               * @property {number} CMD_ReqDecomposeEquip=104 CMD_ReqDecomposeEquip value
               * @property {number} CMD_ResDecomposeEquip=105 CMD_ResDecomposeEquip value
               * @property {number} CMD_ReqLockZhuangwuAttr=107 CMD_ReqLockZhuangwuAttr value
               * @property {number} CMD_ResLockZhuangwuAttr=108 CMD_ResLockZhuangwuAttr value
               * @property {number} CMD_ReqStarupZhuangwu=109 CMD_ReqStarupZhuangwu value
               * @property {number} CMD_ResStarupZhuangwu=110 CMD_ResStarupZhuangwu value
               * @property {number} CMD_ReqRefineZhuangwu=111 CMD_ReqRefineZhuangwu value
               * @property {number} CMD_ResRefineZhuangwu=112 CMD_ResRefineZhuangwu value
               * @property {number} CMD_ReqLockEquip=113 CMD_ReqLockEquip value
               * @property {number} CMD_ResLockEquip=114 CMD_ResLockEquip value
               * @property {number} CMD_ReqQueryZiYuanYuanInfo=115 CMD_ReqQueryZiYuanYuanInfo value
               * @property {number} CMD_ResQueryZiYuanYuanInfo=116 CMD_ResQueryZiYuanYuanInfo value
               * @property {number} CMD_ReqBattleRewardInfo=117 CMD_ReqBattleRewardInfo value
               * @property {number} CMD_ResBattleRewardInfo=118 CMD_ResBattleRewardInfo value
               * @property {number} CMD_ReqBattleHeart=119 CMD_ReqBattleHeart value
               * @property {number} CMD_ResBattleHeart=120 CMD_ResBattleHeart value
               * @property {number} CMD_ReqHeadPictureList=121 CMD_ReqHeadPictureList value
               * @property {number} CMD_ResHeadPictureList=122 CMD_ResHeadPictureList value
               * @property {number} CMD_ResAddHeadPicture=123 CMD_ResAddHeadPicture value
               * @property {number} CMD_ReqUseItem=124 CMD_ReqUseItem value
               * @property {number} CMD_ResUseItem=125 CMD_ResUseItem value
               * @property {number} CMD_ReqBattleUpStage=126 CMD_ReqBattleUpStage value
               * @property {number} CMD_ResBattleUpStage=127 CMD_ResBattleUpStage value
               * @property {number} CMD_ReqBattleSettle=128 CMD_ReqBattleSettle value
               * @property {number} CMD_ResBattleSettle=129 CMD_ResBattleSettle value
               * @property {number} CMD_ReqEnterDungeon=130 CMD_ReqEnterDungeon value
               * @property {number} CMD_ResEnterDungeon=131 CMD_ResEnterDungeon value
               * @property {number} CMD_ResDungeonInfo=132 CMD_ResDungeonInfo value
               * @property {number} CMD_ReqReTry=133 CMD_ReqReTry value
               * @property {number} CMD_ResReTry=134 CMD_ResReTry value
               * @property {number} CMD_ReqRecruit=136 CMD_ReqRecruit value
               * @property {number} CMD_ResRecruit=137 CMD_ResRecruit value
               * @property {number} CMD_ReqAssignHeroInfo=138 CMD_ReqAssignHeroInfo value
               * @property {number} CMD_ResAssignHeroInfo=139 CMD_ResAssignHeroInfo value
               * @property {number} CMD_ReqAssignHero=140 CMD_ReqAssignHero value
               * @property {number} CMD_ResAssignHero=141 CMD_ResAssignHero value
               * @property {number} CMD_ResAssignHeroChange=142 CMD_ResAssignHeroChange value
               * @property {number} CMD_ResMarquee=143 CMD_ResMarquee value
               * @property {number} CMD_ResUnlockPos=144 CMD_ResUnlockPos value
               * @property {number} CMD_ReqShopInfo=145 CMD_ReqShopInfo value
               * @property {number} CMD_ResShopInfo=146 CMD_ResShopInfo value
               * @property {number} CMD_ReqBuyShopItem=147 CMD_ReqBuyShopItem value
               * @property {number} CMD_ResBuyShopItem=148 CMD_ResBuyShopItem value
               * @property {number} CMD_ReqGMExecute=1000 CMD_ReqGMExecute value
               * @property {number} CMD_ResGMExecute=1001 CMD_ResGMExecute value
               * @property {number} CMD_ReqGMCommandList=1002 CMD_ReqGMCommandList value
               * @property {number} CMD_ResGMCommandList=1003 CMD_ResGMCommandList value
               * @property {number} CMD_ReqGMBatchExecute=1004 CMD_ReqGMBatchExecute value
               * @property {number} CMD_ResGMBatchExecute=1005 CMD_ResGMBatchExecute value
               */
          m_proto.CmdType = function () {
            var valuesById = {},
              values = Object.create(valuesById);
            values[valuesById[0] = "cmddefult"] = 0;
            values[valuesById[1] = "CMD_ReqUserLogin"] = 1;
            values[valuesById[2] = "CMD_ResUserLogin"] = 2;
            values[valuesById[3] = "CMD_ReqUserLoad"] = 3;
            values[valuesById[4] = "CMD_ResUserLoad"] = 4;
            values[valuesById[5] = "CMD_ReqUserHeart"] = 5;
            values[valuesById[6] = "CMD_ResUserHeart"] = 6;
            values[valuesById[7] = "CMD_ResUserKick"] = 7;
            values[valuesById[8] = "CMD_ResPermanentDataChange"] = 8;
            values[valuesById[9] = "CMD_ReqUpgradeBuilding"] = 9;
            values[valuesById[10] = "CMD_ResUpgradeBuilding"] = 10;
            values[valuesById[11] = "CMD_ResBuildingUpgradeFinish"] = 11;
            values[valuesById[12] = "CMD_ReqSpeedCardUpgrade"] = 12;
            values[valuesById[13] = "CMD_ResSpeedCardUpgrade"] = 13;
            values[valuesById[14] = "CMD_ReqDiamondUpgrade"] = 14;
            values[valuesById[15] = "CMD_ResDiamondUpgrade"] = 15;
            values[valuesById[16] = "CMD_ReqShebeiUpgrade"] = 16;
            values[valuesById[17] = "CMD_ResShebeiUpgrade"] = 17;
            values[valuesById[18] = "CMD_ReqUserLoadBag"] = 18;
            values[valuesById[19] = "CMD_ResUserLoadBag"] = 19;
            values[valuesById[20] = "CMD_ReqLoadBuilding"] = 20;
            values[valuesById[21] = "CMD_ResLoadBuilding"] = 21;
            values[valuesById[22] = "CMD_ReqFuHua"] = 22;
            values[valuesById[23] = "CMD_ResFuHua"] = 23;
            values[valuesById[24] = "CMD_ReqBuild"] = 24;
            values[valuesById[25] = "CMD_ResBuild"] = 25;
            values[valuesById[26] = "CMD_ReqTrain"] = 26;
            values[valuesById[27] = "CMD_ResTrain"] = 27;
            values[valuesById[28] = "CMD_ReqGetReserve"] = 28;
            values[valuesById[29] = "CMD_ResGetReserve"] = 29;
            values[valuesById[30] = "CMD_ReqGetZiYuan"] = 30;
            values[valuesById[31] = "CMD_ResGetZiYuan"] = 31;
            values[valuesById[32] = "CMD_ResSendZiYuan"] = 32;
            values[valuesById[33] = "CMD_ResGuaJiReward"] = 33;
            values[valuesById[34] = "CMD_ReqOneKey"] = 34;
            values[valuesById[35] = "CMD_ResOneKey"] = 35;
            values[valuesById[36] = "CMD_ResBuildingDataChange"] = 36;
            values[valuesById[37] = "CMD_ResRewardPopup"] = 37;
            values[valuesById[38] = "CMD_ReqAcceptTask"] = 38;
            values[valuesById[39] = "CMD_ResAcceptTask"] = 39;
            values[valuesById[40] = "CMD_ResTaskFinish"] = 40;
            values[valuesById[41] = "CMD_ReqImmFinishTask"] = 41;
            values[valuesById[42] = "CMD_ResImmFinishTask"] = 42;
            values[valuesById[43] = "CMD_ReqGetTaskReward"] = 43;
            values[valuesById[44] = "CMD_ResGetTaskReward"] = 44;
            values[valuesById[45] = "CMD_ResTrainFinish"] = 45;
            values[valuesById[46] = "CMD_ResUserbagchange"] = 46;
            values[valuesById[47] = "CMD_ReqHeroList"] = 47;
            values[valuesById[48] = "CMD_ResHeroList"] = 48;
            values[valuesById[49] = "CMD_ResNewHero"] = 49;
            values[valuesById[50] = "CMD_ReqActivateHero"] = 50;
            values[valuesById[51] = "CMD_ResActivateHero"] = 51;
            values[valuesById[52] = "CMD_ReqUpgradeHero"] = 52;
            values[valuesById[53] = "CMD_ResUpgradeHero"] = 53;
            values[valuesById[54] = "CMD_ReqUpStageHero"] = 54;
            values[valuesById[55] = "CMD_ResUpStageHero"] = 55;
            values[valuesById[56] = "CMD_ReqUpStarHero"] = 56;
            values[valuesById[57] = "CMD_ResUpStarHero"] = 57;
            values[valuesById[58] = "CMD_ReqSoldierList"] = 58;
            values[valuesById[59] = "CMD_ResSoldierList"] = 59;
            values[valuesById[60] = "CMD_ResNewSoldier"] = 60;
            values[valuesById[61] = "CMD_ReqActivateSoldier"] = 61;
            values[valuesById[62] = "CMD_ResActivateSoldier"] = 62;
            values[valuesById[63] = "CMD_ReqUpgradeSoldier"] = 63;
            values[valuesById[64] = "CMD_ResUpgradeSoldier"] = 64;
            values[valuesById[65] = "CMD_ReqUpStageSoldier"] = 65;
            values[valuesById[66] = "CMD_ResUpStageSoldier"] = 66;
            values[valuesById[67] = "CMD_ReqFormationInfo"] = 67;
            values[valuesById[68] = "CMD_ResFormationInfo"] = 68;
            values[valuesById[69] = "CMD_ReqFormationChangeName"] = 69;
            values[valuesById[70] = "CMD_ResFormationChangeName"] = 70;
            values[valuesById[71] = "CMD_ReqOn"] = 71;
            values[valuesById[72] = "CMD_ResOn"] = 72;
            values[valuesById[73] = "CMD_ReqUse"] = 73;
            values[valuesById[74] = "CMD_ResUse"] = 74;
            values[valuesById[75] = "CMD_ReqAKeyUseGift"] = 75;
            values[valuesById[76] = "CMD_ResAKeyUseGift"] = 76;
            values[valuesById[77] = "CMD_ReqUseOptionalGift"] = 77;
            values[valuesById[78] = "CMD_ResUseOptionalGift"] = 78;
            values[valuesById[79] = "CMD_ReqFragmentCombine"] = 79;
            values[valuesById[80] = "CMD_ResFragmentCombine"] = 80;
            values[valuesById[81] = "CMD_ReqRename"] = 81;
            values[valuesById[82] = "CMD_ResRename"] = 82;
            values[valuesById[83] = "CMD_ReqSetHead"] = 83;
            values[valuesById[84] = "CMD_ResSetHead"] = 84;
            values[valuesById[85] = "CMD_ReqLoadMail"] = 85;
            values[valuesById[86] = "CMD_ResLoadMail"] = 86;
            values[valuesById[87] = "CMD_ReqReadMail"] = 87;
            values[valuesById[88] = "CMD_ResReadMail"] = 88;
            values[valuesById[89] = "CMD_ReqReceiveMail"] = 89;
            values[valuesById[90] = "CMD_ResReceiveMail"] = 90;
            values[valuesById[91] = "CMD_ReqReadAllMail"] = 91;
            values[valuesById[92] = "CMD_ResReadAllMail"] = 92;
            values[valuesById[93] = "CMD_ReqDelMail"] = 93;
            values[valuesById[94] = "CMD_ResDelMail"] = 94;
            values[valuesById[95] = "CMD_ReqDelReadAllMail"] = 95;
            values[valuesById[96] = "CMD_ResDelReadAllMail"] = 96;
            values[valuesById[97] = "CMD_ResNewMailNotify"] = 97;
            values[valuesById[98] = "CMD_ReqChangeEquip"] = 98;
            values[valuesById[99] = "CMD_ResChangeEquip"] = 99;
            values[valuesById[100] = "CMD_ReqTakeOffEquip"] = 100;
            values[valuesById[101] = "CMD_ResTakeOffEquip"] = 101;
            values[valuesById[102] = "CMD_ReqStrengthenEquip"] = 102;
            values[valuesById[103] = "CMD_ResStrengthenEquip"] = 103;
            values[valuesById[104] = "CMD_ReqDecomposeEquip"] = 104;
            values[valuesById[105] = "CMD_ResDecomposeEquip"] = 105;
            values[valuesById[107] = "CMD_ReqLockZhuangwuAttr"] = 107;
            values[valuesById[108] = "CMD_ResLockZhuangwuAttr"] = 108;
            values[valuesById[109] = "CMD_ReqStarupZhuangwu"] = 109;
            values[valuesById[110] = "CMD_ResStarupZhuangwu"] = 110;
            values[valuesById[111] = "CMD_ReqRefineZhuangwu"] = 111;
            values[valuesById[112] = "CMD_ResRefineZhuangwu"] = 112;
            values[valuesById[113] = "CMD_ReqLockEquip"] = 113;
            values[valuesById[114] = "CMD_ResLockEquip"] = 114;
            values[valuesById[115] = "CMD_ReqQueryZiYuanYuanInfo"] = 115;
            values[valuesById[116] = "CMD_ResQueryZiYuanYuanInfo"] = 116;
            values[valuesById[117] = "CMD_ReqBattleRewardInfo"] = 117;
            values[valuesById[118] = "CMD_ResBattleRewardInfo"] = 118;
            values[valuesById[119] = "CMD_ReqBattleHeart"] = 119;
            values[valuesById[120] = "CMD_ResBattleHeart"] = 120;
            values[valuesById[121] = "CMD_ReqHeadPictureList"] = 121;
            values[valuesById[122] = "CMD_ResHeadPictureList"] = 122;
            values[valuesById[123] = "CMD_ResAddHeadPicture"] = 123;
            values[valuesById[124] = "CMD_ReqUseItem"] = 124;
            values[valuesById[125] = "CMD_ResUseItem"] = 125;
            values[valuesById[126] = "CMD_ReqBattleUpStage"] = 126;
            values[valuesById[127] = "CMD_ResBattleUpStage"] = 127;
            values[valuesById[128] = "CMD_ReqBattleSettle"] = 128;
            values[valuesById[129] = "CMD_ResBattleSettle"] = 129;
            values[valuesById[130] = "CMD_ReqEnterDungeon"] = 130;
            values[valuesById[131] = "CMD_ResEnterDungeon"] = 131;
            values[valuesById[132] = "CMD_ResDungeonInfo"] = 132;
            values[valuesById[133] = "CMD_ReqReTry"] = 133;
            values[valuesById[134] = "CMD_ResReTry"] = 134;
            values[valuesById[136] = "CMD_ReqRecruit"] = 136;
            values[valuesById[137] = "CMD_ResRecruit"] = 137;
            values[valuesById[138] = "CMD_ReqAssignHeroInfo"] = 138;
            values[valuesById[139] = "CMD_ResAssignHeroInfo"] = 139;
            values[valuesById[140] = "CMD_ReqAssignHero"] = 140;
            values[valuesById[141] = "CMD_ResAssignHero"] = 141;
            values[valuesById[142] = "CMD_ResAssignHeroChange"] = 142;
            values[valuesById[143] = "CMD_ResMarquee"] = 143;
            values[valuesById[144] = "CMD_ResUnlockPos"] = 144;
            values[valuesById[145] = "CMD_ReqShopInfo"] = 145;
            values[valuesById[146] = "CMD_ResShopInfo"] = 146;
            values[valuesById[147] = "CMD_ReqBuyShopItem"] = 147;
            values[valuesById[148] = "CMD_ResBuyShopItem"] = 148;
            values[valuesById[1000] = "CMD_ReqGMExecute"] = 1000;
            values[valuesById[1001] = "CMD_ResGMExecute"] = 1001;
            values[valuesById[1002] = "CMD_ReqGMCommandList"] = 1002;
            values[valuesById[1003] = "CMD_ResGMCommandList"] = 1003;
            values[valuesById[1004] = "CMD_ReqGMBatchExecute"] = 1004;
            values[valuesById[1005] = "CMD_ResGMBatchExecute"] = 1005;
            return values;
          }();
          m_proto.ReqUserLogin = function () {
            /**
            * Properties of a ReqUserLogin.
            * @memberof m_proto
            * @interface IReqUserLogin
            * @property {number|null} [uid] ReqUserLogin uid
            * @property {number|null} [subid] ReqUserLogin subid
            * @property {string|null} [token] ReqUserLogin token
            */ /**
               * Constructs a new ReqUserLogin.
               * @memberof m_proto
               * @classdesc Represents a ReqUserLogin.
               * @implements IReqUserLogin
               * @constructor
               * @param {m_proto.IReqUserLogin=} [properties] Properties to set
               */
            function ReqUserLogin(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUserLogin uid.
              * @member {number} uid
              * @memberof m_proto.ReqUserLogin
              * @instance
              */
            ReqUserLogin.prototype.uid = 0; /**
                                            * ReqUserLogin subid.
                                            * @member {number} subid
                                            * @memberof m_proto.ReqUserLogin
                                            * @instance
                                            */
            ReqUserLogin.prototype.subid = 0; /**
                                              * ReqUserLogin token.
                                              * @member {string} token
                                              * @memberof m_proto.ReqUserLogin
                                              * @instance
                                              */
            ReqUserLogin.prototype.token = ""; /**
                                               * Creates a new ReqUserLogin instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ReqUserLogin
                                               * @static
                                               * @param {m_proto.IReqUserLogin=} [properties] Properties to set
                                               * @returns {m_proto.ReqUserLogin} ReqUserLogin instance
                                               */
            ReqUserLogin.create = function create(properties) {
              return new ReqUserLogin(properties);
            }; /**
               * Encodes the specified ReqUserLogin message. Does not implicitly {@link m_proto.ReqUserLogin.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {m_proto.IReqUserLogin} message ReqUserLogin message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserLogin.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.uid);
              if (message.subid != null && Object.hasOwnProperty.call(message, "subid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.subid);
              if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32( /* id 3, wireType 2 =*/26).string(message.token);
              return writer;
            }; /**
               * Encodes the specified ReqUserLogin message, length delimited. Does not implicitly {@link m_proto.ReqUserLogin.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {m_proto.IReqUserLogin} message ReqUserLogin message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserLogin.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUserLogin message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUserLogin} ReqUserLogin
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserLogin.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUserLogin();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.subid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.token = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUserLogin message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUserLogin} ReqUserLogin
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserLogin.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUserLogin message.
               * @function verify
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUserLogin.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isInteger(message.uid)) return "uid: integer expected";
              if (message.subid != null && message.hasOwnProperty("subid")) if (!$util.isInteger(message.subid)) return "subid: integer expected";
              if (message.token != null && message.hasOwnProperty("token")) if (!$util.isString(message.token)) return "token: string expected";
              return null;
            }; /**
               * Creates a ReqUserLogin message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUserLogin} ReqUserLogin
               */
            ReqUserLogin.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUserLogin) return object;
              var message = new $root.m_proto.ReqUserLogin();
              if (object.uid != null) message.uid = object.uid | 0;
              if (object.subid != null) message.subid = object.subid | 0;
              if (object.token != null) message.token = String(object.token);
              return message;
            }; /**
               * Creates a plain object from a ReqUserLogin message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {m_proto.ReqUserLogin} message ReqUserLogin
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUserLogin.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.uid = 0;
                object.subid = 0;
                object.token = "";
              }
              if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid;
              if (message.subid != null && message.hasOwnProperty("subid")) object.subid = message.subid;
              if (message.token != null && message.hasOwnProperty("token")) object.token = message.token;
              return object;
            }; /**
               * Converts this ReqUserLogin to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUserLogin
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUserLogin.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUserLogin
               * @function getTypeUrl
               * @memberof m_proto.ReqUserLogin
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUserLogin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUserLogin";
            };
            return ReqUserLogin;
          }();
          m_proto.ResUserLogin = function () {
            /**
            * Properties of a ResUserLogin.
            * @memberof m_proto
            * @interface IResUserLogin
            * @property {number|null} [code] ResUserLogin code
            * @property {string|null} [errmsg] ResUserLogin errmsg
            */ /**
               * Constructs a new ResUserLogin.
               * @memberof m_proto
               * @classdesc Represents a ResUserLogin.
               * @implements IResUserLogin
               * @constructor
               * @param {m_proto.IResUserLogin=} [properties] Properties to set
               */
            function ResUserLogin(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUserLogin code.
              * @member {number} code
              * @memberof m_proto.ResUserLogin
              * @instance
              */
            ResUserLogin.prototype.code = 0; /**
                                             * ResUserLogin errmsg.
                                             * @member {string} errmsg
                                             * @memberof m_proto.ResUserLogin
                                             * @instance
                                             */
            ResUserLogin.prototype.errmsg = ""; /**
                                                * Creates a new ResUserLogin instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ResUserLogin
                                                * @static
                                                * @param {m_proto.IResUserLogin=} [properties] Properties to set
                                                * @returns {m_proto.ResUserLogin} ResUserLogin instance
                                                */
            ResUserLogin.create = function create(properties) {
              return new ResUserLogin(properties);
            }; /**
               * Encodes the specified ResUserLogin message. Does not implicitly {@link m_proto.ResUserLogin.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {m_proto.IResUserLogin} message ResUserLogin message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserLogin.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.errmsg != null && Object.hasOwnProperty.call(message, "errmsg")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.errmsg);
              return writer;
            }; /**
               * Encodes the specified ResUserLogin message, length delimited. Does not implicitly {@link m_proto.ResUserLogin.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {m_proto.IResUserLogin} message ResUserLogin message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserLogin.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUserLogin message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUserLogin} ResUserLogin
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserLogin.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUserLogin();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.errmsg = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUserLogin message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUserLogin} ResUserLogin
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserLogin.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUserLogin message.
               * @function verify
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUserLogin.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.errmsg != null && message.hasOwnProperty("errmsg")) if (!$util.isString(message.errmsg)) return "errmsg: string expected";
              return null;
            }; /**
               * Creates a ResUserLogin message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUserLogin} ResUserLogin
               */
            ResUserLogin.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUserLogin) return object;
              var message = new $root.m_proto.ResUserLogin();
              if (object.code != null) message.code = object.code | 0;
              if (object.errmsg != null) message.errmsg = String(object.errmsg);
              return message;
            }; /**
               * Creates a plain object from a ResUserLogin message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {m_proto.ResUserLogin} message ResUserLogin
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUserLogin.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.errmsg = "";
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.errmsg != null && message.hasOwnProperty("errmsg")) object.errmsg = message.errmsg;
              return object;
            }; /**
               * Converts this ResUserLogin to JSON.
               * @function toJSON
               * @memberof m_proto.ResUserLogin
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUserLogin.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUserLogin
               * @function getTypeUrl
               * @memberof m_proto.ResUserLogin
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUserLogin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUserLogin";
            };
            return ResUserLogin;
          }();
          m_proto.ReqUserLoad = function () {
            /**
            * Properties of a ReqUserLoad.
            * @memberof m_proto
            * @interface IReqUserLoad
            */ /**
               * Constructs a new ReqUserLoad.
               * @memberof m_proto
               * @classdesc Represents a ReqUserLoad.
               * @implements IReqUserLoad
               * @constructor
               * @param {m_proto.IReqUserLoad=} [properties] Properties to set
               */
            function ReqUserLoad(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqUserLoad instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqUserLoad
              * @static
              * @param {m_proto.IReqUserLoad=} [properties] Properties to set
              * @returns {m_proto.ReqUserLoad} ReqUserLoad instance
              */
            ReqUserLoad.create = function create(properties) {
              return new ReqUserLoad(properties);
            }; /**
               * Encodes the specified ReqUserLoad message. Does not implicitly {@link m_proto.ReqUserLoad.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {m_proto.IReqUserLoad} message ReqUserLoad message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserLoad.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqUserLoad message, length delimited. Does not implicitly {@link m_proto.ReqUserLoad.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {m_proto.IReqUserLoad} message ReqUserLoad message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserLoad.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUserLoad message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUserLoad} ReqUserLoad
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserLoad.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUserLoad();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUserLoad message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUserLoad} ReqUserLoad
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserLoad.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUserLoad message.
               * @function verify
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUserLoad.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqUserLoad message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUserLoad} ReqUserLoad
               */
            ReqUserLoad.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUserLoad) return object;
              return new $root.m_proto.ReqUserLoad();
            }; /**
               * Creates a plain object from a ReqUserLoad message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {m_proto.ReqUserLoad} message ReqUserLoad
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUserLoad.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqUserLoad to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUserLoad
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUserLoad.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUserLoad
               * @function getTypeUrl
               * @memberof m_proto.ReqUserLoad
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUserLoad.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUserLoad";
            };
            return ReqUserLoad;
          }();
          m_proto.ResUserLoad = function () {
            /**
            * Properties of a ResUserLoad.
            * @memberof m_proto
            * @interface IResUserLoad
            * @property {number|null} [uid] ResUserLoad uid
            * @property {number|null} [serverid] ResUserLoad serverid
            * @property {string|null} [nickname] ResUserLoad nickname
            * @property {number|null} [lv] ResUserLoad lv
            * @property {number|null} [code] ResUserLoad code
            * @property {number|null} [servertime] ResUserLoad servertime
            * @property {number|null} [head_id] ResUserLoad head_id
            * @property {string|null} [guild_name] ResUserLoad guild_name
            */ /**
               * Constructs a new ResUserLoad.
               * @memberof m_proto
               * @classdesc Represents a ResUserLoad.
               * @implements IResUserLoad
               * @constructor
               * @param {m_proto.IResUserLoad=} [properties] Properties to set
               */
            function ResUserLoad(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUserLoad uid.
              * @member {number} uid
              * @memberof m_proto.ResUserLoad
              * @instance
              */
            ResUserLoad.prototype.uid = 0; /**
                                           * ResUserLoad serverid.
                                           * @member {number} serverid
                                           * @memberof m_proto.ResUserLoad
                                           * @instance
                                           */
            ResUserLoad.prototype.serverid = 0; /**
                                                * ResUserLoad nickname.
                                                * @member {string} nickname
                                                * @memberof m_proto.ResUserLoad
                                                * @instance
                                                */
            ResUserLoad.prototype.nickname = ""; /**
                                                 * ResUserLoad lv.
                                                 * @member {number} lv
                                                 * @memberof m_proto.ResUserLoad
                                                 * @instance
                                                 */
            ResUserLoad.prototype.lv = 0; /**
                                          * ResUserLoad code.
                                          * @member {number} code
                                          * @memberof m_proto.ResUserLoad
                                          * @instance
                                          */
            ResUserLoad.prototype.code = 0; /**
                                            * ResUserLoad servertime.
                                            * @member {number} servertime
                                            * @memberof m_proto.ResUserLoad
                                            * @instance
                                            */
            ResUserLoad.prototype.servertime = 0; /**
                                                  * ResUserLoad head_id.
                                                  * @member {number} head_id
                                                  * @memberof m_proto.ResUserLoad
                                                  * @instance
                                                  */
            ResUserLoad.prototype.head_id = 0; /**
                                               * ResUserLoad guild_name.
                                               * @member {string} guild_name
                                               * @memberof m_proto.ResUserLoad
                                               * @instance
                                               */
            ResUserLoad.prototype.guild_name = ""; /**
                                                   * Creates a new ResUserLoad instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResUserLoad
                                                   * @static
                                                   * @param {m_proto.IResUserLoad=} [properties] Properties to set
                                                   * @returns {m_proto.ResUserLoad} ResUserLoad instance
                                                   */
            ResUserLoad.create = function create(properties) {
              return new ResUserLoad(properties);
            }; /**
               * Encodes the specified ResUserLoad message. Does not implicitly {@link m_proto.ResUserLoad.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {m_proto.IResUserLoad} message ResUserLoad message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserLoad.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.uid);
              if (message.serverid != null && Object.hasOwnProperty.call(message, "serverid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.serverid);
              if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname")) writer.uint32( /* id 3, wireType 2 =*/26).string(message.nickname);
              if (message.lv != null && Object.hasOwnProperty.call(message, "lv")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.lv);
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.code);
              if (message.servertime != null && Object.hasOwnProperty.call(message, "servertime")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.servertime);
              if (message.head_id != null && Object.hasOwnProperty.call(message, "head_id")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.head_id);
              if (message.guild_name != null && Object.hasOwnProperty.call(message, "guild_name")) writer.uint32( /* id 8, wireType 2 =*/66).string(message.guild_name);
              return writer;
            }; /**
               * Encodes the specified ResUserLoad message, length delimited. Does not implicitly {@link m_proto.ResUserLoad.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {m_proto.IResUserLoad} message ResUserLoad message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserLoad.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUserLoad message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUserLoad} ResUserLoad
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserLoad.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUserLoad();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.serverid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.nickname = reader.string();
                      break;
                    }
                  case 4:
                    {
                      message.lv = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.servertime = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.head_id = reader.int32();
                      break;
                    }
                  case 8:
                    {
                      message.guild_name = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUserLoad message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUserLoad} ResUserLoad
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserLoad.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUserLoad message.
               * @function verify
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUserLoad.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isInteger(message.uid)) return "uid: integer expected";
              if (message.serverid != null && message.hasOwnProperty("serverid")) if (!$util.isInteger(message.serverid)) return "serverid: integer expected";
              if (message.nickname != null && message.hasOwnProperty("nickname")) if (!$util.isString(message.nickname)) return "nickname: string expected";
              if (message.lv != null && message.hasOwnProperty("lv")) if (!$util.isInteger(message.lv)) return "lv: integer expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.servertime != null && message.hasOwnProperty("servertime")) if (!$util.isInteger(message.servertime)) return "servertime: integer expected";
              if (message.head_id != null && message.hasOwnProperty("head_id")) if (!$util.isInteger(message.head_id)) return "head_id: integer expected";
              if (message.guild_name != null && message.hasOwnProperty("guild_name")) if (!$util.isString(message.guild_name)) return "guild_name: string expected";
              return null;
            }; /**
               * Creates a ResUserLoad message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUserLoad} ResUserLoad
               */
            ResUserLoad.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUserLoad) return object;
              var message = new $root.m_proto.ResUserLoad();
              if (object.uid != null) message.uid = object.uid | 0;
              if (object.serverid != null) message.serverid = object.serverid | 0;
              if (object.nickname != null) message.nickname = String(object.nickname);
              if (object.lv != null) message.lv = object.lv | 0;
              if (object.code != null) message.code = object.code | 0;
              if (object.servertime != null) message.servertime = object.servertime | 0;
              if (object.head_id != null) message.head_id = object.head_id | 0;
              if (object.guild_name != null) message.guild_name = String(object.guild_name);
              return message;
            }; /**
               * Creates a plain object from a ResUserLoad message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {m_proto.ResUserLoad} message ResUserLoad
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUserLoad.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.uid = 0;
                object.serverid = 0;
                object.nickname = "";
                object.lv = 0;
                object.code = 0;
                object.servertime = 0;
                object.head_id = 0;
                object.guild_name = "";
              }
              if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid;
              if (message.serverid != null && message.hasOwnProperty("serverid")) object.serverid = message.serverid;
              if (message.nickname != null && message.hasOwnProperty("nickname")) object.nickname = message.nickname;
              if (message.lv != null && message.hasOwnProperty("lv")) object.lv = message.lv;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.servertime != null && message.hasOwnProperty("servertime")) object.servertime = message.servertime;
              if (message.head_id != null && message.hasOwnProperty("head_id")) object.head_id = message.head_id;
              if (message.guild_name != null && message.hasOwnProperty("guild_name")) object.guild_name = message.guild_name;
              return object;
            }; /**
               * Converts this ResUserLoad to JSON.
               * @function toJSON
               * @memberof m_proto.ResUserLoad
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUserLoad.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUserLoad
               * @function getTypeUrl
               * @memberof m_proto.ResUserLoad
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUserLoad.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUserLoad";
            };
            return ResUserLoad;
          }();
          m_proto.ReqUserHeart = function () {
            /**
            * Properties of a ReqUserHeart.
            * @memberof m_proto
            * @interface IReqUserHeart
            */ /**
               * Constructs a new ReqUserHeart.
               * @memberof m_proto
               * @classdesc Represents a ReqUserHeart.
               * @implements IReqUserHeart
               * @constructor
               * @param {m_proto.IReqUserHeart=} [properties] Properties to set
               */
            function ReqUserHeart(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqUserHeart instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqUserHeart
              * @static
              * @param {m_proto.IReqUserHeart=} [properties] Properties to set
              * @returns {m_proto.ReqUserHeart} ReqUserHeart instance
              */
            ReqUserHeart.create = function create(properties) {
              return new ReqUserHeart(properties);
            }; /**
               * Encodes the specified ReqUserHeart message. Does not implicitly {@link m_proto.ReqUserHeart.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {m_proto.IReqUserHeart} message ReqUserHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserHeart.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqUserHeart message, length delimited. Does not implicitly {@link m_proto.ReqUserHeart.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {m_proto.IReqUserHeart} message ReqUserHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserHeart.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUserHeart message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUserHeart} ReqUserHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserHeart.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUserHeart();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUserHeart message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUserHeart} ReqUserHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserHeart.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUserHeart message.
               * @function verify
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUserHeart.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqUserHeart message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUserHeart} ReqUserHeart
               */
            ReqUserHeart.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUserHeart) return object;
              return new $root.m_proto.ReqUserHeart();
            }; /**
               * Creates a plain object from a ReqUserHeart message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {m_proto.ReqUserHeart} message ReqUserHeart
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUserHeart.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqUserHeart to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUserHeart
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUserHeart.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUserHeart
               * @function getTypeUrl
               * @memberof m_proto.ReqUserHeart
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUserHeart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUserHeart";
            };
            return ReqUserHeart;
          }();
          m_proto.ResUserHeart = function () {
            /**
            * Properties of a ResUserHeart.
            * @memberof m_proto
            * @interface IResUserHeart
            * @property {number|null} [code] ResUserHeart code
            * @property {string|null} [errmsg] ResUserHeart errmsg
            * @property {number|null} [time] ResUserHeart time
            */ /**
               * Constructs a new ResUserHeart.
               * @memberof m_proto
               * @classdesc Represents a ResUserHeart.
               * @implements IResUserHeart
               * @constructor
               * @param {m_proto.IResUserHeart=} [properties] Properties to set
               */
            function ResUserHeart(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUserHeart code.
              * @member {number} code
              * @memberof m_proto.ResUserHeart
              * @instance
              */
            ResUserHeart.prototype.code = 0; /**
                                             * ResUserHeart errmsg.
                                             * @member {string} errmsg
                                             * @memberof m_proto.ResUserHeart
                                             * @instance
                                             */
            ResUserHeart.prototype.errmsg = ""; /**
                                                * ResUserHeart time.
                                                * @member {number} time
                                                * @memberof m_proto.ResUserHeart
                                                * @instance
                                                */
            ResUserHeart.prototype.time = 0; /**
                                             * Creates a new ResUserHeart instance using the specified properties.
                                             * @function create
                                             * @memberof m_proto.ResUserHeart
                                             * @static
                                             * @param {m_proto.IResUserHeart=} [properties] Properties to set
                                             * @returns {m_proto.ResUserHeart} ResUserHeart instance
                                             */
            ResUserHeart.create = function create(properties) {
              return new ResUserHeart(properties);
            }; /**
               * Encodes the specified ResUserHeart message. Does not implicitly {@link m_proto.ResUserHeart.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {m_proto.IResUserHeart} message ResUserHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserHeart.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.errmsg != null && Object.hasOwnProperty.call(message, "errmsg")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.errmsg);
              if (message.time != null && Object.hasOwnProperty.call(message, "time")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.time);
              return writer;
            }; /**
               * Encodes the specified ResUserHeart message, length delimited. Does not implicitly {@link m_proto.ResUserHeart.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {m_proto.IResUserHeart} message ResUserHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserHeart.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUserHeart message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUserHeart} ResUserHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserHeart.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUserHeart();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.errmsg = reader.string();
                      break;
                    }
                  case 3:
                    {
                      message.time = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUserHeart message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUserHeart} ResUserHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserHeart.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUserHeart message.
               * @function verify
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUserHeart.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.errmsg != null && message.hasOwnProperty("errmsg")) if (!$util.isString(message.errmsg)) return "errmsg: string expected";
              if (message.time != null && message.hasOwnProperty("time")) if (!$util.isInteger(message.time)) return "time: integer expected";
              return null;
            }; /**
               * Creates a ResUserHeart message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUserHeart} ResUserHeart
               */
            ResUserHeart.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUserHeart) return object;
              var message = new $root.m_proto.ResUserHeart();
              if (object.code != null) message.code = object.code | 0;
              if (object.errmsg != null) message.errmsg = String(object.errmsg);
              if (object.time != null) message.time = object.time | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUserHeart message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {m_proto.ResUserHeart} message ResUserHeart
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUserHeart.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.errmsg = "";
                object.time = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.errmsg != null && message.hasOwnProperty("errmsg")) object.errmsg = message.errmsg;
              if (message.time != null && message.hasOwnProperty("time")) object.time = message.time;
              return object;
            }; /**
               * Converts this ResUserHeart to JSON.
               * @function toJSON
               * @memberof m_proto.ResUserHeart
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUserHeart.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUserHeart
               * @function getTypeUrl
               * @memberof m_proto.ResUserHeart
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUserHeart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUserHeart";
            };
            return ResUserHeart;
          }();
          m_proto.ReqRename = function () {
            /**
            * Properties of a ReqRename.
            * @memberof m_proto
            * @interface IReqRename
            * @property {string|null} [name] ReqRename name
            */ /**
               * Constructs a new ReqRename.
               * @memberof m_proto
               * @classdesc Represents a ReqRename.
               * @implements IReqRename
               * @constructor
               * @param {m_proto.IReqRename=} [properties] Properties to set
               */
            function ReqRename(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqRename name.
              * @member {string} name
              * @memberof m_proto.ReqRename
              * @instance
              */
            ReqRename.prototype.name = ""; /**
                                           * Creates a new ReqRename instance using the specified properties.
                                           * @function create
                                           * @memberof m_proto.ReqRename
                                           * @static
                                           * @param {m_proto.IReqRename=} [properties] Properties to set
                                           * @returns {m_proto.ReqRename} ReqRename instance
                                           */
            ReqRename.create = function create(properties) {
              return new ReqRename(properties);
            }; /**
               * Encodes the specified ReqRename message. Does not implicitly {@link m_proto.ReqRename.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqRename
               * @static
               * @param {m_proto.IReqRename} message ReqRename message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqRename.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32( /* id 1, wireType 2 =*/10).string(message.name);
              return writer;
            }; /**
               * Encodes the specified ReqRename message, length delimited. Does not implicitly {@link m_proto.ReqRename.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqRename
               * @static
               * @param {m_proto.IReqRename} message ReqRename message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqRename.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqRename message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqRename
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqRename} ReqRename
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqRename.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqRename();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.name = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqRename message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqRename
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqRename} ReqRename
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqRename.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqRename message.
               * @function verify
               * @memberof m_proto.ReqRename
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqRename.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected";
              return null;
            }; /**
               * Creates a ReqRename message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqRename
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqRename} ReqRename
               */
            ReqRename.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqRename) return object;
              var message = new $root.m_proto.ReqRename();
              if (object.name != null) message.name = String(object.name);
              return message;
            }; /**
               * Creates a plain object from a ReqRename message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqRename
               * @static
               * @param {m_proto.ReqRename} message ReqRename
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqRename.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.name = "";
              if (message.name != null && message.hasOwnProperty("name")) object.name = message.name;
              return object;
            }; /**
               * Converts this ReqRename to JSON.
               * @function toJSON
               * @memberof m_proto.ReqRename
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqRename.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqRename
               * @function getTypeUrl
               * @memberof m_proto.ReqRename
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqRename.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqRename";
            };
            return ReqRename;
          }();
          m_proto.ResRename = function () {
            /**
            * Properties of a ResRename.
            * @memberof m_proto
            * @interface IResRename
            * @property {number|null} [code] ResRename code
            * @property {string|null} [name] ResRename name
            */ /**
               * Constructs a new ResRename.
               * @memberof m_proto
               * @classdesc Represents a ResRename.
               * @implements IResRename
               * @constructor
               * @param {m_proto.IResRename=} [properties] Properties to set
               */
            function ResRename(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResRename code.
              * @member {number} code
              * @memberof m_proto.ResRename
              * @instance
              */
            ResRename.prototype.code = 0; /**
                                          * ResRename name.
                                          * @member {string} name
                                          * @memberof m_proto.ResRename
                                          * @instance
                                          */
            ResRename.prototype.name = ""; /**
                                           * Creates a new ResRename instance using the specified properties.
                                           * @function create
                                           * @memberof m_proto.ResRename
                                           * @static
                                           * @param {m_proto.IResRename=} [properties] Properties to set
                                           * @returns {m_proto.ResRename} ResRename instance
                                           */
            ResRename.create = function create(properties) {
              return new ResRename(properties);
            }; /**
               * Encodes the specified ResRename message. Does not implicitly {@link m_proto.ResRename.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResRename
               * @static
               * @param {m_proto.IResRename} message ResRename message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRename.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.name);
              return writer;
            }; /**
               * Encodes the specified ResRename message, length delimited. Does not implicitly {@link m_proto.ResRename.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResRename
               * @static
               * @param {m_proto.IResRename} message ResRename message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRename.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResRename message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResRename
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResRename} ResRename
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRename.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResRename();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.name = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResRename message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResRename
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResRename} ResRename
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRename.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResRename message.
               * @function verify
               * @memberof m_proto.ResRename
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResRename.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected";
              return null;
            }; /**
               * Creates a ResRename message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResRename
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResRename} ResRename
               */
            ResRename.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResRename) return object;
              var message = new $root.m_proto.ResRename();
              if (object.code != null) message.code = object.code | 0;
              if (object.name != null) message.name = String(object.name);
              return message;
            }; /**
               * Creates a plain object from a ResRename message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResRename
               * @static
               * @param {m_proto.ResRename} message ResRename
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResRename.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.name = "";
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.name != null && message.hasOwnProperty("name")) object.name = message.name;
              return object;
            }; /**
               * Converts this ResRename to JSON.
               * @function toJSON
               * @memberof m_proto.ResRename
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResRename.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResRename
               * @function getTypeUrl
               * @memberof m_proto.ResRename
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResRename.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResRename";
            };
            return ResRename;
          }();
          m_proto.ReqSetHead = function () {
            /**
            * Properties of a ReqSetHead.
            * @memberof m_proto
            * @interface IReqSetHead
            * @property {number|null} [head_id] ReqSetHead head_id
            */ /**
               * Constructs a new ReqSetHead.
               * @memberof m_proto
               * @classdesc Represents a ReqSetHead.
               * @implements IReqSetHead
               * @constructor
               * @param {m_proto.IReqSetHead=} [properties] Properties to set
               */
            function ReqSetHead(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqSetHead head_id.
              * @member {number} head_id
              * @memberof m_proto.ReqSetHead
              * @instance
              */
            ReqSetHead.prototype.head_id = 0; /**
                                              * Creates a new ReqSetHead instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ReqSetHead
                                              * @static
                                              * @param {m_proto.IReqSetHead=} [properties] Properties to set
                                              * @returns {m_proto.ReqSetHead} ReqSetHead instance
                                              */
            ReqSetHead.create = function create(properties) {
              return new ReqSetHead(properties);
            }; /**
               * Encodes the specified ReqSetHead message. Does not implicitly {@link m_proto.ReqSetHead.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {m_proto.IReqSetHead} message ReqSetHead message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqSetHead.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.head_id != null && Object.hasOwnProperty.call(message, "head_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.head_id);
              return writer;
            }; /**
               * Encodes the specified ReqSetHead message, length delimited. Does not implicitly {@link m_proto.ReqSetHead.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {m_proto.IReqSetHead} message ReqSetHead message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqSetHead.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqSetHead message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqSetHead} ReqSetHead
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqSetHead.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqSetHead();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.head_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqSetHead message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqSetHead} ReqSetHead
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqSetHead.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqSetHead message.
               * @function verify
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqSetHead.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.head_id != null && message.hasOwnProperty("head_id")) if (!$util.isInteger(message.head_id)) return "head_id: integer expected";
              return null;
            }; /**
               * Creates a ReqSetHead message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqSetHead} ReqSetHead
               */
            ReqSetHead.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqSetHead) return object;
              var message = new $root.m_proto.ReqSetHead();
              if (object.head_id != null) message.head_id = object.head_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqSetHead message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {m_proto.ReqSetHead} message ReqSetHead
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqSetHead.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.head_id = 0;
              if (message.head_id != null && message.hasOwnProperty("head_id")) object.head_id = message.head_id;
              return object;
            }; /**
               * Converts this ReqSetHead to JSON.
               * @function toJSON
               * @memberof m_proto.ReqSetHead
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqSetHead.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqSetHead
               * @function getTypeUrl
               * @memberof m_proto.ReqSetHead
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqSetHead.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqSetHead";
            };
            return ReqSetHead;
          }();
          m_proto.ResSetHead = function () {
            /**
            * Properties of a ResSetHead.
            * @memberof m_proto
            * @interface IResSetHead
            * @property {number|null} [code] ResSetHead code
            * @property {number|null} [head_id] ResSetHead head_id
            */ /**
               * Constructs a new ResSetHead.
               * @memberof m_proto
               * @classdesc Represents a ResSetHead.
               * @implements IResSetHead
               * @constructor
               * @param {m_proto.IResSetHead=} [properties] Properties to set
               */
            function ResSetHead(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResSetHead code.
              * @member {number} code
              * @memberof m_proto.ResSetHead
              * @instance
              */
            ResSetHead.prototype.code = 0; /**
                                           * ResSetHead head_id.
                                           * @member {number} head_id
                                           * @memberof m_proto.ResSetHead
                                           * @instance
                                           */
            ResSetHead.prototype.head_id = 0; /**
                                              * Creates a new ResSetHead instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ResSetHead
                                              * @static
                                              * @param {m_proto.IResSetHead=} [properties] Properties to set
                                              * @returns {m_proto.ResSetHead} ResSetHead instance
                                              */
            ResSetHead.create = function create(properties) {
              return new ResSetHead(properties);
            }; /**
               * Encodes the specified ResSetHead message. Does not implicitly {@link m_proto.ResSetHead.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResSetHead
               * @static
               * @param {m_proto.IResSetHead} message ResSetHead message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSetHead.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.head_id != null && Object.hasOwnProperty.call(message, "head_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.head_id);
              return writer;
            }; /**
               * Encodes the specified ResSetHead message, length delimited. Does not implicitly {@link m_proto.ResSetHead.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResSetHead
               * @static
               * @param {m_proto.IResSetHead} message ResSetHead message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSetHead.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResSetHead message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResSetHead
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResSetHead} ResSetHead
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSetHead.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResSetHead();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.head_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResSetHead message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResSetHead
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResSetHead} ResSetHead
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSetHead.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResSetHead message.
               * @function verify
               * @memberof m_proto.ResSetHead
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResSetHead.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.head_id != null && message.hasOwnProperty("head_id")) if (!$util.isInteger(message.head_id)) return "head_id: integer expected";
              return null;
            }; /**
               * Creates a ResSetHead message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResSetHead
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResSetHead} ResSetHead
               */
            ResSetHead.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResSetHead) return object;
              var message = new $root.m_proto.ResSetHead();
              if (object.code != null) message.code = object.code | 0;
              if (object.head_id != null) message.head_id = object.head_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResSetHead message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResSetHead
               * @static
               * @param {m_proto.ResSetHead} message ResSetHead
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResSetHead.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.head_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.head_id != null && message.hasOwnProperty("head_id")) object.head_id = message.head_id;
              return object;
            }; /**
               * Converts this ResSetHead to JSON.
               * @function toJSON
               * @memberof m_proto.ResSetHead
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResSetHead.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResSetHead
               * @function getTypeUrl
               * @memberof m_proto.ResSetHead
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResSetHead.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResSetHead";
            };
            return ResSetHead;
          }();
          m_proto.ReqHeadPictureList = function () {
            /**
            * Properties of a ReqHeadPictureList.
            * @memberof m_proto
            * @interface IReqHeadPictureList
            */ /**
               * Constructs a new ReqHeadPictureList.
               * @memberof m_proto
               * @classdesc Represents a ReqHeadPictureList.
               * @implements IReqHeadPictureList
               * @constructor
               * @param {m_proto.IReqHeadPictureList=} [properties] Properties to set
               */
            function ReqHeadPictureList(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqHeadPictureList instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqHeadPictureList
              * @static
              * @param {m_proto.IReqHeadPictureList=} [properties] Properties to set
              * @returns {m_proto.ReqHeadPictureList} ReqHeadPictureList instance
              */
            ReqHeadPictureList.create = function create(properties) {
              return new ReqHeadPictureList(properties);
            }; /**
               * Encodes the specified ReqHeadPictureList message. Does not implicitly {@link m_proto.ReqHeadPictureList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {m_proto.IReqHeadPictureList} message ReqHeadPictureList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqHeadPictureList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqHeadPictureList message, length delimited. Does not implicitly {@link m_proto.ReqHeadPictureList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {m_proto.IReqHeadPictureList} message ReqHeadPictureList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqHeadPictureList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqHeadPictureList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqHeadPictureList} ReqHeadPictureList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqHeadPictureList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqHeadPictureList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqHeadPictureList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqHeadPictureList} ReqHeadPictureList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqHeadPictureList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqHeadPictureList message.
               * @function verify
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqHeadPictureList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqHeadPictureList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqHeadPictureList} ReqHeadPictureList
               */
            ReqHeadPictureList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqHeadPictureList) return object;
              return new $root.m_proto.ReqHeadPictureList();
            }; /**
               * Creates a plain object from a ReqHeadPictureList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {m_proto.ReqHeadPictureList} message ReqHeadPictureList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqHeadPictureList.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqHeadPictureList to JSON.
               * @function toJSON
               * @memberof m_proto.ReqHeadPictureList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqHeadPictureList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqHeadPictureList
               * @function getTypeUrl
               * @memberof m_proto.ReqHeadPictureList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqHeadPictureList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqHeadPictureList";
            };
            return ReqHeadPictureList;
          }();
          m_proto.ResHeadPictureList = function () {
            /**
            * Properties of a ResHeadPictureList.
            * @memberof m_proto
            * @interface IResHeadPictureList
            * @property {number|null} [code] ResHeadPictureList code
            * @property {Array.<number>|null} [head_list] ResHeadPictureList head_list
            */ /**
               * Constructs a new ResHeadPictureList.
               * @memberof m_proto
               * @classdesc Represents a ResHeadPictureList.
               * @implements IResHeadPictureList
               * @constructor
               * @param {m_proto.IResHeadPictureList=} [properties] Properties to set
               */
            function ResHeadPictureList(properties) {
              this.head_list = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResHeadPictureList code.
              * @member {number} code
              * @memberof m_proto.ResHeadPictureList
              * @instance
              */
            ResHeadPictureList.prototype.code = 0; /**
                                                   * ResHeadPictureList head_list.
                                                   * @member {Array.<number>} head_list
                                                   * @memberof m_proto.ResHeadPictureList
                                                   * @instance
                                                   */
            ResHeadPictureList.prototype.head_list = $util.emptyArray; /**
                                                                       * Creates a new ResHeadPictureList instance using the specified properties.
                                                                       * @function create
                                                                       * @memberof m_proto.ResHeadPictureList
                                                                       * @static
                                                                       * @param {m_proto.IResHeadPictureList=} [properties] Properties to set
                                                                       * @returns {m_proto.ResHeadPictureList} ResHeadPictureList instance
                                                                       */
            ResHeadPictureList.create = function create(properties) {
              return new ResHeadPictureList(properties);
            }; /**
               * Encodes the specified ResHeadPictureList message. Does not implicitly {@link m_proto.ResHeadPictureList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {m_proto.IResHeadPictureList} message ResHeadPictureList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResHeadPictureList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.head_list != null && message.head_list.length) {
                writer.uint32( /* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.head_list.length; ++i) writer.int32(message.head_list[i]);
                writer.ldelim();
              }
              return writer;
            }; /**
               * Encodes the specified ResHeadPictureList message, length delimited. Does not implicitly {@link m_proto.ResHeadPictureList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {m_proto.IResHeadPictureList} message ResHeadPictureList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResHeadPictureList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResHeadPictureList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResHeadPictureList} ResHeadPictureList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResHeadPictureList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResHeadPictureList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.head_list && message.head_list.length)) message.head_list = [];
                      if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) message.head_list.push(reader.int32());
                      } else message.head_list.push(reader.int32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResHeadPictureList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResHeadPictureList} ResHeadPictureList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResHeadPictureList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResHeadPictureList message.
               * @function verify
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResHeadPictureList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.head_list != null && message.hasOwnProperty("head_list")) {
                if (!Array.isArray(message.head_list)) return "head_list: array expected";
                for (var i = 0; i < message.head_list.length; ++i) if (!$util.isInteger(message.head_list[i])) return "head_list: integer[] expected";
              }
              return null;
            }; /**
               * Creates a ResHeadPictureList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResHeadPictureList} ResHeadPictureList
               */
            ResHeadPictureList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResHeadPictureList) return object;
              var message = new $root.m_proto.ResHeadPictureList();
              if (object.code != null) message.code = object.code | 0;
              if (object.head_list) {
                if (!Array.isArray(object.head_list)) throw TypeError(".m_proto.ResHeadPictureList.head_list: array expected");
                message.head_list = [];
                for (var i = 0; i < object.head_list.length; ++i) message.head_list[i] = object.head_list[i] | 0;
              }
              return message;
            }; /**
               * Creates a plain object from a ResHeadPictureList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {m_proto.ResHeadPictureList} message ResHeadPictureList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResHeadPictureList.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.head_list = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.head_list && message.head_list.length) {
                object.head_list = [];
                for (var j = 0; j < message.head_list.length; ++j) object.head_list[j] = message.head_list[j];
              }
              return object;
            }; /**
               * Converts this ResHeadPictureList to JSON.
               * @function toJSON
               * @memberof m_proto.ResHeadPictureList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResHeadPictureList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResHeadPictureList
               * @function getTypeUrl
               * @memberof m_proto.ResHeadPictureList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResHeadPictureList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResHeadPictureList";
            };
            return ResHeadPictureList;
          }();
          m_proto.ResAddHeadPicture = function () {
            /**
            * Properties of a ResAddHeadPicture.
            * @memberof m_proto
            * @interface IResAddHeadPicture
            * @property {number|null} [code] ResAddHeadPicture code
            * @property {Array.<number>|null} [head_list] ResAddHeadPicture head_list
            */ /**
               * Constructs a new ResAddHeadPicture.
               * @memberof m_proto
               * @classdesc Represents a ResAddHeadPicture.
               * @implements IResAddHeadPicture
               * @constructor
               * @param {m_proto.IResAddHeadPicture=} [properties] Properties to set
               */
            function ResAddHeadPicture(properties) {
              this.head_list = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResAddHeadPicture code.
              * @member {number} code
              * @memberof m_proto.ResAddHeadPicture
              * @instance
              */
            ResAddHeadPicture.prototype.code = 0; /**
                                                  * ResAddHeadPicture head_list.
                                                  * @member {Array.<number>} head_list
                                                  * @memberof m_proto.ResAddHeadPicture
                                                  * @instance
                                                  */
            ResAddHeadPicture.prototype.head_list = $util.emptyArray; /**
                                                                      * Creates a new ResAddHeadPicture instance using the specified properties.
                                                                      * @function create
                                                                      * @memberof m_proto.ResAddHeadPicture
                                                                      * @static
                                                                      * @param {m_proto.IResAddHeadPicture=} [properties] Properties to set
                                                                      * @returns {m_proto.ResAddHeadPicture} ResAddHeadPicture instance
                                                                      */
            ResAddHeadPicture.create = function create(properties) {
              return new ResAddHeadPicture(properties);
            }; /**
               * Encodes the specified ResAddHeadPicture message. Does not implicitly {@link m_proto.ResAddHeadPicture.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {m_proto.IResAddHeadPicture} message ResAddHeadPicture message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAddHeadPicture.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.head_list != null && message.head_list.length) {
                writer.uint32( /* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.head_list.length; ++i) writer.int32(message.head_list[i]);
                writer.ldelim();
              }
              return writer;
            }; /**
               * Encodes the specified ResAddHeadPicture message, length delimited. Does not implicitly {@link m_proto.ResAddHeadPicture.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {m_proto.IResAddHeadPicture} message ResAddHeadPicture message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAddHeadPicture.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResAddHeadPicture message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResAddHeadPicture} ResAddHeadPicture
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAddHeadPicture.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResAddHeadPicture();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.head_list && message.head_list.length)) message.head_list = [];
                      if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) message.head_list.push(reader.int32());
                      } else message.head_list.push(reader.int32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResAddHeadPicture message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResAddHeadPicture} ResAddHeadPicture
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAddHeadPicture.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResAddHeadPicture message.
               * @function verify
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResAddHeadPicture.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.head_list != null && message.hasOwnProperty("head_list")) {
                if (!Array.isArray(message.head_list)) return "head_list: array expected";
                for (var i = 0; i < message.head_list.length; ++i) if (!$util.isInteger(message.head_list[i])) return "head_list: integer[] expected";
              }
              return null;
            }; /**
               * Creates a ResAddHeadPicture message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResAddHeadPicture} ResAddHeadPicture
               */
            ResAddHeadPicture.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResAddHeadPicture) return object;
              var message = new $root.m_proto.ResAddHeadPicture();
              if (object.code != null) message.code = object.code | 0;
              if (object.head_list) {
                if (!Array.isArray(object.head_list)) throw TypeError(".m_proto.ResAddHeadPicture.head_list: array expected");
                message.head_list = [];
                for (var i = 0; i < object.head_list.length; ++i) message.head_list[i] = object.head_list[i] | 0;
              }
              return message;
            }; /**
               * Creates a plain object from a ResAddHeadPicture message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {m_proto.ResAddHeadPicture} message ResAddHeadPicture
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResAddHeadPicture.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.head_list = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.head_list && message.head_list.length) {
                object.head_list = [];
                for (var j = 0; j < message.head_list.length; ++j) object.head_list[j] = message.head_list[j];
              }
              return object;
            }; /**
               * Converts this ResAddHeadPicture to JSON.
               * @function toJSON
               * @memberof m_proto.ResAddHeadPicture
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResAddHeadPicture.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResAddHeadPicture
               * @function getTypeUrl
               * @memberof m_proto.ResAddHeadPicture
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResAddHeadPicture.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResAddHeadPicture";
            };
            return ResAddHeadPicture;
          }();
          m_proto.ResUserKick = function () {
            /**
            * Properties of a ResUserKick.
            * @memberof m_proto
            * @interface IResUserKick
            * @property {number|null} [code] ResUserKick code
            */ /**
               * Constructs a new ResUserKick.
               * @memberof m_proto
               * @classdesc Represents a ResUserKick.
               * @implements IResUserKick
               * @constructor
               * @param {m_proto.IResUserKick=} [properties] Properties to set
               */
            function ResUserKick(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUserKick code.
              * @member {number} code
              * @memberof m_proto.ResUserKick
              * @instance
              */
            ResUserKick.prototype.code = 0; /**
                                            * Creates a new ResUserKick instance using the specified properties.
                                            * @function create
                                            * @memberof m_proto.ResUserKick
                                            * @static
                                            * @param {m_proto.IResUserKick=} [properties] Properties to set
                                            * @returns {m_proto.ResUserKick} ResUserKick instance
                                            */
            ResUserKick.create = function create(properties) {
              return new ResUserKick(properties);
            }; /**
               * Encodes the specified ResUserKick message. Does not implicitly {@link m_proto.ResUserKick.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUserKick
               * @static
               * @param {m_proto.IResUserKick} message ResUserKick message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserKick.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResUserKick message, length delimited. Does not implicitly {@link m_proto.ResUserKick.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUserKick
               * @static
               * @param {m_proto.IResUserKick} message ResUserKick message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserKick.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUserKick message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUserKick
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUserKick} ResUserKick
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserKick.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUserKick();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUserKick message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUserKick
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUserKick} ResUserKick
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserKick.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUserKick message.
               * @function verify
               * @memberof m_proto.ResUserKick
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUserKick.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResUserKick message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUserKick
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUserKick} ResUserKick
               */
            ResUserKick.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUserKick) return object;
              var message = new $root.m_proto.ResUserKick();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUserKick message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUserKick
               * @static
               * @param {m_proto.ResUserKick} message ResUserKick
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUserKick.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResUserKick to JSON.
               * @function toJSON
               * @memberof m_proto.ResUserKick
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUserKick.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUserKick
               * @function getTypeUrl
               * @memberof m_proto.ResUserKick
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUserKick.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUserKick";
            };
            return ResUserKick;
          }();
          m_proto.ReqUseItem = function () {
            /**
            * Properties of a ReqUseItem.
            * @memberof m_proto
            * @interface IReqUseItem
            * @property {number|null} [item_uid] ReqUseItem item_uid
            */ /**
               * Constructs a new ReqUseItem.
               * @memberof m_proto
               * @classdesc Represents a ReqUseItem.
               * @implements IReqUseItem
               * @constructor
               * @param {m_proto.IReqUseItem=} [properties] Properties to set
               */
            function ReqUseItem(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUseItem item_uid.
              * @member {number} item_uid
              * @memberof m_proto.ReqUseItem
              * @instance
              */
            ReqUseItem.prototype.item_uid = 0; /**
                                               * Creates a new ReqUseItem instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ReqUseItem
                                               * @static
                                               * @param {m_proto.IReqUseItem=} [properties] Properties to set
                                               * @returns {m_proto.ReqUseItem} ReqUseItem instance
                                               */
            ReqUseItem.create = function create(properties) {
              return new ReqUseItem(properties);
            }; /**
               * Encodes the specified ReqUseItem message. Does not implicitly {@link m_proto.ReqUseItem.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {m_proto.IReqUseItem} message ReqUseItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUseItem.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.item_uid != null && Object.hasOwnProperty.call(message, "item_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.item_uid);
              return writer;
            }; /**
               * Encodes the specified ReqUseItem message, length delimited. Does not implicitly {@link m_proto.ReqUseItem.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {m_proto.IReqUseItem} message ReqUseItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUseItem.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUseItem message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUseItem} ReqUseItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUseItem.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUseItem();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.item_uid = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUseItem message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUseItem} ReqUseItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUseItem.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUseItem message.
               * @function verify
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUseItem.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.item_uid != null && message.hasOwnProperty("item_uid")) if (!$util.isInteger(message.item_uid)) return "item_uid: integer expected";
              return null;
            }; /**
               * Creates a ReqUseItem message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUseItem} ReqUseItem
               */
            ReqUseItem.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUseItem) return object;
              var message = new $root.m_proto.ReqUseItem();
              if (object.item_uid != null) message.item_uid = object.item_uid | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUseItem message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {m_proto.ReqUseItem} message ReqUseItem
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUseItem.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.item_uid = 0;
              if (message.item_uid != null && message.hasOwnProperty("item_uid")) object.item_uid = message.item_uid;
              return object;
            }; /**
               * Converts this ReqUseItem to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUseItem
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUseItem.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUseItem
               * @function getTypeUrl
               * @memberof m_proto.ReqUseItem
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUseItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUseItem";
            };
            return ReqUseItem;
          }();
          m_proto.ResUseItem = function () {
            /**
            * Properties of a ResUseItem.
            * @memberof m_proto
            * @interface IResUseItem
            * @property {number|null} [code] ResUseItem code
            */ /**
               * Constructs a new ResUseItem.
               * @memberof m_proto
               * @classdesc Represents a ResUseItem.
               * @implements IResUseItem
               * @constructor
               * @param {m_proto.IResUseItem=} [properties] Properties to set
               */
            function ResUseItem(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUseItem code.
              * @member {number} code
              * @memberof m_proto.ResUseItem
              * @instance
              */
            ResUseItem.prototype.code = 0; /**
                                           * Creates a new ResUseItem instance using the specified properties.
                                           * @function create
                                           * @memberof m_proto.ResUseItem
                                           * @static
                                           * @param {m_proto.IResUseItem=} [properties] Properties to set
                                           * @returns {m_proto.ResUseItem} ResUseItem instance
                                           */
            ResUseItem.create = function create(properties) {
              return new ResUseItem(properties);
            }; /**
               * Encodes the specified ResUseItem message. Does not implicitly {@link m_proto.ResUseItem.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUseItem
               * @static
               * @param {m_proto.IResUseItem} message ResUseItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUseItem.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResUseItem message, length delimited. Does not implicitly {@link m_proto.ResUseItem.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUseItem
               * @static
               * @param {m_proto.IResUseItem} message ResUseItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUseItem.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUseItem message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUseItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUseItem} ResUseItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUseItem.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUseItem();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUseItem message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUseItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUseItem} ResUseItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUseItem.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUseItem message.
               * @function verify
               * @memberof m_proto.ResUseItem
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUseItem.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResUseItem message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUseItem
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUseItem} ResUseItem
               */
            ResUseItem.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUseItem) return object;
              var message = new $root.m_proto.ResUseItem();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUseItem message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUseItem
               * @static
               * @param {m_proto.ResUseItem} message ResUseItem
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUseItem.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResUseItem to JSON.
               * @function toJSON
               * @memberof m_proto.ResUseItem
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUseItem.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUseItem
               * @function getTypeUrl
               * @memberof m_proto.ResUseItem
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUseItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUseItem";
            };
            return ResUseItem;
          }();
          m_proto.ReqUserLoadBag = function () {
            /**
            * Properties of a ReqUserLoadBag.
            * @memberof m_proto
            * @interface IReqUserLoadBag
            */ /**
               * Constructs a new ReqUserLoadBag.
               * @memberof m_proto
               * @classdesc Represents a ReqUserLoadBag.
               * @implements IReqUserLoadBag
               * @constructor
               * @param {m_proto.IReqUserLoadBag=} [properties] Properties to set
               */
            function ReqUserLoadBag(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqUserLoadBag instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqUserLoadBag
              * @static
              * @param {m_proto.IReqUserLoadBag=} [properties] Properties to set
              * @returns {m_proto.ReqUserLoadBag} ReqUserLoadBag instance
              */
            ReqUserLoadBag.create = function create(properties) {
              return new ReqUserLoadBag(properties);
            }; /**
               * Encodes the specified ReqUserLoadBag message. Does not implicitly {@link m_proto.ReqUserLoadBag.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {m_proto.IReqUserLoadBag} message ReqUserLoadBag message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserLoadBag.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqUserLoadBag message, length delimited. Does not implicitly {@link m_proto.ReqUserLoadBag.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {m_proto.IReqUserLoadBag} message ReqUserLoadBag message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUserLoadBag.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUserLoadBag message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUserLoadBag} ReqUserLoadBag
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserLoadBag.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUserLoadBag();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUserLoadBag message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUserLoadBag} ReqUserLoadBag
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUserLoadBag.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUserLoadBag message.
               * @function verify
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUserLoadBag.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqUserLoadBag message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUserLoadBag} ReqUserLoadBag
               */
            ReqUserLoadBag.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUserLoadBag) return object;
              return new $root.m_proto.ReqUserLoadBag();
            }; /**
               * Creates a plain object from a ReqUserLoadBag message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {m_proto.ReqUserLoadBag} message ReqUserLoadBag
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUserLoadBag.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqUserLoadBag to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUserLoadBag
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUserLoadBag.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUserLoadBag
               * @function getTypeUrl
               * @memberof m_proto.ReqUserLoadBag
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUserLoadBag.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUserLoadBag";
            };
            return ReqUserLoadBag;
          }();
          m_proto.ResUserLoadBag = function () {
            /**
            * Properties of a ResUserLoadBag.
            * @memberof m_proto
            * @interface IResUserLoadBag
            * @property {number|null} [code] ResUserLoadBag code
            * @property {number|null} [uid] ResUserLoadBag uid
            * @property {number|null} [serverid] ResUserLoadBag serverid
            * @property {Array.<m_proto.IItem>|null} [items] ResUserLoadBag items
            */ /**
               * Constructs a new ResUserLoadBag.
               * @memberof m_proto
               * @classdesc Represents a ResUserLoadBag.
               * @implements IResUserLoadBag
               * @constructor
               * @param {m_proto.IResUserLoadBag=} [properties] Properties to set
               */
            function ResUserLoadBag(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUserLoadBag code.
              * @member {number} code
              * @memberof m_proto.ResUserLoadBag
              * @instance
              */
            ResUserLoadBag.prototype.code = 0; /**
                                               * ResUserLoadBag uid.
                                               * @member {number} uid
                                               * @memberof m_proto.ResUserLoadBag
                                               * @instance
                                               */
            ResUserLoadBag.prototype.uid = 0; /**
                                              * ResUserLoadBag serverid.
                                              * @member {number} serverid
                                              * @memberof m_proto.ResUserLoadBag
                                              * @instance
                                              */
            ResUserLoadBag.prototype.serverid = 0; /**
                                                   * ResUserLoadBag items.
                                                   * @member {Array.<m_proto.IItem>} items
                                                   * @memberof m_proto.ResUserLoadBag
                                                   * @instance
                                                   */
            ResUserLoadBag.prototype.items = $util.emptyArray; /**
                                                               * Creates a new ResUserLoadBag instance using the specified properties.
                                                               * @function create
                                                               * @memberof m_proto.ResUserLoadBag
                                                               * @static
                                                               * @param {m_proto.IResUserLoadBag=} [properties] Properties to set
                                                               * @returns {m_proto.ResUserLoadBag} ResUserLoadBag instance
                                                               */
            ResUserLoadBag.create = function create(properties) {
              return new ResUserLoadBag(properties);
            }; /**
               * Encodes the specified ResUserLoadBag message. Does not implicitly {@link m_proto.ResUserLoadBag.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {m_proto.IResUserLoadBag} message ResUserLoadBag message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserLoadBag.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.uid);
              if (message.serverid != null && Object.hasOwnProperty.call(message, "serverid")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.serverid);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResUserLoadBag message, length delimited. Does not implicitly {@link m_proto.ResUserLoadBag.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {m_proto.IResUserLoadBag} message ResUserLoadBag message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserLoadBag.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUserLoadBag message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUserLoadBag} ResUserLoadBag
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserLoadBag.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUserLoadBag();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.serverid = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUserLoadBag message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUserLoadBag} ResUserLoadBag
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserLoadBag.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUserLoadBag message.
               * @function verify
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUserLoadBag.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isInteger(message.uid)) return "uid: integer expected";
              if (message.serverid != null && message.hasOwnProperty("serverid")) if (!$util.isInteger(message.serverid)) return "serverid: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResUserLoadBag message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUserLoadBag} ResUserLoadBag
               */
            ResUserLoadBag.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUserLoadBag) return object;
              var message = new $root.m_proto.ResUserLoadBag();
              if (object.code != null) message.code = object.code | 0;
              if (object.uid != null) message.uid = object.uid | 0;
              if (object.serverid != null) message.serverid = object.serverid | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResUserLoadBag.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResUserLoadBag.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResUserLoadBag message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {m_proto.ResUserLoadBag} message ResUserLoadBag
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUserLoadBag.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.code = 0;
                object.uid = 0;
                object.serverid = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid;
              if (message.serverid != null && message.hasOwnProperty("serverid")) object.serverid = message.serverid;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResUserLoadBag to JSON.
               * @function toJSON
               * @memberof m_proto.ResUserLoadBag
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUserLoadBag.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUserLoadBag
               * @function getTypeUrl
               * @memberof m_proto.ResUserLoadBag
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUserLoadBag.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUserLoadBag";
            };
            return ResUserLoadBag;
          }();
          m_proto.ResUserbagchange = function () {
            /**
            * Properties of a ResUserbagchange.
            * @memberof m_proto
            * @interface IResUserbagchange
            * @property {number|null} [code] ResUserbagchange code
            * @property {string|null} [description] ResUserbagchange description
            * @property {number|null} [uid] ResUserbagchange uid
            * @property {number|null} [serverid] ResUserbagchange serverid
            * @property {Array.<m_proto.IItem>|null} [items] ResUserbagchange items
            */ /**
               * Constructs a new ResUserbagchange.
               * @memberof m_proto
               * @classdesc Represents a ResUserbagchange.
               * @implements IResUserbagchange
               * @constructor
               * @param {m_proto.IResUserbagchange=} [properties] Properties to set
               */
            function ResUserbagchange(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUserbagchange code.
              * @member {number} code
              * @memberof m_proto.ResUserbagchange
              * @instance
              */
            ResUserbagchange.prototype.code = 0; /**
                                                 * ResUserbagchange description.
                                                 * @member {string} description
                                                 * @memberof m_proto.ResUserbagchange
                                                 * @instance
                                                 */
            ResUserbagchange.prototype.description = ""; /**
                                                         * ResUserbagchange uid.
                                                         * @member {number} uid
                                                         * @memberof m_proto.ResUserbagchange
                                                         * @instance
                                                         */
            ResUserbagchange.prototype.uid = 0; /**
                                                * ResUserbagchange serverid.
                                                * @member {number} serverid
                                                * @memberof m_proto.ResUserbagchange
                                                * @instance
                                                */
            ResUserbagchange.prototype.serverid = 0; /**
                                                     * ResUserbagchange items.
                                                     * @member {Array.<m_proto.IItem>} items
                                                     * @memberof m_proto.ResUserbagchange
                                                     * @instance
                                                     */
            ResUserbagchange.prototype.items = $util.emptyArray; /**
                                                                 * Creates a new ResUserbagchange instance using the specified properties.
                                                                 * @function create
                                                                 * @memberof m_proto.ResUserbagchange
                                                                 * @static
                                                                 * @param {m_proto.IResUserbagchange=} [properties] Properties to set
                                                                 * @returns {m_proto.ResUserbagchange} ResUserbagchange instance
                                                                 */
            ResUserbagchange.create = function create(properties) {
              return new ResUserbagchange(properties);
            }; /**
               * Encodes the specified ResUserbagchange message. Does not implicitly {@link m_proto.ResUserbagchange.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {m_proto.IResUserbagchange} message ResUserbagchange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserbagchange.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.description);
              if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.uid);
              if (message.serverid != null && Object.hasOwnProperty.call(message, "serverid")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.serverid);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 5, wireType 2 =*/42).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResUserbagchange message, length delimited. Does not implicitly {@link m_proto.ResUserbagchange.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {m_proto.IResUserbagchange} message ResUserbagchange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUserbagchange.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUserbagchange message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUserbagchange} ResUserbagchange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserbagchange.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUserbagchange();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.description = reader.string();
                      break;
                    }
                  case 3:
                    {
                      message.uid = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.serverid = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUserbagchange message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUserbagchange} ResUserbagchange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUserbagchange.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUserbagchange message.
               * @function verify
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUserbagchange.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected";
              if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isInteger(message.uid)) return "uid: integer expected";
              if (message.serverid != null && message.hasOwnProperty("serverid")) if (!$util.isInteger(message.serverid)) return "serverid: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResUserbagchange message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUserbagchange} ResUserbagchange
               */
            ResUserbagchange.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUserbagchange) return object;
              var message = new $root.m_proto.ResUserbagchange();
              if (object.code != null) message.code = object.code | 0;
              if (object.description != null) message.description = String(object.description);
              if (object.uid != null) message.uid = object.uid | 0;
              if (object.serverid != null) message.serverid = object.serverid | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResUserbagchange.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResUserbagchange.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResUserbagchange message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {m_proto.ResUserbagchange} message ResUserbagchange
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUserbagchange.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.code = 0;
                object.description = "";
                object.uid = 0;
                object.serverid = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.description != null && message.hasOwnProperty("description")) object.description = message.description;
              if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid;
              if (message.serverid != null && message.hasOwnProperty("serverid")) object.serverid = message.serverid;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResUserbagchange to JSON.
               * @function toJSON
               * @memberof m_proto.ResUserbagchange
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUserbagchange.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUserbagchange
               * @function getTypeUrl
               * @memberof m_proto.ResUserbagchange
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUserbagchange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUserbagchange";
            };
            return ResUserbagchange;
          }();
          m_proto.Item = function () {
            /**
            * Properties of an Item.
            * @memberof m_proto
            * @interface IItem
            * @property {number|null} [itemid] Item itemid
            * @property {number|null} [num] Item num
            * @property {number|null} [itemUid] Item itemUid
            * @property {number|null} [exp] Item exp
            * @property {number|null} [level] Item level
            * @property {number|null} [hero_id] Item hero_id
            * @property {number|null} [lock_state] Item lock_state
            * @property {Array.<m_proto.IItemAttr>|null} [jipin_attr] Item jipin_attr
            */ /**
               * Constructs a new Item.
               * @memberof m_proto
               * @classdesc Represents an Item.
               * @implements IItem
               * @constructor
               * @param {m_proto.IItem=} [properties] Properties to set
               */
            function Item(properties) {
              this.jipin_attr = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Item itemid.
              * @member {number} itemid
              * @memberof m_proto.Item
              * @instance
              */
            Item.prototype.itemid = 0; /**
                                       * Item num.
                                       * @member {number} num
                                       * @memberof m_proto.Item
                                       * @instance
                                       */
            Item.prototype.num = 0; /**
                                    * Item itemUid.
                                    * @member {number} itemUid
                                    * @memberof m_proto.Item
                                    * @instance
                                    */
            Item.prototype.itemUid = 0; /**
                                        * Item exp.
                                        * @member {number} exp
                                        * @memberof m_proto.Item
                                        * @instance
                                        */
            Item.prototype.exp = 0; /**
                                    * Item level.
                                    * @member {number} level
                                    * @memberof m_proto.Item
                                    * @instance
                                    */
            Item.prototype.level = 0; /**
                                      * Item hero_id.
                                      * @member {number} hero_id
                                      * @memberof m_proto.Item
                                      * @instance
                                      */
            Item.prototype.hero_id = 0; /**
                                        * Item lock_state.
                                        * @member {number} lock_state
                                        * @memberof m_proto.Item
                                        * @instance
                                        */
            Item.prototype.lock_state = 0; /**
                                           * Item jipin_attr.
                                           * @member {Array.<m_proto.IItemAttr>} jipin_attr
                                           * @memberof m_proto.Item
                                           * @instance
                                           */
            Item.prototype.jipin_attr = $util.emptyArray; /**
                                                          * Creates a new Item instance using the specified properties.
                                                          * @function create
                                                          * @memberof m_proto.Item
                                                          * @static
                                                          * @param {m_proto.IItem=} [properties] Properties to set
                                                          * @returns {m_proto.Item} Item instance
                                                          */
            Item.create = function create(properties) {
              return new Item(properties);
            }; /**
               * Encodes the specified Item message. Does not implicitly {@link m_proto.Item.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Item
               * @static
               * @param {m_proto.IItem} message Item message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Item.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.itemid != null && Object.hasOwnProperty.call(message, "itemid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.itemid);
              if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.num);
              if (message.itemUid != null && Object.hasOwnProperty.call(message, "itemUid")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.itemUid);
              if (message.exp != null && Object.hasOwnProperty.call(message, "exp")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.exp);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.level);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.hero_id);
              if (message.lock_state != null && Object.hasOwnProperty.call(message, "lock_state")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.lock_state);
              if (message.jipin_attr != null && message.jipin_attr.length) for (var i = 0; i < message.jipin_attr.length; ++i) $root.m_proto.ItemAttr.encode(message.jipin_attr[i], writer.uint32( /* id 8, wireType 2 =*/66).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified Item message, length delimited. Does not implicitly {@link m_proto.Item.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Item
               * @static
               * @param {m_proto.IItem} message Item message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Item.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes an Item message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Item
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Item} Item
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Item.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Item();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.itemid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.num = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.itemUid = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.exp = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.lock_state = reader.int32();
                      break;
                    }
                  case 8:
                    {
                      if (!(message.jipin_attr && message.jipin_attr.length)) message.jipin_attr = [];
                      message.jipin_attr.push($root.m_proto.ItemAttr.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes an Item message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Item
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Item} Item
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Item.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies an Item message.
               * @function verify
               * @memberof m_proto.Item
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Item.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.itemid != null && message.hasOwnProperty("itemid")) if (!$util.isInteger(message.itemid)) return "itemid: integer expected";
              if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num)) return "num: integer expected";
              if (message.itemUid != null && message.hasOwnProperty("itemUid")) if (!$util.isInteger(message.itemUid)) return "itemUid: integer expected";
              if (message.exp != null && message.hasOwnProperty("exp")) if (!$util.isInteger(message.exp)) return "exp: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) if (!$util.isInteger(message.lock_state)) return "lock_state: integer expected";
              if (message.jipin_attr != null && message.hasOwnProperty("jipin_attr")) {
                if (!Array.isArray(message.jipin_attr)) return "jipin_attr: array expected";
                for (var i = 0; i < message.jipin_attr.length; ++i) {
                  var error = $root.m_proto.ItemAttr.verify(message.jipin_attr[i]);
                  if (error) return "jipin_attr." + error;
                }
              }
              return null;
            }; /**
               * Creates an Item message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Item
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Item} Item
               */
            Item.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Item) return object;
              var message = new $root.m_proto.Item();
              if (object.itemid != null) message.itemid = object.itemid | 0;
              if (object.num != null) message.num = object.num | 0;
              if (object.itemUid != null) message.itemUid = object.itemUid | 0;
              if (object.exp != null) message.exp = object.exp | 0;
              if (object.level != null) message.level = object.level | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.lock_state != null) message.lock_state = object.lock_state | 0;
              if (object.jipin_attr) {
                if (!Array.isArray(object.jipin_attr)) throw TypeError(".m_proto.Item.jipin_attr: array expected");
                message.jipin_attr = [];
                for (var i = 0; i < object.jipin_attr.length; ++i) {
                  if (typeof object.jipin_attr[i] !== "object") throw TypeError(".m_proto.Item.jipin_attr: object expected");
                  message.jipin_attr[i] = $root.m_proto.ItemAttr.fromObject(object.jipin_attr[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from an Item message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Item
               * @static
               * @param {m_proto.Item} message Item
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Item.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.jipin_attr = [];
              if (options.defaults) {
                object.itemid = 0;
                object.num = 0;
                object.itemUid = 0;
                object.exp = 0;
                object.level = 0;
                object.hero_id = 0;
                object.lock_state = 0;
              }
              if (message.itemid != null && message.hasOwnProperty("itemid")) object.itemid = message.itemid;
              if (message.num != null && message.hasOwnProperty("num")) object.num = message.num;
              if (message.itemUid != null && message.hasOwnProperty("itemUid")) object.itemUid = message.itemUid;
              if (message.exp != null && message.hasOwnProperty("exp")) object.exp = message.exp;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) object.lock_state = message.lock_state;
              if (message.jipin_attr && message.jipin_attr.length) {
                object.jipin_attr = [];
                for (var j = 0; j < message.jipin_attr.length; ++j) object.jipin_attr[j] = $root.m_proto.ItemAttr.toObject(message.jipin_attr[j], options);
              }
              return object;
            }; /**
               * Converts this Item to JSON.
               * @function toJSON
               * @memberof m_proto.Item
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Item.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Item
               * @function getTypeUrl
               * @memberof m_proto.Item
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Item.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Item";
            };
            return Item;
          }();
          m_proto.ItemAttr = function () {
            /**
            * Properties of an ItemAttr.
            * @memberof m_proto
            * @interface IItemAttr
            * @property {number|null} [attr_id] ItemAttr attr_id
            * @property {number|null} [attr_val] ItemAttr attr_val
            */ /**
               * Constructs a new ItemAttr.
               * @memberof m_proto
               * @classdesc Represents an ItemAttr.
               * @implements IItemAttr
               * @constructor
               * @param {m_proto.IItemAttr=} [properties] Properties to set
               */
            function ItemAttr(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ItemAttr attr_id.
              * @member {number} attr_id
              * @memberof m_proto.ItemAttr
              * @instance
              */
            ItemAttr.prototype.attr_id = 0; /**
                                            * ItemAttr attr_val.
                                            * @member {number} attr_val
                                            * @memberof m_proto.ItemAttr
                                            * @instance
                                            */
            ItemAttr.prototype.attr_val = 0; /**
                                             * Creates a new ItemAttr instance using the specified properties.
                                             * @function create
                                             * @memberof m_proto.ItemAttr
                                             * @static
                                             * @param {m_proto.IItemAttr=} [properties] Properties to set
                                             * @returns {m_proto.ItemAttr} ItemAttr instance
                                             */
            ItemAttr.create = function create(properties) {
              return new ItemAttr(properties);
            }; /**
               * Encodes the specified ItemAttr message. Does not implicitly {@link m_proto.ItemAttr.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ItemAttr
               * @static
               * @param {m_proto.IItemAttr} message ItemAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ItemAttr.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.attr_id != null && Object.hasOwnProperty.call(message, "attr_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.attr_id);
              if (message.attr_val != null && Object.hasOwnProperty.call(message, "attr_val")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.attr_val);
              return writer;
            }; /**
               * Encodes the specified ItemAttr message, length delimited. Does not implicitly {@link m_proto.ItemAttr.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ItemAttr
               * @static
               * @param {m_proto.IItemAttr} message ItemAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ItemAttr.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes an ItemAttr message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ItemAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ItemAttr} ItemAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ItemAttr.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ItemAttr();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.attr_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.attr_val = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes an ItemAttr message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ItemAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ItemAttr} ItemAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ItemAttr.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies an ItemAttr message.
               * @function verify
               * @memberof m_proto.ItemAttr
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ItemAttr.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.attr_id != null && message.hasOwnProperty("attr_id")) if (!$util.isInteger(message.attr_id)) return "attr_id: integer expected";
              if (message.attr_val != null && message.hasOwnProperty("attr_val")) if (!$util.isInteger(message.attr_val)) return "attr_val: integer expected";
              return null;
            }; /**
               * Creates an ItemAttr message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ItemAttr
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ItemAttr} ItemAttr
               */
            ItemAttr.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ItemAttr) return object;
              var message = new $root.m_proto.ItemAttr();
              if (object.attr_id != null) message.attr_id = object.attr_id | 0;
              if (object.attr_val != null) message.attr_val = object.attr_val | 0;
              return message;
            }; /**
               * Creates a plain object from an ItemAttr message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ItemAttr
               * @static
               * @param {m_proto.ItemAttr} message ItemAttr
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ItemAttr.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.attr_id = 0;
                object.attr_val = 0;
              }
              if (message.attr_id != null && message.hasOwnProperty("attr_id")) object.attr_id = message.attr_id;
              if (message.attr_val != null && message.hasOwnProperty("attr_val")) object.attr_val = message.attr_val;
              return object;
            }; /**
               * Converts this ItemAttr to JSON.
               * @function toJSON
               * @memberof m_proto.ItemAttr
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ItemAttr.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ItemAttr
               * @function getTypeUrl
               * @memberof m_proto.ItemAttr
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ItemAttr.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ItemAttr";
            };
            return ItemAttr;
          }();
          m_proto.ReqAKeyUseGift = function () {
            /**
            * Properties of a ReqAKeyUseGift.
            * @memberof m_proto
            * @interface IReqAKeyUseGift
            * @property {number|null} [gift_id] ReqAKeyUseGift gift_id
            * @property {number|null} [num] ReqAKeyUseGift num
            */ /**
               * Constructs a new ReqAKeyUseGift.
               * @memberof m_proto
               * @classdesc Represents a ReqAKeyUseGift.
               * @implements IReqAKeyUseGift
               * @constructor
               * @param {m_proto.IReqAKeyUseGift=} [properties] Properties to set
               */
            function ReqAKeyUseGift(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqAKeyUseGift gift_id.
              * @member {number} gift_id
              * @memberof m_proto.ReqAKeyUseGift
              * @instance
              */
            ReqAKeyUseGift.prototype.gift_id = 0; /**
                                                  * ReqAKeyUseGift num.
                                                  * @member {number} num
                                                  * @memberof m_proto.ReqAKeyUseGift
                                                  * @instance
                                                  */
            ReqAKeyUseGift.prototype.num = 0; /**
                                              * Creates a new ReqAKeyUseGift instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ReqAKeyUseGift
                                              * @static
                                              * @param {m_proto.IReqAKeyUseGift=} [properties] Properties to set
                                              * @returns {m_proto.ReqAKeyUseGift} ReqAKeyUseGift instance
                                              */
            ReqAKeyUseGift.create = function create(properties) {
              return new ReqAKeyUseGift(properties);
            }; /**
               * Encodes the specified ReqAKeyUseGift message. Does not implicitly {@link m_proto.ReqAKeyUseGift.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {m_proto.IReqAKeyUseGift} message ReqAKeyUseGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAKeyUseGift.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.gift_id != null && Object.hasOwnProperty.call(message, "gift_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.gift_id);
              if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.num);
              return writer;
            }; /**
               * Encodes the specified ReqAKeyUseGift message, length delimited. Does not implicitly {@link m_proto.ReqAKeyUseGift.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {m_proto.IReqAKeyUseGift} message ReqAKeyUseGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAKeyUseGift.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqAKeyUseGift message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqAKeyUseGift} ReqAKeyUseGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAKeyUseGift.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqAKeyUseGift();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.gift_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.num = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqAKeyUseGift message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqAKeyUseGift} ReqAKeyUseGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAKeyUseGift.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqAKeyUseGift message.
               * @function verify
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqAKeyUseGift.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.gift_id != null && message.hasOwnProperty("gift_id")) if (!$util.isInteger(message.gift_id)) return "gift_id: integer expected";
              if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num)) return "num: integer expected";
              return null;
            }; /**
               * Creates a ReqAKeyUseGift message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqAKeyUseGift} ReqAKeyUseGift
               */
            ReqAKeyUseGift.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqAKeyUseGift) return object;
              var message = new $root.m_proto.ReqAKeyUseGift();
              if (object.gift_id != null) message.gift_id = object.gift_id | 0;
              if (object.num != null) message.num = object.num | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqAKeyUseGift message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {m_proto.ReqAKeyUseGift} message ReqAKeyUseGift
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqAKeyUseGift.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.gift_id = 0;
                object.num = 0;
              }
              if (message.gift_id != null && message.hasOwnProperty("gift_id")) object.gift_id = message.gift_id;
              if (message.num != null && message.hasOwnProperty("num")) object.num = message.num;
              return object;
            }; /**
               * Converts this ReqAKeyUseGift to JSON.
               * @function toJSON
               * @memberof m_proto.ReqAKeyUseGift
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqAKeyUseGift.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqAKeyUseGift
               * @function getTypeUrl
               * @memberof m_proto.ReqAKeyUseGift
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqAKeyUseGift.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqAKeyUseGift";
            };
            return ReqAKeyUseGift;
          }();
          m_proto.ResAKeyUseGift = function () {
            /**
            * Properties of a ResAKeyUseGift.
            * @memberof m_proto
            * @interface IResAKeyUseGift
            * @property {number|null} [code] ResAKeyUseGift code
            */ /**
               * Constructs a new ResAKeyUseGift.
               * @memberof m_proto
               * @classdesc Represents a ResAKeyUseGift.
               * @implements IResAKeyUseGift
               * @constructor
               * @param {m_proto.IResAKeyUseGift=} [properties] Properties to set
               */
            function ResAKeyUseGift(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResAKeyUseGift code.
              * @member {number} code
              * @memberof m_proto.ResAKeyUseGift
              * @instance
              */
            ResAKeyUseGift.prototype.code = 0; /**
                                               * Creates a new ResAKeyUseGift instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ResAKeyUseGift
                                               * @static
                                               * @param {m_proto.IResAKeyUseGift=} [properties] Properties to set
                                               * @returns {m_proto.ResAKeyUseGift} ResAKeyUseGift instance
                                               */
            ResAKeyUseGift.create = function create(properties) {
              return new ResAKeyUseGift(properties);
            }; /**
               * Encodes the specified ResAKeyUseGift message. Does not implicitly {@link m_proto.ResAKeyUseGift.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {m_proto.IResAKeyUseGift} message ResAKeyUseGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAKeyUseGift.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResAKeyUseGift message, length delimited. Does not implicitly {@link m_proto.ResAKeyUseGift.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {m_proto.IResAKeyUseGift} message ResAKeyUseGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAKeyUseGift.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResAKeyUseGift message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResAKeyUseGift} ResAKeyUseGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAKeyUseGift.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResAKeyUseGift();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResAKeyUseGift message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResAKeyUseGift} ResAKeyUseGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAKeyUseGift.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResAKeyUseGift message.
               * @function verify
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResAKeyUseGift.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResAKeyUseGift message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResAKeyUseGift} ResAKeyUseGift
               */
            ResAKeyUseGift.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResAKeyUseGift) return object;
              var message = new $root.m_proto.ResAKeyUseGift();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResAKeyUseGift message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {m_proto.ResAKeyUseGift} message ResAKeyUseGift
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResAKeyUseGift.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResAKeyUseGift to JSON.
               * @function toJSON
               * @memberof m_proto.ResAKeyUseGift
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResAKeyUseGift.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResAKeyUseGift
               * @function getTypeUrl
               * @memberof m_proto.ResAKeyUseGift
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResAKeyUseGift.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResAKeyUseGift";
            };
            return ResAKeyUseGift;
          }();
          m_proto.ReqUseOptionalGift = function () {
            /**
            * Properties of a ReqUseOptionalGift.
            * @memberof m_proto
            * @interface IReqUseOptionalGift
            * @property {number|null} [gift_id] ReqUseOptionalGift gift_id
            * @property {number|null} [num] ReqUseOptionalGift num
            * @property {number|null} [index] ReqUseOptionalGift index
            */ /**
               * Constructs a new ReqUseOptionalGift.
               * @memberof m_proto
               * @classdesc Represents a ReqUseOptionalGift.
               * @implements IReqUseOptionalGift
               * @constructor
               * @param {m_proto.IReqUseOptionalGift=} [properties] Properties to set
               */
            function ReqUseOptionalGift(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUseOptionalGift gift_id.
              * @member {number} gift_id
              * @memberof m_proto.ReqUseOptionalGift
              * @instance
              */
            ReqUseOptionalGift.prototype.gift_id = 0; /**
                                                      * ReqUseOptionalGift num.
                                                      * @member {number} num
                                                      * @memberof m_proto.ReqUseOptionalGift
                                                      * @instance
                                                      */
            ReqUseOptionalGift.prototype.num = 0; /**
                                                  * ReqUseOptionalGift index.
                                                  * @member {number} index
                                                  * @memberof m_proto.ReqUseOptionalGift
                                                  * @instance
                                                  */
            ReqUseOptionalGift.prototype.index = 0; /**
                                                    * Creates a new ReqUseOptionalGift instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ReqUseOptionalGift
                                                    * @static
                                                    * @param {m_proto.IReqUseOptionalGift=} [properties] Properties to set
                                                    * @returns {m_proto.ReqUseOptionalGift} ReqUseOptionalGift instance
                                                    */
            ReqUseOptionalGift.create = function create(properties) {
              return new ReqUseOptionalGift(properties);
            }; /**
               * Encodes the specified ReqUseOptionalGift message. Does not implicitly {@link m_proto.ReqUseOptionalGift.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {m_proto.IReqUseOptionalGift} message ReqUseOptionalGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUseOptionalGift.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.gift_id != null && Object.hasOwnProperty.call(message, "gift_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.gift_id);
              if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.num);
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.index);
              return writer;
            }; /**
               * Encodes the specified ReqUseOptionalGift message, length delimited. Does not implicitly {@link m_proto.ReqUseOptionalGift.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {m_proto.IReqUseOptionalGift} message ReqUseOptionalGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUseOptionalGift.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUseOptionalGift message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUseOptionalGift} ReqUseOptionalGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUseOptionalGift.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUseOptionalGift();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.gift_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.num = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUseOptionalGift message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUseOptionalGift} ReqUseOptionalGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUseOptionalGift.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUseOptionalGift message.
               * @function verify
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUseOptionalGift.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.gift_id != null && message.hasOwnProperty("gift_id")) if (!$util.isInteger(message.gift_id)) return "gift_id: integer expected";
              if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num)) return "num: integer expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              return null;
            }; /**
               * Creates a ReqUseOptionalGift message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUseOptionalGift} ReqUseOptionalGift
               */
            ReqUseOptionalGift.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUseOptionalGift) return object;
              var message = new $root.m_proto.ReqUseOptionalGift();
              if (object.gift_id != null) message.gift_id = object.gift_id | 0;
              if (object.num != null) message.num = object.num | 0;
              if (object.index != null) message.index = object.index | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUseOptionalGift message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {m_proto.ReqUseOptionalGift} message ReqUseOptionalGift
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUseOptionalGift.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.gift_id = 0;
                object.num = 0;
                object.index = 0;
              }
              if (message.gift_id != null && message.hasOwnProperty("gift_id")) object.gift_id = message.gift_id;
              if (message.num != null && message.hasOwnProperty("num")) object.num = message.num;
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              return object;
            }; /**
               * Converts this ReqUseOptionalGift to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUseOptionalGift
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUseOptionalGift.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUseOptionalGift
               * @function getTypeUrl
               * @memberof m_proto.ReqUseOptionalGift
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUseOptionalGift.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUseOptionalGift";
            };
            return ReqUseOptionalGift;
          }();
          m_proto.ResUseOptionalGift = function () {
            /**
            * Properties of a ResUseOptionalGift.
            * @memberof m_proto
            * @interface IResUseOptionalGift
            * @property {number|null} [code] ResUseOptionalGift code
            */ /**
               * Constructs a new ResUseOptionalGift.
               * @memberof m_proto
               * @classdesc Represents a ResUseOptionalGift.
               * @implements IResUseOptionalGift
               * @constructor
               * @param {m_proto.IResUseOptionalGift=} [properties] Properties to set
               */
            function ResUseOptionalGift(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUseOptionalGift code.
              * @member {number} code
              * @memberof m_proto.ResUseOptionalGift
              * @instance
              */
            ResUseOptionalGift.prototype.code = 0; /**
                                                   * Creates a new ResUseOptionalGift instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResUseOptionalGift
                                                   * @static
                                                   * @param {m_proto.IResUseOptionalGift=} [properties] Properties to set
                                                   * @returns {m_proto.ResUseOptionalGift} ResUseOptionalGift instance
                                                   */
            ResUseOptionalGift.create = function create(properties) {
              return new ResUseOptionalGift(properties);
            }; /**
               * Encodes the specified ResUseOptionalGift message. Does not implicitly {@link m_proto.ResUseOptionalGift.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {m_proto.IResUseOptionalGift} message ResUseOptionalGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUseOptionalGift.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResUseOptionalGift message, length delimited. Does not implicitly {@link m_proto.ResUseOptionalGift.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {m_proto.IResUseOptionalGift} message ResUseOptionalGift message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUseOptionalGift.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUseOptionalGift message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUseOptionalGift} ResUseOptionalGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUseOptionalGift.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUseOptionalGift();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUseOptionalGift message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUseOptionalGift} ResUseOptionalGift
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUseOptionalGift.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUseOptionalGift message.
               * @function verify
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUseOptionalGift.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResUseOptionalGift message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUseOptionalGift} ResUseOptionalGift
               */
            ResUseOptionalGift.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUseOptionalGift) return object;
              var message = new $root.m_proto.ResUseOptionalGift();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUseOptionalGift message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {m_proto.ResUseOptionalGift} message ResUseOptionalGift
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUseOptionalGift.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResUseOptionalGift to JSON.
               * @function toJSON
               * @memberof m_proto.ResUseOptionalGift
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUseOptionalGift.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUseOptionalGift
               * @function getTypeUrl
               * @memberof m_proto.ResUseOptionalGift
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUseOptionalGift.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUseOptionalGift";
            };
            return ResUseOptionalGift;
          }();
          m_proto.ReqFragmentCombine = function () {
            /**
            * Properties of a ReqFragmentCombine.
            * @memberof m_proto
            * @interface IReqFragmentCombine
            * @property {number|null} [item_id] ReqFragmentCombine item_id
            * @property {number|null} [num] ReqFragmentCombine num
            */ /**
               * Constructs a new ReqFragmentCombine.
               * @memberof m_proto
               * @classdesc Represents a ReqFragmentCombine.
               * @implements IReqFragmentCombine
               * @constructor
               * @param {m_proto.IReqFragmentCombine=} [properties] Properties to set
               */
            function ReqFragmentCombine(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqFragmentCombine item_id.
              * @member {number} item_id
              * @memberof m_proto.ReqFragmentCombine
              * @instance
              */
            ReqFragmentCombine.prototype.item_id = 0; /**
                                                      * ReqFragmentCombine num.
                                                      * @member {number} num
                                                      * @memberof m_proto.ReqFragmentCombine
                                                      * @instance
                                                      */
            ReqFragmentCombine.prototype.num = 0; /**
                                                  * Creates a new ReqFragmentCombine instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ReqFragmentCombine
                                                  * @static
                                                  * @param {m_proto.IReqFragmentCombine=} [properties] Properties to set
                                                  * @returns {m_proto.ReqFragmentCombine} ReqFragmentCombine instance
                                                  */
            ReqFragmentCombine.create = function create(properties) {
              return new ReqFragmentCombine(properties);
            }; /**
               * Encodes the specified ReqFragmentCombine message. Does not implicitly {@link m_proto.ReqFragmentCombine.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {m_proto.IReqFragmentCombine} message ReqFragmentCombine message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFragmentCombine.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.item_id);
              if (message.num != null && Object.hasOwnProperty.call(message, "num")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.num);
              return writer;
            }; /**
               * Encodes the specified ReqFragmentCombine message, length delimited. Does not implicitly {@link m_proto.ReqFragmentCombine.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {m_proto.IReqFragmentCombine} message ReqFragmentCombine message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFragmentCombine.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqFragmentCombine message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqFragmentCombine} ReqFragmentCombine
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFragmentCombine.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqFragmentCombine();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.item_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.num = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqFragmentCombine message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqFragmentCombine} ReqFragmentCombine
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFragmentCombine.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqFragmentCombine message.
               * @function verify
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqFragmentCombine.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.item_id != null && message.hasOwnProperty("item_id")) if (!$util.isInteger(message.item_id)) return "item_id: integer expected";
              if (message.num != null && message.hasOwnProperty("num")) if (!$util.isInteger(message.num)) return "num: integer expected";
              return null;
            }; /**
               * Creates a ReqFragmentCombine message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqFragmentCombine} ReqFragmentCombine
               */
            ReqFragmentCombine.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqFragmentCombine) return object;
              var message = new $root.m_proto.ReqFragmentCombine();
              if (object.item_id != null) message.item_id = object.item_id | 0;
              if (object.num != null) message.num = object.num | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqFragmentCombine message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {m_proto.ReqFragmentCombine} message ReqFragmentCombine
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqFragmentCombine.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.item_id = 0;
                object.num = 0;
              }
              if (message.item_id != null && message.hasOwnProperty("item_id")) object.item_id = message.item_id;
              if (message.num != null && message.hasOwnProperty("num")) object.num = message.num;
              return object;
            }; /**
               * Converts this ReqFragmentCombine to JSON.
               * @function toJSON
               * @memberof m_proto.ReqFragmentCombine
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqFragmentCombine.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqFragmentCombine
               * @function getTypeUrl
               * @memberof m_proto.ReqFragmentCombine
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqFragmentCombine.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqFragmentCombine";
            };
            return ReqFragmentCombine;
          }();
          m_proto.ResFragmentCombine = function () {
            /**
            * Properties of a ResFragmentCombine.
            * @memberof m_proto
            * @interface IResFragmentCombine
            * @property {number|null} [code] ResFragmentCombine code
            */ /**
               * Constructs a new ResFragmentCombine.
               * @memberof m_proto
               * @classdesc Represents a ResFragmentCombine.
               * @implements IResFragmentCombine
               * @constructor
               * @param {m_proto.IResFragmentCombine=} [properties] Properties to set
               */
            function ResFragmentCombine(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResFragmentCombine code.
              * @member {number} code
              * @memberof m_proto.ResFragmentCombine
              * @instance
              */
            ResFragmentCombine.prototype.code = 0; /**
                                                   * Creates a new ResFragmentCombine instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResFragmentCombine
                                                   * @static
                                                   * @param {m_proto.IResFragmentCombine=} [properties] Properties to set
                                                   * @returns {m_proto.ResFragmentCombine} ResFragmentCombine instance
                                                   */
            ResFragmentCombine.create = function create(properties) {
              return new ResFragmentCombine(properties);
            }; /**
               * Encodes the specified ResFragmentCombine message. Does not implicitly {@link m_proto.ResFragmentCombine.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {m_proto.IResFragmentCombine} message ResFragmentCombine message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFragmentCombine.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResFragmentCombine message, length delimited. Does not implicitly {@link m_proto.ResFragmentCombine.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {m_proto.IResFragmentCombine} message ResFragmentCombine message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFragmentCombine.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResFragmentCombine message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResFragmentCombine} ResFragmentCombine
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFragmentCombine.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResFragmentCombine();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResFragmentCombine message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResFragmentCombine} ResFragmentCombine
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFragmentCombine.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResFragmentCombine message.
               * @function verify
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResFragmentCombine.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResFragmentCombine message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResFragmentCombine} ResFragmentCombine
               */
            ResFragmentCombine.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResFragmentCombine) return object;
              var message = new $root.m_proto.ResFragmentCombine();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResFragmentCombine message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {m_proto.ResFragmentCombine} message ResFragmentCombine
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResFragmentCombine.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResFragmentCombine to JSON.
               * @function toJSON
               * @memberof m_proto.ResFragmentCombine
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResFragmentCombine.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResFragmentCombine
               * @function getTypeUrl
               * @memberof m_proto.ResFragmentCombine
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResFragmentCombine.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResFragmentCombine";
            };
            return ResFragmentCombine;
          }();
          m_proto.ResPermanentDataChange = function () {
            /**
            * Properties of a ResPermanentDataChange.
            * @memberof m_proto
            * @interface IResPermanentDataChange
            * @property {number|null} [code] ResPermanentDataChange code
            * @property {string|null} [attrname] ResPermanentDataChange attrname
            * @property {number|null} [attrvalue] ResPermanentDataChange attrvalue
            */ /**
               * Constructs a new ResPermanentDataChange.
               * @memberof m_proto
               * @classdesc Represents a ResPermanentDataChange.
               * @implements IResPermanentDataChange
               * @constructor
               * @param {m_proto.IResPermanentDataChange=} [properties] Properties to set
               */
            function ResPermanentDataChange(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResPermanentDataChange code.
              * @member {number} code
              * @memberof m_proto.ResPermanentDataChange
              * @instance
              */
            ResPermanentDataChange.prototype.code = 0; /**
                                                       * ResPermanentDataChange attrname.
                                                       * @member {string} attrname
                                                       * @memberof m_proto.ResPermanentDataChange
                                                       * @instance
                                                       */
            ResPermanentDataChange.prototype.attrname = ""; /**
                                                            * ResPermanentDataChange attrvalue.
                                                            * @member {number} attrvalue
                                                            * @memberof m_proto.ResPermanentDataChange
                                                            * @instance
                                                            */
            ResPermanentDataChange.prototype.attrvalue = 0; /**
                                                            * Creates a new ResPermanentDataChange instance using the specified properties.
                                                            * @function create
                                                            * @memberof m_proto.ResPermanentDataChange
                                                            * @static
                                                            * @param {m_proto.IResPermanentDataChange=} [properties] Properties to set
                                                            * @returns {m_proto.ResPermanentDataChange} ResPermanentDataChange instance
                                                            */
            ResPermanentDataChange.create = function create(properties) {
              return new ResPermanentDataChange(properties);
            }; /**
               * Encodes the specified ResPermanentDataChange message. Does not implicitly {@link m_proto.ResPermanentDataChange.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {m_proto.IResPermanentDataChange} message ResPermanentDataChange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResPermanentDataChange.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.attrname != null && Object.hasOwnProperty.call(message, "attrname")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.attrname);
              if (message.attrvalue != null && Object.hasOwnProperty.call(message, "attrvalue")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.attrvalue);
              return writer;
            }; /**
               * Encodes the specified ResPermanentDataChange message, length delimited. Does not implicitly {@link m_proto.ResPermanentDataChange.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {m_proto.IResPermanentDataChange} message ResPermanentDataChange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResPermanentDataChange.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResPermanentDataChange message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResPermanentDataChange} ResPermanentDataChange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResPermanentDataChange.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResPermanentDataChange();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.attrname = reader.string();
                      break;
                    }
                  case 3:
                    {
                      message.attrvalue = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResPermanentDataChange message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResPermanentDataChange} ResPermanentDataChange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResPermanentDataChange.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResPermanentDataChange message.
               * @function verify
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResPermanentDataChange.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.attrname != null && message.hasOwnProperty("attrname")) if (!$util.isString(message.attrname)) return "attrname: string expected";
              if (message.attrvalue != null && message.hasOwnProperty("attrvalue")) if (!$util.isInteger(message.attrvalue)) return "attrvalue: integer expected";
              return null;
            }; /**
               * Creates a ResPermanentDataChange message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResPermanentDataChange} ResPermanentDataChange
               */
            ResPermanentDataChange.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResPermanentDataChange) return object;
              var message = new $root.m_proto.ResPermanentDataChange();
              if (object.code != null) message.code = object.code | 0;
              if (object.attrname != null) message.attrname = String(object.attrname);
              if (object.attrvalue != null) message.attrvalue = object.attrvalue | 0;
              return message;
            }; /**
               * Creates a plain object from a ResPermanentDataChange message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {m_proto.ResPermanentDataChange} message ResPermanentDataChange
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResPermanentDataChange.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.attrname = "";
                object.attrvalue = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.attrname != null && message.hasOwnProperty("attrname")) object.attrname = message.attrname;
              if (message.attrvalue != null && message.hasOwnProperty("attrvalue")) object.attrvalue = message.attrvalue;
              return object;
            }; /**
               * Converts this ResPermanentDataChange to JSON.
               * @function toJSON
               * @memberof m_proto.ResPermanentDataChange
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResPermanentDataChange.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResPermanentDataChange
               * @function getTypeUrl
               * @memberof m_proto.ResPermanentDataChange
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResPermanentDataChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResPermanentDataChange";
            };
            return ResPermanentDataChange;
          }();
          m_proto.ReqLoadBuilding = function () {
            /**
            * Properties of a ReqLoadBuilding.
            * @memberof m_proto
            * @interface IReqLoadBuilding
            */ /**
               * Constructs a new ReqLoadBuilding.
               * @memberof m_proto
               * @classdesc Represents a ReqLoadBuilding.
               * @implements IReqLoadBuilding
               * @constructor
               * @param {m_proto.IReqLoadBuilding=} [properties] Properties to set
               */
            function ReqLoadBuilding(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqLoadBuilding instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqLoadBuilding
              * @static
              * @param {m_proto.IReqLoadBuilding=} [properties] Properties to set
              * @returns {m_proto.ReqLoadBuilding} ReqLoadBuilding instance
              */
            ReqLoadBuilding.create = function create(properties) {
              return new ReqLoadBuilding(properties);
            }; /**
               * Encodes the specified ReqLoadBuilding message. Does not implicitly {@link m_proto.ReqLoadBuilding.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {m_proto.IReqLoadBuilding} message ReqLoadBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLoadBuilding.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqLoadBuilding message, length delimited. Does not implicitly {@link m_proto.ReqLoadBuilding.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {m_proto.IReqLoadBuilding} message ReqLoadBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLoadBuilding.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqLoadBuilding message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqLoadBuilding} ReqLoadBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLoadBuilding.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqLoadBuilding();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqLoadBuilding message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqLoadBuilding} ReqLoadBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLoadBuilding.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqLoadBuilding message.
               * @function verify
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqLoadBuilding.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqLoadBuilding message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqLoadBuilding} ReqLoadBuilding
               */
            ReqLoadBuilding.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqLoadBuilding) return object;
              return new $root.m_proto.ReqLoadBuilding();
            }; /**
               * Creates a plain object from a ReqLoadBuilding message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {m_proto.ReqLoadBuilding} message ReqLoadBuilding
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqLoadBuilding.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqLoadBuilding to JSON.
               * @function toJSON
               * @memberof m_proto.ReqLoadBuilding
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqLoadBuilding.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqLoadBuilding
               * @function getTypeUrl
               * @memberof m_proto.ReqLoadBuilding
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqLoadBuilding.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqLoadBuilding";
            };
            return ReqLoadBuilding;
          }();
          m_proto.ResLoadBuilding = function () {
            /**
            * Properties of a ResLoadBuilding.
            * @memberof m_proto
            * @interface IResLoadBuilding
            * @property {number|null} [code] ResLoadBuilding code
            * @property {Array.<m_proto.IBuildingData>|null} [buildings] ResLoadBuilding buildings
            */ /**
               * Constructs a new ResLoadBuilding.
               * @memberof m_proto
               * @classdesc Represents a ResLoadBuilding.
               * @implements IResLoadBuilding
               * @constructor
               * @param {m_proto.IResLoadBuilding=} [properties] Properties to set
               */
            function ResLoadBuilding(properties) {
              this.buildings = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResLoadBuilding code.
              * @member {number} code
              * @memberof m_proto.ResLoadBuilding
              * @instance
              */
            ResLoadBuilding.prototype.code = 0; /**
                                                * ResLoadBuilding buildings.
                                                * @member {Array.<m_proto.IBuildingData>} buildings
                                                * @memberof m_proto.ResLoadBuilding
                                                * @instance
                                                */
            ResLoadBuilding.prototype.buildings = $util.emptyArray; /**
                                                                    * Creates a new ResLoadBuilding instance using the specified properties.
                                                                    * @function create
                                                                    * @memberof m_proto.ResLoadBuilding
                                                                    * @static
                                                                    * @param {m_proto.IResLoadBuilding=} [properties] Properties to set
                                                                    * @returns {m_proto.ResLoadBuilding} ResLoadBuilding instance
                                                                    */
            ResLoadBuilding.create = function create(properties) {
              return new ResLoadBuilding(properties);
            }; /**
               * Encodes the specified ResLoadBuilding message. Does not implicitly {@link m_proto.ResLoadBuilding.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {m_proto.IResLoadBuilding} message ResLoadBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLoadBuilding.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.buildings != null && message.buildings.length) for (var i = 0; i < message.buildings.length; ++i) $root.m_proto.BuildingData.encode(message.buildings[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResLoadBuilding message, length delimited. Does not implicitly {@link m_proto.ResLoadBuilding.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {m_proto.IResLoadBuilding} message ResLoadBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLoadBuilding.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResLoadBuilding message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResLoadBuilding} ResLoadBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLoadBuilding.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResLoadBuilding();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.buildings && message.buildings.length)) message.buildings = [];
                      message.buildings.push($root.m_proto.BuildingData.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResLoadBuilding message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResLoadBuilding} ResLoadBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLoadBuilding.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResLoadBuilding message.
               * @function verify
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResLoadBuilding.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.buildings != null && message.hasOwnProperty("buildings")) {
                if (!Array.isArray(message.buildings)) return "buildings: array expected";
                for (var i = 0; i < message.buildings.length; ++i) {
                  var error = $root.m_proto.BuildingData.verify(message.buildings[i]);
                  if (error) return "buildings." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResLoadBuilding message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResLoadBuilding} ResLoadBuilding
               */
            ResLoadBuilding.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResLoadBuilding) return object;
              var message = new $root.m_proto.ResLoadBuilding();
              if (object.code != null) message.code = object.code | 0;
              if (object.buildings) {
                if (!Array.isArray(object.buildings)) throw TypeError(".m_proto.ResLoadBuilding.buildings: array expected");
                message.buildings = [];
                for (var i = 0; i < object.buildings.length; ++i) {
                  if (typeof object.buildings[i] !== "object") throw TypeError(".m_proto.ResLoadBuilding.buildings: object expected");
                  message.buildings[i] = $root.m_proto.BuildingData.fromObject(object.buildings[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResLoadBuilding message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {m_proto.ResLoadBuilding} message ResLoadBuilding
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResLoadBuilding.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.buildings = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.buildings && message.buildings.length) {
                object.buildings = [];
                for (var j = 0; j < message.buildings.length; ++j) object.buildings[j] = $root.m_proto.BuildingData.toObject(message.buildings[j], options);
              }
              return object;
            }; /**
               * Converts this ResLoadBuilding to JSON.
               * @function toJSON
               * @memberof m_proto.ResLoadBuilding
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResLoadBuilding.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResLoadBuilding
               * @function getTypeUrl
               * @memberof m_proto.ResLoadBuilding
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResLoadBuilding.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResLoadBuilding";
            };
            return ResLoadBuilding;
          }();
          m_proto.BuildingData = function () {
            /**
            * Properties of a BuildingData.
            * @memberof m_proto
            * @interface IBuildingData
            * @property {number|null} [building_uid] BuildingData building_uid
            * @property {number|null} [building_id] BuildingData building_id
            * @property {number|null} [building_level] BuildingData building_level
            * @property {number|null} [upgrade_duration] BuildingData upgrade_duration
            * @property {number|null} [entry_hero] BuildingData entry_hero
            * @property {Array.<m_proto.ISheBeiData>|null} [shebeis] BuildingData shebeis
            * @property {number|null} [total_people] BuildingData total_people
            * @property {number|null} [train_count] BuildingData train_count
            * @property {Array.<m_proto.IServicePerson>|null} [services] BuildingData services
            * @property {Array.<m_proto.IItem>|null} [ziyuans] BuildingData ziyuans
            * @property {number|null} [sid] BuildingData sid
            * @property {Array.<m_proto.ITaskData>|null} [tasks] BuildingData tasks
            * @property {number|null} [reserve_count] BuildingData reserve_count
            */ /**
               * Constructs a new BuildingData.
               * @memberof m_proto
               * @classdesc Represents a BuildingData.
               * @implements IBuildingData
               * @constructor
               * @param {m_proto.IBuildingData=} [properties] Properties to set
               */
            function BuildingData(properties) {
              this.shebeis = [];
              this.services = [];
              this.ziyuans = [];
              this.tasks = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * BuildingData building_uid.
              * @member {number} building_uid
              * @memberof m_proto.BuildingData
              * @instance
              */
            BuildingData.prototype.building_uid = 0; /**
                                                     * BuildingData building_id.
                                                     * @member {number} building_id
                                                     * @memberof m_proto.BuildingData
                                                     * @instance
                                                     */
            BuildingData.prototype.building_id = 0; /**
                                                    * BuildingData building_level.
                                                    * @member {number} building_level
                                                    * @memberof m_proto.BuildingData
                                                    * @instance
                                                    */
            BuildingData.prototype.building_level = 0; /**
                                                       * BuildingData upgrade_duration.
                                                       * @member {number} upgrade_duration
                                                       * @memberof m_proto.BuildingData
                                                       * @instance
                                                       */
            BuildingData.prototype.upgrade_duration = 0; /**
                                                         * BuildingData entry_hero.
                                                         * @member {number} entry_hero
                                                         * @memberof m_proto.BuildingData
                                                         * @instance
                                                         */
            BuildingData.prototype.entry_hero = 0; /**
                                                   * BuildingData shebeis.
                                                   * @member {Array.<m_proto.ISheBeiData>} shebeis
                                                   * @memberof m_proto.BuildingData
                                                   * @instance
                                                   */
            BuildingData.prototype.shebeis = $util.emptyArray; /**
                                                               * BuildingData total_people.
                                                               * @member {number} total_people
                                                               * @memberof m_proto.BuildingData
                                                               * @instance
                                                               */
            BuildingData.prototype.total_people = 0; /**
                                                     * BuildingData train_count.
                                                     * @member {number} train_count
                                                     * @memberof m_proto.BuildingData
                                                     * @instance
                                                     */
            BuildingData.prototype.train_count = 0; /**
                                                    * BuildingData services.
                                                    * @member {Array.<m_proto.IServicePerson>} services
                                                    * @memberof m_proto.BuildingData
                                                    * @instance
                                                    */
            BuildingData.prototype.services = $util.emptyArray; /**
                                                                * BuildingData ziyuans.
                                                                * @member {Array.<m_proto.IItem>} ziyuans
                                                                * @memberof m_proto.BuildingData
                                                                * @instance
                                                                */
            BuildingData.prototype.ziyuans = $util.emptyArray; /**
                                                               * BuildingData sid.
                                                               * @member {number} sid
                                                               * @memberof m_proto.BuildingData
                                                               * @instance
                                                               */
            BuildingData.prototype.sid = 0; /**
                                            * BuildingData tasks.
                                            * @member {Array.<m_proto.ITaskData>} tasks
                                            * @memberof m_proto.BuildingData
                                            * @instance
                                            */
            BuildingData.prototype.tasks = $util.emptyArray; /**
                                                             * BuildingData reserve_count.
                                                             * @member {number} reserve_count
                                                             * @memberof m_proto.BuildingData
                                                             * @instance
                                                             */
            BuildingData.prototype.reserve_count = 0; /**
                                                      * Creates a new BuildingData instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.BuildingData
                                                      * @static
                                                      * @param {m_proto.IBuildingData=} [properties] Properties to set
                                                      * @returns {m_proto.BuildingData} BuildingData instance
                                                      */
            BuildingData.create = function create(properties) {
              return new BuildingData(properties);
            }; /**
               * Encodes the specified BuildingData message. Does not implicitly {@link m_proto.BuildingData.verify|verify} messages.
               * @function encode
               * @memberof m_proto.BuildingData
               * @static
               * @param {m_proto.IBuildingData} message BuildingData message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BuildingData.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              if (message.building_level != null && Object.hasOwnProperty.call(message, "building_level")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_level);
              if (message.upgrade_duration != null && Object.hasOwnProperty.call(message, "upgrade_duration")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.upgrade_duration);
              if (message.entry_hero != null && Object.hasOwnProperty.call(message, "entry_hero")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.entry_hero);
              if (message.shebeis != null && message.shebeis.length) for (var i = 0; i < message.shebeis.length; ++i) $root.m_proto.SheBeiData.encode(message.shebeis[i], writer.uint32( /* id 6, wireType 2 =*/50).fork()).ldelim();
              if (message.total_people != null && Object.hasOwnProperty.call(message, "total_people")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.total_people);
              if (message.train_count != null && Object.hasOwnProperty.call(message, "train_count")) writer.uint32( /* id 8, wireType 0 =*/64).int32(message.train_count);
              if (message.services != null && message.services.length) for (var i = 0; i < message.services.length; ++i) $root.m_proto.ServicePerson.encode(message.services[i], writer.uint32( /* id 9, wireType 2 =*/74).fork()).ldelim();
              if (message.ziyuans != null && message.ziyuans.length) for (var i = 0; i < message.ziyuans.length; ++i) $root.m_proto.Item.encode(message.ziyuans[i], writer.uint32( /* id 10, wireType 2 =*/82).fork()).ldelim();
              if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32( /* id 11, wireType 0 =*/88).int32(message.sid);
              if (message.tasks != null && message.tasks.length) for (var i = 0; i < message.tasks.length; ++i) $root.m_proto.TaskData.encode(message.tasks[i], writer.uint32( /* id 12, wireType 2 =*/98).fork()).ldelim();
              if (message.reserve_count != null && Object.hasOwnProperty.call(message, "reserve_count")) writer.uint32( /* id 13, wireType 0 =*/104).int32(message.reserve_count);
              return writer;
            }; /**
               * Encodes the specified BuildingData message, length delimited. Does not implicitly {@link m_proto.BuildingData.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.BuildingData
               * @static
               * @param {m_proto.IBuildingData} message BuildingData message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BuildingData.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a BuildingData message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.BuildingData
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.BuildingData} BuildingData
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BuildingData.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.BuildingData();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_level = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.upgrade_duration = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.entry_hero = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      if (!(message.shebeis && message.shebeis.length)) message.shebeis = [];
                      message.shebeis.push($root.m_proto.SheBeiData.decode(reader, reader.uint32()));
                      break;
                    }
                  case 7:
                    {
                      message.total_people = reader.int32();
                      break;
                    }
                  case 8:
                    {
                      message.train_count = reader.int32();
                      break;
                    }
                  case 9:
                    {
                      if (!(message.services && message.services.length)) message.services = [];
                      message.services.push($root.m_proto.ServicePerson.decode(reader, reader.uint32()));
                      break;
                    }
                  case 10:
                    {
                      if (!(message.ziyuans && message.ziyuans.length)) message.ziyuans = [];
                      message.ziyuans.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  case 11:
                    {
                      message.sid = reader.int32();
                      break;
                    }
                  case 12:
                    {
                      if (!(message.tasks && message.tasks.length)) message.tasks = [];
                      message.tasks.push($root.m_proto.TaskData.decode(reader, reader.uint32()));
                      break;
                    }
                  case 13:
                    {
                      message.reserve_count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a BuildingData message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.BuildingData
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.BuildingData} BuildingData
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BuildingData.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a BuildingData message.
               * @function verify
               * @memberof m_proto.BuildingData
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            BuildingData.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.building_level != null && message.hasOwnProperty("building_level")) if (!$util.isInteger(message.building_level)) return "building_level: integer expected";
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) if (!$util.isInteger(message.upgrade_duration)) return "upgrade_duration: integer expected";
              if (message.entry_hero != null && message.hasOwnProperty("entry_hero")) if (!$util.isInteger(message.entry_hero)) return "entry_hero: integer expected";
              if (message.shebeis != null && message.hasOwnProperty("shebeis")) {
                if (!Array.isArray(message.shebeis)) return "shebeis: array expected";
                for (var i = 0; i < message.shebeis.length; ++i) {
                  var error = $root.m_proto.SheBeiData.verify(message.shebeis[i]);
                  if (error) return "shebeis." + error;
                }
              }
              if (message.total_people != null && message.hasOwnProperty("total_people")) if (!$util.isInteger(message.total_people)) return "total_people: integer expected";
              if (message.train_count != null && message.hasOwnProperty("train_count")) if (!$util.isInteger(message.train_count)) return "train_count: integer expected";
              if (message.services != null && message.hasOwnProperty("services")) {
                if (!Array.isArray(message.services)) return "services: array expected";
                for (var i = 0; i < message.services.length; ++i) {
                  var error = $root.m_proto.ServicePerson.verify(message.services[i]);
                  if (error) return "services." + error;
                }
              }
              if (message.ziyuans != null && message.hasOwnProperty("ziyuans")) {
                if (!Array.isArray(message.ziyuans)) return "ziyuans: array expected";
                for (var i = 0; i < message.ziyuans.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.ziyuans[i]);
                  if (error) return "ziyuans." + error;
                }
              }
              if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isInteger(message.sid)) return "sid: integer expected";
              if (message.tasks != null && message.hasOwnProperty("tasks")) {
                if (!Array.isArray(message.tasks)) return "tasks: array expected";
                for (var i = 0; i < message.tasks.length; ++i) {
                  var error = $root.m_proto.TaskData.verify(message.tasks[i]);
                  if (error) return "tasks." + error;
                }
              }
              if (message.reserve_count != null && message.hasOwnProperty("reserve_count")) if (!$util.isInteger(message.reserve_count)) return "reserve_count: integer expected";
              return null;
            }; /**
               * Creates a BuildingData message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.BuildingData
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.BuildingData} BuildingData
               */
            BuildingData.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.BuildingData) return object;
              var message = new $root.m_proto.BuildingData();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.building_level != null) message.building_level = object.building_level | 0;
              if (object.upgrade_duration != null) message.upgrade_duration = object.upgrade_duration | 0;
              if (object.entry_hero != null) message.entry_hero = object.entry_hero | 0;
              if (object.shebeis) {
                if (!Array.isArray(object.shebeis)) throw TypeError(".m_proto.BuildingData.shebeis: array expected");
                message.shebeis = [];
                for (var i = 0; i < object.shebeis.length; ++i) {
                  if (typeof object.shebeis[i] !== "object") throw TypeError(".m_proto.BuildingData.shebeis: object expected");
                  message.shebeis[i] = $root.m_proto.SheBeiData.fromObject(object.shebeis[i]);
                }
              }
              if (object.total_people != null) message.total_people = object.total_people | 0;
              if (object.train_count != null) message.train_count = object.train_count | 0;
              if (object.services) {
                if (!Array.isArray(object.services)) throw TypeError(".m_proto.BuildingData.services: array expected");
                message.services = [];
                for (var i = 0; i < object.services.length; ++i) {
                  if (typeof object.services[i] !== "object") throw TypeError(".m_proto.BuildingData.services: object expected");
                  message.services[i] = $root.m_proto.ServicePerson.fromObject(object.services[i]);
                }
              }
              if (object.ziyuans) {
                if (!Array.isArray(object.ziyuans)) throw TypeError(".m_proto.BuildingData.ziyuans: array expected");
                message.ziyuans = [];
                for (var i = 0; i < object.ziyuans.length; ++i) {
                  if (typeof object.ziyuans[i] !== "object") throw TypeError(".m_proto.BuildingData.ziyuans: object expected");
                  message.ziyuans[i] = $root.m_proto.Item.fromObject(object.ziyuans[i]);
                }
              }
              if (object.sid != null) message.sid = object.sid | 0;
              if (object.tasks) {
                if (!Array.isArray(object.tasks)) throw TypeError(".m_proto.BuildingData.tasks: array expected");
                message.tasks = [];
                for (var i = 0; i < object.tasks.length; ++i) {
                  if (typeof object.tasks[i] !== "object") throw TypeError(".m_proto.BuildingData.tasks: object expected");
                  message.tasks[i] = $root.m_proto.TaskData.fromObject(object.tasks[i]);
                }
              }
              if (object.reserve_count != null) message.reserve_count = object.reserve_count | 0;
              return message;
            }; /**
               * Creates a plain object from a BuildingData message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.BuildingData
               * @static
               * @param {m_proto.BuildingData} message BuildingData
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            BuildingData.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) {
                object.shebeis = [];
                object.services = [];
                object.ziyuans = [];
                object.tasks = [];
              }
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
                object.building_level = 0;
                object.upgrade_duration = 0;
                object.entry_hero = 0;
                object.total_people = 0;
                object.train_count = 0;
                object.sid = 0;
                object.reserve_count = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.building_level != null && message.hasOwnProperty("building_level")) object.building_level = message.building_level;
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) object.upgrade_duration = message.upgrade_duration;
              if (message.entry_hero != null && message.hasOwnProperty("entry_hero")) object.entry_hero = message.entry_hero;
              if (message.shebeis && message.shebeis.length) {
                object.shebeis = [];
                for (var j = 0; j < message.shebeis.length; ++j) object.shebeis[j] = $root.m_proto.SheBeiData.toObject(message.shebeis[j], options);
              }
              if (message.total_people != null && message.hasOwnProperty("total_people")) object.total_people = message.total_people;
              if (message.train_count != null && message.hasOwnProperty("train_count")) object.train_count = message.train_count;
              if (message.services && message.services.length) {
                object.services = [];
                for (var j = 0; j < message.services.length; ++j) object.services[j] = $root.m_proto.ServicePerson.toObject(message.services[j], options);
              }
              if (message.ziyuans && message.ziyuans.length) {
                object.ziyuans = [];
                for (var j = 0; j < message.ziyuans.length; ++j) object.ziyuans[j] = $root.m_proto.Item.toObject(message.ziyuans[j], options);
              }
              if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid;
              if (message.tasks && message.tasks.length) {
                object.tasks = [];
                for (var j = 0; j < message.tasks.length; ++j) object.tasks[j] = $root.m_proto.TaskData.toObject(message.tasks[j], options);
              }
              if (message.reserve_count != null && message.hasOwnProperty("reserve_count")) object.reserve_count = message.reserve_count;
              return object;
            }; /**
               * Converts this BuildingData to JSON.
               * @function toJSON
               * @memberof m_proto.BuildingData
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            BuildingData.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for BuildingData
               * @function getTypeUrl
               * @memberof m_proto.BuildingData
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            BuildingData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.BuildingData";
            };
            return BuildingData;
          }();
          m_proto.TaskData = function () {
            /**
            * Properties of a TaskData.
            * @memberof m_proto
            * @interface ITaskData
            * @property {number|null} [task_id] TaskData task_id
            * @property {number|Long|null} [task_duration] TaskData task_duration
            * @property {number|null} [state] TaskData state
            */ /**
               * Constructs a new TaskData.
               * @memberof m_proto
               * @classdesc Represents a TaskData.
               * @implements ITaskData
               * @constructor
               * @param {m_proto.ITaskData=} [properties] Properties to set
               */
            function TaskData(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * TaskData task_id.
              * @member {number} task_id
              * @memberof m_proto.TaskData
              * @instance
              */
            TaskData.prototype.task_id = 0; /**
                                            * TaskData task_duration.
                                            * @member {number|Long} task_duration
                                            * @memberof m_proto.TaskData
                                            * @instance
                                            */
            TaskData.prototype.task_duration = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; /**
                                                                                                  * TaskData state.
                                                                                                  * @member {number} state
                                                                                                  * @memberof m_proto.TaskData
                                                                                                  * @instance
                                                                                                  */
            TaskData.prototype.state = 0; /**
                                          * Creates a new TaskData instance using the specified properties.
                                          * @function create
                                          * @memberof m_proto.TaskData
                                          * @static
                                          * @param {m_proto.ITaskData=} [properties] Properties to set
                                          * @returns {m_proto.TaskData} TaskData instance
                                          */
            TaskData.create = function create(properties) {
              return new TaskData(properties);
            }; /**
               * Encodes the specified TaskData message. Does not implicitly {@link m_proto.TaskData.verify|verify} messages.
               * @function encode
               * @memberof m_proto.TaskData
               * @static
               * @param {m_proto.ITaskData} message TaskData message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            TaskData.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.task_id);
              if (message.task_duration != null && Object.hasOwnProperty.call(message, "task_duration")) writer.uint32( /* id 2, wireType 0 =*/16).int64(message.task_duration);
              if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.state);
              return writer;
            }; /**
               * Encodes the specified TaskData message, length delimited. Does not implicitly {@link m_proto.TaskData.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.TaskData
               * @static
               * @param {m_proto.ITaskData} message TaskData message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            TaskData.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a TaskData message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.TaskData
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.TaskData} TaskData
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            TaskData.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.TaskData();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.task_duration = reader.int64();
                      break;
                    }
                  case 3:
                    {
                      message.state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a TaskData message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.TaskData
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.TaskData} TaskData
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            TaskData.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a TaskData message.
               * @function verify
               * @memberof m_proto.TaskData
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            TaskData.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              if (message.task_duration != null && message.hasOwnProperty("task_duration")) if (!$util.isInteger(message.task_duration) && !(message.task_duration && $util.isInteger(message.task_duration.low) && $util.isInteger(message.task_duration.high))) return "task_duration: integer|Long expected";
              if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state)) return "state: integer expected";
              return null;
            }; /**
               * Creates a TaskData message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.TaskData
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.TaskData} TaskData
               */
            TaskData.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.TaskData) return object;
              var message = new $root.m_proto.TaskData();
              if (object.task_id != null) message.task_id = object.task_id | 0;
              if (object.task_duration != null) if ($util.Long) (message.task_duration = $util.Long.fromValue(object.task_duration)).unsigned = false;else if (typeof object.task_duration === "string") message.task_duration = parseInt(object.task_duration, 10);else if (typeof object.task_duration === "number") message.task_duration = object.task_duration;else if (typeof object.task_duration === "object") message.task_duration = new $util.LongBits(object.task_duration.low >>> 0, object.task_duration.high >>> 0).toNumber();
              if (object.state != null) message.state = object.state | 0;
              return message;
            }; /**
               * Creates a plain object from a TaskData message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.TaskData
               * @static
               * @param {m_proto.TaskData} message TaskData
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            TaskData.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.task_id = 0;
                if ($util.Long) {
                  var _long = new $util.Long(0, 0, false);
                  object.task_duration = options.longs === String ? _long.toString() : options.longs === Number ? _long.toNumber() : _long;
                } else object.task_duration = options.longs === String ? "0" : 0;
                object.state = 0;
              }
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              if (message.task_duration != null && message.hasOwnProperty("task_duration")) if (typeof message.task_duration === "number") object.task_duration = options.longs === String ? String(message.task_duration) : message.task_duration;else object.task_duration = options.longs === String ? $util.Long.prototype.toString.call(message.task_duration) : options.longs === Number ? new $util.LongBits(message.task_duration.low >>> 0, message.task_duration.high >>> 0).toNumber() : message.task_duration;
              if (message.state != null && message.hasOwnProperty("state")) object.state = message.state;
              return object;
            }; /**
               * Converts this TaskData to JSON.
               * @function toJSON
               * @memberof m_proto.TaskData
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            TaskData.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for TaskData
               * @function getTypeUrl
               * @memberof m_proto.TaskData
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            TaskData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.TaskData";
            };
            return TaskData;
          }();
          m_proto.SheBeiData = function () {
            /**
            * Properties of a SheBeiData.
            * @memberof m_proto
            * @interface ISheBeiData
            * @property {number|null} [shebei_id] SheBeiData shebei_id
            * @property {number|null} [shebei_level] SheBeiData shebei_level
            */ /**
               * Constructs a new SheBeiData.
               * @memberof m_proto
               * @classdesc Represents a SheBeiData.
               * @implements ISheBeiData
               * @constructor
               * @param {m_proto.ISheBeiData=} [properties] Properties to set
               */
            function SheBeiData(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * SheBeiData shebei_id.
              * @member {number} shebei_id
              * @memberof m_proto.SheBeiData
              * @instance
              */
            SheBeiData.prototype.shebei_id = 0; /**
                                                * SheBeiData shebei_level.
                                                * @member {number} shebei_level
                                                * @memberof m_proto.SheBeiData
                                                * @instance
                                                */
            SheBeiData.prototype.shebei_level = 0; /**
                                                   * Creates a new SheBeiData instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.SheBeiData
                                                   * @static
                                                   * @param {m_proto.ISheBeiData=} [properties] Properties to set
                                                   * @returns {m_proto.SheBeiData} SheBeiData instance
                                                   */
            SheBeiData.create = function create(properties) {
              return new SheBeiData(properties);
            }; /**
               * Encodes the specified SheBeiData message. Does not implicitly {@link m_proto.SheBeiData.verify|verify} messages.
               * @function encode
               * @memberof m_proto.SheBeiData
               * @static
               * @param {m_proto.ISheBeiData} message SheBeiData message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            SheBeiData.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.shebei_id != null && Object.hasOwnProperty.call(message, "shebei_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.shebei_id);
              if (message.shebei_level != null && Object.hasOwnProperty.call(message, "shebei_level")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.shebei_level);
              return writer;
            }; /**
               * Encodes the specified SheBeiData message, length delimited. Does not implicitly {@link m_proto.SheBeiData.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.SheBeiData
               * @static
               * @param {m_proto.ISheBeiData} message SheBeiData message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            SheBeiData.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a SheBeiData message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.SheBeiData
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.SheBeiData} SheBeiData
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            SheBeiData.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.SheBeiData();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.shebei_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.shebei_level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a SheBeiData message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.SheBeiData
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.SheBeiData} SheBeiData
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            SheBeiData.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a SheBeiData message.
               * @function verify
               * @memberof m_proto.SheBeiData
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            SheBeiData.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.shebei_id != null && message.hasOwnProperty("shebei_id")) if (!$util.isInteger(message.shebei_id)) return "shebei_id: integer expected";
              if (message.shebei_level != null && message.hasOwnProperty("shebei_level")) if (!$util.isInteger(message.shebei_level)) return "shebei_level: integer expected";
              return null;
            }; /**
               * Creates a SheBeiData message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.SheBeiData
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.SheBeiData} SheBeiData
               */
            SheBeiData.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.SheBeiData) return object;
              var message = new $root.m_proto.SheBeiData();
              if (object.shebei_id != null) message.shebei_id = object.shebei_id | 0;
              if (object.shebei_level != null) message.shebei_level = object.shebei_level | 0;
              return message;
            }; /**
               * Creates a plain object from a SheBeiData message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.SheBeiData
               * @static
               * @param {m_proto.SheBeiData} message SheBeiData
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            SheBeiData.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.shebei_id = 0;
                object.shebei_level = 0;
              }
              if (message.shebei_id != null && message.hasOwnProperty("shebei_id")) object.shebei_id = message.shebei_id;
              if (message.shebei_level != null && message.hasOwnProperty("shebei_level")) object.shebei_level = message.shebei_level;
              return object;
            }; /**
               * Converts this SheBeiData to JSON.
               * @function toJSON
               * @memberof m_proto.SheBeiData
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            SheBeiData.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for SheBeiData
               * @function getTypeUrl
               * @memberof m_proto.SheBeiData
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            SheBeiData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.SheBeiData";
            };
            return SheBeiData;
          }();
          m_proto.ReqFuHua = function () {
            /**
            * Properties of a ReqFuHua.
            * @memberof m_proto
            * @interface IReqFuHua
            * @property {number|null} [building_uid] ReqFuHua building_uid
            * @property {number|null} [building_id] ReqFuHua building_id
            */ /**
               * Constructs a new ReqFuHua.
               * @memberof m_proto
               * @classdesc Represents a ReqFuHua.
               * @implements IReqFuHua
               * @constructor
               * @param {m_proto.IReqFuHua=} [properties] Properties to set
               */
            function ReqFuHua(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqFuHua building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqFuHua
              * @instance
              */
            ReqFuHua.prototype.building_uid = 0; /**
                                                 * ReqFuHua building_id.
                                                 * @member {number} building_id
                                                 * @memberof m_proto.ReqFuHua
                                                 * @instance
                                                 */
            ReqFuHua.prototype.building_id = 0; /**
                                                * Creates a new ReqFuHua instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ReqFuHua
                                                * @static
                                                * @param {m_proto.IReqFuHua=} [properties] Properties to set
                                                * @returns {m_proto.ReqFuHua} ReqFuHua instance
                                                */
            ReqFuHua.create = function create(properties) {
              return new ReqFuHua(properties);
            }; /**
               * Encodes the specified ReqFuHua message. Does not implicitly {@link m_proto.ReqFuHua.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {m_proto.IReqFuHua} message ReqFuHua message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFuHua.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified ReqFuHua message, length delimited. Does not implicitly {@link m_proto.ReqFuHua.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {m_proto.IReqFuHua} message ReqFuHua message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFuHua.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqFuHua message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqFuHua} ReqFuHua
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFuHua.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqFuHua();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqFuHua message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqFuHua} ReqFuHua
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFuHua.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqFuHua message.
               * @function verify
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqFuHua.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates a ReqFuHua message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqFuHua} ReqFuHua
               */
            ReqFuHua.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqFuHua) return object;
              var message = new $root.m_proto.ReqFuHua();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqFuHua message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {m_proto.ReqFuHua} message ReqFuHua
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqFuHua.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this ReqFuHua to JSON.
               * @function toJSON
               * @memberof m_proto.ReqFuHua
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqFuHua.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqFuHua
               * @function getTypeUrl
               * @memberof m_proto.ReqFuHua
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqFuHua.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqFuHua";
            };
            return ReqFuHua;
          }();
          m_proto.ResFuHua = function () {
            /**
            * Properties of a ResFuHua.
            * @memberof m_proto
            * @interface IResFuHua
            * @property {number|null} [code] ResFuHua code
            * @property {number|null} [building_uid] ResFuHua building_uid
            * @property {number|null} [building_id] ResFuHua building_id
            * @property {number|null} [total_people] ResFuHua total_people
            */ /**
               * Constructs a new ResFuHua.
               * @memberof m_proto
               * @classdesc Represents a ResFuHua.
               * @implements IResFuHua
               * @constructor
               * @param {m_proto.IResFuHua=} [properties] Properties to set
               */
            function ResFuHua(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResFuHua code.
              * @member {number} code
              * @memberof m_proto.ResFuHua
              * @instance
              */
            ResFuHua.prototype.code = 0; /**
                                         * ResFuHua building_uid.
                                         * @member {number} building_uid
                                         * @memberof m_proto.ResFuHua
                                         * @instance
                                         */
            ResFuHua.prototype.building_uid = 0; /**
                                                 * ResFuHua building_id.
                                                 * @member {number} building_id
                                                 * @memberof m_proto.ResFuHua
                                                 * @instance
                                                 */
            ResFuHua.prototype.building_id = 0; /**
                                                * ResFuHua total_people.
                                                * @member {number} total_people
                                                * @memberof m_proto.ResFuHua
                                                * @instance
                                                */
            ResFuHua.prototype.total_people = 0; /**
                                                 * Creates a new ResFuHua instance using the specified properties.
                                                 * @function create
                                                 * @memberof m_proto.ResFuHua
                                                 * @static
                                                 * @param {m_proto.IResFuHua=} [properties] Properties to set
                                                 * @returns {m_proto.ResFuHua} ResFuHua instance
                                                 */
            ResFuHua.create = function create(properties) {
              return new ResFuHua(properties);
            }; /**
               * Encodes the specified ResFuHua message. Does not implicitly {@link m_proto.ResFuHua.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResFuHua
               * @static
               * @param {m_proto.IResFuHua} message ResFuHua message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFuHua.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.total_people != null && Object.hasOwnProperty.call(message, "total_people")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.total_people);
              return writer;
            }; /**
               * Encodes the specified ResFuHua message, length delimited. Does not implicitly {@link m_proto.ResFuHua.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResFuHua
               * @static
               * @param {m_proto.IResFuHua} message ResFuHua message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFuHua.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResFuHua message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResFuHua
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResFuHua} ResFuHua
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFuHua.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResFuHua();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.total_people = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResFuHua message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResFuHua
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResFuHua} ResFuHua
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFuHua.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResFuHua message.
               * @function verify
               * @memberof m_proto.ResFuHua
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResFuHua.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.total_people != null && message.hasOwnProperty("total_people")) if (!$util.isInteger(message.total_people)) return "total_people: integer expected";
              return null;
            }; /**
               * Creates a ResFuHua message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResFuHua
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResFuHua} ResFuHua
               */
            ResFuHua.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResFuHua) return object;
              var message = new $root.m_proto.ResFuHua();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.total_people != null) message.total_people = object.total_people | 0;
              return message;
            }; /**
               * Creates a plain object from a ResFuHua message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResFuHua
               * @static
               * @param {m_proto.ResFuHua} message ResFuHua
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResFuHua.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.total_people = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.total_people != null && message.hasOwnProperty("total_people")) object.total_people = message.total_people;
              return object;
            }; /**
               * Converts this ResFuHua to JSON.
               * @function toJSON
               * @memberof m_proto.ResFuHua
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResFuHua.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResFuHua
               * @function getTypeUrl
               * @memberof m_proto.ResFuHua
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResFuHua.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResFuHua";
            };
            return ResFuHua;
          }();
          m_proto.ReqBuild = function () {
            /**
            * Properties of a ReqBuild.
            * @memberof m_proto
            * @interface IReqBuild
            * @property {number|null} [building_id] ReqBuild building_id
            * @property {number|null} [sid] ReqBuild sid
            */ /**
               * Constructs a new ReqBuild.
               * @memberof m_proto
               * @classdesc Represents a ReqBuild.
               * @implements IReqBuild
               * @constructor
               * @param {m_proto.IReqBuild=} [properties] Properties to set
               */
            function ReqBuild(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqBuild building_id.
              * @member {number} building_id
              * @memberof m_proto.ReqBuild
              * @instance
              */
            ReqBuild.prototype.building_id = 0; /**
                                                * ReqBuild sid.
                                                * @member {number} sid
                                                * @memberof m_proto.ReqBuild
                                                * @instance
                                                */
            ReqBuild.prototype.sid = 0; /**
                                        * Creates a new ReqBuild instance using the specified properties.
                                        * @function create
                                        * @memberof m_proto.ReqBuild
                                        * @static
                                        * @param {m_proto.IReqBuild=} [properties] Properties to set
                                        * @returns {m_proto.ReqBuild} ReqBuild instance
                                        */
            ReqBuild.create = function create(properties) {
              return new ReqBuild(properties);
            }; /**
               * Encodes the specified ReqBuild message. Does not implicitly {@link m_proto.ReqBuild.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqBuild
               * @static
               * @param {m_proto.IReqBuild} message ReqBuild message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBuild.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_id);
              if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.sid);
              return writer;
            }; /**
               * Encodes the specified ReqBuild message, length delimited. Does not implicitly {@link m_proto.ReqBuild.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqBuild
               * @static
               * @param {m_proto.IReqBuild} message ReqBuild message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBuild.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqBuild message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqBuild
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqBuild} ReqBuild
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBuild.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqBuild();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.sid = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqBuild message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqBuild
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqBuild} ReqBuild
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBuild.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqBuild message.
               * @function verify
               * @memberof m_proto.ReqBuild
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqBuild.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isInteger(message.sid)) return "sid: integer expected";
              return null;
            }; /**
               * Creates a ReqBuild message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqBuild
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqBuild} ReqBuild
               */
            ReqBuild.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqBuild) return object;
              var message = new $root.m_proto.ReqBuild();
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.sid != null) message.sid = object.sid | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqBuild message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqBuild
               * @static
               * @param {m_proto.ReqBuild} message ReqBuild
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqBuild.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_id = 0;
                object.sid = 0;
              }
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid;
              return object;
            }; /**
               * Converts this ReqBuild to JSON.
               * @function toJSON
               * @memberof m_proto.ReqBuild
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqBuild.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqBuild
               * @function getTypeUrl
               * @memberof m_proto.ReqBuild
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqBuild.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqBuild";
            };
            return ReqBuild;
          }();
          m_proto.ResBuild = function () {
            /**
            * Properties of a ResBuild.
            * @memberof m_proto
            * @interface IResBuild
            * @property {number|null} [code] ResBuild code
            * @property {number|null} [sid] ResBuild sid
            * @property {number|null} [building_uid] ResBuild building_uid
            * @property {number|null} [building_id] ResBuild building_id
            * @property {number|null} [upgrade_duration] ResBuild upgrade_duration
            */ /**
               * Constructs a new ResBuild.
               * @memberof m_proto
               * @classdesc Represents a ResBuild.
               * @implements IResBuild
               * @constructor
               * @param {m_proto.IResBuild=} [properties] Properties to set
               */
            function ResBuild(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBuild code.
              * @member {number} code
              * @memberof m_proto.ResBuild
              * @instance
              */
            ResBuild.prototype.code = 0; /**
                                         * ResBuild sid.
                                         * @member {number} sid
                                         * @memberof m_proto.ResBuild
                                         * @instance
                                         */
            ResBuild.prototype.sid = 0; /**
                                        * ResBuild building_uid.
                                        * @member {number} building_uid
                                        * @memberof m_proto.ResBuild
                                        * @instance
                                        */
            ResBuild.prototype.building_uid = 0; /**
                                                 * ResBuild building_id.
                                                 * @member {number} building_id
                                                 * @memberof m_proto.ResBuild
                                                 * @instance
                                                 */
            ResBuild.prototype.building_id = 0; /**
                                                * ResBuild upgrade_duration.
                                                * @member {number} upgrade_duration
                                                * @memberof m_proto.ResBuild
                                                * @instance
                                                */
            ResBuild.prototype.upgrade_duration = 0; /**
                                                     * Creates a new ResBuild instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ResBuild
                                                     * @static
                                                     * @param {m_proto.IResBuild=} [properties] Properties to set
                                                     * @returns {m_proto.ResBuild} ResBuild instance
                                                     */
            ResBuild.create = function create(properties) {
              return new ResBuild(properties);
            }; /**
               * Encodes the specified ResBuild message. Does not implicitly {@link m_proto.ResBuild.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBuild
               * @static
               * @param {m_proto.IResBuild} message ResBuild message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuild.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.sid);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.building_id);
              if (message.upgrade_duration != null && Object.hasOwnProperty.call(message, "upgrade_duration")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.upgrade_duration);
              return writer;
            }; /**
               * Encodes the specified ResBuild message, length delimited. Does not implicitly {@link m_proto.ResBuild.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBuild
               * @static
               * @param {m_proto.IResBuild} message ResBuild message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuild.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBuild message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBuild
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBuild} ResBuild
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuild.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBuild();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.sid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.upgrade_duration = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBuild message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBuild
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBuild} ResBuild
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuild.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBuild message.
               * @function verify
               * @memberof m_proto.ResBuild
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBuild.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isInteger(message.sid)) return "sid: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) if (!$util.isInteger(message.upgrade_duration)) return "upgrade_duration: integer expected";
              return null;
            }; /**
               * Creates a ResBuild message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBuild
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBuild} ResBuild
               */
            ResBuild.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBuild) return object;
              var message = new $root.m_proto.ResBuild();
              if (object.code != null) message.code = object.code | 0;
              if (object.sid != null) message.sid = object.sid | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.upgrade_duration != null) message.upgrade_duration = object.upgrade_duration | 0;
              return message;
            }; /**
               * Creates a plain object from a ResBuild message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBuild
               * @static
               * @param {m_proto.ResBuild} message ResBuild
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBuild.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.sid = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.upgrade_duration = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) object.upgrade_duration = message.upgrade_duration;
              return object;
            }; /**
               * Converts this ResBuild to JSON.
               * @function toJSON
               * @memberof m_proto.ResBuild
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBuild.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBuild
               * @function getTypeUrl
               * @memberof m_proto.ResBuild
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBuild.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBuild";
            };
            return ResBuild;
          }();
          m_proto.ReqUpgradeBuilding = function () {
            /**
            * Properties of a ReqUpgradeBuilding.
            * @memberof m_proto
            * @interface IReqUpgradeBuilding
            * @property {number|null} [building_uid] ReqUpgradeBuilding building_uid
            * @property {number|null} [building_id] ReqUpgradeBuilding building_id
            */ /**
               * Constructs a new ReqUpgradeBuilding.
               * @memberof m_proto
               * @classdesc Represents a ReqUpgradeBuilding.
               * @implements IReqUpgradeBuilding
               * @constructor
               * @param {m_proto.IReqUpgradeBuilding=} [properties] Properties to set
               */
            function ReqUpgradeBuilding(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUpgradeBuilding building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqUpgradeBuilding
              * @instance
              */
            ReqUpgradeBuilding.prototype.building_uid = 0; /**
                                                           * ReqUpgradeBuilding building_id.
                                                           * @member {number} building_id
                                                           * @memberof m_proto.ReqUpgradeBuilding
                                                           * @instance
                                                           */
            ReqUpgradeBuilding.prototype.building_id = 0; /**
                                                          * Creates a new ReqUpgradeBuilding instance using the specified properties.
                                                          * @function create
                                                          * @memberof m_proto.ReqUpgradeBuilding
                                                          * @static
                                                          * @param {m_proto.IReqUpgradeBuilding=} [properties] Properties to set
                                                          * @returns {m_proto.ReqUpgradeBuilding} ReqUpgradeBuilding instance
                                                          */
            ReqUpgradeBuilding.create = function create(properties) {
              return new ReqUpgradeBuilding(properties);
            }; /**
               * Encodes the specified ReqUpgradeBuilding message. Does not implicitly {@link m_proto.ReqUpgradeBuilding.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {m_proto.IReqUpgradeBuilding} message ReqUpgradeBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpgradeBuilding.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified ReqUpgradeBuilding message, length delimited. Does not implicitly {@link m_proto.ReqUpgradeBuilding.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {m_proto.IReqUpgradeBuilding} message ReqUpgradeBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpgradeBuilding.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUpgradeBuilding message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUpgradeBuilding} ReqUpgradeBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpgradeBuilding.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUpgradeBuilding();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUpgradeBuilding message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUpgradeBuilding} ReqUpgradeBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpgradeBuilding.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUpgradeBuilding message.
               * @function verify
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUpgradeBuilding.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates a ReqUpgradeBuilding message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUpgradeBuilding} ReqUpgradeBuilding
               */
            ReqUpgradeBuilding.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUpgradeBuilding) return object;
              var message = new $root.m_proto.ReqUpgradeBuilding();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUpgradeBuilding message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {m_proto.ReqUpgradeBuilding} message ReqUpgradeBuilding
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUpgradeBuilding.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this ReqUpgradeBuilding to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUpgradeBuilding
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUpgradeBuilding.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUpgradeBuilding
               * @function getTypeUrl
               * @memberof m_proto.ReqUpgradeBuilding
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUpgradeBuilding.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUpgradeBuilding";
            };
            return ReqUpgradeBuilding;
          }();
          m_proto.ResUpgradeBuilding = function () {
            /**
            * Properties of a ResUpgradeBuilding.
            * @memberof m_proto
            * @interface IResUpgradeBuilding
            * @property {number|null} [code] ResUpgradeBuilding code
            * @property {number|null} [building_uid] ResUpgradeBuilding building_uid
            * @property {number|null} [building_id] ResUpgradeBuilding building_id
            * @property {number|null} [upgrade_duration] ResUpgradeBuilding upgrade_duration
            */ /**
               * Constructs a new ResUpgradeBuilding.
               * @memberof m_proto
               * @classdesc Represents a ResUpgradeBuilding.
               * @implements IResUpgradeBuilding
               * @constructor
               * @param {m_proto.IResUpgradeBuilding=} [properties] Properties to set
               */
            function ResUpgradeBuilding(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUpgradeBuilding code.
              * @member {number} code
              * @memberof m_proto.ResUpgradeBuilding
              * @instance
              */
            ResUpgradeBuilding.prototype.code = 0; /**
                                                   * ResUpgradeBuilding building_uid.
                                                   * @member {number} building_uid
                                                   * @memberof m_proto.ResUpgradeBuilding
                                                   * @instance
                                                   */
            ResUpgradeBuilding.prototype.building_uid = 0; /**
                                                           * ResUpgradeBuilding building_id.
                                                           * @member {number} building_id
                                                           * @memberof m_proto.ResUpgradeBuilding
                                                           * @instance
                                                           */
            ResUpgradeBuilding.prototype.building_id = 0; /**
                                                          * ResUpgradeBuilding upgrade_duration.
                                                          * @member {number} upgrade_duration
                                                          * @memberof m_proto.ResUpgradeBuilding
                                                          * @instance
                                                          */
            ResUpgradeBuilding.prototype.upgrade_duration = 0; /**
                                                               * Creates a new ResUpgradeBuilding instance using the specified properties.
                                                               * @function create
                                                               * @memberof m_proto.ResUpgradeBuilding
                                                               * @static
                                                               * @param {m_proto.IResUpgradeBuilding=} [properties] Properties to set
                                                               * @returns {m_proto.ResUpgradeBuilding} ResUpgradeBuilding instance
                                                               */
            ResUpgradeBuilding.create = function create(properties) {
              return new ResUpgradeBuilding(properties);
            }; /**
               * Encodes the specified ResUpgradeBuilding message. Does not implicitly {@link m_proto.ResUpgradeBuilding.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {m_proto.IResUpgradeBuilding} message ResUpgradeBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpgradeBuilding.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.upgrade_duration != null && Object.hasOwnProperty.call(message, "upgrade_duration")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.upgrade_duration);
              return writer;
            }; /**
               * Encodes the specified ResUpgradeBuilding message, length delimited. Does not implicitly {@link m_proto.ResUpgradeBuilding.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {m_proto.IResUpgradeBuilding} message ResUpgradeBuilding message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpgradeBuilding.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUpgradeBuilding message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUpgradeBuilding} ResUpgradeBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpgradeBuilding.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUpgradeBuilding();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.upgrade_duration = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUpgradeBuilding message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUpgradeBuilding} ResUpgradeBuilding
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpgradeBuilding.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUpgradeBuilding message.
               * @function verify
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUpgradeBuilding.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) if (!$util.isInteger(message.upgrade_duration)) return "upgrade_duration: integer expected";
              return null;
            }; /**
               * Creates a ResUpgradeBuilding message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUpgradeBuilding} ResUpgradeBuilding
               */
            ResUpgradeBuilding.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUpgradeBuilding) return object;
              var message = new $root.m_proto.ResUpgradeBuilding();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.upgrade_duration != null) message.upgrade_duration = object.upgrade_duration | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUpgradeBuilding message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {m_proto.ResUpgradeBuilding} message ResUpgradeBuilding
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUpgradeBuilding.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.upgrade_duration = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) object.upgrade_duration = message.upgrade_duration;
              return object;
            }; /**
               * Converts this ResUpgradeBuilding to JSON.
               * @function toJSON
               * @memberof m_proto.ResUpgradeBuilding
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUpgradeBuilding.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUpgradeBuilding
               * @function getTypeUrl
               * @memberof m_proto.ResUpgradeBuilding
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUpgradeBuilding.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUpgradeBuilding";
            };
            return ResUpgradeBuilding;
          }();
          m_proto.ResBuildingUpgradeFinish = function () {
            /**
            * Properties of a ResBuildingUpgradeFinish.
            * @memberof m_proto
            * @interface IResBuildingUpgradeFinish
            * @property {number|null} [code] ResBuildingUpgradeFinish code
            * @property {number|null} [building_uid] ResBuildingUpgradeFinish building_uid
            * @property {number|null} [building_id] ResBuildingUpgradeFinish building_id
            * @property {number|null} [level] ResBuildingUpgradeFinish level
            * @property {number|null} [sid] ResBuildingUpgradeFinish sid
            */ /**
               * Constructs a new ResBuildingUpgradeFinish.
               * @memberof m_proto
               * @classdesc Represents a ResBuildingUpgradeFinish.
               * @implements IResBuildingUpgradeFinish
               * @constructor
               * @param {m_proto.IResBuildingUpgradeFinish=} [properties] Properties to set
               */
            function ResBuildingUpgradeFinish(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBuildingUpgradeFinish code.
              * @member {number} code
              * @memberof m_proto.ResBuildingUpgradeFinish
              * @instance
              */
            ResBuildingUpgradeFinish.prototype.code = 0; /**
                                                         * ResBuildingUpgradeFinish building_uid.
                                                         * @member {number} building_uid
                                                         * @memberof m_proto.ResBuildingUpgradeFinish
                                                         * @instance
                                                         */
            ResBuildingUpgradeFinish.prototype.building_uid = 0; /**
                                                                 * ResBuildingUpgradeFinish building_id.
                                                                 * @member {number} building_id
                                                                 * @memberof m_proto.ResBuildingUpgradeFinish
                                                                 * @instance
                                                                 */
            ResBuildingUpgradeFinish.prototype.building_id = 0; /**
                                                                * ResBuildingUpgradeFinish level.
                                                                * @member {number} level
                                                                * @memberof m_proto.ResBuildingUpgradeFinish
                                                                * @instance
                                                                */
            ResBuildingUpgradeFinish.prototype.level = 0; /**
                                                          * ResBuildingUpgradeFinish sid.
                                                          * @member {number} sid
                                                          * @memberof m_proto.ResBuildingUpgradeFinish
                                                          * @instance
                                                          */
            ResBuildingUpgradeFinish.prototype.sid = 0; /**
                                                        * Creates a new ResBuildingUpgradeFinish instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ResBuildingUpgradeFinish
                                                        * @static
                                                        * @param {m_proto.IResBuildingUpgradeFinish=} [properties] Properties to set
                                                        * @returns {m_proto.ResBuildingUpgradeFinish} ResBuildingUpgradeFinish instance
                                                        */
            ResBuildingUpgradeFinish.create = function create(properties) {
              return new ResBuildingUpgradeFinish(properties);
            }; /**
               * Encodes the specified ResBuildingUpgradeFinish message. Does not implicitly {@link m_proto.ResBuildingUpgradeFinish.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {m_proto.IResBuildingUpgradeFinish} message ResBuildingUpgradeFinish message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuildingUpgradeFinish.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.level);
              if (message.sid != null && Object.hasOwnProperty.call(message, "sid")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.sid);
              return writer;
            }; /**
               * Encodes the specified ResBuildingUpgradeFinish message, length delimited. Does not implicitly {@link m_proto.ResBuildingUpgradeFinish.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {m_proto.IResBuildingUpgradeFinish} message ResBuildingUpgradeFinish message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuildingUpgradeFinish.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBuildingUpgradeFinish message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBuildingUpgradeFinish} ResBuildingUpgradeFinish
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuildingUpgradeFinish.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBuildingUpgradeFinish();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.sid = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBuildingUpgradeFinish message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBuildingUpgradeFinish} ResBuildingUpgradeFinish
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuildingUpgradeFinish.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBuildingUpgradeFinish message.
               * @function verify
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBuildingUpgradeFinish.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              if (message.sid != null && message.hasOwnProperty("sid")) if (!$util.isInteger(message.sid)) return "sid: integer expected";
              return null;
            }; /**
               * Creates a ResBuildingUpgradeFinish message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBuildingUpgradeFinish} ResBuildingUpgradeFinish
               */
            ResBuildingUpgradeFinish.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBuildingUpgradeFinish) return object;
              var message = new $root.m_proto.ResBuildingUpgradeFinish();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.level != null) message.level = object.level | 0;
              if (object.sid != null) message.sid = object.sid | 0;
              return message;
            }; /**
               * Creates a plain object from a ResBuildingUpgradeFinish message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {m_proto.ResBuildingUpgradeFinish} message ResBuildingUpgradeFinish
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBuildingUpgradeFinish.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.level = 0;
                object.sid = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              if (message.sid != null && message.hasOwnProperty("sid")) object.sid = message.sid;
              return object;
            }; /**
               * Converts this ResBuildingUpgradeFinish to JSON.
               * @function toJSON
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBuildingUpgradeFinish.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBuildingUpgradeFinish
               * @function getTypeUrl
               * @memberof m_proto.ResBuildingUpgradeFinish
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBuildingUpgradeFinish.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBuildingUpgradeFinish";
            };
            return ResBuildingUpgradeFinish;
          }();
          m_proto.ReqSpeedCardUpgrade = function () {
            /**
            * Properties of a ReqSpeedCardUpgrade.
            * @memberof m_proto
            * @interface IReqSpeedCardUpgrade
            * @property {number|null} [building_uid] ReqSpeedCardUpgrade building_uid
            * @property {number|null} [building_id] ReqSpeedCardUpgrade building_id
            * @property {number|null} [itemid] ReqSpeedCardUpgrade itemid
            * @property {number|null} [itemcount] ReqSpeedCardUpgrade itemcount
            */ /**
               * Constructs a new ReqSpeedCardUpgrade.
               * @memberof m_proto
               * @classdesc Represents a ReqSpeedCardUpgrade.
               * @implements IReqSpeedCardUpgrade
               * @constructor
               * @param {m_proto.IReqSpeedCardUpgrade=} [properties] Properties to set
               */
            function ReqSpeedCardUpgrade(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqSpeedCardUpgrade building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqSpeedCardUpgrade
              * @instance
              */
            ReqSpeedCardUpgrade.prototype.building_uid = 0; /**
                                                            * ReqSpeedCardUpgrade building_id.
                                                            * @member {number} building_id
                                                            * @memberof m_proto.ReqSpeedCardUpgrade
                                                            * @instance
                                                            */
            ReqSpeedCardUpgrade.prototype.building_id = 0; /**
                                                           * ReqSpeedCardUpgrade itemid.
                                                           * @member {number} itemid
                                                           * @memberof m_proto.ReqSpeedCardUpgrade
                                                           * @instance
                                                           */
            ReqSpeedCardUpgrade.prototype.itemid = 0; /**
                                                      * ReqSpeedCardUpgrade itemcount.
                                                      * @member {number} itemcount
                                                      * @memberof m_proto.ReqSpeedCardUpgrade
                                                      * @instance
                                                      */
            ReqSpeedCardUpgrade.prototype.itemcount = 0; /**
                                                         * Creates a new ReqSpeedCardUpgrade instance using the specified properties.
                                                         * @function create
                                                         * @memberof m_proto.ReqSpeedCardUpgrade
                                                         * @static
                                                         * @param {m_proto.IReqSpeedCardUpgrade=} [properties] Properties to set
                                                         * @returns {m_proto.ReqSpeedCardUpgrade} ReqSpeedCardUpgrade instance
                                                         */
            ReqSpeedCardUpgrade.create = function create(properties) {
              return new ReqSpeedCardUpgrade(properties);
            }; /**
               * Encodes the specified ReqSpeedCardUpgrade message. Does not implicitly {@link m_proto.ReqSpeedCardUpgrade.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {m_proto.IReqSpeedCardUpgrade} message ReqSpeedCardUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqSpeedCardUpgrade.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              if (message.itemid != null && Object.hasOwnProperty.call(message, "itemid")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.itemid);
              if (message.itemcount != null && Object.hasOwnProperty.call(message, "itemcount")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.itemcount);
              return writer;
            }; /**
               * Encodes the specified ReqSpeedCardUpgrade message, length delimited. Does not implicitly {@link m_proto.ReqSpeedCardUpgrade.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {m_proto.IReqSpeedCardUpgrade} message ReqSpeedCardUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqSpeedCardUpgrade.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqSpeedCardUpgrade message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqSpeedCardUpgrade} ReqSpeedCardUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqSpeedCardUpgrade.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqSpeedCardUpgrade();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.itemid = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.itemcount = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqSpeedCardUpgrade message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqSpeedCardUpgrade} ReqSpeedCardUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqSpeedCardUpgrade.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqSpeedCardUpgrade message.
               * @function verify
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqSpeedCardUpgrade.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.itemid != null && message.hasOwnProperty("itemid")) if (!$util.isInteger(message.itemid)) return "itemid: integer expected";
              if (message.itemcount != null && message.hasOwnProperty("itemcount")) if (!$util.isInteger(message.itemcount)) return "itemcount: integer expected";
              return null;
            }; /**
               * Creates a ReqSpeedCardUpgrade message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqSpeedCardUpgrade} ReqSpeedCardUpgrade
               */
            ReqSpeedCardUpgrade.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqSpeedCardUpgrade) return object;
              var message = new $root.m_proto.ReqSpeedCardUpgrade();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.itemid != null) message.itemid = object.itemid | 0;
              if (object.itemcount != null) message.itemcount = object.itemcount | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqSpeedCardUpgrade message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {m_proto.ReqSpeedCardUpgrade} message ReqSpeedCardUpgrade
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqSpeedCardUpgrade.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
                object.itemid = 0;
                object.itemcount = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.itemid != null && message.hasOwnProperty("itemid")) object.itemid = message.itemid;
              if (message.itemcount != null && message.hasOwnProperty("itemcount")) object.itemcount = message.itemcount;
              return object;
            }; /**
               * Converts this ReqSpeedCardUpgrade to JSON.
               * @function toJSON
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqSpeedCardUpgrade.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqSpeedCardUpgrade
               * @function getTypeUrl
               * @memberof m_proto.ReqSpeedCardUpgrade
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqSpeedCardUpgrade.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqSpeedCardUpgrade";
            };
            return ReqSpeedCardUpgrade;
          }();
          m_proto.ResSpeedCardUpgrade = function () {
            /**
            * Properties of a ResSpeedCardUpgrade.
            * @memberof m_proto
            * @interface IResSpeedCardUpgrade
            * @property {number|null} [code] ResSpeedCardUpgrade code
            * @property {number|null} [building_uid] ResSpeedCardUpgrade building_uid
            * @property {number|null} [building_id] ResSpeedCardUpgrade building_id
            * @property {number|null} [level] ResSpeedCardUpgrade level
            * @property {number|null} [upgrade_duration] ResSpeedCardUpgrade upgrade_duration
            */ /**
               * Constructs a new ResSpeedCardUpgrade.
               * @memberof m_proto
               * @classdesc Represents a ResSpeedCardUpgrade.
               * @implements IResSpeedCardUpgrade
               * @constructor
               * @param {m_proto.IResSpeedCardUpgrade=} [properties] Properties to set
               */
            function ResSpeedCardUpgrade(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResSpeedCardUpgrade code.
              * @member {number} code
              * @memberof m_proto.ResSpeedCardUpgrade
              * @instance
              */
            ResSpeedCardUpgrade.prototype.code = 0; /**
                                                    * ResSpeedCardUpgrade building_uid.
                                                    * @member {number} building_uid
                                                    * @memberof m_proto.ResSpeedCardUpgrade
                                                    * @instance
                                                    */
            ResSpeedCardUpgrade.prototype.building_uid = 0; /**
                                                            * ResSpeedCardUpgrade building_id.
                                                            * @member {number} building_id
                                                            * @memberof m_proto.ResSpeedCardUpgrade
                                                            * @instance
                                                            */
            ResSpeedCardUpgrade.prototype.building_id = 0; /**
                                                           * ResSpeedCardUpgrade level.
                                                           * @member {number} level
                                                           * @memberof m_proto.ResSpeedCardUpgrade
                                                           * @instance
                                                           */
            ResSpeedCardUpgrade.prototype.level = 0; /**
                                                     * ResSpeedCardUpgrade upgrade_duration.
                                                     * @member {number} upgrade_duration
                                                     * @memberof m_proto.ResSpeedCardUpgrade
                                                     * @instance
                                                     */
            ResSpeedCardUpgrade.prototype.upgrade_duration = 0; /**
                                                                * Creates a new ResSpeedCardUpgrade instance using the specified properties.
                                                                * @function create
                                                                * @memberof m_proto.ResSpeedCardUpgrade
                                                                * @static
                                                                * @param {m_proto.IResSpeedCardUpgrade=} [properties] Properties to set
                                                                * @returns {m_proto.ResSpeedCardUpgrade} ResSpeedCardUpgrade instance
                                                                */
            ResSpeedCardUpgrade.create = function create(properties) {
              return new ResSpeedCardUpgrade(properties);
            }; /**
               * Encodes the specified ResSpeedCardUpgrade message. Does not implicitly {@link m_proto.ResSpeedCardUpgrade.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {m_proto.IResSpeedCardUpgrade} message ResSpeedCardUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSpeedCardUpgrade.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.level);
              if (message.upgrade_duration != null && Object.hasOwnProperty.call(message, "upgrade_duration")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.upgrade_duration);
              return writer;
            }; /**
               * Encodes the specified ResSpeedCardUpgrade message, length delimited. Does not implicitly {@link m_proto.ResSpeedCardUpgrade.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {m_proto.IResSpeedCardUpgrade} message ResSpeedCardUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSpeedCardUpgrade.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResSpeedCardUpgrade message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResSpeedCardUpgrade} ResSpeedCardUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSpeedCardUpgrade.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResSpeedCardUpgrade();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.upgrade_duration = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResSpeedCardUpgrade message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResSpeedCardUpgrade} ResSpeedCardUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSpeedCardUpgrade.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResSpeedCardUpgrade message.
               * @function verify
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResSpeedCardUpgrade.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) if (!$util.isInteger(message.upgrade_duration)) return "upgrade_duration: integer expected";
              return null;
            }; /**
               * Creates a ResSpeedCardUpgrade message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResSpeedCardUpgrade} ResSpeedCardUpgrade
               */
            ResSpeedCardUpgrade.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResSpeedCardUpgrade) return object;
              var message = new $root.m_proto.ResSpeedCardUpgrade();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.level != null) message.level = object.level | 0;
              if (object.upgrade_duration != null) message.upgrade_duration = object.upgrade_duration | 0;
              return message;
            }; /**
               * Creates a plain object from a ResSpeedCardUpgrade message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {m_proto.ResSpeedCardUpgrade} message ResSpeedCardUpgrade
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResSpeedCardUpgrade.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.level = 0;
                object.upgrade_duration = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              if (message.upgrade_duration != null && message.hasOwnProperty("upgrade_duration")) object.upgrade_duration = message.upgrade_duration;
              return object;
            }; /**
               * Converts this ResSpeedCardUpgrade to JSON.
               * @function toJSON
               * @memberof m_proto.ResSpeedCardUpgrade
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResSpeedCardUpgrade.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResSpeedCardUpgrade
               * @function getTypeUrl
               * @memberof m_proto.ResSpeedCardUpgrade
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResSpeedCardUpgrade.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResSpeedCardUpgrade";
            };
            return ResSpeedCardUpgrade;
          }();
          m_proto.ReqDiamondUpgrade = function () {
            /**
            * Properties of a ReqDiamondUpgrade.
            * @memberof m_proto
            * @interface IReqDiamondUpgrade
            * @property {number|null} [building_uid] ReqDiamondUpgrade building_uid
            * @property {number|null} [building_id] ReqDiamondUpgrade building_id
            */ /**
               * Constructs a new ReqDiamondUpgrade.
               * @memberof m_proto
               * @classdesc Represents a ReqDiamondUpgrade.
               * @implements IReqDiamondUpgrade
               * @constructor
               * @param {m_proto.IReqDiamondUpgrade=} [properties] Properties to set
               */
            function ReqDiamondUpgrade(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqDiamondUpgrade building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqDiamondUpgrade
              * @instance
              */
            ReqDiamondUpgrade.prototype.building_uid = 0; /**
                                                          * ReqDiamondUpgrade building_id.
                                                          * @member {number} building_id
                                                          * @memberof m_proto.ReqDiamondUpgrade
                                                          * @instance
                                                          */
            ReqDiamondUpgrade.prototype.building_id = 0; /**
                                                         * Creates a new ReqDiamondUpgrade instance using the specified properties.
                                                         * @function create
                                                         * @memberof m_proto.ReqDiamondUpgrade
                                                         * @static
                                                         * @param {m_proto.IReqDiamondUpgrade=} [properties] Properties to set
                                                         * @returns {m_proto.ReqDiamondUpgrade} ReqDiamondUpgrade instance
                                                         */
            ReqDiamondUpgrade.create = function create(properties) {
              return new ReqDiamondUpgrade(properties);
            }; /**
               * Encodes the specified ReqDiamondUpgrade message. Does not implicitly {@link m_proto.ReqDiamondUpgrade.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {m_proto.IReqDiamondUpgrade} message ReqDiamondUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDiamondUpgrade.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified ReqDiamondUpgrade message, length delimited. Does not implicitly {@link m_proto.ReqDiamondUpgrade.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {m_proto.IReqDiamondUpgrade} message ReqDiamondUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDiamondUpgrade.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqDiamondUpgrade message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqDiamondUpgrade} ReqDiamondUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDiamondUpgrade.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqDiamondUpgrade();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqDiamondUpgrade message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqDiamondUpgrade} ReqDiamondUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDiamondUpgrade.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqDiamondUpgrade message.
               * @function verify
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqDiamondUpgrade.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates a ReqDiamondUpgrade message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqDiamondUpgrade} ReqDiamondUpgrade
               */
            ReqDiamondUpgrade.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqDiamondUpgrade) return object;
              var message = new $root.m_proto.ReqDiamondUpgrade();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqDiamondUpgrade message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {m_proto.ReqDiamondUpgrade} message ReqDiamondUpgrade
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqDiamondUpgrade.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this ReqDiamondUpgrade to JSON.
               * @function toJSON
               * @memberof m_proto.ReqDiamondUpgrade
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqDiamondUpgrade.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqDiamondUpgrade
               * @function getTypeUrl
               * @memberof m_proto.ReqDiamondUpgrade
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqDiamondUpgrade.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqDiamondUpgrade";
            };
            return ReqDiamondUpgrade;
          }();
          m_proto.ResDiamondUpgrade = function () {
            /**
            * Properties of a ResDiamondUpgrade.
            * @memberof m_proto
            * @interface IResDiamondUpgrade
            * @property {number|null} [code] ResDiamondUpgrade code
            * @property {number|null} [building_uid] ResDiamondUpgrade building_uid
            * @property {number|null} [building_id] ResDiamondUpgrade building_id
            * @property {number|null} [level] ResDiamondUpgrade level
            */ /**
               * Constructs a new ResDiamondUpgrade.
               * @memberof m_proto
               * @classdesc Represents a ResDiamondUpgrade.
               * @implements IResDiamondUpgrade
               * @constructor
               * @param {m_proto.IResDiamondUpgrade=} [properties] Properties to set
               */
            function ResDiamondUpgrade(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResDiamondUpgrade code.
              * @member {number} code
              * @memberof m_proto.ResDiamondUpgrade
              * @instance
              */
            ResDiamondUpgrade.prototype.code = 0; /**
                                                  * ResDiamondUpgrade building_uid.
                                                  * @member {number} building_uid
                                                  * @memberof m_proto.ResDiamondUpgrade
                                                  * @instance
                                                  */
            ResDiamondUpgrade.prototype.building_uid = 0; /**
                                                          * ResDiamondUpgrade building_id.
                                                          * @member {number} building_id
                                                          * @memberof m_proto.ResDiamondUpgrade
                                                          * @instance
                                                          */
            ResDiamondUpgrade.prototype.building_id = 0; /**
                                                         * ResDiamondUpgrade level.
                                                         * @member {number} level
                                                         * @memberof m_proto.ResDiamondUpgrade
                                                         * @instance
                                                         */
            ResDiamondUpgrade.prototype.level = 0; /**
                                                   * Creates a new ResDiamondUpgrade instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResDiamondUpgrade
                                                   * @static
                                                   * @param {m_proto.IResDiamondUpgrade=} [properties] Properties to set
                                                   * @returns {m_proto.ResDiamondUpgrade} ResDiamondUpgrade instance
                                                   */
            ResDiamondUpgrade.create = function create(properties) {
              return new ResDiamondUpgrade(properties);
            }; /**
               * Encodes the specified ResDiamondUpgrade message. Does not implicitly {@link m_proto.ResDiamondUpgrade.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {m_proto.IResDiamondUpgrade} message ResDiamondUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDiamondUpgrade.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.level);
              return writer;
            }; /**
               * Encodes the specified ResDiamondUpgrade message, length delimited. Does not implicitly {@link m_proto.ResDiamondUpgrade.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {m_proto.IResDiamondUpgrade} message ResDiamondUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDiamondUpgrade.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResDiamondUpgrade message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResDiamondUpgrade} ResDiamondUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDiamondUpgrade.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResDiamondUpgrade();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResDiamondUpgrade message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResDiamondUpgrade} ResDiamondUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDiamondUpgrade.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResDiamondUpgrade message.
               * @function verify
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResDiamondUpgrade.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              return null;
            }; /**
               * Creates a ResDiamondUpgrade message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResDiamondUpgrade} ResDiamondUpgrade
               */
            ResDiamondUpgrade.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResDiamondUpgrade) return object;
              var message = new $root.m_proto.ResDiamondUpgrade();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.level != null) message.level = object.level | 0;
              return message;
            }; /**
               * Creates a plain object from a ResDiamondUpgrade message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {m_proto.ResDiamondUpgrade} message ResDiamondUpgrade
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResDiamondUpgrade.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.level = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              return object;
            }; /**
               * Converts this ResDiamondUpgrade to JSON.
               * @function toJSON
               * @memberof m_proto.ResDiamondUpgrade
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResDiamondUpgrade.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResDiamondUpgrade
               * @function getTypeUrl
               * @memberof m_proto.ResDiamondUpgrade
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResDiamondUpgrade.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResDiamondUpgrade";
            };
            return ResDiamondUpgrade;
          }();
          m_proto.ReqShebeiUpgrade = function () {
            /**
            * Properties of a ReqShebeiUpgrade.
            * @memberof m_proto
            * @interface IReqShebeiUpgrade
            * @property {number|null} [building_uid] ReqShebeiUpgrade building_uid
            * @property {number|null} [building_id] ReqShebeiUpgrade building_id
            * @property {number|null} [shebei_id] ReqShebeiUpgrade shebei_id
            */ /**
               * Constructs a new ReqShebeiUpgrade.
               * @memberof m_proto
               * @classdesc Represents a ReqShebeiUpgrade.
               * @implements IReqShebeiUpgrade
               * @constructor
               * @param {m_proto.IReqShebeiUpgrade=} [properties] Properties to set
               */
            function ReqShebeiUpgrade(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqShebeiUpgrade building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqShebeiUpgrade
              * @instance
              */
            ReqShebeiUpgrade.prototype.building_uid = 0; /**
                                                         * ReqShebeiUpgrade building_id.
                                                         * @member {number} building_id
                                                         * @memberof m_proto.ReqShebeiUpgrade
                                                         * @instance
                                                         */
            ReqShebeiUpgrade.prototype.building_id = 0; /**
                                                        * ReqShebeiUpgrade shebei_id.
                                                        * @member {number} shebei_id
                                                        * @memberof m_proto.ReqShebeiUpgrade
                                                        * @instance
                                                        */
            ReqShebeiUpgrade.prototype.shebei_id = 0; /**
                                                      * Creates a new ReqShebeiUpgrade instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ReqShebeiUpgrade
                                                      * @static
                                                      * @param {m_proto.IReqShebeiUpgrade=} [properties] Properties to set
                                                      * @returns {m_proto.ReqShebeiUpgrade} ReqShebeiUpgrade instance
                                                      */
            ReqShebeiUpgrade.create = function create(properties) {
              return new ReqShebeiUpgrade(properties);
            }; /**
               * Encodes the specified ReqShebeiUpgrade message. Does not implicitly {@link m_proto.ReqShebeiUpgrade.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {m_proto.IReqShebeiUpgrade} message ReqShebeiUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqShebeiUpgrade.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              if (message.shebei_id != null && Object.hasOwnProperty.call(message, "shebei_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.shebei_id);
              return writer;
            }; /**
               * Encodes the specified ReqShebeiUpgrade message, length delimited. Does not implicitly {@link m_proto.ReqShebeiUpgrade.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {m_proto.IReqShebeiUpgrade} message ReqShebeiUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqShebeiUpgrade.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqShebeiUpgrade message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqShebeiUpgrade} ReqShebeiUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqShebeiUpgrade.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqShebeiUpgrade();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.shebei_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqShebeiUpgrade message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqShebeiUpgrade} ReqShebeiUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqShebeiUpgrade.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqShebeiUpgrade message.
               * @function verify
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqShebeiUpgrade.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.shebei_id != null && message.hasOwnProperty("shebei_id")) if (!$util.isInteger(message.shebei_id)) return "shebei_id: integer expected";
              return null;
            }; /**
               * Creates a ReqShebeiUpgrade message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqShebeiUpgrade} ReqShebeiUpgrade
               */
            ReqShebeiUpgrade.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqShebeiUpgrade) return object;
              var message = new $root.m_proto.ReqShebeiUpgrade();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.shebei_id != null) message.shebei_id = object.shebei_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqShebeiUpgrade message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {m_proto.ReqShebeiUpgrade} message ReqShebeiUpgrade
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqShebeiUpgrade.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
                object.shebei_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.shebei_id != null && message.hasOwnProperty("shebei_id")) object.shebei_id = message.shebei_id;
              return object;
            }; /**
               * Converts this ReqShebeiUpgrade to JSON.
               * @function toJSON
               * @memberof m_proto.ReqShebeiUpgrade
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqShebeiUpgrade.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqShebeiUpgrade
               * @function getTypeUrl
               * @memberof m_proto.ReqShebeiUpgrade
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqShebeiUpgrade.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqShebeiUpgrade";
            };
            return ReqShebeiUpgrade;
          }();
          m_proto.ResShebeiUpgrade = function () {
            /**
            * Properties of a ResShebeiUpgrade.
            * @memberof m_proto
            * @interface IResShebeiUpgrade
            * @property {number|null} [code] ResShebeiUpgrade code
            * @property {number|null} [building_uid] ResShebeiUpgrade building_uid
            * @property {number|null} [building_id] ResShebeiUpgrade building_id
            * @property {number|null} [shebei_id] ResShebeiUpgrade shebei_id
            * @property {number|null} [level] ResShebeiUpgrade level
            */ /**
               * Constructs a new ResShebeiUpgrade.
               * @memberof m_proto
               * @classdesc Represents a ResShebeiUpgrade.
               * @implements IResShebeiUpgrade
               * @constructor
               * @param {m_proto.IResShebeiUpgrade=} [properties] Properties to set
               */
            function ResShebeiUpgrade(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResShebeiUpgrade code.
              * @member {number} code
              * @memberof m_proto.ResShebeiUpgrade
              * @instance
              */
            ResShebeiUpgrade.prototype.code = 0; /**
                                                 * ResShebeiUpgrade building_uid.
                                                 * @member {number} building_uid
                                                 * @memberof m_proto.ResShebeiUpgrade
                                                 * @instance
                                                 */
            ResShebeiUpgrade.prototype.building_uid = 0; /**
                                                         * ResShebeiUpgrade building_id.
                                                         * @member {number} building_id
                                                         * @memberof m_proto.ResShebeiUpgrade
                                                         * @instance
                                                         */
            ResShebeiUpgrade.prototype.building_id = 0; /**
                                                        * ResShebeiUpgrade shebei_id.
                                                        * @member {number} shebei_id
                                                        * @memberof m_proto.ResShebeiUpgrade
                                                        * @instance
                                                        */
            ResShebeiUpgrade.prototype.shebei_id = 0; /**
                                                      * ResShebeiUpgrade level.
                                                      * @member {number} level
                                                      * @memberof m_proto.ResShebeiUpgrade
                                                      * @instance
                                                      */
            ResShebeiUpgrade.prototype.level = 0; /**
                                                  * Creates a new ResShebeiUpgrade instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ResShebeiUpgrade
                                                  * @static
                                                  * @param {m_proto.IResShebeiUpgrade=} [properties] Properties to set
                                                  * @returns {m_proto.ResShebeiUpgrade} ResShebeiUpgrade instance
                                                  */
            ResShebeiUpgrade.create = function create(properties) {
              return new ResShebeiUpgrade(properties);
            }; /**
               * Encodes the specified ResShebeiUpgrade message. Does not implicitly {@link m_proto.ResShebeiUpgrade.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {m_proto.IResShebeiUpgrade} message ResShebeiUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResShebeiUpgrade.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.shebei_id != null && Object.hasOwnProperty.call(message, "shebei_id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.shebei_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.level);
              return writer;
            }; /**
               * Encodes the specified ResShebeiUpgrade message, length delimited. Does not implicitly {@link m_proto.ResShebeiUpgrade.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {m_proto.IResShebeiUpgrade} message ResShebeiUpgrade message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResShebeiUpgrade.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResShebeiUpgrade message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResShebeiUpgrade} ResShebeiUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResShebeiUpgrade.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResShebeiUpgrade();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.shebei_id = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResShebeiUpgrade message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResShebeiUpgrade} ResShebeiUpgrade
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResShebeiUpgrade.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResShebeiUpgrade message.
               * @function verify
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResShebeiUpgrade.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.shebei_id != null && message.hasOwnProperty("shebei_id")) if (!$util.isInteger(message.shebei_id)) return "shebei_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              return null;
            }; /**
               * Creates a ResShebeiUpgrade message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResShebeiUpgrade} ResShebeiUpgrade
               */
            ResShebeiUpgrade.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResShebeiUpgrade) return object;
              var message = new $root.m_proto.ResShebeiUpgrade();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.shebei_id != null) message.shebei_id = object.shebei_id | 0;
              if (object.level != null) message.level = object.level | 0;
              return message;
            }; /**
               * Creates a plain object from a ResShebeiUpgrade message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {m_proto.ResShebeiUpgrade} message ResShebeiUpgrade
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResShebeiUpgrade.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.shebei_id = 0;
                object.level = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.shebei_id != null && message.hasOwnProperty("shebei_id")) object.shebei_id = message.shebei_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              return object;
            }; /**
               * Converts this ResShebeiUpgrade to JSON.
               * @function toJSON
               * @memberof m_proto.ResShebeiUpgrade
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResShebeiUpgrade.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResShebeiUpgrade
               * @function getTypeUrl
               * @memberof m_proto.ResShebeiUpgrade
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResShebeiUpgrade.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResShebeiUpgrade";
            };
            return ResShebeiUpgrade;
          }();
          m_proto.ReqTrain = function () {
            /**
            * Properties of a ReqTrain.
            * @memberof m_proto
            * @interface IReqTrain
            * @property {number|null} [building_uid] ReqTrain building_uid
            * @property {number|null} [building_id] ReqTrain building_id
            * @property {number|null} [count] ReqTrain count
            */ /**
               * Constructs a new ReqTrain.
               * @memberof m_proto
               * @classdesc Represents a ReqTrain.
               * @implements IReqTrain
               * @constructor
               * @param {m_proto.IReqTrain=} [properties] Properties to set
               */
            function ReqTrain(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqTrain building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqTrain
              * @instance
              */
            ReqTrain.prototype.building_uid = 0; /**
                                                 * ReqTrain building_id.
                                                 * @member {number} building_id
                                                 * @memberof m_proto.ReqTrain
                                                 * @instance
                                                 */
            ReqTrain.prototype.building_id = 0; /**
                                                * ReqTrain count.
                                                * @member {number} count
                                                * @memberof m_proto.ReqTrain
                                                * @instance
                                                */
            ReqTrain.prototype.count = 0; /**
                                          * Creates a new ReqTrain instance using the specified properties.
                                          * @function create
                                          * @memberof m_proto.ReqTrain
                                          * @static
                                          * @param {m_proto.IReqTrain=} [properties] Properties to set
                                          * @returns {m_proto.ReqTrain} ReqTrain instance
                                          */
            ReqTrain.create = function create(properties) {
              return new ReqTrain(properties);
            }; /**
               * Encodes the specified ReqTrain message. Does not implicitly {@link m_proto.ReqTrain.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqTrain
               * @static
               * @param {m_proto.IReqTrain} message ReqTrain message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqTrain.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.count);
              return writer;
            }; /**
               * Encodes the specified ReqTrain message, length delimited. Does not implicitly {@link m_proto.ReqTrain.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqTrain
               * @static
               * @param {m_proto.IReqTrain} message ReqTrain message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqTrain.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqTrain message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqTrain
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqTrain} ReqTrain
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqTrain.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqTrain();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqTrain message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqTrain
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqTrain} ReqTrain
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqTrain.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqTrain message.
               * @function verify
               * @memberof m_proto.ReqTrain
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqTrain.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.count != null && message.hasOwnProperty("count")) if (!$util.isInteger(message.count)) return "count: integer expected";
              return null;
            }; /**
               * Creates a ReqTrain message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqTrain
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqTrain} ReqTrain
               */
            ReqTrain.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqTrain) return object;
              var message = new $root.m_proto.ReqTrain();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.count != null) message.count = object.count | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqTrain message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqTrain
               * @static
               * @param {m_proto.ReqTrain} message ReqTrain
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqTrain.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
                object.count = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.count != null && message.hasOwnProperty("count")) object.count = message.count;
              return object;
            }; /**
               * Converts this ReqTrain to JSON.
               * @function toJSON
               * @memberof m_proto.ReqTrain
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqTrain.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqTrain
               * @function getTypeUrl
               * @memberof m_proto.ReqTrain
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqTrain.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqTrain";
            };
            return ReqTrain;
          }();
          m_proto.ResTrain = function () {
            /**
            * Properties of a ResTrain.
            * @memberof m_proto
            * @interface IResTrain
            * @property {number|null} [code] ResTrain code
            * @property {number|null} [building_uid] ResTrain building_uid
            * @property {number|null} [building_id] ResTrain building_id
            * @property {number|null} [total_people] ResTrain total_people
            * @property {number|null} [train_count] ResTrain train_count
            * @property {number|null} [training_duration] ResTrain training_duration
            * @property {number|null} [count] ResTrain count
            */ /**
               * Constructs a new ResTrain.
               * @memberof m_proto
               * @classdesc Represents a ResTrain.
               * @implements IResTrain
               * @constructor
               * @param {m_proto.IResTrain=} [properties] Properties to set
               */
            function ResTrain(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResTrain code.
              * @member {number} code
              * @memberof m_proto.ResTrain
              * @instance
              */
            ResTrain.prototype.code = 0; /**
                                         * ResTrain building_uid.
                                         * @member {number} building_uid
                                         * @memberof m_proto.ResTrain
                                         * @instance
                                         */
            ResTrain.prototype.building_uid = 0; /**
                                                 * ResTrain building_id.
                                                 * @member {number} building_id
                                                 * @memberof m_proto.ResTrain
                                                 * @instance
                                                 */
            ResTrain.prototype.building_id = 0; /**
                                                * ResTrain total_people.
                                                * @member {number} total_people
                                                * @memberof m_proto.ResTrain
                                                * @instance
                                                */
            ResTrain.prototype.total_people = 0; /**
                                                 * ResTrain train_count.
                                                 * @member {number} train_count
                                                 * @memberof m_proto.ResTrain
                                                 * @instance
                                                 */
            ResTrain.prototype.train_count = 0; /**
                                                * ResTrain training_duration.
                                                * @member {number} training_duration
                                                * @memberof m_proto.ResTrain
                                                * @instance
                                                */
            ResTrain.prototype.training_duration = 0; /**
                                                      * ResTrain count.
                                                      * @member {number} count
                                                      * @memberof m_proto.ResTrain
                                                      * @instance
                                                      */
            ResTrain.prototype.count = 0; /**
                                          * Creates a new ResTrain instance using the specified properties.
                                          * @function create
                                          * @memberof m_proto.ResTrain
                                          * @static
                                          * @param {m_proto.IResTrain=} [properties] Properties to set
                                          * @returns {m_proto.ResTrain} ResTrain instance
                                          */
            ResTrain.create = function create(properties) {
              return new ResTrain(properties);
            }; /**
               * Encodes the specified ResTrain message. Does not implicitly {@link m_proto.ResTrain.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResTrain
               * @static
               * @param {m_proto.IResTrain} message ResTrain message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTrain.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.total_people != null && Object.hasOwnProperty.call(message, "total_people")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.total_people);
              if (message.train_count != null && Object.hasOwnProperty.call(message, "train_count")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.train_count);
              if (message.training_duration != null && Object.hasOwnProperty.call(message, "training_duration")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.training_duration);
              if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.count);
              return writer;
            }; /**
               * Encodes the specified ResTrain message, length delimited. Does not implicitly {@link m_proto.ResTrain.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResTrain
               * @static
               * @param {m_proto.IResTrain} message ResTrain message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTrain.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResTrain message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResTrain
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResTrain} ResTrain
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTrain.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResTrain();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.total_people = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.train_count = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.training_duration = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResTrain message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResTrain
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResTrain} ResTrain
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTrain.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResTrain message.
               * @function verify
               * @memberof m_proto.ResTrain
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResTrain.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.total_people != null && message.hasOwnProperty("total_people")) if (!$util.isInteger(message.total_people)) return "total_people: integer expected";
              if (message.train_count != null && message.hasOwnProperty("train_count")) if (!$util.isInteger(message.train_count)) return "train_count: integer expected";
              if (message.training_duration != null && message.hasOwnProperty("training_duration")) if (!$util.isInteger(message.training_duration)) return "training_duration: integer expected";
              if (message.count != null && message.hasOwnProperty("count")) if (!$util.isInteger(message.count)) return "count: integer expected";
              return null;
            }; /**
               * Creates a ResTrain message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResTrain
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResTrain} ResTrain
               */
            ResTrain.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResTrain) return object;
              var message = new $root.m_proto.ResTrain();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.total_people != null) message.total_people = object.total_people | 0;
              if (object.train_count != null) message.train_count = object.train_count | 0;
              if (object.training_duration != null) message.training_duration = object.training_duration | 0;
              if (object.count != null) message.count = object.count | 0;
              return message;
            }; /**
               * Creates a plain object from a ResTrain message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResTrain
               * @static
               * @param {m_proto.ResTrain} message ResTrain
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResTrain.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.total_people = 0;
                object.train_count = 0;
                object.training_duration = 0;
                object.count = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.total_people != null && message.hasOwnProperty("total_people")) object.total_people = message.total_people;
              if (message.train_count != null && message.hasOwnProperty("train_count")) object.train_count = message.train_count;
              if (message.training_duration != null && message.hasOwnProperty("training_duration")) object.training_duration = message.training_duration;
              if (message.count != null && message.hasOwnProperty("count")) object.count = message.count;
              return object;
            }; /**
               * Converts this ResTrain to JSON.
               * @function toJSON
               * @memberof m_proto.ResTrain
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResTrain.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResTrain
               * @function getTypeUrl
               * @memberof m_proto.ResTrain
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResTrain.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResTrain";
            };
            return ResTrain;
          }();
          m_proto.ResTrainFinish = function () {
            /**
            * Properties of a ResTrainFinish.
            * @memberof m_proto
            * @interface IResTrainFinish
            * @property {number|null} [code] ResTrainFinish code
            * @property {number|null} [building_uid] ResTrainFinish building_uid
            * @property {number|null} [building_id] ResTrainFinish building_id
            * @property {number|null} [train_count] ResTrainFinish train_count
            * @property {number|null} [reserve_count] ResTrainFinish reserve_count
            * @property {number|null} [training_duration] ResTrainFinish training_duration
            */ /**
               * Constructs a new ResTrainFinish.
               * @memberof m_proto
               * @classdesc Represents a ResTrainFinish.
               * @implements IResTrainFinish
               * @constructor
               * @param {m_proto.IResTrainFinish=} [properties] Properties to set
               */
            function ResTrainFinish(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResTrainFinish code.
              * @member {number} code
              * @memberof m_proto.ResTrainFinish
              * @instance
              */
            ResTrainFinish.prototype.code = 0; /**
                                               * ResTrainFinish building_uid.
                                               * @member {number} building_uid
                                               * @memberof m_proto.ResTrainFinish
                                               * @instance
                                               */
            ResTrainFinish.prototype.building_uid = 0; /**
                                                       * ResTrainFinish building_id.
                                                       * @member {number} building_id
                                                       * @memberof m_proto.ResTrainFinish
                                                       * @instance
                                                       */
            ResTrainFinish.prototype.building_id = 0; /**
                                                      * ResTrainFinish train_count.
                                                      * @member {number} train_count
                                                      * @memberof m_proto.ResTrainFinish
                                                      * @instance
                                                      */
            ResTrainFinish.prototype.train_count = 0; /**
                                                      * ResTrainFinish reserve_count.
                                                      * @member {number} reserve_count
                                                      * @memberof m_proto.ResTrainFinish
                                                      * @instance
                                                      */
            ResTrainFinish.prototype.reserve_count = 0; /**
                                                        * ResTrainFinish training_duration.
                                                        * @member {number} training_duration
                                                        * @memberof m_proto.ResTrainFinish
                                                        * @instance
                                                        */
            ResTrainFinish.prototype.training_duration = 0; /**
                                                            * Creates a new ResTrainFinish instance using the specified properties.
                                                            * @function create
                                                            * @memberof m_proto.ResTrainFinish
                                                            * @static
                                                            * @param {m_proto.IResTrainFinish=} [properties] Properties to set
                                                            * @returns {m_proto.ResTrainFinish} ResTrainFinish instance
                                                            */
            ResTrainFinish.create = function create(properties) {
              return new ResTrainFinish(properties);
            }; /**
               * Encodes the specified ResTrainFinish message. Does not implicitly {@link m_proto.ResTrainFinish.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {m_proto.IResTrainFinish} message ResTrainFinish message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTrainFinish.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.train_count != null && Object.hasOwnProperty.call(message, "train_count")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.train_count);
              if (message.reserve_count != null && Object.hasOwnProperty.call(message, "reserve_count")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.reserve_count);
              if (message.training_duration != null && Object.hasOwnProperty.call(message, "training_duration")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.training_duration);
              return writer;
            }; /**
               * Encodes the specified ResTrainFinish message, length delimited. Does not implicitly {@link m_proto.ResTrainFinish.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {m_proto.IResTrainFinish} message ResTrainFinish message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTrainFinish.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResTrainFinish message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResTrainFinish} ResTrainFinish
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTrainFinish.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResTrainFinish();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.train_count = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.reserve_count = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.training_duration = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResTrainFinish message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResTrainFinish} ResTrainFinish
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTrainFinish.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResTrainFinish message.
               * @function verify
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResTrainFinish.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.train_count != null && message.hasOwnProperty("train_count")) if (!$util.isInteger(message.train_count)) return "train_count: integer expected";
              if (message.reserve_count != null && message.hasOwnProperty("reserve_count")) if (!$util.isInteger(message.reserve_count)) return "reserve_count: integer expected";
              if (message.training_duration != null && message.hasOwnProperty("training_duration")) if (!$util.isInteger(message.training_duration)) return "training_duration: integer expected";
              return null;
            }; /**
               * Creates a ResTrainFinish message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResTrainFinish} ResTrainFinish
               */
            ResTrainFinish.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResTrainFinish) return object;
              var message = new $root.m_proto.ResTrainFinish();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.train_count != null) message.train_count = object.train_count | 0;
              if (object.reserve_count != null) message.reserve_count = object.reserve_count | 0;
              if (object.training_duration != null) message.training_duration = object.training_duration | 0;
              return message;
            }; /**
               * Creates a plain object from a ResTrainFinish message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {m_proto.ResTrainFinish} message ResTrainFinish
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResTrainFinish.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.train_count = 0;
                object.reserve_count = 0;
                object.training_duration = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.train_count != null && message.hasOwnProperty("train_count")) object.train_count = message.train_count;
              if (message.reserve_count != null && message.hasOwnProperty("reserve_count")) object.reserve_count = message.reserve_count;
              if (message.training_duration != null && message.hasOwnProperty("training_duration")) object.training_duration = message.training_duration;
              return object;
            }; /**
               * Converts this ResTrainFinish to JSON.
               * @function toJSON
               * @memberof m_proto.ResTrainFinish
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResTrainFinish.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResTrainFinish
               * @function getTypeUrl
               * @memberof m_proto.ResTrainFinish
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResTrainFinish.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResTrainFinish";
            };
            return ResTrainFinish;
          }();
          m_proto.ReqGetReserve = function () {
            /**
            * Properties of a ReqGetReserve.
            * @memberof m_proto
            * @interface IReqGetReserve
            * @property {number|null} [building_uid] ReqGetReserve building_uid
            * @property {number|null} [building_id] ReqGetReserve building_id
            */ /**
               * Constructs a new ReqGetReserve.
               * @memberof m_proto
               * @classdesc Represents a ReqGetReserve.
               * @implements IReqGetReserve
               * @constructor
               * @param {m_proto.IReqGetReserve=} [properties] Properties to set
               */
            function ReqGetReserve(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqGetReserve building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqGetReserve
              * @instance
              */
            ReqGetReserve.prototype.building_uid = 0; /**
                                                      * ReqGetReserve building_id.
                                                      * @member {number} building_id
                                                      * @memberof m_proto.ReqGetReserve
                                                      * @instance
                                                      */
            ReqGetReserve.prototype.building_id = 0; /**
                                                     * Creates a new ReqGetReserve instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ReqGetReserve
                                                     * @static
                                                     * @param {m_proto.IReqGetReserve=} [properties] Properties to set
                                                     * @returns {m_proto.ReqGetReserve} ReqGetReserve instance
                                                     */
            ReqGetReserve.create = function create(properties) {
              return new ReqGetReserve(properties);
            }; /**
               * Encodes the specified ReqGetReserve message. Does not implicitly {@link m_proto.ReqGetReserve.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {m_proto.IReqGetReserve} message ReqGetReserve message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGetReserve.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified ReqGetReserve message, length delimited. Does not implicitly {@link m_proto.ReqGetReserve.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {m_proto.IReqGetReserve} message ReqGetReserve message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGetReserve.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqGetReserve message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqGetReserve} ReqGetReserve
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGetReserve.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqGetReserve();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqGetReserve message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqGetReserve} ReqGetReserve
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGetReserve.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqGetReserve message.
               * @function verify
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqGetReserve.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates a ReqGetReserve message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqGetReserve} ReqGetReserve
               */
            ReqGetReserve.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqGetReserve) return object;
              var message = new $root.m_proto.ReqGetReserve();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqGetReserve message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {m_proto.ReqGetReserve} message ReqGetReserve
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqGetReserve.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this ReqGetReserve to JSON.
               * @function toJSON
               * @memberof m_proto.ReqGetReserve
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqGetReserve.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqGetReserve
               * @function getTypeUrl
               * @memberof m_proto.ReqGetReserve
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqGetReserve.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqGetReserve";
            };
            return ReqGetReserve;
          }();
          m_proto.ResGetReserve = function () {
            /**
            * Properties of a ResGetReserve.
            * @memberof m_proto
            * @interface IResGetReserve
            * @property {number|null} [code] ResGetReserve code
            * @property {number|null} [building_uid] ResGetReserve building_uid
            * @property {number|null} [building_id] ResGetReserve building_id
            * @property {number|null} [reserve_count] ResGetReserve reserve_count
            */ /**
               * Constructs a new ResGetReserve.
               * @memberof m_proto
               * @classdesc Represents a ResGetReserve.
               * @implements IResGetReserve
               * @constructor
               * @param {m_proto.IResGetReserve=} [properties] Properties to set
               */
            function ResGetReserve(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGetReserve code.
              * @member {number} code
              * @memberof m_proto.ResGetReserve
              * @instance
              */
            ResGetReserve.prototype.code = 0; /**
                                              * ResGetReserve building_uid.
                                              * @member {number} building_uid
                                              * @memberof m_proto.ResGetReserve
                                              * @instance
                                              */
            ResGetReserve.prototype.building_uid = 0; /**
                                                      * ResGetReserve building_id.
                                                      * @member {number} building_id
                                                      * @memberof m_proto.ResGetReserve
                                                      * @instance
                                                      */
            ResGetReserve.prototype.building_id = 0; /**
                                                     * ResGetReserve reserve_count.
                                                     * @member {number} reserve_count
                                                     * @memberof m_proto.ResGetReserve
                                                     * @instance
                                                     */
            ResGetReserve.prototype.reserve_count = 0; /**
                                                       * Creates a new ResGetReserve instance using the specified properties.
                                                       * @function create
                                                       * @memberof m_proto.ResGetReserve
                                                       * @static
                                                       * @param {m_proto.IResGetReserve=} [properties] Properties to set
                                                       * @returns {m_proto.ResGetReserve} ResGetReserve instance
                                                       */
            ResGetReserve.create = function create(properties) {
              return new ResGetReserve(properties);
            }; /**
               * Encodes the specified ResGetReserve message. Does not implicitly {@link m_proto.ResGetReserve.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {m_proto.IResGetReserve} message ResGetReserve message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGetReserve.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.reserve_count != null && Object.hasOwnProperty.call(message, "reserve_count")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.reserve_count);
              return writer;
            }; /**
               * Encodes the specified ResGetReserve message, length delimited. Does not implicitly {@link m_proto.ResGetReserve.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {m_proto.IResGetReserve} message ResGetReserve message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGetReserve.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGetReserve message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGetReserve} ResGetReserve
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGetReserve.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGetReserve();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.reserve_count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGetReserve message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGetReserve} ResGetReserve
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGetReserve.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGetReserve message.
               * @function verify
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGetReserve.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.reserve_count != null && message.hasOwnProperty("reserve_count")) if (!$util.isInteger(message.reserve_count)) return "reserve_count: integer expected";
              return null;
            }; /**
               * Creates a ResGetReserve message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGetReserve} ResGetReserve
               */
            ResGetReserve.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGetReserve) return object;
              var message = new $root.m_proto.ResGetReserve();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.reserve_count != null) message.reserve_count = object.reserve_count | 0;
              return message;
            }; /**
               * Creates a plain object from a ResGetReserve message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {m_proto.ResGetReserve} message ResGetReserve
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGetReserve.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.reserve_count = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.reserve_count != null && message.hasOwnProperty("reserve_count")) object.reserve_count = message.reserve_count;
              return object;
            }; /**
               * Converts this ResGetReserve to JSON.
               * @function toJSON
               * @memberof m_proto.ResGetReserve
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGetReserve.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGetReserve
               * @function getTypeUrl
               * @memberof m_proto.ResGetReserve
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGetReserve.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGetReserve";
            };
            return ResGetReserve;
          }();
          m_proto.ReqAssignHeroInfo = function () {
            /**
            * Properties of a ReqAssignHeroInfo.
            * @memberof m_proto
            * @interface IReqAssignHeroInfo
            */ /**
               * Constructs a new ReqAssignHeroInfo.
               * @memberof m_proto
               * @classdesc Represents a ReqAssignHeroInfo.
               * @implements IReqAssignHeroInfo
               * @constructor
               * @param {m_proto.IReqAssignHeroInfo=} [properties] Properties to set
               */
            function ReqAssignHeroInfo(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqAssignHeroInfo instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqAssignHeroInfo
              * @static
              * @param {m_proto.IReqAssignHeroInfo=} [properties] Properties to set
              * @returns {m_proto.ReqAssignHeroInfo} ReqAssignHeroInfo instance
              */
            ReqAssignHeroInfo.create = function create(properties) {
              return new ReqAssignHeroInfo(properties);
            }; /**
               * Encodes the specified ReqAssignHeroInfo message. Does not implicitly {@link m_proto.ReqAssignHeroInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {m_proto.IReqAssignHeroInfo} message ReqAssignHeroInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAssignHeroInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqAssignHeroInfo message, length delimited. Does not implicitly {@link m_proto.ReqAssignHeroInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {m_proto.IReqAssignHeroInfo} message ReqAssignHeroInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAssignHeroInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqAssignHeroInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqAssignHeroInfo} ReqAssignHeroInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAssignHeroInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqAssignHeroInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqAssignHeroInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqAssignHeroInfo} ReqAssignHeroInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAssignHeroInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqAssignHeroInfo message.
               * @function verify
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqAssignHeroInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqAssignHeroInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqAssignHeroInfo} ReqAssignHeroInfo
               */
            ReqAssignHeroInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqAssignHeroInfo) return object;
              return new $root.m_proto.ReqAssignHeroInfo();
            }; /**
               * Creates a plain object from a ReqAssignHeroInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {m_proto.ReqAssignHeroInfo} message ReqAssignHeroInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqAssignHeroInfo.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqAssignHeroInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ReqAssignHeroInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqAssignHeroInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqAssignHeroInfo
               * @function getTypeUrl
               * @memberof m_proto.ReqAssignHeroInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqAssignHeroInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqAssignHeroInfo";
            };
            return ReqAssignHeroInfo;
          }();
          m_proto.ResAssignHeroInfo = function () {
            /**
            * Properties of a ResAssignHeroInfo.
            * @memberof m_proto
            * @interface IResAssignHeroInfo
            * @property {number|null} [code] ResAssignHeroInfo code
            * @property {Array.<m_proto.IAssignHero>|null} [heros] ResAssignHeroInfo heros
            */ /**
               * Constructs a new ResAssignHeroInfo.
               * @memberof m_proto
               * @classdesc Represents a ResAssignHeroInfo.
               * @implements IResAssignHeroInfo
               * @constructor
               * @param {m_proto.IResAssignHeroInfo=} [properties] Properties to set
               */
            function ResAssignHeroInfo(properties) {
              this.heros = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResAssignHeroInfo code.
              * @member {number} code
              * @memberof m_proto.ResAssignHeroInfo
              * @instance
              */
            ResAssignHeroInfo.prototype.code = 0; /**
                                                  * ResAssignHeroInfo heros.
                                                  * @member {Array.<m_proto.IAssignHero>} heros
                                                  * @memberof m_proto.ResAssignHeroInfo
                                                  * @instance
                                                  */
            ResAssignHeroInfo.prototype.heros = $util.emptyArray; /**
                                                                  * Creates a new ResAssignHeroInfo instance using the specified properties.
                                                                  * @function create
                                                                  * @memberof m_proto.ResAssignHeroInfo
                                                                  * @static
                                                                  * @param {m_proto.IResAssignHeroInfo=} [properties] Properties to set
                                                                  * @returns {m_proto.ResAssignHeroInfo} ResAssignHeroInfo instance
                                                                  */
            ResAssignHeroInfo.create = function create(properties) {
              return new ResAssignHeroInfo(properties);
            }; /**
               * Encodes the specified ResAssignHeroInfo message. Does not implicitly {@link m_proto.ResAssignHeroInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {m_proto.IResAssignHeroInfo} message ResAssignHeroInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAssignHeroInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.heros != null && message.heros.length) for (var i = 0; i < message.heros.length; ++i) $root.m_proto.AssignHero.encode(message.heros[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResAssignHeroInfo message, length delimited. Does not implicitly {@link m_proto.ResAssignHeroInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {m_proto.IResAssignHeroInfo} message ResAssignHeroInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAssignHeroInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResAssignHeroInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResAssignHeroInfo} ResAssignHeroInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAssignHeroInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResAssignHeroInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.heros && message.heros.length)) message.heros = [];
                      message.heros.push($root.m_proto.AssignHero.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResAssignHeroInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResAssignHeroInfo} ResAssignHeroInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAssignHeroInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResAssignHeroInfo message.
               * @function verify
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResAssignHeroInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.heros != null && message.hasOwnProperty("heros")) {
                if (!Array.isArray(message.heros)) return "heros: array expected";
                for (var i = 0; i < message.heros.length; ++i) {
                  var error = $root.m_proto.AssignHero.verify(message.heros[i]);
                  if (error) return "heros." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResAssignHeroInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResAssignHeroInfo} ResAssignHeroInfo
               */
            ResAssignHeroInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResAssignHeroInfo) return object;
              var message = new $root.m_proto.ResAssignHeroInfo();
              if (object.code != null) message.code = object.code | 0;
              if (object.heros) {
                if (!Array.isArray(object.heros)) throw TypeError(".m_proto.ResAssignHeroInfo.heros: array expected");
                message.heros = [];
                for (var i = 0; i < object.heros.length; ++i) {
                  if (typeof object.heros[i] !== "object") throw TypeError(".m_proto.ResAssignHeroInfo.heros: object expected");
                  message.heros[i] = $root.m_proto.AssignHero.fromObject(object.heros[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResAssignHeroInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {m_proto.ResAssignHeroInfo} message ResAssignHeroInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResAssignHeroInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.heros = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.heros && message.heros.length) {
                object.heros = [];
                for (var j = 0; j < message.heros.length; ++j) object.heros[j] = $root.m_proto.AssignHero.toObject(message.heros[j], options);
              }
              return object;
            }; /**
               * Converts this ResAssignHeroInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ResAssignHeroInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResAssignHeroInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResAssignHeroInfo
               * @function getTypeUrl
               * @memberof m_proto.ResAssignHeroInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResAssignHeroInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResAssignHeroInfo";
            };
            return ResAssignHeroInfo;
          }();
          m_proto.AssignHero = function () {
            /**
            * Properties of an AssignHero.
            * @memberof m_proto
            * @interface IAssignHero
            * @property {number|null} [hero_id] AssignHero hero_id
            * @property {number|null} [level] AssignHero level
            * @property {number|null} [stage] AssignHero stage
            * @property {number|null} [star] AssignHero star
            * @property {number|null} [rate] AssignHero rate
            * @property {number|null} [building_uid] AssignHero building_uid
            * @property {number|null} [building_id] AssignHero building_id
            */ /**
               * Constructs a new AssignHero.
               * @memberof m_proto
               * @classdesc Represents an AssignHero.
               * @implements IAssignHero
               * @constructor
               * @param {m_proto.IAssignHero=} [properties] Properties to set
               */
            function AssignHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * AssignHero hero_id.
              * @member {number} hero_id
              * @memberof m_proto.AssignHero
              * @instance
              */
            AssignHero.prototype.hero_id = 0; /**
                                              * AssignHero level.
                                              * @member {number} level
                                              * @memberof m_proto.AssignHero
                                              * @instance
                                              */
            AssignHero.prototype.level = 0; /**
                                            * AssignHero stage.
                                            * @member {number} stage
                                            * @memberof m_proto.AssignHero
                                            * @instance
                                            */
            AssignHero.prototype.stage = 0; /**
                                            * AssignHero star.
                                            * @member {number} star
                                            * @memberof m_proto.AssignHero
                                            * @instance
                                            */
            AssignHero.prototype.star = 0; /**
                                           * AssignHero rate.
                                           * @member {number} rate
                                           * @memberof m_proto.AssignHero
                                           * @instance
                                           */
            AssignHero.prototype.rate = 0; /**
                                           * AssignHero building_uid.
                                           * @member {number} building_uid
                                           * @memberof m_proto.AssignHero
                                           * @instance
                                           */
            AssignHero.prototype.building_uid = 0; /**
                                                   * AssignHero building_id.
                                                   * @member {number} building_id
                                                   * @memberof m_proto.AssignHero
                                                   * @instance
                                                   */
            AssignHero.prototype.building_id = 0; /**
                                                  * Creates a new AssignHero instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.AssignHero
                                                  * @static
                                                  * @param {m_proto.IAssignHero=} [properties] Properties to set
                                                  * @returns {m_proto.AssignHero} AssignHero instance
                                                  */
            AssignHero.create = function create(properties) {
              return new AssignHero(properties);
            }; /**
               * Encodes the specified AssignHero message. Does not implicitly {@link m_proto.AssignHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.AssignHero
               * @static
               * @param {m_proto.IAssignHero} message AssignHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            AssignHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.level);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.stage);
              if (message.star != null && Object.hasOwnProperty.call(message, "star")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.star);
              if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.rate);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified AssignHero message, length delimited. Does not implicitly {@link m_proto.AssignHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.AssignHero
               * @static
               * @param {m_proto.IAssignHero} message AssignHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            AssignHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes an AssignHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.AssignHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.AssignHero} AssignHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            AssignHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.AssignHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.star = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.rate = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes an AssignHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.AssignHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.AssignHero} AssignHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            AssignHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies an AssignHero message.
               * @function verify
               * @memberof m_proto.AssignHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            AssignHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              if (message.star != null && message.hasOwnProperty("star")) if (!$util.isInteger(message.star)) return "star: integer expected";
              if (message.rate != null && message.hasOwnProperty("rate")) if (!$util.isInteger(message.rate)) return "rate: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates an AssignHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.AssignHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.AssignHero} AssignHero
               */
            AssignHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.AssignHero) return object;
              var message = new $root.m_proto.AssignHero();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.level != null) message.level = object.level | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              if (object.star != null) message.star = object.star | 0;
              if (object.rate != null) message.rate = object.rate | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from an AssignHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.AssignHero
               * @static
               * @param {m_proto.AssignHero} message AssignHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            AssignHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.hero_id = 0;
                object.level = 0;
                object.stage = 0;
                object.star = 0;
                object.rate = 0;
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              if (message.star != null && message.hasOwnProperty("star")) object.star = message.star;
              if (message.rate != null && message.hasOwnProperty("rate")) object.rate = message.rate;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this AssignHero to JSON.
               * @function toJSON
               * @memberof m_proto.AssignHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            AssignHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for AssignHero
               * @function getTypeUrl
               * @memberof m_proto.AssignHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            AssignHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.AssignHero";
            };
            return AssignHero;
          }();
          m_proto.ReqAssignHero = function () {
            /**
            * Properties of a ReqAssignHero.
            * @memberof m_proto
            * @interface IReqAssignHero
            * @property {number|null} [type] ReqAssignHero type
            * @property {number|null} [building_uid] ReqAssignHero building_uid
            * @property {number|null} [building_id] ReqAssignHero building_id
            * @property {number|null} [hero_id] ReqAssignHero hero_id
            */ /**
               * Constructs a new ReqAssignHero.
               * @memberof m_proto
               * @classdesc Represents a ReqAssignHero.
               * @implements IReqAssignHero
               * @constructor
               * @param {m_proto.IReqAssignHero=} [properties] Properties to set
               */
            function ReqAssignHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqAssignHero type.
              * @member {number} type
              * @memberof m_proto.ReqAssignHero
              * @instance
              */
            ReqAssignHero.prototype.type = 0; /**
                                              * ReqAssignHero building_uid.
                                              * @member {number} building_uid
                                              * @memberof m_proto.ReqAssignHero
                                              * @instance
                                              */
            ReqAssignHero.prototype.building_uid = 0; /**
                                                      * ReqAssignHero building_id.
                                                      * @member {number} building_id
                                                      * @memberof m_proto.ReqAssignHero
                                                      * @instance
                                                      */
            ReqAssignHero.prototype.building_id = 0; /**
                                                     * ReqAssignHero hero_id.
                                                     * @member {number} hero_id
                                                     * @memberof m_proto.ReqAssignHero
                                                     * @instance
                                                     */
            ReqAssignHero.prototype.hero_id = 0; /**
                                                 * Creates a new ReqAssignHero instance using the specified properties.
                                                 * @function create
                                                 * @memberof m_proto.ReqAssignHero
                                                 * @static
                                                 * @param {m_proto.IReqAssignHero=} [properties] Properties to set
                                                 * @returns {m_proto.ReqAssignHero} ReqAssignHero instance
                                                 */
            ReqAssignHero.create = function create(properties) {
              return new ReqAssignHero(properties);
            }; /**
               * Encodes the specified ReqAssignHero message. Does not implicitly {@link m_proto.ReqAssignHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {m_proto.IReqAssignHero} message ReqAssignHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAssignHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.type);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqAssignHero message, length delimited. Does not implicitly {@link m_proto.ReqAssignHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {m_proto.IReqAssignHero} message ReqAssignHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAssignHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqAssignHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqAssignHero} ReqAssignHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAssignHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqAssignHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.type = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqAssignHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqAssignHero} ReqAssignHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAssignHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqAssignHero message.
               * @function verify
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqAssignHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqAssignHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqAssignHero} ReqAssignHero
               */
            ReqAssignHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqAssignHero) return object;
              var message = new $root.m_proto.ReqAssignHero();
              if (object.type != null) message.type = object.type | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqAssignHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {m_proto.ReqAssignHero} message ReqAssignHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqAssignHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.type = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.hero_id = 0;
              }
              if (message.type != null && message.hasOwnProperty("type")) object.type = message.type;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqAssignHero to JSON.
               * @function toJSON
               * @memberof m_proto.ReqAssignHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqAssignHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqAssignHero
               * @function getTypeUrl
               * @memberof m_proto.ReqAssignHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqAssignHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqAssignHero";
            };
            return ReqAssignHero;
          }();
          m_proto.ResAssignHero = function () {
            /**
            * Properties of a ResAssignHero.
            * @memberof m_proto
            * @interface IResAssignHero
            * @property {number|null} [code] ResAssignHero code
            * @property {number|null} [type] ResAssignHero type
            * @property {m_proto.IAssignHero|null} [assign_hero] ResAssignHero assign_hero
            */ /**
               * Constructs a new ResAssignHero.
               * @memberof m_proto
               * @classdesc Represents a ResAssignHero.
               * @implements IResAssignHero
               * @constructor
               * @param {m_proto.IResAssignHero=} [properties] Properties to set
               */
            function ResAssignHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResAssignHero code.
              * @member {number} code
              * @memberof m_proto.ResAssignHero
              * @instance
              */
            ResAssignHero.prototype.code = 0; /**
                                              * ResAssignHero type.
                                              * @member {number} type
                                              * @memberof m_proto.ResAssignHero
                                              * @instance
                                              */
            ResAssignHero.prototype.type = 0; /**
                                              * ResAssignHero assign_hero.
                                              * @member {m_proto.IAssignHero|null|undefined} assign_hero
                                              * @memberof m_proto.ResAssignHero
                                              * @instance
                                              */
            ResAssignHero.prototype.assign_hero = null; /**
                                                        * Creates a new ResAssignHero instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ResAssignHero
                                                        * @static
                                                        * @param {m_proto.IResAssignHero=} [properties] Properties to set
                                                        * @returns {m_proto.ResAssignHero} ResAssignHero instance
                                                        */
            ResAssignHero.create = function create(properties) {
              return new ResAssignHero(properties);
            }; /**
               * Encodes the specified ResAssignHero message. Does not implicitly {@link m_proto.ResAssignHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {m_proto.IResAssignHero} message ResAssignHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAssignHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.type);
              if (message.assign_hero != null && Object.hasOwnProperty.call(message, "assign_hero")) $root.m_proto.AssignHero.encode(message.assign_hero, writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResAssignHero message, length delimited. Does not implicitly {@link m_proto.ResAssignHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {m_proto.IResAssignHero} message ResAssignHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAssignHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResAssignHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResAssignHero} ResAssignHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAssignHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResAssignHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.type = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.assign_hero = $root.m_proto.AssignHero.decode(reader, reader.uint32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResAssignHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResAssignHero} ResAssignHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAssignHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResAssignHero message.
               * @function verify
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResAssignHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected";
              if (message.assign_hero != null && message.hasOwnProperty("assign_hero")) {
                var error = $root.m_proto.AssignHero.verify(message.assign_hero);
                if (error) return "assign_hero." + error;
              }
              return null;
            }; /**
               * Creates a ResAssignHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResAssignHero} ResAssignHero
               */
            ResAssignHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResAssignHero) return object;
              var message = new $root.m_proto.ResAssignHero();
              if (object.code != null) message.code = object.code | 0;
              if (object.type != null) message.type = object.type | 0;
              if (object.assign_hero != null) {
                if (typeof object.assign_hero !== "object") throw TypeError(".m_proto.ResAssignHero.assign_hero: object expected");
                message.assign_hero = $root.m_proto.AssignHero.fromObject(object.assign_hero);
              }
              return message;
            }; /**
               * Creates a plain object from a ResAssignHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {m_proto.ResAssignHero} message ResAssignHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResAssignHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.type = 0;
                object.assign_hero = null;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.type != null && message.hasOwnProperty("type")) object.type = message.type;
              if (message.assign_hero != null && message.hasOwnProperty("assign_hero")) object.assign_hero = $root.m_proto.AssignHero.toObject(message.assign_hero, options);
              return object;
            }; /**
               * Converts this ResAssignHero to JSON.
               * @function toJSON
               * @memberof m_proto.ResAssignHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResAssignHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResAssignHero
               * @function getTypeUrl
               * @memberof m_proto.ResAssignHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResAssignHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResAssignHero";
            };
            return ResAssignHero;
          }();
          m_proto.ServicePerson = function () {
            /**
            * Properties of a ServicePerson.
            * @memberof m_proto
            * @interface IServicePerson
            * @property {number|null} [soldiertype] ServicePerson soldiertype
            * @property {number|null} [count] ServicePerson count
            */ /**
               * Constructs a new ServicePerson.
               * @memberof m_proto
               * @classdesc Represents a ServicePerson.
               * @implements IServicePerson
               * @constructor
               * @param {m_proto.IServicePerson=} [properties] Properties to set
               */
            function ServicePerson(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ServicePerson soldiertype.
              * @member {number} soldiertype
              * @memberof m_proto.ServicePerson
              * @instance
              */
            ServicePerson.prototype.soldiertype = 0; /**
                                                     * ServicePerson count.
                                                     * @member {number} count
                                                     * @memberof m_proto.ServicePerson
                                                     * @instance
                                                     */
            ServicePerson.prototype.count = 0; /**
                                               * Creates a new ServicePerson instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ServicePerson
                                               * @static
                                               * @param {m_proto.IServicePerson=} [properties] Properties to set
                                               * @returns {m_proto.ServicePerson} ServicePerson instance
                                               */
            ServicePerson.create = function create(properties) {
              return new ServicePerson(properties);
            }; /**
               * Encodes the specified ServicePerson message. Does not implicitly {@link m_proto.ServicePerson.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ServicePerson
               * @static
               * @param {m_proto.IServicePerson} message ServicePerson message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ServicePerson.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldiertype != null && Object.hasOwnProperty.call(message, "soldiertype")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldiertype);
              if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.count);
              return writer;
            }; /**
               * Encodes the specified ServicePerson message, length delimited. Does not implicitly {@link m_proto.ServicePerson.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ServicePerson
               * @static
               * @param {m_proto.IServicePerson} message ServicePerson message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ServicePerson.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ServicePerson message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ServicePerson
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ServicePerson} ServicePerson
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ServicePerson.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ServicePerson();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldiertype = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ServicePerson message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ServicePerson
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ServicePerson} ServicePerson
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ServicePerson.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ServicePerson message.
               * @function verify
               * @memberof m_proto.ServicePerson
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ServicePerson.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldiertype != null && message.hasOwnProperty("soldiertype")) if (!$util.isInteger(message.soldiertype)) return "soldiertype: integer expected";
              if (message.count != null && message.hasOwnProperty("count")) if (!$util.isInteger(message.count)) return "count: integer expected";
              return null;
            }; /**
               * Creates a ServicePerson message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ServicePerson
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ServicePerson} ServicePerson
               */
            ServicePerson.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ServicePerson) return object;
              var message = new $root.m_proto.ServicePerson();
              if (object.soldiertype != null) message.soldiertype = object.soldiertype | 0;
              if (object.count != null) message.count = object.count | 0;
              return message;
            }; /**
               * Creates a plain object from a ServicePerson message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ServicePerson
               * @static
               * @param {m_proto.ServicePerson} message ServicePerson
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ServicePerson.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.soldiertype = 0;
                object.count = 0;
              }
              if (message.soldiertype != null && message.hasOwnProperty("soldiertype")) object.soldiertype = message.soldiertype;
              if (message.count != null && message.hasOwnProperty("count")) object.count = message.count;
              return object;
            }; /**
               * Converts this ServicePerson to JSON.
               * @function toJSON
               * @memberof m_proto.ServicePerson
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ServicePerson.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ServicePerson
               * @function getTypeUrl
               * @memberof m_proto.ServicePerson
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ServicePerson.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ServicePerson";
            };
            return ServicePerson;
          }();
          m_proto.ReservePerson = function () {
            /**
            * Properties of a ReservePerson.
            * @memberof m_proto
            * @interface IReservePerson
            * @property {number|null} [soldiertype] ReservePerson soldiertype
            * @property {number|null} [count] ReservePerson count
            * @property {Array.<m_proto.IItem>|null} [items] ReservePerson items
            */ /**
               * Constructs a new ReservePerson.
               * @memberof m_proto
               * @classdesc Represents a ReservePerson.
               * @implements IReservePerson
               * @constructor
               * @param {m_proto.IReservePerson=} [properties] Properties to set
               */
            function ReservePerson(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReservePerson soldiertype.
              * @member {number} soldiertype
              * @memberof m_proto.ReservePerson
              * @instance
              */
            ReservePerson.prototype.soldiertype = 0; /**
                                                     * ReservePerson count.
                                                     * @member {number} count
                                                     * @memberof m_proto.ReservePerson
                                                     * @instance
                                                     */
            ReservePerson.prototype.count = 0; /**
                                               * ReservePerson items.
                                               * @member {Array.<m_proto.IItem>} items
                                               * @memberof m_proto.ReservePerson
                                               * @instance
                                               */
            ReservePerson.prototype.items = $util.emptyArray; /**
                                                              * Creates a new ReservePerson instance using the specified properties.
                                                              * @function create
                                                              * @memberof m_proto.ReservePerson
                                                              * @static
                                                              * @param {m_proto.IReservePerson=} [properties] Properties to set
                                                              * @returns {m_proto.ReservePerson} ReservePerson instance
                                                              */
            ReservePerson.create = function create(properties) {
              return new ReservePerson(properties);
            }; /**
               * Encodes the specified ReservePerson message. Does not implicitly {@link m_proto.ReservePerson.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReservePerson
               * @static
               * @param {m_proto.IReservePerson} message ReservePerson message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReservePerson.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldiertype != null && Object.hasOwnProperty.call(message, "soldiertype")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldiertype);
              if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.count);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ReservePerson message, length delimited. Does not implicitly {@link m_proto.ReservePerson.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReservePerson
               * @static
               * @param {m_proto.IReservePerson} message ReservePerson message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReservePerson.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReservePerson message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReservePerson
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReservePerson} ReservePerson
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReservePerson.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReservePerson();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldiertype = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.count = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReservePerson message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReservePerson
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReservePerson} ReservePerson
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReservePerson.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReservePerson message.
               * @function verify
               * @memberof m_proto.ReservePerson
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReservePerson.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldiertype != null && message.hasOwnProperty("soldiertype")) if (!$util.isInteger(message.soldiertype)) return "soldiertype: integer expected";
              if (message.count != null && message.hasOwnProperty("count")) if (!$util.isInteger(message.count)) return "count: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ReservePerson message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReservePerson
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReservePerson} ReservePerson
               */
            ReservePerson.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReservePerson) return object;
              var message = new $root.m_proto.ReservePerson();
              if (object.soldiertype != null) message.soldiertype = object.soldiertype | 0;
              if (object.count != null) message.count = object.count | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ReservePerson.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ReservePerson.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ReservePerson message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReservePerson
               * @static
               * @param {m_proto.ReservePerson} message ReservePerson
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReservePerson.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.soldiertype = 0;
                object.count = 0;
              }
              if (message.soldiertype != null && message.hasOwnProperty("soldiertype")) object.soldiertype = message.soldiertype;
              if (message.count != null && message.hasOwnProperty("count")) object.count = message.count;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ReservePerson to JSON.
               * @function toJSON
               * @memberof m_proto.ReservePerson
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReservePerson.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReservePerson
               * @function getTypeUrl
               * @memberof m_proto.ReservePerson
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReservePerson.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReservePerson";
            };
            return ReservePerson;
          }();
          m_proto.ReqQueryZiYuanYuanInfo = function () {
            /**
            * Properties of a ReqQueryZiYuanYuanInfo.
            * @memberof m_proto
            * @interface IReqQueryZiYuanYuanInfo
            */ /**
               * Constructs a new ReqQueryZiYuanYuanInfo.
               * @memberof m_proto
               * @classdesc Represents a ReqQueryZiYuanYuanInfo.
               * @implements IReqQueryZiYuanYuanInfo
               * @constructor
               * @param {m_proto.IReqQueryZiYuanYuanInfo=} [properties] Properties to set
               */
            function ReqQueryZiYuanYuanInfo(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqQueryZiYuanYuanInfo instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqQueryZiYuanYuanInfo
              * @static
              * @param {m_proto.IReqQueryZiYuanYuanInfo=} [properties] Properties to set
              * @returns {m_proto.ReqQueryZiYuanYuanInfo} ReqQueryZiYuanYuanInfo instance
              */
            ReqQueryZiYuanYuanInfo.create = function create(properties) {
              return new ReqQueryZiYuanYuanInfo(properties);
            }; /**
               * Encodes the specified ReqQueryZiYuanYuanInfo message. Does not implicitly {@link m_proto.ReqQueryZiYuanYuanInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {m_proto.IReqQueryZiYuanYuanInfo} message ReqQueryZiYuanYuanInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqQueryZiYuanYuanInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqQueryZiYuanYuanInfo message, length delimited. Does not implicitly {@link m_proto.ReqQueryZiYuanYuanInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {m_proto.IReqQueryZiYuanYuanInfo} message ReqQueryZiYuanYuanInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqQueryZiYuanYuanInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqQueryZiYuanYuanInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqQueryZiYuanYuanInfo} ReqQueryZiYuanYuanInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqQueryZiYuanYuanInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqQueryZiYuanYuanInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqQueryZiYuanYuanInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqQueryZiYuanYuanInfo} ReqQueryZiYuanYuanInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqQueryZiYuanYuanInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqQueryZiYuanYuanInfo message.
               * @function verify
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqQueryZiYuanYuanInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqQueryZiYuanYuanInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqQueryZiYuanYuanInfo} ReqQueryZiYuanYuanInfo
               */
            ReqQueryZiYuanYuanInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqQueryZiYuanYuanInfo) return object;
              return new $root.m_proto.ReqQueryZiYuanYuanInfo();
            }; /**
               * Creates a plain object from a ReqQueryZiYuanYuanInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {m_proto.ReqQueryZiYuanYuanInfo} message ReqQueryZiYuanYuanInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqQueryZiYuanYuanInfo.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqQueryZiYuanYuanInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqQueryZiYuanYuanInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqQueryZiYuanYuanInfo
               * @function getTypeUrl
               * @memberof m_proto.ReqQueryZiYuanYuanInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqQueryZiYuanYuanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqQueryZiYuanYuanInfo";
            };
            return ReqQueryZiYuanYuanInfo;
          }();
          m_proto.ResQueryZiYuanYuanInfo = function () {
            /**
            * Properties of a ResQueryZiYuanYuanInfo.
            * @memberof m_proto
            * @interface IResQueryZiYuanYuanInfo
            * @property {number|null} [code] ResQueryZiYuanYuanInfo code
            * @property {Array.<m_proto.IReservePerson>|null} [reserve_persons] ResQueryZiYuanYuanInfo reserve_persons
            */ /**
               * Constructs a new ResQueryZiYuanYuanInfo.
               * @memberof m_proto
               * @classdesc Represents a ResQueryZiYuanYuanInfo.
               * @implements IResQueryZiYuanYuanInfo
               * @constructor
               * @param {m_proto.IResQueryZiYuanYuanInfo=} [properties] Properties to set
               */
            function ResQueryZiYuanYuanInfo(properties) {
              this.reserve_persons = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResQueryZiYuanYuanInfo code.
              * @member {number} code
              * @memberof m_proto.ResQueryZiYuanYuanInfo
              * @instance
              */
            ResQueryZiYuanYuanInfo.prototype.code = 0; /**
                                                       * ResQueryZiYuanYuanInfo reserve_persons.
                                                       * @member {Array.<m_proto.IReservePerson>} reserve_persons
                                                       * @memberof m_proto.ResQueryZiYuanYuanInfo
                                                       * @instance
                                                       */
            ResQueryZiYuanYuanInfo.prototype.reserve_persons = $util.emptyArray; /**
                                                                                 * Creates a new ResQueryZiYuanYuanInfo instance using the specified properties.
                                                                                 * @function create
                                                                                 * @memberof m_proto.ResQueryZiYuanYuanInfo
                                                                                 * @static
                                                                                 * @param {m_proto.IResQueryZiYuanYuanInfo=} [properties] Properties to set
                                                                                 * @returns {m_proto.ResQueryZiYuanYuanInfo} ResQueryZiYuanYuanInfo instance
                                                                                 */
            ResQueryZiYuanYuanInfo.create = function create(properties) {
              return new ResQueryZiYuanYuanInfo(properties);
            }; /**
               * Encodes the specified ResQueryZiYuanYuanInfo message. Does not implicitly {@link m_proto.ResQueryZiYuanYuanInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {m_proto.IResQueryZiYuanYuanInfo} message ResQueryZiYuanYuanInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResQueryZiYuanYuanInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.reserve_persons != null && message.reserve_persons.length) for (var i = 0; i < message.reserve_persons.length; ++i) $root.m_proto.ReservePerson.encode(message.reserve_persons[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResQueryZiYuanYuanInfo message, length delimited. Does not implicitly {@link m_proto.ResQueryZiYuanYuanInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {m_proto.IResQueryZiYuanYuanInfo} message ResQueryZiYuanYuanInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResQueryZiYuanYuanInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResQueryZiYuanYuanInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResQueryZiYuanYuanInfo} ResQueryZiYuanYuanInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResQueryZiYuanYuanInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResQueryZiYuanYuanInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.reserve_persons && message.reserve_persons.length)) message.reserve_persons = [];
                      message.reserve_persons.push($root.m_proto.ReservePerson.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResQueryZiYuanYuanInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResQueryZiYuanYuanInfo} ResQueryZiYuanYuanInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResQueryZiYuanYuanInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResQueryZiYuanYuanInfo message.
               * @function verify
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResQueryZiYuanYuanInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.reserve_persons != null && message.hasOwnProperty("reserve_persons")) {
                if (!Array.isArray(message.reserve_persons)) return "reserve_persons: array expected";
                for (var i = 0; i < message.reserve_persons.length; ++i) {
                  var error = $root.m_proto.ReservePerson.verify(message.reserve_persons[i]);
                  if (error) return "reserve_persons." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResQueryZiYuanYuanInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResQueryZiYuanYuanInfo} ResQueryZiYuanYuanInfo
               */
            ResQueryZiYuanYuanInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResQueryZiYuanYuanInfo) return object;
              var message = new $root.m_proto.ResQueryZiYuanYuanInfo();
              if (object.code != null) message.code = object.code | 0;
              if (object.reserve_persons) {
                if (!Array.isArray(object.reserve_persons)) throw TypeError(".m_proto.ResQueryZiYuanYuanInfo.reserve_persons: array expected");
                message.reserve_persons = [];
                for (var i = 0; i < object.reserve_persons.length; ++i) {
                  if (typeof object.reserve_persons[i] !== "object") throw TypeError(".m_proto.ResQueryZiYuanYuanInfo.reserve_persons: object expected");
                  message.reserve_persons[i] = $root.m_proto.ReservePerson.fromObject(object.reserve_persons[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResQueryZiYuanYuanInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {m_proto.ResQueryZiYuanYuanInfo} message ResQueryZiYuanYuanInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResQueryZiYuanYuanInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.reserve_persons = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.reserve_persons && message.reserve_persons.length) {
                object.reserve_persons = [];
                for (var j = 0; j < message.reserve_persons.length; ++j) object.reserve_persons[j] = $root.m_proto.ReservePerson.toObject(message.reserve_persons[j], options);
              }
              return object;
            }; /**
               * Converts this ResQueryZiYuanYuanInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResQueryZiYuanYuanInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResQueryZiYuanYuanInfo
               * @function getTypeUrl
               * @memberof m_proto.ResQueryZiYuanYuanInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResQueryZiYuanYuanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResQueryZiYuanYuanInfo";
            };
            return ResQueryZiYuanYuanInfo;
          }();
          m_proto.ReqGetZiYuan = function () {
            /**
            * Properties of a ReqGetZiYuan.
            * @memberof m_proto
            * @interface IReqGetZiYuan
            * @property {number|null} [building_uid] ReqGetZiYuan building_uid
            * @property {number|null} [building_id] ReqGetZiYuan building_id
            */ /**
               * Constructs a new ReqGetZiYuan.
               * @memberof m_proto
               * @classdesc Represents a ReqGetZiYuan.
               * @implements IReqGetZiYuan
               * @constructor
               * @param {m_proto.IReqGetZiYuan=} [properties] Properties to set
               */
            function ReqGetZiYuan(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqGetZiYuan building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ReqGetZiYuan
              * @instance
              */
            ReqGetZiYuan.prototype.building_uid = 0; /**
                                                     * ReqGetZiYuan building_id.
                                                     * @member {number} building_id
                                                     * @memberof m_proto.ReqGetZiYuan
                                                     * @instance
                                                     */
            ReqGetZiYuan.prototype.building_id = 0; /**
                                                    * Creates a new ReqGetZiYuan instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ReqGetZiYuan
                                                    * @static
                                                    * @param {m_proto.IReqGetZiYuan=} [properties] Properties to set
                                                    * @returns {m_proto.ReqGetZiYuan} ReqGetZiYuan instance
                                                    */
            ReqGetZiYuan.create = function create(properties) {
              return new ReqGetZiYuan(properties);
            }; /**
               * Encodes the specified ReqGetZiYuan message. Does not implicitly {@link m_proto.ReqGetZiYuan.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {m_proto.IReqGetZiYuan} message ReqGetZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGetZiYuan.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified ReqGetZiYuan message, length delimited. Does not implicitly {@link m_proto.ReqGetZiYuan.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {m_proto.IReqGetZiYuan} message ReqGetZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGetZiYuan.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqGetZiYuan message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqGetZiYuan} ReqGetZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGetZiYuan.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqGetZiYuan();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqGetZiYuan message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqGetZiYuan} ReqGetZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGetZiYuan.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqGetZiYuan message.
               * @function verify
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqGetZiYuan.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates a ReqGetZiYuan message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqGetZiYuan} ReqGetZiYuan
               */
            ReqGetZiYuan.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqGetZiYuan) return object;
              var message = new $root.m_proto.ReqGetZiYuan();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqGetZiYuan message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {m_proto.ReqGetZiYuan} message ReqGetZiYuan
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqGetZiYuan.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this ReqGetZiYuan to JSON.
               * @function toJSON
               * @memberof m_proto.ReqGetZiYuan
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqGetZiYuan.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqGetZiYuan
               * @function getTypeUrl
               * @memberof m_proto.ReqGetZiYuan
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqGetZiYuan.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqGetZiYuan";
            };
            return ReqGetZiYuan;
          }();
          m_proto.ResGetZiYuan = function () {
            /**
            * Properties of a ResGetZiYuan.
            * @memberof m_proto
            * @interface IResGetZiYuan
            * @property {number|null} [code] ResGetZiYuan code
            * @property {number|null} [building_uid] ResGetZiYuan building_uid
            * @property {number|null} [building_id] ResGetZiYuan building_id
            */ /**
               * Constructs a new ResGetZiYuan.
               * @memberof m_proto
               * @classdesc Represents a ResGetZiYuan.
               * @implements IResGetZiYuan
               * @constructor
               * @param {m_proto.IResGetZiYuan=} [properties] Properties to set
               */
            function ResGetZiYuan(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGetZiYuan code.
              * @member {number} code
              * @memberof m_proto.ResGetZiYuan
              * @instance
              */
            ResGetZiYuan.prototype.code = 0; /**
                                             * ResGetZiYuan building_uid.
                                             * @member {number} building_uid
                                             * @memberof m_proto.ResGetZiYuan
                                             * @instance
                                             */
            ResGetZiYuan.prototype.building_uid = 0; /**
                                                     * ResGetZiYuan building_id.
                                                     * @member {number} building_id
                                                     * @memberof m_proto.ResGetZiYuan
                                                     * @instance
                                                     */
            ResGetZiYuan.prototype.building_id = 0; /**
                                                    * Creates a new ResGetZiYuan instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ResGetZiYuan
                                                    * @static
                                                    * @param {m_proto.IResGetZiYuan=} [properties] Properties to set
                                                    * @returns {m_proto.ResGetZiYuan} ResGetZiYuan instance
                                                    */
            ResGetZiYuan.create = function create(properties) {
              return new ResGetZiYuan(properties);
            }; /**
               * Encodes the specified ResGetZiYuan message. Does not implicitly {@link m_proto.ResGetZiYuan.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {m_proto.IResGetZiYuan} message ResGetZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGetZiYuan.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              return writer;
            }; /**
               * Encodes the specified ResGetZiYuan message, length delimited. Does not implicitly {@link m_proto.ResGetZiYuan.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {m_proto.IResGetZiYuan} message ResGetZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGetZiYuan.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGetZiYuan message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGetZiYuan} ResGetZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGetZiYuan.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGetZiYuan();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGetZiYuan message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGetZiYuan} ResGetZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGetZiYuan.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGetZiYuan message.
               * @function verify
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGetZiYuan.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              return null;
            }; /**
               * Creates a ResGetZiYuan message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGetZiYuan} ResGetZiYuan
               */
            ResGetZiYuan.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGetZiYuan) return object;
              var message = new $root.m_proto.ResGetZiYuan();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResGetZiYuan message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {m_proto.ResGetZiYuan} message ResGetZiYuan
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGetZiYuan.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              return object;
            }; /**
               * Converts this ResGetZiYuan to JSON.
               * @function toJSON
               * @memberof m_proto.ResGetZiYuan
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGetZiYuan.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGetZiYuan
               * @function getTypeUrl
               * @memberof m_proto.ResGetZiYuan
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGetZiYuan.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGetZiYuan";
            };
            return ResGetZiYuan;
          }();
          m_proto.ZiYuan = function () {
            /**
            * Properties of a ZiYuan.
            * @memberof m_proto
            * @interface IZiYuan
            * @property {number|null} [building_uid] ZiYuan building_uid
            * @property {number|null} [building_id] ZiYuan building_id
            * @property {Array.<m_proto.IItem>|null} [items] ZiYuan items
            */ /**
               * Constructs a new ZiYuan.
               * @memberof m_proto
               * @classdesc Represents a ZiYuan.
               * @implements IZiYuan
               * @constructor
               * @param {m_proto.IZiYuan=} [properties] Properties to set
               */
            function ZiYuan(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ZiYuan building_uid.
              * @member {number} building_uid
              * @memberof m_proto.ZiYuan
              * @instance
              */
            ZiYuan.prototype.building_uid = 0; /**
                                               * ZiYuan building_id.
                                               * @member {number} building_id
                                               * @memberof m_proto.ZiYuan
                                               * @instance
                                               */
            ZiYuan.prototype.building_id = 0; /**
                                              * ZiYuan items.
                                              * @member {Array.<m_proto.IItem>} items
                                              * @memberof m_proto.ZiYuan
                                              * @instance
                                              */
            ZiYuan.prototype.items = $util.emptyArray; /**
                                                       * Creates a new ZiYuan instance using the specified properties.
                                                       * @function create
                                                       * @memberof m_proto.ZiYuan
                                                       * @static
                                                       * @param {m_proto.IZiYuan=} [properties] Properties to set
                                                       * @returns {m_proto.ZiYuan} ZiYuan instance
                                                       */
            ZiYuan.create = function create(properties) {
              return new ZiYuan(properties);
            }; /**
               * Encodes the specified ZiYuan message. Does not implicitly {@link m_proto.ZiYuan.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ZiYuan
               * @static
               * @param {m_proto.IZiYuan} message ZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ZiYuan.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_id);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ZiYuan message, length delimited. Does not implicitly {@link m_proto.ZiYuan.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ZiYuan
               * @static
               * @param {m_proto.IZiYuan} message ZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ZiYuan.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ZiYuan message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ZiYuan} ZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ZiYuan.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ZiYuan();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ZiYuan message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ZiYuan} ZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ZiYuan.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ZiYuan message.
               * @function verify
               * @memberof m_proto.ZiYuan
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ZiYuan.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ZiYuan message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ZiYuan
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ZiYuan} ZiYuan
               */
            ZiYuan.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ZiYuan) return object;
              var message = new $root.m_proto.ZiYuan();
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ZiYuan.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ZiYuan.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ZiYuan message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ZiYuan
               * @static
               * @param {m_proto.ZiYuan} message ZiYuan
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ZiYuan.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.building_uid = 0;
                object.building_id = 0;
              }
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ZiYuan to JSON.
               * @function toJSON
               * @memberof m_proto.ZiYuan
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ZiYuan.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ZiYuan
               * @function getTypeUrl
               * @memberof m_proto.ZiYuan
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ZiYuan.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ZiYuan";
            };
            return ZiYuan;
          }();
          m_proto.ResSendZiYuan = function () {
            /**
            * Properties of a ResSendZiYuan.
            * @memberof m_proto
            * @interface IResSendZiYuan
            * @property {number|null} [code] ResSendZiYuan code
            * @property {Array.<m_proto.IZiYuan>|null} [ziyuans] ResSendZiYuan ziyuans
            */ /**
               * Constructs a new ResSendZiYuan.
               * @memberof m_proto
               * @classdesc Represents a ResSendZiYuan.
               * @implements IResSendZiYuan
               * @constructor
               * @param {m_proto.IResSendZiYuan=} [properties] Properties to set
               */
            function ResSendZiYuan(properties) {
              this.ziyuans = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResSendZiYuan code.
              * @member {number} code
              * @memberof m_proto.ResSendZiYuan
              * @instance
              */
            ResSendZiYuan.prototype.code = 0; /**
                                              * ResSendZiYuan ziyuans.
                                              * @member {Array.<m_proto.IZiYuan>} ziyuans
                                              * @memberof m_proto.ResSendZiYuan
                                              * @instance
                                              */
            ResSendZiYuan.prototype.ziyuans = $util.emptyArray; /**
                                                                * Creates a new ResSendZiYuan instance using the specified properties.
                                                                * @function create
                                                                * @memberof m_proto.ResSendZiYuan
                                                                * @static
                                                                * @param {m_proto.IResSendZiYuan=} [properties] Properties to set
                                                                * @returns {m_proto.ResSendZiYuan} ResSendZiYuan instance
                                                                */
            ResSendZiYuan.create = function create(properties) {
              return new ResSendZiYuan(properties);
            }; /**
               * Encodes the specified ResSendZiYuan message. Does not implicitly {@link m_proto.ResSendZiYuan.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {m_proto.IResSendZiYuan} message ResSendZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSendZiYuan.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.ziyuans != null && message.ziyuans.length) for (var i = 0; i < message.ziyuans.length; ++i) $root.m_proto.ZiYuan.encode(message.ziyuans[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResSendZiYuan message, length delimited. Does not implicitly {@link m_proto.ResSendZiYuan.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {m_proto.IResSendZiYuan} message ResSendZiYuan message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSendZiYuan.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResSendZiYuan message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResSendZiYuan} ResSendZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSendZiYuan.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResSendZiYuan();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.ziyuans && message.ziyuans.length)) message.ziyuans = [];
                      message.ziyuans.push($root.m_proto.ZiYuan.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResSendZiYuan message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResSendZiYuan} ResSendZiYuan
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSendZiYuan.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResSendZiYuan message.
               * @function verify
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResSendZiYuan.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.ziyuans != null && message.hasOwnProperty("ziyuans")) {
                if (!Array.isArray(message.ziyuans)) return "ziyuans: array expected";
                for (var i = 0; i < message.ziyuans.length; ++i) {
                  var error = $root.m_proto.ZiYuan.verify(message.ziyuans[i]);
                  if (error) return "ziyuans." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResSendZiYuan message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResSendZiYuan} ResSendZiYuan
               */
            ResSendZiYuan.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResSendZiYuan) return object;
              var message = new $root.m_proto.ResSendZiYuan();
              if (object.code != null) message.code = object.code | 0;
              if (object.ziyuans) {
                if (!Array.isArray(object.ziyuans)) throw TypeError(".m_proto.ResSendZiYuan.ziyuans: array expected");
                message.ziyuans = [];
                for (var i = 0; i < object.ziyuans.length; ++i) {
                  if (typeof object.ziyuans[i] !== "object") throw TypeError(".m_proto.ResSendZiYuan.ziyuans: object expected");
                  message.ziyuans[i] = $root.m_proto.ZiYuan.fromObject(object.ziyuans[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResSendZiYuan message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {m_proto.ResSendZiYuan} message ResSendZiYuan
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResSendZiYuan.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.ziyuans = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.ziyuans && message.ziyuans.length) {
                object.ziyuans = [];
                for (var j = 0; j < message.ziyuans.length; ++j) object.ziyuans[j] = $root.m_proto.ZiYuan.toObject(message.ziyuans[j], options);
              }
              return object;
            }; /**
               * Converts this ResSendZiYuan to JSON.
               * @function toJSON
               * @memberof m_proto.ResSendZiYuan
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResSendZiYuan.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResSendZiYuan
               * @function getTypeUrl
               * @memberof m_proto.ResSendZiYuan
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResSendZiYuan.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResSendZiYuan";
            };
            return ResSendZiYuan;
          }();
          m_proto.ResGuaJiReward = function () {
            /**
            * Properties of a ResGuaJiReward.
            * @memberof m_proto
            * @interface IResGuaJiReward
            * @property {number|null} [code] ResGuaJiReward code
            * @property {number|null} [offline_duration] ResGuaJiReward offline_duration
            * @property {Array.<m_proto.IItem>|null} [items] ResGuaJiReward items
            */ /**
               * Constructs a new ResGuaJiReward.
               * @memberof m_proto
               * @classdesc Represents a ResGuaJiReward.
               * @implements IResGuaJiReward
               * @constructor
               * @param {m_proto.IResGuaJiReward=} [properties] Properties to set
               */
            function ResGuaJiReward(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGuaJiReward code.
              * @member {number} code
              * @memberof m_proto.ResGuaJiReward
              * @instance
              */
            ResGuaJiReward.prototype.code = 0; /**
                                               * ResGuaJiReward offline_duration.
                                               * @member {number} offline_duration
                                               * @memberof m_proto.ResGuaJiReward
                                               * @instance
                                               */
            ResGuaJiReward.prototype.offline_duration = 0; /**
                                                           * ResGuaJiReward items.
                                                           * @member {Array.<m_proto.IItem>} items
                                                           * @memberof m_proto.ResGuaJiReward
                                                           * @instance
                                                           */
            ResGuaJiReward.prototype.items = $util.emptyArray; /**
                                                               * Creates a new ResGuaJiReward instance using the specified properties.
                                                               * @function create
                                                               * @memberof m_proto.ResGuaJiReward
                                                               * @static
                                                               * @param {m_proto.IResGuaJiReward=} [properties] Properties to set
                                                               * @returns {m_proto.ResGuaJiReward} ResGuaJiReward instance
                                                               */
            ResGuaJiReward.create = function create(properties) {
              return new ResGuaJiReward(properties);
            }; /**
               * Encodes the specified ResGuaJiReward message. Does not implicitly {@link m_proto.ResGuaJiReward.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {m_proto.IResGuaJiReward} message ResGuaJiReward message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGuaJiReward.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.offline_duration != null && Object.hasOwnProperty.call(message, "offline_duration")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.offline_duration);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResGuaJiReward message, length delimited. Does not implicitly {@link m_proto.ResGuaJiReward.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {m_proto.IResGuaJiReward} message ResGuaJiReward message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGuaJiReward.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGuaJiReward message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGuaJiReward} ResGuaJiReward
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGuaJiReward.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGuaJiReward();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.offline_duration = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGuaJiReward message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGuaJiReward} ResGuaJiReward
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGuaJiReward.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGuaJiReward message.
               * @function verify
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGuaJiReward.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.offline_duration != null && message.hasOwnProperty("offline_duration")) if (!$util.isInteger(message.offline_duration)) return "offline_duration: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResGuaJiReward message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGuaJiReward} ResGuaJiReward
               */
            ResGuaJiReward.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGuaJiReward) return object;
              var message = new $root.m_proto.ResGuaJiReward();
              if (object.code != null) message.code = object.code | 0;
              if (object.offline_duration != null) message.offline_duration = object.offline_duration | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResGuaJiReward.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResGuaJiReward.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResGuaJiReward message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {m_proto.ResGuaJiReward} message ResGuaJiReward
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGuaJiReward.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.code = 0;
                object.offline_duration = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.offline_duration != null && message.hasOwnProperty("offline_duration")) object.offline_duration = message.offline_duration;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResGuaJiReward to JSON.
               * @function toJSON
               * @memberof m_proto.ResGuaJiReward
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGuaJiReward.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGuaJiReward
               * @function getTypeUrl
               * @memberof m_proto.ResGuaJiReward
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGuaJiReward.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGuaJiReward";
            };
            return ResGuaJiReward;
          }();
          m_proto.ReqOneKey = function () {
            /**
            * Properties of a ReqOneKey.
            * @memberof m_proto
            * @interface IReqOneKey
            */ /**
               * Constructs a new ReqOneKey.
               * @memberof m_proto
               * @classdesc Represents a ReqOneKey.
               * @implements IReqOneKey
               * @constructor
               * @param {m_proto.IReqOneKey=} [properties] Properties to set
               */
            function ReqOneKey(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqOneKey instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqOneKey
              * @static
              * @param {m_proto.IReqOneKey=} [properties] Properties to set
              * @returns {m_proto.ReqOneKey} ReqOneKey instance
              */
            ReqOneKey.create = function create(properties) {
              return new ReqOneKey(properties);
            }; /**
               * Encodes the specified ReqOneKey message. Does not implicitly {@link m_proto.ReqOneKey.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {m_proto.IReqOneKey} message ReqOneKey message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqOneKey.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqOneKey message, length delimited. Does not implicitly {@link m_proto.ReqOneKey.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {m_proto.IReqOneKey} message ReqOneKey message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqOneKey.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqOneKey message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqOneKey} ReqOneKey
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqOneKey.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqOneKey();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqOneKey message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqOneKey} ReqOneKey
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqOneKey.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqOneKey message.
               * @function verify
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqOneKey.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqOneKey message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqOneKey} ReqOneKey
               */
            ReqOneKey.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqOneKey) return object;
              return new $root.m_proto.ReqOneKey();
            }; /**
               * Creates a plain object from a ReqOneKey message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {m_proto.ReqOneKey} message ReqOneKey
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqOneKey.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqOneKey to JSON.
               * @function toJSON
               * @memberof m_proto.ReqOneKey
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqOneKey.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqOneKey
               * @function getTypeUrl
               * @memberof m_proto.ReqOneKey
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqOneKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqOneKey";
            };
            return ReqOneKey;
          }();
          m_proto.ResOneKey = function () {
            /**
            * Properties of a ResOneKey.
            * @memberof m_proto
            * @interface IResOneKey
            * @property {number|null} [code] ResOneKey code
            */ /**
               * Constructs a new ResOneKey.
               * @memberof m_proto
               * @classdesc Represents a ResOneKey.
               * @implements IResOneKey
               * @constructor
               * @param {m_proto.IResOneKey=} [properties] Properties to set
               */
            function ResOneKey(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResOneKey code.
              * @member {number} code
              * @memberof m_proto.ResOneKey
              * @instance
              */
            ResOneKey.prototype.code = 0; /**
                                          * Creates a new ResOneKey instance using the specified properties.
                                          * @function create
                                          * @memberof m_proto.ResOneKey
                                          * @static
                                          * @param {m_proto.IResOneKey=} [properties] Properties to set
                                          * @returns {m_proto.ResOneKey} ResOneKey instance
                                          */
            ResOneKey.create = function create(properties) {
              return new ResOneKey(properties);
            }; /**
               * Encodes the specified ResOneKey message. Does not implicitly {@link m_proto.ResOneKey.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResOneKey
               * @static
               * @param {m_proto.IResOneKey} message ResOneKey message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResOneKey.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResOneKey message, length delimited. Does not implicitly {@link m_proto.ResOneKey.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResOneKey
               * @static
               * @param {m_proto.IResOneKey} message ResOneKey message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResOneKey.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResOneKey message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResOneKey
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResOneKey} ResOneKey
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResOneKey.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResOneKey();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResOneKey message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResOneKey
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResOneKey} ResOneKey
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResOneKey.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResOneKey message.
               * @function verify
               * @memberof m_proto.ResOneKey
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResOneKey.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResOneKey message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResOneKey
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResOneKey} ResOneKey
               */
            ResOneKey.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResOneKey) return object;
              var message = new $root.m_proto.ResOneKey();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResOneKey message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResOneKey
               * @static
               * @param {m_proto.ResOneKey} message ResOneKey
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResOneKey.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResOneKey to JSON.
               * @function toJSON
               * @memberof m_proto.ResOneKey
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResOneKey.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResOneKey
               * @function getTypeUrl
               * @memberof m_proto.ResOneKey
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResOneKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResOneKey";
            };
            return ResOneKey;
          }();
          m_proto.ResBuildingDataChange = function () {
            /**
            * Properties of a ResBuildingDataChange.
            * @memberof m_proto
            * @interface IResBuildingDataChange
            * @property {number|null} [code] ResBuildingDataChange code
            * @property {number|null} [building_uid] ResBuildingDataChange building_uid
            * @property {number|null} [building_id] ResBuildingDataChange building_id
            * @property {Array.<m_proto.IServicePerson>|null} [services] ResBuildingDataChange services
            * @property {number|null} [total_people] ResBuildingDataChange total_people
            * @property {Array.<m_proto.ITaskData>|null} [tasks] ResBuildingDataChange tasks
            * @property {number|null} [entry_hero] ResBuildingDataChange entry_hero
            */ /**
               * Constructs a new ResBuildingDataChange.
               * @memberof m_proto
               * @classdesc Represents a ResBuildingDataChange.
               * @implements IResBuildingDataChange
               * @constructor
               * @param {m_proto.IResBuildingDataChange=} [properties] Properties to set
               */
            function ResBuildingDataChange(properties) {
              this.services = [];
              this.tasks = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBuildingDataChange code.
              * @member {number} code
              * @memberof m_proto.ResBuildingDataChange
              * @instance
              */
            ResBuildingDataChange.prototype.code = 0; /**
                                                      * ResBuildingDataChange building_uid.
                                                      * @member {number} building_uid
                                                      * @memberof m_proto.ResBuildingDataChange
                                                      * @instance
                                                      */
            ResBuildingDataChange.prototype.building_uid = 0; /**
                                                              * ResBuildingDataChange building_id.
                                                              * @member {number} building_id
                                                              * @memberof m_proto.ResBuildingDataChange
                                                              * @instance
                                                              */
            ResBuildingDataChange.prototype.building_id = 0; /**
                                                             * ResBuildingDataChange services.
                                                             * @member {Array.<m_proto.IServicePerson>} services
                                                             * @memberof m_proto.ResBuildingDataChange
                                                             * @instance
                                                             */
            ResBuildingDataChange.prototype.services = $util.emptyArray; /**
                                                                         * ResBuildingDataChange total_people.
                                                                         * @member {number} total_people
                                                                         * @memberof m_proto.ResBuildingDataChange
                                                                         * @instance
                                                                         */
            ResBuildingDataChange.prototype.total_people = 0; /**
                                                              * ResBuildingDataChange tasks.
                                                              * @member {Array.<m_proto.ITaskData>} tasks
                                                              * @memberof m_proto.ResBuildingDataChange
                                                              * @instance
                                                              */
            ResBuildingDataChange.prototype.tasks = $util.emptyArray; /**
                                                                      * ResBuildingDataChange entry_hero.
                                                                      * @member {number} entry_hero
                                                                      * @memberof m_proto.ResBuildingDataChange
                                                                      * @instance
                                                                      */
            ResBuildingDataChange.prototype.entry_hero = 0; /**
                                                            * Creates a new ResBuildingDataChange instance using the specified properties.
                                                            * @function create
                                                            * @memberof m_proto.ResBuildingDataChange
                                                            * @static
                                                            * @param {m_proto.IResBuildingDataChange=} [properties] Properties to set
                                                            * @returns {m_proto.ResBuildingDataChange} ResBuildingDataChange instance
                                                            */
            ResBuildingDataChange.create = function create(properties) {
              return new ResBuildingDataChange(properties);
            }; /**
               * Encodes the specified ResBuildingDataChange message. Does not implicitly {@link m_proto.ResBuildingDataChange.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {m_proto.IResBuildingDataChange} message ResBuildingDataChange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuildingDataChange.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.building_uid != null && Object.hasOwnProperty.call(message, "building_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.building_uid);
              if (message.building_id != null && Object.hasOwnProperty.call(message, "building_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.building_id);
              if (message.services != null && message.services.length) for (var i = 0; i < message.services.length; ++i) $root.m_proto.ServicePerson.encode(message.services[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();
              if (message.total_people != null && Object.hasOwnProperty.call(message, "total_people")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.total_people);
              if (message.tasks != null && message.tasks.length) for (var i = 0; i < message.tasks.length; ++i) $root.m_proto.TaskData.encode(message.tasks[i], writer.uint32( /* id 6, wireType 2 =*/50).fork()).ldelim();
              if (message.entry_hero != null && Object.hasOwnProperty.call(message, "entry_hero")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.entry_hero);
              return writer;
            }; /**
               * Encodes the specified ResBuildingDataChange message, length delimited. Does not implicitly {@link m_proto.ResBuildingDataChange.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {m_proto.IResBuildingDataChange} message ResBuildingDataChange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuildingDataChange.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBuildingDataChange message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBuildingDataChange} ResBuildingDataChange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuildingDataChange.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBuildingDataChange();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.building_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.building_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      if (!(message.services && message.services.length)) message.services = [];
                      message.services.push($root.m_proto.ServicePerson.decode(reader, reader.uint32()));
                      break;
                    }
                  case 5:
                    {
                      message.total_people = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      if (!(message.tasks && message.tasks.length)) message.tasks = [];
                      message.tasks.push($root.m_proto.TaskData.decode(reader, reader.uint32()));
                      break;
                    }
                  case 7:
                    {
                      message.entry_hero = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBuildingDataChange message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBuildingDataChange} ResBuildingDataChange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuildingDataChange.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBuildingDataChange message.
               * @function verify
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBuildingDataChange.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) if (!$util.isInteger(message.building_uid)) return "building_uid: integer expected";
              if (message.building_id != null && message.hasOwnProperty("building_id")) if (!$util.isInteger(message.building_id)) return "building_id: integer expected";
              if (message.services != null && message.hasOwnProperty("services")) {
                if (!Array.isArray(message.services)) return "services: array expected";
                for (var i = 0; i < message.services.length; ++i) {
                  var error = $root.m_proto.ServicePerson.verify(message.services[i]);
                  if (error) return "services." + error;
                }
              }
              if (message.total_people != null && message.hasOwnProperty("total_people")) if (!$util.isInteger(message.total_people)) return "total_people: integer expected";
              if (message.tasks != null && message.hasOwnProperty("tasks")) {
                if (!Array.isArray(message.tasks)) return "tasks: array expected";
                for (var i = 0; i < message.tasks.length; ++i) {
                  var error = $root.m_proto.TaskData.verify(message.tasks[i]);
                  if (error) return "tasks." + error;
                }
              }
              if (message.entry_hero != null && message.hasOwnProperty("entry_hero")) if (!$util.isInteger(message.entry_hero)) return "entry_hero: integer expected";
              return null;
            }; /**
               * Creates a ResBuildingDataChange message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBuildingDataChange} ResBuildingDataChange
               */
            ResBuildingDataChange.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBuildingDataChange) return object;
              var message = new $root.m_proto.ResBuildingDataChange();
              if (object.code != null) message.code = object.code | 0;
              if (object.building_uid != null) message.building_uid = object.building_uid | 0;
              if (object.building_id != null) message.building_id = object.building_id | 0;
              if (object.services) {
                if (!Array.isArray(object.services)) throw TypeError(".m_proto.ResBuildingDataChange.services: array expected");
                message.services = [];
                for (var i = 0; i < object.services.length; ++i) {
                  if (typeof object.services[i] !== "object") throw TypeError(".m_proto.ResBuildingDataChange.services: object expected");
                  message.services[i] = $root.m_proto.ServicePerson.fromObject(object.services[i]);
                }
              }
              if (object.total_people != null) message.total_people = object.total_people | 0;
              if (object.tasks) {
                if (!Array.isArray(object.tasks)) throw TypeError(".m_proto.ResBuildingDataChange.tasks: array expected");
                message.tasks = [];
                for (var i = 0; i < object.tasks.length; ++i) {
                  if (typeof object.tasks[i] !== "object") throw TypeError(".m_proto.ResBuildingDataChange.tasks: object expected");
                  message.tasks[i] = $root.m_proto.TaskData.fromObject(object.tasks[i]);
                }
              }
              if (object.entry_hero != null) message.entry_hero = object.entry_hero | 0;
              return message;
            }; /**
               * Creates a plain object from a ResBuildingDataChange message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {m_proto.ResBuildingDataChange} message ResBuildingDataChange
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBuildingDataChange.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) {
                object.services = [];
                object.tasks = [];
              }
              if (options.defaults) {
                object.code = 0;
                object.building_uid = 0;
                object.building_id = 0;
                object.total_people = 0;
                object.entry_hero = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.building_uid != null && message.hasOwnProperty("building_uid")) object.building_uid = message.building_uid;
              if (message.building_id != null && message.hasOwnProperty("building_id")) object.building_id = message.building_id;
              if (message.services && message.services.length) {
                object.services = [];
                for (var j = 0; j < message.services.length; ++j) object.services[j] = $root.m_proto.ServicePerson.toObject(message.services[j], options);
              }
              if (message.total_people != null && message.hasOwnProperty("total_people")) object.total_people = message.total_people;
              if (message.tasks && message.tasks.length) {
                object.tasks = [];
                for (var j = 0; j < message.tasks.length; ++j) object.tasks[j] = $root.m_proto.TaskData.toObject(message.tasks[j], options);
              }
              if (message.entry_hero != null && message.hasOwnProperty("entry_hero")) object.entry_hero = message.entry_hero;
              return object;
            }; /**
               * Converts this ResBuildingDataChange to JSON.
               * @function toJSON
               * @memberof m_proto.ResBuildingDataChange
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBuildingDataChange.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBuildingDataChange
               * @function getTypeUrl
               * @memberof m_proto.ResBuildingDataChange
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBuildingDataChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBuildingDataChange";
            };
            return ResBuildingDataChange;
          }();
          m_proto.ResRewardPopup = function () {
            /**
            * Properties of a ResRewardPopup.
            * @memberof m_proto
            * @interface IResRewardPopup
            * @property {number|null} [code] ResRewardPopup code
            * @property {Array.<m_proto.IItem>|null} [items] ResRewardPopup items
            */ /**
               * Constructs a new ResRewardPopup.
               * @memberof m_proto
               * @classdesc Represents a ResRewardPopup.
               * @implements IResRewardPopup
               * @constructor
               * @param {m_proto.IResRewardPopup=} [properties] Properties to set
               */
            function ResRewardPopup(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResRewardPopup code.
              * @member {number} code
              * @memberof m_proto.ResRewardPopup
              * @instance
              */
            ResRewardPopup.prototype.code = 0; /**
                                               * ResRewardPopup items.
                                               * @member {Array.<m_proto.IItem>} items
                                               * @memberof m_proto.ResRewardPopup
                                               * @instance
                                               */
            ResRewardPopup.prototype.items = $util.emptyArray; /**
                                                               * Creates a new ResRewardPopup instance using the specified properties.
                                                               * @function create
                                                               * @memberof m_proto.ResRewardPopup
                                                               * @static
                                                               * @param {m_proto.IResRewardPopup=} [properties] Properties to set
                                                               * @returns {m_proto.ResRewardPopup} ResRewardPopup instance
                                                               */
            ResRewardPopup.create = function create(properties) {
              return new ResRewardPopup(properties);
            }; /**
               * Encodes the specified ResRewardPopup message. Does not implicitly {@link m_proto.ResRewardPopup.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {m_proto.IResRewardPopup} message ResRewardPopup message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRewardPopup.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResRewardPopup message, length delimited. Does not implicitly {@link m_proto.ResRewardPopup.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {m_proto.IResRewardPopup} message ResRewardPopup message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRewardPopup.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResRewardPopup message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResRewardPopup} ResRewardPopup
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRewardPopup.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResRewardPopup();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResRewardPopup message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResRewardPopup} ResRewardPopup
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRewardPopup.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResRewardPopup message.
               * @function verify
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResRewardPopup.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResRewardPopup message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResRewardPopup} ResRewardPopup
               */
            ResRewardPopup.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResRewardPopup) return object;
              var message = new $root.m_proto.ResRewardPopup();
              if (object.code != null) message.code = object.code | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResRewardPopup.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResRewardPopup.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResRewardPopup message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {m_proto.ResRewardPopup} message ResRewardPopup
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResRewardPopup.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResRewardPopup to JSON.
               * @function toJSON
               * @memberof m_proto.ResRewardPopup
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResRewardPopup.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResRewardPopup
               * @function getTypeUrl
               * @memberof m_proto.ResRewardPopup
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResRewardPopup.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResRewardPopup";
            };
            return ResRewardPopup;
          }();
          m_proto.ReqAcceptTask = function () {
            /**
            * Properties of a ReqAcceptTask.
            * @memberof m_proto
            * @interface IReqAcceptTask
            * @property {number|null} [task_id] ReqAcceptTask task_id
            */ /**
               * Constructs a new ReqAcceptTask.
               * @memberof m_proto
               * @classdesc Represents a ReqAcceptTask.
               * @implements IReqAcceptTask
               * @constructor
               * @param {m_proto.IReqAcceptTask=} [properties] Properties to set
               */
            function ReqAcceptTask(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqAcceptTask task_id.
              * @member {number} task_id
              * @memberof m_proto.ReqAcceptTask
              * @instance
              */
            ReqAcceptTask.prototype.task_id = 0; /**
                                                 * Creates a new ReqAcceptTask instance using the specified properties.
                                                 * @function create
                                                 * @memberof m_proto.ReqAcceptTask
                                                 * @static
                                                 * @param {m_proto.IReqAcceptTask=} [properties] Properties to set
                                                 * @returns {m_proto.ReqAcceptTask} ReqAcceptTask instance
                                                 */
            ReqAcceptTask.create = function create(properties) {
              return new ReqAcceptTask(properties);
            }; /**
               * Encodes the specified ReqAcceptTask message. Does not implicitly {@link m_proto.ReqAcceptTask.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {m_proto.IReqAcceptTask} message ReqAcceptTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAcceptTask.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.task_id);
              return writer;
            }; /**
               * Encodes the specified ReqAcceptTask message, length delimited. Does not implicitly {@link m_proto.ReqAcceptTask.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {m_proto.IReqAcceptTask} message ReqAcceptTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqAcceptTask.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqAcceptTask message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqAcceptTask} ReqAcceptTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAcceptTask.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqAcceptTask();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqAcceptTask message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqAcceptTask} ReqAcceptTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqAcceptTask.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqAcceptTask message.
               * @function verify
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqAcceptTask.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              return null;
            }; /**
               * Creates a ReqAcceptTask message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqAcceptTask} ReqAcceptTask
               */
            ReqAcceptTask.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqAcceptTask) return object;
              var message = new $root.m_proto.ReqAcceptTask();
              if (object.task_id != null) message.task_id = object.task_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqAcceptTask message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {m_proto.ReqAcceptTask} message ReqAcceptTask
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqAcceptTask.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.task_id = 0;
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              return object;
            }; /**
               * Converts this ReqAcceptTask to JSON.
               * @function toJSON
               * @memberof m_proto.ReqAcceptTask
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqAcceptTask.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqAcceptTask
               * @function getTypeUrl
               * @memberof m_proto.ReqAcceptTask
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqAcceptTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqAcceptTask";
            };
            return ReqAcceptTask;
          }();
          m_proto.ResAcceptTask = function () {
            /**
            * Properties of a ResAcceptTask.
            * @memberof m_proto
            * @interface IResAcceptTask
            * @property {number|null} [code] ResAcceptTask code
            * @property {number|null} [task_id] ResAcceptTask task_id
            * @property {number|Long|null} [task_duration] ResAcceptTask task_duration
            * @property {number|null} [state] ResAcceptTask state
            * @property {Array.<m_proto.IItem>|null} [soldiers] ResAcceptTask soldiers
            */ /**
               * Constructs a new ResAcceptTask.
               * @memberof m_proto
               * @classdesc Represents a ResAcceptTask.
               * @implements IResAcceptTask
               * @constructor
               * @param {m_proto.IResAcceptTask=} [properties] Properties to set
               */
            function ResAcceptTask(properties) {
              this.soldiers = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResAcceptTask code.
              * @member {number} code
              * @memberof m_proto.ResAcceptTask
              * @instance
              */
            ResAcceptTask.prototype.code = 0; /**
                                              * ResAcceptTask task_id.
                                              * @member {number} task_id
                                              * @memberof m_proto.ResAcceptTask
                                              * @instance
                                              */
            ResAcceptTask.prototype.task_id = 0; /**
                                                 * ResAcceptTask task_duration.
                                                 * @member {number|Long} task_duration
                                                 * @memberof m_proto.ResAcceptTask
                                                 * @instance
                                                 */
            ResAcceptTask.prototype.task_duration = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; /**
                                                                                                       * ResAcceptTask state.
                                                                                                       * @member {number} state
                                                                                                       * @memberof m_proto.ResAcceptTask
                                                                                                       * @instance
                                                                                                       */
            ResAcceptTask.prototype.state = 0; /**
                                               * ResAcceptTask soldiers.
                                               * @member {Array.<m_proto.IItem>} soldiers
                                               * @memberof m_proto.ResAcceptTask
                                               * @instance
                                               */
            ResAcceptTask.prototype.soldiers = $util.emptyArray; /**
                                                                 * Creates a new ResAcceptTask instance using the specified properties.
                                                                 * @function create
                                                                 * @memberof m_proto.ResAcceptTask
                                                                 * @static
                                                                 * @param {m_proto.IResAcceptTask=} [properties] Properties to set
                                                                 * @returns {m_proto.ResAcceptTask} ResAcceptTask instance
                                                                 */
            ResAcceptTask.create = function create(properties) {
              return new ResAcceptTask(properties);
            }; /**
               * Encodes the specified ResAcceptTask message. Does not implicitly {@link m_proto.ResAcceptTask.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {m_proto.IResAcceptTask} message ResAcceptTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAcceptTask.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.task_id);
              if (message.task_duration != null && Object.hasOwnProperty.call(message, "task_duration")) writer.uint32( /* id 3, wireType 0 =*/24).int64(message.task_duration);
              if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.state);
              if (message.soldiers != null && message.soldiers.length) for (var i = 0; i < message.soldiers.length; ++i) $root.m_proto.Item.encode(message.soldiers[i], writer.uint32( /* id 5, wireType 2 =*/42).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResAcceptTask message, length delimited. Does not implicitly {@link m_proto.ResAcceptTask.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {m_proto.IResAcceptTask} message ResAcceptTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAcceptTask.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResAcceptTask message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResAcceptTask} ResAcceptTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAcceptTask.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResAcceptTask();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.task_duration = reader.int64();
                      break;
                    }
                  case 4:
                    {
                      message.state = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      if (!(message.soldiers && message.soldiers.length)) message.soldiers = [];
                      message.soldiers.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResAcceptTask message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResAcceptTask} ResAcceptTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAcceptTask.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResAcceptTask message.
               * @function verify
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResAcceptTask.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              if (message.task_duration != null && message.hasOwnProperty("task_duration")) if (!$util.isInteger(message.task_duration) && !(message.task_duration && $util.isInteger(message.task_duration.low) && $util.isInteger(message.task_duration.high))) return "task_duration: integer|Long expected";
              if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state)) return "state: integer expected";
              if (message.soldiers != null && message.hasOwnProperty("soldiers")) {
                if (!Array.isArray(message.soldiers)) return "soldiers: array expected";
                for (var i = 0; i < message.soldiers.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.soldiers[i]);
                  if (error) return "soldiers." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResAcceptTask message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResAcceptTask} ResAcceptTask
               */
            ResAcceptTask.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResAcceptTask) return object;
              var message = new $root.m_proto.ResAcceptTask();
              if (object.code != null) message.code = object.code | 0;
              if (object.task_id != null) message.task_id = object.task_id | 0;
              if (object.task_duration != null) if ($util.Long) (message.task_duration = $util.Long.fromValue(object.task_duration)).unsigned = false;else if (typeof object.task_duration === "string") message.task_duration = parseInt(object.task_duration, 10);else if (typeof object.task_duration === "number") message.task_duration = object.task_duration;else if (typeof object.task_duration === "object") message.task_duration = new $util.LongBits(object.task_duration.low >>> 0, object.task_duration.high >>> 0).toNumber();
              if (object.state != null) message.state = object.state | 0;
              if (object.soldiers) {
                if (!Array.isArray(object.soldiers)) throw TypeError(".m_proto.ResAcceptTask.soldiers: array expected");
                message.soldiers = [];
                for (var i = 0; i < object.soldiers.length; ++i) {
                  if (typeof object.soldiers[i] !== "object") throw TypeError(".m_proto.ResAcceptTask.soldiers: object expected");
                  message.soldiers[i] = $root.m_proto.Item.fromObject(object.soldiers[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResAcceptTask message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {m_proto.ResAcceptTask} message ResAcceptTask
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResAcceptTask.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.soldiers = [];
              if (options.defaults) {
                object.code = 0;
                object.task_id = 0;
                if ($util.Long) {
                  var _long2 = new $util.Long(0, 0, false);
                  object.task_duration = options.longs === String ? _long2.toString() : options.longs === Number ? _long2.toNumber() : _long2;
                } else object.task_duration = options.longs === String ? "0" : 0;
                object.state = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              if (message.task_duration != null && message.hasOwnProperty("task_duration")) if (typeof message.task_duration === "number") object.task_duration = options.longs === String ? String(message.task_duration) : message.task_duration;else object.task_duration = options.longs === String ? $util.Long.prototype.toString.call(message.task_duration) : options.longs === Number ? new $util.LongBits(message.task_duration.low >>> 0, message.task_duration.high >>> 0).toNumber() : message.task_duration;
              if (message.state != null && message.hasOwnProperty("state")) object.state = message.state;
              if (message.soldiers && message.soldiers.length) {
                object.soldiers = [];
                for (var j = 0; j < message.soldiers.length; ++j) object.soldiers[j] = $root.m_proto.Item.toObject(message.soldiers[j], options);
              }
              return object;
            }; /**
               * Converts this ResAcceptTask to JSON.
               * @function toJSON
               * @memberof m_proto.ResAcceptTask
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResAcceptTask.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResAcceptTask
               * @function getTypeUrl
               * @memberof m_proto.ResAcceptTask
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResAcceptTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResAcceptTask";
            };
            return ResAcceptTask;
          }();
          m_proto.ResTaskFinish = function () {
            /**
            * Properties of a ResTaskFinish.
            * @memberof m_proto
            * @interface IResTaskFinish
            * @property {number|null} [code] ResTaskFinish code
            * @property {number|null} [task_id] ResTaskFinish task_id
            * @property {number|null} [state] ResTaskFinish state
            */ /**
               * Constructs a new ResTaskFinish.
               * @memberof m_proto
               * @classdesc Represents a ResTaskFinish.
               * @implements IResTaskFinish
               * @constructor
               * @param {m_proto.IResTaskFinish=} [properties] Properties to set
               */
            function ResTaskFinish(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResTaskFinish code.
              * @member {number} code
              * @memberof m_proto.ResTaskFinish
              * @instance
              */
            ResTaskFinish.prototype.code = 0; /**
                                              * ResTaskFinish task_id.
                                              * @member {number} task_id
                                              * @memberof m_proto.ResTaskFinish
                                              * @instance
                                              */
            ResTaskFinish.prototype.task_id = 0; /**
                                                 * ResTaskFinish state.
                                                 * @member {number} state
                                                 * @memberof m_proto.ResTaskFinish
                                                 * @instance
                                                 */
            ResTaskFinish.prototype.state = 0; /**
                                               * Creates a new ResTaskFinish instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ResTaskFinish
                                               * @static
                                               * @param {m_proto.IResTaskFinish=} [properties] Properties to set
                                               * @returns {m_proto.ResTaskFinish} ResTaskFinish instance
                                               */
            ResTaskFinish.create = function create(properties) {
              return new ResTaskFinish(properties);
            }; /**
               * Encodes the specified ResTaskFinish message. Does not implicitly {@link m_proto.ResTaskFinish.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {m_proto.IResTaskFinish} message ResTaskFinish message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTaskFinish.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.task_id);
              if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.state);
              return writer;
            }; /**
               * Encodes the specified ResTaskFinish message, length delimited. Does not implicitly {@link m_proto.ResTaskFinish.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {m_proto.IResTaskFinish} message ResTaskFinish message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTaskFinish.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResTaskFinish message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResTaskFinish} ResTaskFinish
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTaskFinish.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResTaskFinish();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResTaskFinish message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResTaskFinish} ResTaskFinish
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTaskFinish.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResTaskFinish message.
               * @function verify
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResTaskFinish.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state)) return "state: integer expected";
              return null;
            }; /**
               * Creates a ResTaskFinish message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResTaskFinish} ResTaskFinish
               */
            ResTaskFinish.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResTaskFinish) return object;
              var message = new $root.m_proto.ResTaskFinish();
              if (object.code != null) message.code = object.code | 0;
              if (object.task_id != null) message.task_id = object.task_id | 0;
              if (object.state != null) message.state = object.state | 0;
              return message;
            }; /**
               * Creates a plain object from a ResTaskFinish message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {m_proto.ResTaskFinish} message ResTaskFinish
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResTaskFinish.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.task_id = 0;
                object.state = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              if (message.state != null && message.hasOwnProperty("state")) object.state = message.state;
              return object;
            }; /**
               * Converts this ResTaskFinish to JSON.
               * @function toJSON
               * @memberof m_proto.ResTaskFinish
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResTaskFinish.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResTaskFinish
               * @function getTypeUrl
               * @memberof m_proto.ResTaskFinish
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResTaskFinish.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResTaskFinish";
            };
            return ResTaskFinish;
          }();
          m_proto.ReqImmFinishTask = function () {
            /**
            * Properties of a ReqImmFinishTask.
            * @memberof m_proto
            * @interface IReqImmFinishTask
            * @property {number|null} [task_id] ReqImmFinishTask task_id
            */ /**
               * Constructs a new ReqImmFinishTask.
               * @memberof m_proto
               * @classdesc Represents a ReqImmFinishTask.
               * @implements IReqImmFinishTask
               * @constructor
               * @param {m_proto.IReqImmFinishTask=} [properties] Properties to set
               */
            function ReqImmFinishTask(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqImmFinishTask task_id.
              * @member {number} task_id
              * @memberof m_proto.ReqImmFinishTask
              * @instance
              */
            ReqImmFinishTask.prototype.task_id = 0; /**
                                                    * Creates a new ReqImmFinishTask instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ReqImmFinishTask
                                                    * @static
                                                    * @param {m_proto.IReqImmFinishTask=} [properties] Properties to set
                                                    * @returns {m_proto.ReqImmFinishTask} ReqImmFinishTask instance
                                                    */
            ReqImmFinishTask.create = function create(properties) {
              return new ReqImmFinishTask(properties);
            }; /**
               * Encodes the specified ReqImmFinishTask message. Does not implicitly {@link m_proto.ReqImmFinishTask.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {m_proto.IReqImmFinishTask} message ReqImmFinishTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqImmFinishTask.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.task_id);
              return writer;
            }; /**
               * Encodes the specified ReqImmFinishTask message, length delimited. Does not implicitly {@link m_proto.ReqImmFinishTask.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {m_proto.IReqImmFinishTask} message ReqImmFinishTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqImmFinishTask.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqImmFinishTask message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqImmFinishTask} ReqImmFinishTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqImmFinishTask.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqImmFinishTask();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqImmFinishTask message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqImmFinishTask} ReqImmFinishTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqImmFinishTask.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqImmFinishTask message.
               * @function verify
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqImmFinishTask.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              return null;
            }; /**
               * Creates a ReqImmFinishTask message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqImmFinishTask} ReqImmFinishTask
               */
            ReqImmFinishTask.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqImmFinishTask) return object;
              var message = new $root.m_proto.ReqImmFinishTask();
              if (object.task_id != null) message.task_id = object.task_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqImmFinishTask message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {m_proto.ReqImmFinishTask} message ReqImmFinishTask
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqImmFinishTask.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.task_id = 0;
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              return object;
            }; /**
               * Converts this ReqImmFinishTask to JSON.
               * @function toJSON
               * @memberof m_proto.ReqImmFinishTask
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqImmFinishTask.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqImmFinishTask
               * @function getTypeUrl
               * @memberof m_proto.ReqImmFinishTask
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqImmFinishTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqImmFinishTask";
            };
            return ReqImmFinishTask;
          }();
          m_proto.ResImmFinishTask = function () {
            /**
            * Properties of a ResImmFinishTask.
            * @memberof m_proto
            * @interface IResImmFinishTask
            * @property {number|null} [code] ResImmFinishTask code
            * @property {number|null} [task_id] ResImmFinishTask task_id
            * @property {number|null} [state] ResImmFinishTask state
            */ /**
               * Constructs a new ResImmFinishTask.
               * @memberof m_proto
               * @classdesc Represents a ResImmFinishTask.
               * @implements IResImmFinishTask
               * @constructor
               * @param {m_proto.IResImmFinishTask=} [properties] Properties to set
               */
            function ResImmFinishTask(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResImmFinishTask code.
              * @member {number} code
              * @memberof m_proto.ResImmFinishTask
              * @instance
              */
            ResImmFinishTask.prototype.code = 0; /**
                                                 * ResImmFinishTask task_id.
                                                 * @member {number} task_id
                                                 * @memberof m_proto.ResImmFinishTask
                                                 * @instance
                                                 */
            ResImmFinishTask.prototype.task_id = 0; /**
                                                    * ResImmFinishTask state.
                                                    * @member {number} state
                                                    * @memberof m_proto.ResImmFinishTask
                                                    * @instance
                                                    */
            ResImmFinishTask.prototype.state = 0; /**
                                                  * Creates a new ResImmFinishTask instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ResImmFinishTask
                                                  * @static
                                                  * @param {m_proto.IResImmFinishTask=} [properties] Properties to set
                                                  * @returns {m_proto.ResImmFinishTask} ResImmFinishTask instance
                                                  */
            ResImmFinishTask.create = function create(properties) {
              return new ResImmFinishTask(properties);
            }; /**
               * Encodes the specified ResImmFinishTask message. Does not implicitly {@link m_proto.ResImmFinishTask.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {m_proto.IResImmFinishTask} message ResImmFinishTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResImmFinishTask.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.task_id);
              if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.state);
              return writer;
            }; /**
               * Encodes the specified ResImmFinishTask message, length delimited. Does not implicitly {@link m_proto.ResImmFinishTask.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {m_proto.IResImmFinishTask} message ResImmFinishTask message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResImmFinishTask.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResImmFinishTask message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResImmFinishTask} ResImmFinishTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResImmFinishTask.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResImmFinishTask();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResImmFinishTask message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResImmFinishTask} ResImmFinishTask
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResImmFinishTask.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResImmFinishTask message.
               * @function verify
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResImmFinishTask.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              if (message.state != null && message.hasOwnProperty("state")) if (!$util.isInteger(message.state)) return "state: integer expected";
              return null;
            }; /**
               * Creates a ResImmFinishTask message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResImmFinishTask} ResImmFinishTask
               */
            ResImmFinishTask.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResImmFinishTask) return object;
              var message = new $root.m_proto.ResImmFinishTask();
              if (object.code != null) message.code = object.code | 0;
              if (object.task_id != null) message.task_id = object.task_id | 0;
              if (object.state != null) message.state = object.state | 0;
              return message;
            }; /**
               * Creates a plain object from a ResImmFinishTask message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {m_proto.ResImmFinishTask} message ResImmFinishTask
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResImmFinishTask.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.task_id = 0;
                object.state = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              if (message.state != null && message.hasOwnProperty("state")) object.state = message.state;
              return object;
            }; /**
               * Converts this ResImmFinishTask to JSON.
               * @function toJSON
               * @memberof m_proto.ResImmFinishTask
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResImmFinishTask.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResImmFinishTask
               * @function getTypeUrl
               * @memberof m_proto.ResImmFinishTask
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResImmFinishTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResImmFinishTask";
            };
            return ResImmFinishTask;
          }();
          m_proto.ReqGetTaskReward = function () {
            /**
            * Properties of a ReqGetTaskReward.
            * @memberof m_proto
            * @interface IReqGetTaskReward
            * @property {number|null} [task_id] ReqGetTaskReward task_id
            */ /**
               * Constructs a new ReqGetTaskReward.
               * @memberof m_proto
               * @classdesc Represents a ReqGetTaskReward.
               * @implements IReqGetTaskReward
               * @constructor
               * @param {m_proto.IReqGetTaskReward=} [properties] Properties to set
               */
            function ReqGetTaskReward(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqGetTaskReward task_id.
              * @member {number} task_id
              * @memberof m_proto.ReqGetTaskReward
              * @instance
              */
            ReqGetTaskReward.prototype.task_id = 0; /**
                                                    * Creates a new ReqGetTaskReward instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ReqGetTaskReward
                                                    * @static
                                                    * @param {m_proto.IReqGetTaskReward=} [properties] Properties to set
                                                    * @returns {m_proto.ReqGetTaskReward} ReqGetTaskReward instance
                                                    */
            ReqGetTaskReward.create = function create(properties) {
              return new ReqGetTaskReward(properties);
            }; /**
               * Encodes the specified ReqGetTaskReward message. Does not implicitly {@link m_proto.ReqGetTaskReward.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {m_proto.IReqGetTaskReward} message ReqGetTaskReward message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGetTaskReward.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.task_id != null && Object.hasOwnProperty.call(message, "task_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.task_id);
              return writer;
            }; /**
               * Encodes the specified ReqGetTaskReward message, length delimited. Does not implicitly {@link m_proto.ReqGetTaskReward.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {m_proto.IReqGetTaskReward} message ReqGetTaskReward message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGetTaskReward.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqGetTaskReward message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqGetTaskReward} ReqGetTaskReward
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGetTaskReward.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqGetTaskReward();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.task_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqGetTaskReward message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqGetTaskReward} ReqGetTaskReward
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGetTaskReward.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqGetTaskReward message.
               * @function verify
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqGetTaskReward.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.task_id != null && message.hasOwnProperty("task_id")) if (!$util.isInteger(message.task_id)) return "task_id: integer expected";
              return null;
            }; /**
               * Creates a ReqGetTaskReward message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqGetTaskReward} ReqGetTaskReward
               */
            ReqGetTaskReward.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqGetTaskReward) return object;
              var message = new $root.m_proto.ReqGetTaskReward();
              if (object.task_id != null) message.task_id = object.task_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqGetTaskReward message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {m_proto.ReqGetTaskReward} message ReqGetTaskReward
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqGetTaskReward.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.task_id = 0;
              if (message.task_id != null && message.hasOwnProperty("task_id")) object.task_id = message.task_id;
              return object;
            }; /**
               * Converts this ReqGetTaskReward to JSON.
               * @function toJSON
               * @memberof m_proto.ReqGetTaskReward
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqGetTaskReward.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqGetTaskReward
               * @function getTypeUrl
               * @memberof m_proto.ReqGetTaskReward
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqGetTaskReward.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqGetTaskReward";
            };
            return ReqGetTaskReward;
          }();
          m_proto.ResGetTaskReward = function () {
            /**
            * Properties of a ResGetTaskReward.
            * @memberof m_proto
            * @interface IResGetTaskReward
            * @property {number|null} [code] ResGetTaskReward code
            */ /**
               * Constructs a new ResGetTaskReward.
               * @memberof m_proto
               * @classdesc Represents a ResGetTaskReward.
               * @implements IResGetTaskReward
               * @constructor
               * @param {m_proto.IResGetTaskReward=} [properties] Properties to set
               */
            function ResGetTaskReward(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGetTaskReward code.
              * @member {number} code
              * @memberof m_proto.ResGetTaskReward
              * @instance
              */
            ResGetTaskReward.prototype.code = 0; /**
                                                 * Creates a new ResGetTaskReward instance using the specified properties.
                                                 * @function create
                                                 * @memberof m_proto.ResGetTaskReward
                                                 * @static
                                                 * @param {m_proto.IResGetTaskReward=} [properties] Properties to set
                                                 * @returns {m_proto.ResGetTaskReward} ResGetTaskReward instance
                                                 */
            ResGetTaskReward.create = function create(properties) {
              return new ResGetTaskReward(properties);
            }; /**
               * Encodes the specified ResGetTaskReward message. Does not implicitly {@link m_proto.ResGetTaskReward.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {m_proto.IResGetTaskReward} message ResGetTaskReward message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGetTaskReward.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResGetTaskReward message, length delimited. Does not implicitly {@link m_proto.ResGetTaskReward.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {m_proto.IResGetTaskReward} message ResGetTaskReward message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGetTaskReward.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGetTaskReward message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGetTaskReward} ResGetTaskReward
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGetTaskReward.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGetTaskReward();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGetTaskReward message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGetTaskReward} ResGetTaskReward
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGetTaskReward.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGetTaskReward message.
               * @function verify
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGetTaskReward.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResGetTaskReward message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGetTaskReward} ResGetTaskReward
               */
            ResGetTaskReward.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGetTaskReward) return object;
              var message = new $root.m_proto.ResGetTaskReward();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResGetTaskReward message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {m_proto.ResGetTaskReward} message ResGetTaskReward
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGetTaskReward.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResGetTaskReward to JSON.
               * @function toJSON
               * @memberof m_proto.ResGetTaskReward
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGetTaskReward.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGetTaskReward
               * @function getTypeUrl
               * @memberof m_proto.ResGetTaskReward
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGetTaskReward.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGetTaskReward";
            };
            return ResGetTaskReward;
          }();
          m_proto.BattleUnit = function () {
            /**
            * Properties of a BattleUnit.
            * @memberof m_proto
            * @interface IBattleUnit
            * @property {number|null} [id] BattleUnit id
            * @property {number|null} [type] BattleUnit type
            * @property {Array.<m_proto.IKillMonster>|null} [kill_monster_info] BattleUnit kill_monster_info
            */ /**
               * Constructs a new BattleUnit.
               * @memberof m_proto
               * @classdesc Represents a BattleUnit.
               * @implements IBattleUnit
               * @constructor
               * @param {m_proto.IBattleUnit=} [properties] Properties to set
               */
            function BattleUnit(properties) {
              this.kill_monster_info = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * BattleUnit id.
              * @member {number} id
              * @memberof m_proto.BattleUnit
              * @instance
              */
            BattleUnit.prototype.id = 0; /**
                                         * BattleUnit type.
                                         * @member {number} type
                                         * @memberof m_proto.BattleUnit
                                         * @instance
                                         */
            BattleUnit.prototype.type = 0; /**
                                           * BattleUnit kill_monster_info.
                                           * @member {Array.<m_proto.IKillMonster>} kill_monster_info
                                           * @memberof m_proto.BattleUnit
                                           * @instance
                                           */
            BattleUnit.prototype.kill_monster_info = $util.emptyArray; /**
                                                                       * Creates a new BattleUnit instance using the specified properties.
                                                                       * @function create
                                                                       * @memberof m_proto.BattleUnit
                                                                       * @static
                                                                       * @param {m_proto.IBattleUnit=} [properties] Properties to set
                                                                       * @returns {m_proto.BattleUnit} BattleUnit instance
                                                                       */
            BattleUnit.create = function create(properties) {
              return new BattleUnit(properties);
            }; /**
               * Encodes the specified BattleUnit message. Does not implicitly {@link m_proto.BattleUnit.verify|verify} messages.
               * @function encode
               * @memberof m_proto.BattleUnit
               * @static
               * @param {m_proto.IBattleUnit} message BattleUnit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BattleUnit.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.id);
              if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.type);
              if (message.kill_monster_info != null && message.kill_monster_info.length) for (var i = 0; i < message.kill_monster_info.length; ++i) $root.m_proto.KillMonster.encode(message.kill_monster_info[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified BattleUnit message, length delimited. Does not implicitly {@link m_proto.BattleUnit.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.BattleUnit
               * @static
               * @param {m_proto.IBattleUnit} message BattleUnit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BattleUnit.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a BattleUnit message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.BattleUnit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.BattleUnit} BattleUnit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BattleUnit.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.BattleUnit();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.type = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.kill_monster_info && message.kill_monster_info.length)) message.kill_monster_info = [];
                      message.kill_monster_info.push($root.m_proto.KillMonster.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a BattleUnit message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.BattleUnit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.BattleUnit} BattleUnit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BattleUnit.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a BattleUnit message.
               * @function verify
               * @memberof m_proto.BattleUnit
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            BattleUnit.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected";
              if (message.kill_monster_info != null && message.hasOwnProperty("kill_monster_info")) {
                if (!Array.isArray(message.kill_monster_info)) return "kill_monster_info: array expected";
                for (var i = 0; i < message.kill_monster_info.length; ++i) {
                  var error = $root.m_proto.KillMonster.verify(message.kill_monster_info[i]);
                  if (error) return "kill_monster_info." + error;
                }
              }
              return null;
            }; /**
               * Creates a BattleUnit message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.BattleUnit
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.BattleUnit} BattleUnit
               */
            BattleUnit.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.BattleUnit) return object;
              var message = new $root.m_proto.BattleUnit();
              if (object.id != null) message.id = object.id | 0;
              if (object.type != null) message.type = object.type | 0;
              if (object.kill_monster_info) {
                if (!Array.isArray(object.kill_monster_info)) throw TypeError(".m_proto.BattleUnit.kill_monster_info: array expected");
                message.kill_monster_info = [];
                for (var i = 0; i < object.kill_monster_info.length; ++i) {
                  if (typeof object.kill_monster_info[i] !== "object") throw TypeError(".m_proto.BattleUnit.kill_monster_info: object expected");
                  message.kill_monster_info[i] = $root.m_proto.KillMonster.fromObject(object.kill_monster_info[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a BattleUnit message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.BattleUnit
               * @static
               * @param {m_proto.BattleUnit} message BattleUnit
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            BattleUnit.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.kill_monster_info = [];
              if (options.defaults) {
                object.id = 0;
                object.type = 0;
              }
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              if (message.type != null && message.hasOwnProperty("type")) object.type = message.type;
              if (message.kill_monster_info && message.kill_monster_info.length) {
                object.kill_monster_info = [];
                for (var j = 0; j < message.kill_monster_info.length; ++j) object.kill_monster_info[j] = $root.m_proto.KillMonster.toObject(message.kill_monster_info[j], options);
              }
              return object;
            }; /**
               * Converts this BattleUnit to JSON.
               * @function toJSON
               * @memberof m_proto.BattleUnit
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            BattleUnit.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for BattleUnit
               * @function getTypeUrl
               * @memberof m_proto.BattleUnit
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            BattleUnit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.BattleUnit";
            };
            return BattleUnit;
          }();
          m_proto.KillMonster = function () {
            /**
            * Properties of a KillMonster.
            * @memberof m_proto
            * @interface IKillMonster
            * @property {number|null} [monster_id] KillMonster monster_id
            * @property {number|null} [count] KillMonster count
            */ /**
               * Constructs a new KillMonster.
               * @memberof m_proto
               * @classdesc Represents a KillMonster.
               * @implements IKillMonster
               * @constructor
               * @param {m_proto.IKillMonster=} [properties] Properties to set
               */
            function KillMonster(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * KillMonster monster_id.
              * @member {number} monster_id
              * @memberof m_proto.KillMonster
              * @instance
              */
            KillMonster.prototype.monster_id = 0; /**
                                                  * KillMonster count.
                                                  * @member {number} count
                                                  * @memberof m_proto.KillMonster
                                                  * @instance
                                                  */
            KillMonster.prototype.count = 0; /**
                                             * Creates a new KillMonster instance using the specified properties.
                                             * @function create
                                             * @memberof m_proto.KillMonster
                                             * @static
                                             * @param {m_proto.IKillMonster=} [properties] Properties to set
                                             * @returns {m_proto.KillMonster} KillMonster instance
                                             */
            KillMonster.create = function create(properties) {
              return new KillMonster(properties);
            }; /**
               * Encodes the specified KillMonster message. Does not implicitly {@link m_proto.KillMonster.verify|verify} messages.
               * @function encode
               * @memberof m_proto.KillMonster
               * @static
               * @param {m_proto.IKillMonster} message KillMonster message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            KillMonster.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.monster_id != null && Object.hasOwnProperty.call(message, "monster_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.monster_id);
              if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.count);
              return writer;
            }; /**
               * Encodes the specified KillMonster message, length delimited. Does not implicitly {@link m_proto.KillMonster.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.KillMonster
               * @static
               * @param {m_proto.IKillMonster} message KillMonster message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            KillMonster.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a KillMonster message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.KillMonster
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.KillMonster} KillMonster
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            KillMonster.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.KillMonster();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.monster_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a KillMonster message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.KillMonster
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.KillMonster} KillMonster
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            KillMonster.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a KillMonster message.
               * @function verify
               * @memberof m_proto.KillMonster
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            KillMonster.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.monster_id != null && message.hasOwnProperty("monster_id")) if (!$util.isInteger(message.monster_id)) return "monster_id: integer expected";
              if (message.count != null && message.hasOwnProperty("count")) if (!$util.isInteger(message.count)) return "count: integer expected";
              return null;
            }; /**
               * Creates a KillMonster message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.KillMonster
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.KillMonster} KillMonster
               */
            KillMonster.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.KillMonster) return object;
              var message = new $root.m_proto.KillMonster();
              if (object.monster_id != null) message.monster_id = object.monster_id | 0;
              if (object.count != null) message.count = object.count | 0;
              return message;
            }; /**
               * Creates a plain object from a KillMonster message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.KillMonster
               * @static
               * @param {m_proto.KillMonster} message KillMonster
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            KillMonster.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.monster_id = 0;
                object.count = 0;
              }
              if (message.monster_id != null && message.hasOwnProperty("monster_id")) object.monster_id = message.monster_id;
              if (message.count != null && message.hasOwnProperty("count")) object.count = message.count;
              return object;
            }; /**
               * Converts this KillMonster to JSON.
               * @function toJSON
               * @memberof m_proto.KillMonster
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            KillMonster.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for KillMonster
               * @function getTypeUrl
               * @memberof m_proto.KillMonster
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            KillMonster.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.KillMonster";
            };
            return KillMonster;
          }();
          m_proto.ReqBattleHeart = function () {
            /**
            * Properties of a ReqBattleHeart.
            * @memberof m_proto
            * @interface IReqBattleHeart
            * @property {number|null} [dungeon_id] ReqBattleHeart dungeon_id
            * @property {number|null} [wave_times] ReqBattleHeart wave_times
            * @property {Array.<m_proto.IBattleUnit>|null} [units] ReqBattleHeart units
            */ /**
               * Constructs a new ReqBattleHeart.
               * @memberof m_proto
               * @classdesc Represents a ReqBattleHeart.
               * @implements IReqBattleHeart
               * @constructor
               * @param {m_proto.IReqBattleHeart=} [properties] Properties to set
               */
            function ReqBattleHeart(properties) {
              this.units = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqBattleHeart dungeon_id.
              * @member {number} dungeon_id
              * @memberof m_proto.ReqBattleHeart
              * @instance
              */
            ReqBattleHeart.prototype.dungeon_id = 0; /**
                                                     * ReqBattleHeart wave_times.
                                                     * @member {number} wave_times
                                                     * @memberof m_proto.ReqBattleHeart
                                                     * @instance
                                                     */
            ReqBattleHeart.prototype.wave_times = 0; /**
                                                     * ReqBattleHeart units.
                                                     * @member {Array.<m_proto.IBattleUnit>} units
                                                     * @memberof m_proto.ReqBattleHeart
                                                     * @instance
                                                     */
            ReqBattleHeart.prototype.units = $util.emptyArray; /**
                                                               * Creates a new ReqBattleHeart instance using the specified properties.
                                                               * @function create
                                                               * @memberof m_proto.ReqBattleHeart
                                                               * @static
                                                               * @param {m_proto.IReqBattleHeart=} [properties] Properties to set
                                                               * @returns {m_proto.ReqBattleHeart} ReqBattleHeart instance
                                                               */
            ReqBattleHeart.create = function create(properties) {
              return new ReqBattleHeart(properties);
            }; /**
               * Encodes the specified ReqBattleHeart message. Does not implicitly {@link m_proto.ReqBattleHeart.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {m_proto.IReqBattleHeart} message ReqBattleHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleHeart.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.dungeon_id);
              if (message.wave_times != null && Object.hasOwnProperty.call(message, "wave_times")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.wave_times);
              if (message.units != null && message.units.length) for (var i = 0; i < message.units.length; ++i) $root.m_proto.BattleUnit.encode(message.units[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ReqBattleHeart message, length delimited. Does not implicitly {@link m_proto.ReqBattleHeart.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {m_proto.IReqBattleHeart} message ReqBattleHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleHeart.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqBattleHeart message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqBattleHeart} ReqBattleHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleHeart.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqBattleHeart();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.wave_times = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.units && message.units.length)) message.units = [];
                      message.units.push($root.m_proto.BattleUnit.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqBattleHeart message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqBattleHeart} ReqBattleHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleHeart.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqBattleHeart message.
               * @function verify
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqBattleHeart.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.wave_times != null && message.hasOwnProperty("wave_times")) if (!$util.isInteger(message.wave_times)) return "wave_times: integer expected";
              if (message.units != null && message.hasOwnProperty("units")) {
                if (!Array.isArray(message.units)) return "units: array expected";
                for (var i = 0; i < message.units.length; ++i) {
                  var error = $root.m_proto.BattleUnit.verify(message.units[i]);
                  if (error) return "units." + error;
                }
              }
              return null;
            }; /**
               * Creates a ReqBattleHeart message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqBattleHeart} ReqBattleHeart
               */
            ReqBattleHeart.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqBattleHeart) return object;
              var message = new $root.m_proto.ReqBattleHeart();
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.wave_times != null) message.wave_times = object.wave_times | 0;
              if (object.units) {
                if (!Array.isArray(object.units)) throw TypeError(".m_proto.ReqBattleHeart.units: array expected");
                message.units = [];
                for (var i = 0; i < object.units.length; ++i) {
                  if (typeof object.units[i] !== "object") throw TypeError(".m_proto.ReqBattleHeart.units: object expected");
                  message.units[i] = $root.m_proto.BattleUnit.fromObject(object.units[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ReqBattleHeart message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {m_proto.ReqBattleHeart} message ReqBattleHeart
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqBattleHeart.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.units = [];
              if (options.defaults) {
                object.dungeon_id = 0;
                object.wave_times = 0;
              }
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.wave_times != null && message.hasOwnProperty("wave_times")) object.wave_times = message.wave_times;
              if (message.units && message.units.length) {
                object.units = [];
                for (var j = 0; j < message.units.length; ++j) object.units[j] = $root.m_proto.BattleUnit.toObject(message.units[j], options);
              }
              return object;
            }; /**
               * Converts this ReqBattleHeart to JSON.
               * @function toJSON
               * @memberof m_proto.ReqBattleHeart
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqBattleHeart.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqBattleHeart
               * @function getTypeUrl
               * @memberof m_proto.ReqBattleHeart
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqBattleHeart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqBattleHeart";
            };
            return ReqBattleHeart;
          }();
          m_proto.ResBattleHeart = function () {
            /**
            * Properties of a ResBattleHeart.
            * @memberof m_proto
            * @interface IResBattleHeart
            * @property {number|null} [code] ResBattleHeart code
            * @property {number|null} [dungeon_id] ResBattleHeart dungeon_id
            * @property {number|null} [wave_times] ResBattleHeart wave_times
            * @property {number|null} [shiqi_val] ResBattleHeart shiqi_val
            */ /**
               * Constructs a new ResBattleHeart.
               * @memberof m_proto
               * @classdesc Represents a ResBattleHeart.
               * @implements IResBattleHeart
               * @constructor
               * @param {m_proto.IResBattleHeart=} [properties] Properties to set
               */
            function ResBattleHeart(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBattleHeart code.
              * @member {number} code
              * @memberof m_proto.ResBattleHeart
              * @instance
              */
            ResBattleHeart.prototype.code = 0; /**
                                               * ResBattleHeart dungeon_id.
                                               * @member {number} dungeon_id
                                               * @memberof m_proto.ResBattleHeart
                                               * @instance
                                               */
            ResBattleHeart.prototype.dungeon_id = 0; /**
                                                     * ResBattleHeart wave_times.
                                                     * @member {number} wave_times
                                                     * @memberof m_proto.ResBattleHeart
                                                     * @instance
                                                     */
            ResBattleHeart.prototype.wave_times = 0; /**
                                                     * ResBattleHeart shiqi_val.
                                                     * @member {number} shiqi_val
                                                     * @memberof m_proto.ResBattleHeart
                                                     * @instance
                                                     */
            ResBattleHeart.prototype.shiqi_val = 0; /**
                                                    * Creates a new ResBattleHeart instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ResBattleHeart
                                                    * @static
                                                    * @param {m_proto.IResBattleHeart=} [properties] Properties to set
                                                    * @returns {m_proto.ResBattleHeart} ResBattleHeart instance
                                                    */
            ResBattleHeart.create = function create(properties) {
              return new ResBattleHeart(properties);
            }; /**
               * Encodes the specified ResBattleHeart message. Does not implicitly {@link m_proto.ResBattleHeart.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {m_proto.IResBattleHeart} message ResBattleHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleHeart.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              if (message.wave_times != null && Object.hasOwnProperty.call(message, "wave_times")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.wave_times);
              if (message.shiqi_val != null && Object.hasOwnProperty.call(message, "shiqi_val")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.shiqi_val);
              return writer;
            }; /**
               * Encodes the specified ResBattleHeart message, length delimited. Does not implicitly {@link m_proto.ResBattleHeart.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {m_proto.IResBattleHeart} message ResBattleHeart message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleHeart.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBattleHeart message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBattleHeart} ResBattleHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleHeart.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBattleHeart();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.wave_times = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.shiqi_val = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBattleHeart message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBattleHeart} ResBattleHeart
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleHeart.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBattleHeart message.
               * @function verify
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBattleHeart.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.wave_times != null && message.hasOwnProperty("wave_times")) if (!$util.isInteger(message.wave_times)) return "wave_times: integer expected";
              if (message.shiqi_val != null && message.hasOwnProperty("shiqi_val")) if (!$util.isInteger(message.shiqi_val)) return "shiqi_val: integer expected";
              return null;
            }; /**
               * Creates a ResBattleHeart message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBattleHeart} ResBattleHeart
               */
            ResBattleHeart.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBattleHeart) return object;
              var message = new $root.m_proto.ResBattleHeart();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.wave_times != null) message.wave_times = object.wave_times | 0;
              if (object.shiqi_val != null) message.shiqi_val = object.shiqi_val | 0;
              return message;
            }; /**
               * Creates a plain object from a ResBattleHeart message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {m_proto.ResBattleHeart} message ResBattleHeart
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBattleHeart.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
                object.wave_times = 0;
                object.shiqi_val = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.wave_times != null && message.hasOwnProperty("wave_times")) object.wave_times = message.wave_times;
              if (message.shiqi_val != null && message.hasOwnProperty("shiqi_val")) object.shiqi_val = message.shiqi_val;
              return object;
            }; /**
               * Converts this ResBattleHeart to JSON.
               * @function toJSON
               * @memberof m_proto.ResBattleHeart
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBattleHeart.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBattleHeart
               * @function getTypeUrl
               * @memberof m_proto.ResBattleHeart
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBattleHeart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBattleHeart";
            };
            return ResBattleHeart;
          }();
          m_proto.ReqBattleRewardInfo = function () {
            /**
            * Properties of a ReqBattleRewardInfo.
            * @memberof m_proto
            * @interface IReqBattleRewardInfo
            * @property {number|null} [dungeon_id] ReqBattleRewardInfo dungeon_id
            */ /**
               * Constructs a new ReqBattleRewardInfo.
               * @memberof m_proto
               * @classdesc Represents a ReqBattleRewardInfo.
               * @implements IReqBattleRewardInfo
               * @constructor
               * @param {m_proto.IReqBattleRewardInfo=} [properties] Properties to set
               */
            function ReqBattleRewardInfo(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqBattleRewardInfo dungeon_id.
              * @member {number} dungeon_id
              * @memberof m_proto.ReqBattleRewardInfo
              * @instance
              */
            ReqBattleRewardInfo.prototype.dungeon_id = 0; /**
                                                          * Creates a new ReqBattleRewardInfo instance using the specified properties.
                                                          * @function create
                                                          * @memberof m_proto.ReqBattleRewardInfo
                                                          * @static
                                                          * @param {m_proto.IReqBattleRewardInfo=} [properties] Properties to set
                                                          * @returns {m_proto.ReqBattleRewardInfo} ReqBattleRewardInfo instance
                                                          */
            ReqBattleRewardInfo.create = function create(properties) {
              return new ReqBattleRewardInfo(properties);
            }; /**
               * Encodes the specified ReqBattleRewardInfo message. Does not implicitly {@link m_proto.ReqBattleRewardInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {m_proto.IReqBattleRewardInfo} message ReqBattleRewardInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleRewardInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.dungeon_id);
              return writer;
            }; /**
               * Encodes the specified ReqBattleRewardInfo message, length delimited. Does not implicitly {@link m_proto.ReqBattleRewardInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {m_proto.IReqBattleRewardInfo} message ReqBattleRewardInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleRewardInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqBattleRewardInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqBattleRewardInfo} ReqBattleRewardInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleRewardInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqBattleRewardInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqBattleRewardInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqBattleRewardInfo} ReqBattleRewardInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleRewardInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqBattleRewardInfo message.
               * @function verify
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqBattleRewardInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              return null;
            }; /**
               * Creates a ReqBattleRewardInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqBattleRewardInfo} ReqBattleRewardInfo
               */
            ReqBattleRewardInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqBattleRewardInfo) return object;
              var message = new $root.m_proto.ReqBattleRewardInfo();
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqBattleRewardInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {m_proto.ReqBattleRewardInfo} message ReqBattleRewardInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqBattleRewardInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.dungeon_id = 0;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              return object;
            }; /**
               * Converts this ReqBattleRewardInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ReqBattleRewardInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqBattleRewardInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqBattleRewardInfo
               * @function getTypeUrl
               * @memberof m_proto.ReqBattleRewardInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqBattleRewardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqBattleRewardInfo";
            };
            return ReqBattleRewardInfo;
          }();
          m_proto.ResBattleRewardInfo = function () {
            /**
            * Properties of a ResBattleRewardInfo.
            * @memberof m_proto
            * @interface IResBattleRewardInfo
            * @property {number|null} [code] ResBattleRewardInfo code
            * @property {number|null} [dungeon_id] ResBattleRewardInfo dungeon_id
            * @property {Array.<m_proto.IItem>|null} [items] ResBattleRewardInfo items
            */ /**
               * Constructs a new ResBattleRewardInfo.
               * @memberof m_proto
               * @classdesc Represents a ResBattleRewardInfo.
               * @implements IResBattleRewardInfo
               * @constructor
               * @param {m_proto.IResBattleRewardInfo=} [properties] Properties to set
               */
            function ResBattleRewardInfo(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBattleRewardInfo code.
              * @member {number} code
              * @memberof m_proto.ResBattleRewardInfo
              * @instance
              */
            ResBattleRewardInfo.prototype.code = 0; /**
                                                    * ResBattleRewardInfo dungeon_id.
                                                    * @member {number} dungeon_id
                                                    * @memberof m_proto.ResBattleRewardInfo
                                                    * @instance
                                                    */
            ResBattleRewardInfo.prototype.dungeon_id = 0; /**
                                                          * ResBattleRewardInfo items.
                                                          * @member {Array.<m_proto.IItem>} items
                                                          * @memberof m_proto.ResBattleRewardInfo
                                                          * @instance
                                                          */
            ResBattleRewardInfo.prototype.items = $util.emptyArray; /**
                                                                    * Creates a new ResBattleRewardInfo instance using the specified properties.
                                                                    * @function create
                                                                    * @memberof m_proto.ResBattleRewardInfo
                                                                    * @static
                                                                    * @param {m_proto.IResBattleRewardInfo=} [properties] Properties to set
                                                                    * @returns {m_proto.ResBattleRewardInfo} ResBattleRewardInfo instance
                                                                    */
            ResBattleRewardInfo.create = function create(properties) {
              return new ResBattleRewardInfo(properties);
            }; /**
               * Encodes the specified ResBattleRewardInfo message. Does not implicitly {@link m_proto.ResBattleRewardInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {m_proto.IResBattleRewardInfo} message ResBattleRewardInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleRewardInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResBattleRewardInfo message, length delimited. Does not implicitly {@link m_proto.ResBattleRewardInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {m_proto.IResBattleRewardInfo} message ResBattleRewardInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleRewardInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBattleRewardInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBattleRewardInfo} ResBattleRewardInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleRewardInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBattleRewardInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBattleRewardInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBattleRewardInfo} ResBattleRewardInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleRewardInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBattleRewardInfo message.
               * @function verify
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBattleRewardInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResBattleRewardInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBattleRewardInfo} ResBattleRewardInfo
               */
            ResBattleRewardInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBattleRewardInfo) return object;
              var message = new $root.m_proto.ResBattleRewardInfo();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResBattleRewardInfo.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResBattleRewardInfo.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResBattleRewardInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {m_proto.ResBattleRewardInfo} message ResBattleRewardInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBattleRewardInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResBattleRewardInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ResBattleRewardInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBattleRewardInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBattleRewardInfo
               * @function getTypeUrl
               * @memberof m_proto.ResBattleRewardInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBattleRewardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBattleRewardInfo";
            };
            return ResBattleRewardInfo;
          }();
          m_proto.ReqBattleUpStage = function () {
            /**
            * Properties of a ReqBattleUpStage.
            * @memberof m_proto
            * @interface IReqBattleUpStage
            * @property {number|null} [dungeon_id] ReqBattleUpStage dungeon_id
            * @property {number|null} [soldier_id] ReqBattleUpStage soldier_id
            */ /**
               * Constructs a new ReqBattleUpStage.
               * @memberof m_proto
               * @classdesc Represents a ReqBattleUpStage.
               * @implements IReqBattleUpStage
               * @constructor
               * @param {m_proto.IReqBattleUpStage=} [properties] Properties to set
               */
            function ReqBattleUpStage(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqBattleUpStage dungeon_id.
              * @member {number} dungeon_id
              * @memberof m_proto.ReqBattleUpStage
              * @instance
              */
            ReqBattleUpStage.prototype.dungeon_id = 0; /**
                                                       * ReqBattleUpStage soldier_id.
                                                       * @member {number} soldier_id
                                                       * @memberof m_proto.ReqBattleUpStage
                                                       * @instance
                                                       */
            ReqBattleUpStage.prototype.soldier_id = 0; /**
                                                       * Creates a new ReqBattleUpStage instance using the specified properties.
                                                       * @function create
                                                       * @memberof m_proto.ReqBattleUpStage
                                                       * @static
                                                       * @param {m_proto.IReqBattleUpStage=} [properties] Properties to set
                                                       * @returns {m_proto.ReqBattleUpStage} ReqBattleUpStage instance
                                                       */
            ReqBattleUpStage.create = function create(properties) {
              return new ReqBattleUpStage(properties);
            }; /**
               * Encodes the specified ReqBattleUpStage message. Does not implicitly {@link m_proto.ReqBattleUpStage.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {m_proto.IReqBattleUpStage} message ReqBattleUpStage message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleUpStage.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.dungeon_id);
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.soldier_id);
              return writer;
            }; /**
               * Encodes the specified ReqBattleUpStage message, length delimited. Does not implicitly {@link m_proto.ReqBattleUpStage.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {m_proto.IReqBattleUpStage} message ReqBattleUpStage message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleUpStage.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqBattleUpStage message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqBattleUpStage} ReqBattleUpStage
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleUpStage.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqBattleUpStage();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqBattleUpStage message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqBattleUpStage} ReqBattleUpStage
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleUpStage.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqBattleUpStage message.
               * @function verify
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqBattleUpStage.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              return null;
            }; /**
               * Creates a ReqBattleUpStage message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqBattleUpStage} ReqBattleUpStage
               */
            ReqBattleUpStage.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqBattleUpStage) return object;
              var message = new $root.m_proto.ReqBattleUpStage();
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqBattleUpStage message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {m_proto.ReqBattleUpStage} message ReqBattleUpStage
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqBattleUpStage.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.dungeon_id = 0;
                object.soldier_id = 0;
              }
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              return object;
            }; /**
               * Converts this ReqBattleUpStage to JSON.
               * @function toJSON
               * @memberof m_proto.ReqBattleUpStage
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqBattleUpStage.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqBattleUpStage
               * @function getTypeUrl
               * @memberof m_proto.ReqBattleUpStage
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqBattleUpStage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqBattleUpStage";
            };
            return ReqBattleUpStage;
          }();
          m_proto.ResBattleUpStage = function () {
            /**
            * Properties of a ResBattleUpStage.
            * @memberof m_proto
            * @interface IResBattleUpStage
            * @property {number|null} [code] ResBattleUpStage code
            * @property {number|null} [dungeon_id] ResBattleUpStage dungeon_id
            * @property {number|null} [soldier_id] ResBattleUpStage soldier_id
            * @property {number|null} [shiqi_val] ResBattleUpStage shiqi_val
            * @property {number|null} [stage] ResBattleUpStage stage
            */ /**
               * Constructs a new ResBattleUpStage.
               * @memberof m_proto
               * @classdesc Represents a ResBattleUpStage.
               * @implements IResBattleUpStage
               * @constructor
               * @param {m_proto.IResBattleUpStage=} [properties] Properties to set
               */
            function ResBattleUpStage(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBattleUpStage code.
              * @member {number} code
              * @memberof m_proto.ResBattleUpStage
              * @instance
              */
            ResBattleUpStage.prototype.code = 0; /**
                                                 * ResBattleUpStage dungeon_id.
                                                 * @member {number} dungeon_id
                                                 * @memberof m_proto.ResBattleUpStage
                                                 * @instance
                                                 */
            ResBattleUpStage.prototype.dungeon_id = 0; /**
                                                       * ResBattleUpStage soldier_id.
                                                       * @member {number} soldier_id
                                                       * @memberof m_proto.ResBattleUpStage
                                                       * @instance
                                                       */
            ResBattleUpStage.prototype.soldier_id = 0; /**
                                                       * ResBattleUpStage shiqi_val.
                                                       * @member {number} shiqi_val
                                                       * @memberof m_proto.ResBattleUpStage
                                                       * @instance
                                                       */
            ResBattleUpStage.prototype.shiqi_val = 0; /**
                                                      * ResBattleUpStage stage.
                                                      * @member {number} stage
                                                      * @memberof m_proto.ResBattleUpStage
                                                      * @instance
                                                      */
            ResBattleUpStage.prototype.stage = 0; /**
                                                  * Creates a new ResBattleUpStage instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ResBattleUpStage
                                                  * @static
                                                  * @param {m_proto.IResBattleUpStage=} [properties] Properties to set
                                                  * @returns {m_proto.ResBattleUpStage} ResBattleUpStage instance
                                                  */
            ResBattleUpStage.create = function create(properties) {
              return new ResBattleUpStage(properties);
            }; /**
               * Encodes the specified ResBattleUpStage message. Does not implicitly {@link m_proto.ResBattleUpStage.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {m_proto.IResBattleUpStage} message ResBattleUpStage message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleUpStage.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.soldier_id);
              if (message.shiqi_val != null && Object.hasOwnProperty.call(message, "shiqi_val")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.shiqi_val);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.stage);
              return writer;
            }; /**
               * Encodes the specified ResBattleUpStage message, length delimited. Does not implicitly {@link m_proto.ResBattleUpStage.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {m_proto.IResBattleUpStage} message ResBattleUpStage message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleUpStage.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBattleUpStage message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBattleUpStage} ResBattleUpStage
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleUpStage.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBattleUpStage();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.shiqi_val = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBattleUpStage message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBattleUpStage} ResBattleUpStage
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleUpStage.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBattleUpStage message.
               * @function verify
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBattleUpStage.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              if (message.shiqi_val != null && message.hasOwnProperty("shiqi_val")) if (!$util.isInteger(message.shiqi_val)) return "shiqi_val: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              return null;
            }; /**
               * Creates a ResBattleUpStage message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBattleUpStage} ResBattleUpStage
               */
            ResBattleUpStage.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBattleUpStage) return object;
              var message = new $root.m_proto.ResBattleUpStage();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              if (object.shiqi_val != null) message.shiqi_val = object.shiqi_val | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              return message;
            }; /**
               * Creates a plain object from a ResBattleUpStage message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {m_proto.ResBattleUpStage} message ResBattleUpStage
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBattleUpStage.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
                object.soldier_id = 0;
                object.shiqi_val = 0;
                object.stage = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              if (message.shiqi_val != null && message.hasOwnProperty("shiqi_val")) object.shiqi_val = message.shiqi_val;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              return object;
            }; /**
               * Converts this ResBattleUpStage to JSON.
               * @function toJSON
               * @memberof m_proto.ResBattleUpStage
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBattleUpStage.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBattleUpStage
               * @function getTypeUrl
               * @memberof m_proto.ResBattleUpStage
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBattleUpStage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBattleUpStage";
            };
            return ResBattleUpStage;
          }();
          m_proto.ReqBattleSettle = function () {
            /**
            * Properties of a ReqBattleSettle.
            * @memberof m_proto
            * @interface IReqBattleSettle
            * @property {number|null} [dungeon_id] ReqBattleSettle dungeon_id
            * @property {number|null} [result] ReqBattleSettle result
            */ /**
               * Constructs a new ReqBattleSettle.
               * @memberof m_proto
               * @classdesc Represents a ReqBattleSettle.
               * @implements IReqBattleSettle
               * @constructor
               * @param {m_proto.IReqBattleSettle=} [properties] Properties to set
               */
            function ReqBattleSettle(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqBattleSettle dungeon_id.
              * @member {number} dungeon_id
              * @memberof m_proto.ReqBattleSettle
              * @instance
              */
            ReqBattleSettle.prototype.dungeon_id = 0; /**
                                                      * ReqBattleSettle result.
                                                      * @member {number} result
                                                      * @memberof m_proto.ReqBattleSettle
                                                      * @instance
                                                      */
            ReqBattleSettle.prototype.result = 0; /**
                                                  * Creates a new ReqBattleSettle instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ReqBattleSettle
                                                  * @static
                                                  * @param {m_proto.IReqBattleSettle=} [properties] Properties to set
                                                  * @returns {m_proto.ReqBattleSettle} ReqBattleSettle instance
                                                  */
            ReqBattleSettle.create = function create(properties) {
              return new ReqBattleSettle(properties);
            }; /**
               * Encodes the specified ReqBattleSettle message. Does not implicitly {@link m_proto.ReqBattleSettle.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {m_proto.IReqBattleSettle} message ReqBattleSettle message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleSettle.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.dungeon_id);
              if (message.result != null && Object.hasOwnProperty.call(message, "result")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.result);
              return writer;
            }; /**
               * Encodes the specified ReqBattleSettle message, length delimited. Does not implicitly {@link m_proto.ReqBattleSettle.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {m_proto.IReqBattleSettle} message ReqBattleSettle message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBattleSettle.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqBattleSettle message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqBattleSettle} ReqBattleSettle
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleSettle.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqBattleSettle();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.result = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqBattleSettle message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqBattleSettle} ReqBattleSettle
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBattleSettle.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqBattleSettle message.
               * @function verify
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqBattleSettle.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.result != null && message.hasOwnProperty("result")) if (!$util.isInteger(message.result)) return "result: integer expected";
              return null;
            }; /**
               * Creates a ReqBattleSettle message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqBattleSettle} ReqBattleSettle
               */
            ReqBattleSettle.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqBattleSettle) return object;
              var message = new $root.m_proto.ReqBattleSettle();
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.result != null) message.result = object.result | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqBattleSettle message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {m_proto.ReqBattleSettle} message ReqBattleSettle
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqBattleSettle.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.dungeon_id = 0;
                object.result = 0;
              }
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.result != null && message.hasOwnProperty("result")) object.result = message.result;
              return object;
            }; /**
               * Converts this ReqBattleSettle to JSON.
               * @function toJSON
               * @memberof m_proto.ReqBattleSettle
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqBattleSettle.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqBattleSettle
               * @function getTypeUrl
               * @memberof m_proto.ReqBattleSettle
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqBattleSettle.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqBattleSettle";
            };
            return ReqBattleSettle;
          }();
          m_proto.ResBattleSettle = function () {
            /**
            * Properties of a ResBattleSettle.
            * @memberof m_proto
            * @interface IResBattleSettle
            * @property {number|null} [code] ResBattleSettle code
            * @property {number|null} [dungeon_id] ResBattleSettle dungeon_id
            * @property {Array.<m_proto.IItem>|null} [items] ResBattleSettle items
            */ /**
               * Constructs a new ResBattleSettle.
               * @memberof m_proto
               * @classdesc Represents a ResBattleSettle.
               * @implements IResBattleSettle
               * @constructor
               * @param {m_proto.IResBattleSettle=} [properties] Properties to set
               */
            function ResBattleSettle(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBattleSettle code.
              * @member {number} code
              * @memberof m_proto.ResBattleSettle
              * @instance
              */
            ResBattleSettle.prototype.code = 0; /**
                                                * ResBattleSettle dungeon_id.
                                                * @member {number} dungeon_id
                                                * @memberof m_proto.ResBattleSettle
                                                * @instance
                                                */
            ResBattleSettle.prototype.dungeon_id = 0; /**
                                                      * ResBattleSettle items.
                                                      * @member {Array.<m_proto.IItem>} items
                                                      * @memberof m_proto.ResBattleSettle
                                                      * @instance
                                                      */
            ResBattleSettle.prototype.items = $util.emptyArray; /**
                                                                * Creates a new ResBattleSettle instance using the specified properties.
                                                                * @function create
                                                                * @memberof m_proto.ResBattleSettle
                                                                * @static
                                                                * @param {m_proto.IResBattleSettle=} [properties] Properties to set
                                                                * @returns {m_proto.ResBattleSettle} ResBattleSettle instance
                                                                */
            ResBattleSettle.create = function create(properties) {
              return new ResBattleSettle(properties);
            }; /**
               * Encodes the specified ResBattleSettle message. Does not implicitly {@link m_proto.ResBattleSettle.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {m_proto.IResBattleSettle} message ResBattleSettle message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleSettle.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResBattleSettle message, length delimited. Does not implicitly {@link m_proto.ResBattleSettle.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {m_proto.IResBattleSettle} message ResBattleSettle message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBattleSettle.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBattleSettle message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBattleSettle} ResBattleSettle
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleSettle.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBattleSettle();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBattleSettle message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBattleSettle} ResBattleSettle
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBattleSettle.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBattleSettle message.
               * @function verify
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBattleSettle.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResBattleSettle message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBattleSettle} ResBattleSettle
               */
            ResBattleSettle.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBattleSettle) return object;
              var message = new $root.m_proto.ResBattleSettle();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResBattleSettle.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResBattleSettle.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResBattleSettle message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {m_proto.ResBattleSettle} message ResBattleSettle
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBattleSettle.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResBattleSettle to JSON.
               * @function toJSON
               * @memberof m_proto.ResBattleSettle
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBattleSettle.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBattleSettle
               * @function getTypeUrl
               * @memberof m_proto.ResBattleSettle
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBattleSettle.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBattleSettle";
            };
            return ResBattleSettle;
          }();
          m_proto.ReqEnterDungeon = function () {
            /**
            * Properties of a ReqEnterDungeon.
            * @memberof m_proto
            * @interface IReqEnterDungeon
            * @property {number|null} [dungeon_id] ReqEnterDungeon dungeon_id
            */ /**
               * Constructs a new ReqEnterDungeon.
               * @memberof m_proto
               * @classdesc Represents a ReqEnterDungeon.
               * @implements IReqEnterDungeon
               * @constructor
               * @param {m_proto.IReqEnterDungeon=} [properties] Properties to set
               */
            function ReqEnterDungeon(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqEnterDungeon dungeon_id.
              * @member {number} dungeon_id
              * @memberof m_proto.ReqEnterDungeon
              * @instance
              */
            ReqEnterDungeon.prototype.dungeon_id = 0; /**
                                                      * Creates a new ReqEnterDungeon instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ReqEnterDungeon
                                                      * @static
                                                      * @param {m_proto.IReqEnterDungeon=} [properties] Properties to set
                                                      * @returns {m_proto.ReqEnterDungeon} ReqEnterDungeon instance
                                                      */
            ReqEnterDungeon.create = function create(properties) {
              return new ReqEnterDungeon(properties);
            }; /**
               * Encodes the specified ReqEnterDungeon message. Does not implicitly {@link m_proto.ReqEnterDungeon.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {m_proto.IReqEnterDungeon} message ReqEnterDungeon message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqEnterDungeon.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.dungeon_id);
              return writer;
            }; /**
               * Encodes the specified ReqEnterDungeon message, length delimited. Does not implicitly {@link m_proto.ReqEnterDungeon.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {m_proto.IReqEnterDungeon} message ReqEnterDungeon message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqEnterDungeon.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqEnterDungeon message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqEnterDungeon} ReqEnterDungeon
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqEnterDungeon.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqEnterDungeon();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqEnterDungeon message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqEnterDungeon} ReqEnterDungeon
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqEnterDungeon.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqEnterDungeon message.
               * @function verify
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqEnterDungeon.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              return null;
            }; /**
               * Creates a ReqEnterDungeon message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqEnterDungeon} ReqEnterDungeon
               */
            ReqEnterDungeon.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqEnterDungeon) return object;
              var message = new $root.m_proto.ReqEnterDungeon();
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqEnterDungeon message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {m_proto.ReqEnterDungeon} message ReqEnterDungeon
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqEnterDungeon.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.dungeon_id = 0;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              return object;
            }; /**
               * Converts this ReqEnterDungeon to JSON.
               * @function toJSON
               * @memberof m_proto.ReqEnterDungeon
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqEnterDungeon.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqEnterDungeon
               * @function getTypeUrl
               * @memberof m_proto.ReqEnterDungeon
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqEnterDungeon.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqEnterDungeon";
            };
            return ReqEnterDungeon;
          }();
          m_proto.ResEnterDungeon = function () {
            /**
            * Properties of a ResEnterDungeon.
            * @memberof m_proto
            * @interface IResEnterDungeon
            * @property {number|null} [code] ResEnterDungeon code
            * @property {number|null} [dungeon_id] ResEnterDungeon dungeon_id
            */ /**
               * Constructs a new ResEnterDungeon.
               * @memberof m_proto
               * @classdesc Represents a ResEnterDungeon.
               * @implements IResEnterDungeon
               * @constructor
               * @param {m_proto.IResEnterDungeon=} [properties] Properties to set
               */
            function ResEnterDungeon(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResEnterDungeon code.
              * @member {number} code
              * @memberof m_proto.ResEnterDungeon
              * @instance
              */
            ResEnterDungeon.prototype.code = 0; /**
                                                * ResEnterDungeon dungeon_id.
                                                * @member {number} dungeon_id
                                                * @memberof m_proto.ResEnterDungeon
                                                * @instance
                                                */
            ResEnterDungeon.prototype.dungeon_id = 0; /**
                                                      * Creates a new ResEnterDungeon instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ResEnterDungeon
                                                      * @static
                                                      * @param {m_proto.IResEnterDungeon=} [properties] Properties to set
                                                      * @returns {m_proto.ResEnterDungeon} ResEnterDungeon instance
                                                      */
            ResEnterDungeon.create = function create(properties) {
              return new ResEnterDungeon(properties);
            }; /**
               * Encodes the specified ResEnterDungeon message. Does not implicitly {@link m_proto.ResEnterDungeon.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {m_proto.IResEnterDungeon} message ResEnterDungeon message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResEnterDungeon.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              return writer;
            }; /**
               * Encodes the specified ResEnterDungeon message, length delimited. Does not implicitly {@link m_proto.ResEnterDungeon.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {m_proto.IResEnterDungeon} message ResEnterDungeon message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResEnterDungeon.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResEnterDungeon message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResEnterDungeon} ResEnterDungeon
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResEnterDungeon.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResEnterDungeon();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResEnterDungeon message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResEnterDungeon} ResEnterDungeon
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResEnterDungeon.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResEnterDungeon message.
               * @function verify
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResEnterDungeon.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              return null;
            }; /**
               * Creates a ResEnterDungeon message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResEnterDungeon} ResEnterDungeon
               */
            ResEnterDungeon.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResEnterDungeon) return object;
              var message = new $root.m_proto.ResEnterDungeon();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResEnterDungeon message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {m_proto.ResEnterDungeon} message ResEnterDungeon
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResEnterDungeon.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              return object;
            }; /**
               * Converts this ResEnterDungeon to JSON.
               * @function toJSON
               * @memberof m_proto.ResEnterDungeon
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResEnterDungeon.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResEnterDungeon
               * @function getTypeUrl
               * @memberof m_proto.ResEnterDungeon
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResEnterDungeon.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResEnterDungeon";
            };
            return ResEnterDungeon;
          }();
          m_proto.SoldierInfo = function () {
            /**
            * Properties of a SoldierInfo.
            * @memberof m_proto
            * @interface ISoldierInfo
            * @property {number|null} [soldier_id] SoldierInfo soldier_id
            * @property {number|null} [stage] SoldierInfo stage
            */ /**
               * Constructs a new SoldierInfo.
               * @memberof m_proto
               * @classdesc Represents a SoldierInfo.
               * @implements ISoldierInfo
               * @constructor
               * @param {m_proto.ISoldierInfo=} [properties] Properties to set
               */
            function SoldierInfo(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * SoldierInfo soldier_id.
              * @member {number} soldier_id
              * @memberof m_proto.SoldierInfo
              * @instance
              */
            SoldierInfo.prototype.soldier_id = 0; /**
                                                  * SoldierInfo stage.
                                                  * @member {number} stage
                                                  * @memberof m_proto.SoldierInfo
                                                  * @instance
                                                  */
            SoldierInfo.prototype.stage = 0; /**
                                             * Creates a new SoldierInfo instance using the specified properties.
                                             * @function create
                                             * @memberof m_proto.SoldierInfo
                                             * @static
                                             * @param {m_proto.ISoldierInfo=} [properties] Properties to set
                                             * @returns {m_proto.SoldierInfo} SoldierInfo instance
                                             */
            SoldierInfo.create = function create(properties) {
              return new SoldierInfo(properties);
            }; /**
               * Encodes the specified SoldierInfo message. Does not implicitly {@link m_proto.SoldierInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {m_proto.ISoldierInfo} message SoldierInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            SoldierInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldier_id);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.stage);
              return writer;
            }; /**
               * Encodes the specified SoldierInfo message, length delimited. Does not implicitly {@link m_proto.SoldierInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {m_proto.ISoldierInfo} message SoldierInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            SoldierInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a SoldierInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.SoldierInfo} SoldierInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            SoldierInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.SoldierInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a SoldierInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.SoldierInfo} SoldierInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            SoldierInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a SoldierInfo message.
               * @function verify
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            SoldierInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              return null;
            }; /**
               * Creates a SoldierInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.SoldierInfo} SoldierInfo
               */
            SoldierInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.SoldierInfo) return object;
              var message = new $root.m_proto.SoldierInfo();
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              return message;
            }; /**
               * Creates a plain object from a SoldierInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {m_proto.SoldierInfo} message SoldierInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            SoldierInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.soldier_id = 0;
                object.stage = 0;
              }
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              return object;
            }; /**
               * Converts this SoldierInfo to JSON.
               * @function toJSON
               * @memberof m_proto.SoldierInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            SoldierInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for SoldierInfo
               * @function getTypeUrl
               * @memberof m_proto.SoldierInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            SoldierInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.SoldierInfo";
            };
            return SoldierInfo;
          }();
          m_proto.ResDungeonInfo = function () {
            /**
            * Properties of a ResDungeonInfo.
            * @memberof m_proto
            * @interface IResDungeonInfo
            * @property {number|null} [code] ResDungeonInfo code
            * @property {number|null} [dungeon_id] ResDungeonInfo dungeon_id
            * @property {number|null} [wave_times] ResDungeonInfo wave_times
            * @property {number|null} [shiqi_val] ResDungeonInfo shiqi_val
            * @property {Array.<m_proto.IBattleUnit>|null} [units] ResDungeonInfo units
            * @property {Array.<m_proto.ISoldierInfo>|null} [soldiers] ResDungeonInfo soldiers
            */ /**
               * Constructs a new ResDungeonInfo.
               * @memberof m_proto
               * @classdesc Represents a ResDungeonInfo.
               * @implements IResDungeonInfo
               * @constructor
               * @param {m_proto.IResDungeonInfo=} [properties] Properties to set
               */
            function ResDungeonInfo(properties) {
              this.units = [];
              this.soldiers = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResDungeonInfo code.
              * @member {number} code
              * @memberof m_proto.ResDungeonInfo
              * @instance
              */
            ResDungeonInfo.prototype.code = 0; /**
                                               * ResDungeonInfo dungeon_id.
                                               * @member {number} dungeon_id
                                               * @memberof m_proto.ResDungeonInfo
                                               * @instance
                                               */
            ResDungeonInfo.prototype.dungeon_id = 0; /**
                                                     * ResDungeonInfo wave_times.
                                                     * @member {number} wave_times
                                                     * @memberof m_proto.ResDungeonInfo
                                                     * @instance
                                                     */
            ResDungeonInfo.prototype.wave_times = 0; /**
                                                     * ResDungeonInfo shiqi_val.
                                                     * @member {number} shiqi_val
                                                     * @memberof m_proto.ResDungeonInfo
                                                     * @instance
                                                     */
            ResDungeonInfo.prototype.shiqi_val = 0; /**
                                                    * ResDungeonInfo units.
                                                    * @member {Array.<m_proto.IBattleUnit>} units
                                                    * @memberof m_proto.ResDungeonInfo
                                                    * @instance
                                                    */
            ResDungeonInfo.prototype.units = $util.emptyArray; /**
                                                               * ResDungeonInfo soldiers.
                                                               * @member {Array.<m_proto.ISoldierInfo>} soldiers
                                                               * @memberof m_proto.ResDungeonInfo
                                                               * @instance
                                                               */
            ResDungeonInfo.prototype.soldiers = $util.emptyArray; /**
                                                                  * Creates a new ResDungeonInfo instance using the specified properties.
                                                                  * @function create
                                                                  * @memberof m_proto.ResDungeonInfo
                                                                  * @static
                                                                  * @param {m_proto.IResDungeonInfo=} [properties] Properties to set
                                                                  * @returns {m_proto.ResDungeonInfo} ResDungeonInfo instance
                                                                  */
            ResDungeonInfo.create = function create(properties) {
              return new ResDungeonInfo(properties);
            }; /**
               * Encodes the specified ResDungeonInfo message. Does not implicitly {@link m_proto.ResDungeonInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {m_proto.IResDungeonInfo} message ResDungeonInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDungeonInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              if (message.wave_times != null && Object.hasOwnProperty.call(message, "wave_times")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.wave_times);
              if (message.shiqi_val != null && Object.hasOwnProperty.call(message, "shiqi_val")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.shiqi_val);
              if (message.units != null && message.units.length) for (var i = 0; i < message.units.length; ++i) $root.m_proto.BattleUnit.encode(message.units[i], writer.uint32( /* id 5, wireType 2 =*/42).fork()).ldelim();
              if (message.soldiers != null && message.soldiers.length) for (var i = 0; i < message.soldiers.length; ++i) $root.m_proto.SoldierInfo.encode(message.soldiers[i], writer.uint32( /* id 6, wireType 2 =*/50).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResDungeonInfo message, length delimited. Does not implicitly {@link m_proto.ResDungeonInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {m_proto.IResDungeonInfo} message ResDungeonInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDungeonInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResDungeonInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResDungeonInfo} ResDungeonInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDungeonInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResDungeonInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.wave_times = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.shiqi_val = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      if (!(message.units && message.units.length)) message.units = [];
                      message.units.push($root.m_proto.BattleUnit.decode(reader, reader.uint32()));
                      break;
                    }
                  case 6:
                    {
                      if (!(message.soldiers && message.soldiers.length)) message.soldiers = [];
                      message.soldiers.push($root.m_proto.SoldierInfo.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResDungeonInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResDungeonInfo} ResDungeonInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDungeonInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResDungeonInfo message.
               * @function verify
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResDungeonInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              if (message.wave_times != null && message.hasOwnProperty("wave_times")) if (!$util.isInteger(message.wave_times)) return "wave_times: integer expected";
              if (message.shiqi_val != null && message.hasOwnProperty("shiqi_val")) if (!$util.isInteger(message.shiqi_val)) return "shiqi_val: integer expected";
              if (message.units != null && message.hasOwnProperty("units")) {
                if (!Array.isArray(message.units)) return "units: array expected";
                for (var i = 0; i < message.units.length; ++i) {
                  var error = $root.m_proto.BattleUnit.verify(message.units[i]);
                  if (error) return "units." + error;
                }
              }
              if (message.soldiers != null && message.hasOwnProperty("soldiers")) {
                if (!Array.isArray(message.soldiers)) return "soldiers: array expected";
                for (var i = 0; i < message.soldiers.length; ++i) {
                  var error = $root.m_proto.SoldierInfo.verify(message.soldiers[i]);
                  if (error) return "soldiers." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResDungeonInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResDungeonInfo} ResDungeonInfo
               */
            ResDungeonInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResDungeonInfo) return object;
              var message = new $root.m_proto.ResDungeonInfo();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              if (object.wave_times != null) message.wave_times = object.wave_times | 0;
              if (object.shiqi_val != null) message.shiqi_val = object.shiqi_val | 0;
              if (object.units) {
                if (!Array.isArray(object.units)) throw TypeError(".m_proto.ResDungeonInfo.units: array expected");
                message.units = [];
                for (var i = 0; i < object.units.length; ++i) {
                  if (typeof object.units[i] !== "object") throw TypeError(".m_proto.ResDungeonInfo.units: object expected");
                  message.units[i] = $root.m_proto.BattleUnit.fromObject(object.units[i]);
                }
              }
              if (object.soldiers) {
                if (!Array.isArray(object.soldiers)) throw TypeError(".m_proto.ResDungeonInfo.soldiers: array expected");
                message.soldiers = [];
                for (var i = 0; i < object.soldiers.length; ++i) {
                  if (typeof object.soldiers[i] !== "object") throw TypeError(".m_proto.ResDungeonInfo.soldiers: object expected");
                  message.soldiers[i] = $root.m_proto.SoldierInfo.fromObject(object.soldiers[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResDungeonInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {m_proto.ResDungeonInfo} message ResDungeonInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResDungeonInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) {
                object.units = [];
                object.soldiers = [];
              }
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
                object.wave_times = 0;
                object.shiqi_val = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              if (message.wave_times != null && message.hasOwnProperty("wave_times")) object.wave_times = message.wave_times;
              if (message.shiqi_val != null && message.hasOwnProperty("shiqi_val")) object.shiqi_val = message.shiqi_val;
              if (message.units && message.units.length) {
                object.units = [];
                for (var j = 0; j < message.units.length; ++j) object.units[j] = $root.m_proto.BattleUnit.toObject(message.units[j], options);
              }
              if (message.soldiers && message.soldiers.length) {
                object.soldiers = [];
                for (var j = 0; j < message.soldiers.length; ++j) object.soldiers[j] = $root.m_proto.SoldierInfo.toObject(message.soldiers[j], options);
              }
              return object;
            }; /**
               * Converts this ResDungeonInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ResDungeonInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResDungeonInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResDungeonInfo
               * @function getTypeUrl
               * @memberof m_proto.ResDungeonInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResDungeonInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResDungeonInfo";
            };
            return ResDungeonInfo;
          }();
          m_proto.ReqReTry = function () {
            /**
            * Properties of a ReqReTry.
            * @memberof m_proto
            * @interface IReqReTry
            */ /**
               * Constructs a new ReqReTry.
               * @memberof m_proto
               * @classdesc Represents a ReqReTry.
               * @implements IReqReTry
               * @constructor
               * @param {m_proto.IReqReTry=} [properties] Properties to set
               */
            function ReqReTry(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqReTry instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqReTry
              * @static
              * @param {m_proto.IReqReTry=} [properties] Properties to set
              * @returns {m_proto.ReqReTry} ReqReTry instance
              */
            ReqReTry.create = function create(properties) {
              return new ReqReTry(properties);
            }; /**
               * Encodes the specified ReqReTry message. Does not implicitly {@link m_proto.ReqReTry.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqReTry
               * @static
               * @param {m_proto.IReqReTry} message ReqReTry message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReTry.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqReTry message, length delimited. Does not implicitly {@link m_proto.ReqReTry.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqReTry
               * @static
               * @param {m_proto.IReqReTry} message ReqReTry message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReTry.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqReTry message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqReTry
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqReTry} ReqReTry
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReTry.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqReTry();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqReTry message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqReTry
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqReTry} ReqReTry
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReTry.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqReTry message.
               * @function verify
               * @memberof m_proto.ReqReTry
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqReTry.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqReTry message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqReTry
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqReTry} ReqReTry
               */
            ReqReTry.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqReTry) return object;
              return new $root.m_proto.ReqReTry();
            }; /**
               * Creates a plain object from a ReqReTry message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqReTry
               * @static
               * @param {m_proto.ReqReTry} message ReqReTry
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqReTry.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqReTry to JSON.
               * @function toJSON
               * @memberof m_proto.ReqReTry
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqReTry.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqReTry
               * @function getTypeUrl
               * @memberof m_proto.ReqReTry
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqReTry.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqReTry";
            };
            return ReqReTry;
          }();
          m_proto.ResReTry = function () {
            /**
            * Properties of a ResReTry.
            * @memberof m_proto
            * @interface IResReTry
            * @property {number|null} [code] ResReTry code
            * @property {number|null} [dungeon_id] ResReTry dungeon_id
            */ /**
               * Constructs a new ResReTry.
               * @memberof m_proto
               * @classdesc Represents a ResReTry.
               * @implements IResReTry
               * @constructor
               * @param {m_proto.IResReTry=} [properties] Properties to set
               */
            function ResReTry(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResReTry code.
              * @member {number} code
              * @memberof m_proto.ResReTry
              * @instance
              */
            ResReTry.prototype.code = 0; /**
                                         * ResReTry dungeon_id.
                                         * @member {number} dungeon_id
                                         * @memberof m_proto.ResReTry
                                         * @instance
                                         */
            ResReTry.prototype.dungeon_id = 0; /**
                                               * Creates a new ResReTry instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ResReTry
                                               * @static
                                               * @param {m_proto.IResReTry=} [properties] Properties to set
                                               * @returns {m_proto.ResReTry} ResReTry instance
                                               */
            ResReTry.create = function create(properties) {
              return new ResReTry(properties);
            }; /**
               * Encodes the specified ResReTry message. Does not implicitly {@link m_proto.ResReTry.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResReTry
               * @static
               * @param {m_proto.IResReTry} message ResReTry message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReTry.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.dungeon_id != null && Object.hasOwnProperty.call(message, "dungeon_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.dungeon_id);
              return writer;
            }; /**
               * Encodes the specified ResReTry message, length delimited. Does not implicitly {@link m_proto.ResReTry.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResReTry
               * @static
               * @param {m_proto.IResReTry} message ResReTry message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReTry.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResReTry message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResReTry
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResReTry} ResReTry
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReTry.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResReTry();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.dungeon_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResReTry message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResReTry
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResReTry} ResReTry
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReTry.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResReTry message.
               * @function verify
               * @memberof m_proto.ResReTry
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResReTry.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) if (!$util.isInteger(message.dungeon_id)) return "dungeon_id: integer expected";
              return null;
            }; /**
               * Creates a ResReTry message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResReTry
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResReTry} ResReTry
               */
            ResReTry.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResReTry) return object;
              var message = new $root.m_proto.ResReTry();
              if (object.code != null) message.code = object.code | 0;
              if (object.dungeon_id != null) message.dungeon_id = object.dungeon_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResReTry message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResReTry
               * @static
               * @param {m_proto.ResReTry} message ResReTry
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResReTry.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.dungeon_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.dungeon_id != null && message.hasOwnProperty("dungeon_id")) object.dungeon_id = message.dungeon_id;
              return object;
            }; /**
               * Converts this ResReTry to JSON.
               * @function toJSON
               * @memberof m_proto.ResReTry
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResReTry.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResReTry
               * @function getTypeUrl
               * @memberof m_proto.ResReTry
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResReTry.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResReTry";
            };
            return ResReTry;
          }();
          m_proto.ResMarquee = function () {
            /**
            * Properties of a ResMarquee.
            * @memberof m_proto
            * @interface IResMarquee
            * @property {number|null} [code] ResMarquee code
            * @property {string|null} [content] ResMarquee content
            * @property {string|null} [player_name] ResMarquee player_name
            * @property {string|null} [item_name] ResMarquee item_name
            * @property {number|null} [item_id] ResMarquee item_id
            * @property {number|null} [item_color] ResMarquee item_color
            * @property {number|null} [item_type] ResMarquee item_type
            * @property {number|null} [duration] ResMarquee duration
            */ /**
               * Constructs a new ResMarquee.
               * @memberof m_proto
               * @classdesc Represents a ResMarquee.
               * @implements IResMarquee
               * @constructor
               * @param {m_proto.IResMarquee=} [properties] Properties to set
               */
            function ResMarquee(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResMarquee code.
              * @member {number} code
              * @memberof m_proto.ResMarquee
              * @instance
              */
            ResMarquee.prototype.code = 0; /**
                                           * ResMarquee content.
                                           * @member {string} content
                                           * @memberof m_proto.ResMarquee
                                           * @instance
                                           */
            ResMarquee.prototype.content = ""; /**
                                               * ResMarquee player_name.
                                               * @member {string} player_name
                                               * @memberof m_proto.ResMarquee
                                               * @instance
                                               */
            ResMarquee.prototype.player_name = ""; /**
                                                   * ResMarquee item_name.
                                                   * @member {string} item_name
                                                   * @memberof m_proto.ResMarquee
                                                   * @instance
                                                   */
            ResMarquee.prototype.item_name = ""; /**
                                                 * ResMarquee item_id.
                                                 * @member {number} item_id
                                                 * @memberof m_proto.ResMarquee
                                                 * @instance
                                                 */
            ResMarquee.prototype.item_id = 0; /**
                                              * ResMarquee item_color.
                                              * @member {number} item_color
                                              * @memberof m_proto.ResMarquee
                                              * @instance
                                              */
            ResMarquee.prototype.item_color = 0; /**
                                                 * ResMarquee item_type.
                                                 * @member {number} item_type
                                                 * @memberof m_proto.ResMarquee
                                                 * @instance
                                                 */
            ResMarquee.prototype.item_type = 0; /**
                                                * ResMarquee duration.
                                                * @member {number} duration
                                                * @memberof m_proto.ResMarquee
                                                * @instance
                                                */
            ResMarquee.prototype.duration = 0; /**
                                               * Creates a new ResMarquee instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ResMarquee
                                               * @static
                                               * @param {m_proto.IResMarquee=} [properties] Properties to set
                                               * @returns {m_proto.ResMarquee} ResMarquee instance
                                               */
            ResMarquee.create = function create(properties) {
              return new ResMarquee(properties);
            }; /**
               * Encodes the specified ResMarquee message. Does not implicitly {@link m_proto.ResMarquee.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResMarquee
               * @static
               * @param {m_proto.IResMarquee} message ResMarquee message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResMarquee.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.content);
              if (message.player_name != null && Object.hasOwnProperty.call(message, "player_name")) writer.uint32( /* id 3, wireType 2 =*/26).string(message.player_name);
              if (message.item_name != null && Object.hasOwnProperty.call(message, "item_name")) writer.uint32( /* id 4, wireType 2 =*/34).string(message.item_name);
              if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.item_id);
              if (message.item_color != null && Object.hasOwnProperty.call(message, "item_color")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.item_color);
              if (message.item_type != null && Object.hasOwnProperty.call(message, "item_type")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.item_type);
              if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) writer.uint32( /* id 8, wireType 0 =*/64).int32(message.duration);
              return writer;
            }; /**
               * Encodes the specified ResMarquee message, length delimited. Does not implicitly {@link m_proto.ResMarquee.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResMarquee
               * @static
               * @param {m_proto.IResMarquee} message ResMarquee message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResMarquee.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResMarquee message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResMarquee
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResMarquee} ResMarquee
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResMarquee.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResMarquee();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.content = reader.string();
                      break;
                    }
                  case 3:
                    {
                      message.player_name = reader.string();
                      break;
                    }
                  case 4:
                    {
                      message.item_name = reader.string();
                      break;
                    }
                  case 5:
                    {
                      message.item_id = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.item_color = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.item_type = reader.int32();
                      break;
                    }
                  case 8:
                    {
                      message.duration = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResMarquee message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResMarquee
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResMarquee} ResMarquee
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResMarquee.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResMarquee message.
               * @function verify
               * @memberof m_proto.ResMarquee
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResMarquee.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.content != null && message.hasOwnProperty("content")) if (!$util.isString(message.content)) return "content: string expected";
              if (message.player_name != null && message.hasOwnProperty("player_name")) if (!$util.isString(message.player_name)) return "player_name: string expected";
              if (message.item_name != null && message.hasOwnProperty("item_name")) if (!$util.isString(message.item_name)) return "item_name: string expected";
              if (message.item_id != null && message.hasOwnProperty("item_id")) if (!$util.isInteger(message.item_id)) return "item_id: integer expected";
              if (message.item_color != null && message.hasOwnProperty("item_color")) if (!$util.isInteger(message.item_color)) return "item_color: integer expected";
              if (message.item_type != null && message.hasOwnProperty("item_type")) if (!$util.isInteger(message.item_type)) return "item_type: integer expected";
              if (message.duration != null && message.hasOwnProperty("duration")) if (!$util.isInteger(message.duration)) return "duration: integer expected";
              return null;
            }; /**
               * Creates a ResMarquee message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResMarquee
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResMarquee} ResMarquee
               */
            ResMarquee.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResMarquee) return object;
              var message = new $root.m_proto.ResMarquee();
              if (object.code != null) message.code = object.code | 0;
              if (object.content != null) message.content = String(object.content);
              if (object.player_name != null) message.player_name = String(object.player_name);
              if (object.item_name != null) message.item_name = String(object.item_name);
              if (object.item_id != null) message.item_id = object.item_id | 0;
              if (object.item_color != null) message.item_color = object.item_color | 0;
              if (object.item_type != null) message.item_type = object.item_type | 0;
              if (object.duration != null) message.duration = object.duration | 0;
              return message;
            }; /**
               * Creates a plain object from a ResMarquee message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResMarquee
               * @static
               * @param {m_proto.ResMarquee} message ResMarquee
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResMarquee.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.content = "";
                object.player_name = "";
                object.item_name = "";
                object.item_id = 0;
                object.item_color = 0;
                object.item_type = 0;
                object.duration = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.content != null && message.hasOwnProperty("content")) object.content = message.content;
              if (message.player_name != null && message.hasOwnProperty("player_name")) object.player_name = message.player_name;
              if (message.item_name != null && message.hasOwnProperty("item_name")) object.item_name = message.item_name;
              if (message.item_id != null && message.hasOwnProperty("item_id")) object.item_id = message.item_id;
              if (message.item_color != null && message.hasOwnProperty("item_color")) object.item_color = message.item_color;
              if (message.item_type != null && message.hasOwnProperty("item_type")) object.item_type = message.item_type;
              if (message.duration != null && message.hasOwnProperty("duration")) object.duration = message.duration;
              return object;
            }; /**
               * Converts this ResMarquee to JSON.
               * @function toJSON
               * @memberof m_proto.ResMarquee
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResMarquee.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResMarquee
               * @function getTypeUrl
               * @memberof m_proto.ResMarquee
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResMarquee.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResMarquee";
            };
            return ResMarquee;
          }();
          m_proto.ReqHeroList = function () {
            /**
            * Properties of a ReqHeroList.
            * @memberof m_proto
            * @interface IReqHeroList
            */ /**
               * Constructs a new ReqHeroList.
               * @memberof m_proto
               * @classdesc Represents a ReqHeroList.
               * @implements IReqHeroList
               * @constructor
               * @param {m_proto.IReqHeroList=} [properties] Properties to set
               */
            function ReqHeroList(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqHeroList instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqHeroList
              * @static
              * @param {m_proto.IReqHeroList=} [properties] Properties to set
              * @returns {m_proto.ReqHeroList} ReqHeroList instance
              */
            ReqHeroList.create = function create(properties) {
              return new ReqHeroList(properties);
            }; /**
               * Encodes the specified ReqHeroList message. Does not implicitly {@link m_proto.ReqHeroList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {m_proto.IReqHeroList} message ReqHeroList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqHeroList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqHeroList message, length delimited. Does not implicitly {@link m_proto.ReqHeroList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {m_proto.IReqHeroList} message ReqHeroList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqHeroList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqHeroList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqHeroList} ReqHeroList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqHeroList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqHeroList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqHeroList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqHeroList} ReqHeroList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqHeroList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqHeroList message.
               * @function verify
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqHeroList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqHeroList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqHeroList} ReqHeroList
               */
            ReqHeroList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqHeroList) return object;
              return new $root.m_proto.ReqHeroList();
            }; /**
               * Creates a plain object from a ReqHeroList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {m_proto.ReqHeroList} message ReqHeroList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqHeroList.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqHeroList to JSON.
               * @function toJSON
               * @memberof m_proto.ReqHeroList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqHeroList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqHeroList
               * @function getTypeUrl
               * @memberof m_proto.ReqHeroList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqHeroList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqHeroList";
            };
            return ReqHeroList;
          }();
          m_proto.ResHeroList = function () {
            /**
            * Properties of a ResHeroList.
            * @memberof m_proto
            * @interface IResHeroList
            * @property {number|null} [code] ResHeroList code
            * @property {Array.<m_proto.IHero>|null} [heros] ResHeroList heros
            */ /**
               * Constructs a new ResHeroList.
               * @memberof m_proto
               * @classdesc Represents a ResHeroList.
               * @implements IResHeroList
               * @constructor
               * @param {m_proto.IResHeroList=} [properties] Properties to set
               */
            function ResHeroList(properties) {
              this.heros = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResHeroList code.
              * @member {number} code
              * @memberof m_proto.ResHeroList
              * @instance
              */
            ResHeroList.prototype.code = 0; /**
                                            * ResHeroList heros.
                                            * @member {Array.<m_proto.IHero>} heros
                                            * @memberof m_proto.ResHeroList
                                            * @instance
                                            */
            ResHeroList.prototype.heros = $util.emptyArray; /**
                                                            * Creates a new ResHeroList instance using the specified properties.
                                                            * @function create
                                                            * @memberof m_proto.ResHeroList
                                                            * @static
                                                            * @param {m_proto.IResHeroList=} [properties] Properties to set
                                                            * @returns {m_proto.ResHeroList} ResHeroList instance
                                                            */
            ResHeroList.create = function create(properties) {
              return new ResHeroList(properties);
            }; /**
               * Encodes the specified ResHeroList message. Does not implicitly {@link m_proto.ResHeroList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResHeroList
               * @static
               * @param {m_proto.IResHeroList} message ResHeroList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResHeroList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.heros != null && message.heros.length) for (var i = 0; i < message.heros.length; ++i) $root.m_proto.Hero.encode(message.heros[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResHeroList message, length delimited. Does not implicitly {@link m_proto.ResHeroList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResHeroList
               * @static
               * @param {m_proto.IResHeroList} message ResHeroList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResHeroList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResHeroList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResHeroList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResHeroList} ResHeroList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResHeroList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResHeroList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.heros && message.heros.length)) message.heros = [];
                      message.heros.push($root.m_proto.Hero.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResHeroList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResHeroList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResHeroList} ResHeroList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResHeroList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResHeroList message.
               * @function verify
               * @memberof m_proto.ResHeroList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResHeroList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.heros != null && message.hasOwnProperty("heros")) {
                if (!Array.isArray(message.heros)) return "heros: array expected";
                for (var i = 0; i < message.heros.length; ++i) {
                  var error = $root.m_proto.Hero.verify(message.heros[i]);
                  if (error) return "heros." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResHeroList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResHeroList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResHeroList} ResHeroList
               */
            ResHeroList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResHeroList) return object;
              var message = new $root.m_proto.ResHeroList();
              if (object.code != null) message.code = object.code | 0;
              if (object.heros) {
                if (!Array.isArray(object.heros)) throw TypeError(".m_proto.ResHeroList.heros: array expected");
                message.heros = [];
                for (var i = 0; i < object.heros.length; ++i) {
                  if (typeof object.heros[i] !== "object") throw TypeError(".m_proto.ResHeroList.heros: object expected");
                  message.heros[i] = $root.m_proto.Hero.fromObject(object.heros[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResHeroList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResHeroList
               * @static
               * @param {m_proto.ResHeroList} message ResHeroList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResHeroList.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.heros = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.heros && message.heros.length) {
                object.heros = [];
                for (var j = 0; j < message.heros.length; ++j) object.heros[j] = $root.m_proto.Hero.toObject(message.heros[j], options);
              }
              return object;
            }; /**
               * Converts this ResHeroList to JSON.
               * @function toJSON
               * @memberof m_proto.ResHeroList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResHeroList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResHeroList
               * @function getTypeUrl
               * @memberof m_proto.ResHeroList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResHeroList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResHeroList";
            };
            return ResHeroList;
          }();
          m_proto.Hero = function () {
            /**
            * Properties of a Hero.
            * @memberof m_proto
            * @interface IHero
            * @property {number|null} [hero_id] Hero hero_id
            * @property {number|null} [level] Hero level
            * @property {number|null} [stage] Hero stage
            * @property {number|null} [star] Hero star
            * @property {number|null} [zhuanwu_id] Hero zhuanwu_id
            * @property {number|null} [zhuanwu_star] Hero zhuanwu_star
            * @property {Array.<m_proto.IZhuanWuAttr>|null} [attrs] Hero attrs
            */ /**
               * Constructs a new Hero.
               * @memberof m_proto
               * @classdesc Represents a Hero.
               * @implements IHero
               * @constructor
               * @param {m_proto.IHero=} [properties] Properties to set
               */
            function Hero(properties) {
              this.attrs = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Hero hero_id.
              * @member {number} hero_id
              * @memberof m_proto.Hero
              * @instance
              */
            Hero.prototype.hero_id = 0; /**
                                        * Hero level.
                                        * @member {number} level
                                        * @memberof m_proto.Hero
                                        * @instance
                                        */
            Hero.prototype.level = 0; /**
                                      * Hero stage.
                                      * @member {number} stage
                                      * @memberof m_proto.Hero
                                      * @instance
                                      */
            Hero.prototype.stage = 0; /**
                                      * Hero star.
                                      * @member {number} star
                                      * @memberof m_proto.Hero
                                      * @instance
                                      */
            Hero.prototype.star = 0; /**
                                     * Hero zhuanwu_id.
                                     * @member {number} zhuanwu_id
                                     * @memberof m_proto.Hero
                                     * @instance
                                     */
            Hero.prototype.zhuanwu_id = 0; /**
                                           * Hero zhuanwu_star.
                                           * @member {number} zhuanwu_star
                                           * @memberof m_proto.Hero
                                           * @instance
                                           */
            Hero.prototype.zhuanwu_star = 0; /**
                                             * Hero attrs.
                                             * @member {Array.<m_proto.IZhuanWuAttr>} attrs
                                             * @memberof m_proto.Hero
                                             * @instance
                                             */
            Hero.prototype.attrs = $util.emptyArray; /**
                                                     * Creates a new Hero instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.Hero
                                                     * @static
                                                     * @param {m_proto.IHero=} [properties] Properties to set
                                                     * @returns {m_proto.Hero} Hero instance
                                                     */
            Hero.create = function create(properties) {
              return new Hero(properties);
            }; /**
               * Encodes the specified Hero message. Does not implicitly {@link m_proto.Hero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Hero
               * @static
               * @param {m_proto.IHero} message Hero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Hero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.level);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.stage);
              if (message.star != null && Object.hasOwnProperty.call(message, "star")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.star);
              if (message.zhuanwu_id != null && Object.hasOwnProperty.call(message, "zhuanwu_id")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.zhuanwu_id);
              if (message.zhuanwu_star != null && Object.hasOwnProperty.call(message, "zhuanwu_star")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.zhuanwu_star);
              if (message.attrs != null && message.attrs.length) for (var i = 0; i < message.attrs.length; ++i) $root.m_proto.ZhuanWuAttr.encode(message.attrs[i], writer.uint32( /* id 7, wireType 2 =*/58).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified Hero message, length delimited. Does not implicitly {@link m_proto.Hero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Hero
               * @static
               * @param {m_proto.IHero} message Hero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Hero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a Hero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Hero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Hero} Hero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Hero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Hero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.star = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.zhuanwu_id = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.zhuanwu_star = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      if (!(message.attrs && message.attrs.length)) message.attrs = [];
                      message.attrs.push($root.m_proto.ZhuanWuAttr.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a Hero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Hero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Hero} Hero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Hero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a Hero message.
               * @function verify
               * @memberof m_proto.Hero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Hero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              if (message.star != null && message.hasOwnProperty("star")) if (!$util.isInteger(message.star)) return "star: integer expected";
              if (message.zhuanwu_id != null && message.hasOwnProperty("zhuanwu_id")) if (!$util.isInteger(message.zhuanwu_id)) return "zhuanwu_id: integer expected";
              if (message.zhuanwu_star != null && message.hasOwnProperty("zhuanwu_star")) if (!$util.isInteger(message.zhuanwu_star)) return "zhuanwu_star: integer expected";
              if (message.attrs != null && message.hasOwnProperty("attrs")) {
                if (!Array.isArray(message.attrs)) return "attrs: array expected";
                for (var i = 0; i < message.attrs.length; ++i) {
                  var error = $root.m_proto.ZhuanWuAttr.verify(message.attrs[i]);
                  if (error) return "attrs." + error;
                }
              }
              return null;
            }; /**
               * Creates a Hero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Hero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Hero} Hero
               */
            Hero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Hero) return object;
              var message = new $root.m_proto.Hero();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.level != null) message.level = object.level | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              if (object.star != null) message.star = object.star | 0;
              if (object.zhuanwu_id != null) message.zhuanwu_id = object.zhuanwu_id | 0;
              if (object.zhuanwu_star != null) message.zhuanwu_star = object.zhuanwu_star | 0;
              if (object.attrs) {
                if (!Array.isArray(object.attrs)) throw TypeError(".m_proto.Hero.attrs: array expected");
                message.attrs = [];
                for (var i = 0; i < object.attrs.length; ++i) {
                  if (typeof object.attrs[i] !== "object") throw TypeError(".m_proto.Hero.attrs: object expected");
                  message.attrs[i] = $root.m_proto.ZhuanWuAttr.fromObject(object.attrs[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a Hero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Hero
               * @static
               * @param {m_proto.Hero} message Hero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Hero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.attrs = [];
              if (options.defaults) {
                object.hero_id = 0;
                object.level = 0;
                object.stage = 0;
                object.star = 0;
                object.zhuanwu_id = 0;
                object.zhuanwu_star = 0;
              }
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              if (message.star != null && message.hasOwnProperty("star")) object.star = message.star;
              if (message.zhuanwu_id != null && message.hasOwnProperty("zhuanwu_id")) object.zhuanwu_id = message.zhuanwu_id;
              if (message.zhuanwu_star != null && message.hasOwnProperty("zhuanwu_star")) object.zhuanwu_star = message.zhuanwu_star;
              if (message.attrs && message.attrs.length) {
                object.attrs = [];
                for (var j = 0; j < message.attrs.length; ++j) object.attrs[j] = $root.m_proto.ZhuanWuAttr.toObject(message.attrs[j], options);
              }
              return object;
            }; /**
               * Converts this Hero to JSON.
               * @function toJSON
               * @memberof m_proto.Hero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Hero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Hero
               * @function getTypeUrl
               * @memberof m_proto.Hero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Hero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Hero";
            };
            return Hero;
          }();
          m_proto.ResNewHero = function () {
            /**
            * Properties of a ResNewHero.
            * @memberof m_proto
            * @interface IResNewHero
            * @property {number|null} [code] ResNewHero code
            * @property {m_proto.IHero|null} [hero] ResNewHero hero
            */ /**
               * Constructs a new ResNewHero.
               * @memberof m_proto
               * @classdesc Represents a ResNewHero.
               * @implements IResNewHero
               * @constructor
               * @param {m_proto.IResNewHero=} [properties] Properties to set
               */
            function ResNewHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResNewHero code.
              * @member {number} code
              * @memberof m_proto.ResNewHero
              * @instance
              */
            ResNewHero.prototype.code = 0; /**
                                           * ResNewHero hero.
                                           * @member {m_proto.IHero|null|undefined} hero
                                           * @memberof m_proto.ResNewHero
                                           * @instance
                                           */
            ResNewHero.prototype.hero = null; /**
                                              * Creates a new ResNewHero instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ResNewHero
                                              * @static
                                              * @param {m_proto.IResNewHero=} [properties] Properties to set
                                              * @returns {m_proto.ResNewHero} ResNewHero instance
                                              */
            ResNewHero.create = function create(properties) {
              return new ResNewHero(properties);
            }; /**
               * Encodes the specified ResNewHero message. Does not implicitly {@link m_proto.ResNewHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResNewHero
               * @static
               * @param {m_proto.IResNewHero} message ResNewHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResNewHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero != null && Object.hasOwnProperty.call(message, "hero")) $root.m_proto.Hero.encode(message.hero, writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResNewHero message, length delimited. Does not implicitly {@link m_proto.ResNewHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResNewHero
               * @static
               * @param {m_proto.IResNewHero} message ResNewHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResNewHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResNewHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResNewHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResNewHero} ResNewHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResNewHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResNewHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero = $root.m_proto.Hero.decode(reader, reader.uint32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResNewHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResNewHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResNewHero} ResNewHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResNewHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResNewHero message.
               * @function verify
               * @memberof m_proto.ResNewHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResNewHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero != null && message.hasOwnProperty("hero")) {
                var error = $root.m_proto.Hero.verify(message.hero);
                if (error) return "hero." + error;
              }
              return null;
            }; /**
               * Creates a ResNewHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResNewHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResNewHero} ResNewHero
               */
            ResNewHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResNewHero) return object;
              var message = new $root.m_proto.ResNewHero();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero != null) {
                if (typeof object.hero !== "object") throw TypeError(".m_proto.ResNewHero.hero: object expected");
                message.hero = $root.m_proto.Hero.fromObject(object.hero);
              }
              return message;
            }; /**
               * Creates a plain object from a ResNewHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResNewHero
               * @static
               * @param {m_proto.ResNewHero} message ResNewHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResNewHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.hero = null;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero != null && message.hasOwnProperty("hero")) object.hero = $root.m_proto.Hero.toObject(message.hero, options);
              return object;
            }; /**
               * Converts this ResNewHero to JSON.
               * @function toJSON
               * @memberof m_proto.ResNewHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResNewHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResNewHero
               * @function getTypeUrl
               * @memberof m_proto.ResNewHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResNewHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResNewHero";
            };
            return ResNewHero;
          }();
          m_proto.ReqActivateHero = function () {
            /**
            * Properties of a ReqActivateHero.
            * @memberof m_proto
            * @interface IReqActivateHero
            * @property {number|null} [hero_id] ReqActivateHero hero_id
            */ /**
               * Constructs a new ReqActivateHero.
               * @memberof m_proto
               * @classdesc Represents a ReqActivateHero.
               * @implements IReqActivateHero
               * @constructor
               * @param {m_proto.IReqActivateHero=} [properties] Properties to set
               */
            function ReqActivateHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqActivateHero hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqActivateHero
              * @instance
              */
            ReqActivateHero.prototype.hero_id = 0; /**
                                                   * Creates a new ReqActivateHero instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ReqActivateHero
                                                   * @static
                                                   * @param {m_proto.IReqActivateHero=} [properties] Properties to set
                                                   * @returns {m_proto.ReqActivateHero} ReqActivateHero instance
                                                   */
            ReqActivateHero.create = function create(properties) {
              return new ReqActivateHero(properties);
            }; /**
               * Encodes the specified ReqActivateHero message. Does not implicitly {@link m_proto.ReqActivateHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {m_proto.IReqActivateHero} message ReqActivateHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqActivateHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqActivateHero message, length delimited. Does not implicitly {@link m_proto.ReqActivateHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {m_proto.IReqActivateHero} message ReqActivateHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqActivateHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqActivateHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqActivateHero} ReqActivateHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqActivateHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqActivateHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqActivateHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqActivateHero} ReqActivateHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqActivateHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqActivateHero message.
               * @function verify
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqActivateHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqActivateHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqActivateHero} ReqActivateHero
               */
            ReqActivateHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqActivateHero) return object;
              var message = new $root.m_proto.ReqActivateHero();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqActivateHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {m_proto.ReqActivateHero} message ReqActivateHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqActivateHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.hero_id = 0;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqActivateHero to JSON.
               * @function toJSON
               * @memberof m_proto.ReqActivateHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqActivateHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqActivateHero
               * @function getTypeUrl
               * @memberof m_proto.ReqActivateHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqActivateHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqActivateHero";
            };
            return ReqActivateHero;
          }();
          m_proto.ResActivateHero = function () {
            /**
            * Properties of a ResActivateHero.
            * @memberof m_proto
            * @interface IResActivateHero
            * @property {number|null} [code] ResActivateHero code
            */ /**
               * Constructs a new ResActivateHero.
               * @memberof m_proto
               * @classdesc Represents a ResActivateHero.
               * @implements IResActivateHero
               * @constructor
               * @param {m_proto.IResActivateHero=} [properties] Properties to set
               */
            function ResActivateHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResActivateHero code.
              * @member {number} code
              * @memberof m_proto.ResActivateHero
              * @instance
              */
            ResActivateHero.prototype.code = 0; /**
                                                * Creates a new ResActivateHero instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ResActivateHero
                                                * @static
                                                * @param {m_proto.IResActivateHero=} [properties] Properties to set
                                                * @returns {m_proto.ResActivateHero} ResActivateHero instance
                                                */
            ResActivateHero.create = function create(properties) {
              return new ResActivateHero(properties);
            }; /**
               * Encodes the specified ResActivateHero message. Does not implicitly {@link m_proto.ResActivateHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {m_proto.IResActivateHero} message ResActivateHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResActivateHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResActivateHero message, length delimited. Does not implicitly {@link m_proto.ResActivateHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {m_proto.IResActivateHero} message ResActivateHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResActivateHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResActivateHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResActivateHero} ResActivateHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResActivateHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResActivateHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResActivateHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResActivateHero} ResActivateHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResActivateHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResActivateHero message.
               * @function verify
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResActivateHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResActivateHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResActivateHero} ResActivateHero
               */
            ResActivateHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResActivateHero) return object;
              var message = new $root.m_proto.ResActivateHero();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResActivateHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {m_proto.ResActivateHero} message ResActivateHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResActivateHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResActivateHero to JSON.
               * @function toJSON
               * @memberof m_proto.ResActivateHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResActivateHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResActivateHero
               * @function getTypeUrl
               * @memberof m_proto.ResActivateHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResActivateHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResActivateHero";
            };
            return ResActivateHero;
          }();
          m_proto.ReqUpgradeHero = function () {
            /**
            * Properties of a ReqUpgradeHero.
            * @memberof m_proto
            * @interface IReqUpgradeHero
            * @property {number|null} [hero_id] ReqUpgradeHero hero_id
            */ /**
               * Constructs a new ReqUpgradeHero.
               * @memberof m_proto
               * @classdesc Represents a ReqUpgradeHero.
               * @implements IReqUpgradeHero
               * @constructor
               * @param {m_proto.IReqUpgradeHero=} [properties] Properties to set
               */
            function ReqUpgradeHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUpgradeHero hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqUpgradeHero
              * @instance
              */
            ReqUpgradeHero.prototype.hero_id = 0; /**
                                                  * Creates a new ReqUpgradeHero instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ReqUpgradeHero
                                                  * @static
                                                  * @param {m_proto.IReqUpgradeHero=} [properties] Properties to set
                                                  * @returns {m_proto.ReqUpgradeHero} ReqUpgradeHero instance
                                                  */
            ReqUpgradeHero.create = function create(properties) {
              return new ReqUpgradeHero(properties);
            }; /**
               * Encodes the specified ReqUpgradeHero message. Does not implicitly {@link m_proto.ReqUpgradeHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {m_proto.IReqUpgradeHero} message ReqUpgradeHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpgradeHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqUpgradeHero message, length delimited. Does not implicitly {@link m_proto.ReqUpgradeHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {m_proto.IReqUpgradeHero} message ReqUpgradeHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpgradeHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUpgradeHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUpgradeHero} ReqUpgradeHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpgradeHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUpgradeHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUpgradeHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUpgradeHero} ReqUpgradeHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpgradeHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUpgradeHero message.
               * @function verify
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUpgradeHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqUpgradeHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUpgradeHero} ReqUpgradeHero
               */
            ReqUpgradeHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUpgradeHero) return object;
              var message = new $root.m_proto.ReqUpgradeHero();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUpgradeHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {m_proto.ReqUpgradeHero} message ReqUpgradeHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUpgradeHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.hero_id = 0;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqUpgradeHero to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUpgradeHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUpgradeHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUpgradeHero
               * @function getTypeUrl
               * @memberof m_proto.ReqUpgradeHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUpgradeHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUpgradeHero";
            };
            return ReqUpgradeHero;
          }();
          m_proto.ResUpgradeHero = function () {
            /**
            * Properties of a ResUpgradeHero.
            * @memberof m_proto
            * @interface IResUpgradeHero
            * @property {number|null} [code] ResUpgradeHero code
            * @property {number|null} [hero_id] ResUpgradeHero hero_id
            * @property {number|null} [level] ResUpgradeHero level
            */ /**
               * Constructs a new ResUpgradeHero.
               * @memberof m_proto
               * @classdesc Represents a ResUpgradeHero.
               * @implements IResUpgradeHero
               * @constructor
               * @param {m_proto.IResUpgradeHero=} [properties] Properties to set
               */
            function ResUpgradeHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUpgradeHero code.
              * @member {number} code
              * @memberof m_proto.ResUpgradeHero
              * @instance
              */
            ResUpgradeHero.prototype.code = 0; /**
                                               * ResUpgradeHero hero_id.
                                               * @member {number} hero_id
                                               * @memberof m_proto.ResUpgradeHero
                                               * @instance
                                               */
            ResUpgradeHero.prototype.hero_id = 0; /**
                                                  * ResUpgradeHero level.
                                                  * @member {number} level
                                                  * @memberof m_proto.ResUpgradeHero
                                                  * @instance
                                                  */
            ResUpgradeHero.prototype.level = 0; /**
                                                * Creates a new ResUpgradeHero instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ResUpgradeHero
                                                * @static
                                                * @param {m_proto.IResUpgradeHero=} [properties] Properties to set
                                                * @returns {m_proto.ResUpgradeHero} ResUpgradeHero instance
                                                */
            ResUpgradeHero.create = function create(properties) {
              return new ResUpgradeHero(properties);
            }; /**
               * Encodes the specified ResUpgradeHero message. Does not implicitly {@link m_proto.ResUpgradeHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {m_proto.IResUpgradeHero} message ResUpgradeHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpgradeHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.level);
              return writer;
            }; /**
               * Encodes the specified ResUpgradeHero message, length delimited. Does not implicitly {@link m_proto.ResUpgradeHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {m_proto.IResUpgradeHero} message ResUpgradeHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpgradeHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUpgradeHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUpgradeHero} ResUpgradeHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpgradeHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUpgradeHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUpgradeHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUpgradeHero} ResUpgradeHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpgradeHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUpgradeHero message.
               * @function verify
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUpgradeHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              return null;
            }; /**
               * Creates a ResUpgradeHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUpgradeHero} ResUpgradeHero
               */
            ResUpgradeHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUpgradeHero) return object;
              var message = new $root.m_proto.ResUpgradeHero();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.level != null) message.level = object.level | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUpgradeHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {m_proto.ResUpgradeHero} message ResUpgradeHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUpgradeHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.hero_id = 0;
                object.level = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              return object;
            }; /**
               * Converts this ResUpgradeHero to JSON.
               * @function toJSON
               * @memberof m_proto.ResUpgradeHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUpgradeHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUpgradeHero
               * @function getTypeUrl
               * @memberof m_proto.ResUpgradeHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUpgradeHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUpgradeHero";
            };
            return ResUpgradeHero;
          }();
          m_proto.ReqUpStageHero = function () {
            /**
            * Properties of a ReqUpStageHero.
            * @memberof m_proto
            * @interface IReqUpStageHero
            * @property {number|null} [hero_id] ReqUpStageHero hero_id
            */ /**
               * Constructs a new ReqUpStageHero.
               * @memberof m_proto
               * @classdesc Represents a ReqUpStageHero.
               * @implements IReqUpStageHero
               * @constructor
               * @param {m_proto.IReqUpStageHero=} [properties] Properties to set
               */
            function ReqUpStageHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUpStageHero hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqUpStageHero
              * @instance
              */
            ReqUpStageHero.prototype.hero_id = 0; /**
                                                  * Creates a new ReqUpStageHero instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ReqUpStageHero
                                                  * @static
                                                  * @param {m_proto.IReqUpStageHero=} [properties] Properties to set
                                                  * @returns {m_proto.ReqUpStageHero} ReqUpStageHero instance
                                                  */
            ReqUpStageHero.create = function create(properties) {
              return new ReqUpStageHero(properties);
            }; /**
               * Encodes the specified ReqUpStageHero message. Does not implicitly {@link m_proto.ReqUpStageHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {m_proto.IReqUpStageHero} message ReqUpStageHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpStageHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqUpStageHero message, length delimited. Does not implicitly {@link m_proto.ReqUpStageHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {m_proto.IReqUpStageHero} message ReqUpStageHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpStageHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUpStageHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUpStageHero} ReqUpStageHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpStageHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUpStageHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUpStageHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUpStageHero} ReqUpStageHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpStageHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUpStageHero message.
               * @function verify
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUpStageHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqUpStageHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUpStageHero} ReqUpStageHero
               */
            ReqUpStageHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUpStageHero) return object;
              var message = new $root.m_proto.ReqUpStageHero();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUpStageHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {m_proto.ReqUpStageHero} message ReqUpStageHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUpStageHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.hero_id = 0;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqUpStageHero to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUpStageHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUpStageHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUpStageHero
               * @function getTypeUrl
               * @memberof m_proto.ReqUpStageHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUpStageHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUpStageHero";
            };
            return ReqUpStageHero;
          }();
          m_proto.ResUpStageHero = function () {
            /**
            * Properties of a ResUpStageHero.
            * @memberof m_proto
            * @interface IResUpStageHero
            * @property {number|null} [code] ResUpStageHero code
            * @property {number|null} [hero_id] ResUpStageHero hero_id
            * @property {number|null} [stage] ResUpStageHero stage
            */ /**
               * Constructs a new ResUpStageHero.
               * @memberof m_proto
               * @classdesc Represents a ResUpStageHero.
               * @implements IResUpStageHero
               * @constructor
               * @param {m_proto.IResUpStageHero=} [properties] Properties to set
               */
            function ResUpStageHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUpStageHero code.
              * @member {number} code
              * @memberof m_proto.ResUpStageHero
              * @instance
              */
            ResUpStageHero.prototype.code = 0; /**
                                               * ResUpStageHero hero_id.
                                               * @member {number} hero_id
                                               * @memberof m_proto.ResUpStageHero
                                               * @instance
                                               */
            ResUpStageHero.prototype.hero_id = 0; /**
                                                  * ResUpStageHero stage.
                                                  * @member {number} stage
                                                  * @memberof m_proto.ResUpStageHero
                                                  * @instance
                                                  */
            ResUpStageHero.prototype.stage = 0; /**
                                                * Creates a new ResUpStageHero instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ResUpStageHero
                                                * @static
                                                * @param {m_proto.IResUpStageHero=} [properties] Properties to set
                                                * @returns {m_proto.ResUpStageHero} ResUpStageHero instance
                                                */
            ResUpStageHero.create = function create(properties) {
              return new ResUpStageHero(properties);
            }; /**
               * Encodes the specified ResUpStageHero message. Does not implicitly {@link m_proto.ResUpStageHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {m_proto.IResUpStageHero} message ResUpStageHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpStageHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.stage);
              return writer;
            }; /**
               * Encodes the specified ResUpStageHero message, length delimited. Does not implicitly {@link m_proto.ResUpStageHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {m_proto.IResUpStageHero} message ResUpStageHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpStageHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUpStageHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUpStageHero} ResUpStageHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpStageHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUpStageHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUpStageHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUpStageHero} ResUpStageHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpStageHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUpStageHero message.
               * @function verify
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUpStageHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              return null;
            }; /**
               * Creates a ResUpStageHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUpStageHero} ResUpStageHero
               */
            ResUpStageHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUpStageHero) return object;
              var message = new $root.m_proto.ResUpStageHero();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUpStageHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {m_proto.ResUpStageHero} message ResUpStageHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUpStageHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.hero_id = 0;
                object.stage = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              return object;
            }; /**
               * Converts this ResUpStageHero to JSON.
               * @function toJSON
               * @memberof m_proto.ResUpStageHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUpStageHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUpStageHero
               * @function getTypeUrl
               * @memberof m_proto.ResUpStageHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUpStageHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUpStageHero";
            };
            return ResUpStageHero;
          }();
          m_proto.ReqUpStarHero = function () {
            /**
            * Properties of a ReqUpStarHero.
            * @memberof m_proto
            * @interface IReqUpStarHero
            * @property {number|null} [hero_id] ReqUpStarHero hero_id
            */ /**
               * Constructs a new ReqUpStarHero.
               * @memberof m_proto
               * @classdesc Represents a ReqUpStarHero.
               * @implements IReqUpStarHero
               * @constructor
               * @param {m_proto.IReqUpStarHero=} [properties] Properties to set
               */
            function ReqUpStarHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUpStarHero hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqUpStarHero
              * @instance
              */
            ReqUpStarHero.prototype.hero_id = 0; /**
                                                 * Creates a new ReqUpStarHero instance using the specified properties.
                                                 * @function create
                                                 * @memberof m_proto.ReqUpStarHero
                                                 * @static
                                                 * @param {m_proto.IReqUpStarHero=} [properties] Properties to set
                                                 * @returns {m_proto.ReqUpStarHero} ReqUpStarHero instance
                                                 */
            ReqUpStarHero.create = function create(properties) {
              return new ReqUpStarHero(properties);
            }; /**
               * Encodes the specified ReqUpStarHero message. Does not implicitly {@link m_proto.ReqUpStarHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {m_proto.IReqUpStarHero} message ReqUpStarHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpStarHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqUpStarHero message, length delimited. Does not implicitly {@link m_proto.ReqUpStarHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {m_proto.IReqUpStarHero} message ReqUpStarHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpStarHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUpStarHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUpStarHero} ReqUpStarHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpStarHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUpStarHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUpStarHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUpStarHero} ReqUpStarHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpStarHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUpStarHero message.
               * @function verify
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUpStarHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqUpStarHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUpStarHero} ReqUpStarHero
               */
            ReqUpStarHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUpStarHero) return object;
              var message = new $root.m_proto.ReqUpStarHero();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUpStarHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {m_proto.ReqUpStarHero} message ReqUpStarHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUpStarHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.hero_id = 0;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqUpStarHero to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUpStarHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUpStarHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUpStarHero
               * @function getTypeUrl
               * @memberof m_proto.ReqUpStarHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUpStarHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUpStarHero";
            };
            return ReqUpStarHero;
          }();
          m_proto.ResUpStarHero = function () {
            /**
            * Properties of a ResUpStarHero.
            * @memberof m_proto
            * @interface IResUpStarHero
            * @property {number|null} [code] ResUpStarHero code
            * @property {number|null} [hero_id] ResUpStarHero hero_id
            * @property {number|null} [star] ResUpStarHero star
            * @property {number|null} [zhuanwu_id] ResUpStarHero zhuanwu_id
            * @property {number|null} [zhuanwu_star] ResUpStarHero zhuanwu_star
            */ /**
               * Constructs a new ResUpStarHero.
               * @memberof m_proto
               * @classdesc Represents a ResUpStarHero.
               * @implements IResUpStarHero
               * @constructor
               * @param {m_proto.IResUpStarHero=} [properties] Properties to set
               */
            function ResUpStarHero(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUpStarHero code.
              * @member {number} code
              * @memberof m_proto.ResUpStarHero
              * @instance
              */
            ResUpStarHero.prototype.code = 0; /**
                                              * ResUpStarHero hero_id.
                                              * @member {number} hero_id
                                              * @memberof m_proto.ResUpStarHero
                                              * @instance
                                              */
            ResUpStarHero.prototype.hero_id = 0; /**
                                                 * ResUpStarHero star.
                                                 * @member {number} star
                                                 * @memberof m_proto.ResUpStarHero
                                                 * @instance
                                                 */
            ResUpStarHero.prototype.star = 0; /**
                                              * ResUpStarHero zhuanwu_id.
                                              * @member {number} zhuanwu_id
                                              * @memberof m_proto.ResUpStarHero
                                              * @instance
                                              */
            ResUpStarHero.prototype.zhuanwu_id = 0; /**
                                                    * ResUpStarHero zhuanwu_star.
                                                    * @member {number} zhuanwu_star
                                                    * @memberof m_proto.ResUpStarHero
                                                    * @instance
                                                    */
            ResUpStarHero.prototype.zhuanwu_star = 0; /**
                                                      * Creates a new ResUpStarHero instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ResUpStarHero
                                                      * @static
                                                      * @param {m_proto.IResUpStarHero=} [properties] Properties to set
                                                      * @returns {m_proto.ResUpStarHero} ResUpStarHero instance
                                                      */
            ResUpStarHero.create = function create(properties) {
              return new ResUpStarHero(properties);
            }; /**
               * Encodes the specified ResUpStarHero message. Does not implicitly {@link m_proto.ResUpStarHero.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {m_proto.IResUpStarHero} message ResUpStarHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpStarHero.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.star != null && Object.hasOwnProperty.call(message, "star")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.star);
              if (message.zhuanwu_id != null && Object.hasOwnProperty.call(message, "zhuanwu_id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.zhuanwu_id);
              if (message.zhuanwu_star != null && Object.hasOwnProperty.call(message, "zhuanwu_star")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.zhuanwu_star);
              return writer;
            }; /**
               * Encodes the specified ResUpStarHero message, length delimited. Does not implicitly {@link m_proto.ResUpStarHero.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {m_proto.IResUpStarHero} message ResUpStarHero message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpStarHero.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUpStarHero message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUpStarHero} ResUpStarHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpStarHero.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUpStarHero();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.star = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.zhuanwu_id = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.zhuanwu_star = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUpStarHero message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUpStarHero} ResUpStarHero
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpStarHero.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUpStarHero message.
               * @function verify
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUpStarHero.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.star != null && message.hasOwnProperty("star")) if (!$util.isInteger(message.star)) return "star: integer expected";
              if (message.zhuanwu_id != null && message.hasOwnProperty("zhuanwu_id")) if (!$util.isInteger(message.zhuanwu_id)) return "zhuanwu_id: integer expected";
              if (message.zhuanwu_star != null && message.hasOwnProperty("zhuanwu_star")) if (!$util.isInteger(message.zhuanwu_star)) return "zhuanwu_star: integer expected";
              return null;
            }; /**
               * Creates a ResUpStarHero message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUpStarHero} ResUpStarHero
               */
            ResUpStarHero.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUpStarHero) return object;
              var message = new $root.m_proto.ResUpStarHero();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.star != null) message.star = object.star | 0;
              if (object.zhuanwu_id != null) message.zhuanwu_id = object.zhuanwu_id | 0;
              if (object.zhuanwu_star != null) message.zhuanwu_star = object.zhuanwu_star | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUpStarHero message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {m_proto.ResUpStarHero} message ResUpStarHero
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUpStarHero.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.hero_id = 0;
                object.star = 0;
                object.zhuanwu_id = 0;
                object.zhuanwu_star = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.star != null && message.hasOwnProperty("star")) object.star = message.star;
              if (message.zhuanwu_id != null && message.hasOwnProperty("zhuanwu_id")) object.zhuanwu_id = message.zhuanwu_id;
              if (message.zhuanwu_star != null && message.hasOwnProperty("zhuanwu_star")) object.zhuanwu_star = message.zhuanwu_star;
              return object;
            }; /**
               * Converts this ResUpStarHero to JSON.
               * @function toJSON
               * @memberof m_proto.ResUpStarHero
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUpStarHero.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUpStarHero
               * @function getTypeUrl
               * @memberof m_proto.ResUpStarHero
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUpStarHero.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUpStarHero";
            };
            return ResUpStarHero;
          }();
          m_proto.ReqStarUpZhuangwu = function () {
            /**
            * Properties of a ReqStarUpZhuangwu.
            * @memberof m_proto
            * @interface IReqStarUpZhuangwu
            * @property {number|null} [hero_id] ReqStarUpZhuangwu hero_id
            */ /**
               * Constructs a new ReqStarUpZhuangwu.
               * @memberof m_proto
               * @classdesc Represents a ReqStarUpZhuangwu.
               * @implements IReqStarUpZhuangwu
               * @constructor
               * @param {m_proto.IReqStarUpZhuangwu=} [properties] Properties to set
               */
            function ReqStarUpZhuangwu(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqStarUpZhuangwu hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqStarUpZhuangwu
              * @instance
              */
            ReqStarUpZhuangwu.prototype.hero_id = 0; /**
                                                     * Creates a new ReqStarUpZhuangwu instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ReqStarUpZhuangwu
                                                     * @static
                                                     * @param {m_proto.IReqStarUpZhuangwu=} [properties] Properties to set
                                                     * @returns {m_proto.ReqStarUpZhuangwu} ReqStarUpZhuangwu instance
                                                     */
            ReqStarUpZhuangwu.create = function create(properties) {
              return new ReqStarUpZhuangwu(properties);
            }; /**
               * Encodes the specified ReqStarUpZhuangwu message. Does not implicitly {@link m_proto.ReqStarUpZhuangwu.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {m_proto.IReqStarUpZhuangwu} message ReqStarUpZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqStarUpZhuangwu.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqStarUpZhuangwu message, length delimited. Does not implicitly {@link m_proto.ReqStarUpZhuangwu.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {m_proto.IReqStarUpZhuangwu} message ReqStarUpZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqStarUpZhuangwu.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqStarUpZhuangwu message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqStarUpZhuangwu} ReqStarUpZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqStarUpZhuangwu.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqStarUpZhuangwu();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqStarUpZhuangwu message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqStarUpZhuangwu} ReqStarUpZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqStarUpZhuangwu.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqStarUpZhuangwu message.
               * @function verify
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqStarUpZhuangwu.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqStarUpZhuangwu message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqStarUpZhuangwu} ReqStarUpZhuangwu
               */
            ReqStarUpZhuangwu.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqStarUpZhuangwu) return object;
              var message = new $root.m_proto.ReqStarUpZhuangwu();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqStarUpZhuangwu message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {m_proto.ReqStarUpZhuangwu} message ReqStarUpZhuangwu
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqStarUpZhuangwu.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.hero_id = 0;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqStarUpZhuangwu to JSON.
               * @function toJSON
               * @memberof m_proto.ReqStarUpZhuangwu
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqStarUpZhuangwu.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqStarUpZhuangwu
               * @function getTypeUrl
               * @memberof m_proto.ReqStarUpZhuangwu
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqStarUpZhuangwu.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqStarUpZhuangwu";
            };
            return ReqStarUpZhuangwu;
          }();
          m_proto.ResStarUpZhuangwu = function () {
            /**
            * Properties of a ResStarUpZhuangwu.
            * @memberof m_proto
            * @interface IResStarUpZhuangwu
            * @property {number|null} [code] ResStarUpZhuangwu code
            * @property {number|null} [hero_id] ResStarUpZhuangwu hero_id
            * @property {number|null} [zhuanwu_star_level] ResStarUpZhuangwu zhuanwu_star_level
            * @property {number|null} [zhuanwu_id] ResStarUpZhuangwu zhuanwu_id
            * @property {Array.<m_proto.IZhuanWuAttr>|null} [zhuanwu_attrs] ResStarUpZhuangwu zhuanwu_attrs
            */ /**
               * Constructs a new ResStarUpZhuangwu.
               * @memberof m_proto
               * @classdesc Represents a ResStarUpZhuangwu.
               * @implements IResStarUpZhuangwu
               * @constructor
               * @param {m_proto.IResStarUpZhuangwu=} [properties] Properties to set
               */
            function ResStarUpZhuangwu(properties) {
              this.zhuanwu_attrs = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResStarUpZhuangwu code.
              * @member {number} code
              * @memberof m_proto.ResStarUpZhuangwu
              * @instance
              */
            ResStarUpZhuangwu.prototype.code = 0; /**
                                                  * ResStarUpZhuangwu hero_id.
                                                  * @member {number} hero_id
                                                  * @memberof m_proto.ResStarUpZhuangwu
                                                  * @instance
                                                  */
            ResStarUpZhuangwu.prototype.hero_id = 0; /**
                                                     * ResStarUpZhuangwu zhuanwu_star_level.
                                                     * @member {number} zhuanwu_star_level
                                                     * @memberof m_proto.ResStarUpZhuangwu
                                                     * @instance
                                                     */
            ResStarUpZhuangwu.prototype.zhuanwu_star_level = 0; /**
                                                                * ResStarUpZhuangwu zhuanwu_id.
                                                                * @member {number} zhuanwu_id
                                                                * @memberof m_proto.ResStarUpZhuangwu
                                                                * @instance
                                                                */
            ResStarUpZhuangwu.prototype.zhuanwu_id = 0; /**
                                                        * ResStarUpZhuangwu zhuanwu_attrs.
                                                        * @member {Array.<m_proto.IZhuanWuAttr>} zhuanwu_attrs
                                                        * @memberof m_proto.ResStarUpZhuangwu
                                                        * @instance
                                                        */
            ResStarUpZhuangwu.prototype.zhuanwu_attrs = $util.emptyArray; /**
                                                                          * Creates a new ResStarUpZhuangwu instance using the specified properties.
                                                                          * @function create
                                                                          * @memberof m_proto.ResStarUpZhuangwu
                                                                          * @static
                                                                          * @param {m_proto.IResStarUpZhuangwu=} [properties] Properties to set
                                                                          * @returns {m_proto.ResStarUpZhuangwu} ResStarUpZhuangwu instance
                                                                          */
            ResStarUpZhuangwu.create = function create(properties) {
              return new ResStarUpZhuangwu(properties);
            }; /**
               * Encodes the specified ResStarUpZhuangwu message. Does not implicitly {@link m_proto.ResStarUpZhuangwu.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {m_proto.IResStarUpZhuangwu} message ResStarUpZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResStarUpZhuangwu.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.zhuanwu_star_level != null && Object.hasOwnProperty.call(message, "zhuanwu_star_level")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.zhuanwu_star_level);
              if (message.zhuanwu_id != null && Object.hasOwnProperty.call(message, "zhuanwu_id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.zhuanwu_id);
              if (message.zhuanwu_attrs != null && message.zhuanwu_attrs.length) for (var i = 0; i < message.zhuanwu_attrs.length; ++i) $root.m_proto.ZhuanWuAttr.encode(message.zhuanwu_attrs[i], writer.uint32( /* id 5, wireType 2 =*/42).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResStarUpZhuangwu message, length delimited. Does not implicitly {@link m_proto.ResStarUpZhuangwu.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {m_proto.IResStarUpZhuangwu} message ResStarUpZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResStarUpZhuangwu.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResStarUpZhuangwu message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResStarUpZhuangwu} ResStarUpZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResStarUpZhuangwu.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResStarUpZhuangwu();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.zhuanwu_star_level = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.zhuanwu_id = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      if (!(message.zhuanwu_attrs && message.zhuanwu_attrs.length)) message.zhuanwu_attrs = [];
                      message.zhuanwu_attrs.push($root.m_proto.ZhuanWuAttr.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResStarUpZhuangwu message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResStarUpZhuangwu} ResStarUpZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResStarUpZhuangwu.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResStarUpZhuangwu message.
               * @function verify
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResStarUpZhuangwu.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.zhuanwu_star_level != null && message.hasOwnProperty("zhuanwu_star_level")) if (!$util.isInteger(message.zhuanwu_star_level)) return "zhuanwu_star_level: integer expected";
              if (message.zhuanwu_id != null && message.hasOwnProperty("zhuanwu_id")) if (!$util.isInteger(message.zhuanwu_id)) return "zhuanwu_id: integer expected";
              if (message.zhuanwu_attrs != null && message.hasOwnProperty("zhuanwu_attrs")) {
                if (!Array.isArray(message.zhuanwu_attrs)) return "zhuanwu_attrs: array expected";
                for (var i = 0; i < message.zhuanwu_attrs.length; ++i) {
                  var error = $root.m_proto.ZhuanWuAttr.verify(message.zhuanwu_attrs[i]);
                  if (error) return "zhuanwu_attrs." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResStarUpZhuangwu message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResStarUpZhuangwu} ResStarUpZhuangwu
               */
            ResStarUpZhuangwu.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResStarUpZhuangwu) return object;
              var message = new $root.m_proto.ResStarUpZhuangwu();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.zhuanwu_star_level != null) message.zhuanwu_star_level = object.zhuanwu_star_level | 0;
              if (object.zhuanwu_id != null) message.zhuanwu_id = object.zhuanwu_id | 0;
              if (object.zhuanwu_attrs) {
                if (!Array.isArray(object.zhuanwu_attrs)) throw TypeError(".m_proto.ResStarUpZhuangwu.zhuanwu_attrs: array expected");
                message.zhuanwu_attrs = [];
                for (var i = 0; i < object.zhuanwu_attrs.length; ++i) {
                  if (typeof object.zhuanwu_attrs[i] !== "object") throw TypeError(".m_proto.ResStarUpZhuangwu.zhuanwu_attrs: object expected");
                  message.zhuanwu_attrs[i] = $root.m_proto.ZhuanWuAttr.fromObject(object.zhuanwu_attrs[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResStarUpZhuangwu message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {m_proto.ResStarUpZhuangwu} message ResStarUpZhuangwu
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResStarUpZhuangwu.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.zhuanwu_attrs = [];
              if (options.defaults) {
                object.code = 0;
                object.hero_id = 0;
                object.zhuanwu_star_level = 0;
                object.zhuanwu_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.zhuanwu_star_level != null && message.hasOwnProperty("zhuanwu_star_level")) object.zhuanwu_star_level = message.zhuanwu_star_level;
              if (message.zhuanwu_id != null && message.hasOwnProperty("zhuanwu_id")) object.zhuanwu_id = message.zhuanwu_id;
              if (message.zhuanwu_attrs && message.zhuanwu_attrs.length) {
                object.zhuanwu_attrs = [];
                for (var j = 0; j < message.zhuanwu_attrs.length; ++j) object.zhuanwu_attrs[j] = $root.m_proto.ZhuanWuAttr.toObject(message.zhuanwu_attrs[j], options);
              }
              return object;
            }; /**
               * Converts this ResStarUpZhuangwu to JSON.
               * @function toJSON
               * @memberof m_proto.ResStarUpZhuangwu
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResStarUpZhuangwu.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResStarUpZhuangwu
               * @function getTypeUrl
               * @memberof m_proto.ResStarUpZhuangwu
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResStarUpZhuangwu.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResStarUpZhuangwu";
            };
            return ResStarUpZhuangwu;
          }();
          m_proto.ReqLockZhuangwuAttr = function () {
            /**
            * Properties of a ReqLockZhuangwuAttr.
            * @memberof m_proto
            * @interface IReqLockZhuangwuAttr
            * @property {number|null} [hero_id] ReqLockZhuangwuAttr hero_id
            * @property {number|null} [index] ReqLockZhuangwuAttr index
            * @property {number|null} [lock_state] ReqLockZhuangwuAttr lock_state
            */ /**
               * Constructs a new ReqLockZhuangwuAttr.
               * @memberof m_proto
               * @classdesc Represents a ReqLockZhuangwuAttr.
               * @implements IReqLockZhuangwuAttr
               * @constructor
               * @param {m_proto.IReqLockZhuangwuAttr=} [properties] Properties to set
               */
            function ReqLockZhuangwuAttr(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqLockZhuangwuAttr hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqLockZhuangwuAttr
              * @instance
              */
            ReqLockZhuangwuAttr.prototype.hero_id = 0; /**
                                                       * ReqLockZhuangwuAttr index.
                                                       * @member {number} index
                                                       * @memberof m_proto.ReqLockZhuangwuAttr
                                                       * @instance
                                                       */
            ReqLockZhuangwuAttr.prototype.index = 0; /**
                                                     * ReqLockZhuangwuAttr lock_state.
                                                     * @member {number} lock_state
                                                     * @memberof m_proto.ReqLockZhuangwuAttr
                                                     * @instance
                                                     */
            ReqLockZhuangwuAttr.prototype.lock_state = 0; /**
                                                          * Creates a new ReqLockZhuangwuAttr instance using the specified properties.
                                                          * @function create
                                                          * @memberof m_proto.ReqLockZhuangwuAttr
                                                          * @static
                                                          * @param {m_proto.IReqLockZhuangwuAttr=} [properties] Properties to set
                                                          * @returns {m_proto.ReqLockZhuangwuAttr} ReqLockZhuangwuAttr instance
                                                          */
            ReqLockZhuangwuAttr.create = function create(properties) {
              return new ReqLockZhuangwuAttr(properties);
            }; /**
               * Encodes the specified ReqLockZhuangwuAttr message. Does not implicitly {@link m_proto.ReqLockZhuangwuAttr.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {m_proto.IReqLockZhuangwuAttr} message ReqLockZhuangwuAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLockZhuangwuAttr.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.index);
              if (message.lock_state != null && Object.hasOwnProperty.call(message, "lock_state")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.lock_state);
              return writer;
            }; /**
               * Encodes the specified ReqLockZhuangwuAttr message, length delimited. Does not implicitly {@link m_proto.ReqLockZhuangwuAttr.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {m_proto.IReqLockZhuangwuAttr} message ReqLockZhuangwuAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLockZhuangwuAttr.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqLockZhuangwuAttr message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqLockZhuangwuAttr} ReqLockZhuangwuAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLockZhuangwuAttr.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqLockZhuangwuAttr();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.lock_state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqLockZhuangwuAttr message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqLockZhuangwuAttr} ReqLockZhuangwuAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLockZhuangwuAttr.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqLockZhuangwuAttr message.
               * @function verify
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqLockZhuangwuAttr.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) if (!$util.isInteger(message.lock_state)) return "lock_state: integer expected";
              return null;
            }; /**
               * Creates a ReqLockZhuangwuAttr message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqLockZhuangwuAttr} ReqLockZhuangwuAttr
               */
            ReqLockZhuangwuAttr.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqLockZhuangwuAttr) return object;
              var message = new $root.m_proto.ReqLockZhuangwuAttr();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.index != null) message.index = object.index | 0;
              if (object.lock_state != null) message.lock_state = object.lock_state | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqLockZhuangwuAttr message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {m_proto.ReqLockZhuangwuAttr} message ReqLockZhuangwuAttr
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqLockZhuangwuAttr.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.hero_id = 0;
                object.index = 0;
                object.lock_state = 0;
              }
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) object.lock_state = message.lock_state;
              return object;
            }; /**
               * Converts this ReqLockZhuangwuAttr to JSON.
               * @function toJSON
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqLockZhuangwuAttr.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqLockZhuangwuAttr
               * @function getTypeUrl
               * @memberof m_proto.ReqLockZhuangwuAttr
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqLockZhuangwuAttr.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqLockZhuangwuAttr";
            };
            return ReqLockZhuangwuAttr;
          }();
          m_proto.ResLockZhuangwuAttr = function () {
            /**
            * Properties of a ResLockZhuangwuAttr.
            * @memberof m_proto
            * @interface IResLockZhuangwuAttr
            * @property {number|null} [code] ResLockZhuangwuAttr code
            * @property {number|null} [hero_id] ResLockZhuangwuAttr hero_id
            * @property {number|null} [index] ResLockZhuangwuAttr index
            * @property {number|null} [lock_state] ResLockZhuangwuAttr lock_state
            */ /**
               * Constructs a new ResLockZhuangwuAttr.
               * @memberof m_proto
               * @classdesc Represents a ResLockZhuangwuAttr.
               * @implements IResLockZhuangwuAttr
               * @constructor
               * @param {m_proto.IResLockZhuangwuAttr=} [properties] Properties to set
               */
            function ResLockZhuangwuAttr(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResLockZhuangwuAttr code.
              * @member {number} code
              * @memberof m_proto.ResLockZhuangwuAttr
              * @instance
              */
            ResLockZhuangwuAttr.prototype.code = 0; /**
                                                    * ResLockZhuangwuAttr hero_id.
                                                    * @member {number} hero_id
                                                    * @memberof m_proto.ResLockZhuangwuAttr
                                                    * @instance
                                                    */
            ResLockZhuangwuAttr.prototype.hero_id = 0; /**
                                                       * ResLockZhuangwuAttr index.
                                                       * @member {number} index
                                                       * @memberof m_proto.ResLockZhuangwuAttr
                                                       * @instance
                                                       */
            ResLockZhuangwuAttr.prototype.index = 0; /**
                                                     * ResLockZhuangwuAttr lock_state.
                                                     * @member {number} lock_state
                                                     * @memberof m_proto.ResLockZhuangwuAttr
                                                     * @instance
                                                     */
            ResLockZhuangwuAttr.prototype.lock_state = 0; /**
                                                          * Creates a new ResLockZhuangwuAttr instance using the specified properties.
                                                          * @function create
                                                          * @memberof m_proto.ResLockZhuangwuAttr
                                                          * @static
                                                          * @param {m_proto.IResLockZhuangwuAttr=} [properties] Properties to set
                                                          * @returns {m_proto.ResLockZhuangwuAttr} ResLockZhuangwuAttr instance
                                                          */
            ResLockZhuangwuAttr.create = function create(properties) {
              return new ResLockZhuangwuAttr(properties);
            }; /**
               * Encodes the specified ResLockZhuangwuAttr message. Does not implicitly {@link m_proto.ResLockZhuangwuAttr.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {m_proto.IResLockZhuangwuAttr} message ResLockZhuangwuAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLockZhuangwuAttr.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.index);
              if (message.lock_state != null && Object.hasOwnProperty.call(message, "lock_state")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.lock_state);
              return writer;
            }; /**
               * Encodes the specified ResLockZhuangwuAttr message, length delimited. Does not implicitly {@link m_proto.ResLockZhuangwuAttr.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {m_proto.IResLockZhuangwuAttr} message ResLockZhuangwuAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLockZhuangwuAttr.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResLockZhuangwuAttr message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResLockZhuangwuAttr} ResLockZhuangwuAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLockZhuangwuAttr.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResLockZhuangwuAttr();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.lock_state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResLockZhuangwuAttr message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResLockZhuangwuAttr} ResLockZhuangwuAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLockZhuangwuAttr.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResLockZhuangwuAttr message.
               * @function verify
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResLockZhuangwuAttr.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) if (!$util.isInteger(message.lock_state)) return "lock_state: integer expected";
              return null;
            }; /**
               * Creates a ResLockZhuangwuAttr message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResLockZhuangwuAttr} ResLockZhuangwuAttr
               */
            ResLockZhuangwuAttr.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResLockZhuangwuAttr) return object;
              var message = new $root.m_proto.ResLockZhuangwuAttr();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.index != null) message.index = object.index | 0;
              if (object.lock_state != null) message.lock_state = object.lock_state | 0;
              return message;
            }; /**
               * Creates a plain object from a ResLockZhuangwuAttr message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {m_proto.ResLockZhuangwuAttr} message ResLockZhuangwuAttr
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResLockZhuangwuAttr.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.hero_id = 0;
                object.index = 0;
                object.lock_state = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) object.lock_state = message.lock_state;
              return object;
            }; /**
               * Converts this ResLockZhuangwuAttr to JSON.
               * @function toJSON
               * @memberof m_proto.ResLockZhuangwuAttr
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResLockZhuangwuAttr.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResLockZhuangwuAttr
               * @function getTypeUrl
               * @memberof m_proto.ResLockZhuangwuAttr
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResLockZhuangwuAttr.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResLockZhuangwuAttr";
            };
            return ResLockZhuangwuAttr;
          }();
          m_proto.ReqRefineZhuangwu = function () {
            /**
            * Properties of a ReqRefineZhuangwu.
            * @memberof m_proto
            * @interface IReqRefineZhuangwu
            * @property {number|null} [hero_id] ReqRefineZhuangwu hero_id
            */ /**
               * Constructs a new ReqRefineZhuangwu.
               * @memberof m_proto
               * @classdesc Represents a ReqRefineZhuangwu.
               * @implements IReqRefineZhuangwu
               * @constructor
               * @param {m_proto.IReqRefineZhuangwu=} [properties] Properties to set
               */
            function ReqRefineZhuangwu(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqRefineZhuangwu hero_id.
              * @member {number} hero_id
              * @memberof m_proto.ReqRefineZhuangwu
              * @instance
              */
            ReqRefineZhuangwu.prototype.hero_id = 0; /**
                                                     * Creates a new ReqRefineZhuangwu instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ReqRefineZhuangwu
                                                     * @static
                                                     * @param {m_proto.IReqRefineZhuangwu=} [properties] Properties to set
                                                     * @returns {m_proto.ReqRefineZhuangwu} ReqRefineZhuangwu instance
                                                     */
            ReqRefineZhuangwu.create = function create(properties) {
              return new ReqRefineZhuangwu(properties);
            }; /**
               * Encodes the specified ReqRefineZhuangwu message. Does not implicitly {@link m_proto.ReqRefineZhuangwu.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {m_proto.IReqRefineZhuangwu} message ReqRefineZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqRefineZhuangwu.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqRefineZhuangwu message, length delimited. Does not implicitly {@link m_proto.ReqRefineZhuangwu.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {m_proto.IReqRefineZhuangwu} message ReqRefineZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqRefineZhuangwu.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqRefineZhuangwu message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqRefineZhuangwu} ReqRefineZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqRefineZhuangwu.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqRefineZhuangwu();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqRefineZhuangwu message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqRefineZhuangwu} ReqRefineZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqRefineZhuangwu.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqRefineZhuangwu message.
               * @function verify
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqRefineZhuangwu.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqRefineZhuangwu message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqRefineZhuangwu} ReqRefineZhuangwu
               */
            ReqRefineZhuangwu.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqRefineZhuangwu) return object;
              var message = new $root.m_proto.ReqRefineZhuangwu();
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqRefineZhuangwu message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {m_proto.ReqRefineZhuangwu} message ReqRefineZhuangwu
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqRefineZhuangwu.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.hero_id = 0;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqRefineZhuangwu to JSON.
               * @function toJSON
               * @memberof m_proto.ReqRefineZhuangwu
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqRefineZhuangwu.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqRefineZhuangwu
               * @function getTypeUrl
               * @memberof m_proto.ReqRefineZhuangwu
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqRefineZhuangwu.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqRefineZhuangwu";
            };
            return ReqRefineZhuangwu;
          }();
          m_proto.ResRefineZhuangwu = function () {
            /**
            * Properties of a ResRefineZhuangwu.
            * @memberof m_proto
            * @interface IResRefineZhuangwu
            * @property {number|null} [code] ResRefineZhuangwu code
            * @property {number|null} [hero_id] ResRefineZhuangwu hero_id
            * @property {Array.<m_proto.IZhuanWuAttr>|null} [attrs] ResRefineZhuangwu attrs
            */ /**
               * Constructs a new ResRefineZhuangwu.
               * @memberof m_proto
               * @classdesc Represents a ResRefineZhuangwu.
               * @implements IResRefineZhuangwu
               * @constructor
               * @param {m_proto.IResRefineZhuangwu=} [properties] Properties to set
               */
            function ResRefineZhuangwu(properties) {
              this.attrs = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResRefineZhuangwu code.
              * @member {number} code
              * @memberof m_proto.ResRefineZhuangwu
              * @instance
              */
            ResRefineZhuangwu.prototype.code = 0; /**
                                                  * ResRefineZhuangwu hero_id.
                                                  * @member {number} hero_id
                                                  * @memberof m_proto.ResRefineZhuangwu
                                                  * @instance
                                                  */
            ResRefineZhuangwu.prototype.hero_id = 0; /**
                                                     * ResRefineZhuangwu attrs.
                                                     * @member {Array.<m_proto.IZhuanWuAttr>} attrs
                                                     * @memberof m_proto.ResRefineZhuangwu
                                                     * @instance
                                                     */
            ResRefineZhuangwu.prototype.attrs = $util.emptyArray; /**
                                                                  * Creates a new ResRefineZhuangwu instance using the specified properties.
                                                                  * @function create
                                                                  * @memberof m_proto.ResRefineZhuangwu
                                                                  * @static
                                                                  * @param {m_proto.IResRefineZhuangwu=} [properties] Properties to set
                                                                  * @returns {m_proto.ResRefineZhuangwu} ResRefineZhuangwu instance
                                                                  */
            ResRefineZhuangwu.create = function create(properties) {
              return new ResRefineZhuangwu(properties);
            }; /**
               * Encodes the specified ResRefineZhuangwu message. Does not implicitly {@link m_proto.ResRefineZhuangwu.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {m_proto.IResRefineZhuangwu} message ResRefineZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRefineZhuangwu.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.attrs != null && message.attrs.length) for (var i = 0; i < message.attrs.length; ++i) $root.m_proto.ZhuanWuAttr.encode(message.attrs[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResRefineZhuangwu message, length delimited. Does not implicitly {@link m_proto.ResRefineZhuangwu.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {m_proto.IResRefineZhuangwu} message ResRefineZhuangwu message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRefineZhuangwu.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResRefineZhuangwu message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResRefineZhuangwu} ResRefineZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRefineZhuangwu.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResRefineZhuangwu();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.attrs && message.attrs.length)) message.attrs = [];
                      message.attrs.push($root.m_proto.ZhuanWuAttr.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResRefineZhuangwu message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResRefineZhuangwu} ResRefineZhuangwu
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRefineZhuangwu.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResRefineZhuangwu message.
               * @function verify
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResRefineZhuangwu.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.attrs != null && message.hasOwnProperty("attrs")) {
                if (!Array.isArray(message.attrs)) return "attrs: array expected";
                for (var i = 0; i < message.attrs.length; ++i) {
                  var error = $root.m_proto.ZhuanWuAttr.verify(message.attrs[i]);
                  if (error) return "attrs." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResRefineZhuangwu message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResRefineZhuangwu} ResRefineZhuangwu
               */
            ResRefineZhuangwu.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResRefineZhuangwu) return object;
              var message = new $root.m_proto.ResRefineZhuangwu();
              if (object.code != null) message.code = object.code | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.attrs) {
                if (!Array.isArray(object.attrs)) throw TypeError(".m_proto.ResRefineZhuangwu.attrs: array expected");
                message.attrs = [];
                for (var i = 0; i < object.attrs.length; ++i) {
                  if (typeof object.attrs[i] !== "object") throw TypeError(".m_proto.ResRefineZhuangwu.attrs: object expected");
                  message.attrs[i] = $root.m_proto.ZhuanWuAttr.fromObject(object.attrs[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResRefineZhuangwu message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {m_proto.ResRefineZhuangwu} message ResRefineZhuangwu
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResRefineZhuangwu.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.attrs = [];
              if (options.defaults) {
                object.code = 0;
                object.hero_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.attrs && message.attrs.length) {
                object.attrs = [];
                for (var j = 0; j < message.attrs.length; ++j) object.attrs[j] = $root.m_proto.ZhuanWuAttr.toObject(message.attrs[j], options);
              }
              return object;
            }; /**
               * Converts this ResRefineZhuangwu to JSON.
               * @function toJSON
               * @memberof m_proto.ResRefineZhuangwu
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResRefineZhuangwu.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResRefineZhuangwu
               * @function getTypeUrl
               * @memberof m_proto.ResRefineZhuangwu
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResRefineZhuangwu.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResRefineZhuangwu";
            };
            return ResRefineZhuangwu;
          }();
          m_proto.ZhuanWuAttr = function () {
            /**
            * Properties of a ZhuanWuAttr.
            * @memberof m_proto
            * @interface IZhuanWuAttr
            * @property {number|null} [index] ZhuanWuAttr index
            * @property {number|null} [attr_id] ZhuanWuAttr attr_id
            * @property {number|null} [attr_val] ZhuanWuAttr attr_val
            * @property {number|null} [lock_state] ZhuanWuAttr lock_state
            */ /**
               * Constructs a new ZhuanWuAttr.
               * @memberof m_proto
               * @classdesc Represents a ZhuanWuAttr.
               * @implements IZhuanWuAttr
               * @constructor
               * @param {m_proto.IZhuanWuAttr=} [properties] Properties to set
               */
            function ZhuanWuAttr(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ZhuanWuAttr index.
              * @member {number} index
              * @memberof m_proto.ZhuanWuAttr
              * @instance
              */
            ZhuanWuAttr.prototype.index = 0; /**
                                             * ZhuanWuAttr attr_id.
                                             * @member {number} attr_id
                                             * @memberof m_proto.ZhuanWuAttr
                                             * @instance
                                             */
            ZhuanWuAttr.prototype.attr_id = 0; /**
                                               * ZhuanWuAttr attr_val.
                                               * @member {number} attr_val
                                               * @memberof m_proto.ZhuanWuAttr
                                               * @instance
                                               */
            ZhuanWuAttr.prototype.attr_val = 0; /**
                                                * ZhuanWuAttr lock_state.
                                                * @member {number} lock_state
                                                * @memberof m_proto.ZhuanWuAttr
                                                * @instance
                                                */
            ZhuanWuAttr.prototype.lock_state = 0; /**
                                                  * Creates a new ZhuanWuAttr instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ZhuanWuAttr
                                                  * @static
                                                  * @param {m_proto.IZhuanWuAttr=} [properties] Properties to set
                                                  * @returns {m_proto.ZhuanWuAttr} ZhuanWuAttr instance
                                                  */
            ZhuanWuAttr.create = function create(properties) {
              return new ZhuanWuAttr(properties);
            }; /**
               * Encodes the specified ZhuanWuAttr message. Does not implicitly {@link m_proto.ZhuanWuAttr.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {m_proto.IZhuanWuAttr} message ZhuanWuAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ZhuanWuAttr.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.index);
              if (message.attr_id != null && Object.hasOwnProperty.call(message, "attr_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.attr_id);
              if (message.attr_val != null && Object.hasOwnProperty.call(message, "attr_val")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.attr_val);
              if (message.lock_state != null && Object.hasOwnProperty.call(message, "lock_state")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.lock_state);
              return writer;
            }; /**
               * Encodes the specified ZhuanWuAttr message, length delimited. Does not implicitly {@link m_proto.ZhuanWuAttr.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {m_proto.IZhuanWuAttr} message ZhuanWuAttr message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ZhuanWuAttr.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ZhuanWuAttr message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ZhuanWuAttr} ZhuanWuAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ZhuanWuAttr.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ZhuanWuAttr();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.attr_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.attr_val = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.lock_state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ZhuanWuAttr message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ZhuanWuAttr} ZhuanWuAttr
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ZhuanWuAttr.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ZhuanWuAttr message.
               * @function verify
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ZhuanWuAttr.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.attr_id != null && message.hasOwnProperty("attr_id")) if (!$util.isInteger(message.attr_id)) return "attr_id: integer expected";
              if (message.attr_val != null && message.hasOwnProperty("attr_val")) if (!$util.isInteger(message.attr_val)) return "attr_val: integer expected";
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) if (!$util.isInteger(message.lock_state)) return "lock_state: integer expected";
              return null;
            }; /**
               * Creates a ZhuanWuAttr message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ZhuanWuAttr} ZhuanWuAttr
               */
            ZhuanWuAttr.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ZhuanWuAttr) return object;
              var message = new $root.m_proto.ZhuanWuAttr();
              if (object.index != null) message.index = object.index | 0;
              if (object.attr_id != null) message.attr_id = object.attr_id | 0;
              if (object.attr_val != null) message.attr_val = object.attr_val | 0;
              if (object.lock_state != null) message.lock_state = object.lock_state | 0;
              return message;
            }; /**
               * Creates a plain object from a ZhuanWuAttr message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {m_proto.ZhuanWuAttr} message ZhuanWuAttr
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ZhuanWuAttr.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.index = 0;
                object.attr_id = 0;
                object.attr_val = 0;
                object.lock_state = 0;
              }
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.attr_id != null && message.hasOwnProperty("attr_id")) object.attr_id = message.attr_id;
              if (message.attr_val != null && message.hasOwnProperty("attr_val")) object.attr_val = message.attr_val;
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) object.lock_state = message.lock_state;
              return object;
            }; /**
               * Converts this ZhuanWuAttr to JSON.
               * @function toJSON
               * @memberof m_proto.ZhuanWuAttr
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ZhuanWuAttr.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ZhuanWuAttr
               * @function getTypeUrl
               * @memberof m_proto.ZhuanWuAttr
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ZhuanWuAttr.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ZhuanWuAttr";
            };
            return ZhuanWuAttr;
          }();
          m_proto.ResAssignHeroChange = function () {
            /**
            * Properties of a ResAssignHeroChange.
            * @memberof m_proto
            * @interface IResAssignHeroChange
            * @property {number|null} [code] ResAssignHeroChange code
            * @property {m_proto.IAssignHero|null} [assign_hero] ResAssignHeroChange assign_hero
            */ /**
               * Constructs a new ResAssignHeroChange.
               * @memberof m_proto
               * @classdesc Represents a ResAssignHeroChange.
               * @implements IResAssignHeroChange
               * @constructor
               * @param {m_proto.IResAssignHeroChange=} [properties] Properties to set
               */
            function ResAssignHeroChange(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResAssignHeroChange code.
              * @member {number} code
              * @memberof m_proto.ResAssignHeroChange
              * @instance
              */
            ResAssignHeroChange.prototype.code = 0; /**
                                                    * ResAssignHeroChange assign_hero.
                                                    * @member {m_proto.IAssignHero|null|undefined} assign_hero
                                                    * @memberof m_proto.ResAssignHeroChange
                                                    * @instance
                                                    */
            ResAssignHeroChange.prototype.assign_hero = null; /**
                                                              * Creates a new ResAssignHeroChange instance using the specified properties.
                                                              * @function create
                                                              * @memberof m_proto.ResAssignHeroChange
                                                              * @static
                                                              * @param {m_proto.IResAssignHeroChange=} [properties] Properties to set
                                                              * @returns {m_proto.ResAssignHeroChange} ResAssignHeroChange instance
                                                              */
            ResAssignHeroChange.create = function create(properties) {
              return new ResAssignHeroChange(properties);
            }; /**
               * Encodes the specified ResAssignHeroChange message. Does not implicitly {@link m_proto.ResAssignHeroChange.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {m_proto.IResAssignHeroChange} message ResAssignHeroChange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAssignHeroChange.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.assign_hero != null && Object.hasOwnProperty.call(message, "assign_hero")) $root.m_proto.AssignHero.encode(message.assign_hero, writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResAssignHeroChange message, length delimited. Does not implicitly {@link m_proto.ResAssignHeroChange.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {m_proto.IResAssignHeroChange} message ResAssignHeroChange message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResAssignHeroChange.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResAssignHeroChange message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResAssignHeroChange} ResAssignHeroChange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAssignHeroChange.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResAssignHeroChange();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.assign_hero = $root.m_proto.AssignHero.decode(reader, reader.uint32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResAssignHeroChange message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResAssignHeroChange} ResAssignHeroChange
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResAssignHeroChange.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResAssignHeroChange message.
               * @function verify
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResAssignHeroChange.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.assign_hero != null && message.hasOwnProperty("assign_hero")) {
                var error = $root.m_proto.AssignHero.verify(message.assign_hero);
                if (error) return "assign_hero." + error;
              }
              return null;
            }; /**
               * Creates a ResAssignHeroChange message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResAssignHeroChange} ResAssignHeroChange
               */
            ResAssignHeroChange.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResAssignHeroChange) return object;
              var message = new $root.m_proto.ResAssignHeroChange();
              if (object.code != null) message.code = object.code | 0;
              if (object.assign_hero != null) {
                if (typeof object.assign_hero !== "object") throw TypeError(".m_proto.ResAssignHeroChange.assign_hero: object expected");
                message.assign_hero = $root.m_proto.AssignHero.fromObject(object.assign_hero);
              }
              return message;
            }; /**
               * Creates a plain object from a ResAssignHeroChange message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {m_proto.ResAssignHeroChange} message ResAssignHeroChange
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResAssignHeroChange.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.assign_hero = null;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.assign_hero != null && message.hasOwnProperty("assign_hero")) object.assign_hero = $root.m_proto.AssignHero.toObject(message.assign_hero, options);
              return object;
            }; /**
               * Converts this ResAssignHeroChange to JSON.
               * @function toJSON
               * @memberof m_proto.ResAssignHeroChange
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResAssignHeroChange.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResAssignHeroChange
               * @function getTypeUrl
               * @memberof m_proto.ResAssignHeroChange
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResAssignHeroChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResAssignHeroChange";
            };
            return ResAssignHeroChange;
          }();
          m_proto.ReqSoldierList = function () {
            /**
            * Properties of a ReqSoldierList.
            * @memberof m_proto
            * @interface IReqSoldierList
            */ /**
               * Constructs a new ReqSoldierList.
               * @memberof m_proto
               * @classdesc Represents a ReqSoldierList.
               * @implements IReqSoldierList
               * @constructor
               * @param {m_proto.IReqSoldierList=} [properties] Properties to set
               */
            function ReqSoldierList(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqSoldierList instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqSoldierList
              * @static
              * @param {m_proto.IReqSoldierList=} [properties] Properties to set
              * @returns {m_proto.ReqSoldierList} ReqSoldierList instance
              */
            ReqSoldierList.create = function create(properties) {
              return new ReqSoldierList(properties);
            }; /**
               * Encodes the specified ReqSoldierList message. Does not implicitly {@link m_proto.ReqSoldierList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {m_proto.IReqSoldierList} message ReqSoldierList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqSoldierList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqSoldierList message, length delimited. Does not implicitly {@link m_proto.ReqSoldierList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {m_proto.IReqSoldierList} message ReqSoldierList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqSoldierList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqSoldierList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqSoldierList} ReqSoldierList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqSoldierList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqSoldierList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqSoldierList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqSoldierList} ReqSoldierList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqSoldierList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqSoldierList message.
               * @function verify
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqSoldierList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqSoldierList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqSoldierList} ReqSoldierList
               */
            ReqSoldierList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqSoldierList) return object;
              return new $root.m_proto.ReqSoldierList();
            }; /**
               * Creates a plain object from a ReqSoldierList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {m_proto.ReqSoldierList} message ReqSoldierList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqSoldierList.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqSoldierList to JSON.
               * @function toJSON
               * @memberof m_proto.ReqSoldierList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqSoldierList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqSoldierList
               * @function getTypeUrl
               * @memberof m_proto.ReqSoldierList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqSoldierList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqSoldierList";
            };
            return ReqSoldierList;
          }();
          m_proto.ResSoldierList = function () {
            /**
            * Properties of a ResSoldierList.
            * @memberof m_proto
            * @interface IResSoldierList
            * @property {number|null} [code] ResSoldierList code
            * @property {Array.<m_proto.ISoldier>|null} [soldiers] ResSoldierList soldiers
            */ /**
               * Constructs a new ResSoldierList.
               * @memberof m_proto
               * @classdesc Represents a ResSoldierList.
               * @implements IResSoldierList
               * @constructor
               * @param {m_proto.IResSoldierList=} [properties] Properties to set
               */
            function ResSoldierList(properties) {
              this.soldiers = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResSoldierList code.
              * @member {number} code
              * @memberof m_proto.ResSoldierList
              * @instance
              */
            ResSoldierList.prototype.code = 0; /**
                                               * ResSoldierList soldiers.
                                               * @member {Array.<m_proto.ISoldier>} soldiers
                                               * @memberof m_proto.ResSoldierList
                                               * @instance
                                               */
            ResSoldierList.prototype.soldiers = $util.emptyArray; /**
                                                                  * Creates a new ResSoldierList instance using the specified properties.
                                                                  * @function create
                                                                  * @memberof m_proto.ResSoldierList
                                                                  * @static
                                                                  * @param {m_proto.IResSoldierList=} [properties] Properties to set
                                                                  * @returns {m_proto.ResSoldierList} ResSoldierList instance
                                                                  */
            ResSoldierList.create = function create(properties) {
              return new ResSoldierList(properties);
            }; /**
               * Encodes the specified ResSoldierList message. Does not implicitly {@link m_proto.ResSoldierList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {m_proto.IResSoldierList} message ResSoldierList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSoldierList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.soldiers != null && message.soldiers.length) for (var i = 0; i < message.soldiers.length; ++i) $root.m_proto.Soldier.encode(message.soldiers[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResSoldierList message, length delimited. Does not implicitly {@link m_proto.ResSoldierList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {m_proto.IResSoldierList} message ResSoldierList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResSoldierList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResSoldierList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResSoldierList} ResSoldierList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSoldierList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResSoldierList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.soldiers && message.soldiers.length)) message.soldiers = [];
                      message.soldiers.push($root.m_proto.Soldier.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResSoldierList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResSoldierList} ResSoldierList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResSoldierList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResSoldierList message.
               * @function verify
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResSoldierList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.soldiers != null && message.hasOwnProperty("soldiers")) {
                if (!Array.isArray(message.soldiers)) return "soldiers: array expected";
                for (var i = 0; i < message.soldiers.length; ++i) {
                  var error = $root.m_proto.Soldier.verify(message.soldiers[i]);
                  if (error) return "soldiers." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResSoldierList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResSoldierList} ResSoldierList
               */
            ResSoldierList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResSoldierList) return object;
              var message = new $root.m_proto.ResSoldierList();
              if (object.code != null) message.code = object.code | 0;
              if (object.soldiers) {
                if (!Array.isArray(object.soldiers)) throw TypeError(".m_proto.ResSoldierList.soldiers: array expected");
                message.soldiers = [];
                for (var i = 0; i < object.soldiers.length; ++i) {
                  if (typeof object.soldiers[i] !== "object") throw TypeError(".m_proto.ResSoldierList.soldiers: object expected");
                  message.soldiers[i] = $root.m_proto.Soldier.fromObject(object.soldiers[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResSoldierList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {m_proto.ResSoldierList} message ResSoldierList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResSoldierList.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.soldiers = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.soldiers && message.soldiers.length) {
                object.soldiers = [];
                for (var j = 0; j < message.soldiers.length; ++j) object.soldiers[j] = $root.m_proto.Soldier.toObject(message.soldiers[j], options);
              }
              return object;
            }; /**
               * Converts this ResSoldierList to JSON.
               * @function toJSON
               * @memberof m_proto.ResSoldierList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResSoldierList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResSoldierList
               * @function getTypeUrl
               * @memberof m_proto.ResSoldierList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResSoldierList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResSoldierList";
            };
            return ResSoldierList;
          }();
          m_proto.Soldier = function () {
            /**
            * Properties of a Soldier.
            * @memberof m_proto
            * @interface ISoldier
            * @property {number|null} [soldier_id] Soldier soldier_id
            * @property {number|null} [level] Soldier level
            * @property {number|null} [stage] Soldier stage
            */ /**
               * Constructs a new Soldier.
               * @memberof m_proto
               * @classdesc Represents a Soldier.
               * @implements ISoldier
               * @constructor
               * @param {m_proto.ISoldier=} [properties] Properties to set
               */
            function Soldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Soldier soldier_id.
              * @member {number} soldier_id
              * @memberof m_proto.Soldier
              * @instance
              */
            Soldier.prototype.soldier_id = 0; /**
                                              * Soldier level.
                                              * @member {number} level
                                              * @memberof m_proto.Soldier
                                              * @instance
                                              */
            Soldier.prototype.level = 0; /**
                                         * Soldier stage.
                                         * @member {number} stage
                                         * @memberof m_proto.Soldier
                                         * @instance
                                         */
            Soldier.prototype.stage = 0; /**
                                         * Creates a new Soldier instance using the specified properties.
                                         * @function create
                                         * @memberof m_proto.Soldier
                                         * @static
                                         * @param {m_proto.ISoldier=} [properties] Properties to set
                                         * @returns {m_proto.Soldier} Soldier instance
                                         */
            Soldier.create = function create(properties) {
              return new Soldier(properties);
            }; /**
               * Encodes the specified Soldier message. Does not implicitly {@link m_proto.Soldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Soldier
               * @static
               * @param {m_proto.ISoldier} message Soldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Soldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldier_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.level);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.stage);
              return writer;
            }; /**
               * Encodes the specified Soldier message, length delimited. Does not implicitly {@link m_proto.Soldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Soldier
               * @static
               * @param {m_proto.ISoldier} message Soldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Soldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a Soldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Soldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Soldier} Soldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Soldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Soldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a Soldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Soldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Soldier} Soldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Soldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a Soldier message.
               * @function verify
               * @memberof m_proto.Soldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Soldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              return null;
            }; /**
               * Creates a Soldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Soldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Soldier} Soldier
               */
            Soldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Soldier) return object;
              var message = new $root.m_proto.Soldier();
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              if (object.level != null) message.level = object.level | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              return message;
            }; /**
               * Creates a plain object from a Soldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Soldier
               * @static
               * @param {m_proto.Soldier} message Soldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Soldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.soldier_id = 0;
                object.level = 0;
                object.stage = 0;
              }
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              return object;
            }; /**
               * Converts this Soldier to JSON.
               * @function toJSON
               * @memberof m_proto.Soldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Soldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Soldier
               * @function getTypeUrl
               * @memberof m_proto.Soldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Soldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Soldier";
            };
            return Soldier;
          }();
          m_proto.ResNewSoldier = function () {
            /**
            * Properties of a ResNewSoldier.
            * @memberof m_proto
            * @interface IResNewSoldier
            * @property {number|null} [code] ResNewSoldier code
            * @property {m_proto.ISoldier|null} [soldier] ResNewSoldier soldier
            */ /**
               * Constructs a new ResNewSoldier.
               * @memberof m_proto
               * @classdesc Represents a ResNewSoldier.
               * @implements IResNewSoldier
               * @constructor
               * @param {m_proto.IResNewSoldier=} [properties] Properties to set
               */
            function ResNewSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResNewSoldier code.
              * @member {number} code
              * @memberof m_proto.ResNewSoldier
              * @instance
              */
            ResNewSoldier.prototype.code = 0; /**
                                              * ResNewSoldier soldier.
                                              * @member {m_proto.ISoldier|null|undefined} soldier
                                              * @memberof m_proto.ResNewSoldier
                                              * @instance
                                              */
            ResNewSoldier.prototype.soldier = null; /**
                                                    * Creates a new ResNewSoldier instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ResNewSoldier
                                                    * @static
                                                    * @param {m_proto.IResNewSoldier=} [properties] Properties to set
                                                    * @returns {m_proto.ResNewSoldier} ResNewSoldier instance
                                                    */
            ResNewSoldier.create = function create(properties) {
              return new ResNewSoldier(properties);
            }; /**
               * Encodes the specified ResNewSoldier message. Does not implicitly {@link m_proto.ResNewSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {m_proto.IResNewSoldier} message ResNewSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResNewSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.soldier != null && Object.hasOwnProperty.call(message, "soldier")) $root.m_proto.Soldier.encode(message.soldier, writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResNewSoldier message, length delimited. Does not implicitly {@link m_proto.ResNewSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {m_proto.IResNewSoldier} message ResNewSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResNewSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResNewSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResNewSoldier} ResNewSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResNewSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResNewSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.soldier = $root.m_proto.Soldier.decode(reader, reader.uint32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResNewSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResNewSoldier} ResNewSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResNewSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResNewSoldier message.
               * @function verify
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResNewSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.soldier != null && message.hasOwnProperty("soldier")) {
                var error = $root.m_proto.Soldier.verify(message.soldier);
                if (error) return "soldier." + error;
              }
              return null;
            }; /**
               * Creates a ResNewSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResNewSoldier} ResNewSoldier
               */
            ResNewSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResNewSoldier) return object;
              var message = new $root.m_proto.ResNewSoldier();
              if (object.code != null) message.code = object.code | 0;
              if (object.soldier != null) {
                if (typeof object.soldier !== "object") throw TypeError(".m_proto.ResNewSoldier.soldier: object expected");
                message.soldier = $root.m_proto.Soldier.fromObject(object.soldier);
              }
              return message;
            }; /**
               * Creates a plain object from a ResNewSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {m_proto.ResNewSoldier} message ResNewSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResNewSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.soldier = null;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.soldier != null && message.hasOwnProperty("soldier")) object.soldier = $root.m_proto.Soldier.toObject(message.soldier, options);
              return object;
            }; /**
               * Converts this ResNewSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ResNewSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResNewSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResNewSoldier
               * @function getTypeUrl
               * @memberof m_proto.ResNewSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResNewSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResNewSoldier";
            };
            return ResNewSoldier;
          }();
          m_proto.ReqActivateSoldier = function () {
            /**
            * Properties of a ReqActivateSoldier.
            * @memberof m_proto
            * @interface IReqActivateSoldier
            * @property {number|null} [soldier_id] ReqActivateSoldier soldier_id
            */ /**
               * Constructs a new ReqActivateSoldier.
               * @memberof m_proto
               * @classdesc Represents a ReqActivateSoldier.
               * @implements IReqActivateSoldier
               * @constructor
               * @param {m_proto.IReqActivateSoldier=} [properties] Properties to set
               */
            function ReqActivateSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqActivateSoldier soldier_id.
              * @member {number} soldier_id
              * @memberof m_proto.ReqActivateSoldier
              * @instance
              */
            ReqActivateSoldier.prototype.soldier_id = 0; /**
                                                         * Creates a new ReqActivateSoldier instance using the specified properties.
                                                         * @function create
                                                         * @memberof m_proto.ReqActivateSoldier
                                                         * @static
                                                         * @param {m_proto.IReqActivateSoldier=} [properties] Properties to set
                                                         * @returns {m_proto.ReqActivateSoldier} ReqActivateSoldier instance
                                                         */
            ReqActivateSoldier.create = function create(properties) {
              return new ReqActivateSoldier(properties);
            }; /**
               * Encodes the specified ReqActivateSoldier message. Does not implicitly {@link m_proto.ReqActivateSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {m_proto.IReqActivateSoldier} message ReqActivateSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqActivateSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldier_id);
              return writer;
            }; /**
               * Encodes the specified ReqActivateSoldier message, length delimited. Does not implicitly {@link m_proto.ReqActivateSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {m_proto.IReqActivateSoldier} message ReqActivateSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqActivateSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqActivateSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqActivateSoldier} ReqActivateSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqActivateSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqActivateSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqActivateSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqActivateSoldier} ReqActivateSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqActivateSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqActivateSoldier message.
               * @function verify
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqActivateSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              return null;
            }; /**
               * Creates a ReqActivateSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqActivateSoldier} ReqActivateSoldier
               */
            ReqActivateSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqActivateSoldier) return object;
              var message = new $root.m_proto.ReqActivateSoldier();
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqActivateSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {m_proto.ReqActivateSoldier} message ReqActivateSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqActivateSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.soldier_id = 0;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              return object;
            }; /**
               * Converts this ReqActivateSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ReqActivateSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqActivateSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqActivateSoldier
               * @function getTypeUrl
               * @memberof m_proto.ReqActivateSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqActivateSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqActivateSoldier";
            };
            return ReqActivateSoldier;
          }();
          m_proto.ResActivateSoldier = function () {
            /**
            * Properties of a ResActivateSoldier.
            * @memberof m_proto
            * @interface IResActivateSoldier
            * @property {number|null} [code] ResActivateSoldier code
            */ /**
               * Constructs a new ResActivateSoldier.
               * @memberof m_proto
               * @classdesc Represents a ResActivateSoldier.
               * @implements IResActivateSoldier
               * @constructor
               * @param {m_proto.IResActivateSoldier=} [properties] Properties to set
               */
            function ResActivateSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResActivateSoldier code.
              * @member {number} code
              * @memberof m_proto.ResActivateSoldier
              * @instance
              */
            ResActivateSoldier.prototype.code = 0; /**
                                                   * Creates a new ResActivateSoldier instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResActivateSoldier
                                                   * @static
                                                   * @param {m_proto.IResActivateSoldier=} [properties] Properties to set
                                                   * @returns {m_proto.ResActivateSoldier} ResActivateSoldier instance
                                                   */
            ResActivateSoldier.create = function create(properties) {
              return new ResActivateSoldier(properties);
            }; /**
               * Encodes the specified ResActivateSoldier message. Does not implicitly {@link m_proto.ResActivateSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {m_proto.IResActivateSoldier} message ResActivateSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResActivateSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              return writer;
            }; /**
               * Encodes the specified ResActivateSoldier message, length delimited. Does not implicitly {@link m_proto.ResActivateSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {m_proto.IResActivateSoldier} message ResActivateSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResActivateSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResActivateSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResActivateSoldier} ResActivateSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResActivateSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResActivateSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResActivateSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResActivateSoldier} ResActivateSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResActivateSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResActivateSoldier message.
               * @function verify
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResActivateSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              return null;
            }; /**
               * Creates a ResActivateSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResActivateSoldier} ResActivateSoldier
               */
            ResActivateSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResActivateSoldier) return object;
              var message = new $root.m_proto.ResActivateSoldier();
              if (object.code != null) message.code = object.code | 0;
              return message;
            }; /**
               * Creates a plain object from a ResActivateSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {m_proto.ResActivateSoldier} message ResActivateSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResActivateSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              return object;
            }; /**
               * Converts this ResActivateSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ResActivateSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResActivateSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResActivateSoldier
               * @function getTypeUrl
               * @memberof m_proto.ResActivateSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResActivateSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResActivateSoldier";
            };
            return ResActivateSoldier;
          }();
          m_proto.ReqUpgradeSoldier = function () {
            /**
            * Properties of a ReqUpgradeSoldier.
            * @memberof m_proto
            * @interface IReqUpgradeSoldier
            * @property {number|null} [soldier_id] ReqUpgradeSoldier soldier_id
            */ /**
               * Constructs a new ReqUpgradeSoldier.
               * @memberof m_proto
               * @classdesc Represents a ReqUpgradeSoldier.
               * @implements IReqUpgradeSoldier
               * @constructor
               * @param {m_proto.IReqUpgradeSoldier=} [properties] Properties to set
               */
            function ReqUpgradeSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUpgradeSoldier soldier_id.
              * @member {number} soldier_id
              * @memberof m_proto.ReqUpgradeSoldier
              * @instance
              */
            ReqUpgradeSoldier.prototype.soldier_id = 0; /**
                                                        * Creates a new ReqUpgradeSoldier instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ReqUpgradeSoldier
                                                        * @static
                                                        * @param {m_proto.IReqUpgradeSoldier=} [properties] Properties to set
                                                        * @returns {m_proto.ReqUpgradeSoldier} ReqUpgradeSoldier instance
                                                        */
            ReqUpgradeSoldier.create = function create(properties) {
              return new ReqUpgradeSoldier(properties);
            }; /**
               * Encodes the specified ReqUpgradeSoldier message. Does not implicitly {@link m_proto.ReqUpgradeSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {m_proto.IReqUpgradeSoldier} message ReqUpgradeSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpgradeSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldier_id);
              return writer;
            }; /**
               * Encodes the specified ReqUpgradeSoldier message, length delimited. Does not implicitly {@link m_proto.ReqUpgradeSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {m_proto.IReqUpgradeSoldier} message ReqUpgradeSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpgradeSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUpgradeSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUpgradeSoldier} ReqUpgradeSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpgradeSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUpgradeSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUpgradeSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUpgradeSoldier} ReqUpgradeSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpgradeSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUpgradeSoldier message.
               * @function verify
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUpgradeSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              return null;
            }; /**
               * Creates a ReqUpgradeSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUpgradeSoldier} ReqUpgradeSoldier
               */
            ReqUpgradeSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUpgradeSoldier) return object;
              var message = new $root.m_proto.ReqUpgradeSoldier();
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUpgradeSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {m_proto.ReqUpgradeSoldier} message ReqUpgradeSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUpgradeSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.soldier_id = 0;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              return object;
            }; /**
               * Converts this ReqUpgradeSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUpgradeSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUpgradeSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUpgradeSoldier
               * @function getTypeUrl
               * @memberof m_proto.ReqUpgradeSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUpgradeSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUpgradeSoldier";
            };
            return ReqUpgradeSoldier;
          }();
          m_proto.ResUpgradeSoldier = function () {
            /**
            * Properties of a ResUpgradeSoldier.
            * @memberof m_proto
            * @interface IResUpgradeSoldier
            * @property {number|null} [code] ResUpgradeSoldier code
            * @property {number|null} [soldier_id] ResUpgradeSoldier soldier_id
            * @property {number|null} [level] ResUpgradeSoldier level
            */ /**
               * Constructs a new ResUpgradeSoldier.
               * @memberof m_proto
               * @classdesc Represents a ResUpgradeSoldier.
               * @implements IResUpgradeSoldier
               * @constructor
               * @param {m_proto.IResUpgradeSoldier=} [properties] Properties to set
               */
            function ResUpgradeSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUpgradeSoldier code.
              * @member {number} code
              * @memberof m_proto.ResUpgradeSoldier
              * @instance
              */
            ResUpgradeSoldier.prototype.code = 0; /**
                                                  * ResUpgradeSoldier soldier_id.
                                                  * @member {number} soldier_id
                                                  * @memberof m_proto.ResUpgradeSoldier
                                                  * @instance
                                                  */
            ResUpgradeSoldier.prototype.soldier_id = 0; /**
                                                        * ResUpgradeSoldier level.
                                                        * @member {number} level
                                                        * @memberof m_proto.ResUpgradeSoldier
                                                        * @instance
                                                        */
            ResUpgradeSoldier.prototype.level = 0; /**
                                                   * Creates a new ResUpgradeSoldier instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResUpgradeSoldier
                                                   * @static
                                                   * @param {m_proto.IResUpgradeSoldier=} [properties] Properties to set
                                                   * @returns {m_proto.ResUpgradeSoldier} ResUpgradeSoldier instance
                                                   */
            ResUpgradeSoldier.create = function create(properties) {
              return new ResUpgradeSoldier(properties);
            }; /**
               * Encodes the specified ResUpgradeSoldier message. Does not implicitly {@link m_proto.ResUpgradeSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {m_proto.IResUpgradeSoldier} message ResUpgradeSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpgradeSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.soldier_id);
              if (message.level != null && Object.hasOwnProperty.call(message, "level")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.level);
              return writer;
            }; /**
               * Encodes the specified ResUpgradeSoldier message, length delimited. Does not implicitly {@link m_proto.ResUpgradeSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {m_proto.IResUpgradeSoldier} message ResUpgradeSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpgradeSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUpgradeSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUpgradeSoldier} ResUpgradeSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpgradeSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUpgradeSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUpgradeSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUpgradeSoldier} ResUpgradeSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpgradeSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUpgradeSoldier message.
               * @function verify
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUpgradeSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              if (message.level != null && message.hasOwnProperty("level")) if (!$util.isInteger(message.level)) return "level: integer expected";
              return null;
            }; /**
               * Creates a ResUpgradeSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUpgradeSoldier} ResUpgradeSoldier
               */
            ResUpgradeSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUpgradeSoldier) return object;
              var message = new $root.m_proto.ResUpgradeSoldier();
              if (object.code != null) message.code = object.code | 0;
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              if (object.level != null) message.level = object.level | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUpgradeSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {m_proto.ResUpgradeSoldier} message ResUpgradeSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUpgradeSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.soldier_id = 0;
                object.level = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              if (message.level != null && message.hasOwnProperty("level")) object.level = message.level;
              return object;
            }; /**
               * Converts this ResUpgradeSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ResUpgradeSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUpgradeSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUpgradeSoldier
               * @function getTypeUrl
               * @memberof m_proto.ResUpgradeSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUpgradeSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUpgradeSoldier";
            };
            return ResUpgradeSoldier;
          }();
          m_proto.ReqUpStageSoldier = function () {
            /**
            * Properties of a ReqUpStageSoldier.
            * @memberof m_proto
            * @interface IReqUpStageSoldier
            * @property {number|null} [soldier_id] ReqUpStageSoldier soldier_id
            */ /**
               * Constructs a new ReqUpStageSoldier.
               * @memberof m_proto
               * @classdesc Represents a ReqUpStageSoldier.
               * @implements IReqUpStageSoldier
               * @constructor
               * @param {m_proto.IReqUpStageSoldier=} [properties] Properties to set
               */
            function ReqUpStageSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUpStageSoldier soldier_id.
              * @member {number} soldier_id
              * @memberof m_proto.ReqUpStageSoldier
              * @instance
              */
            ReqUpStageSoldier.prototype.soldier_id = 0; /**
                                                        * Creates a new ReqUpStageSoldier instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ReqUpStageSoldier
                                                        * @static
                                                        * @param {m_proto.IReqUpStageSoldier=} [properties] Properties to set
                                                        * @returns {m_proto.ReqUpStageSoldier} ReqUpStageSoldier instance
                                                        */
            ReqUpStageSoldier.create = function create(properties) {
              return new ReqUpStageSoldier(properties);
            }; /**
               * Encodes the specified ReqUpStageSoldier message. Does not implicitly {@link m_proto.ReqUpStageSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {m_proto.IReqUpStageSoldier} message ReqUpStageSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpStageSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.soldier_id);
              return writer;
            }; /**
               * Encodes the specified ReqUpStageSoldier message, length delimited. Does not implicitly {@link m_proto.ReqUpStageSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {m_proto.IReqUpStageSoldier} message ReqUpStageSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUpStageSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUpStageSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUpStageSoldier} ReqUpStageSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpStageSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUpStageSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUpStageSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUpStageSoldier} ReqUpStageSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUpStageSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUpStageSoldier message.
               * @function verify
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUpStageSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              return null;
            }; /**
               * Creates a ReqUpStageSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUpStageSoldier} ReqUpStageSoldier
               */
            ReqUpStageSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUpStageSoldier) return object;
              var message = new $root.m_proto.ReqUpStageSoldier();
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUpStageSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {m_proto.ReqUpStageSoldier} message ReqUpStageSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUpStageSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.soldier_id = 0;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              return object;
            }; /**
               * Converts this ReqUpStageSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUpStageSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUpStageSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUpStageSoldier
               * @function getTypeUrl
               * @memberof m_proto.ReqUpStageSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUpStageSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUpStageSoldier";
            };
            return ReqUpStageSoldier;
          }();
          m_proto.ResUpStageSoldier = function () {
            /**
            * Properties of a ResUpStageSoldier.
            * @memberof m_proto
            * @interface IResUpStageSoldier
            * @property {number|null} [code] ResUpStageSoldier code
            * @property {number|null} [soldier_id] ResUpStageSoldier soldier_id
            * @property {number|null} [stage] ResUpStageSoldier stage
            */ /**
               * Constructs a new ResUpStageSoldier.
               * @memberof m_proto
               * @classdesc Represents a ResUpStageSoldier.
               * @implements IResUpStageSoldier
               * @constructor
               * @param {m_proto.IResUpStageSoldier=} [properties] Properties to set
               */
            function ResUpStageSoldier(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUpStageSoldier code.
              * @member {number} code
              * @memberof m_proto.ResUpStageSoldier
              * @instance
              */
            ResUpStageSoldier.prototype.code = 0; /**
                                                  * ResUpStageSoldier soldier_id.
                                                  * @member {number} soldier_id
                                                  * @memberof m_proto.ResUpStageSoldier
                                                  * @instance
                                                  */
            ResUpStageSoldier.prototype.soldier_id = 0; /**
                                                        * ResUpStageSoldier stage.
                                                        * @member {number} stage
                                                        * @memberof m_proto.ResUpStageSoldier
                                                        * @instance
                                                        */
            ResUpStageSoldier.prototype.stage = 0; /**
                                                   * Creates a new ResUpStageSoldier instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResUpStageSoldier
                                                   * @static
                                                   * @param {m_proto.IResUpStageSoldier=} [properties] Properties to set
                                                   * @returns {m_proto.ResUpStageSoldier} ResUpStageSoldier instance
                                                   */
            ResUpStageSoldier.create = function create(properties) {
              return new ResUpStageSoldier(properties);
            }; /**
               * Encodes the specified ResUpStageSoldier message. Does not implicitly {@link m_proto.ResUpStageSoldier.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {m_proto.IResUpStageSoldier} message ResUpStageSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpStageSoldier.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.soldier_id != null && Object.hasOwnProperty.call(message, "soldier_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.soldier_id);
              if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.stage);
              return writer;
            }; /**
               * Encodes the specified ResUpStageSoldier message, length delimited. Does not implicitly {@link m_proto.ResUpStageSoldier.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {m_proto.IResUpStageSoldier} message ResUpStageSoldier message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUpStageSoldier.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUpStageSoldier message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUpStageSoldier} ResUpStageSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpStageSoldier.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUpStageSoldier();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.soldier_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.stage = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUpStageSoldier message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUpStageSoldier} ResUpStageSoldier
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUpStageSoldier.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUpStageSoldier message.
               * @function verify
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUpStageSoldier.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) if (!$util.isInteger(message.soldier_id)) return "soldier_id: integer expected";
              if (message.stage != null && message.hasOwnProperty("stage")) if (!$util.isInteger(message.stage)) return "stage: integer expected";
              return null;
            }; /**
               * Creates a ResUpStageSoldier message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUpStageSoldier} ResUpStageSoldier
               */
            ResUpStageSoldier.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUpStageSoldier) return object;
              var message = new $root.m_proto.ResUpStageSoldier();
              if (object.code != null) message.code = object.code | 0;
              if (object.soldier_id != null) message.soldier_id = object.soldier_id | 0;
              if (object.stage != null) message.stage = object.stage | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUpStageSoldier message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {m_proto.ResUpStageSoldier} message ResUpStageSoldier
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUpStageSoldier.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.soldier_id = 0;
                object.stage = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.soldier_id != null && message.hasOwnProperty("soldier_id")) object.soldier_id = message.soldier_id;
              if (message.stage != null && message.hasOwnProperty("stage")) object.stage = message.stage;
              return object;
            }; /**
               * Converts this ResUpStageSoldier to JSON.
               * @function toJSON
               * @memberof m_proto.ResUpStageSoldier
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUpStageSoldier.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUpStageSoldier
               * @function getTypeUrl
               * @memberof m_proto.ResUpStageSoldier
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUpStageSoldier.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUpStageSoldier";
            };
            return ResUpStageSoldier;
          }();
          m_proto.ReqFormationInfo = function () {
            /**
            * Properties of a ReqFormationInfo.
            * @memberof m_proto
            * @interface IReqFormationInfo
            */ /**
               * Constructs a new ReqFormationInfo.
               * @memberof m_proto
               * @classdesc Represents a ReqFormationInfo.
               * @implements IReqFormationInfo
               * @constructor
               * @param {m_proto.IReqFormationInfo=} [properties] Properties to set
               */
            function ReqFormationInfo(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqFormationInfo instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqFormationInfo
              * @static
              * @param {m_proto.IReqFormationInfo=} [properties] Properties to set
              * @returns {m_proto.ReqFormationInfo} ReqFormationInfo instance
              */
            ReqFormationInfo.create = function create(properties) {
              return new ReqFormationInfo(properties);
            }; /**
               * Encodes the specified ReqFormationInfo message. Does not implicitly {@link m_proto.ReqFormationInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {m_proto.IReqFormationInfo} message ReqFormationInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFormationInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqFormationInfo message, length delimited. Does not implicitly {@link m_proto.ReqFormationInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {m_proto.IReqFormationInfo} message ReqFormationInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFormationInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqFormationInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqFormationInfo} ReqFormationInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFormationInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqFormationInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqFormationInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqFormationInfo} ReqFormationInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFormationInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqFormationInfo message.
               * @function verify
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqFormationInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqFormationInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqFormationInfo} ReqFormationInfo
               */
            ReqFormationInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqFormationInfo) return object;
              return new $root.m_proto.ReqFormationInfo();
            }; /**
               * Creates a plain object from a ReqFormationInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {m_proto.ReqFormationInfo} message ReqFormationInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqFormationInfo.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqFormationInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ReqFormationInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqFormationInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqFormationInfo
               * @function getTypeUrl
               * @memberof m_proto.ReqFormationInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqFormationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqFormationInfo";
            };
            return ReqFormationInfo;
          }();
          m_proto.ResFormationInfo = function () {
            /**
            * Properties of a ResFormationInfo.
            * @memberof m_proto
            * @interface IResFormationInfo
            * @property {number|null} [code] ResFormationInfo code
            * @property {Array.<m_proto.IFormation>|null} [formations] ResFormationInfo formations
            */ /**
               * Constructs a new ResFormationInfo.
               * @memberof m_proto
               * @classdesc Represents a ResFormationInfo.
               * @implements IResFormationInfo
               * @constructor
               * @param {m_proto.IResFormationInfo=} [properties] Properties to set
               */
            function ResFormationInfo(properties) {
              this.formations = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResFormationInfo code.
              * @member {number} code
              * @memberof m_proto.ResFormationInfo
              * @instance
              */
            ResFormationInfo.prototype.code = 0; /**
                                                 * ResFormationInfo formations.
                                                 * @member {Array.<m_proto.IFormation>} formations
                                                 * @memberof m_proto.ResFormationInfo
                                                 * @instance
                                                 */
            ResFormationInfo.prototype.formations = $util.emptyArray; /**
                                                                      * Creates a new ResFormationInfo instance using the specified properties.
                                                                      * @function create
                                                                      * @memberof m_proto.ResFormationInfo
                                                                      * @static
                                                                      * @param {m_proto.IResFormationInfo=} [properties] Properties to set
                                                                      * @returns {m_proto.ResFormationInfo} ResFormationInfo instance
                                                                      */
            ResFormationInfo.create = function create(properties) {
              return new ResFormationInfo(properties);
            }; /**
               * Encodes the specified ResFormationInfo message. Does not implicitly {@link m_proto.ResFormationInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {m_proto.IResFormationInfo} message ResFormationInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFormationInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.formations != null && message.formations.length) for (var i = 0; i < message.formations.length; ++i) $root.m_proto.Formation.encode(message.formations[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResFormationInfo message, length delimited. Does not implicitly {@link m_proto.ResFormationInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {m_proto.IResFormationInfo} message ResFormationInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFormationInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResFormationInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResFormationInfo} ResFormationInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFormationInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResFormationInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.formations && message.formations.length)) message.formations = [];
                      message.formations.push($root.m_proto.Formation.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResFormationInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResFormationInfo} ResFormationInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFormationInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResFormationInfo message.
               * @function verify
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResFormationInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.formations != null && message.hasOwnProperty("formations")) {
                if (!Array.isArray(message.formations)) return "formations: array expected";
                for (var i = 0; i < message.formations.length; ++i) {
                  var error = $root.m_proto.Formation.verify(message.formations[i]);
                  if (error) return "formations." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResFormationInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResFormationInfo} ResFormationInfo
               */
            ResFormationInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResFormationInfo) return object;
              var message = new $root.m_proto.ResFormationInfo();
              if (object.code != null) message.code = object.code | 0;
              if (object.formations) {
                if (!Array.isArray(object.formations)) throw TypeError(".m_proto.ResFormationInfo.formations: array expected");
                message.formations = [];
                for (var i = 0; i < object.formations.length; ++i) {
                  if (typeof object.formations[i] !== "object") throw TypeError(".m_proto.ResFormationInfo.formations: object expected");
                  message.formations[i] = $root.m_proto.Formation.fromObject(object.formations[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResFormationInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {m_proto.ResFormationInfo} message ResFormationInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResFormationInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.formations = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.formations && message.formations.length) {
                object.formations = [];
                for (var j = 0; j < message.formations.length; ++j) object.formations[j] = $root.m_proto.Formation.toObject(message.formations[j], options);
              }
              return object;
            }; /**
               * Converts this ResFormationInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ResFormationInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResFormationInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResFormationInfo
               * @function getTypeUrl
               * @memberof m_proto.ResFormationInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResFormationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResFormationInfo";
            };
            return ResFormationInfo;
          }();
          m_proto.Formation = function () {
            /**
            * Properties of a Formation.
            * @memberof m_proto
            * @interface IFormation
            * @property {string|null} [name] Formation name
            * @property {number|null} [current_formation] Formation current_formation
            * @property {Array.<m_proto.IUnit>|null} [heros] Formation heros
            * @property {Array.<m_proto.IUnit>|null} [soldiers] Formation soldiers
            * @property {number|null} [index] Formation index
            */ /**
               * Constructs a new Formation.
               * @memberof m_proto
               * @classdesc Represents a Formation.
               * @implements IFormation
               * @constructor
               * @param {m_proto.IFormation=} [properties] Properties to set
               */
            function Formation(properties) {
              this.heros = [];
              this.soldiers = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Formation name.
              * @member {string} name
              * @memberof m_proto.Formation
              * @instance
              */
            Formation.prototype.name = ""; /**
                                           * Formation current_formation.
                                           * @member {number} current_formation
                                           * @memberof m_proto.Formation
                                           * @instance
                                           */
            Formation.prototype.current_formation = 0; /**
                                                       * Formation heros.
                                                       * @member {Array.<m_proto.IUnit>} heros
                                                       * @memberof m_proto.Formation
                                                       * @instance
                                                       */
            Formation.prototype.heros = $util.emptyArray; /**
                                                          * Formation soldiers.
                                                          * @member {Array.<m_proto.IUnit>} soldiers
                                                          * @memberof m_proto.Formation
                                                          * @instance
                                                          */
            Formation.prototype.soldiers = $util.emptyArray; /**
                                                             * Formation index.
                                                             * @member {number} index
                                                             * @memberof m_proto.Formation
                                                             * @instance
                                                             */
            Formation.prototype.index = 0; /**
                                           * Creates a new Formation instance using the specified properties.
                                           * @function create
                                           * @memberof m_proto.Formation
                                           * @static
                                           * @param {m_proto.IFormation=} [properties] Properties to set
                                           * @returns {m_proto.Formation} Formation instance
                                           */
            Formation.create = function create(properties) {
              return new Formation(properties);
            }; /**
               * Encodes the specified Formation message. Does not implicitly {@link m_proto.Formation.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Formation
               * @static
               * @param {m_proto.IFormation} message Formation message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Formation.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32( /* id 1, wireType 2 =*/10).string(message.name);
              if (message.current_formation != null && Object.hasOwnProperty.call(message, "current_formation")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.current_formation);
              if (message.heros != null && message.heros.length) for (var i = 0; i < message.heros.length; ++i) $root.m_proto.Unit.encode(message.heros[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              if (message.soldiers != null && message.soldiers.length) for (var i = 0; i < message.soldiers.length; ++i) $root.m_proto.Unit.encode(message.soldiers[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.index);
              return writer;
            }; /**
               * Encodes the specified Formation message, length delimited. Does not implicitly {@link m_proto.Formation.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Formation
               * @static
               * @param {m_proto.IFormation} message Formation message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Formation.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a Formation message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Formation
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Formation} Formation
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Formation.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Formation();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.name = reader.string();
                      break;
                    }
                  case 2:
                    {
                      message.current_formation = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.heros && message.heros.length)) message.heros = [];
                      message.heros.push($root.m_proto.Unit.decode(reader, reader.uint32()));
                      break;
                    }
                  case 4:
                    {
                      if (!(message.soldiers && message.soldiers.length)) message.soldiers = [];
                      message.soldiers.push($root.m_proto.Unit.decode(reader, reader.uint32()));
                      break;
                    }
                  case 5:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a Formation message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Formation
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Formation} Formation
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Formation.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a Formation message.
               * @function verify
               * @memberof m_proto.Formation
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Formation.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected";
              if (message.current_formation != null && message.hasOwnProperty("current_formation")) if (!$util.isInteger(message.current_formation)) return "current_formation: integer expected";
              if (message.heros != null && message.hasOwnProperty("heros")) {
                if (!Array.isArray(message.heros)) return "heros: array expected";
                for (var i = 0; i < message.heros.length; ++i) {
                  var error = $root.m_proto.Unit.verify(message.heros[i]);
                  if (error) return "heros." + error;
                }
              }
              if (message.soldiers != null && message.hasOwnProperty("soldiers")) {
                if (!Array.isArray(message.soldiers)) return "soldiers: array expected";
                for (var i = 0; i < message.soldiers.length; ++i) {
                  var error = $root.m_proto.Unit.verify(message.soldiers[i]);
                  if (error) return "soldiers." + error;
                }
              }
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              return null;
            }; /**
               * Creates a Formation message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Formation
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Formation} Formation
               */
            Formation.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Formation) return object;
              var message = new $root.m_proto.Formation();
              if (object.name != null) message.name = String(object.name);
              if (object.current_formation != null) message.current_formation = object.current_formation | 0;
              if (object.heros) {
                if (!Array.isArray(object.heros)) throw TypeError(".m_proto.Formation.heros: array expected");
                message.heros = [];
                for (var i = 0; i < object.heros.length; ++i) {
                  if (typeof object.heros[i] !== "object") throw TypeError(".m_proto.Formation.heros: object expected");
                  message.heros[i] = $root.m_proto.Unit.fromObject(object.heros[i]);
                }
              }
              if (object.soldiers) {
                if (!Array.isArray(object.soldiers)) throw TypeError(".m_proto.Formation.soldiers: array expected");
                message.soldiers = [];
                for (var i = 0; i < object.soldiers.length; ++i) {
                  if (typeof object.soldiers[i] !== "object") throw TypeError(".m_proto.Formation.soldiers: object expected");
                  message.soldiers[i] = $root.m_proto.Unit.fromObject(object.soldiers[i]);
                }
              }
              if (object.index != null) message.index = object.index | 0;
              return message;
            }; /**
               * Creates a plain object from a Formation message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Formation
               * @static
               * @param {m_proto.Formation} message Formation
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Formation.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) {
                object.heros = [];
                object.soldiers = [];
              }
              if (options.defaults) {
                object.name = "";
                object.current_formation = 0;
                object.index = 0;
              }
              if (message.name != null && message.hasOwnProperty("name")) object.name = message.name;
              if (message.current_formation != null && message.hasOwnProperty("current_formation")) object.current_formation = message.current_formation;
              if (message.heros && message.heros.length) {
                object.heros = [];
                for (var j = 0; j < message.heros.length; ++j) object.heros[j] = $root.m_proto.Unit.toObject(message.heros[j], options);
              }
              if (message.soldiers && message.soldiers.length) {
                object.soldiers = [];
                for (var j = 0; j < message.soldiers.length; ++j) object.soldiers[j] = $root.m_proto.Unit.toObject(message.soldiers[j], options);
              }
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              return object;
            }; /**
               * Converts this Formation to JSON.
               * @function toJSON
               * @memberof m_proto.Formation
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Formation.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Formation
               * @function getTypeUrl
               * @memberof m_proto.Formation
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Formation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Formation";
            };
            return Formation;
          }();
          m_proto.Unit = function () {
            /**
            * Properties of an Unit.
            * @memberof m_proto
            * @interface IUnit
            * @property {number|null} [pos] Unit pos
            * @property {number|null} [id] Unit id
            */ /**
               * Constructs a new Unit.
               * @memberof m_proto
               * @classdesc Represents an Unit.
               * @implements IUnit
               * @constructor
               * @param {m_proto.IUnit=} [properties] Properties to set
               */
            function Unit(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Unit pos.
              * @member {number} pos
              * @memberof m_proto.Unit
              * @instance
              */
            Unit.prototype.pos = 0; /**
                                    * Unit id.
                                    * @member {number} id
                                    * @memberof m_proto.Unit
                                    * @instance
                                    */
            Unit.prototype.id = 0; /**
                                   * Creates a new Unit instance using the specified properties.
                                   * @function create
                                   * @memberof m_proto.Unit
                                   * @static
                                   * @param {m_proto.IUnit=} [properties] Properties to set
                                   * @returns {m_proto.Unit} Unit instance
                                   */
            Unit.create = function create(properties) {
              return new Unit(properties);
            }; /**
               * Encodes the specified Unit message. Does not implicitly {@link m_proto.Unit.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Unit
               * @static
               * @param {m_proto.IUnit} message Unit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Unit.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.pos);
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.id);
              return writer;
            }; /**
               * Encodes the specified Unit message, length delimited. Does not implicitly {@link m_proto.Unit.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Unit
               * @static
               * @param {m_proto.IUnit} message Unit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Unit.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes an Unit message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Unit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Unit} Unit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Unit.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Unit();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.pos = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes an Unit message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Unit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Unit} Unit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Unit.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies an Unit message.
               * @function verify
               * @memberof m_proto.Unit
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Unit.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos)) return "pos: integer expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              return null;
            }; /**
               * Creates an Unit message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Unit
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Unit} Unit
               */
            Unit.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Unit) return object;
              var message = new $root.m_proto.Unit();
              if (object.pos != null) message.pos = object.pos | 0;
              if (object.id != null) message.id = object.id | 0;
              return message;
            }; /**
               * Creates a plain object from an Unit message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Unit
               * @static
               * @param {m_proto.Unit} message Unit
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Unit.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.pos = 0;
                object.id = 0;
              }
              if (message.pos != null && message.hasOwnProperty("pos")) object.pos = message.pos;
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              return object;
            }; /**
               * Converts this Unit to JSON.
               * @function toJSON
               * @memberof m_proto.Unit
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Unit.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Unit
               * @function getTypeUrl
               * @memberof m_proto.Unit
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Unit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Unit";
            };
            return Unit;
          }();
          m_proto.ReqFormationChangeName = function () {
            /**
            * Properties of a ReqFormationChangeName.
            * @memberof m_proto
            * @interface IReqFormationChangeName
            * @property {number|null} [index] ReqFormationChangeName index
            * @property {string|null} [name] ReqFormationChangeName name
            */ /**
               * Constructs a new ReqFormationChangeName.
               * @memberof m_proto
               * @classdesc Represents a ReqFormationChangeName.
               * @implements IReqFormationChangeName
               * @constructor
               * @param {m_proto.IReqFormationChangeName=} [properties] Properties to set
               */
            function ReqFormationChangeName(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqFormationChangeName index.
              * @member {number} index
              * @memberof m_proto.ReqFormationChangeName
              * @instance
              */
            ReqFormationChangeName.prototype.index = 0; /**
                                                        * ReqFormationChangeName name.
                                                        * @member {string} name
                                                        * @memberof m_proto.ReqFormationChangeName
                                                        * @instance
                                                        */
            ReqFormationChangeName.prototype.name = ""; /**
                                                        * Creates a new ReqFormationChangeName instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ReqFormationChangeName
                                                        * @static
                                                        * @param {m_proto.IReqFormationChangeName=} [properties] Properties to set
                                                        * @returns {m_proto.ReqFormationChangeName} ReqFormationChangeName instance
                                                        */
            ReqFormationChangeName.create = function create(properties) {
              return new ReqFormationChangeName(properties);
            }; /**
               * Encodes the specified ReqFormationChangeName message. Does not implicitly {@link m_proto.ReqFormationChangeName.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {m_proto.IReqFormationChangeName} message ReqFormationChangeName message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFormationChangeName.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.index);
              if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.name);
              return writer;
            }; /**
               * Encodes the specified ReqFormationChangeName message, length delimited. Does not implicitly {@link m_proto.ReqFormationChangeName.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {m_proto.IReqFormationChangeName} message ReqFormationChangeName message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqFormationChangeName.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqFormationChangeName message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqFormationChangeName} ReqFormationChangeName
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFormationChangeName.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqFormationChangeName();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.name = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqFormationChangeName message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqFormationChangeName} ReqFormationChangeName
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqFormationChangeName.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqFormationChangeName message.
               * @function verify
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqFormationChangeName.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected";
              return null;
            }; /**
               * Creates a ReqFormationChangeName message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqFormationChangeName} ReqFormationChangeName
               */
            ReqFormationChangeName.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqFormationChangeName) return object;
              var message = new $root.m_proto.ReqFormationChangeName();
              if (object.index != null) message.index = object.index | 0;
              if (object.name != null) message.name = String(object.name);
              return message;
            }; /**
               * Creates a plain object from a ReqFormationChangeName message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {m_proto.ReqFormationChangeName} message ReqFormationChangeName
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqFormationChangeName.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.index = 0;
                object.name = "";
              }
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.name != null && message.hasOwnProperty("name")) object.name = message.name;
              return object;
            }; /**
               * Converts this ReqFormationChangeName to JSON.
               * @function toJSON
               * @memberof m_proto.ReqFormationChangeName
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqFormationChangeName.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqFormationChangeName
               * @function getTypeUrl
               * @memberof m_proto.ReqFormationChangeName
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqFormationChangeName.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqFormationChangeName";
            };
            return ReqFormationChangeName;
          }();
          m_proto.ResFormationChangeName = function () {
            /**
            * Properties of a ResFormationChangeName.
            * @memberof m_proto
            * @interface IResFormationChangeName
            * @property {number|null} [code] ResFormationChangeName code
            * @property {number|null} [index] ResFormationChangeName index
            * @property {string|null} [name] ResFormationChangeName name
            */ /**
               * Constructs a new ResFormationChangeName.
               * @memberof m_proto
               * @classdesc Represents a ResFormationChangeName.
               * @implements IResFormationChangeName
               * @constructor
               * @param {m_proto.IResFormationChangeName=} [properties] Properties to set
               */
            function ResFormationChangeName(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResFormationChangeName code.
              * @member {number} code
              * @memberof m_proto.ResFormationChangeName
              * @instance
              */
            ResFormationChangeName.prototype.code = 0; /**
                                                       * ResFormationChangeName index.
                                                       * @member {number} index
                                                       * @memberof m_proto.ResFormationChangeName
                                                       * @instance
                                                       */
            ResFormationChangeName.prototype.index = 0; /**
                                                        * ResFormationChangeName name.
                                                        * @member {string} name
                                                        * @memberof m_proto.ResFormationChangeName
                                                        * @instance
                                                        */
            ResFormationChangeName.prototype.name = ""; /**
                                                        * Creates a new ResFormationChangeName instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ResFormationChangeName
                                                        * @static
                                                        * @param {m_proto.IResFormationChangeName=} [properties] Properties to set
                                                        * @returns {m_proto.ResFormationChangeName} ResFormationChangeName instance
                                                        */
            ResFormationChangeName.create = function create(properties) {
              return new ResFormationChangeName(properties);
            }; /**
               * Encodes the specified ResFormationChangeName message. Does not implicitly {@link m_proto.ResFormationChangeName.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {m_proto.IResFormationChangeName} message ResFormationChangeName message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFormationChangeName.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.index);
              if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32( /* id 3, wireType 2 =*/26).string(message.name);
              return writer;
            }; /**
               * Encodes the specified ResFormationChangeName message, length delimited. Does not implicitly {@link m_proto.ResFormationChangeName.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {m_proto.IResFormationChangeName} message ResFormationChangeName message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResFormationChangeName.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResFormationChangeName message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResFormationChangeName} ResFormationChangeName
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFormationChangeName.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResFormationChangeName();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.name = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResFormationChangeName message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResFormationChangeName} ResFormationChangeName
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResFormationChangeName.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResFormationChangeName message.
               * @function verify
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResFormationChangeName.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected";
              return null;
            }; /**
               * Creates a ResFormationChangeName message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResFormationChangeName} ResFormationChangeName
               */
            ResFormationChangeName.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResFormationChangeName) return object;
              var message = new $root.m_proto.ResFormationChangeName();
              if (object.code != null) message.code = object.code | 0;
              if (object.index != null) message.index = object.index | 0;
              if (object.name != null) message.name = String(object.name);
              return message;
            }; /**
               * Creates a plain object from a ResFormationChangeName message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {m_proto.ResFormationChangeName} message ResFormationChangeName
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResFormationChangeName.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.index = 0;
                object.name = "";
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.name != null && message.hasOwnProperty("name")) object.name = message.name;
              return object;
            }; /**
               * Converts this ResFormationChangeName to JSON.
               * @function toJSON
               * @memberof m_proto.ResFormationChangeName
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResFormationChangeName.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResFormationChangeName
               * @function getTypeUrl
               * @memberof m_proto.ResFormationChangeName
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResFormationChangeName.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResFormationChangeName";
            };
            return ResFormationChangeName;
          }();
          m_proto.ReqOn = function () {
            /**
            * Properties of a ReqOn.
            * @memberof m_proto
            * @interface IReqOn
            * @property {number|null} [index] ReqOn index
            * @property {number|null} [type] ReqOn type
            * @property {number|null} [pos] ReqOn pos
            * @property {number|null} [id] ReqOn id
            */ /**
               * Constructs a new ReqOn.
               * @memberof m_proto
               * @classdesc Represents a ReqOn.
               * @implements IReqOn
               * @constructor
               * @param {m_proto.IReqOn=} [properties] Properties to set
               */
            function ReqOn(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqOn index.
              * @member {number} index
              * @memberof m_proto.ReqOn
              * @instance
              */
            ReqOn.prototype.index = 0; /**
                                       * ReqOn type.
                                       * @member {number} type
                                       * @memberof m_proto.ReqOn
                                       * @instance
                                       */
            ReqOn.prototype.type = 0; /**
                                      * ReqOn pos.
                                      * @member {number} pos
                                      * @memberof m_proto.ReqOn
                                      * @instance
                                      */
            ReqOn.prototype.pos = 0; /**
                                     * ReqOn id.
                                     * @member {number} id
                                     * @memberof m_proto.ReqOn
                                     * @instance
                                     */
            ReqOn.prototype.id = 0; /**
                                    * Creates a new ReqOn instance using the specified properties.
                                    * @function create
                                    * @memberof m_proto.ReqOn
                                    * @static
                                    * @param {m_proto.IReqOn=} [properties] Properties to set
                                    * @returns {m_proto.ReqOn} ReqOn instance
                                    */
            ReqOn.create = function create(properties) {
              return new ReqOn(properties);
            }; /**
               * Encodes the specified ReqOn message. Does not implicitly {@link m_proto.ReqOn.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqOn
               * @static
               * @param {m_proto.IReqOn} message ReqOn message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqOn.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.index);
              if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.type);
              if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.pos);
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.id);
              return writer;
            }; /**
               * Encodes the specified ReqOn message, length delimited. Does not implicitly {@link m_proto.ReqOn.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqOn
               * @static
               * @param {m_proto.IReqOn} message ReqOn message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqOn.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqOn message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqOn
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqOn} ReqOn
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqOn.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqOn();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.type = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.pos = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqOn message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqOn
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqOn} ReqOn
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqOn.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqOn message.
               * @function verify
               * @memberof m_proto.ReqOn
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqOn.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected";
              if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos)) return "pos: integer expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              return null;
            }; /**
               * Creates a ReqOn message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqOn
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqOn} ReqOn
               */
            ReqOn.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqOn) return object;
              var message = new $root.m_proto.ReqOn();
              if (object.index != null) message.index = object.index | 0;
              if (object.type != null) message.type = object.type | 0;
              if (object.pos != null) message.pos = object.pos | 0;
              if (object.id != null) message.id = object.id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqOn message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqOn
               * @static
               * @param {m_proto.ReqOn} message ReqOn
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqOn.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.index = 0;
                object.type = 0;
                object.pos = 0;
                object.id = 0;
              }
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.type != null && message.hasOwnProperty("type")) object.type = message.type;
              if (message.pos != null && message.hasOwnProperty("pos")) object.pos = message.pos;
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              return object;
            }; /**
               * Converts this ReqOn to JSON.
               * @function toJSON
               * @memberof m_proto.ReqOn
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqOn.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqOn
               * @function getTypeUrl
               * @memberof m_proto.ReqOn
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqOn.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqOn";
            };
            return ReqOn;
          }();
          m_proto.ResOn = function () {
            /**
            * Properties of a ResOn.
            * @memberof m_proto
            * @interface IResOn
            * @property {number|null} [code] ResOn code
            * @property {number|null} [id] ResOn id
            * @property {number|null} [old_id] ResOn old_id
            * @property {number|null} [index] ResOn index
            * @property {number|null} [pos] ResOn pos
            * @property {number|null} [type] ResOn type
            */ /**
               * Constructs a new ResOn.
               * @memberof m_proto
               * @classdesc Represents a ResOn.
               * @implements IResOn
               * @constructor
               * @param {m_proto.IResOn=} [properties] Properties to set
               */
            function ResOn(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResOn code.
              * @member {number} code
              * @memberof m_proto.ResOn
              * @instance
              */
            ResOn.prototype.code = 0; /**
                                      * ResOn id.
                                      * @member {number} id
                                      * @memberof m_proto.ResOn
                                      * @instance
                                      */
            ResOn.prototype.id = 0; /**
                                    * ResOn old_id.
                                    * @member {number} old_id
                                    * @memberof m_proto.ResOn
                                    * @instance
                                    */
            ResOn.prototype.old_id = 0; /**
                                        * ResOn index.
                                        * @member {number} index
                                        * @memberof m_proto.ResOn
                                        * @instance
                                        */
            ResOn.prototype.index = 0; /**
                                       * ResOn pos.
                                       * @member {number} pos
                                       * @memberof m_proto.ResOn
                                       * @instance
                                       */
            ResOn.prototype.pos = 0; /**
                                     * ResOn type.
                                     * @member {number} type
                                     * @memberof m_proto.ResOn
                                     * @instance
                                     */
            ResOn.prototype.type = 0; /**
                                      * Creates a new ResOn instance using the specified properties.
                                      * @function create
                                      * @memberof m_proto.ResOn
                                      * @static
                                      * @param {m_proto.IResOn=} [properties] Properties to set
                                      * @returns {m_proto.ResOn} ResOn instance
                                      */
            ResOn.create = function create(properties) {
              return new ResOn(properties);
            }; /**
               * Encodes the specified ResOn message. Does not implicitly {@link m_proto.ResOn.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResOn
               * @static
               * @param {m_proto.IResOn} message ResOn message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResOn.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.id);
              if (message.old_id != null && Object.hasOwnProperty.call(message, "old_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.old_id);
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.index);
              if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.pos);
              if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.type);
              return writer;
            }; /**
               * Encodes the specified ResOn message, length delimited. Does not implicitly {@link m_proto.ResOn.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResOn
               * @static
               * @param {m_proto.IResOn} message ResOn message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResOn.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResOn message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResOn
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResOn} ResOn
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResOn.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResOn();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.old_id = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.pos = reader.int32();
                      break;
                    }
                  case 6:
                    {
                      message.type = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResOn message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResOn
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResOn} ResOn
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResOn.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResOn message.
               * @function verify
               * @memberof m_proto.ResOn
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResOn.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              if (message.old_id != null && message.hasOwnProperty("old_id")) if (!$util.isInteger(message.old_id)) return "old_id: integer expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos)) return "pos: integer expected";
              if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected";
              return null;
            }; /**
               * Creates a ResOn message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResOn
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResOn} ResOn
               */
            ResOn.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResOn) return object;
              var message = new $root.m_proto.ResOn();
              if (object.code != null) message.code = object.code | 0;
              if (object.id != null) message.id = object.id | 0;
              if (object.old_id != null) message.old_id = object.old_id | 0;
              if (object.index != null) message.index = object.index | 0;
              if (object.pos != null) message.pos = object.pos | 0;
              if (object.type != null) message.type = object.type | 0;
              return message;
            }; /**
               * Creates a plain object from a ResOn message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResOn
               * @static
               * @param {m_proto.ResOn} message ResOn
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResOn.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.id = 0;
                object.old_id = 0;
                object.index = 0;
                object.pos = 0;
                object.type = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              if (message.old_id != null && message.hasOwnProperty("old_id")) object.old_id = message.old_id;
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              if (message.pos != null && message.hasOwnProperty("pos")) object.pos = message.pos;
              if (message.type != null && message.hasOwnProperty("type")) object.type = message.type;
              return object;
            }; /**
               * Converts this ResOn to JSON.
               * @function toJSON
               * @memberof m_proto.ResOn
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResOn.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResOn
               * @function getTypeUrl
               * @memberof m_proto.ResOn
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResOn.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResOn";
            };
            return ResOn;
          }();
          m_proto.ReqUse = function () {
            /**
            * Properties of a ReqUse.
            * @memberof m_proto
            * @interface IReqUse
            * @property {number|null} [index] ReqUse index
            */ /**
               * Constructs a new ReqUse.
               * @memberof m_proto
               * @classdesc Represents a ReqUse.
               * @implements IReqUse
               * @constructor
               * @param {m_proto.IReqUse=} [properties] Properties to set
               */
            function ReqUse(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqUse index.
              * @member {number} index
              * @memberof m_proto.ReqUse
              * @instance
              */
            ReqUse.prototype.index = 0; /**
                                        * Creates a new ReqUse instance using the specified properties.
                                        * @function create
                                        * @memberof m_proto.ReqUse
                                        * @static
                                        * @param {m_proto.IReqUse=} [properties] Properties to set
                                        * @returns {m_proto.ReqUse} ReqUse instance
                                        */
            ReqUse.create = function create(properties) {
              return new ReqUse(properties);
            }; /**
               * Encodes the specified ReqUse message. Does not implicitly {@link m_proto.ReqUse.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqUse
               * @static
               * @param {m_proto.IReqUse} message ReqUse message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUse.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.index != null && Object.hasOwnProperty.call(message, "index")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.index);
              return writer;
            }; /**
               * Encodes the specified ReqUse message, length delimited. Does not implicitly {@link m_proto.ReqUse.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqUse
               * @static
               * @param {m_proto.IReqUse} message ReqUse message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqUse.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqUse message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqUse
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqUse} ReqUse
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUse.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqUse();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.index = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqUse message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqUse
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqUse} ReqUse
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqUse.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqUse message.
               * @function verify
               * @memberof m_proto.ReqUse
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqUse.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.index != null && message.hasOwnProperty("index")) if (!$util.isInteger(message.index)) return "index: integer expected";
              return null;
            }; /**
               * Creates a ReqUse message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqUse
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqUse} ReqUse
               */
            ReqUse.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqUse) return object;
              var message = new $root.m_proto.ReqUse();
              if (object.index != null) message.index = object.index | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqUse message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqUse
               * @static
               * @param {m_proto.ReqUse} message ReqUse
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqUse.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.index = 0;
              if (message.index != null && message.hasOwnProperty("index")) object.index = message.index;
              return object;
            }; /**
               * Converts this ReqUse to JSON.
               * @function toJSON
               * @memberof m_proto.ReqUse
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqUse.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqUse
               * @function getTypeUrl
               * @memberof m_proto.ReqUse
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqUse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqUse";
            };
            return ReqUse;
          }();
          m_proto.ResUse = function () {
            /**
            * Properties of a ResUse.
            * @memberof m_proto
            * @interface IResUse
            * @property {number|null} [code] ResUse code
            * @property {number|null} [cur_index] ResUse cur_index
            * @property {number|null} [old_index] ResUse old_index
            */ /**
               * Constructs a new ResUse.
               * @memberof m_proto
               * @classdesc Represents a ResUse.
               * @implements IResUse
               * @constructor
               * @param {m_proto.IResUse=} [properties] Properties to set
               */
            function ResUse(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUse code.
              * @member {number} code
              * @memberof m_proto.ResUse
              * @instance
              */
            ResUse.prototype.code = 0; /**
                                       * ResUse cur_index.
                                       * @member {number} cur_index
                                       * @memberof m_proto.ResUse
                                       * @instance
                                       */
            ResUse.prototype.cur_index = 0; /**
                                            * ResUse old_index.
                                            * @member {number} old_index
                                            * @memberof m_proto.ResUse
                                            * @instance
                                            */
            ResUse.prototype.old_index = 0; /**
                                            * Creates a new ResUse instance using the specified properties.
                                            * @function create
                                            * @memberof m_proto.ResUse
                                            * @static
                                            * @param {m_proto.IResUse=} [properties] Properties to set
                                            * @returns {m_proto.ResUse} ResUse instance
                                            */
            ResUse.create = function create(properties) {
              return new ResUse(properties);
            }; /**
               * Encodes the specified ResUse message. Does not implicitly {@link m_proto.ResUse.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUse
               * @static
               * @param {m_proto.IResUse} message ResUse message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUse.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.cur_index != null && Object.hasOwnProperty.call(message, "cur_index")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.cur_index);
              if (message.old_index != null && Object.hasOwnProperty.call(message, "old_index")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.old_index);
              return writer;
            }; /**
               * Encodes the specified ResUse message, length delimited. Does not implicitly {@link m_proto.ResUse.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUse
               * @static
               * @param {m_proto.IResUse} message ResUse message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUse.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUse message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUse
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUse} ResUse
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUse.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUse();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.cur_index = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.old_index = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUse message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUse
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUse} ResUse
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUse.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUse message.
               * @function verify
               * @memberof m_proto.ResUse
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUse.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.cur_index != null && message.hasOwnProperty("cur_index")) if (!$util.isInteger(message.cur_index)) return "cur_index: integer expected";
              if (message.old_index != null && message.hasOwnProperty("old_index")) if (!$util.isInteger(message.old_index)) return "old_index: integer expected";
              return null;
            }; /**
               * Creates a ResUse message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUse
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUse} ResUse
               */
            ResUse.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUse) return object;
              var message = new $root.m_proto.ResUse();
              if (object.code != null) message.code = object.code | 0;
              if (object.cur_index != null) message.cur_index = object.cur_index | 0;
              if (object.old_index != null) message.old_index = object.old_index | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUse message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUse
               * @static
               * @param {m_proto.ResUse} message ResUse
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUse.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.cur_index = 0;
                object.old_index = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.cur_index != null && message.hasOwnProperty("cur_index")) object.cur_index = message.cur_index;
              if (message.old_index != null && message.hasOwnProperty("old_index")) object.old_index = message.old_index;
              return object;
            }; /**
               * Converts this ResUse to JSON.
               * @function toJSON
               * @memberof m_proto.ResUse
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUse.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUse
               * @function getTypeUrl
               * @memberof m_proto.ResUse
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUse";
            };
            return ResUse;
          }();
          m_proto.ResUnlockPos = function () {
            /**
            * Properties of a ResUnlockPos.
            * @memberof m_proto
            * @interface IResUnlockPos
            * @property {number|null} [code] ResUnlockPos code
            * @property {number|null} [type] ResUnlockPos type
            * @property {number|null} [pos] ResUnlockPos pos
            * @property {number|null} [id] ResUnlockPos id
            */ /**
               * Constructs a new ResUnlockPos.
               * @memberof m_proto
               * @classdesc Represents a ResUnlockPos.
               * @implements IResUnlockPos
               * @constructor
               * @param {m_proto.IResUnlockPos=} [properties] Properties to set
               */
            function ResUnlockPos(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResUnlockPos code.
              * @member {number} code
              * @memberof m_proto.ResUnlockPos
              * @instance
              */
            ResUnlockPos.prototype.code = 0; /**
                                             * ResUnlockPos type.
                                             * @member {number} type
                                             * @memberof m_proto.ResUnlockPos
                                             * @instance
                                             */
            ResUnlockPos.prototype.type = 0; /**
                                             * ResUnlockPos pos.
                                             * @member {number} pos
                                             * @memberof m_proto.ResUnlockPos
                                             * @instance
                                             */
            ResUnlockPos.prototype.pos = 0; /**
                                            * ResUnlockPos id.
                                            * @member {number} id
                                            * @memberof m_proto.ResUnlockPos
                                            * @instance
                                            */
            ResUnlockPos.prototype.id = 0; /**
                                           * Creates a new ResUnlockPos instance using the specified properties.
                                           * @function create
                                           * @memberof m_proto.ResUnlockPos
                                           * @static
                                           * @param {m_proto.IResUnlockPos=} [properties] Properties to set
                                           * @returns {m_proto.ResUnlockPos} ResUnlockPos instance
                                           */
            ResUnlockPos.create = function create(properties) {
              return new ResUnlockPos(properties);
            }; /**
               * Encodes the specified ResUnlockPos message. Does not implicitly {@link m_proto.ResUnlockPos.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {m_proto.IResUnlockPos} message ResUnlockPos message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUnlockPos.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.type);
              if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.pos);
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.id);
              return writer;
            }; /**
               * Encodes the specified ResUnlockPos message, length delimited. Does not implicitly {@link m_proto.ResUnlockPos.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {m_proto.IResUnlockPos} message ResUnlockPos message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResUnlockPos.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResUnlockPos message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResUnlockPos} ResUnlockPos
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUnlockPos.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResUnlockPos();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.type = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.pos = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResUnlockPos message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResUnlockPos} ResUnlockPos
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResUnlockPos.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResUnlockPos message.
               * @function verify
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResUnlockPos.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected";
              if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos)) return "pos: integer expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              return null;
            }; /**
               * Creates a ResUnlockPos message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResUnlockPos} ResUnlockPos
               */
            ResUnlockPos.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResUnlockPos) return object;
              var message = new $root.m_proto.ResUnlockPos();
              if (object.code != null) message.code = object.code | 0;
              if (object.type != null) message.type = object.type | 0;
              if (object.pos != null) message.pos = object.pos | 0;
              if (object.id != null) message.id = object.id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResUnlockPos message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {m_proto.ResUnlockPos} message ResUnlockPos
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResUnlockPos.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.type = 0;
                object.pos = 0;
                object.id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.type != null && message.hasOwnProperty("type")) object.type = message.type;
              if (message.pos != null && message.hasOwnProperty("pos")) object.pos = message.pos;
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              return object;
            }; /**
               * Converts this ResUnlockPos to JSON.
               * @function toJSON
               * @memberof m_proto.ResUnlockPos
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResUnlockPos.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResUnlockPos
               * @function getTypeUrl
               * @memberof m_proto.ResUnlockPos
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResUnlockPos.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResUnlockPos";
            };
            return ResUnlockPos;
          }();
          m_proto.ReqLoadMail = function () {
            /**
            * Properties of a ReqLoadMail.
            * @memberof m_proto
            * @interface IReqLoadMail
            */ /**
               * Constructs a new ReqLoadMail.
               * @memberof m_proto
               * @classdesc Represents a ReqLoadMail.
               * @implements IReqLoadMail
               * @constructor
               * @param {m_proto.IReqLoadMail=} [properties] Properties to set
               */
            function ReqLoadMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqLoadMail instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqLoadMail
              * @static
              * @param {m_proto.IReqLoadMail=} [properties] Properties to set
              * @returns {m_proto.ReqLoadMail} ReqLoadMail instance
              */
            ReqLoadMail.create = function create(properties) {
              return new ReqLoadMail(properties);
            }; /**
               * Encodes the specified ReqLoadMail message. Does not implicitly {@link m_proto.ReqLoadMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {m_proto.IReqLoadMail} message ReqLoadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLoadMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqLoadMail message, length delimited. Does not implicitly {@link m_proto.ReqLoadMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {m_proto.IReqLoadMail} message ReqLoadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLoadMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqLoadMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqLoadMail} ReqLoadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLoadMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqLoadMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqLoadMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqLoadMail} ReqLoadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLoadMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqLoadMail message.
               * @function verify
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqLoadMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqLoadMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqLoadMail} ReqLoadMail
               */
            ReqLoadMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqLoadMail) return object;
              return new $root.m_proto.ReqLoadMail();
            }; /**
               * Creates a plain object from a ReqLoadMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {m_proto.ReqLoadMail} message ReqLoadMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqLoadMail.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqLoadMail to JSON.
               * @function toJSON
               * @memberof m_proto.ReqLoadMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqLoadMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqLoadMail
               * @function getTypeUrl
               * @memberof m_proto.ReqLoadMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqLoadMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqLoadMail";
            };
            return ReqLoadMail;
          }();
          m_proto.ResLoadMail = function () {
            /**
            * Properties of a ResLoadMail.
            * @memberof m_proto
            * @interface IResLoadMail
            * @property {number|null} [code] ResLoadMail code
            * @property {Array.<m_proto.IMail>|null} [mails] ResLoadMail mails
            */ /**
               * Constructs a new ResLoadMail.
               * @memberof m_proto
               * @classdesc Represents a ResLoadMail.
               * @implements IResLoadMail
               * @constructor
               * @param {m_proto.IResLoadMail=} [properties] Properties to set
               */
            function ResLoadMail(properties) {
              this.mails = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResLoadMail code.
              * @member {number} code
              * @memberof m_proto.ResLoadMail
              * @instance
              */
            ResLoadMail.prototype.code = 0; /**
                                            * ResLoadMail mails.
                                            * @member {Array.<m_proto.IMail>} mails
                                            * @memberof m_proto.ResLoadMail
                                            * @instance
                                            */
            ResLoadMail.prototype.mails = $util.emptyArray; /**
                                                            * Creates a new ResLoadMail instance using the specified properties.
                                                            * @function create
                                                            * @memberof m_proto.ResLoadMail
                                                            * @static
                                                            * @param {m_proto.IResLoadMail=} [properties] Properties to set
                                                            * @returns {m_proto.ResLoadMail} ResLoadMail instance
                                                            */
            ResLoadMail.create = function create(properties) {
              return new ResLoadMail(properties);
            }; /**
               * Encodes the specified ResLoadMail message. Does not implicitly {@link m_proto.ResLoadMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {m_proto.IResLoadMail} message ResLoadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLoadMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mails != null && message.mails.length) for (var i = 0; i < message.mails.length; ++i) $root.m_proto.Mail.encode(message.mails[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResLoadMail message, length delimited. Does not implicitly {@link m_proto.ResLoadMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {m_proto.IResLoadMail} message ResLoadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLoadMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResLoadMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResLoadMail} ResLoadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLoadMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResLoadMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.mails && message.mails.length)) message.mails = [];
                      message.mails.push($root.m_proto.Mail.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResLoadMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResLoadMail} ResLoadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLoadMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResLoadMail message.
               * @function verify
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResLoadMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mails != null && message.hasOwnProperty("mails")) {
                if (!Array.isArray(message.mails)) return "mails: array expected";
                for (var i = 0; i < message.mails.length; ++i) {
                  var error = $root.m_proto.Mail.verify(message.mails[i]);
                  if (error) return "mails." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResLoadMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResLoadMail} ResLoadMail
               */
            ResLoadMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResLoadMail) return object;
              var message = new $root.m_proto.ResLoadMail();
              if (object.code != null) message.code = object.code | 0;
              if (object.mails) {
                if (!Array.isArray(object.mails)) throw TypeError(".m_proto.ResLoadMail.mails: array expected");
                message.mails = [];
                for (var i = 0; i < object.mails.length; ++i) {
                  if (typeof object.mails[i] !== "object") throw TypeError(".m_proto.ResLoadMail.mails: object expected");
                  message.mails[i] = $root.m_proto.Mail.fromObject(object.mails[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResLoadMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {m_proto.ResLoadMail} message ResLoadMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResLoadMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.mails = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mails && message.mails.length) {
                object.mails = [];
                for (var j = 0; j < message.mails.length; ++j) object.mails[j] = $root.m_proto.Mail.toObject(message.mails[j], options);
              }
              return object;
            }; /**
               * Converts this ResLoadMail to JSON.
               * @function toJSON
               * @memberof m_proto.ResLoadMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResLoadMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResLoadMail
               * @function getTypeUrl
               * @memberof m_proto.ResLoadMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResLoadMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResLoadMail";
            };
            return ResLoadMail;
          }();
          m_proto.Mail = function () {
            /**
            * Properties of a Mail.
            * @memberof m_proto
            * @interface IMail
            * @property {number|null} [id] Mail id
            * @property {number|null} [title] Mail title
            * @property {number|null} [content] Mail content
            * @property {Array.<m_proto.IItem>|null} [items] Mail items
            * @property {string|null} [sender] Mail sender
            * @property {number|null} [status] Mail status
            * @property {string|null} [description] Mail description
            * @property {string|null} [time_str] Mail time_str
            */ /**
               * Constructs a new Mail.
               * @memberof m_proto
               * @classdesc Represents a Mail.
               * @implements IMail
               * @constructor
               * @param {m_proto.IMail=} [properties] Properties to set
               */
            function Mail(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Mail id.
              * @member {number} id
              * @memberof m_proto.Mail
              * @instance
              */
            Mail.prototype.id = 0; /**
                                   * Mail title.
                                   * @member {number} title
                                   * @memberof m_proto.Mail
                                   * @instance
                                   */
            Mail.prototype.title = 0; /**
                                      * Mail content.
                                      * @member {number} content
                                      * @memberof m_proto.Mail
                                      * @instance
                                      */
            Mail.prototype.content = 0; /**
                                        * Mail items.
                                        * @member {Array.<m_proto.IItem>} items
                                        * @memberof m_proto.Mail
                                        * @instance
                                        */
            Mail.prototype.items = $util.emptyArray; /**
                                                     * Mail sender.
                                                     * @member {string} sender
                                                     * @memberof m_proto.Mail
                                                     * @instance
                                                     */
            Mail.prototype.sender = ""; /**
                                        * Mail status.
                                        * @member {number} status
                                        * @memberof m_proto.Mail
                                        * @instance
                                        */
            Mail.prototype.status = 0; /**
                                       * Mail description.
                                       * @member {string} description
                                       * @memberof m_proto.Mail
                                       * @instance
                                       */
            Mail.prototype.description = ""; /**
                                             * Mail time_str.
                                             * @member {string} time_str
                                             * @memberof m_proto.Mail
                                             * @instance
                                             */
            Mail.prototype.time_str = ""; /**
                                          * Creates a new Mail instance using the specified properties.
                                          * @function create
                                          * @memberof m_proto.Mail
                                          * @static
                                          * @param {m_proto.IMail=} [properties] Properties to set
                                          * @returns {m_proto.Mail} Mail instance
                                          */
            Mail.create = function create(properties) {
              return new Mail(properties);
            }; /**
               * Encodes the specified Mail message. Does not implicitly {@link m_proto.Mail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.Mail
               * @static
               * @param {m_proto.IMail} message Mail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Mail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.id);
              if (message.title != null && Object.hasOwnProperty.call(message, "title")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.title);
              if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.content);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();
              if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) writer.uint32( /* id 5, wireType 2 =*/42).string(message.sender);
              if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.status);
              if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32( /* id 7, wireType 2 =*/58).string(message.description);
              if (message.time_str != null && Object.hasOwnProperty.call(message, "time_str")) writer.uint32( /* id 8, wireType 2 =*/66).string(message.time_str);
              return writer;
            }; /**
               * Encodes the specified Mail message, length delimited. Does not implicitly {@link m_proto.Mail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.Mail
               * @static
               * @param {m_proto.IMail} message Mail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            Mail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a Mail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.Mail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.Mail} Mail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Mail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.Mail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.title = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.content = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  case 5:
                    {
                      message.sender = reader.string();
                      break;
                    }
                  case 6:
                    {
                      message.status = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.description = reader.string();
                      break;
                    }
                  case 8:
                    {
                      message.time_str = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a Mail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.Mail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.Mail} Mail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            Mail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a Mail message.
               * @function verify
               * @memberof m_proto.Mail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            Mail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              if (message.title != null && message.hasOwnProperty("title")) if (!$util.isInteger(message.title)) return "title: integer expected";
              if (message.content != null && message.hasOwnProperty("content")) if (!$util.isInteger(message.content)) return "content: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              if (message.sender != null && message.hasOwnProperty("sender")) if (!$util.isString(message.sender)) return "sender: string expected";
              if (message.status != null && message.hasOwnProperty("status")) if (!$util.isInteger(message.status)) return "status: integer expected";
              if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected";
              if (message.time_str != null && message.hasOwnProperty("time_str")) if (!$util.isString(message.time_str)) return "time_str: string expected";
              return null;
            }; /**
               * Creates a Mail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.Mail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.Mail} Mail
               */
            Mail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.Mail) return object;
              var message = new $root.m_proto.Mail();
              if (object.id != null) message.id = object.id | 0;
              if (object.title != null) message.title = object.title | 0;
              if (object.content != null) message.content = object.content | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.Mail.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.Mail.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              if (object.sender != null) message.sender = String(object.sender);
              if (object.status != null) message.status = object.status | 0;
              if (object.description != null) message.description = String(object.description);
              if (object.time_str != null) message.time_str = String(object.time_str);
              return message;
            }; /**
               * Creates a plain object from a Mail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.Mail
               * @static
               * @param {m_proto.Mail} message Mail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            Mail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.id = 0;
                object.title = 0;
                object.content = 0;
                object.sender = "";
                object.status = 0;
                object.description = "";
                object.time_str = "";
              }
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              if (message.title != null && message.hasOwnProperty("title")) object.title = message.title;
              if (message.content != null && message.hasOwnProperty("content")) object.content = message.content;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              if (message.sender != null && message.hasOwnProperty("sender")) object.sender = message.sender;
              if (message.status != null && message.hasOwnProperty("status")) object.status = message.status;
              if (message.description != null && message.hasOwnProperty("description")) object.description = message.description;
              if (message.time_str != null && message.hasOwnProperty("time_str")) object.time_str = message.time_str;
              return object;
            }; /**
               * Converts this Mail to JSON.
               * @function toJSON
               * @memberof m_proto.Mail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            Mail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for Mail
               * @function getTypeUrl
               * @memberof m_proto.Mail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            Mail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.Mail";
            };
            return Mail;
          }();
          m_proto.ReqReadMail = function () {
            /**
            * Properties of a ReqReadMail.
            * @memberof m_proto
            * @interface IReqReadMail
            * @property {number|null} [mail_id] ReqReadMail mail_id
            */ /**
               * Constructs a new ReqReadMail.
               * @memberof m_proto
               * @classdesc Represents a ReqReadMail.
               * @implements IReqReadMail
               * @constructor
               * @param {m_proto.IReqReadMail=} [properties] Properties to set
               */
            function ReqReadMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqReadMail mail_id.
              * @member {number} mail_id
              * @memberof m_proto.ReqReadMail
              * @instance
              */
            ReqReadMail.prototype.mail_id = 0; /**
                                               * Creates a new ReqReadMail instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ReqReadMail
                                               * @static
                                               * @param {m_proto.IReqReadMail=} [properties] Properties to set
                                               * @returns {m_proto.ReqReadMail} ReqReadMail instance
                                               */
            ReqReadMail.create = function create(properties) {
              return new ReqReadMail(properties);
            }; /**
               * Encodes the specified ReqReadMail message. Does not implicitly {@link m_proto.ReqReadMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {m_proto.IReqReadMail} message ReqReadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReadMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.mail_id);
              return writer;
            }; /**
               * Encodes the specified ReqReadMail message, length delimited. Does not implicitly {@link m_proto.ReqReadMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {m_proto.IReqReadMail} message ReqReadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReadMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqReadMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqReadMail} ReqReadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReadMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqReadMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqReadMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqReadMail} ReqReadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReadMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqReadMail message.
               * @function verify
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqReadMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              return null;
            }; /**
               * Creates a ReqReadMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqReadMail} ReqReadMail
               */
            ReqReadMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqReadMail) return object;
              var message = new $root.m_proto.ReqReadMail();
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqReadMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {m_proto.ReqReadMail} message ReqReadMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqReadMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.mail_id = 0;
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              return object;
            }; /**
               * Converts this ReqReadMail to JSON.
               * @function toJSON
               * @memberof m_proto.ReqReadMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqReadMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqReadMail
               * @function getTypeUrl
               * @memberof m_proto.ReqReadMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqReadMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqReadMail";
            };
            return ReqReadMail;
          }();
          m_proto.ResReadMail = function () {
            /**
            * Properties of a ResReadMail.
            * @memberof m_proto
            * @interface IResReadMail
            * @property {number|null} [code] ResReadMail code
            * @property {number|null} [mail_id] ResReadMail mail_id
            * @property {number|null} [status] ResReadMail status
            */ /**
               * Constructs a new ResReadMail.
               * @memberof m_proto
               * @classdesc Represents a ResReadMail.
               * @implements IResReadMail
               * @constructor
               * @param {m_proto.IResReadMail=} [properties] Properties to set
               */
            function ResReadMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResReadMail code.
              * @member {number} code
              * @memberof m_proto.ResReadMail
              * @instance
              */
            ResReadMail.prototype.code = 0; /**
                                            * ResReadMail mail_id.
                                            * @member {number} mail_id
                                            * @memberof m_proto.ResReadMail
                                            * @instance
                                            */
            ResReadMail.prototype.mail_id = 0; /**
                                               * ResReadMail status.
                                               * @member {number} status
                                               * @memberof m_proto.ResReadMail
                                               * @instance
                                               */
            ResReadMail.prototype.status = 0; /**
                                              * Creates a new ResReadMail instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ResReadMail
                                              * @static
                                              * @param {m_proto.IResReadMail=} [properties] Properties to set
                                              * @returns {m_proto.ResReadMail} ResReadMail instance
                                              */
            ResReadMail.create = function create(properties) {
              return new ResReadMail(properties);
            }; /**
               * Encodes the specified ResReadMail message. Does not implicitly {@link m_proto.ResReadMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResReadMail
               * @static
               * @param {m_proto.IResReadMail} message ResReadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReadMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.mail_id);
              if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.status);
              return writer;
            }; /**
               * Encodes the specified ResReadMail message, length delimited. Does not implicitly {@link m_proto.ResReadMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResReadMail
               * @static
               * @param {m_proto.IResReadMail} message ResReadMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReadMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResReadMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResReadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResReadMail} ResReadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReadMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResReadMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.status = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResReadMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResReadMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResReadMail} ResReadMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReadMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResReadMail message.
               * @function verify
               * @memberof m_proto.ResReadMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResReadMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              if (message.status != null && message.hasOwnProperty("status")) if (!$util.isInteger(message.status)) return "status: integer expected";
              return null;
            }; /**
               * Creates a ResReadMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResReadMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResReadMail} ResReadMail
               */
            ResReadMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResReadMail) return object;
              var message = new $root.m_proto.ResReadMail();
              if (object.code != null) message.code = object.code | 0;
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              if (object.status != null) message.status = object.status | 0;
              return message;
            }; /**
               * Creates a plain object from a ResReadMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResReadMail
               * @static
               * @param {m_proto.ResReadMail} message ResReadMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResReadMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.mail_id = 0;
                object.status = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              if (message.status != null && message.hasOwnProperty("status")) object.status = message.status;
              return object;
            }; /**
               * Converts this ResReadMail to JSON.
               * @function toJSON
               * @memberof m_proto.ResReadMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResReadMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResReadMail
               * @function getTypeUrl
               * @memberof m_proto.ResReadMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResReadMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResReadMail";
            };
            return ResReadMail;
          }();
          m_proto.ReqReceiveMail = function () {
            /**
            * Properties of a ReqReceiveMail.
            * @memberof m_proto
            * @interface IReqReceiveMail
            * @property {number|null} [mail_id] ReqReceiveMail mail_id
            */ /**
               * Constructs a new ReqReceiveMail.
               * @memberof m_proto
               * @classdesc Represents a ReqReceiveMail.
               * @implements IReqReceiveMail
               * @constructor
               * @param {m_proto.IReqReceiveMail=} [properties] Properties to set
               */
            function ReqReceiveMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqReceiveMail mail_id.
              * @member {number} mail_id
              * @memberof m_proto.ReqReceiveMail
              * @instance
              */
            ReqReceiveMail.prototype.mail_id = 0; /**
                                                  * Creates a new ReqReceiveMail instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ReqReceiveMail
                                                  * @static
                                                  * @param {m_proto.IReqReceiveMail=} [properties] Properties to set
                                                  * @returns {m_proto.ReqReceiveMail} ReqReceiveMail instance
                                                  */
            ReqReceiveMail.create = function create(properties) {
              return new ReqReceiveMail(properties);
            }; /**
               * Encodes the specified ReqReceiveMail message. Does not implicitly {@link m_proto.ReqReceiveMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {m_proto.IReqReceiveMail} message ReqReceiveMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReceiveMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.mail_id);
              return writer;
            }; /**
               * Encodes the specified ReqReceiveMail message, length delimited. Does not implicitly {@link m_proto.ReqReceiveMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {m_proto.IReqReceiveMail} message ReqReceiveMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReceiveMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqReceiveMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqReceiveMail} ReqReceiveMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReceiveMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqReceiveMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqReceiveMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqReceiveMail} ReqReceiveMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReceiveMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqReceiveMail message.
               * @function verify
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqReceiveMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              return null;
            }; /**
               * Creates a ReqReceiveMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqReceiveMail} ReqReceiveMail
               */
            ReqReceiveMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqReceiveMail) return object;
              var message = new $root.m_proto.ReqReceiveMail();
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqReceiveMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {m_proto.ReqReceiveMail} message ReqReceiveMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqReceiveMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.mail_id = 0;
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              return object;
            }; /**
               * Converts this ReqReceiveMail to JSON.
               * @function toJSON
               * @memberof m_proto.ReqReceiveMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqReceiveMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqReceiveMail
               * @function getTypeUrl
               * @memberof m_proto.ReqReceiveMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqReceiveMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqReceiveMail";
            };
            return ReqReceiveMail;
          }();
          m_proto.ResReceiveMail = function () {
            /**
            * Properties of a ResReceiveMail.
            * @memberof m_proto
            * @interface IResReceiveMail
            * @property {number|null} [code] ResReceiveMail code
            * @property {number|null} [mail_id] ResReceiveMail mail_id
            * @property {number|null} [status] ResReceiveMail status
            * @property {number|null} [receive] ResReceiveMail receive
            */ /**
               * Constructs a new ResReceiveMail.
               * @memberof m_proto
               * @classdesc Represents a ResReceiveMail.
               * @implements IResReceiveMail
               * @constructor
               * @param {m_proto.IResReceiveMail=} [properties] Properties to set
               */
            function ResReceiveMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResReceiveMail code.
              * @member {number} code
              * @memberof m_proto.ResReceiveMail
              * @instance
              */
            ResReceiveMail.prototype.code = 0; /**
                                               * ResReceiveMail mail_id.
                                               * @member {number} mail_id
                                               * @memberof m_proto.ResReceiveMail
                                               * @instance
                                               */
            ResReceiveMail.prototype.mail_id = 0; /**
                                                  * ResReceiveMail status.
                                                  * @member {number} status
                                                  * @memberof m_proto.ResReceiveMail
                                                  * @instance
                                                  */
            ResReceiveMail.prototype.status = 0; /**
                                                 * ResReceiveMail receive.
                                                 * @member {number} receive
                                                 * @memberof m_proto.ResReceiveMail
                                                 * @instance
                                                 */
            ResReceiveMail.prototype.receive = 0; /**
                                                  * Creates a new ResReceiveMail instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ResReceiveMail
                                                  * @static
                                                  * @param {m_proto.IResReceiveMail=} [properties] Properties to set
                                                  * @returns {m_proto.ResReceiveMail} ResReceiveMail instance
                                                  */
            ResReceiveMail.create = function create(properties) {
              return new ResReceiveMail(properties);
            }; /**
               * Encodes the specified ResReceiveMail message. Does not implicitly {@link m_proto.ResReceiveMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {m_proto.IResReceiveMail} message ResReceiveMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReceiveMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.mail_id);
              if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.status);
              if (message.receive != null && Object.hasOwnProperty.call(message, "receive")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.receive);
              return writer;
            }; /**
               * Encodes the specified ResReceiveMail message, length delimited. Does not implicitly {@link m_proto.ResReceiveMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {m_proto.IResReceiveMail} message ResReceiveMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReceiveMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResReceiveMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResReceiveMail} ResReceiveMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReceiveMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResReceiveMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.status = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.receive = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResReceiveMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResReceiveMail} ResReceiveMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReceiveMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResReceiveMail message.
               * @function verify
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResReceiveMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              if (message.status != null && message.hasOwnProperty("status")) if (!$util.isInteger(message.status)) return "status: integer expected";
              if (message.receive != null && message.hasOwnProperty("receive")) if (!$util.isInteger(message.receive)) return "receive: integer expected";
              return null;
            }; /**
               * Creates a ResReceiveMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResReceiveMail} ResReceiveMail
               */
            ResReceiveMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResReceiveMail) return object;
              var message = new $root.m_proto.ResReceiveMail();
              if (object.code != null) message.code = object.code | 0;
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              if (object.status != null) message.status = object.status | 0;
              if (object.receive != null) message.receive = object.receive | 0;
              return message;
            }; /**
               * Creates a plain object from a ResReceiveMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {m_proto.ResReceiveMail} message ResReceiveMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResReceiveMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.mail_id = 0;
                object.status = 0;
                object.receive = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              if (message.status != null && message.hasOwnProperty("status")) object.status = message.status;
              if (message.receive != null && message.hasOwnProperty("receive")) object.receive = message.receive;
              return object;
            }; /**
               * Converts this ResReceiveMail to JSON.
               * @function toJSON
               * @memberof m_proto.ResReceiveMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResReceiveMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResReceiveMail
               * @function getTypeUrl
               * @memberof m_proto.ResReceiveMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResReceiveMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResReceiveMail";
            };
            return ResReceiveMail;
          }();
          m_proto.ReqReadAllMail = function () {
            /**
            * Properties of a ReqReadAllMail.
            * @memberof m_proto
            * @interface IReqReadAllMail
            */ /**
               * Constructs a new ReqReadAllMail.
               * @memberof m_proto
               * @classdesc Represents a ReqReadAllMail.
               * @implements IReqReadAllMail
               * @constructor
               * @param {m_proto.IReqReadAllMail=} [properties] Properties to set
               */
            function ReqReadAllMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqReadAllMail instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqReadAllMail
              * @static
              * @param {m_proto.IReqReadAllMail=} [properties] Properties to set
              * @returns {m_proto.ReqReadAllMail} ReqReadAllMail instance
              */
            ReqReadAllMail.create = function create(properties) {
              return new ReqReadAllMail(properties);
            }; /**
               * Encodes the specified ReqReadAllMail message. Does not implicitly {@link m_proto.ReqReadAllMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {m_proto.IReqReadAllMail} message ReqReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReadAllMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqReadAllMail message, length delimited. Does not implicitly {@link m_proto.ReqReadAllMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {m_proto.IReqReadAllMail} message ReqReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqReadAllMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqReadAllMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqReadAllMail} ReqReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReadAllMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqReadAllMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqReadAllMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqReadAllMail} ReqReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqReadAllMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqReadAllMail message.
               * @function verify
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqReadAllMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqReadAllMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqReadAllMail} ReqReadAllMail
               */
            ReqReadAllMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqReadAllMail) return object;
              return new $root.m_proto.ReqReadAllMail();
            }; /**
               * Creates a plain object from a ReqReadAllMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {m_proto.ReqReadAllMail} message ReqReadAllMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqReadAllMail.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqReadAllMail to JSON.
               * @function toJSON
               * @memberof m_proto.ReqReadAllMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqReadAllMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqReadAllMail
               * @function getTypeUrl
               * @memberof m_proto.ReqReadAllMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqReadAllMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqReadAllMail";
            };
            return ReqReadAllMail;
          }();
          m_proto.ResReadAllMail = function () {
            /**
            * Properties of a ResReadAllMail.
            * @memberof m_proto
            * @interface IResReadAllMail
            * @property {number|null} [code] ResReadAllMail code
            * @property {Array.<m_proto.IBriefMail>|null} [mails] ResReadAllMail mails
            */ /**
               * Constructs a new ResReadAllMail.
               * @memberof m_proto
               * @classdesc Represents a ResReadAllMail.
               * @implements IResReadAllMail
               * @constructor
               * @param {m_proto.IResReadAllMail=} [properties] Properties to set
               */
            function ResReadAllMail(properties) {
              this.mails = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResReadAllMail code.
              * @member {number} code
              * @memberof m_proto.ResReadAllMail
              * @instance
              */
            ResReadAllMail.prototype.code = 0; /**
                                               * ResReadAllMail mails.
                                               * @member {Array.<m_proto.IBriefMail>} mails
                                               * @memberof m_proto.ResReadAllMail
                                               * @instance
                                               */
            ResReadAllMail.prototype.mails = $util.emptyArray; /**
                                                               * Creates a new ResReadAllMail instance using the specified properties.
                                                               * @function create
                                                               * @memberof m_proto.ResReadAllMail
                                                               * @static
                                                               * @param {m_proto.IResReadAllMail=} [properties] Properties to set
                                                               * @returns {m_proto.ResReadAllMail} ResReadAllMail instance
                                                               */
            ResReadAllMail.create = function create(properties) {
              return new ResReadAllMail(properties);
            }; /**
               * Encodes the specified ResReadAllMail message. Does not implicitly {@link m_proto.ResReadAllMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {m_proto.IResReadAllMail} message ResReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReadAllMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mails != null && message.mails.length) for (var i = 0; i < message.mails.length; ++i) $root.m_proto.BriefMail.encode(message.mails[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResReadAllMail message, length delimited. Does not implicitly {@link m_proto.ResReadAllMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {m_proto.IResReadAllMail} message ResReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResReadAllMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResReadAllMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResReadAllMail} ResReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReadAllMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResReadAllMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.mails && message.mails.length)) message.mails = [];
                      message.mails.push($root.m_proto.BriefMail.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResReadAllMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResReadAllMail} ResReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResReadAllMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResReadAllMail message.
               * @function verify
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResReadAllMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mails != null && message.hasOwnProperty("mails")) {
                if (!Array.isArray(message.mails)) return "mails: array expected";
                for (var i = 0; i < message.mails.length; ++i) {
                  var error = $root.m_proto.BriefMail.verify(message.mails[i]);
                  if (error) return "mails." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResReadAllMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResReadAllMail} ResReadAllMail
               */
            ResReadAllMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResReadAllMail) return object;
              var message = new $root.m_proto.ResReadAllMail();
              if (object.code != null) message.code = object.code | 0;
              if (object.mails) {
                if (!Array.isArray(object.mails)) throw TypeError(".m_proto.ResReadAllMail.mails: array expected");
                message.mails = [];
                for (var i = 0; i < object.mails.length; ++i) {
                  if (typeof object.mails[i] !== "object") throw TypeError(".m_proto.ResReadAllMail.mails: object expected");
                  message.mails[i] = $root.m_proto.BriefMail.fromObject(object.mails[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResReadAllMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {m_proto.ResReadAllMail} message ResReadAllMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResReadAllMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.mails = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mails && message.mails.length) {
                object.mails = [];
                for (var j = 0; j < message.mails.length; ++j) object.mails[j] = $root.m_proto.BriefMail.toObject(message.mails[j], options);
              }
              return object;
            }; /**
               * Converts this ResReadAllMail to JSON.
               * @function toJSON
               * @memberof m_proto.ResReadAllMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResReadAllMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResReadAllMail
               * @function getTypeUrl
               * @memberof m_proto.ResReadAllMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResReadAllMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResReadAllMail";
            };
            return ResReadAllMail;
          }();
          m_proto.BriefMail = function () {
            /**
            * Properties of a BriefMail.
            * @memberof m_proto
            * @interface IBriefMail
            * @property {number|null} [mail_id] BriefMail mail_id
            * @property {number|null} [status] BriefMail status
            * @property {number|null} [receive] BriefMail receive
            */ /**
               * Constructs a new BriefMail.
               * @memberof m_proto
               * @classdesc Represents a BriefMail.
               * @implements IBriefMail
               * @constructor
               * @param {m_proto.IBriefMail=} [properties] Properties to set
               */
            function BriefMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * BriefMail mail_id.
              * @member {number} mail_id
              * @memberof m_proto.BriefMail
              * @instance
              */
            BriefMail.prototype.mail_id = 0; /**
                                             * BriefMail status.
                                             * @member {number} status
                                             * @memberof m_proto.BriefMail
                                             * @instance
                                             */
            BriefMail.prototype.status = 0; /**
                                            * BriefMail receive.
                                            * @member {number} receive
                                            * @memberof m_proto.BriefMail
                                            * @instance
                                            */
            BriefMail.prototype.receive = 0; /**
                                             * Creates a new BriefMail instance using the specified properties.
                                             * @function create
                                             * @memberof m_proto.BriefMail
                                             * @static
                                             * @param {m_proto.IBriefMail=} [properties] Properties to set
                                             * @returns {m_proto.BriefMail} BriefMail instance
                                             */
            BriefMail.create = function create(properties) {
              return new BriefMail(properties);
            }; /**
               * Encodes the specified BriefMail message. Does not implicitly {@link m_proto.BriefMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.BriefMail
               * @static
               * @param {m_proto.IBriefMail} message BriefMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BriefMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.mail_id);
              if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.status);
              if (message.receive != null && Object.hasOwnProperty.call(message, "receive")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.receive);
              return writer;
            }; /**
               * Encodes the specified BriefMail message, length delimited. Does not implicitly {@link m_proto.BriefMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.BriefMail
               * @static
               * @param {m_proto.IBriefMail} message BriefMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BriefMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a BriefMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.BriefMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.BriefMail} BriefMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BriefMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.BriefMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.status = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.receive = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a BriefMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.BriefMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.BriefMail} BriefMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BriefMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a BriefMail message.
               * @function verify
               * @memberof m_proto.BriefMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            BriefMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              if (message.status != null && message.hasOwnProperty("status")) if (!$util.isInteger(message.status)) return "status: integer expected";
              if (message.receive != null && message.hasOwnProperty("receive")) if (!$util.isInteger(message.receive)) return "receive: integer expected";
              return null;
            }; /**
               * Creates a BriefMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.BriefMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.BriefMail} BriefMail
               */
            BriefMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.BriefMail) return object;
              var message = new $root.m_proto.BriefMail();
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              if (object.status != null) message.status = object.status | 0;
              if (object.receive != null) message.receive = object.receive | 0;
              return message;
            }; /**
               * Creates a plain object from a BriefMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.BriefMail
               * @static
               * @param {m_proto.BriefMail} message BriefMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            BriefMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.mail_id = 0;
                object.status = 0;
                object.receive = 0;
              }
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              if (message.status != null && message.hasOwnProperty("status")) object.status = message.status;
              if (message.receive != null && message.hasOwnProperty("receive")) object.receive = message.receive;
              return object;
            }; /**
               * Converts this BriefMail to JSON.
               * @function toJSON
               * @memberof m_proto.BriefMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            BriefMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for BriefMail
               * @function getTypeUrl
               * @memberof m_proto.BriefMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            BriefMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.BriefMail";
            };
            return BriefMail;
          }();
          m_proto.ReqDelMail = function () {
            /**
            * Properties of a ReqDelMail.
            * @memberof m_proto
            * @interface IReqDelMail
            * @property {number|null} [mail_id] ReqDelMail mail_id
            */ /**
               * Constructs a new ReqDelMail.
               * @memberof m_proto
               * @classdesc Represents a ReqDelMail.
               * @implements IReqDelMail
               * @constructor
               * @param {m_proto.IReqDelMail=} [properties] Properties to set
               */
            function ReqDelMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqDelMail mail_id.
              * @member {number} mail_id
              * @memberof m_proto.ReqDelMail
              * @instance
              */
            ReqDelMail.prototype.mail_id = 0; /**
                                              * Creates a new ReqDelMail instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ReqDelMail
                                              * @static
                                              * @param {m_proto.IReqDelMail=} [properties] Properties to set
                                              * @returns {m_proto.ReqDelMail} ReqDelMail instance
                                              */
            ReqDelMail.create = function create(properties) {
              return new ReqDelMail(properties);
            }; /**
               * Encodes the specified ReqDelMail message. Does not implicitly {@link m_proto.ReqDelMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {m_proto.IReqDelMail} message ReqDelMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDelMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.mail_id);
              return writer;
            }; /**
               * Encodes the specified ReqDelMail message, length delimited. Does not implicitly {@link m_proto.ReqDelMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {m_proto.IReqDelMail} message ReqDelMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDelMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqDelMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqDelMail} ReqDelMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDelMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqDelMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqDelMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqDelMail} ReqDelMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDelMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqDelMail message.
               * @function verify
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqDelMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              return null;
            }; /**
               * Creates a ReqDelMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqDelMail} ReqDelMail
               */
            ReqDelMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqDelMail) return object;
              var message = new $root.m_proto.ReqDelMail();
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqDelMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {m_proto.ReqDelMail} message ReqDelMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqDelMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.mail_id = 0;
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              return object;
            }; /**
               * Converts this ReqDelMail to JSON.
               * @function toJSON
               * @memberof m_proto.ReqDelMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqDelMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqDelMail
               * @function getTypeUrl
               * @memberof m_proto.ReqDelMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqDelMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqDelMail";
            };
            return ReqDelMail;
          }();
          m_proto.ResDelMail = function () {
            /**
            * Properties of a ResDelMail.
            * @memberof m_proto
            * @interface IResDelMail
            * @property {number|null} [code] ResDelMail code
            * @property {number|null} [mail_id] ResDelMail mail_id
            */ /**
               * Constructs a new ResDelMail.
               * @memberof m_proto
               * @classdesc Represents a ResDelMail.
               * @implements IResDelMail
               * @constructor
               * @param {m_proto.IResDelMail=} [properties] Properties to set
               */
            function ResDelMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResDelMail code.
              * @member {number} code
              * @memberof m_proto.ResDelMail
              * @instance
              */
            ResDelMail.prototype.code = 0; /**
                                           * ResDelMail mail_id.
                                           * @member {number} mail_id
                                           * @memberof m_proto.ResDelMail
                                           * @instance
                                           */
            ResDelMail.prototype.mail_id = 0; /**
                                              * Creates a new ResDelMail instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ResDelMail
                                              * @static
                                              * @param {m_proto.IResDelMail=} [properties] Properties to set
                                              * @returns {m_proto.ResDelMail} ResDelMail instance
                                              */
            ResDelMail.create = function create(properties) {
              return new ResDelMail(properties);
            }; /**
               * Encodes the specified ResDelMail message. Does not implicitly {@link m_proto.ResDelMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResDelMail
               * @static
               * @param {m_proto.IResDelMail} message ResDelMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDelMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mail_id != null && Object.hasOwnProperty.call(message, "mail_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.mail_id);
              return writer;
            }; /**
               * Encodes the specified ResDelMail message, length delimited. Does not implicitly {@link m_proto.ResDelMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResDelMail
               * @static
               * @param {m_proto.IResDelMail} message ResDelMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDelMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResDelMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResDelMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResDelMail} ResDelMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDelMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResDelMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.mail_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResDelMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResDelMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResDelMail} ResDelMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDelMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResDelMail message.
               * @function verify
               * @memberof m_proto.ResDelMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResDelMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) if (!$util.isInteger(message.mail_id)) return "mail_id: integer expected";
              return null;
            }; /**
               * Creates a ResDelMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResDelMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResDelMail} ResDelMail
               */
            ResDelMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResDelMail) return object;
              var message = new $root.m_proto.ResDelMail();
              if (object.code != null) message.code = object.code | 0;
              if (object.mail_id != null) message.mail_id = object.mail_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResDelMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResDelMail
               * @static
               * @param {m_proto.ResDelMail} message ResDelMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResDelMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.mail_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mail_id != null && message.hasOwnProperty("mail_id")) object.mail_id = message.mail_id;
              return object;
            }; /**
               * Converts this ResDelMail to JSON.
               * @function toJSON
               * @memberof m_proto.ResDelMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResDelMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResDelMail
               * @function getTypeUrl
               * @memberof m_proto.ResDelMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResDelMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResDelMail";
            };
            return ResDelMail;
          }();
          m_proto.ReqDelReadAllMail = function () {
            /**
            * Properties of a ReqDelReadAllMail.
            * @memberof m_proto
            * @interface IReqDelReadAllMail
            */ /**
               * Constructs a new ReqDelReadAllMail.
               * @memberof m_proto
               * @classdesc Represents a ReqDelReadAllMail.
               * @implements IReqDelReadAllMail
               * @constructor
               * @param {m_proto.IReqDelReadAllMail=} [properties] Properties to set
               */
            function ReqDelReadAllMail(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * Creates a new ReqDelReadAllMail instance using the specified properties.
              * @function create
              * @memberof m_proto.ReqDelReadAllMail
              * @static
              * @param {m_proto.IReqDelReadAllMail=} [properties] Properties to set
              * @returns {m_proto.ReqDelReadAllMail} ReqDelReadAllMail instance
              */
            ReqDelReadAllMail.create = function create(properties) {
              return new ReqDelReadAllMail(properties);
            }; /**
               * Encodes the specified ReqDelReadAllMail message. Does not implicitly {@link m_proto.ReqDelReadAllMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {m_proto.IReqDelReadAllMail} message ReqDelReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDelReadAllMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              return writer;
            }; /**
               * Encodes the specified ReqDelReadAllMail message, length delimited. Does not implicitly {@link m_proto.ReqDelReadAllMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {m_proto.IReqDelReadAllMail} message ReqDelReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDelReadAllMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqDelReadAllMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqDelReadAllMail} ReqDelReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDelReadAllMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqDelReadAllMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqDelReadAllMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqDelReadAllMail} ReqDelReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDelReadAllMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqDelReadAllMail message.
               * @function verify
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqDelReadAllMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              return null;
            }; /**
               * Creates a ReqDelReadAllMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqDelReadAllMail} ReqDelReadAllMail
               */
            ReqDelReadAllMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqDelReadAllMail) return object;
              return new $root.m_proto.ReqDelReadAllMail();
            }; /**
               * Creates a plain object from a ReqDelReadAllMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {m_proto.ReqDelReadAllMail} message ReqDelReadAllMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqDelReadAllMail.toObject = function toObject() {
              return {};
            }; /**
               * Converts this ReqDelReadAllMail to JSON.
               * @function toJSON
               * @memberof m_proto.ReqDelReadAllMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqDelReadAllMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqDelReadAllMail
               * @function getTypeUrl
               * @memberof m_proto.ReqDelReadAllMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqDelReadAllMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqDelReadAllMail";
            };
            return ReqDelReadAllMail;
          }();
          m_proto.ResDelReadAllMail = function () {
            /**
            * Properties of a ResDelReadAllMail.
            * @memberof m_proto
            * @interface IResDelReadAllMail
            * @property {number|null} [code] ResDelReadAllMail code
            * @property {Array.<number>|null} [mail_ids] ResDelReadAllMail mail_ids
            */ /**
               * Constructs a new ResDelReadAllMail.
               * @memberof m_proto
               * @classdesc Represents a ResDelReadAllMail.
               * @implements IResDelReadAllMail
               * @constructor
               * @param {m_proto.IResDelReadAllMail=} [properties] Properties to set
               */
            function ResDelReadAllMail(properties) {
              this.mail_ids = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResDelReadAllMail code.
              * @member {number} code
              * @memberof m_proto.ResDelReadAllMail
              * @instance
              */
            ResDelReadAllMail.prototype.code = 0; /**
                                                  * ResDelReadAllMail mail_ids.
                                                  * @member {Array.<number>} mail_ids
                                                  * @memberof m_proto.ResDelReadAllMail
                                                  * @instance
                                                  */
            ResDelReadAllMail.prototype.mail_ids = $util.emptyArray; /**
                                                                     * Creates a new ResDelReadAllMail instance using the specified properties.
                                                                     * @function create
                                                                     * @memberof m_proto.ResDelReadAllMail
                                                                     * @static
                                                                     * @param {m_proto.IResDelReadAllMail=} [properties] Properties to set
                                                                     * @returns {m_proto.ResDelReadAllMail} ResDelReadAllMail instance
                                                                     */
            ResDelReadAllMail.create = function create(properties) {
              return new ResDelReadAllMail(properties);
            }; /**
               * Encodes the specified ResDelReadAllMail message. Does not implicitly {@link m_proto.ResDelReadAllMail.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {m_proto.IResDelReadAllMail} message ResDelReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDelReadAllMail.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mail_ids != null && message.mail_ids.length) {
                writer.uint32( /* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.mail_ids.length; ++i) writer.int32(message.mail_ids[i]);
                writer.ldelim();
              }
              return writer;
            }; /**
               * Encodes the specified ResDelReadAllMail message, length delimited. Does not implicitly {@link m_proto.ResDelReadAllMail.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {m_proto.IResDelReadAllMail} message ResDelReadAllMail message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDelReadAllMail.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResDelReadAllMail message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResDelReadAllMail} ResDelReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDelReadAllMail.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResDelReadAllMail();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.mail_ids && message.mail_ids.length)) message.mail_ids = [];
                      if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) message.mail_ids.push(reader.int32());
                      } else message.mail_ids.push(reader.int32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResDelReadAllMail message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResDelReadAllMail} ResDelReadAllMail
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDelReadAllMail.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResDelReadAllMail message.
               * @function verify
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResDelReadAllMail.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mail_ids != null && message.hasOwnProperty("mail_ids")) {
                if (!Array.isArray(message.mail_ids)) return "mail_ids: array expected";
                for (var i = 0; i < message.mail_ids.length; ++i) if (!$util.isInteger(message.mail_ids[i])) return "mail_ids: integer[] expected";
              }
              return null;
            }; /**
               * Creates a ResDelReadAllMail message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResDelReadAllMail} ResDelReadAllMail
               */
            ResDelReadAllMail.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResDelReadAllMail) return object;
              var message = new $root.m_proto.ResDelReadAllMail();
              if (object.code != null) message.code = object.code | 0;
              if (object.mail_ids) {
                if (!Array.isArray(object.mail_ids)) throw TypeError(".m_proto.ResDelReadAllMail.mail_ids: array expected");
                message.mail_ids = [];
                for (var i = 0; i < object.mail_ids.length; ++i) message.mail_ids[i] = object.mail_ids[i] | 0;
              }
              return message;
            }; /**
               * Creates a plain object from a ResDelReadAllMail message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {m_proto.ResDelReadAllMail} message ResDelReadAllMail
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResDelReadAllMail.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.mail_ids = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mail_ids && message.mail_ids.length) {
                object.mail_ids = [];
                for (var j = 0; j < message.mail_ids.length; ++j) object.mail_ids[j] = message.mail_ids[j];
              }
              return object;
            }; /**
               * Converts this ResDelReadAllMail to JSON.
               * @function toJSON
               * @memberof m_proto.ResDelReadAllMail
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResDelReadAllMail.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResDelReadAllMail
               * @function getTypeUrl
               * @memberof m_proto.ResDelReadAllMail
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResDelReadAllMail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResDelReadAllMail";
            };
            return ResDelReadAllMail;
          }();
          m_proto.ResNewMailNotify = function () {
            /**
            * Properties of a ResNewMailNotify.
            * @memberof m_proto
            * @interface IResNewMailNotify
            * @property {number|null} [code] ResNewMailNotify code
            * @property {m_proto.IMail|null} [mail] ResNewMailNotify mail
            */ /**
               * Constructs a new ResNewMailNotify.
               * @memberof m_proto
               * @classdesc Represents a ResNewMailNotify.
               * @implements IResNewMailNotify
               * @constructor
               * @param {m_proto.IResNewMailNotify=} [properties] Properties to set
               */
            function ResNewMailNotify(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResNewMailNotify code.
              * @member {number} code
              * @memberof m_proto.ResNewMailNotify
              * @instance
              */
            ResNewMailNotify.prototype.code = 0; /**
                                                 * ResNewMailNotify mail.
                                                 * @member {m_proto.IMail|null|undefined} mail
                                                 * @memberof m_proto.ResNewMailNotify
                                                 * @instance
                                                 */
            ResNewMailNotify.prototype.mail = null; /**
                                                    * Creates a new ResNewMailNotify instance using the specified properties.
                                                    * @function create
                                                    * @memberof m_proto.ResNewMailNotify
                                                    * @static
                                                    * @param {m_proto.IResNewMailNotify=} [properties] Properties to set
                                                    * @returns {m_proto.ResNewMailNotify} ResNewMailNotify instance
                                                    */
            ResNewMailNotify.create = function create(properties) {
              return new ResNewMailNotify(properties);
            }; /**
               * Encodes the specified ResNewMailNotify message. Does not implicitly {@link m_proto.ResNewMailNotify.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {m_proto.IResNewMailNotify} message ResNewMailNotify message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResNewMailNotify.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.mail != null && Object.hasOwnProperty.call(message, "mail")) $root.m_proto.Mail.encode(message.mail, writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResNewMailNotify message, length delimited. Does not implicitly {@link m_proto.ResNewMailNotify.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {m_proto.IResNewMailNotify} message ResNewMailNotify message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResNewMailNotify.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResNewMailNotify message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResNewMailNotify} ResNewMailNotify
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResNewMailNotify.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResNewMailNotify();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.mail = $root.m_proto.Mail.decode(reader, reader.uint32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResNewMailNotify message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResNewMailNotify} ResNewMailNotify
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResNewMailNotify.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResNewMailNotify message.
               * @function verify
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResNewMailNotify.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.mail != null && message.hasOwnProperty("mail")) {
                var error = $root.m_proto.Mail.verify(message.mail);
                if (error) return "mail." + error;
              }
              return null;
            }; /**
               * Creates a ResNewMailNotify message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResNewMailNotify} ResNewMailNotify
               */
            ResNewMailNotify.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResNewMailNotify) return object;
              var message = new $root.m_proto.ResNewMailNotify();
              if (object.code != null) message.code = object.code | 0;
              if (object.mail != null) {
                if (typeof object.mail !== "object") throw TypeError(".m_proto.ResNewMailNotify.mail: object expected");
                message.mail = $root.m_proto.Mail.fromObject(object.mail);
              }
              return message;
            }; /**
               * Creates a plain object from a ResNewMailNotify message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {m_proto.ResNewMailNotify} message ResNewMailNotify
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResNewMailNotify.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.mail = null;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.mail != null && message.hasOwnProperty("mail")) object.mail = $root.m_proto.Mail.toObject(message.mail, options);
              return object;
            }; /**
               * Converts this ResNewMailNotify to JSON.
               * @function toJSON
               * @memberof m_proto.ResNewMailNotify
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResNewMailNotify.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResNewMailNotify
               * @function getTypeUrl
               * @memberof m_proto.ResNewMailNotify
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResNewMailNotify.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResNewMailNotify";
            };
            return ResNewMailNotify;
          }();
          m_proto.ReqGMExecute = function () {
            /**
            * Properties of a ReqGMExecute.
            * @memberof m_proto
            * @interface IReqGMExecute
            * @property {number|null} [gm_type] ReqGMExecute gm_type
            * @property {string|null} [params] ReqGMExecute params
            * @property {number|null} [gm_level] ReqGMExecute gm_level
            */ /**
               * Constructs a new ReqGMExecute.
               * @memberof m_proto
               * @classdesc Represents a ReqGMExecute.
               * @implements IReqGMExecute
               * @constructor
               * @param {m_proto.IReqGMExecute=} [properties] Properties to set
               */
            function ReqGMExecute(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqGMExecute gm_type.
              * @member {number} gm_type
              * @memberof m_proto.ReqGMExecute
              * @instance
              */
            ReqGMExecute.prototype.gm_type = 0; /**
                                                * ReqGMExecute params.
                                                * @member {string} params
                                                * @memberof m_proto.ReqGMExecute
                                                * @instance
                                                */
            ReqGMExecute.prototype.params = ""; /**
                                                * ReqGMExecute gm_level.
                                                * @member {number} gm_level
                                                * @memberof m_proto.ReqGMExecute
                                                * @instance
                                                */
            ReqGMExecute.prototype.gm_level = 0; /**
                                                 * Creates a new ReqGMExecute instance using the specified properties.
                                                 * @function create
                                                 * @memberof m_proto.ReqGMExecute
                                                 * @static
                                                 * @param {m_proto.IReqGMExecute=} [properties] Properties to set
                                                 * @returns {m_proto.ReqGMExecute} ReqGMExecute instance
                                                 */
            ReqGMExecute.create = function create(properties) {
              return new ReqGMExecute(properties);
            }; /**
               * Encodes the specified ReqGMExecute message. Does not implicitly {@link m_proto.ReqGMExecute.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {m_proto.IReqGMExecute} message ReqGMExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGMExecute.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.gm_type != null && Object.hasOwnProperty.call(message, "gm_type")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.gm_type);
              if (message.params != null && Object.hasOwnProperty.call(message, "params")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.params);
              if (message.gm_level != null && Object.hasOwnProperty.call(message, "gm_level")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.gm_level);
              return writer;
            }; /**
               * Encodes the specified ReqGMExecute message, length delimited. Does not implicitly {@link m_proto.ReqGMExecute.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {m_proto.IReqGMExecute} message ReqGMExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGMExecute.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqGMExecute message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqGMExecute} ReqGMExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGMExecute.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqGMExecute();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.gm_type = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.params = reader.string();
                      break;
                    }
                  case 3:
                    {
                      message.gm_level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqGMExecute message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqGMExecute} ReqGMExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGMExecute.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqGMExecute message.
               * @function verify
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqGMExecute.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.gm_type != null && message.hasOwnProperty("gm_type")) if (!$util.isInteger(message.gm_type)) return "gm_type: integer expected";
              if (message.params != null && message.hasOwnProperty("params")) if (!$util.isString(message.params)) return "params: string expected";
              if (message.gm_level != null && message.hasOwnProperty("gm_level")) if (!$util.isInteger(message.gm_level)) return "gm_level: integer expected";
              return null;
            }; /**
               * Creates a ReqGMExecute message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqGMExecute} ReqGMExecute
               */
            ReqGMExecute.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqGMExecute) return object;
              var message = new $root.m_proto.ReqGMExecute();
              if (object.gm_type != null) message.gm_type = object.gm_type | 0;
              if (object.params != null) message.params = String(object.params);
              if (object.gm_level != null) message.gm_level = object.gm_level | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqGMExecute message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {m_proto.ReqGMExecute} message ReqGMExecute
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqGMExecute.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.gm_type = 0;
                object.params = "";
                object.gm_level = 0;
              }
              if (message.gm_type != null && message.hasOwnProperty("gm_type")) object.gm_type = message.gm_type;
              if (message.params != null && message.hasOwnProperty("params")) object.params = message.params;
              if (message.gm_level != null && message.hasOwnProperty("gm_level")) object.gm_level = message.gm_level;
              return object;
            }; /**
               * Converts this ReqGMExecute to JSON.
               * @function toJSON
               * @memberof m_proto.ReqGMExecute
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqGMExecute.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqGMExecute
               * @function getTypeUrl
               * @memberof m_proto.ReqGMExecute
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqGMExecute.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqGMExecute";
            };
            return ReqGMExecute;
          }();
          m_proto.ResGMExecute = function () {
            /**
            * Properties of a ResGMExecute.
            * @memberof m_proto
            * @interface IResGMExecute
            * @property {number|null} [code] ResGMExecute code
            * @property {number|null} [gm_type] ResGMExecute gm_type
            * @property {string|null} [result] ResGMExecute result
            */ /**
               * Constructs a new ResGMExecute.
               * @memberof m_proto
               * @classdesc Represents a ResGMExecute.
               * @implements IResGMExecute
               * @constructor
               * @param {m_proto.IResGMExecute=} [properties] Properties to set
               */
            function ResGMExecute(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGMExecute code.
              * @member {number} code
              * @memberof m_proto.ResGMExecute
              * @instance
              */
            ResGMExecute.prototype.code = 0; /**
                                             * ResGMExecute gm_type.
                                             * @member {number} gm_type
                                             * @memberof m_proto.ResGMExecute
                                             * @instance
                                             */
            ResGMExecute.prototype.gm_type = 0; /**
                                                * ResGMExecute result.
                                                * @member {string} result
                                                * @memberof m_proto.ResGMExecute
                                                * @instance
                                                */
            ResGMExecute.prototype.result = ""; /**
                                                * Creates a new ResGMExecute instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ResGMExecute
                                                * @static
                                                * @param {m_proto.IResGMExecute=} [properties] Properties to set
                                                * @returns {m_proto.ResGMExecute} ResGMExecute instance
                                                */
            ResGMExecute.create = function create(properties) {
              return new ResGMExecute(properties);
            }; /**
               * Encodes the specified ResGMExecute message. Does not implicitly {@link m_proto.ResGMExecute.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {m_proto.IResGMExecute} message ResGMExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGMExecute.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.gm_type != null && Object.hasOwnProperty.call(message, "gm_type")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.gm_type);
              if (message.result != null && Object.hasOwnProperty.call(message, "result")) writer.uint32( /* id 3, wireType 2 =*/26).string(message.result);
              return writer;
            }; /**
               * Encodes the specified ResGMExecute message, length delimited. Does not implicitly {@link m_proto.ResGMExecute.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {m_proto.IResGMExecute} message ResGMExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGMExecute.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGMExecute message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGMExecute} ResGMExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGMExecute.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGMExecute();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.gm_type = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.result = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGMExecute message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGMExecute} ResGMExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGMExecute.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGMExecute message.
               * @function verify
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGMExecute.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.gm_type != null && message.hasOwnProperty("gm_type")) if (!$util.isInteger(message.gm_type)) return "gm_type: integer expected";
              if (message.result != null && message.hasOwnProperty("result")) if (!$util.isString(message.result)) return "result: string expected";
              return null;
            }; /**
               * Creates a ResGMExecute message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGMExecute} ResGMExecute
               */
            ResGMExecute.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGMExecute) return object;
              var message = new $root.m_proto.ResGMExecute();
              if (object.code != null) message.code = object.code | 0;
              if (object.gm_type != null) message.gm_type = object.gm_type | 0;
              if (object.result != null) message.result = String(object.result);
              return message;
            }; /**
               * Creates a plain object from a ResGMExecute message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {m_proto.ResGMExecute} message ResGMExecute
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGMExecute.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.gm_type = 0;
                object.result = "";
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.gm_type != null && message.hasOwnProperty("gm_type")) object.gm_type = message.gm_type;
              if (message.result != null && message.hasOwnProperty("result")) object.result = message.result;
              return object;
            }; /**
               * Converts this ResGMExecute to JSON.
               * @function toJSON
               * @memberof m_proto.ResGMExecute
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGMExecute.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGMExecute
               * @function getTypeUrl
               * @memberof m_proto.ResGMExecute
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGMExecute.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGMExecute";
            };
            return ResGMExecute;
          }();
          m_proto.ReqGMBatchExecute = function () {
            /**
            * Properties of a ReqGMBatchExecute.
            * @memberof m_proto
            * @interface IReqGMBatchExecute
            * @property {string|null} [commands] ReqGMBatchExecute commands
            * @property {number|null} [gm_level] ReqGMBatchExecute gm_level
            */ /**
               * Constructs a new ReqGMBatchExecute.
               * @memberof m_proto
               * @classdesc Represents a ReqGMBatchExecute.
               * @implements IReqGMBatchExecute
               * @constructor
               * @param {m_proto.IReqGMBatchExecute=} [properties] Properties to set
               */
            function ReqGMBatchExecute(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqGMBatchExecute commands.
              * @member {string} commands
              * @memberof m_proto.ReqGMBatchExecute
              * @instance
              */
            ReqGMBatchExecute.prototype.commands = ""; /**
                                                       * ReqGMBatchExecute gm_level.
                                                       * @member {number} gm_level
                                                       * @memberof m_proto.ReqGMBatchExecute
                                                       * @instance
                                                       */
            ReqGMBatchExecute.prototype.gm_level = 0; /**
                                                      * Creates a new ReqGMBatchExecute instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ReqGMBatchExecute
                                                      * @static
                                                      * @param {m_proto.IReqGMBatchExecute=} [properties] Properties to set
                                                      * @returns {m_proto.ReqGMBatchExecute} ReqGMBatchExecute instance
                                                      */
            ReqGMBatchExecute.create = function create(properties) {
              return new ReqGMBatchExecute(properties);
            }; /**
               * Encodes the specified ReqGMBatchExecute message. Does not implicitly {@link m_proto.ReqGMBatchExecute.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {m_proto.IReqGMBatchExecute} message ReqGMBatchExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGMBatchExecute.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.commands != null && Object.hasOwnProperty.call(message, "commands")) writer.uint32( /* id 1, wireType 2 =*/10).string(message.commands);
              if (message.gm_level != null && Object.hasOwnProperty.call(message, "gm_level")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.gm_level);
              return writer;
            }; /**
               * Encodes the specified ReqGMBatchExecute message, length delimited. Does not implicitly {@link m_proto.ReqGMBatchExecute.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {m_proto.IReqGMBatchExecute} message ReqGMBatchExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGMBatchExecute.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqGMBatchExecute message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqGMBatchExecute} ReqGMBatchExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGMBatchExecute.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqGMBatchExecute();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.commands = reader.string();
                      break;
                    }
                  case 2:
                    {
                      message.gm_level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqGMBatchExecute message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqGMBatchExecute} ReqGMBatchExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGMBatchExecute.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqGMBatchExecute message.
               * @function verify
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqGMBatchExecute.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.commands != null && message.hasOwnProperty("commands")) if (!$util.isString(message.commands)) return "commands: string expected";
              if (message.gm_level != null && message.hasOwnProperty("gm_level")) if (!$util.isInteger(message.gm_level)) return "gm_level: integer expected";
              return null;
            }; /**
               * Creates a ReqGMBatchExecute message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqGMBatchExecute} ReqGMBatchExecute
               */
            ReqGMBatchExecute.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqGMBatchExecute) return object;
              var message = new $root.m_proto.ReqGMBatchExecute();
              if (object.commands != null) message.commands = String(object.commands);
              if (object.gm_level != null) message.gm_level = object.gm_level | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqGMBatchExecute message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {m_proto.ReqGMBatchExecute} message ReqGMBatchExecute
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqGMBatchExecute.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.commands = "";
                object.gm_level = 0;
              }
              if (message.commands != null && message.hasOwnProperty("commands")) object.commands = message.commands;
              if (message.gm_level != null && message.hasOwnProperty("gm_level")) object.gm_level = message.gm_level;
              return object;
            }; /**
               * Converts this ReqGMBatchExecute to JSON.
               * @function toJSON
               * @memberof m_proto.ReqGMBatchExecute
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqGMBatchExecute.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqGMBatchExecute
               * @function getTypeUrl
               * @memberof m_proto.ReqGMBatchExecute
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqGMBatchExecute.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqGMBatchExecute";
            };
            return ReqGMBatchExecute;
          }();
          m_proto.ResGMBatchExecute = function () {
            /**
            * Properties of a ResGMBatchExecute.
            * @memberof m_proto
            * @interface IResGMBatchExecute
            * @property {number|null} [code] ResGMBatchExecute code
            * @property {string|null} [results] ResGMBatchExecute results
            */ /**
               * Constructs a new ResGMBatchExecute.
               * @memberof m_proto
               * @classdesc Represents a ResGMBatchExecute.
               * @implements IResGMBatchExecute
               * @constructor
               * @param {m_proto.IResGMBatchExecute=} [properties] Properties to set
               */
            function ResGMBatchExecute(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGMBatchExecute code.
              * @member {number} code
              * @memberof m_proto.ResGMBatchExecute
              * @instance
              */
            ResGMBatchExecute.prototype.code = 0; /**
                                                  * ResGMBatchExecute results.
                                                  * @member {string} results
                                                  * @memberof m_proto.ResGMBatchExecute
                                                  * @instance
                                                  */
            ResGMBatchExecute.prototype.results = ""; /**
                                                      * Creates a new ResGMBatchExecute instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ResGMBatchExecute
                                                      * @static
                                                      * @param {m_proto.IResGMBatchExecute=} [properties] Properties to set
                                                      * @returns {m_proto.ResGMBatchExecute} ResGMBatchExecute instance
                                                      */
            ResGMBatchExecute.create = function create(properties) {
              return new ResGMBatchExecute(properties);
            }; /**
               * Encodes the specified ResGMBatchExecute message. Does not implicitly {@link m_proto.ResGMBatchExecute.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {m_proto.IResGMBatchExecute} message ResGMBatchExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGMBatchExecute.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.results != null && Object.hasOwnProperty.call(message, "results")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.results);
              return writer;
            }; /**
               * Encodes the specified ResGMBatchExecute message, length delimited. Does not implicitly {@link m_proto.ResGMBatchExecute.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {m_proto.IResGMBatchExecute} message ResGMBatchExecute message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGMBatchExecute.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGMBatchExecute message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGMBatchExecute} ResGMBatchExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGMBatchExecute.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGMBatchExecute();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.results = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGMBatchExecute message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGMBatchExecute} ResGMBatchExecute
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGMBatchExecute.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGMBatchExecute message.
               * @function verify
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGMBatchExecute.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.results != null && message.hasOwnProperty("results")) if (!$util.isString(message.results)) return "results: string expected";
              return null;
            }; /**
               * Creates a ResGMBatchExecute message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGMBatchExecute} ResGMBatchExecute
               */
            ResGMBatchExecute.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGMBatchExecute) return object;
              var message = new $root.m_proto.ResGMBatchExecute();
              if (object.code != null) message.code = object.code | 0;
              if (object.results != null) message.results = String(object.results);
              return message;
            }; /**
               * Creates a plain object from a ResGMBatchExecute message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {m_proto.ResGMBatchExecute} message ResGMBatchExecute
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGMBatchExecute.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.results = "";
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.results != null && message.hasOwnProperty("results")) object.results = message.results;
              return object;
            }; /**
               * Converts this ResGMBatchExecute to JSON.
               * @function toJSON
               * @memberof m_proto.ResGMBatchExecute
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGMBatchExecute.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGMBatchExecute
               * @function getTypeUrl
               * @memberof m_proto.ResGMBatchExecute
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGMBatchExecute.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGMBatchExecute";
            };
            return ResGMBatchExecute;
          }();
          m_proto.ReqGMCommandList = function () {
            /**
            * Properties of a ReqGMCommandList.
            * @memberof m_proto
            * @interface IReqGMCommandList
            * @property {number|null} [gm_level] ReqGMCommandList gm_level
            */ /**
               * Constructs a new ReqGMCommandList.
               * @memberof m_proto
               * @classdesc Represents a ReqGMCommandList.
               * @implements IReqGMCommandList
               * @constructor
               * @param {m_proto.IReqGMCommandList=} [properties] Properties to set
               */
            function ReqGMCommandList(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqGMCommandList gm_level.
              * @member {number} gm_level
              * @memberof m_proto.ReqGMCommandList
              * @instance
              */
            ReqGMCommandList.prototype.gm_level = 0; /**
                                                     * Creates a new ReqGMCommandList instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ReqGMCommandList
                                                     * @static
                                                     * @param {m_proto.IReqGMCommandList=} [properties] Properties to set
                                                     * @returns {m_proto.ReqGMCommandList} ReqGMCommandList instance
                                                     */
            ReqGMCommandList.create = function create(properties) {
              return new ReqGMCommandList(properties);
            }; /**
               * Encodes the specified ReqGMCommandList message. Does not implicitly {@link m_proto.ReqGMCommandList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {m_proto.IReqGMCommandList} message ReqGMCommandList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGMCommandList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.gm_level != null && Object.hasOwnProperty.call(message, "gm_level")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.gm_level);
              return writer;
            }; /**
               * Encodes the specified ReqGMCommandList message, length delimited. Does not implicitly {@link m_proto.ReqGMCommandList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {m_proto.IReqGMCommandList} message ReqGMCommandList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqGMCommandList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqGMCommandList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqGMCommandList} ReqGMCommandList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGMCommandList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqGMCommandList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.gm_level = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqGMCommandList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqGMCommandList} ReqGMCommandList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqGMCommandList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqGMCommandList message.
               * @function verify
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqGMCommandList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.gm_level != null && message.hasOwnProperty("gm_level")) if (!$util.isInteger(message.gm_level)) return "gm_level: integer expected";
              return null;
            }; /**
               * Creates a ReqGMCommandList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqGMCommandList} ReqGMCommandList
               */
            ReqGMCommandList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqGMCommandList) return object;
              var message = new $root.m_proto.ReqGMCommandList();
              if (object.gm_level != null) message.gm_level = object.gm_level | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqGMCommandList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {m_proto.ReqGMCommandList} message ReqGMCommandList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqGMCommandList.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.gm_level = 0;
              if (message.gm_level != null && message.hasOwnProperty("gm_level")) object.gm_level = message.gm_level;
              return object;
            }; /**
               * Converts this ReqGMCommandList to JSON.
               * @function toJSON
               * @memberof m_proto.ReqGMCommandList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqGMCommandList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqGMCommandList
               * @function getTypeUrl
               * @memberof m_proto.ReqGMCommandList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqGMCommandList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqGMCommandList";
            };
            return ReqGMCommandList;
          }();
          m_proto.ResGMCommandList = function () {
            /**
            * Properties of a ResGMCommandList.
            * @memberof m_proto
            * @interface IResGMCommandList
            * @property {number|null} [code] ResGMCommandList code
            * @property {string|null} [commands] ResGMCommandList commands
            */ /**
               * Constructs a new ResGMCommandList.
               * @memberof m_proto
               * @classdesc Represents a ResGMCommandList.
               * @implements IResGMCommandList
               * @constructor
               * @param {m_proto.IResGMCommandList=} [properties] Properties to set
               */
            function ResGMCommandList(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResGMCommandList code.
              * @member {number} code
              * @memberof m_proto.ResGMCommandList
              * @instance
              */
            ResGMCommandList.prototype.code = 0; /**
                                                 * ResGMCommandList commands.
                                                 * @member {string} commands
                                                 * @memberof m_proto.ResGMCommandList
                                                 * @instance
                                                 */
            ResGMCommandList.prototype.commands = ""; /**
                                                      * Creates a new ResGMCommandList instance using the specified properties.
                                                      * @function create
                                                      * @memberof m_proto.ResGMCommandList
                                                      * @static
                                                      * @param {m_proto.IResGMCommandList=} [properties] Properties to set
                                                      * @returns {m_proto.ResGMCommandList} ResGMCommandList instance
                                                      */
            ResGMCommandList.create = function create(properties) {
              return new ResGMCommandList(properties);
            }; /**
               * Encodes the specified ResGMCommandList message. Does not implicitly {@link m_proto.ResGMCommandList.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {m_proto.IResGMCommandList} message ResGMCommandList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGMCommandList.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.commands != null && Object.hasOwnProperty.call(message, "commands")) writer.uint32( /* id 2, wireType 2 =*/18).string(message.commands);
              return writer;
            }; /**
               * Encodes the specified ResGMCommandList message, length delimited. Does not implicitly {@link m_proto.ResGMCommandList.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {m_proto.IResGMCommandList} message ResGMCommandList message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResGMCommandList.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResGMCommandList message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResGMCommandList} ResGMCommandList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGMCommandList.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResGMCommandList();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.commands = reader.string();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResGMCommandList message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResGMCommandList} ResGMCommandList
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResGMCommandList.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResGMCommandList message.
               * @function verify
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResGMCommandList.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.commands != null && message.hasOwnProperty("commands")) if (!$util.isString(message.commands)) return "commands: string expected";
              return null;
            }; /**
               * Creates a ResGMCommandList message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResGMCommandList} ResGMCommandList
               */
            ResGMCommandList.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResGMCommandList) return object;
              var message = new $root.m_proto.ResGMCommandList();
              if (object.code != null) message.code = object.code | 0;
              if (object.commands != null) message.commands = String(object.commands);
              return message;
            }; /**
               * Creates a plain object from a ResGMCommandList message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {m_proto.ResGMCommandList} message ResGMCommandList
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResGMCommandList.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.commands = "";
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.commands != null && message.hasOwnProperty("commands")) object.commands = message.commands;
              return object;
            }; /**
               * Converts this ResGMCommandList to JSON.
               * @function toJSON
               * @memberof m_proto.ResGMCommandList
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResGMCommandList.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResGMCommandList
               * @function getTypeUrl
               * @memberof m_proto.ResGMCommandList
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResGMCommandList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResGMCommandList";
            };
            return ResGMCommandList;
          }();
          m_proto.ReqChangeEquip = function () {
            /**
            * Properties of a ReqChangeEquip.
            * @memberof m_proto
            * @interface IReqChangeEquip
            * @property {number|null} [equip_uid] ReqChangeEquip equip_uid
            * @property {number|null} [hero_id] ReqChangeEquip hero_id
            * @property {number|null} [pos] ReqChangeEquip pos
            */ /**
               * Constructs a new ReqChangeEquip.
               * @memberof m_proto
               * @classdesc Represents a ReqChangeEquip.
               * @implements IReqChangeEquip
               * @constructor
               * @param {m_proto.IReqChangeEquip=} [properties] Properties to set
               */
            function ReqChangeEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqChangeEquip equip_uid.
              * @member {number} equip_uid
              * @memberof m_proto.ReqChangeEquip
              * @instance
              */
            ReqChangeEquip.prototype.equip_uid = 0; /**
                                                    * ReqChangeEquip hero_id.
                                                    * @member {number} hero_id
                                                    * @memberof m_proto.ReqChangeEquip
                                                    * @instance
                                                    */
            ReqChangeEquip.prototype.hero_id = 0; /**
                                                  * ReqChangeEquip pos.
                                                  * @member {number} pos
                                                  * @memberof m_proto.ReqChangeEquip
                                                  * @instance
                                                  */
            ReqChangeEquip.prototype.pos = 0; /**
                                              * Creates a new ReqChangeEquip instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.ReqChangeEquip
                                              * @static
                                              * @param {m_proto.IReqChangeEquip=} [properties] Properties to set
                                              * @returns {m_proto.ReqChangeEquip} ReqChangeEquip instance
                                              */
            ReqChangeEquip.create = function create(properties) {
              return new ReqChangeEquip(properties);
            }; /**
               * Encodes the specified ReqChangeEquip message. Does not implicitly {@link m_proto.ReqChangeEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {m_proto.IReqChangeEquip} message ReqChangeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqChangeEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.equip_uid);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.pos);
              return writer;
            }; /**
               * Encodes the specified ReqChangeEquip message, length delimited. Does not implicitly {@link m_proto.ReqChangeEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {m_proto.IReqChangeEquip} message ReqChangeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqChangeEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqChangeEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqChangeEquip} ReqChangeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqChangeEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqChangeEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.pos = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqChangeEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqChangeEquip} ReqChangeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqChangeEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqChangeEquip message.
               * @function verify
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqChangeEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos)) return "pos: integer expected";
              return null;
            }; /**
               * Creates a ReqChangeEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqChangeEquip} ReqChangeEquip
               */
            ReqChangeEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqChangeEquip) return object;
              var message = new $root.m_proto.ReqChangeEquip();
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              if (object.pos != null) message.pos = object.pos | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqChangeEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {m_proto.ReqChangeEquip} message ReqChangeEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqChangeEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.equip_uid = 0;
                object.hero_id = 0;
                object.pos = 0;
              }
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              if (message.pos != null && message.hasOwnProperty("pos")) object.pos = message.pos;
              return object;
            }; /**
               * Converts this ReqChangeEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ReqChangeEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqChangeEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqChangeEquip
               * @function getTypeUrl
               * @memberof m_proto.ReqChangeEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqChangeEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqChangeEquip";
            };
            return ReqChangeEquip;
          }();
          m_proto.ResChangeEquip = function () {
            /**
            * Properties of a ResChangeEquip.
            * @memberof m_proto
            * @interface IResChangeEquip
            * @property {number|null} [code] ResChangeEquip code
            * @property {number|null} [equip_uid] ResChangeEquip equip_uid
            * @property {number|null} [pos] ResChangeEquip pos
            * @property {number|null} [take_on_hero_id] ResChangeEquip take_on_hero_id
            * @property {number|null} [take_off_hero_id] ResChangeEquip take_off_hero_id
            */ /**
               * Constructs a new ResChangeEquip.
               * @memberof m_proto
               * @classdesc Represents a ResChangeEquip.
               * @implements IResChangeEquip
               * @constructor
               * @param {m_proto.IResChangeEquip=} [properties] Properties to set
               */
            function ResChangeEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResChangeEquip code.
              * @member {number} code
              * @memberof m_proto.ResChangeEquip
              * @instance
              */
            ResChangeEquip.prototype.code = 0; /**
                                               * ResChangeEquip equip_uid.
                                               * @member {number} equip_uid
                                               * @memberof m_proto.ResChangeEquip
                                               * @instance
                                               */
            ResChangeEquip.prototype.equip_uid = 0; /**
                                                    * ResChangeEquip pos.
                                                    * @member {number} pos
                                                    * @memberof m_proto.ResChangeEquip
                                                    * @instance
                                                    */
            ResChangeEquip.prototype.pos = 0; /**
                                              * ResChangeEquip take_on_hero_id.
                                              * @member {number} take_on_hero_id
                                              * @memberof m_proto.ResChangeEquip
                                              * @instance
                                              */
            ResChangeEquip.prototype.take_on_hero_id = 0; /**
                                                          * ResChangeEquip take_off_hero_id.
                                                          * @member {number} take_off_hero_id
                                                          * @memberof m_proto.ResChangeEquip
                                                          * @instance
                                                          */
            ResChangeEquip.prototype.take_off_hero_id = 0; /**
                                                           * Creates a new ResChangeEquip instance using the specified properties.
                                                           * @function create
                                                           * @memberof m_proto.ResChangeEquip
                                                           * @static
                                                           * @param {m_proto.IResChangeEquip=} [properties] Properties to set
                                                           * @returns {m_proto.ResChangeEquip} ResChangeEquip instance
                                                           */
            ResChangeEquip.create = function create(properties) {
              return new ResChangeEquip(properties);
            }; /**
               * Encodes the specified ResChangeEquip message. Does not implicitly {@link m_proto.ResChangeEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {m_proto.IResChangeEquip} message ResChangeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResChangeEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.equip_uid);
              if (message.pos != null && Object.hasOwnProperty.call(message, "pos")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.pos);
              if (message.take_on_hero_id != null && Object.hasOwnProperty.call(message, "take_on_hero_id")) writer.uint32( /* id 4, wireType 0 =*/32).int32(message.take_on_hero_id);
              if (message.take_off_hero_id != null && Object.hasOwnProperty.call(message, "take_off_hero_id")) writer.uint32( /* id 5, wireType 0 =*/40).int32(message.take_off_hero_id);
              return writer;
            }; /**
               * Encodes the specified ResChangeEquip message, length delimited. Does not implicitly {@link m_proto.ResChangeEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {m_proto.IResChangeEquip} message ResChangeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResChangeEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResChangeEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResChangeEquip} ResChangeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResChangeEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResChangeEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.pos = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      message.take_on_hero_id = reader.int32();
                      break;
                    }
                  case 5:
                    {
                      message.take_off_hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResChangeEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResChangeEquip} ResChangeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResChangeEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResChangeEquip message.
               * @function verify
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResChangeEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              if (message.pos != null && message.hasOwnProperty("pos")) if (!$util.isInteger(message.pos)) return "pos: integer expected";
              if (message.take_on_hero_id != null && message.hasOwnProperty("take_on_hero_id")) if (!$util.isInteger(message.take_on_hero_id)) return "take_on_hero_id: integer expected";
              if (message.take_off_hero_id != null && message.hasOwnProperty("take_off_hero_id")) if (!$util.isInteger(message.take_off_hero_id)) return "take_off_hero_id: integer expected";
              return null;
            }; /**
               * Creates a ResChangeEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResChangeEquip} ResChangeEquip
               */
            ResChangeEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResChangeEquip) return object;
              var message = new $root.m_proto.ResChangeEquip();
              if (object.code != null) message.code = object.code | 0;
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              if (object.pos != null) message.pos = object.pos | 0;
              if (object.take_on_hero_id != null) message.take_on_hero_id = object.take_on_hero_id | 0;
              if (object.take_off_hero_id != null) message.take_off_hero_id = object.take_off_hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResChangeEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {m_proto.ResChangeEquip} message ResChangeEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResChangeEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.equip_uid = 0;
                object.pos = 0;
                object.take_on_hero_id = 0;
                object.take_off_hero_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              if (message.pos != null && message.hasOwnProperty("pos")) object.pos = message.pos;
              if (message.take_on_hero_id != null && message.hasOwnProperty("take_on_hero_id")) object.take_on_hero_id = message.take_on_hero_id;
              if (message.take_off_hero_id != null && message.hasOwnProperty("take_off_hero_id")) object.take_off_hero_id = message.take_off_hero_id;
              return object;
            }; /**
               * Converts this ResChangeEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ResChangeEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResChangeEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResChangeEquip
               * @function getTypeUrl
               * @memberof m_proto.ResChangeEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResChangeEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResChangeEquip";
            };
            return ResChangeEquip;
          }();
          m_proto.ReqTakeOffEquip = function () {
            /**
            * Properties of a ReqTakeOffEquip.
            * @memberof m_proto
            * @interface IReqTakeOffEquip
            * @property {number|null} [equip_uid] ReqTakeOffEquip equip_uid
            * @property {number|null} [hero_id] ReqTakeOffEquip hero_id
            */ /**
               * Constructs a new ReqTakeOffEquip.
               * @memberof m_proto
               * @classdesc Represents a ReqTakeOffEquip.
               * @implements IReqTakeOffEquip
               * @constructor
               * @param {m_proto.IReqTakeOffEquip=} [properties] Properties to set
               */
            function ReqTakeOffEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqTakeOffEquip equip_uid.
              * @member {number} equip_uid
              * @memberof m_proto.ReqTakeOffEquip
              * @instance
              */
            ReqTakeOffEquip.prototype.equip_uid = 0; /**
                                                     * ReqTakeOffEquip hero_id.
                                                     * @member {number} hero_id
                                                     * @memberof m_proto.ReqTakeOffEquip
                                                     * @instance
                                                     */
            ReqTakeOffEquip.prototype.hero_id = 0; /**
                                                   * Creates a new ReqTakeOffEquip instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ReqTakeOffEquip
                                                   * @static
                                                   * @param {m_proto.IReqTakeOffEquip=} [properties] Properties to set
                                                   * @returns {m_proto.ReqTakeOffEquip} ReqTakeOffEquip instance
                                                   */
            ReqTakeOffEquip.create = function create(properties) {
              return new ReqTakeOffEquip(properties);
            }; /**
               * Encodes the specified ReqTakeOffEquip message. Does not implicitly {@link m_proto.ReqTakeOffEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {m_proto.IReqTakeOffEquip} message ReqTakeOffEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqTakeOffEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.equip_uid);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ReqTakeOffEquip message, length delimited. Does not implicitly {@link m_proto.ReqTakeOffEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {m_proto.IReqTakeOffEquip} message ReqTakeOffEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqTakeOffEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqTakeOffEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqTakeOffEquip} ReqTakeOffEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqTakeOffEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqTakeOffEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqTakeOffEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqTakeOffEquip} ReqTakeOffEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqTakeOffEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqTakeOffEquip message.
               * @function verify
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqTakeOffEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ReqTakeOffEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqTakeOffEquip} ReqTakeOffEquip
               */
            ReqTakeOffEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqTakeOffEquip) return object;
              var message = new $root.m_proto.ReqTakeOffEquip();
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqTakeOffEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {m_proto.ReqTakeOffEquip} message ReqTakeOffEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqTakeOffEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.equip_uid = 0;
                object.hero_id = 0;
              }
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ReqTakeOffEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ReqTakeOffEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqTakeOffEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqTakeOffEquip
               * @function getTypeUrl
               * @memberof m_proto.ReqTakeOffEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqTakeOffEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqTakeOffEquip";
            };
            return ReqTakeOffEquip;
          }();
          m_proto.ResTakeOffEquip = function () {
            /**
            * Properties of a ResTakeOffEquip.
            * @memberof m_proto
            * @interface IResTakeOffEquip
            * @property {number|null} [code] ResTakeOffEquip code
            * @property {number|null} [equip_uid] ResTakeOffEquip equip_uid
            * @property {number|null} [hero_id] ResTakeOffEquip hero_id
            */ /**
               * Constructs a new ResTakeOffEquip.
               * @memberof m_proto
               * @classdesc Represents a ResTakeOffEquip.
               * @implements IResTakeOffEquip
               * @constructor
               * @param {m_proto.IResTakeOffEquip=} [properties] Properties to set
               */
            function ResTakeOffEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResTakeOffEquip code.
              * @member {number} code
              * @memberof m_proto.ResTakeOffEquip
              * @instance
              */
            ResTakeOffEquip.prototype.code = 0; /**
                                                * ResTakeOffEquip equip_uid.
                                                * @member {number} equip_uid
                                                * @memberof m_proto.ResTakeOffEquip
                                                * @instance
                                                */
            ResTakeOffEquip.prototype.equip_uid = 0; /**
                                                     * ResTakeOffEquip hero_id.
                                                     * @member {number} hero_id
                                                     * @memberof m_proto.ResTakeOffEquip
                                                     * @instance
                                                     */
            ResTakeOffEquip.prototype.hero_id = 0; /**
                                                   * Creates a new ResTakeOffEquip instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResTakeOffEquip
                                                   * @static
                                                   * @param {m_proto.IResTakeOffEquip=} [properties] Properties to set
                                                   * @returns {m_proto.ResTakeOffEquip} ResTakeOffEquip instance
                                                   */
            ResTakeOffEquip.create = function create(properties) {
              return new ResTakeOffEquip(properties);
            }; /**
               * Encodes the specified ResTakeOffEquip message. Does not implicitly {@link m_proto.ResTakeOffEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {m_proto.IResTakeOffEquip} message ResTakeOffEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTakeOffEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.equip_uid);
              if (message.hero_id != null && Object.hasOwnProperty.call(message, "hero_id")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.hero_id);
              return writer;
            }; /**
               * Encodes the specified ResTakeOffEquip message, length delimited. Does not implicitly {@link m_proto.ResTakeOffEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {m_proto.IResTakeOffEquip} message ResTakeOffEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResTakeOffEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResTakeOffEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResTakeOffEquip} ResTakeOffEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTakeOffEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResTakeOffEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.hero_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResTakeOffEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResTakeOffEquip} ResTakeOffEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResTakeOffEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResTakeOffEquip message.
               * @function verify
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResTakeOffEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) if (!$util.isInteger(message.hero_id)) return "hero_id: integer expected";
              return null;
            }; /**
               * Creates a ResTakeOffEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResTakeOffEquip} ResTakeOffEquip
               */
            ResTakeOffEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResTakeOffEquip) return object;
              var message = new $root.m_proto.ResTakeOffEquip();
              if (object.code != null) message.code = object.code | 0;
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              if (object.hero_id != null) message.hero_id = object.hero_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ResTakeOffEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {m_proto.ResTakeOffEquip} message ResTakeOffEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResTakeOffEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.equip_uid = 0;
                object.hero_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              if (message.hero_id != null && message.hasOwnProperty("hero_id")) object.hero_id = message.hero_id;
              return object;
            }; /**
               * Converts this ResTakeOffEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ResTakeOffEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResTakeOffEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResTakeOffEquip
               * @function getTypeUrl
               * @memberof m_proto.ResTakeOffEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResTakeOffEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResTakeOffEquip";
            };
            return ResTakeOffEquip;
          }();
          m_proto.ReqStrengthenEquip = function () {
            /**
            * Properties of a ReqStrengthenEquip.
            * @memberof m_proto
            * @interface IReqStrengthenEquip
            * @property {number|null} [equip_uid] ReqStrengthenEquip equip_uid
            * @property {Array.<number>|null} [material_uids] ReqStrengthenEquip material_uids
            */ /**
               * Constructs a new ReqStrengthenEquip.
               * @memberof m_proto
               * @classdesc Represents a ReqStrengthenEquip.
               * @implements IReqStrengthenEquip
               * @constructor
               * @param {m_proto.IReqStrengthenEquip=} [properties] Properties to set
               */
            function ReqStrengthenEquip(properties) {
              this.material_uids = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqStrengthenEquip equip_uid.
              * @member {number} equip_uid
              * @memberof m_proto.ReqStrengthenEquip
              * @instance
              */
            ReqStrengthenEquip.prototype.equip_uid = 0; /**
                                                        * ReqStrengthenEquip material_uids.
                                                        * @member {Array.<number>} material_uids
                                                        * @memberof m_proto.ReqStrengthenEquip
                                                        * @instance
                                                        */
            ReqStrengthenEquip.prototype.material_uids = $util.emptyArray; /**
                                                                           * Creates a new ReqStrengthenEquip instance using the specified properties.
                                                                           * @function create
                                                                           * @memberof m_proto.ReqStrengthenEquip
                                                                           * @static
                                                                           * @param {m_proto.IReqStrengthenEquip=} [properties] Properties to set
                                                                           * @returns {m_proto.ReqStrengthenEquip} ReqStrengthenEquip instance
                                                                           */
            ReqStrengthenEquip.create = function create(properties) {
              return new ReqStrengthenEquip(properties);
            }; /**
               * Encodes the specified ReqStrengthenEquip message. Does not implicitly {@link m_proto.ReqStrengthenEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {m_proto.IReqStrengthenEquip} message ReqStrengthenEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqStrengthenEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.equip_uid);
              if (message.material_uids != null && message.material_uids.length) {
                writer.uint32( /* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.material_uids.length; ++i) writer.int32(message.material_uids[i]);
                writer.ldelim();
              }
              return writer;
            }; /**
               * Encodes the specified ReqStrengthenEquip message, length delimited. Does not implicitly {@link m_proto.ReqStrengthenEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {m_proto.IReqStrengthenEquip} message ReqStrengthenEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqStrengthenEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqStrengthenEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqStrengthenEquip} ReqStrengthenEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqStrengthenEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqStrengthenEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.material_uids && message.material_uids.length)) message.material_uids = [];
                      if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) message.material_uids.push(reader.int32());
                      } else message.material_uids.push(reader.int32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqStrengthenEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqStrengthenEquip} ReqStrengthenEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqStrengthenEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqStrengthenEquip message.
               * @function verify
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqStrengthenEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              if (message.material_uids != null && message.hasOwnProperty("material_uids")) {
                if (!Array.isArray(message.material_uids)) return "material_uids: array expected";
                for (var i = 0; i < message.material_uids.length; ++i) if (!$util.isInteger(message.material_uids[i])) return "material_uids: integer[] expected";
              }
              return null;
            }; /**
               * Creates a ReqStrengthenEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqStrengthenEquip} ReqStrengthenEquip
               */
            ReqStrengthenEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqStrengthenEquip) return object;
              var message = new $root.m_proto.ReqStrengthenEquip();
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              if (object.material_uids) {
                if (!Array.isArray(object.material_uids)) throw TypeError(".m_proto.ReqStrengthenEquip.material_uids: array expected");
                message.material_uids = [];
                for (var i = 0; i < object.material_uids.length; ++i) message.material_uids[i] = object.material_uids[i] | 0;
              }
              return message;
            }; /**
               * Creates a plain object from a ReqStrengthenEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {m_proto.ReqStrengthenEquip} message ReqStrengthenEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqStrengthenEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.material_uids = [];
              if (options.defaults) object.equip_uid = 0;
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              if (message.material_uids && message.material_uids.length) {
                object.material_uids = [];
                for (var j = 0; j < message.material_uids.length; ++j) object.material_uids[j] = message.material_uids[j];
              }
              return object;
            }; /**
               * Converts this ReqStrengthenEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ReqStrengthenEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqStrengthenEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqStrengthenEquip
               * @function getTypeUrl
               * @memberof m_proto.ReqStrengthenEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqStrengthenEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqStrengthenEquip";
            };
            return ReqStrengthenEquip;
          }();
          m_proto.ResStrengthenEquip = function () {
            /**
            * Properties of a ResStrengthenEquip.
            * @memberof m_proto
            * @interface IResStrengthenEquip
            * @property {number|null} [code] ResStrengthenEquip code
            * @property {number|null} [equip_uid] ResStrengthenEquip equip_uid
            */ /**
               * Constructs a new ResStrengthenEquip.
               * @memberof m_proto
               * @classdesc Represents a ResStrengthenEquip.
               * @implements IResStrengthenEquip
               * @constructor
               * @param {m_proto.IResStrengthenEquip=} [properties] Properties to set
               */
            function ResStrengthenEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResStrengthenEquip code.
              * @member {number} code
              * @memberof m_proto.ResStrengthenEquip
              * @instance
              */
            ResStrengthenEquip.prototype.code = 0; /**
                                                   * ResStrengthenEquip equip_uid.
                                                   * @member {number} equip_uid
                                                   * @memberof m_proto.ResStrengthenEquip
                                                   * @instance
                                                   */
            ResStrengthenEquip.prototype.equip_uid = 0; /**
                                                        * Creates a new ResStrengthenEquip instance using the specified properties.
                                                        * @function create
                                                        * @memberof m_proto.ResStrengthenEquip
                                                        * @static
                                                        * @param {m_proto.IResStrengthenEquip=} [properties] Properties to set
                                                        * @returns {m_proto.ResStrengthenEquip} ResStrengthenEquip instance
                                                        */
            ResStrengthenEquip.create = function create(properties) {
              return new ResStrengthenEquip(properties);
            }; /**
               * Encodes the specified ResStrengthenEquip message. Does not implicitly {@link m_proto.ResStrengthenEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {m_proto.IResStrengthenEquip} message ResStrengthenEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResStrengthenEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.equip_uid);
              return writer;
            }; /**
               * Encodes the specified ResStrengthenEquip message, length delimited. Does not implicitly {@link m_proto.ResStrengthenEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {m_proto.IResStrengthenEquip} message ResStrengthenEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResStrengthenEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResStrengthenEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResStrengthenEquip} ResStrengthenEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResStrengthenEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResStrengthenEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResStrengthenEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResStrengthenEquip} ResStrengthenEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResStrengthenEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResStrengthenEquip message.
               * @function verify
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResStrengthenEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              return null;
            }; /**
               * Creates a ResStrengthenEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResStrengthenEquip} ResStrengthenEquip
               */
            ResStrengthenEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResStrengthenEquip) return object;
              var message = new $root.m_proto.ResStrengthenEquip();
              if (object.code != null) message.code = object.code | 0;
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              return message;
            }; /**
               * Creates a plain object from a ResStrengthenEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {m_proto.ResStrengthenEquip} message ResStrengthenEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResStrengthenEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.equip_uid = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              return object;
            }; /**
               * Converts this ResStrengthenEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ResStrengthenEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResStrengthenEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResStrengthenEquip
               * @function getTypeUrl
               * @memberof m_proto.ResStrengthenEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResStrengthenEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResStrengthenEquip";
            };
            return ResStrengthenEquip;
          }();
          m_proto.ReqDecomposeEquip = function () {
            /**
            * Properties of a ReqDecomposeEquip.
            * @memberof m_proto
            * @interface IReqDecomposeEquip
            * @property {Array.<number>|null} [equip_uids] ReqDecomposeEquip equip_uids
            */ /**
               * Constructs a new ReqDecomposeEquip.
               * @memberof m_proto
               * @classdesc Represents a ReqDecomposeEquip.
               * @implements IReqDecomposeEquip
               * @constructor
               * @param {m_proto.IReqDecomposeEquip=} [properties] Properties to set
               */
            function ReqDecomposeEquip(properties) {
              this.equip_uids = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqDecomposeEquip equip_uids.
              * @member {Array.<number>} equip_uids
              * @memberof m_proto.ReqDecomposeEquip
              * @instance
              */
            ReqDecomposeEquip.prototype.equip_uids = $util.emptyArray; /**
                                                                       * Creates a new ReqDecomposeEquip instance using the specified properties.
                                                                       * @function create
                                                                       * @memberof m_proto.ReqDecomposeEquip
                                                                       * @static
                                                                       * @param {m_proto.IReqDecomposeEquip=} [properties] Properties to set
                                                                       * @returns {m_proto.ReqDecomposeEquip} ReqDecomposeEquip instance
                                                                       */
            ReqDecomposeEquip.create = function create(properties) {
              return new ReqDecomposeEquip(properties);
            }; /**
               * Encodes the specified ReqDecomposeEquip message. Does not implicitly {@link m_proto.ReqDecomposeEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {m_proto.IReqDecomposeEquip} message ReqDecomposeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDecomposeEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.equip_uids != null && message.equip_uids.length) {
                writer.uint32( /* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.equip_uids.length; ++i) writer.int32(message.equip_uids[i]);
                writer.ldelim();
              }
              return writer;
            }; /**
               * Encodes the specified ReqDecomposeEquip message, length delimited. Does not implicitly {@link m_proto.ReqDecomposeEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {m_proto.IReqDecomposeEquip} message ReqDecomposeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqDecomposeEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqDecomposeEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqDecomposeEquip} ReqDecomposeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDecomposeEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqDecomposeEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 2:
                    {
                      if (!(message.equip_uids && message.equip_uids.length)) message.equip_uids = [];
                      if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) message.equip_uids.push(reader.int32());
                      } else message.equip_uids.push(reader.int32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqDecomposeEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqDecomposeEquip} ReqDecomposeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqDecomposeEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqDecomposeEquip message.
               * @function verify
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqDecomposeEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.equip_uids != null && message.hasOwnProperty("equip_uids")) {
                if (!Array.isArray(message.equip_uids)) return "equip_uids: array expected";
                for (var i = 0; i < message.equip_uids.length; ++i) if (!$util.isInteger(message.equip_uids[i])) return "equip_uids: integer[] expected";
              }
              return null;
            }; /**
               * Creates a ReqDecomposeEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqDecomposeEquip} ReqDecomposeEquip
               */
            ReqDecomposeEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqDecomposeEquip) return object;
              var message = new $root.m_proto.ReqDecomposeEquip();
              if (object.equip_uids) {
                if (!Array.isArray(object.equip_uids)) throw TypeError(".m_proto.ReqDecomposeEquip.equip_uids: array expected");
                message.equip_uids = [];
                for (var i = 0; i < object.equip_uids.length; ++i) message.equip_uids[i] = object.equip_uids[i] | 0;
              }
              return message;
            }; /**
               * Creates a plain object from a ReqDecomposeEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {m_proto.ReqDecomposeEquip} message ReqDecomposeEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqDecomposeEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.equip_uids = [];
              if (message.equip_uids && message.equip_uids.length) {
                object.equip_uids = [];
                for (var j = 0; j < message.equip_uids.length; ++j) object.equip_uids[j] = message.equip_uids[j];
              }
              return object;
            }; /**
               * Converts this ReqDecomposeEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ReqDecomposeEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqDecomposeEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqDecomposeEquip
               * @function getTypeUrl
               * @memberof m_proto.ReqDecomposeEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqDecomposeEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqDecomposeEquip";
            };
            return ReqDecomposeEquip;
          }();
          m_proto.ResDecomposeEquip = function () {
            /**
            * Properties of a ResDecomposeEquip.
            * @memberof m_proto
            * @interface IResDecomposeEquip
            * @property {number|null} [code] ResDecomposeEquip code
            * @property {Array.<number>|null} [equip_uids] ResDecomposeEquip equip_uids
            */ /**
               * Constructs a new ResDecomposeEquip.
               * @memberof m_proto
               * @classdesc Represents a ResDecomposeEquip.
               * @implements IResDecomposeEquip
               * @constructor
               * @param {m_proto.IResDecomposeEquip=} [properties] Properties to set
               */
            function ResDecomposeEquip(properties) {
              this.equip_uids = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResDecomposeEquip code.
              * @member {number} code
              * @memberof m_proto.ResDecomposeEquip
              * @instance
              */
            ResDecomposeEquip.prototype.code = 0; /**
                                                  * ResDecomposeEquip equip_uids.
                                                  * @member {Array.<number>} equip_uids
                                                  * @memberof m_proto.ResDecomposeEquip
                                                  * @instance
                                                  */
            ResDecomposeEquip.prototype.equip_uids = $util.emptyArray; /**
                                                                       * Creates a new ResDecomposeEquip instance using the specified properties.
                                                                       * @function create
                                                                       * @memberof m_proto.ResDecomposeEquip
                                                                       * @static
                                                                       * @param {m_proto.IResDecomposeEquip=} [properties] Properties to set
                                                                       * @returns {m_proto.ResDecomposeEquip} ResDecomposeEquip instance
                                                                       */
            ResDecomposeEquip.create = function create(properties) {
              return new ResDecomposeEquip(properties);
            }; /**
               * Encodes the specified ResDecomposeEquip message. Does not implicitly {@link m_proto.ResDecomposeEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {m_proto.IResDecomposeEquip} message ResDecomposeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDecomposeEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.equip_uids != null && message.equip_uids.length) {
                writer.uint32( /* id 2, wireType 2 =*/18).fork();
                for (var i = 0; i < message.equip_uids.length; ++i) writer.int32(message.equip_uids[i]);
                writer.ldelim();
              }
              return writer;
            }; /**
               * Encodes the specified ResDecomposeEquip message, length delimited. Does not implicitly {@link m_proto.ResDecomposeEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {m_proto.IResDecomposeEquip} message ResDecomposeEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResDecomposeEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResDecomposeEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResDecomposeEquip} ResDecomposeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDecomposeEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResDecomposeEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.equip_uids && message.equip_uids.length)) message.equip_uids = [];
                      if ((tag & 7) === 2) {
                        var end2 = reader.uint32() + reader.pos;
                        while (reader.pos < end2) message.equip_uids.push(reader.int32());
                      } else message.equip_uids.push(reader.int32());
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResDecomposeEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResDecomposeEquip} ResDecomposeEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResDecomposeEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResDecomposeEquip message.
               * @function verify
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResDecomposeEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.equip_uids != null && message.hasOwnProperty("equip_uids")) {
                if (!Array.isArray(message.equip_uids)) return "equip_uids: array expected";
                for (var i = 0; i < message.equip_uids.length; ++i) if (!$util.isInteger(message.equip_uids[i])) return "equip_uids: integer[] expected";
              }
              return null;
            }; /**
               * Creates a ResDecomposeEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResDecomposeEquip} ResDecomposeEquip
               */
            ResDecomposeEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResDecomposeEquip) return object;
              var message = new $root.m_proto.ResDecomposeEquip();
              if (object.code != null) message.code = object.code | 0;
              if (object.equip_uids) {
                if (!Array.isArray(object.equip_uids)) throw TypeError(".m_proto.ResDecomposeEquip.equip_uids: array expected");
                message.equip_uids = [];
                for (var i = 0; i < object.equip_uids.length; ++i) message.equip_uids[i] = object.equip_uids[i] | 0;
              }
              return message;
            }; /**
               * Creates a plain object from a ResDecomposeEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {m_proto.ResDecomposeEquip} message ResDecomposeEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResDecomposeEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.equip_uids = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.equip_uids && message.equip_uids.length) {
                object.equip_uids = [];
                for (var j = 0; j < message.equip_uids.length; ++j) object.equip_uids[j] = message.equip_uids[j];
              }
              return object;
            }; /**
               * Converts this ResDecomposeEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ResDecomposeEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResDecomposeEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResDecomposeEquip
               * @function getTypeUrl
               * @memberof m_proto.ResDecomposeEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResDecomposeEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResDecomposeEquip";
            };
            return ResDecomposeEquip;
          }();
          m_proto.ReqLockEquip = function () {
            /**
            * Properties of a ReqLockEquip.
            * @memberof m_proto
            * @interface IReqLockEquip
            * @property {number|null} [equip_uid] ReqLockEquip equip_uid
            */ /**
               * Constructs a new ReqLockEquip.
               * @memberof m_proto
               * @classdesc Represents a ReqLockEquip.
               * @implements IReqLockEquip
               * @constructor
               * @param {m_proto.IReqLockEquip=} [properties] Properties to set
               */
            function ReqLockEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqLockEquip equip_uid.
              * @member {number} equip_uid
              * @memberof m_proto.ReqLockEquip
              * @instance
              */
            ReqLockEquip.prototype.equip_uid = 0; /**
                                                  * Creates a new ReqLockEquip instance using the specified properties.
                                                  * @function create
                                                  * @memberof m_proto.ReqLockEquip
                                                  * @static
                                                  * @param {m_proto.IReqLockEquip=} [properties] Properties to set
                                                  * @returns {m_proto.ReqLockEquip} ReqLockEquip instance
                                                  */
            ReqLockEquip.create = function create(properties) {
              return new ReqLockEquip(properties);
            }; /**
               * Encodes the specified ReqLockEquip message. Does not implicitly {@link m_proto.ReqLockEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {m_proto.IReqLockEquip} message ReqLockEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLockEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.equip_uid);
              return writer;
            }; /**
               * Encodes the specified ReqLockEquip message, length delimited. Does not implicitly {@link m_proto.ReqLockEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {m_proto.IReqLockEquip} message ReqLockEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqLockEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqLockEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqLockEquip} ReqLockEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLockEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqLockEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqLockEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqLockEquip} ReqLockEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqLockEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqLockEquip message.
               * @function verify
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqLockEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              return null;
            }; /**
               * Creates a ReqLockEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqLockEquip} ReqLockEquip
               */
            ReqLockEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqLockEquip) return object;
              var message = new $root.m_proto.ReqLockEquip();
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqLockEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {m_proto.ReqLockEquip} message ReqLockEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqLockEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.equip_uid = 0;
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              return object;
            }; /**
               * Converts this ReqLockEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ReqLockEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqLockEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqLockEquip
               * @function getTypeUrl
               * @memberof m_proto.ReqLockEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqLockEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqLockEquip";
            };
            return ReqLockEquip;
          }();
          m_proto.ResLockEquip = function () {
            /**
            * Properties of a ResLockEquip.
            * @memberof m_proto
            * @interface IResLockEquip
            * @property {number|null} [code] ResLockEquip code
            * @property {number|null} [equip_uid] ResLockEquip equip_uid
            * @property {number|null} [lock_state] ResLockEquip lock_state
            */ /**
               * Constructs a new ResLockEquip.
               * @memberof m_proto
               * @classdesc Represents a ResLockEquip.
               * @implements IResLockEquip
               * @constructor
               * @param {m_proto.IResLockEquip=} [properties] Properties to set
               */
            function ResLockEquip(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResLockEquip code.
              * @member {number} code
              * @memberof m_proto.ResLockEquip
              * @instance
              */
            ResLockEquip.prototype.code = 0; /**
                                             * ResLockEquip equip_uid.
                                             * @member {number} equip_uid
                                             * @memberof m_proto.ResLockEquip
                                             * @instance
                                             */
            ResLockEquip.prototype.equip_uid = 0; /**
                                                  * ResLockEquip lock_state.
                                                  * @member {number} lock_state
                                                  * @memberof m_proto.ResLockEquip
                                                  * @instance
                                                  */
            ResLockEquip.prototype.lock_state = 0; /**
                                                   * Creates a new ResLockEquip instance using the specified properties.
                                                   * @function create
                                                   * @memberof m_proto.ResLockEquip
                                                   * @static
                                                   * @param {m_proto.IResLockEquip=} [properties] Properties to set
                                                   * @returns {m_proto.ResLockEquip} ResLockEquip instance
                                                   */
            ResLockEquip.create = function create(properties) {
              return new ResLockEquip(properties);
            }; /**
               * Encodes the specified ResLockEquip message. Does not implicitly {@link m_proto.ResLockEquip.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {m_proto.IResLockEquip} message ResLockEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLockEquip.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.equip_uid != null && Object.hasOwnProperty.call(message, "equip_uid")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.equip_uid);
              if (message.lock_state != null && Object.hasOwnProperty.call(message, "lock_state")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.lock_state);
              return writer;
            }; /**
               * Encodes the specified ResLockEquip message, length delimited. Does not implicitly {@link m_proto.ResLockEquip.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {m_proto.IResLockEquip} message ResLockEquip message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResLockEquip.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResLockEquip message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResLockEquip} ResLockEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLockEquip.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResLockEquip();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.equip_uid = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.lock_state = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResLockEquip message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResLockEquip} ResLockEquip
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResLockEquip.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResLockEquip message.
               * @function verify
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResLockEquip.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) if (!$util.isInteger(message.equip_uid)) return "equip_uid: integer expected";
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) if (!$util.isInteger(message.lock_state)) return "lock_state: integer expected";
              return null;
            }; /**
               * Creates a ResLockEquip message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResLockEquip} ResLockEquip
               */
            ResLockEquip.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResLockEquip) return object;
              var message = new $root.m_proto.ResLockEquip();
              if (object.code != null) message.code = object.code | 0;
              if (object.equip_uid != null) message.equip_uid = object.equip_uid | 0;
              if (object.lock_state != null) message.lock_state = object.lock_state | 0;
              return message;
            }; /**
               * Creates a plain object from a ResLockEquip message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {m_proto.ResLockEquip} message ResLockEquip
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResLockEquip.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.code = 0;
                object.equip_uid = 0;
                object.lock_state = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.equip_uid != null && message.hasOwnProperty("equip_uid")) object.equip_uid = message.equip_uid;
              if (message.lock_state != null && message.hasOwnProperty("lock_state")) object.lock_state = message.lock_state;
              return object;
            }; /**
               * Converts this ResLockEquip to JSON.
               * @function toJSON
               * @memberof m_proto.ResLockEquip
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResLockEquip.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResLockEquip
               * @function getTypeUrl
               * @memberof m_proto.ResLockEquip
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResLockEquip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResLockEquip";
            };
            return ResLockEquip;
          }();
          m_proto.ReqRecruit = function () {
            /**
            * Properties of a ReqRecruit.
            * @memberof m_proto
            * @interface IReqRecruit
            * @property {number|null} [recruit_type] ReqRecruit recruit_type
            * @property {number|null} [draw_type] ReqRecruit draw_type
            */ /**
               * Constructs a new ReqRecruit.
               * @memberof m_proto
               * @classdesc Represents a ReqRecruit.
               * @implements IReqRecruit
               * @constructor
               * @param {m_proto.IReqRecruit=} [properties] Properties to set
               */
            function ReqRecruit(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqRecruit recruit_type.
              * @member {number} recruit_type
              * @memberof m_proto.ReqRecruit
              * @instance
              */
            ReqRecruit.prototype.recruit_type = 0; /**
                                                   * ReqRecruit draw_type.
                                                   * @member {number} draw_type
                                                   * @memberof m_proto.ReqRecruit
                                                   * @instance
                                                   */
            ReqRecruit.prototype.draw_type = 0; /**
                                                * Creates a new ReqRecruit instance using the specified properties.
                                                * @function create
                                                * @memberof m_proto.ReqRecruit
                                                * @static
                                                * @param {m_proto.IReqRecruit=} [properties] Properties to set
                                                * @returns {m_proto.ReqRecruit} ReqRecruit instance
                                                */
            ReqRecruit.create = function create(properties) {
              return new ReqRecruit(properties);
            }; /**
               * Encodes the specified ReqRecruit message. Does not implicitly {@link m_proto.ReqRecruit.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {m_proto.IReqRecruit} message ReqRecruit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqRecruit.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.recruit_type != null && Object.hasOwnProperty.call(message, "recruit_type")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.recruit_type);
              if (message.draw_type != null && Object.hasOwnProperty.call(message, "draw_type")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.draw_type);
              return writer;
            }; /**
               * Encodes the specified ReqRecruit message, length delimited. Does not implicitly {@link m_proto.ReqRecruit.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {m_proto.IReqRecruit} message ReqRecruit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqRecruit.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqRecruit message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqRecruit} ReqRecruit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqRecruit.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqRecruit();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.recruit_type = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.draw_type = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqRecruit message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqRecruit} ReqRecruit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqRecruit.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqRecruit message.
               * @function verify
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqRecruit.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.recruit_type != null && message.hasOwnProperty("recruit_type")) if (!$util.isInteger(message.recruit_type)) return "recruit_type: integer expected";
              if (message.draw_type != null && message.hasOwnProperty("draw_type")) if (!$util.isInteger(message.draw_type)) return "draw_type: integer expected";
              return null;
            }; /**
               * Creates a ReqRecruit message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqRecruit} ReqRecruit
               */
            ReqRecruit.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqRecruit) return object;
              var message = new $root.m_proto.ReqRecruit();
              if (object.recruit_type != null) message.recruit_type = object.recruit_type | 0;
              if (object.draw_type != null) message.draw_type = object.draw_type | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqRecruit message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {m_proto.ReqRecruit} message ReqRecruit
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqRecruit.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.recruit_type = 0;
                object.draw_type = 0;
              }
              if (message.recruit_type != null && message.hasOwnProperty("recruit_type")) object.recruit_type = message.recruit_type;
              if (message.draw_type != null && message.hasOwnProperty("draw_type")) object.draw_type = message.draw_type;
              return object;
            }; /**
               * Converts this ReqRecruit to JSON.
               * @function toJSON
               * @memberof m_proto.ReqRecruit
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqRecruit.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqRecruit
               * @function getTypeUrl
               * @memberof m_proto.ReqRecruit
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqRecruit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqRecruit";
            };
            return ReqRecruit;
          }();
          m_proto.ResRecruit = function () {
            /**
            * Properties of a ResRecruit.
            * @memberof m_proto
            * @interface IResRecruit
            * @property {number|null} [code] ResRecruit code
            * @property {Array.<m_proto.IItem>|null} [items] ResRecruit items
            */ /**
               * Constructs a new ResRecruit.
               * @memberof m_proto
               * @classdesc Represents a ResRecruit.
               * @implements IResRecruit
               * @constructor
               * @param {m_proto.IResRecruit=} [properties] Properties to set
               */
            function ResRecruit(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResRecruit code.
              * @member {number} code
              * @memberof m_proto.ResRecruit
              * @instance
              */
            ResRecruit.prototype.code = 0; /**
                                           * ResRecruit items.
                                           * @member {Array.<m_proto.IItem>} items
                                           * @memberof m_proto.ResRecruit
                                           * @instance
                                           */
            ResRecruit.prototype.items = $util.emptyArray; /**
                                                           * Creates a new ResRecruit instance using the specified properties.
                                                           * @function create
                                                           * @memberof m_proto.ResRecruit
                                                           * @static
                                                           * @param {m_proto.IResRecruit=} [properties] Properties to set
                                                           * @returns {m_proto.ResRecruit} ResRecruit instance
                                                           */
            ResRecruit.create = function create(properties) {
              return new ResRecruit(properties);
            }; /**
               * Encodes the specified ResRecruit message. Does not implicitly {@link m_proto.ResRecruit.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResRecruit
               * @static
               * @param {m_proto.IResRecruit} message ResRecruit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRecruit.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.Item.encode(message.items[i], writer.uint32( /* id 2, wireType 2 =*/18).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResRecruit message, length delimited. Does not implicitly {@link m_proto.ResRecruit.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResRecruit
               * @static
               * @param {m_proto.IResRecruit} message ResRecruit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResRecruit.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResRecruit message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResRecruit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResRecruit} ResRecruit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRecruit.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResRecruit();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResRecruit message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResRecruit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResRecruit} ResRecruit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResRecruit.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResRecruit message.
               * @function verify
               * @memberof m_proto.ResRecruit
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResRecruit.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResRecruit message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResRecruit
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResRecruit} ResRecruit
               */
            ResRecruit.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResRecruit) return object;
              var message = new $root.m_proto.ResRecruit();
              if (object.code != null) message.code = object.code | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResRecruit.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResRecruit.items: object expected");
                  message.items[i] = $root.m_proto.Item.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResRecruit message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResRecruit
               * @static
               * @param {m_proto.ResRecruit} message ResRecruit
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResRecruit.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) object.code = 0;
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.Item.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResRecruit to JSON.
               * @function toJSON
               * @memberof m_proto.ResRecruit
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResRecruit.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResRecruit
               * @function getTypeUrl
               * @memberof m_proto.ResRecruit
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResRecruit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResRecruit";
            };
            return ResRecruit;
          }();
          m_proto.ReqShopInfo = function () {
            /**
            * Properties of a ReqShopInfo.
            * @memberof m_proto
            * @interface IReqShopInfo
            * @property {number|null} [shop_id] ReqShopInfo shop_id
            */ /**
               * Constructs a new ReqShopInfo.
               * @memberof m_proto
               * @classdesc Represents a ReqShopInfo.
               * @implements IReqShopInfo
               * @constructor
               * @param {m_proto.IReqShopInfo=} [properties] Properties to set
               */
            function ReqShopInfo(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqShopInfo shop_id.
              * @member {number} shop_id
              * @memberof m_proto.ReqShopInfo
              * @instance
              */
            ReqShopInfo.prototype.shop_id = 0; /**
                                               * Creates a new ReqShopInfo instance using the specified properties.
                                               * @function create
                                               * @memberof m_proto.ReqShopInfo
                                               * @static
                                               * @param {m_proto.IReqShopInfo=} [properties] Properties to set
                                               * @returns {m_proto.ReqShopInfo} ReqShopInfo instance
                                               */
            ReqShopInfo.create = function create(properties) {
              return new ReqShopInfo(properties);
            }; /**
               * Encodes the specified ReqShopInfo message. Does not implicitly {@link m_proto.ReqShopInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {m_proto.IReqShopInfo} message ReqShopInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqShopInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.shop_id != null && Object.hasOwnProperty.call(message, "shop_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.shop_id);
              return writer;
            }; /**
               * Encodes the specified ReqShopInfo message, length delimited. Does not implicitly {@link m_proto.ReqShopInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {m_proto.IReqShopInfo} message ReqShopInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqShopInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqShopInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqShopInfo} ReqShopInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqShopInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqShopInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.shop_id = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqShopInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqShopInfo} ReqShopInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqShopInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqShopInfo message.
               * @function verify
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqShopInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.shop_id != null && message.hasOwnProperty("shop_id")) if (!$util.isInteger(message.shop_id)) return "shop_id: integer expected";
              return null;
            }; /**
               * Creates a ReqShopInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqShopInfo} ReqShopInfo
               */
            ReqShopInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqShopInfo) return object;
              var message = new $root.m_proto.ReqShopInfo();
              if (object.shop_id != null) message.shop_id = object.shop_id | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqShopInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {m_proto.ReqShopInfo} message ReqShopInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqShopInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) object.shop_id = 0;
              if (message.shop_id != null && message.hasOwnProperty("shop_id")) object.shop_id = message.shop_id;
              return object;
            }; /**
               * Converts this ReqShopInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ReqShopInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqShopInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqShopInfo
               * @function getTypeUrl
               * @memberof m_proto.ReqShopInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqShopInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqShopInfo";
            };
            return ReqShopInfo;
          }();
          m_proto.ResShopInfo = function () {
            /**
            * Properties of a ResShopInfo.
            * @memberof m_proto
            * @interface IResShopInfo
            * @property {number|null} [code] ResShopInfo code
            * @property {number|null} [shop_id] ResShopInfo shop_id
            * @property {Array.<m_proto.IShopItem>|null} [items] ResShopInfo items
            */ /**
               * Constructs a new ResShopInfo.
               * @memberof m_proto
               * @classdesc Represents a ResShopInfo.
               * @implements IResShopInfo
               * @constructor
               * @param {m_proto.IResShopInfo=} [properties] Properties to set
               */
            function ResShopInfo(properties) {
              this.items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResShopInfo code.
              * @member {number} code
              * @memberof m_proto.ResShopInfo
              * @instance
              */
            ResShopInfo.prototype.code = 0; /**
                                            * ResShopInfo shop_id.
                                            * @member {number} shop_id
                                            * @memberof m_proto.ResShopInfo
                                            * @instance
                                            */
            ResShopInfo.prototype.shop_id = 0; /**
                                               * ResShopInfo items.
                                               * @member {Array.<m_proto.IShopItem>} items
                                               * @memberof m_proto.ResShopInfo
                                               * @instance
                                               */
            ResShopInfo.prototype.items = $util.emptyArray; /**
                                                            * Creates a new ResShopInfo instance using the specified properties.
                                                            * @function create
                                                            * @memberof m_proto.ResShopInfo
                                                            * @static
                                                            * @param {m_proto.IResShopInfo=} [properties] Properties to set
                                                            * @returns {m_proto.ResShopInfo} ResShopInfo instance
                                                            */
            ResShopInfo.create = function create(properties) {
              return new ResShopInfo(properties);
            }; /**
               * Encodes the specified ResShopInfo message. Does not implicitly {@link m_proto.ResShopInfo.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {m_proto.IResShopInfo} message ResShopInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResShopInfo.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.shop_id != null && Object.hasOwnProperty.call(message, "shop_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.shop_id);
              if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.m_proto.ShopItem.encode(message.items[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResShopInfo message, length delimited. Does not implicitly {@link m_proto.ResShopInfo.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {m_proto.IResShopInfo} message ResShopInfo message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResShopInfo.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResShopInfo message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResShopInfo} ResShopInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResShopInfo.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResShopInfo();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.shop_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.items && message.items.length)) message.items = [];
                      message.items.push($root.m_proto.ShopItem.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResShopInfo message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResShopInfo} ResShopInfo
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResShopInfo.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResShopInfo message.
               * @function verify
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResShopInfo.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.shop_id != null && message.hasOwnProperty("shop_id")) if (!$util.isInteger(message.shop_id)) return "shop_id: integer expected";
              if (message.items != null && message.hasOwnProperty("items")) {
                if (!Array.isArray(message.items)) return "items: array expected";
                for (var i = 0; i < message.items.length; ++i) {
                  var error = $root.m_proto.ShopItem.verify(message.items[i]);
                  if (error) return "items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResShopInfo message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResShopInfo} ResShopInfo
               */
            ResShopInfo.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResShopInfo) return object;
              var message = new $root.m_proto.ResShopInfo();
              if (object.code != null) message.code = object.code | 0;
              if (object.shop_id != null) message.shop_id = object.shop_id | 0;
              if (object.items) {
                if (!Array.isArray(object.items)) throw TypeError(".m_proto.ResShopInfo.items: array expected");
                message.items = [];
                for (var i = 0; i < object.items.length; ++i) {
                  if (typeof object.items[i] !== "object") throw TypeError(".m_proto.ResShopInfo.items: object expected");
                  message.items[i] = $root.m_proto.ShopItem.fromObject(object.items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResShopInfo message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {m_proto.ResShopInfo} message ResShopInfo
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResShopInfo.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.items = [];
              if (options.defaults) {
                object.code = 0;
                object.shop_id = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.shop_id != null && message.hasOwnProperty("shop_id")) object.shop_id = message.shop_id;
              if (message.items && message.items.length) {
                object.items = [];
                for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.m_proto.ShopItem.toObject(message.items[j], options);
              }
              return object;
            }; /**
               * Converts this ResShopInfo to JSON.
               * @function toJSON
               * @memberof m_proto.ResShopInfo
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResShopInfo.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResShopInfo
               * @function getTypeUrl
               * @memberof m_proto.ResShopInfo
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResShopInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResShopInfo";
            };
            return ResShopInfo;
          }();
          m_proto.ShopItem = function () {
            /**
            * Properties of a ShopItem.
            * @memberof m_proto
            * @interface IShopItem
            * @property {number|null} [id] ShopItem id
            * @property {number|null} [shop_id] ShopItem shop_id
            * @property {Array.<m_proto.IItem>|null} [item_info] ShopItem item_info
            * @property {Array.<m_proto.IItem>|null} [cost_info] ShopItem cost_info
            * @property {Array.<m_proto.IBuyLimit>|null} [buy_limit] ShopItem buy_limit
            * @property {number|null} [buy_count] ShopItem buy_count
            * @property {number|null} [remain_buy_count] ShopItem remain_buy_count
            */ /**
               * Constructs a new ShopItem.
               * @memberof m_proto
               * @classdesc Represents a ShopItem.
               * @implements IShopItem
               * @constructor
               * @param {m_proto.IShopItem=} [properties] Properties to set
               */
            function ShopItem(properties) {
              this.item_info = [];
              this.cost_info = [];
              this.buy_limit = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ShopItem id.
              * @member {number} id
              * @memberof m_proto.ShopItem
              * @instance
              */
            ShopItem.prototype.id = 0; /**
                                       * ShopItem shop_id.
                                       * @member {number} shop_id
                                       * @memberof m_proto.ShopItem
                                       * @instance
                                       */
            ShopItem.prototype.shop_id = 0; /**
                                            * ShopItem item_info.
                                            * @member {Array.<m_proto.IItem>} item_info
                                            * @memberof m_proto.ShopItem
                                            * @instance
                                            */
            ShopItem.prototype.item_info = $util.emptyArray; /**
                                                             * ShopItem cost_info.
                                                             * @member {Array.<m_proto.IItem>} cost_info
                                                             * @memberof m_proto.ShopItem
                                                             * @instance
                                                             */
            ShopItem.prototype.cost_info = $util.emptyArray; /**
                                                             * ShopItem buy_limit.
                                                             * @member {Array.<m_proto.IBuyLimit>} buy_limit
                                                             * @memberof m_proto.ShopItem
                                                             * @instance
                                                             */
            ShopItem.prototype.buy_limit = $util.emptyArray; /**
                                                             * ShopItem buy_count.
                                                             * @member {number} buy_count
                                                             * @memberof m_proto.ShopItem
                                                             * @instance
                                                             */
            ShopItem.prototype.buy_count = 0; /**
                                              * ShopItem remain_buy_count.
                                              * @member {number} remain_buy_count
                                              * @memberof m_proto.ShopItem
                                              * @instance
                                              */
            ShopItem.prototype.remain_buy_count = 0; /**
                                                     * Creates a new ShopItem instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ShopItem
                                                     * @static
                                                     * @param {m_proto.IShopItem=} [properties] Properties to set
                                                     * @returns {m_proto.ShopItem} ShopItem instance
                                                     */
            ShopItem.create = function create(properties) {
              return new ShopItem(properties);
            }; /**
               * Encodes the specified ShopItem message. Does not implicitly {@link m_proto.ShopItem.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ShopItem
               * @static
               * @param {m_proto.IShopItem} message ShopItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ShopItem.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.id);
              if (message.shop_id != null && Object.hasOwnProperty.call(message, "shop_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.shop_id);
              if (message.item_info != null && message.item_info.length) for (var i = 0; i < message.item_info.length; ++i) $root.m_proto.Item.encode(message.item_info[i], writer.uint32( /* id 3, wireType 2 =*/26).fork()).ldelim();
              if (message.cost_info != null && message.cost_info.length) for (var i = 0; i < message.cost_info.length; ++i) $root.m_proto.Item.encode(message.cost_info[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();
              if (message.buy_limit != null && message.buy_limit.length) for (var i = 0; i < message.buy_limit.length; ++i) $root.m_proto.BuyLimit.encode(message.buy_limit[i], writer.uint32( /* id 5, wireType 2 =*/42).fork()).ldelim();
              if (message.buy_count != null && Object.hasOwnProperty.call(message, "buy_count")) writer.uint32( /* id 6, wireType 0 =*/48).int32(message.buy_count);
              if (message.remain_buy_count != null && Object.hasOwnProperty.call(message, "remain_buy_count")) writer.uint32( /* id 7, wireType 0 =*/56).int32(message.remain_buy_count);
              return writer;
            }; /**
               * Encodes the specified ShopItem message, length delimited. Does not implicitly {@link m_proto.ShopItem.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ShopItem
               * @static
               * @param {m_proto.IShopItem} message ShopItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ShopItem.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ShopItem message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ShopItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ShopItem} ShopItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ShopItem.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ShopItem();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.shop_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      if (!(message.item_info && message.item_info.length)) message.item_info = [];
                      message.item_info.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  case 4:
                    {
                      if (!(message.cost_info && message.cost_info.length)) message.cost_info = [];
                      message.cost_info.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  case 5:
                    {
                      if (!(message.buy_limit && message.buy_limit.length)) message.buy_limit = [];
                      message.buy_limit.push($root.m_proto.BuyLimit.decode(reader, reader.uint32()));
                      break;
                    }
                  case 6:
                    {
                      message.buy_count = reader.int32();
                      break;
                    }
                  case 7:
                    {
                      message.remain_buy_count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ShopItem message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ShopItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ShopItem} ShopItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ShopItem.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ShopItem message.
               * @function verify
               * @memberof m_proto.ShopItem
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ShopItem.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected";
              if (message.shop_id != null && message.hasOwnProperty("shop_id")) if (!$util.isInteger(message.shop_id)) return "shop_id: integer expected";
              if (message.item_info != null && message.hasOwnProperty("item_info")) {
                if (!Array.isArray(message.item_info)) return "item_info: array expected";
                for (var i = 0; i < message.item_info.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.item_info[i]);
                  if (error) return "item_info." + error;
                }
              }
              if (message.cost_info != null && message.hasOwnProperty("cost_info")) {
                if (!Array.isArray(message.cost_info)) return "cost_info: array expected";
                for (var i = 0; i < message.cost_info.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.cost_info[i]);
                  if (error) return "cost_info." + error;
                }
              }
              if (message.buy_limit != null && message.hasOwnProperty("buy_limit")) {
                if (!Array.isArray(message.buy_limit)) return "buy_limit: array expected";
                for (var i = 0; i < message.buy_limit.length; ++i) {
                  var error = $root.m_proto.BuyLimit.verify(message.buy_limit[i]);
                  if (error) return "buy_limit." + error;
                }
              }
              if (message.buy_count != null && message.hasOwnProperty("buy_count")) if (!$util.isInteger(message.buy_count)) return "buy_count: integer expected";
              if (message.remain_buy_count != null && message.hasOwnProperty("remain_buy_count")) if (!$util.isInteger(message.remain_buy_count)) return "remain_buy_count: integer expected";
              return null;
            }; /**
               * Creates a ShopItem message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ShopItem
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ShopItem} ShopItem
               */
            ShopItem.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ShopItem) return object;
              var message = new $root.m_proto.ShopItem();
              if (object.id != null) message.id = object.id | 0;
              if (object.shop_id != null) message.shop_id = object.shop_id | 0;
              if (object.item_info) {
                if (!Array.isArray(object.item_info)) throw TypeError(".m_proto.ShopItem.item_info: array expected");
                message.item_info = [];
                for (var i = 0; i < object.item_info.length; ++i) {
                  if (typeof object.item_info[i] !== "object") throw TypeError(".m_proto.ShopItem.item_info: object expected");
                  message.item_info[i] = $root.m_proto.Item.fromObject(object.item_info[i]);
                }
              }
              if (object.cost_info) {
                if (!Array.isArray(object.cost_info)) throw TypeError(".m_proto.ShopItem.cost_info: array expected");
                message.cost_info = [];
                for (var i = 0; i < object.cost_info.length; ++i) {
                  if (typeof object.cost_info[i] !== "object") throw TypeError(".m_proto.ShopItem.cost_info: object expected");
                  message.cost_info[i] = $root.m_proto.Item.fromObject(object.cost_info[i]);
                }
              }
              if (object.buy_limit) {
                if (!Array.isArray(object.buy_limit)) throw TypeError(".m_proto.ShopItem.buy_limit: array expected");
                message.buy_limit = [];
                for (var i = 0; i < object.buy_limit.length; ++i) {
                  if (typeof object.buy_limit[i] !== "object") throw TypeError(".m_proto.ShopItem.buy_limit: object expected");
                  message.buy_limit[i] = $root.m_proto.BuyLimit.fromObject(object.buy_limit[i]);
                }
              }
              if (object.buy_count != null) message.buy_count = object.buy_count | 0;
              if (object.remain_buy_count != null) message.remain_buy_count = object.remain_buy_count | 0;
              return message;
            }; /**
               * Creates a plain object from a ShopItem message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ShopItem
               * @static
               * @param {m_proto.ShopItem} message ShopItem
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ShopItem.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) {
                object.item_info = [];
                object.cost_info = [];
                object.buy_limit = [];
              }
              if (options.defaults) {
                object.id = 0;
                object.shop_id = 0;
                object.buy_count = 0;
                object.remain_buy_count = 0;
              }
              if (message.id != null && message.hasOwnProperty("id")) object.id = message.id;
              if (message.shop_id != null && message.hasOwnProperty("shop_id")) object.shop_id = message.shop_id;
              if (message.item_info && message.item_info.length) {
                object.item_info = [];
                for (var j = 0; j < message.item_info.length; ++j) object.item_info[j] = $root.m_proto.Item.toObject(message.item_info[j], options);
              }
              if (message.cost_info && message.cost_info.length) {
                object.cost_info = [];
                for (var j = 0; j < message.cost_info.length; ++j) object.cost_info[j] = $root.m_proto.Item.toObject(message.cost_info[j], options);
              }
              if (message.buy_limit && message.buy_limit.length) {
                object.buy_limit = [];
                for (var j = 0; j < message.buy_limit.length; ++j) object.buy_limit[j] = $root.m_proto.BuyLimit.toObject(message.buy_limit[j], options);
              }
              if (message.buy_count != null && message.hasOwnProperty("buy_count")) object.buy_count = message.buy_count;
              if (message.remain_buy_count != null && message.hasOwnProperty("remain_buy_count")) object.remain_buy_count = message.remain_buy_count;
              return object;
            }; /**
               * Converts this ShopItem to JSON.
               * @function toJSON
               * @memberof m_proto.ShopItem
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ShopItem.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ShopItem
               * @function getTypeUrl
               * @memberof m_proto.ShopItem
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ShopItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ShopItem";
            };
            return ShopItem;
          }();
          m_proto.BuyLimit = function () {
            /**
            * Properties of a BuyLimit.
            * @memberof m_proto
            * @interface IBuyLimit
            * @property {number|null} [limit_type] BuyLimit limit_type
            * @property {number|null} [limit_num] BuyLimit limit_num
            */ /**
               * Constructs a new BuyLimit.
               * @memberof m_proto
               * @classdesc Represents a BuyLimit.
               * @implements IBuyLimit
               * @constructor
               * @param {m_proto.IBuyLimit=} [properties] Properties to set
               */
            function BuyLimit(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * BuyLimit limit_type.
              * @member {number} limit_type
              * @memberof m_proto.BuyLimit
              * @instance
              */
            BuyLimit.prototype.limit_type = 0; /**
                                               * BuyLimit limit_num.
                                               * @member {number} limit_num
                                               * @memberof m_proto.BuyLimit
                                               * @instance
                                               */
            BuyLimit.prototype.limit_num = 0; /**
                                              * Creates a new BuyLimit instance using the specified properties.
                                              * @function create
                                              * @memberof m_proto.BuyLimit
                                              * @static
                                              * @param {m_proto.IBuyLimit=} [properties] Properties to set
                                              * @returns {m_proto.BuyLimit} BuyLimit instance
                                              */
            BuyLimit.create = function create(properties) {
              return new BuyLimit(properties);
            }; /**
               * Encodes the specified BuyLimit message. Does not implicitly {@link m_proto.BuyLimit.verify|verify} messages.
               * @function encode
               * @memberof m_proto.BuyLimit
               * @static
               * @param {m_proto.IBuyLimit} message BuyLimit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BuyLimit.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.limit_type != null && Object.hasOwnProperty.call(message, "limit_type")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.limit_type);
              if (message.limit_num != null && Object.hasOwnProperty.call(message, "limit_num")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.limit_num);
              return writer;
            }; /**
               * Encodes the specified BuyLimit message, length delimited. Does not implicitly {@link m_proto.BuyLimit.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.BuyLimit
               * @static
               * @param {m_proto.IBuyLimit} message BuyLimit message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            BuyLimit.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a BuyLimit message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.BuyLimit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.BuyLimit} BuyLimit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BuyLimit.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.BuyLimit();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.limit_type = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.limit_num = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a BuyLimit message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.BuyLimit
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.BuyLimit} BuyLimit
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            BuyLimit.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a BuyLimit message.
               * @function verify
               * @memberof m_proto.BuyLimit
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            BuyLimit.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.limit_type != null && message.hasOwnProperty("limit_type")) if (!$util.isInteger(message.limit_type)) return "limit_type: integer expected";
              if (message.limit_num != null && message.hasOwnProperty("limit_num")) if (!$util.isInteger(message.limit_num)) return "limit_num: integer expected";
              return null;
            }; /**
               * Creates a BuyLimit message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.BuyLimit
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.BuyLimit} BuyLimit
               */
            BuyLimit.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.BuyLimit) return object;
              var message = new $root.m_proto.BuyLimit();
              if (object.limit_type != null) message.limit_type = object.limit_type | 0;
              if (object.limit_num != null) message.limit_num = object.limit_num | 0;
              return message;
            }; /**
               * Creates a plain object from a BuyLimit message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.BuyLimit
               * @static
               * @param {m_proto.BuyLimit} message BuyLimit
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            BuyLimit.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.limit_type = 0;
                object.limit_num = 0;
              }
              if (message.limit_type != null && message.hasOwnProperty("limit_type")) object.limit_type = message.limit_type;
              if (message.limit_num != null && message.hasOwnProperty("limit_num")) object.limit_num = message.limit_num;
              return object;
            }; /**
               * Converts this BuyLimit to JSON.
               * @function toJSON
               * @memberof m_proto.BuyLimit
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            BuyLimit.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for BuyLimit
               * @function getTypeUrl
               * @memberof m_proto.BuyLimit
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            BuyLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.BuyLimit";
            };
            return BuyLimit;
          }();
          m_proto.ReqBuyShopItem = function () {
            /**
            * Properties of a ReqBuyShopItem.
            * @memberof m_proto
            * @interface IReqBuyShopItem
            * @property {number|null} [item_id] ReqBuyShopItem item_id
            * @property {number|null} [item_count] ReqBuyShopItem item_count
            */ /**
               * Constructs a new ReqBuyShopItem.
               * @memberof m_proto
               * @classdesc Represents a ReqBuyShopItem.
               * @implements IReqBuyShopItem
               * @constructor
               * @param {m_proto.IReqBuyShopItem=} [properties] Properties to set
               */
            function ReqBuyShopItem(properties) {
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ReqBuyShopItem item_id.
              * @member {number} item_id
              * @memberof m_proto.ReqBuyShopItem
              * @instance
              */
            ReqBuyShopItem.prototype.item_id = 0; /**
                                                  * ReqBuyShopItem item_count.
                                                  * @member {number} item_count
                                                  * @memberof m_proto.ReqBuyShopItem
                                                  * @instance
                                                  */
            ReqBuyShopItem.prototype.item_count = 0; /**
                                                     * Creates a new ReqBuyShopItem instance using the specified properties.
                                                     * @function create
                                                     * @memberof m_proto.ReqBuyShopItem
                                                     * @static
                                                     * @param {m_proto.IReqBuyShopItem=} [properties] Properties to set
                                                     * @returns {m_proto.ReqBuyShopItem} ReqBuyShopItem instance
                                                     */
            ReqBuyShopItem.create = function create(properties) {
              return new ReqBuyShopItem(properties);
            }; /**
               * Encodes the specified ReqBuyShopItem message. Does not implicitly {@link m_proto.ReqBuyShopItem.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {m_proto.IReqBuyShopItem} message ReqBuyShopItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBuyShopItem.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.item_id);
              if (message.item_count != null && Object.hasOwnProperty.call(message, "item_count")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.item_count);
              return writer;
            }; /**
               * Encodes the specified ReqBuyShopItem message, length delimited. Does not implicitly {@link m_proto.ReqBuyShopItem.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {m_proto.IReqBuyShopItem} message ReqBuyShopItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ReqBuyShopItem.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ReqBuyShopItem message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ReqBuyShopItem} ReqBuyShopItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBuyShopItem.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ReqBuyShopItem();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.item_id = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.item_count = reader.int32();
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ReqBuyShopItem message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ReqBuyShopItem} ReqBuyShopItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ReqBuyShopItem.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ReqBuyShopItem message.
               * @function verify
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ReqBuyShopItem.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.item_id != null && message.hasOwnProperty("item_id")) if (!$util.isInteger(message.item_id)) return "item_id: integer expected";
              if (message.item_count != null && message.hasOwnProperty("item_count")) if (!$util.isInteger(message.item_count)) return "item_count: integer expected";
              return null;
            }; /**
               * Creates a ReqBuyShopItem message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ReqBuyShopItem} ReqBuyShopItem
               */
            ReqBuyShopItem.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ReqBuyShopItem) return object;
              var message = new $root.m_proto.ReqBuyShopItem();
              if (object.item_id != null) message.item_id = object.item_id | 0;
              if (object.item_count != null) message.item_count = object.item_count | 0;
              return message;
            }; /**
               * Creates a plain object from a ReqBuyShopItem message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {m_proto.ReqBuyShopItem} message ReqBuyShopItem
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ReqBuyShopItem.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.defaults) {
                object.item_id = 0;
                object.item_count = 0;
              }
              if (message.item_id != null && message.hasOwnProperty("item_id")) object.item_id = message.item_id;
              if (message.item_count != null && message.hasOwnProperty("item_count")) object.item_count = message.item_count;
              return object;
            }; /**
               * Converts this ReqBuyShopItem to JSON.
               * @function toJSON
               * @memberof m_proto.ReqBuyShopItem
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ReqBuyShopItem.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ReqBuyShopItem
               * @function getTypeUrl
               * @memberof m_proto.ReqBuyShopItem
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ReqBuyShopItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ReqBuyShopItem";
            };
            return ReqBuyShopItem;
          }();
          m_proto.ResBuyShopItem = function () {
            /**
            * Properties of a ResBuyShopItem.
            * @memberof m_proto
            * @interface IResBuyShopItem
            * @property {number|null} [code] ResBuyShopItem code
            * @property {number|null} [item_id] ResBuyShopItem item_id
            * @property {number|null} [buy_count] ResBuyShopItem buy_count
            * @property {Array.<m_proto.IItem>|null} [reward_items] ResBuyShopItem reward_items
            */ /**
               * Constructs a new ResBuyShopItem.
               * @memberof m_proto
               * @classdesc Represents a ResBuyShopItem.
               * @implements IResBuyShopItem
               * @constructor
               * @param {m_proto.IResBuyShopItem=} [properties] Properties to set
               */
            function ResBuyShopItem(properties) {
              this.reward_items = [];
              if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
            } /**
              * ResBuyShopItem code.
              * @member {number} code
              * @memberof m_proto.ResBuyShopItem
              * @instance
              */
            ResBuyShopItem.prototype.code = 0; /**
                                               * ResBuyShopItem item_id.
                                               * @member {number} item_id
                                               * @memberof m_proto.ResBuyShopItem
                                               * @instance
                                               */
            ResBuyShopItem.prototype.item_id = 0; /**
                                                  * ResBuyShopItem buy_count.
                                                  * @member {number} buy_count
                                                  * @memberof m_proto.ResBuyShopItem
                                                  * @instance
                                                  */
            ResBuyShopItem.prototype.buy_count = 0; /**
                                                    * ResBuyShopItem reward_items.
                                                    * @member {Array.<m_proto.IItem>} reward_items
                                                    * @memberof m_proto.ResBuyShopItem
                                                    * @instance
                                                    */
            ResBuyShopItem.prototype.reward_items = $util.emptyArray; /**
                                                                      * Creates a new ResBuyShopItem instance using the specified properties.
                                                                      * @function create
                                                                      * @memberof m_proto.ResBuyShopItem
                                                                      * @static
                                                                      * @param {m_proto.IResBuyShopItem=} [properties] Properties to set
                                                                      * @returns {m_proto.ResBuyShopItem} ResBuyShopItem instance
                                                                      */
            ResBuyShopItem.create = function create(properties) {
              return new ResBuyShopItem(properties);
            }; /**
               * Encodes the specified ResBuyShopItem message. Does not implicitly {@link m_proto.ResBuyShopItem.verify|verify} messages.
               * @function encode
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {m_proto.IResBuyShopItem} message ResBuyShopItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuyShopItem.encode = function encode(message, writer) {
              if (!writer) writer = $Writer.create();
              if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32( /* id 1, wireType 0 =*/8).int32(message.code);
              if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) writer.uint32( /* id 2, wireType 0 =*/16).int32(message.item_id);
              if (message.buy_count != null && Object.hasOwnProperty.call(message, "buy_count")) writer.uint32( /* id 3, wireType 0 =*/24).int32(message.buy_count);
              if (message.reward_items != null && message.reward_items.length) for (var i = 0; i < message.reward_items.length; ++i) $root.m_proto.Item.encode(message.reward_items[i], writer.uint32( /* id 4, wireType 2 =*/34).fork()).ldelim();
              return writer;
            }; /**
               * Encodes the specified ResBuyShopItem message, length delimited. Does not implicitly {@link m_proto.ResBuyShopItem.verify|verify} messages.
               * @function encodeDelimited
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {m_proto.IResBuyShopItem} message ResBuyShopItem message or plain object to encode
               * @param {$protobuf.Writer} [writer] Writer to encode to
               * @returns {$protobuf.Writer} Writer
               */
            ResBuyShopItem.encodeDelimited = function encodeDelimited(message, writer) {
              return this.encode(message, writer).ldelim();
            }; /**
               * Decodes a ResBuyShopItem message from the specified reader or buffer.
               * @function decode
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @param {number} [length] Message length if known beforehand
               * @returns {m_proto.ResBuyShopItem} ResBuyShopItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuyShopItem.decode = function decode(reader, length) {
              if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
              var end = length === undefined ? reader.len : reader.pos + length,
                message = new $root.m_proto.ResBuyShopItem();
              while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                  case 1:
                    {
                      message.code = reader.int32();
                      break;
                    }
                  case 2:
                    {
                      message.item_id = reader.int32();
                      break;
                    }
                  case 3:
                    {
                      message.buy_count = reader.int32();
                      break;
                    }
                  case 4:
                    {
                      if (!(message.reward_items && message.reward_items.length)) message.reward_items = [];
                      message.reward_items.push($root.m_proto.Item.decode(reader, reader.uint32()));
                      break;
                    }
                  default:
                    reader.skipType(tag & 7);
                    break;
                }
              }
              return message;
            }; /**
               * Decodes a ResBuyShopItem message from the specified reader or buffer, length delimited.
               * @function decodeDelimited
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
               * @returns {m_proto.ResBuyShopItem} ResBuyShopItem
               * @throws {Error} If the payload is not a reader or valid buffer
               * @throws {$protobuf.util.ProtocolError} If required fields are missing
               */
            ResBuyShopItem.decodeDelimited = function decodeDelimited(reader) {
              if (!(reader instanceof $Reader)) reader = new $Reader(reader);
              return this.decode(reader, reader.uint32());
            }; /**
               * Verifies a ResBuyShopItem message.
               * @function verify
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {Object.<string,*>} message Plain object to verify
               * @returns {string|null} `null` if valid, otherwise the reason why it is not
               */
            ResBuyShopItem.verify = function verify(message) {
              if (typeof message !== "object" || message === null) return "object expected";
              if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected";
              if (message.item_id != null && message.hasOwnProperty("item_id")) if (!$util.isInteger(message.item_id)) return "item_id: integer expected";
              if (message.buy_count != null && message.hasOwnProperty("buy_count")) if (!$util.isInteger(message.buy_count)) return "buy_count: integer expected";
              if (message.reward_items != null && message.hasOwnProperty("reward_items")) {
                if (!Array.isArray(message.reward_items)) return "reward_items: array expected";
                for (var i = 0; i < message.reward_items.length; ++i) {
                  var error = $root.m_proto.Item.verify(message.reward_items[i]);
                  if (error) return "reward_items." + error;
                }
              }
              return null;
            }; /**
               * Creates a ResBuyShopItem message from a plain object. Also converts values to their respective internal types.
               * @function fromObject
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {Object.<string,*>} object Plain object
               * @returns {m_proto.ResBuyShopItem} ResBuyShopItem
               */
            ResBuyShopItem.fromObject = function fromObject(object) {
              if (object instanceof $root.m_proto.ResBuyShopItem) return object;
              var message = new $root.m_proto.ResBuyShopItem();
              if (object.code != null) message.code = object.code | 0;
              if (object.item_id != null) message.item_id = object.item_id | 0;
              if (object.buy_count != null) message.buy_count = object.buy_count | 0;
              if (object.reward_items) {
                if (!Array.isArray(object.reward_items)) throw TypeError(".m_proto.ResBuyShopItem.reward_items: array expected");
                message.reward_items = [];
                for (var i = 0; i < object.reward_items.length; ++i) {
                  if (typeof object.reward_items[i] !== "object") throw TypeError(".m_proto.ResBuyShopItem.reward_items: object expected");
                  message.reward_items[i] = $root.m_proto.Item.fromObject(object.reward_items[i]);
                }
              }
              return message;
            }; /**
               * Creates a plain object from a ResBuyShopItem message. Also converts values to other types if specified.
               * @function toObject
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {m_proto.ResBuyShopItem} message ResBuyShopItem
               * @param {$protobuf.IConversionOptions} [options] Conversion options
               * @returns {Object.<string,*>} Plain object
               */
            ResBuyShopItem.toObject = function toObject(message, options) {
              if (!options) options = {};
              var object = {};
              if (options.arrays || options.defaults) object.reward_items = [];
              if (options.defaults) {
                object.code = 0;
                object.item_id = 0;
                object.buy_count = 0;
              }
              if (message.code != null && message.hasOwnProperty("code")) object.code = message.code;
              if (message.item_id != null && message.hasOwnProperty("item_id")) object.item_id = message.item_id;
              if (message.buy_count != null && message.hasOwnProperty("buy_count")) object.buy_count = message.buy_count;
              if (message.reward_items && message.reward_items.length) {
                object.reward_items = [];
                for (var j = 0; j < message.reward_items.length; ++j) object.reward_items[j] = $root.m_proto.Item.toObject(message.reward_items[j], options);
              }
              return object;
            }; /**
               * Converts this ResBuyShopItem to JSON.
               * @function toJSON
               * @memberof m_proto.ResBuyShopItem
               * @instance
               * @returns {Object.<string,*>} JSON object
               */
            ResBuyShopItem.prototype.toJSON = function toJSON() {
              return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            }; /**
               * Gets the default type url for ResBuyShopItem
               * @function getTypeUrl
               * @memberof m_proto.ResBuyShopItem
               * @static
               * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
               * @returns {string} The default type url
               */
            ResBuyShopItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
              if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
              }
              return typeUrlPrefix + "/m_proto.ResBuyShopItem";
            };
            return ResBuyShopItem;
          }();
          return m_proto;
        }();
        module.exports = $root; // #endregion ORIGINAL CODE
        _cjsExports = exports('default', module.exports);
      }, function () {
        return {
          'protobufjs/minimal': __cjsMetaURL$1
        };
      });
    }
  };
});

System.register("chunks:///_virtual/proto.mjs_cjs=&original=.js", ['./proto.js', './cjs-loader.mjs'], function (exports, module) {
  var __cjsMetaURL, loader;
  return {
    setters: [function (module) {
      __cjsMetaURL = module.__cjsMetaURL;
      var _setter = {};
      _setter.__cjsMetaURL = module.__cjsMetaURL;
      _setter.default = module.default;
      exports(_setter);
    }, function (module) {
      loader = module.default;
    }],
    execute: function () {
      // I am the facade module who provides access to the CommonJS module './proto.js'~
      if (!__cjsMetaURL) {
        loader.throwInvalidWrapper('./proto.js', module.meta.url);
      }
      loader.require(__cjsMetaURL);
    }
  };
});

System.register("chunks:///_virtual/QiBingYing.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameEnum.ts', './BingYingModel.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './App.ts', './MovingSoldierNPC.ts', './MonitorType.ts', './EventType.ts', './TrainingMgr.ts', './Utils.ts', './ActionFramesItem.ts', './DBRecord.ts', './ModuleDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, Prefab, Vec3, BuildingBase, SoldierType, BuildingType, BuildingStatus, BingYingModel, PlaceGameMgr, PlaceConfigMgr, App, MovingSoldierNPC, MonitorType, EventType, TrainingMgr, Utils, ActionFramesItem, DBRecord, ModuleDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
      Prefab = module.Prefab;
      Vec3 = module.Vec3;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingType = module.BuildingType;
      BuildingStatus = module.BuildingStatus;
    }, function (module) {
      BingYingModel = module.BingYingModel;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MovingSoldierNPC = module.MovingSoldierNPC;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      TrainingMgr = module.TrainingMgr;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
      cclegacy._RF.push({}, "bab6b2dGAFI84Ndu0THxfgo", "QiBingYing", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 步兵营建筑类
       */
      var QiBingYing = exports('QiBingYing', (_dec = ccclass("QiBingYing"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "建造进度条",
        tooltip: "建造进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "建造时间",
        tooltip: "建造时间"
      }), _dec6 = property(Node), _dec7 = property({
        type: ActionFramesItem,
        displayName: "英雄模型",
        tooltip: "英雄模型"
      }), _dec8 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "可升级图标"
      }), _dec9 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec10 = property({
        type: Label,
        displayName: "升级时间",
        tooltip: "升级时间"
      }), _dec11 = property({
        type: Node,
        displayName: "进入路线",
        tooltip: "NPC进入步兵营路线规划"
      }), _dec12 = property({
        type: Node,
        displayName: "出门路线",
        tooltip: "NPC离开步兵营到指挥部路线规划"
      }), _dec13 = property(Node), _dec14 = property(Label), _dec15 = property(Node), _dec16 = property(Node), _dec17 = property(Prefab), _dec18 = property(Vec3), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(QiBingYing, _BuildingBase);
        function QiBingYing() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "jiaImg", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildProgress", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildTimeLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "heroAni", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "timeLab", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "inLine", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "outLine", _descriptor11, _assertThisInitialized(_this));
          /**
           * 训练中的NPC父容器节点
           */
          _initializerDefineProperty(_this, "trainingNPCParent", _descriptor12, _assertThisInitialized(_this));
          /**
           * 预备兵数量显示节点
           */
          _initializerDefineProperty(_this, "reserveCountLab", _descriptor13, _assertThisInitialized(_this));
          /**
           * 兵营按钮组合
           */
          _initializerDefineProperty(_this, "btnNode", _descriptor14, _assertThisInitialized(_this));
          /**
           * 所有设备节点父容器
           */
          _initializerDefineProperty(_this, "xlShebeiParent", _descriptor15, _assertThisInitialized(_this));
          /**
           * 移动士兵NPC预制体
           */
          _initializerDefineProperty(_this, "movingSoldierPrefab", _descriptor16, _assertThisInitialized(_this));
          /**
           * NPC到达兵营的目标位置
           */
          _initializerDefineProperty(_this, "npcArrivePos", _descriptor17, _assertThisInitialized(_this));
          /**
           * 数据模型
           */
          _this._dataModel = null;
          /**
           * 训练定时器
           */
          _this._xlTimer = null;
          /**
           * 建造定时器
           */
          _this._buildTimer = null;
          /**
           * 升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 训练设备管理器
           */
          _this.trainingMgr = null;
          /**
           * 当前移动中的NPC列表
           */
          _this._movingNPCs = [];
          /**
           * 预备役NPC创建定时器ID列表
           */
          _this._reserveNPCTimers = [];
          /**
           * 前端记录的训练完成数量
           */
          _this._frontendReserveCount = 0;
          /**
           * 总训练数量（本次训练）
           */
          _this._totalTrainingCount = 0;
          /**
           * 每个NPC的训练时长
           */
          _this._trainingDuration = 0;
          /**
           * 转向对应关系
           */
          _this.inFaceMap = new Map([[1, 2], [2, 2], [3, 1], [3, 1]]);
          /**
           * 出门路线对应关系
           */
          _this.outFaceMap = new Map([[1, 2], [2, 2], [3, 1], [4, 1], [5, 2], [6, 2], [8, 2], [9, 2]]);
          _this.poolName = "MovingSoldierNPC_QB";
          return _this;
        }
        var _proto = QiBingYing.prototype;
        /**
         * 组件启用时的初始化
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
          this.initTrainingMgr();

          // 初始化对象池
          if (this.movingSoldierPrefab) {
            App.nodePoolMgr.createPool(this.poolName, this.movingSoldierPrefab, {
              preloadCount: 10,
              maxSize: 20,
              autoExpand: true
            });
          }
        }

        /**
         * 初始化训练设备管理器
         */;
        _proto.initTrainingMgr = function initTrainingMgr() {
          var _this2 = this;
          this.trainingMgr = new TrainingMgr();
          this.trainingMgr.initialize(this.xlShebeiParent, this.trainingNPCParent, SoldierType.QiBing, BuildingType.QiBingYing, function (npcId) {
            return _this2.onSingleTrainingComplete(npcId);
          });
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrain, this.resTrain, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrainFinish, this.resTrainFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(EventType.BuildingBtnClick, this.buildingBtnClick, this);
          App.monitorMgr.addEventListener(EventType.Close_Build_XunLianBtns, this.closeBuildXunLianBtns, this);
          App.monitorMgr.addEventListener(EventType.ui_open, this.closeBuildXunLianBtns, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopBuildTimer();
          this.stopUpgradeTimer();
          this.stopXLTimer();
          this.clearReserveNPCTimers();
          this.unscheduleAllCallbacks();
          for (var _iterator = _createForOfIteratorHelperLoose(this._movingNPCs), _step; !(_step = _iterator()).done;) {
            var npc = _step.value;
            if (npc && npc.node && npc.node.isValid) {
              npc.stopAndDestroy(this.poolName);
            }
          }
          this._movingNPCs = [];
          if (this.trainingMgr) {
            this.trainingMgr.destroy();
            this.trainingMgr = null;
          }
        }
        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.startUpgradeTimer();
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 训练协议响应
         */;
        _proto.resTrain = function resTrain(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this._totalTrainingCount = msg.train_count;
          this._trainingDuration = msg.training_duration;
          App.log.logBusiness("\u670D\u52A1\u5668\u8FD4\u56DE \u6B65\u5175\u8425\u8BAD\u7EC3\u5F00\u59CB - \u65B0\u589E\u6570\u91CF: " + msg.count + ", \u7D2F\u8BA1\u603B\u6570: " + this._totalTrainingCount + ", \u65F6\u957F: " + msg.training_duration + "\u6BEB\u79D2");
          this.createMovingNPCs(msg.count, this._trainingDuration);
          this.startXLTimer();
          this.updateView();
        }

        /**
         * 从路径节点中获取路径点数组
         * @param pathNode 路径节点，包含多个point子节点
         * @param npcLayer NPC父容器节点
         * @returns 路径点数组（世界坐标转换为父容器本地坐标）
         */;
        _proto.getPathPoints = function getPathPoints(pathNode, npcLayer) {
          var pathPoints = [];
          if (!pathNode) {
            return pathPoints;
          }

          // 获取所有子节点，按名称排序（point1, point2, ...）
          var pointNodes = pathNode.children.sort(function (a, b) {
            var aNum = parseInt(a.name.replace("point", "")) || 0;
            var bNum = parseInt(b.name.replace("point", "")) || 0;
            return aNum - bNum;
          });

          // 转换路径点为世界坐标
          for (var _iterator2 = _createForOfIteratorHelperLoose(pointNodes), _step2; !(_step2 = _iterator2()).done;) {
            var pointNode = _step2.value;
            var worldPos = pointNode.getWorldPosition();
            var localPos = npcLayer.inverseTransformPoint(new Vec3(), worldPos);
            pathPoints.push(localPos);
          }
          return pathPoints;
        }

        /**
         * 创建移动中的士兵NPC
         * @param count 士兵数量
         * @param trainingDuration 训练时长
         */;
        _proto.createMovingNPCs = function createMovingNPCs(count, trainingDuration) {
          var _this3 = this;
          if (!this.movingSoldierPrefab) {
            App.log.logError("步兵营：移动NPC预制体未设置");
            return;
          }
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            return;
          }
          var pathPoints = this.getPathPoints(this.inLine, npcLayer);
          var startPos = pathPoints[0];
          for (var i = 0; i < count; i++) {
            (function (npcId) {
              _this3.scheduleOnce(function () {
                var npcNode = App.nodePoolMgr.getNode(_this3.poolName);
                if (!npcNode) {
                  App.log.logError("\u521B\u5EFA\u79FB\u52A8NPC\u5931\u8D25: " + npcId);
                  return;
                }
                npcLayer.addChild(npcNode);
                npcNode.setPosition(startPos);
                var movingNPC = npcNode.getComponent(MovingSoldierNPC);
                if (!movingNPC) {
                  App.nodePoolMgr.putNode(_this3.poolName, npcNode);
                  return;
                }
                var faceDirection = _this3.inFaceMap.get(1) || 1;
                movingNPC.setFaceDirection(faceDirection);
                _this3._movingNPCs.push(movingNPC);

                // 开始沿路径点移动
                var resourceConfig = {
                  module: ModuleDef.NPC,
                  name: "npc_xiaoji",
                  action: "Move"
                };
                movingNPC.startMoveAlongPath(pathPoints, function (id, npc) {
                  _this3.onNPCArriveCallFunc(id, npc, trainingDuration);
                }, npcId, _this3.inFaceMap, resourceConfig);
              }, npcId * 0.5);
            })(i);
          }
        }

        /**
         * 创建模型移动到指挥部
         * @param count
         * @returns
         */;
        _proto.createMovingNPCsFromReserve = function createMovingNPCsFromReserve(count) {
          var _this4 = this;
          if (!this.movingSoldierPrefab) {
            App.log.logError("仓库：移动NPC预制体未设置");
            return;
          }
          this.clearReserveNPCTimers();
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            return;
          }
          var pathPoints = this.getPathPoints(this.outLine, npcLayer);
          for (var i = 0; i < count; i++) {
            (function (npcId) {
              var timerId = _this4.scheduleOnce(function () {
                // 使用对象池获取NPC节点
                var npcNode = App.nodePoolMgr.getNode(_this4.poolName);
                if (!npcNode) {
                  App.log.logError("\u521B\u5EFA\u79FB\u52A8NPC\u5931\u8D25: " + npcId);
                  return;
                }
                npcLayer.addChild(npcNode);
                var startWorldPos = _this4.node.getWorldPosition();
                var localStartPos = npcLayer.inverseTransformPoint(new Vec3(), startWorldPos);
                npcNode.setPosition(localStartPos);
                var movingNPC = npcNode.getComponent(MovingSoldierNPC);
                if (!movingNPC) {
                  npcNode.destroy();
                  return;
                }

                // 设置NPC朝向
                var faceDirection = _this4.outFaceMap.get(1) || 1;
                movingNPC.setFaceDirection(faceDirection);
                _this4._movingNPCs.push(movingNPC);

                // 开始沿路径点移动
                var resourceConfig = {
                  module: ModuleDef.SOLDIER,
                  name: "qingqibing",
                  action: "Move"
                };
                movingNPC.startMoveAlongPath(pathPoints, function (id, npc) {
                  App.log.logBusiness("\u9884\u5907\u5F79NPC " + id + " \u5230\u8FBE\u76EE\u7684\u5730");
                  var index = _this4._movingNPCs.indexOf(npc);
                  if (index !== -1) {
                    _this4._movingNPCs.splice(index, 1);
                  }
                  npc.stopAndDestroy(_this4.poolName);
                }, npcId, _this4.outFaceMap, resourceConfig);
              }, npcId * 0.7);
              _this4._reserveNPCTimers.push(timerId);
            })(i);
          }
        }

        /**
         * NPC到达兵营回调（第一阶段）
         * @param npcId NPC ID
         * @param npc NPC组件
         * @param trainingDuration 训练时长
         */;
        _proto.onNPCArriveCallFunc = function onNPCArriveCallFunc(npcId, npc, trainingDuration) {
          App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5230\u8FBE\u5175\u8425\uFF0C\u68C0\u67E5\u7A7A\u95F2\u8BBE\u5907");
          if (!this.trainingMgr) {
            var index = this._movingNPCs.indexOf(npc);
            if (index !== -1) {
              this._movingNPCs.splice(index, 1);
            }
            npc.stopAndDestroy(this.poolName);
            return;
          }
          var trainingNPCNode = this.trainingMgr.getFreeEquipmentNode();
          if (trainingNPCNode) {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u83B7\u53D6\u5230\u7A7A\u95F2\u8BBE\u5907\uFF08\u5DF2\u9884\u5360\u7528\uFF09\uFF0C\u7EE7\u7EED\u79FB\u52A8\u5230\u8BBE\u5907\u4F4D\u7F6E");
            this.moveToEquipment(npc, npcId, trainingNPCNode, trainingDuration);
          } else {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u65E0\u7A7A\u95F2\u8BBE\u5907\uFF0C\u76F4\u63A5\u9500\u6BC1");
            // 没有空闲设备，直接销毁
            var _index = this._movingNPCs.indexOf(npc);
            if (_index !== -1) {
              this._movingNPCs.splice(_index, 1);
            }
            npc.stopAndDestroy(this.poolName);
          }
        }

        /**
         * NPC移动到训练设备（第二阶段）
         * @param npc NPC组件
         * @param npcId NPC ID
         * @param trainingNPCNode 目标设备的TrainingNPC节点
         * @param trainingDuration 训练时长
         */;
        _proto.moveToEquipment = function moveToEquipment(npc, npcId, trainingNPCNode, trainingDuration) {
          var _this5 = this;
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            npc.stopAndDestroy(this.poolName);
            return;
          }
          var targetWorldPos = trainingNPCNode.getWorldPosition();
          var localTargetPos = npcLayer.inverseTransformPoint(new Vec3(), targetWorldPos);
          var resourceConfig = {
            module: ModuleDef.NPC,
            name: "npc_xiaoji",
            action: "Move"
          };
          npc.startMoveTo(localTargetPos, function (id, npcObj) {
            _this5.onNPCArriveEquipment(id, npcObj, trainingNPCNode, trainingDuration);
          }, npcId, resourceConfig);
        }

        /**
         * NPC到达训练设备回调（第二阶段）
         * @param npcId NPC ID
         * @param npc NPC组件
         * @param trainingNPCNode 目标设备的TrainingNPC节点
         * @param trainingDuration 训练时长
         */;
        _proto.onNPCArriveEquipment = function onNPCArriveEquipment(npcId, npc, trainingNPCNode, trainingDuration) {
          App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5230\u8FBE\u8BAD\u7EC3\u8BBE\u5907\u4F4D\u7F6E");
          var index = this._movingNPCs.indexOf(npc);
          if (index !== -1) {
            this._movingNPCs.splice(index, 1);
          }
          npc.stopAndDestroy(this.poolName);
          if (!this.trainingMgr) {
            App.log.logError("\u6B65\u5175\u8425: trainingMgr\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F00\u59CB\u8BAD\u7EC3");
            return;
          }
          var started = this.trainingMgr.occupyEquipmentByNode(trainingNPCNode, npcId, trainingDuration);
          if (started) {
            App.log.logBusiness("\u6B65\u5175\u8425: NPC " + npcId + " \u5F00\u59CB\u5728\u8BBE\u5907\u4E0A\u8BAD\u7EC3");
          } else {
            App.log.logError("\u6B65\u5175\u8425: NPC " + npcId + " \u65E0\u6CD5\u5F00\u59CB\u8BAD\u7EC3\uFF0C\u8BBE\u5907\u72B6\u6001\u5F02\u5E38");
          }
        }

        /**
         * 单个训练完成回调
         * 这是停止训练定时器的统一出口
         * @param npcId 完成训练的NPC ID
         */;
        _proto.onSingleTrainingComplete = function onSingleTrainingComplete(npcId) {
          App.log.logBusiness("NPC " + npcId + " \u5B8C\u6210\u8BAD\u7EC3");
          this.playTrainingCompleteAnimation(npcId);
          this._frontendReserveCount++;
          App.log.logBusiness("\u8BAD\u7EC3\u8FDB\u5EA6: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
          if (this._frontendReserveCount >= this._totalTrainingCount) {
            App.log.logBusiness("\u6240\u6709NPC\u90FD\u5B8C\u6210\u4E86\u8BAD\u7EC3\uFF0C\u524D\u7AEF\u8BB0\u5F55: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
            this.stopXLTimer();
            this._frontendReserveCount = 0;
            this._totalTrainingCount = 0;
          }
        }

        /**
         * 播放训练完成动画
         * @param npcId NPC ID
         */;
        _proto.playTrainingCompleteAnimation = function playTrainingCompleteAnimation(npcId) {
          if (!this.movingSoldierPrefab) {
            return;
          }
        }

        /**
         * 训练完成协议响应
         */;
        _proto.resTrainFinish = function resTrainFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          if (this._dataModel.serverData) {
            this._dataModel.serverData.reserve_count = msg.reserve_count;
            this._dataModel.serverData.train_count = msg.train_count;
          }
          this.updateReserveCount();
          App.log.logBusiness("\u540E\u7AEF\u6B65\u5175\u8425\u8BAD\u7EC3\u5B8C\u6210 - \u9884\u5907\u5F79: " + msg.reserve_count + ", \u8BAD\u7EC3\u4E2D: " + msg.train_count + ", \u524D\u7AEF\u8BB0\u5F55: " + this._frontendReserveCount + "/" + this._totalTrainingCount);
        }

        /**
         * 当建筑数据更新时调用
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 启动建造倒计时
         */;
        _proto.startBuildTimer = function startBuildTimer() {
          var _this6 = this;
          if (this.dataModel.status !== BuildingStatus.BUILDING) {
            this.buildProgress.node.active = false;
            return;
          }
          if (this._buildTimer) {
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("出错 还没解锁");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.buildProgress.node.active = true;
          this.jiaImg.active = false;
          this.buildProgress.progress = this.dataModel.getBuildProgress();
          if (this.buildTimeLab) {
            this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          }
          this._buildTimer = setInterval(function () {
            _this6.onBuildTimerUpdate();
          }, 1000);
        }

        /**
         * 停止建造倒计时
         */;
        _proto.stopBuildTimer = function stopBuildTimer() {
          this.dataModel.completeBuilding();
          if (this.buildProgress.node) {
            this.buildProgress.node.active = false;
          }
          if (this._buildTimer) {
            clearInterval(this._buildTimer);
            this._buildTimer = null;
          }
        }

        /**
         * 建造更新
         */;
        _proto.onBuildTimerUpdate = function onBuildTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.buildProgress.progress = this.dataModel.getBuildProgress();
            if (this.buildTimeLab) {
              this.buildTimeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
            }
          } else {
            this.stopBuildTimer();
          }
        }

        /**
         * 启动升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this7 = this;
          if (!this.dataModel.isUpgrading) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("步兵营建筑已经达到最高级");
            return;
          }
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          if (remainTime <= 0) {
            this.stopUpgradeTimer();
            this.upgradeProgressBar.node.active = false;
            return;
          }
          if (this._upgradeTimer && Math.abs(this.dataModel.getRemainBuildTime() - remainTime) < 0.5) {
            return;
          }
          this.stopUpgradeTimer();
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, nextLevel);
          this.upgradeProgressBar.node.active = true;
          this.dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this7.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 升级计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this.dataModel.getRemainBuildTime() > 0) {
            this.dataModel.decreaseBuildTime(1);
            this.upgradeProgressBar.progress = this.dataModel.getBuildProgress();
            this.timeLab.string = Utils.timeFormat(this.dataModel.getRemainBuildTime());
          } else {
            this.stopUpgradeTimer();
          }
        }

        /**
         * 开始训练定时器
         */;
        _proto.startXLTimer = function startXLTimer() {
          var _this8 = this;
          if (this._xlTimer) {
            App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u8BAD\u7EC3\u5B9A\u65F6\u5668\u5DF2\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u542F\u52A8");
            return;
          }
          App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u542F\u52A8\u8BAD\u7EC3\u5B9A\u65F6\u5668\uFF0C\u95F4\u9694100ms");
          this._xlTimer = setInterval(function () {
            _this8.updateXLProgress();
          }, 100);
        }

        /**
         * 停止训练定时器
         */;
        _proto.stopXLTimer = function stopXLTimer() {
          if (this._xlTimer) {
            App.log.logBusiness("\u6B65\u5175\u8425[" + this._dataModel.buildingUid + "] \u505C\u6B62\u8BAD\u7EC3\u5B9A\u65F6\u5668");
            clearInterval(this._xlTimer);
            this._xlTimer = null;
          }
        }

        /**
         * 更新训练进度
         */;
        _proto.updateXLProgress = function updateXLProgress() {
          if (!this.trainingMgr) return;
          this.trainingMgr.updateProgress(100);
          this.updateReserveCount();
        };
        _proto.closeBuildXunLianBtns = function closeBuildXunLianBtns() {
          this.btnNode.active = false;
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this._dataModel) return;
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.buildProgress.node.active = false;
            this.jiaImg.active = true;
            return;
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            this.jiaImg.active = false;
            this.startBuildTimer();
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateReserveCount();
          this.updateBuildImg();
          this.updateLevUpImg();
          if (this.dataModel.isUpgrading) {
            this.startUpgradeTimer();
          } else {
            this.upgradeProgressBar.node.active = false;
          }
          if (this.dataModel.serverData.entry_hero > 0) {
            this.heroAni.node.active = true;
            var heroCfg = DBRecord.fetchId("Hero", this.dataModel.serverData.entry_hero);
            if (heroCfg) {
              this.heroAni.playWithResource(ModuleDef.HERO, heroCfg.res, "Idle");
            }
          } else {
            this.heroAni.node.active = false;
          }
        }

        /**
         * 更新可升级图片显示
         * @returns
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this.dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 更新预备役士兵数量显示
         * 只显示服务器数据
         */;
        _proto.updateReserveCount = function updateReserveCount() {
          if (!this.reserveCountLab || !this._dataModel) return;
          this.reserveCountLab.string = "" + (this._dataModel.reserveCount || 0);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          if (this.btnNode.active) {
            this.btnNode.active = false;
            return;
          }
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            this.btnNode.active = true;
            App.monitorMgr.dispatchEvent(EventType.BuildingBtnClick, this.dataModel.buildingUid);
          }
        };
        _proto.buildingBtnClick = function buildingBtnClick(buildingUid) {
          if (!this.dataModel) return;
          if (this.dataModel.buildingUid === buildingUid) {
            return;
          }
          this.btnNode.active = false;
        }

        /**
         * 升级按钮点击
         */;
        _proto.onBtnUpgradeClick = function onBtnUpgradeClick() {
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            return;
          }
          if (this.dataModel.isUpgrading) {
            PlaceGameMgr.inst.showBuildUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          }
        }

        /**
         * 训练按钮点击
         */;
        _proto.onBtnXunLianClick = function onBtnXunLianClick() {
          this.btnNode.active = false;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            return;
          }
          PlaceGameMgr.inst.showTrainingView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
        }

        /**
         * 领取预备役士兵
         * @returns 领取预备役士兵
         */;
        _proto.onCangKuClick = function onCangKuClick() {
          var reserveCount = this._dataModel.reserveCount || 0;
          if (reserveCount <= 0) {
            App.log.logBusiness("没有预备役士兵可以领取");
            return;
          }
          this.createMovingNPCsFromReserve(reserveCount);
          PlaceGameMgr.inst.reqGetReserve(this.dataModel.buildingUid, this.dataModel.buildType);
        };
        _proto.clearReserveNPCTimers = function clearReserveNPCTimers() {
          var _this9 = this;
          this._reserveNPCTimers.forEach(function (timerId) {
            _this9.unschedule(timerId);
          });
          this._reserveNPCTimers = [];
        }

        //==============================子类方法重载=======================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          App.log.logBusiness("\u6B65\u5175\u8425: \u521D\u59CB\u5316\u6570\u636E\u6A21\u578B - \u5E8F\u5217\u53F7: " + this.buildIndex);
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.QiBingYing;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new BingYingModel(buildingUid, buildingType, buildingIndex, buildingLevel, this);
          this._dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          var oldLevel = this.dataModel.level;
          this.dataModel.setServerData(data);
          if (!this.dataModel.isUnlocked) {
            this.dataModel.status = BuildingStatus.LOCK;
          } else {
            this.dataModel.status = BuildingStatus.IDLE;
          }
          if (data) {
            if (data.building_level !== oldLevel) {
              this.dataModel.level = data.building_level;
            }
            if (data.building_level <= 0 && data.upgrade_duration > 0) {
              this.dataModel.status = BuildingStatus.BUILDING;
              this.dataModel.isUpgrading = false;
            } else if (data.building_level > 0 && data.upgrade_duration > 0) {
              this.dataModel.isUpgrading = true;
            } else {
              this.dataModel.isUpgrading = false;
              this.dataModel.completeBuilding();
            }
          } else {
            this.dataModel.isUpgrading = false;
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        }

        /**
         * 播放升级动画
         */;
        _proto.playUpLevelAni = function playUpLevelAni() {
          // TODO: 播放升级动画
        }
        //==============================子类方法重载=======================================
        ;

        _createClass(QiBingYing, [{
          key: "dataModel",
          get:
          /**
           * 获取数据模型
           */
          function get() {
            return this._dataModel;
          }
        }]);
        return QiBingYing;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "jiaImg", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "buildProgress", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "buildTimeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "heroAni", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "inLine", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "outLine", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "trainingNPCParent", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "reserveCountLab", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "btnNode", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "xlShebeiParent", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "movingSoldierPrefab", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "npcArrivePos", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return new Vec3(0, 0, 0);
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RandomUtils.ts", ['cc'], function () {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b25f4JcGnRDaLxL1lS5SSL5", "RandomUtils", undefined);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ReDefineTableViewRender.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIRenderer;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UIRenderer = module.UIRenderer;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "b7a4cPjRrpCiolk4Fm+LUxk", "ReDefineTableViewRender", undefined);
      var _cc$_decorator = _decorator,
        ccclass = _cc$_decorator.ccclass,
        property = _cc$_decorator.property;
      var ReDefineTableViewRender = exports('ReDefineTableViewRender', (_dec = ccclass("ReDefineTableViewRender"), _dec(_class = /*#__PURE__*/function (_cc$UIRenderer) {
        _inheritsLoose(ReDefineTableViewRender, _cc$UIRenderer);
        function ReDefineTableViewRender() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _cc$UIRenderer.call.apply(_cc$UIRenderer, [this].concat(args)) || this;
          _this.m_tableView = null;
          return _this;
        }
        var _proto = ReDefineTableViewRender.prototype;
        _proto.onEnable = function onEnable() {
          if (this.m_tableView === null) return;
          var shownodes = this.m_tableView.m_showNodes;
          var freeNodes = this.m_tableView.m_freeNodes;
          if (shownodes) {
            shownodes.forEach(function (cell) {
              cell.__redefineInit();
            });
          }
          if (freeNodes) {
            freeNodes.forEach(function (cell) {
              cell.__redefineInit();
            });
          }
        };
        _proto.onDisable = function onDisable() {
          if (this.m_tableView === null) return;
          var shownodes = this.m_tableView.m_showNodes;
          var freeNodes = this.m_tableView.m_freeNodes;
          if (shownodes) {
            shownodes.forEach(function (cell) {
              cell.___redefineReset();
            });
          }
          if (freeNodes) {
            freeNodes.forEach(function (cell) {
              cell.___redefineReset();
            });
          }
        };
        _proto.setTableView = function setTableView(tableview) {
          this.m_tableView = tableview;
        };
        _proto.updateAssembler = function updateAssembler(batcher) {};
        _proto.postUpdateAssembler = function postUpdateAssembler(batcher) {
          var shownodes = this.m_tableView.m_showNodes;
          if (shownodes === null || shownodes.size <= 0) return;
          var isfinish = false;
          var _loop = function _loop(level) {
            if (isfinish) return 1; // break
            shownodes.forEach(function (cell) {
              if (!cell.__renderUI(level, batcher)) {
                isfinish = true;
              }
            });
          };
          for (var level = 0;; level++) {
            if (_loop(level)) break;
          }
        };
        return ReDefineTableViewRender;
      }(UIRenderer)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RedPointCompont.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RedPointScript.ts', './Utils.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UITransform, Vec3, Component, PositionRed, Utils;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
      Component = module.Component;
    }, function (module) {
      PositionRed = module.PositionRed;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _class;
      cclegacy._RF.push({}, "86a1aHoD4BOt7dL2Jfk1fP6", "RedPointCompont", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu;
      /** 红点脚本  */
      var RedPointCompont = exports('RedPointCompont', (_dec = ccclass("RedPointCompont"), _dec2 = menu("Z框架基类/RedPointCompont"), _dec(_class = _dec2(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(RedPointCompont, _Component);
        function RedPointCompont() {
          return _Component.apply(this, arguments) || this;
        }
        var _proto = RedPointCompont.prototype;
        // 设置位置
        _proto.setPosition = function setPosition(position, node) {
          var _parent$getComponent;
          var parent = this.node.parent;
          if (!parent) {
            return;
          }
          var size = (_parent$getComponent = parent.getComponent(UITransform)) == null ? void 0 : _parent$getComponent.contentSize;
          var v3 = new Vec3();
          switch (position // 红点偏移量在这里改
          ) {
            case PositionRed.TOP_LEFT:
              {
                v3.x = -size.width / 2;
                v3.y = size.height / 2;
                break;
              }
            case PositionRed.TOP_RIGHT:
              {
                v3.x = size.width / 2;
                v3.y = size.height / 2;
                break;
              }
          }
          this.node.setPosition(v3);
          var v0 = new Vec3(v3);
          if (node) {
            var nowParentNode = this.node.parent.parent;
            var nowNode = this.node.parent;
            while (nowParentNode.name !== node.parent.name) {
              v0 = Utils.convertLocalPosition(nowNode, nowParentNode, v0);
              nowParentNode = nowParentNode.parent;
            }
            v0 = Utils.convertLocalPosition(nowNode, node, v0);
            this.node.removeFromParent();
            node.addChild(this.node);
            this.node.setPosition(v0);
          }
        };
        _proto.setRedVisible = function setRedVisible(b) {
          this.node.active = b;
        };
        _proto.reset = function reset() {};
        return RedPointCompont;
      }(Component)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RedPointEnum.ts", ['cc'], function (exports) {
  var cclegacy, _decorator, Enum;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Enum = module.Enum;
    }],
    execute: function () {
      cclegacy._RF.push({}, "5f448u7Ho9OC6eZd3Anyxos", "RedPointEnum", undefined);
      var ccclass = _decorator.ccclass;
      var RedPointEnum = exports('RedPointEnum', /*#__PURE__*/function (RedPointEnum) {
        RedPointEnum[RedPointEnum["null"] = 0] = "null";
        RedPointEnum[RedPointEnum["main_fuben"] = 1] = "main_fuben";
        RedPointEnum[RedPointEnum["huoban"] = 2] = "huoban";
        RedPointEnum[RedPointEnum["huoban_zhujue"] = 3] = "huoban_zhujue";
        RedPointEnum[RedPointEnum["zhujue"] = 4] = "zhujue";
        RedPointEnum[RedPointEnum["zhunagbei"] = 5] = "zhunagbei";
        RedPointEnum[RedPointEnum["shop"] = 6] = "shop";
        return RedPointEnum;
      }({}));
      Enum(RedPointEnum);
      var RedpointGroup = exports('RedpointGroup', function RedpointGroup() {
        RedpointGroup.zhujue = [RedPointEnum.zhujue, RedPointEnum.huoban_zhujue];
      });
      RedpointGroup.zhujue = void 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RedPointEnum2.ts", ['cc'], function (exports) {
  var cclegacy, _decorator, Enum;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Enum = module.Enum;
    }],
    execute: function () {
      cclegacy._RF.push({}, "fef42RVenRJRKyyoIeCpjOp", "RedPointEnum", undefined);
      var ccclass = _decorator.ccclass;
      var RedPointEnum = exports('RedPointEnum', /*#__PURE__*/function (RedPointEnum) {
        RedPointEnum[RedPointEnum["null"] = 0] = "null";
        RedPointEnum[RedPointEnum["main_fuben"] = 1] = "main_fuben";
        RedPointEnum[RedPointEnum["huoban"] = 2] = "huoban";
        RedPointEnum[RedPointEnum["huoban_zhujue"] = 3] = "huoban_zhujue";
        RedPointEnum[RedPointEnum["zhujue"] = 4] = "zhujue";
        RedPointEnum[RedPointEnum["zhunagbei"] = 5] = "zhunagbei";
        RedPointEnum[RedPointEnum["shop"] = 6] = "shop";
        return RedPointEnum;
      }({}));
      Enum(RedPointEnum);
      var RedpointGroup = exports('RedpointGroup', function RedpointGroup() {
        RedpointGroup.zhujue = [RedPointEnum.zhujue, RedPointEnum.huoban_zhujue];
      });
      RedpointGroup.zhujue = void 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RedPointMgr.ts", ['cc', './MonitorType.ts', './SystemDef.ts', './UtilGame.ts', './App.ts', './EventType.ts'], function (exports) {
  var cclegacy, MonitorType, SYS_ID, UtilGame, App, EventType;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      SYS_ID = module.SYS_ID;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "015d33AAlFBiqCXipypZgjB", "RedPointMgr", undefined);
      var RedPointMgr = exports('RedPointMgr', /*#__PURE__*/function () {
        function RedPointMgr() {
          this._redTree = {};
          this._redTemp = {};
        }
        var _proto = RedPointMgr.prototype;
        //-----------------------------------------------------------------------------------------------------------
        _proto.init = function init() {
          this.initRedTree();
          App.monitorMgr.addEventListener(EventType.ui_open, this.onUiOpen, this);
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
        };
        _proto.onUiOpen = function onUiOpen(data) {
          var sysId = App.lockMgr.getSysIdByUi(data.uiName);
          delete this._redTemp[sysId];
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.initRedTree = function initRedTree() {
          this._initMainRedTree();
          this._initMenuRedTree();
        };
        _proto._initMainRedTree = function _initMainRedTree() {
          var redTree = this._redTree;

          // 赛季
          redTree['_uiSeasonAll'] = {
            chkRedSeason: true
          };

          // 商城
          redTree['_uiShopAll'] = {
            chkRedShopTab0: {
              chkRedShopBox: true
            },
            chkRedShopTab1: {
              chkRedShopProp: true,
              chkRedShopGold: true,
              chkRedShopZhengPin: true
            }
          };

          //背包
          redTree['_uiHero'] = {
            chkRedLevel: true,
            chkRedBagFull: true,
            chkRedBagTab1: true,
            chkRedBagTab2: {
              chkRedEquipWear: true
            },
            chkRedBagTab3: {
              chkRedGemWear: true,
              chkRedGemMerge: true,
              chkRedGemMaster: true
            }
          };

          // 技能
          redTree['_uiGouYu'] = {
            chkPageSkill: true,
            chkPageGift: true,
            chkPageGouYu: {
              chkGouYuMerge: true,
              chkGouYuWear: true
            }
          };

          // 试炼
          redTree['_uiTrialView'] = {
            chkMiJingB: true,
            chkMiJingA: true,
            chkWorldBoss: true
          };

          // 选择关卡
          redTree['_uiSelectLevel'] = {
            chkPassFirst: true,
            chkPassFast: true,
            chkPaTa: true
          };
          this._redTree['timeActivity'] = {
            chkWorldBoss: true
          };
        };
        _proto._initMenuRedTree = function _initMenuRedTree() {
          var redTree = this._redTree;

          // 日常任务
          redTree['_uiTask'] = {
            chkRedTaskDaily: true
          };

          // 邮件
          redTree['_uiEmail'] = {
            checkEmailRedPoint: true
          };

          // 猫屋
          redTree['_uiMaoWu'] = {
            chkRedTiredCat: true
          };

          // 排行榜
          redTree['_uiRank'] = {};

          // 充值返利
          redTree['_uiRechargeRebate'] = {
            chkRedAccRechargeFL: true
          };

          // RPK社区
          redTree['_uiRPKSheQu'] = {
            chkRedRPKAward: true
          };

          //洗练
          redTree['_uiForge'] = {
            chkRedEquiupForge2: true
          };

          //符石
          redTree['_uiFuShi'] = {
            chkRedFushi: true
          };

          //微信分享
          redTree['_uiWxShareActivity'] = {
            chkRedWxShare: true
          };

          //宠物玩法
          redTree['_uiLinDi'] = {
            chkRedPaiQian: true,
            chkRedKuang: true
          };

          //问卷调查
          redTree['_uiQuestionnaire'] = {
            chkRedQuestionnaire: true
          };
        };
        _proto.initTempRed = function initTempRed() {
          var itemId = UtilGame.getGlobalVal(138);
          var itemConfig = App.bagMgr.getItemConfig(itemId);
          if (itemConfig && UtilGame.chkCost([[itemConfig.id, 1]])) {
            this._redTemp[SYS_ID.JJC] = 1;
          }
        };
        _proto.setTempRed = function setTempRed(key, val) {
          this._redTemp[key] = val;
          App.monitorMgr.dispatchEvent(MonitorType.red_temp, [key, val]);
        };
        _proto.getTempRed = function getTempRed(key) {
          return this._redTemp[key];
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._findTree = function _findTree(key0, tree) {
          for (var key1 in tree) {
            if (key1 === key0) return tree;
            if (typeof tree[key1] === 'object') {
              var temp = this._findTree(key0, tree[key1]);
              if (temp) return temp;
            }
          }
        };
        _proto.chkRedPoint = function chkRedPoint(key0, tree) {
          if (!key0) {
            return false;
          }
          if (!tree) {
            tree = this._findTree(key0, this._redTree) || {};
          }
          var val0 = tree[key0];
          if (val0 === true) {
            return this["" + key0]();
          } else if (typeof val0 === 'object') {
            for (var key1 in val0) {
              if (this.chkRedPoint(key1, val0)) return true;
            }
          }
          return false;
        };
        return RedPointMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RedPointScript.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RedPointEnum.ts', './MonitorType.ts', './ModuleDef.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _initializerDefineProperty, _inheritsLoose, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Enum, CCString, Node, assetManager, Component, Prefab, instantiate, RedPointEnum, MonitorType, ModuleDef, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _initializerDefineProperty = module.initializerDefineProperty;
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Enum = module.Enum;
      CCString = module.CCString;
      Node = module.Node;
      assetManager = module.assetManager;
      Component = module.Component;
      Prefab = module.Prefab;
      instantiate = module.instantiate;
    }, function (module) {
      RedPointEnum = module.RedPointEnum;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _dec5, _dec6, _dec7, _class4, _class5, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "7139aQve5BLTrlMW1vxv393", "RedPointScript", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      // 徽标位置
      var PositionRed = exports('PositionRed', /*#__PURE__*/function (PositionRed) {
        PositionRed[PositionRed["TOP_LEFT"] = 0] = "TOP_LEFT";
        PositionRed[PositionRed["TOP_RIGHT"] = 1] = "TOP_RIGHT";
        return PositionRed;
      }({}));
      Enum(PositionRed);
      var RedPointData = exports('RedPointData', (_dec = ccclass("RedPointData"), _dec2 = property(CCString), _dec(_class = (_class2 = function RedPointData() {
        _initializerDefineProperty(this, "redType", _descriptor, this);
      }, _descriptor = _applyDecoratedDescriptor(_class2.prototype, "redType", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return "";
        }
      }), _class2)) || _class));

      /** 红点脚本  */
      var RedPointScript = exports('default', (_dec3 = ccclass("RedPointScript"), _dec4 = menu("性能优化/RedPointScript"), _dec5 = property({
        type: [RedPointData],
        tooltip: "红点类型"
      }), _dec6 = property({
        type: PositionRed,
        tooltip: "位置\n 0: 左上角 \n 1: 右上角"
      }), _dec7 = property(Node), _dec3(_class4 = _dec4(_class4 = (_class5 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(RedPointScript, _Component);
        function RedPointScript() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /**红点类型数组 */
          _initializerDefineProperty(_this, "redTypes", _descriptor2, _assertThisInitialized(_this));
          /**红点位置 */
          _initializerDefineProperty(_this, "position", _descriptor3, _assertThisInitialized(_this));
          /**红点层节点 */
          _initializerDefineProperty(_this, "parentNode", _descriptor4, _assertThisInitialized(_this));
          /**红点类型数组 */
          _this.m_redGroup = [];
          /**红点控件 */
          _this.redComp = null;
          /**是否强制显示 */
          _this._forceShow = false;
          return _this;
        }
        var _proto = RedPointScript.prototype;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          if (!this.redComp) {
            var fnLoadAndCreateFromBundle = function fnLoadAndCreateFromBundle(bundle) {
              bundle.load("prefab/view/uiRedPoint", Prefab, function (err, prefab) {
                if (err) {
                  console.log(err);
                  return;
                }
                var item = instantiate(prefab);
                _this2.node.addChild(item);
                _this2.redComp = item.getComponent("RedPointCompont");
                _this2.redComp.setPosition(_this2.position, _this2.parentNode);
                _this2.updateRed();
                App.monitorMgr.addEventListener(MonitorType.RedPointUpdate, _this2.onEventUpdate, _this2);
              });
            };
            var bundle = assetManager.getBundle(ModuleDef.BASE_COMMON);
            fnLoadAndCreateFromBundle(bundle);
          }
          this.m_redGroup = [];
          for (var _iterator = _createForOfIteratorHelperLoose(this.redTypes), _step; !(_step = _iterator()).done;) {
            var red = _step.value;
            var redEnum = RedPointEnum[red.redType];
            this.m_redGroup.push(redEnum);
          }
        };
        _proto.start = function start() {};
        _proto.onEventUpdate = function onEventUpdate(args) {
          if (args && this.m_redGroup.indexOf(args) === -1) {
            return;
          }
          this.updateRed();
        };
        _proto.updateRed = function updateRed() {
          var red = App.redPointMgr.getRed(this.m_redGroup) > 0;
          var show = this._forceShow || red;
          this.redComp.setRedVisible(show);
        }
        /**外部设置增加红点数组 */;
        _proto.setRedGroup = function setRedGroup(arry) {
          this.m_redGroup = this.m_redGroup.concat(arry);
          // RedpointGroup["zhujue"]
        };

        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.removeEventListener(MonitorType.RedPointUpdate, this.onEventUpdate, this);
        };
        _createClass(RedPointScript, [{
          key: "forceShow",
          get: /**是否强制显示 */
          function get() {
            return this._forceShow;
          },
          set: /**是否强制显示 */
          function set(show) {
            this._forceShow = show;
            this.updateRed();
          }
        }]);
        return RedPointScript;
      }(Component), (_descriptor2 = _applyDecoratedDescriptor(_class5.prototype, "redTypes", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class5.prototype, "position", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return PositionRed.TOP_RIGHT;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class5.prototype, "parentNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class5)) || _class4) || _class4));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RemoteBullet.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BulletBase.ts', './BattleDefine.ts', './ModuleDef.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, MotionStreak, Vec3, v3, UITransform, Texture2D, SpriteFrame, Sprite, BulletBase, GameBattle, ModuleDef, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      MotionStreak = module.MotionStreak;
      Vec3 = module.Vec3;
      v3 = module.v3;
      UITransform = module.UITransform;
      Texture2D = module.Texture2D;
      SpriteFrame = module.SpriteFrame;
      Sprite = module.Sprite;
    }, function (module) {
      BulletBase = module.BulletBase;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "f534ey9rn9CsrD4jw/w9Snv", "RemoteBullet", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 远程子弹
       */
      var RemoteBullet = exports('RemoteBullet', (_dec = ccclass("RemoteBullet"), _dec2 = property(MotionStreak), _dec(_class = (_class2 = /*#__PURE__*/function (_BulletBase) {
        _inheritsLoose(RemoteBullet, _BulletBase);
        function RemoteBullet() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BulletBase.call.apply(_BulletBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "ms", _descriptor, _assertThisInitialized(_this));
          _this._lastPos = new Vec3();
          //碰撞检测函数
          _this.checkHitFunc = void 0;
          return _this;
        }
        var _proto = RemoteBullet.prototype;
        _proto.init = function init() {
          _BulletBase.prototype.init.call(this);
          this._type = GameBattle.BulletType.Remote;
          this._lastPos.set(0, 0, 0);
        };
        _proto.reuse = function reuse() {
          _BulletBase.prototype.reuse.call(this);
        };
        _proto.recovery = function recovery() {
          _BulletBase.prototype.recovery.call(this);
        };
        _proto.onUpdate = function onUpdate(dt) {
          _BulletBase.prototype.onUpdate.call(this, dt);
          Vec3.copy(this._lastPos, this.node.worldPosition);
        };
        _proto.launch = function launch(bulletLauncherData) {
          _BulletBase.prototype.launch.call(this, bulletLauncherData);
        };
        _proto.load = /*#__PURE__*/function () {
          var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bulletVo) {
            var _this2 = this;
            var s, data, path;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _BulletBase.prototype.load.call(this, bulletVo);
                  this._type = bulletVo.type;
                  this.node.getComponent(UITransform).width = 40;
                  this.node.getComponent(UITransform).height = 40;
                  if (this.bulletVO.motion_streak) {
                    s = this.bulletVO.motion_streak;
                    s = s.trim();
                    // 按逗号分割
                    data = s.split(",").map(function (part) {
                      return part.trim();
                    });
                    this.ms.node.active = true;
                    this.ms.fadeTime = Number(data[0]);
                    this.ms.minSeg = Number(data[1]);
                    this.ms.stroke = Number(data[2]);
                    path = "skill/fashi/bullet/" + data[3];
                    App.resMgr.loadAsset(ModuleDef.GAME_BATTLE_B, path, Texture2D, null, function (err, res) {
                      if (err) {
                        console.error(err);
                        return;
                      }
                      _this2.ms.texture = res;
                    });
                    path = "skill/fashi/bullet/" + data[4];
                    App.resMgr.loadAsset(ModuleDef.GAME_BATTLE_B, path, SpriteFrame, null, function (err, res) {
                      if (err) {
                        console.error(err);
                        return;
                      }
                      _this2.ms.node.getChildByName("imgHead").getComponent(Sprite).spriteFrame = res;
                    });
                  } else {
                    this.ms.node.active = false;
                  }
                  if (this.bulletVO.crash_box_type === GameBattle.BulletHitShape.Round) {
                    this.checkHitFunc = this.checkHitRound;
                  } else {
                    this.checkHitFunc = this.checkHitRect;
                  }
                case 6:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function load(_x) {
            return _load.apply(this, arguments);
          }
          return load;
        }()
        /**
         * 碰撞检测
         * @param target 目标
         * @returns
         */;

        _proto.checkHit = function checkHit(target) {
          return this.checkHitFunc(target);
        }

        /**
         * 矩形子弹碰撞检测
         * @param target 目标
         * @returns
         */;
        _proto.checkHitRect = function checkHitRect(target) {
          // console.log('checkHit', target.uid);
          var selfBox = this.hitBox.getBoundingBoxToWorld();
          var targetBox = target.getBoundingBoxToWorld();

          // 获取当前帧和上一帧的位置
          var currentPos = this.node.worldPosition;
          var prevPos = this._lastPos;
          // console.log('子弹的移动位置currentPos', currentPos);

          var moveVec;
          var moveLen;
          if (!prevPos || prevPos.equals(Vec3.ZERO) || prevPos.length() < 100) {
            moveLen = 1;
          } else {
            Vec3.subtract(this.tempVec, currentPos, prevPos);
            moveVec = this.tempVec;
            moveLen = Math.min(moveVec.length(), 500);
          }

          // 如果移动距离很小，使用普通的碰撞检测
          if (moveLen <= 50) {
            var flag = selfBox.intersects(targetBox);
            if (flag) {
              return true;
            } else {
              // console.log('没有碰撞');
              return false;
            }
          }

          // 进行连续碰撞检测
          var steps = Math.min(Math.ceil(moveLen / 10), 40);
          var stepVec = moveVec.multiplyScalar(1 / steps);
          var checkPos = new Vec3();
          for (var i = 0; i <= steps; i++) {
            checkPos.set(prevPos.x + stepVec.x * i, prevPos.y + stepVec.y * i, prevPos.z + stepVec.z * i);
            var offsetX = checkPos.x - currentPos.x;
            var offsetY = checkPos.y - currentPos.y;
            var checkBox = {
              x: selfBox.x + offsetX,
              y: selfBox.y + offsetY,
              width: selfBox.width,
              height: selfBox.height,
              intersects: selfBox.intersects.bind(selfBox)
            };
            if (checkBox.intersects(targetBox)) {
              return true;
            }
          }
          return false;
        }

        /**
         * 圆形子弹碰撞检测
         * @param target 目标
         * @returns
         */;
        _proto.checkHitRound = function checkHitRound(target) {
          // console.log('checkHit', target.uid);
          var selfRound = this.getRoundToWorld();
          var targetBox = target.getBoundingBoxToWorld();

          // 获取当前帧和上一帧的位置
          var currentPos = this.node.worldPosition;
          var prevPos = this._lastPos;
          // console.log('子弹的移动位置currentPos', currentPos);
          var moveVec;
          var moveLen;
          //TODOO prevPos是初始值，不通过它来计算moveLen (prevPos有时候值是几十，原因未知)
          if (!prevPos || prevPos.equals(Vec3.ZERO) || prevPos.length() < 100) {
            moveLen = 1;
          } else {
            Vec3.subtract(this.tempVec, currentPos, prevPos);
            moveVec = this.tempVec;
            moveLen = Math.min(moveVec.length(), 500);
          }

          // 如果移动距离很小，使用普通的碰撞检测
          if (moveLen <= 50) {
            var flag = this.checkCollideRoundAndRect(selfRound, targetBox);
            if (flag) {
              return true;
            } else {
              // console.log('没有碰撞');
              return false;
            }
          }

          // 进行连续碰撞检测
          var steps = Math.min(Math.ceil(moveLen / 10), 40);
          var stepVec = moveVec.multiplyScalar(1 / steps);
          var checkPos = new Vec3();
          for (var i = 0; i <= steps; i++) {
            checkPos.set(prevPos.x + stepVec.x * i, prevPos.y + stepVec.y * i, prevPos.z + stepVec.z * i);
            var offsetX = checkPos.x - currentPos.x;
            var offsetY = checkPos.y - currentPos.y;
            var checkRound = {
              center: v3(selfRound.center.x + offsetX, selfRound.center.y + offsetY, 0),
              radius: selfRound.radius
            };
            if (this.checkCollideRoundAndRect(checkRound, targetBox)) {
              return true;
            }
          }
          return false;
        };
        return RemoteBullet;
      }(BulletBase), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "ms", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ResBuildingModel.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingModel.ts', './PlaceConfigMgr.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, BuildingModel, PlaceConfigMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      BuildingModel = module.BuildingModel;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }],
    execute: function () {
      cclegacy._RF.push({}, "3354bt77LZNGrgSCV5aL4Gr", "ResBuildingModel", undefined);

      /**
       * 资源建筑数据模型基类
       * 用于磨坊、伐木场、采矿场等资源产出建筑
       */
      var ResBuildingModel = exports('ResBuildingModel', /*#__PURE__*/function (_BuildingModel) {
        _inheritsLoose(ResBuildingModel, _BuildingModel);
        /**
         * 构造函数
         */
        function ResBuildingModel(buildIndex, buildType, buildingUid, level, owner) {
          var _this;
          if (level === void 0) {
            level = 0;
          }
          _this = _BuildingModel.call(this, buildIndex, buildType, buildingUid, level, owner) || this;
          /**
           * 产出间隔时间
           */
          _this._shengchantime = 0;
          /**
           * 每次产出的资源(id,数量)
           */
          _this._shengchannum = [];
          /**
           * 资源存储容量
           */
          _this._maxCangku = 0;
          /**
           * 当前存储的资源数量
           */
          _this._curCangku = 0;
          /**
           * 剩余建造时间(秒)
           */
          _this._remainingBuildTime = 0;
          /**
           * 总建造时间
           */
          _this._totalBuildTime = 0;
          _this.updateProperties();
          return _this;
        }
        var _proto = ResBuildingModel.prototype;
        _proto.updateProperties = function updateProperties() {
          if (this.level <= 0) return;
          var cfg = PlaceConfigMgr.inst.getZiyuanQuLevelConfig(this.buildType, this.level);
          if (cfg) {
            this._maxCangku = cfg.cangku;
            this._shengchannum = cfg.shengchannum;
          }
        };
        /**
         * 等级改变时的回调
         */
        _proto.onLevelChanged = function onLevelChanged(newLevel) {
          this.updateProperties();
        }

        /**
         * 获取存储容量
         */;
        /**
         * 检查仓库是否已满
         * @returns
         */
        _proto.checkFully = function checkFully() {
          return this._curCangku >= this._maxCangku && this._maxCangku > 0;
        };
        _proto.getRemainBuildTime = function getRemainBuildTime() {
          return this._remainingBuildTime;
        };
        _proto.getToTalBuildTime = function getToTalBuildTime() {
          return this._totalBuildTime;
        }

        /**
         * 开始建造升级
         * @param buildTime 建造时间（毫秒）
         * @param targetLevel 目标等级
         */;
        _proto.startBuildingUpgrade = function startBuildingUpgrade(buildTime, totalTime) {
          this._remainingBuildTime = buildTime;
          this._totalBuildTime = totalTime;
        }

        /**
         * 减少剩余建造时间
         * @param milliseconds 减少的秒
         * @returns 剩余建造时间
         */;
        _proto.decreaseBuildTime = function decreaseBuildTime(time) {
          this._remainingBuildTime = Math.max(0, this._remainingBuildTime - time);
          return this._remainingBuildTime;
        }

        /**
         * 获取建造进度
         * @returns 进度值 (0-1)
         */;
        _proto.getBuildProgress = function getBuildProgress() {
          if (this._totalBuildTime <= 0) return 0;
          return Math.max(0, this._remainingBuildTime / this._totalBuildTime);
        }

        /**
         * 完成建造，执行升级
         */;
        _proto.completeBuilding = function completeBuilding() {
          this._remainingBuildTime = 0;
          this._totalBuildTime = 0;
        };
        _createClass(ResBuildingModel, [{
          key: "shengChangeNum",
          get: function get() {
            return this._shengchannum;
          }
        }, {
          key: "shengChangeTime",
          get: function get() {
            return this._shengchantime;
          },
          set: function set(value) {
            this._shengchantime = value;
          }
        }, {
          key: "maxCangku",
          get: function get() {
            return this._maxCangku;
          }

          /**
           * 获取当前存储量
           */
        }, {
          key: "curCangku",
          get: function get() {
            return this._curCangku;
          }

          /**
           * 设置当前存储量
           */,
          set: function set(value) {
            this._curCangku = Math.max(0, Math.min(value, this._maxCangku));
          }
        }]);
        return ResBuildingModel;
      }(BuildingModel));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ResMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './Singleton.ts'], function (exports) {
  var _inheritsLoose, cclegacy, assetManager, Asset, SpriteFrame, sp, Prefab, AudioClip, Texture2D, ModuleDef, Singleton;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      assetManager = module.assetManager;
      Asset = module.Asset;
      SpriteFrame = module.SpriteFrame;
      sp = module.sp;
      Prefab = module.Prefab;
      AudioClip = module.AudioClip;
      Texture2D = module.Texture2D;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      Singleton = module.Singleton;
    }],
    execute: function () {
      cclegacy._RF.push({}, "43fe62ramRENrm7CRy47Gvm", "ResMgr", undefined);
      var ResMgr = exports('ResMgr', /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(ResMgr, _Singleton);
        function ResMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          _this._defaultBundleName = "resources";
          // private _assetsCatch = {};
          _this._mImgLog = new Map();
          return _this;
        }
        var _proto = ResMgr.prototype;
        // private setAssetsCatch(key: string, asset: any) {
        //     if (!this._assetsCatch[key]) {
        //         this._assetsCatch[key] = asset;
        //     }
        // }
        _proto.init = function init() {}

        /**
         * 从bundle中加载某个资源，优先使用缓存中的
         * @param bundleName bundle名称
         * @param path 资源路径
         * @param assetType 资源类型
         * @param onProgress 加载进度回调
         * @param onComplete 加载完成回调
         */;
        _proto.loadAsset = function loadAsset(bundleName, path, assetType, onProgress, onComplete) {
          if (assetType === SpriteFrame) {
            path += "/spriteFrame";
          } else if (assetType === Texture2D) {
            path += "/texture";
          }

          // let key = bundleName + '/' + path;
          // if (this._assetsCatch[key]) {
          //     onComplete(null, this._assetsCatch[key]);
          //     return;
          // }
          var bundle = assetManager.getBundle(bundleName);
          if (bundle && bundle.get(path, assetType)) {
            if (onComplete) {
              onComplete(null, bundle.get(path, assetType));
            }
            return;
          }
          var loadAssetFunc = function loadAssetFunc() {
            bundle.load(path, assetType, function (finish, total) {
              if (onProgress) {
                onProgress(finish / total);
                // console.log("path=" , finish, total,finish / total );
              }
            }, function (err, asset) {
              if (err) {
                console.log("ResManager.loadAsset error:" + err.message, "bundleName:" + bundleName, "path:" + path);
                if (onComplete) {
                  onComplete(err);
                }
                return;
              }
              if (onComplete) {
                onComplete(null, asset);
              }
              // this._assetsCatch[key] = asset;
            });
          };

          if (!bundle) {
            assetManager.loadBundle(bundleName, function (err, retBundle) {
              if (err) {
                if (onComplete) {
                  onComplete(err);
                }
                return;
              }
              bundle = retBundle;
              loadAssetFunc();
            });
            return;
          }
          loadAssetFunc();
        }

        /**
         * 加载某个bundle中的批量同类型资源
         * @param bundleName bundle名称
         * @param pathArr 资源路径数组
         * @param assetType 资源类型
         * @param onProgress 进度回调
         * @param onComplete 完成回调
         */;
        _proto.loadAssetByPathArr = function loadAssetByPathArr(bundleNameArr, pathArr, assetType, onProgress, onComplete) {
          var _this2 = this;
          var total = pathArr.length;
          if (total <= 0) {
            if (onComplete) {
              onComplete([]);
            }
            return;
          }
          var lastPercent = 0;
          var onePercent = 1 / total;
          var assetPercents = new Map();
          var count = 0;
          var arr = [];
          var _loop = function _loop() {
            var path = pathArr[i];
            var bundleName = bundleNameArr[i];
            _this2.loadAsset(bundleName, path, assetType, function (p) {
              assetPercents.set(path, p);
              if (onProgress) {
                var percent = 0;
                assetPercents.forEach(function (p) {
                  percent = percent + onePercent * p;
                });
                if (percent >= lastPercent) {
                  lastPercent = percent;
                  onProgress(percent);
                }
              }
            }, function (err, asset) {
              count++;
              if (!err && asset) {
                asset.path = path;
                arr.push(asset);
              }
              if (count >= total) {
                if (onComplete) {
                  onComplete(arr);
                }
              }
            });
          };
          for (var i = 0; i < total; i++) {
            _loop();
          }
        }

        /**
         * 加载bundle某个目录下的所有同类型资源
         * @param bundleName bundle名称
         * @param dir 目录
         * @param assetType 资源类型
         * @param onProgress 进度回调
         * @param onComplete 完成回调
         */;
        _proto.loadAssetByBundleDir = function loadAssetByBundleDir(bundleName, dir, assetType, onProgress, onComplete) {
          var bundle = assetManager.getBundle(bundleName);
          var loadAssetFunc = function loadAssetFunc() {
            bundle.loadDir(dir, assetType, function (finish, total, item) {
              if (onProgress) {
                onProgress(finish / total, item);
              }
            }, function (err, assetArr) {
              if (err) {
                console.log("ResManager.loadAssetByBundleDir loadDir error:" + err.message);
              }
              if (onComplete) {
                onComplete(assetArr);
              }
            });
          };
          if (!bundle) {
            assetManager.loadBundle(bundleName, function (err, retBundle) {
              if (err) {
                console.log("ResManager.loadAssetByBundleDir loadBundle error:" + err.message);
                return;
              }
              bundle = retBundle;
              loadAssetFunc();
            });
            return;
          }
          loadAssetFunc();
        }

        /**
         * 单纯加载一批bundle
         * @param nameArr bundle名称数组
         * @param onProgress 进度回调
         * @param onComplete 完成回调
         */;
        _proto.loadBundleArr = function loadBundleArr(nameArr, onProgress, onComplete) {
          var total = nameArr.length;
          if (total <= 0) {
            if (onComplete) {
              onComplete();
            }
            return;
          }
          var count = 0;
          var arr = [];
          for (var i = 0; i < total; i++) {
            var bundleName = nameArr[i];
            assetManager.loadBundle(bundleName, function (err, retBundle) {
              count++;
              if (!err) {
                arr.push(retBundle);
              }
              if (count >= total) {
                if (onComplete) {
                  onComplete(arr);
                }
              }
              if (onProgress) {
                onProgress(count / total);
              }
            });
          }
        }

        /**
         * 通过资源相对路径释放资源
         * @param path          资源路径
         * @param bundleName    远程资源包名
         */;
        _proto.release = function release(path, bundleName) {
          if (bundleName === null) bundleName = this._defaultBundleName;
          var bundle = assetManager.getBundle(bundleName);
          if (bundle) {
            var asset = bundle.get(path);
            if (asset) {
              this.releasePrefabtDepsRecursively(asset);
            }
          }
        }

        /** 释放预制依赖资源 */;
        _proto.releasePrefabtDepsRecursively = function releasePrefabtDepsRecursively(uuid) {
          if (uuid instanceof Asset) {
            uuid.decRef();
          } else {
            var asset = assetManager.assets.get(uuid);
            if (asset) {
              asset.decRef();
            }
          }
        }

        /**
         * 加载资源清单数组
         * @param assetConfigArr 资源清单数组
         * @param isAddRef 是否增加引用计数
         * @param onProgress 进度回调
         * @param onComplete 完成回调
         */;
        _proto.loadAssetConfigArr = function loadAssetConfigArr(assetConfigArr, isAddRef, onProgress, onComplete) {
          var _this3 = this;
          if (isAddRef === void 0) {
            isAddRef = false;
          }
          var total = 0;
          if (assetConfigArr && assetConfigArr.length > 0) {
            total = assetConfigArr.length;
          }
          if (total <= 0) {
            if (onComplete) {
              onComplete();
            }
            return;
          }
          var index = 0;
          var loadedAssetArr = [];
          var tmpFunc = function tmpFunc() {
            var asset = assetConfigArr[index];
            if (!asset) {
              // 全部加载完成
              if (onComplete) {
                onComplete(loadedAssetArr);
              }
              return;
            }
            _this3.loadAsset(asset.bundle, asset.path, asset.type, null, function (error, loadedAsset) {
              if (!error && loadedAsset) {
                loadedAssetArr.push(loadedAsset);
                if (isAddRef) {
                  loadedAsset.addRef();
                }
                asset.asset = loadedAsset;
              }
              index++;
              tmpFunc();
              if (onProgress) {
                onProgress(index / total);
              }
            });
          };
          tmpFunc();
        }

        /**
         * 加载精灵帧
         * @param bundleName 资源包名
         * @param path 资源路径
         * @param cb 回调函数
         */;
        _proto.loadSpriteFrame = function loadSpriteFrame(bundleName, path, cb) {
          // if (this._assetsCatch[key]) {
          //     cb?.(null, this._assetsCatch[key]);
          //     return;
          // }
          this.loadAsset(bundleName, path, SpriteFrame, null, function (err, sp) {
            if (cb) {
              cb(err, sp);
              // if (!err) {
              //     this.setAssetsCatch(key, sp);
              // }
            }
          });
        }

        /**
         * 加载骨骼数据
         * @param bundleName 资源包名
         * @param path 资源路径
         * @param cb 回调函数
         */;
        _proto.loadSpineData = function loadSpineData(bundleName, path, cb) {
          // if (this._assetsCatch[key]) {
          //     cb?.(null, this._assetsCatch[key]);
          //     return;
          // }
          this.loadAsset(bundleName, path, sp.SkeletonData, null, function (err, sp) {
            if (cb) {
              cb(err, sp);
              // if (!err) {
              //     this.setAssetsCatch(key, sp);
              // }
            }
          });
        }

        /**
         * 加载预制体
         * @param name 资源包名
         * @param path 资源路径
         * @param cb 回调函数
         */;
        _proto.loadPrefab = function loadPrefab(bundle, path, cb) {
          this.loadAsset(bundle, path, Prefab, null, function (err, ass) {
            cb == null || cb(err, ass);
          });
        }

        /**
         * 加载图片
         * @param sprite 精灵
         * @param bundle 资源包名
         * @param path 资源路径
         */;
        _proto.loadImage = function loadImage(sprite, bundle, path, cb) {
          var _this4 = this;
          // if (this._assetsCatch[key]) {
          //     if (sprite && sprite.node) {
          //         sprite.spriteFrame = this._assetsCatch[key];
          //     }
          //     return;
          // }

          this._mImgLog.set(sprite, path);
          this.loadAsset(bundle, path, SpriteFrame, null, function (err, ass) {
            if (err) {
              _this4._mImgLog["delete"](sprite);
              return;
            }

            // this.setAssetsCatch(key, ass);
            if (cb) cb();
            if (sprite && sprite.node) {
              if (_this4._mImgLog.get(sprite) === path) {
                sprite.spriteFrame = ass;
                _this4._mImgLog["delete"](sprite);
              }
            } else {
              _this4._mImgLog["delete"](sprite);
            }
          });
        }

        /**
         * 加载图片
         * @param sprite 精灵
         * @param bundle 资源包名
         * @param path 资源路径
         */;
        _proto.asyncLoadImage = function asyncLoadImage(sprite, bundle, path) {
          var _this5 = this;
          // if (this._assetsCatch[key]) {
          //     if (sprite && sprite.node) {
          //         sprite.spriteFrame = this._assetsCatch[key];
          //     }
          //     return;
          // }
          return new Promise(function (resolve, reject) {
            _this5._mImgLog.set(sprite, path);
            _this5.loadAsset(bundle, path, SpriteFrame, null, function (err, ass) {
              if (err) {
                _this5._mImgLog["delete"](sprite);
                reject();
                return;
              }

              // this.setAssetsCatch(key, ass);
              if (sprite && sprite.node) {
                if (_this5._mImgLog.get(sprite) === path) {
                  sprite.spriteFrame = ass;
                  _this5._mImgLog["delete"](sprite);
                }
              } else {
                _this5._mImgLog["delete"](sprite);
              }
              resolve(ass);
            });
          });
        }

        /**
         * 加载音频
         * @param Audio 音频源
         * @param path 资源路径
         * @param isEx 是否立即播放
         * @param callfunc 回调函数
         */;
        _proto.LoadAudio = function LoadAudio(Audio, path, isEx, callfunc) {
          if (isEx === void 0) {
            isEx = false;
          }
          if (callfunc === void 0) {
            callfunc = null;
          }
          // if (this._assetsCatch[key]) {
          //     if (!isEx) {
          //         Audio.stop();
          //     }
          //     Audio.clip = this._assetsCatch[key];
          //     Audio.play();
          //     if (callfunc) {
          //         callfunc();
          //     }
          //     return;
          // }
          this.loadAsset(ModuleDef.AUDIO, path, AudioClip, null, function (err, ass) {
            if (err) return console.log("LoadAudio error; path:", path);
            if (!Audio) return;
            if (!isEx) {
              Audio.stop();
            }
            // this.setAssetsCatch(key, ass);
            Audio.clip = ass;
            Audio.play();
            if (callfunc) {
              callfunc();
            }
          });
        }

        /**
         * 加载远程文件
         * @param path 资源路径
         * @param cb 回调函数
         */;
        _proto.loadRemoteData = function loadRemoteData(path, cb) {
          assetManager.loadRemote(path, function (err, data) {
            if (cb && data) {
              cb(data);
            }
          });
        };
        return ResMgr;
      }(Singleton()));
      var AssetConfig = exports('AssetConfig', function AssetConfig() {
        /** 资源包名 */
        this.bundle = void 0;
        /** 资源路径 */
        this.path = void 0;
        /** 资源类型 */
        this.type = void 0;
        /** 加载成功后，得到的资源对象 */
        this.asset = void 0;
      });
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './LockTargetCtrl.ts', './HPBar.ts', './RoleDebugComp.ts', './SkillVO.ts', './GameConfig.ts', './RoleFSM.ts', './Monster.ts', './DBRecord.ts', './BuffBox.ts', './BattleProprMgr.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Component, Node, Vec3, game, UITransform, Size, GameBattle, LockTargetCtrl, HPBar, RoleDebugComp, SkillVO, GameConfig, RoleFSM, Monster, DBRecord, BuffBox, BattlePropertyName, App, BattleUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
      Node = module.Node;
      Vec3 = module.Vec3;
      game = module.game;
      UITransform = module.UITransform;
      Size = module.Size;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      LockTargetCtrl = module.LockTargetCtrl;
    }, function (module) {
      HPBar = module.HPBar;
    }, function (module) {
      RoleDebugComp = module.RoleDebugComp;
    }, function (module) {
      SkillVO = module.SkillVO;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      RoleFSM = module.RoleFSM;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      BuffBox = module.BuffBox;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "203300vY41Nxo0Zpp2Nveef", "RoleBase", undefined);
      var property = _decorator.property;

      /**
       * 角色基类
       */
      var RoleBase = exports('RoleBase', (_dec = property({
        type: Component
      }), _dec2 = property({
        type: HPBar
      }), _dec3 = property({
        type: Node
      }), _dec4 = property({
        type: Node
      }), _dec5 = property(Node), (_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(RoleBase, _Component);
        function RoleBase() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 外观 - 使用ModelFrameAnimation类型 */
          _initializerDefineProperty(_this, "view", _descriptor, _assertThisInitialized(_this));
          /** 血条栏 */
          _initializerDefineProperty(_this, "hpBar", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buffBack", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buffUp", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "affected", _descriptor5, _assertThisInitialized(_this));
          // 受击特效挂载点
          /**是否可以跟随 */
          _this.behaviorFollowFlag = false;
          /** 角色类型 */
          _this._type = GameBattle.RoleType.None;
          /** 阵营类型 */
          _this._side = GameBattle.BattleSide.Player;
          /** 主人ID 适用于召唤物 */
          _this._masterId = 0;
          /** 唯一id */
          _this._uid = 0;
          /** 是否为有效对象 */
          _this._isUsable = false;
          /** 角色数据 */
          _this._roleVO = void 0;
          /**技能实现 */
          _this._roleSkill = void 0;
          _this._attactDt = 0;
          /** 锁定目标控制器 */
          _this._lockTargetCtrl = new LockTargetCtrl();
          /** 移动方向向量 */
          _this._moveDirection = new Vec3();
          _this._curLane = GameBattle.LanePosition.None;
          _this.needFlip = true;
          /** 当前朝向 */
          _this._curDirection = void 0;
          _this._roleDebugComp = void 0;
          /** 普攻 */
          _this._atkSkill = void 0;
          /** 新状态机 */
          _this._state = new RoleFSM();
          _this._curSkillName = "";
          _this._curSkill = null;
          _this.hitPos = new Vec3();
          _this._buffBox = new BuffBox();
          /** 时间 */
          _this.timer = null;
          _this._lastPropValues = {};
          _this._isDead = false;
          _this._weaponDir = void 0;
          /**
           * 是否开启攻击
           */
          _this.openAtk = true;
          /**
           * 是否暂停
           */
          _this.pause = false;
          /**
           * 无敌状态
           */
          _this._invulnerable = false;
          _this._faceDirection = new Vec3();
          // 面向方向
          /**怪物的技能公共cd*/
          _this.publicSkillCd = 0;
          /**
           * 加载完成回调
           */
          _this.loadCompleted = null;
          /**
           * 加载之前时回调
           */
          _this.preLoadCallback = null;
          /**技能位移的方向向量 */
          _this.skillMoveDirVec = void 0;
          /**记录使用技能的时间 */
          _this.useSkillTimeStamp = {};
          _this._lastGridPos = new Vec3();
          _this._gridDt = 0;
          // 网格更新计时器
          _this._gridInterval = 0.5;
          // 网格更新间隔
          /**添加到的tileMap层，城镇使用 */
          _this.myLayer = void 0;
          /**城镇角色roleCtrl */
          _this.cityRoleCtrl = void 0;
          _this._offset = new Vec3();
          _this._tempV3_1 = new Vec3();
          _this._tempV3_2 = new Vec3();
          _this._tempPos = new Vec3();
          /** 忽略时间戳 ,一定时间内不作为玩家目标，玩家自动战斗需要*/
          _this.ignoreTimeStamp = 0;
          return _this;
        }
        var _proto = RoleBase.prototype;
        _proto.start = function start() {
          this._state.owner = this;
          {
            this._roleDebugComp = this.node.getComponentInChildren(RoleDebugComp);
            if (this._roleDebugComp) {
              this._roleDebugComp.owner = this;
              this._roleDebugComp.node.active = GameConfig.DebugInfo.showRoleInfo;
            }
          }
        };
        _proto.onUpdate = function onUpdate(dt) {
          if (!this.checkValid()) return;
          this._doMove();
          this._lockTargetCtrl.update(dt);
          this._updateDirection();
          this._tryAttack(dt);
          this._buffBox.onUpdate(dt);
        };
        _proto._reset = function _reset() {
          var _this$view, _this$_lockTargetCtrl;
          // 回收所有技能
          App.battleMgr.skillCtrl.removeSkills(this.uid);
          this._atkSkill = null;
          (_this$view = this.view) == null || _this$view.reset();
          if (this._roleVO) {
            this._roleVO.reset();
          }
          (_this$_lockTargetCtrl = this._lockTargetCtrl) == null || _this$_lockTargetCtrl.reset();
          this._isUsable = false;
          this._lastPropValues = {};
          this._isDead = false;
          this._masterId = -1;
          this.publicSkillCd = 0;
          this.loadCompleted = null;
          this.preLoadCallback = null;
          this.invulnerable = false;
          this.useSkillTimeStamp = {};
          this._lastGridPos.set(Vec3.ZERO);
          this._gridDt = 0;
          if (this.myLayer) {
            this.myLayer.removeUserNode(this.node);
            this.myLayer = null;
          }
          if (this.node && this.node.isValid) {
            this.node.removeFromParent();
          }
          this.skillMoveDirVec = undefined;
        }

        /**
         * 清除buff特效
         */;
        _proto.clearAllFrameAnimation = function clearAllFrameAnimation() {
          this.clearFrameAnimation(this.affected);
          this.clearFrameAnimation(this.buffBack);
          this.clearFrameAnimation(this.buffUp);
        };
        _proto.clearFrameAnimation = function clearFrameAnimation(node) {
          if (node && node.children) {
            for (var i = node.children.length; i--;) {
              var animation = node.children[i].animation;
              if (animation) {
                node.children[i].sprite.spriteFrame = null;
                animation.stop();
                var clips = animation.clips;
                for (var j = clips.length; j--;) {
                  animation.removeClip(clips[j]);
                }
              }
            }
            node.removeAllChildren();
          }
        };
        _proto._init = function _init() {
          this.view.init();
          // this._stateMachine.owner = this;
          this._lockTargetCtrl.owner = this;
          this._lockTargetCtrl.setChangeHandler(this._onChangeLockTarget.bind(this));
        }

        /**
         * 对象池再利用
         */;
        _proto.reuse = function reuse(id) {
          // 先清理旧数据，避免累积
          this._reset();
          this._init();
          this.needFlip = true;
          this._isDead = false;
          this._roleVO.init(id, this);
          this._roleSkill.init(id, this);
          var cfg = DBRecord.fetchId("Skill", this.roleVO.atkId);
          this._atkSkill = new SkillVO();
          this._atkSkill.init(cfg);
          this._atkSkill.owner = this;
          this.curDirection = GameBattle.Direction.Left;
          for (var _iterator = _createForOfIteratorHelperLoose(this._roleVO.skillIDList), _step; !(_step = _iterator()).done;) {
            var it = _step.value;
            App.battleMgr.skillCtrl.addSkill(this, it);
          }
          this.clearAllFrameAnimation();
          this.useSkillTimeStamp = {};
          this.ignoreTimeStamp = 0;
        }

        /**
         * 设置加载完成回调
         * @param fn 回调函数
         */;
        _proto.setLoadCompleted = function setLoadCompleted(fn) {
          this.loadCompleted = fn;
        }

        /**
         * 设置预加载回调
         * @param fn 预加载回调函数
         */;
        _proto.setPreLoadCallback = function setPreLoadCallback(fn) {
          this.preLoadCallback = fn;
        }

        /**
         * 对象池回收
         */;
        _proto.recovery = function recovery() {
          this._reset();
        }

        /**
         * 结束
         */;
        _proto.end = function end() {
          App.battleMgr.roleCtrl.recovery(this);
        }

        /**
         * 检测有效性
         * @returns
         */;
        _proto.checkValid = function checkValid() {
          return this._isUsable;
        }

        //#region 通用机制

        /**
         * 是否可被锁定目标
         * @returns
         */;
        _proto.isCanLock = function isCanLock() {
          var result = true;
          // todo 决定该单位是否能被目标锁定
          return result;
        }

        /**
         * 是否可被攻击
         * @returns
         */;
        _proto.isCanUnderAttack = function isCanUnderAttack() {
          var result = true;
          // todo 决定该单位是否可被刀光和子弹击中
          return result;
        }

        /**
         * 是否可播放受击动作
         * @returns
         */;
        _proto.isCanPlayUnderAttack = function isCanPlayUnderAttack() {
          var result = true;
          // todo 决定该单位被击中后是否播放受击动作
          return result;
        }

        /**
         * 是否可受伤（计算伤害）
         * @returns
         */;
        _proto.isCanHurt = function isCanHurt() {
          var result = true;
          // todo 决定该单位被击中后是否计算伤害
          return result;
        }

        /**
         * 是否可被添加buff
         * @returns
         */;
        _proto.isCanApplyBuff = function isCanApplyBuff() {
          var result = true;
          // todo 决定该单位被击中后是否可被添加BUFF
          return result;
        }

        /**
         * 是否可见
         * @returns
         */;
        _proto.isCanVisible = function isCanVisible() {
          var result = true;
          // todo 决定该单位是否显示模型和血条，若不显示则不检测命中碰撞盒
          return result;
        }

        /**
         * 是否可移动
         * @returns
         */;
        _proto.isCanMove = function isCanMove() {
          return this._state.canMove();
        }

        /**
         * 是否可攻击
         * @returns
         */;
        _proto.isCanAttack = function isCanAttack() {
          var result = true;
          // todo 决定该单位是否可攻击
          return result;
        }

        /**
         * 是否可施放技能
         * @returns
         */;
        _proto.isCanSkill = function isCanSkill() {
          var result = true;
          // todo 决定该单位是否可施放技能
          return result;
        }

        //#endregion 通用机制

        /**
         * 加载外观
         * @param _onCompleted 成功回调
         * @param _onFaild 失败回调
         */;
        _proto._loadView = function _loadView(_onCompleted, _onFaild) {
          // 具体实现由子类提供
          if (_onCompleted) {
            _onCompleted();
          }
        }

        /**
         * 初始化状态机
         * 在视图加载完成后调用
         */;
        _proto.initStateMachine = function initStateMachine() {
          if (this.view && this._state) {
            this._state.init(this.view);
          }
        }

        /**
         * 动态更新血条位置：根据Idle动画帧的高度
         */;
        _proto.updateHpBarPosition = /*#__PURE__*/
        function () {
          var _updateHpBarPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var frames, firstFrame, frameHeight, hpBarY, roleVO, s, height;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!(!this.hpBar || !this.view)) {
                    _context.next = 2;
                    break;
                  }
                  return _context.abrupt("return");
                case 2:
                  _context.prev = 2;
                  _context.next = 5;
                  return this.view.getIdleFrames();
                case 5:
                  frames = _context.sent;
                  if (frames && frames.length > 0) {
                    // 获取第一帧的高度作为参考
                    firstFrame = frames[0];
                    if (firstFrame && firstFrame.rect) {
                      frameHeight = firstFrame.rect.height; // 血条位置 = 帧高度 + 一些额外偏移（如10-20像素）
                      hpBarY = frameHeight + 10;
                      if (this.roleVO.quality === GameBattle.MonsterQuality.Boss) {
                        hpBarY = frameHeight * 0.6 + 10;
                      }
                      this.hpBar.node.setPosition(this.hpBar.node.position.x, hpBarY);
                    }
                  }
                  _context.next = 16;
                  break;
                case 9:
                  _context.prev = 9;
                  _context.t0 = _context["catch"](2);
                  console.error("Failed to update HP bar position", _context.t0);
                  // 如果获取失败，使用默认高度
                  roleVO = this.roleVO;
                  s = (roleVO.size || 10000) / 10000;
                  height = roleVO.hpHeight || 90;
                  this.hpBar.node.setPosition(this.hpBar.node.position.x, height * s);
                case 16:
                case "end":
                  return _context.stop();
              }
            }, _callee, this, [[2, 9]]);
          }));
          function updateHpBarPosition() {
            return _updateHpBarPosition.apply(this, arguments);
          }
          return updateHpBarPosition;
        }();
        _proto._onChangeLockTarget = function _onChangeLockTarget() {}

        /**
         * 待机
         */;
        _proto.idle = function idle() {}

        /**
         * 攻击
         */;
        _proto.attack = function attack() {
          var skill = this.getUsableSkill();
          this._useSkill(skill);
        }

        /**
         * 受击
         * @param damage 伤害值
         * @param _attrType 伤害元素类型
         * @param _hit_effect 受击特效
         * @param _hit_type 攻击类型 (暴击, 闪避 等)
         * @param _attrUser 攻击者
         */;
        _proto.underAttack = function underAttack(damage, _attrType, _hit_effect, _hit_type, _attrUser) {
          if (this.invulnerable) {
            return 0;
          }

          // 显示伤害飘字
          this._showDamageTips(damage, _attrType, _hit_type);
          return this._roleVO.updateCurHP(damage);
        }

        /**
         * 死亡
         */;
        _proto.dead = function dead() {
          this.end();
        }

        /**
         * 移动
         */;
        _proto.move = function move(moveDirection, action) {
          if (action === void 0) {
            action = GameBattle.ActionState.Move;
          }
          if (!this.isCanMove()) return;
          if (this.state.type === GameBattle.ActionState.Dead) return;
          if (this.pause) return;
          this.state.type = action;
          this._moveDirection.set(moveDirection);
        }

        /**
         * 退出移动
         */;
        _proto.exitMove = function exitMove() {
          this._state.exitType(GameBattle.ActionState.Move | GameBattle.ActionState.Run);
          this._moveDirection.set(0, 0, 0);
          this.setFaceDirection(Vec3.ZERO);
        }

        /**
         * 摇杆操作使用的恢复移动
         */;
        _proto.resumeMove = function resumeMove() {}
        /**
         * 摇杆操作使用的暂停移动
         */;
        _proto.stopMove = function stopMove() {}

        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.view.getBoundingBoxToWorld();
        }

        /**
         * 获取每帧移速
         * @returns
         */;
        _proto.getFrameSpeed = function getFrameSpeed() {
          var nLock = this._roleVO.getLockAttr(BattlePropertyName.lock_yisu);
          var nSpeed;
          if (nLock !== undefined) {
            nSpeed = nLock;
          } else {
            // 清除属性缓存，确保获取最新的属性值
            this._roleVO.clrRoleAttr();
            var yisuAttr = this._roleVO.getRoleAttr(BattlePropertyName.yisu);
            var nAttr = Math.max(0, (10000 + yisuAttr) / 10000);
            nSpeed = this._roleVO._moveSpeed * nAttr;
          }
          // 为怪物添加额外的速度限制，防止移动过快
          if (this instanceof Monster) {
            // 根据需要调整这个限制值
            var maxSpeed = 100; // 最大速度限制
            nSpeed = Math.min(nSpeed, maxSpeed);
          }

          //如果帧率太低，则最多补帧0.04秒的移速 约3帧
          var dt = game.deltaTime > 0.04 ? 0.04 : game.deltaTime;
          // 添加最终结果的限制，确保每帧移动距离不会过大
          var finalSpeed = nSpeed * dt;
          return finalSpeed; //Math.min(finalSpeed, maxFrameMove);
        }

        /**
         * 获取受击点位置
         * @returns
         */;
        _proto.getHitPosition = function getHitPosition() {
          return this.hitPos;
        }

        /**
         * 获取世界受击点位置
         * @returns
         */;
        _proto.getHitWorldPosition = function getHitWorldPosition() {
          return this.node.worldPosition.clone().add(this.getHitPosition());
        }

        /**
         * 获取攻击点位置
         * @returns
         */;
        _proto.getFirePosition = function getFirePosition(_dummy_pos) {
          return Vec3.ZERO;
        };
        _proto.getFirePosition2 = function getFirePosition2() {
          var offsetX = this.view.width * 0.6;
          var x = this.view.isFlipX ? offsetX : -offsetX;
          var y = this.view.height / 2;
          return this.node.worldPosition.clone().add3f(x, y, 0);
        }

        /**
         * 是否脸朝右边
         * @returns
         */;
        _proto.isFaceRight = function isFaceRight() {
          return this._curDirection === GameBattle.Direction.Right || this._curDirection === GameBattle.Direction.RightUp || this._curDirection === GameBattle.Direction.RightDown;
        }

        /**
         * 是否同阵营
         */;
        _proto.isSameSide = function isSameSide(other) {
          return this._side === other.side;
        }

        /**
         * 判断是否为友方
         * @param roleType 角色类型
         * @returns
         */;
        _proto.isFriend = function isFriend(roleType) {
          if (roleType === GameBattle.RoleType.Hero || roleType === GameBattle.RoleType.Soldier) {
            return this._side === GameBattle.BattleSide.Player;
          } else if (roleType === GameBattle.RoleType.Monster) {
            return this._side === GameBattle.BattleSide.Enemy;
          }
          return false;
        }

        /**
         * 展示伤害提示
         * @param num 数值
         */;
        _proto._showDamageTips = function _showDamageTips(num, attrType, hit_type) {
          if (!App.mixMgr.getGameSet("bDamage")) return;
          var tips = App.battleMgr.createDamageTips();
          if (!tips) return;
          tips.show(num, this.node.worldPosition, attrType, hit_type);
        }

        /**
         * 执行移动逻辑
         * @returns
         */;
        _proto._doMove = function _doMove(force) {
          if (force === void 0) {
            force = false;
          }
          // if (DEBUG) {
          //     if (GameConfig.DebugInfo.monterNoMove && this instanceof Monster) {
          //         return;
          //     }
          // }
          if (!this.isCanMove() && !force) return;
          if (this._moveDirection.x === 0 && this._moveDirection.y === 0) return;
          var frameSpeed = this.getFrameSpeed();
          // 规范化移动向量，确保方向正确且不会过大
          this._offset.set(this._moveDirection);
          var length = this._offset.length();
          if (length > 0) {
            this._offset.normalize();
          }
          this._offset.multiplyScalar(frameSpeed);
          this._tempV3_2.set(this.node.worldPosition);
          var x = this._offset.x;
          var y = this._offset.y;
          // 直接直线移动，不进行寻路检查
          this._tempV3_2.add3f(x, y, 0);
          this.node.worldPosition = this._tempV3_2;
        }

        /**
         * 尝试攻击
         */;
        _proto._tryAttack = function _tryAttack(_dt, _force) {}

        /**
         * 设置当前施法技能
         * @param skill 技能对象
         * @returns
         */;
        _proto.useSkill = function useSkill(skill) {
          this._curSkill = skill;
          this._curSkillName = skill.arts_action;
          this.useSkillTimeStamp[skill.skillID] = Date.now();
        }

        /**
         * 使用技能
         * @param skill 技能对象
         * @returns
         */;
        _proto._useSkill = function _useSkill(skill) {
          if (!skill) return false;
          skill.use();
          return true;
        }

        /**
         * 刷新角色朝向
         */;
        _proto._updateDirection = function _updateDirection(_force) {}

        /**
         * 检测是否可使用技能
         * @returns
         */;
        _proto.checkCanUseSkill = function checkCanUseSkill() {
          var result = false;
          do {
            if (!this.getUsableSkill()) break;
            if (!this._state.canAttack()) break;
            result = true;
          } while (false);
          return result;
        }

        /**
         * 获取可使用的技能
         * @returns
         */;
        _proto.getUsableSkill = function getUsableSkill() {
          var skills = App.battleMgr.skillCtrl.getSkills(this._uid);
          var skill;
          // 按技能优先级从大到小排序
          skills.sort(function (a, b) {
            if (!a || !b) return 0;
            return b.skillID - a.skillID;
          });
          for (var _iterator2 = _createForOfIteratorHelperLoose(skills), _step2; !(_step2 = _iterator2()).done;) {
            var it = _step2.value;
            if (!it) continue;
            if (!it.isReady()) continue;
            if (!it.checkRange()) continue;
            if (it.owner instanceof Monster) {
              if (!it.owner._monsterAI.check(it)) {
                continue;
              }
            }
            if (this.publicSkillCd > 0) continue;
            skill = it;
            break;
          }
          return skill;
        }

        /**
         * 检测是否可普攻
         * @returns
         */;
        _proto.checkAttack = function checkAttack() {
          return this._atkSkill.checkRange() && this._atkSkill.isReady();
        };
        _proto.doDead = function doDead() {
          if (this.state.type === GameBattle.ActionState.Dead) {
            return;
          }
          this._isDead = true;
          this.roleVO.curHP = 0;
          this.exitMove();
          this.state.type = GameBattle.ActionState.Dead;
        };
        _proto.getMountPoint = function getMountPoint(mount_name, defaultPos) {
          var _spriteBody$node$uiTr;
          if (!mount_name || typeof mount_name !== "string") {
            return defaultPos;
          }
          if (!this.view || !this.view.sprite_body) {
            return defaultPos;
          }

          // 对于sprite精灵，我们返回一个合理的默认位置
          // 这里使用精灵顶部中心位置作为挂载点
          var spriteBody = this.view.sprite_body;
          var uiTransform = spriteBody.node.getComponent(UITransform);
          var size = uiTransform ? uiTransform.contentSize : new Size(0, 0);

          // 设置默认挂载点为精灵顶部中心位置（局部坐标）
          this._tempV3_1.set(0, size.height / 2, 0);

          // 转换为世界坐标
          (_spriteBody$node$uiTr = spriteBody.node.uiTransform) == null || _spriteBody$node$uiTr.convertToWorldSpaceAR(this._tempV3_1, this._tempV3_2);
          return this._tempV3_2;
        };
        _proto.getLocalMountPoint = function getLocalMountPoint(mount_name, defaultPos) {
          if (!mount_name || typeof mount_name !== "string") {
            return defaultPos;
          }

          // 适配sprite精灵，不再使用skeleton骨骼系统
          // 检查sprite_body是否存在
          if (!this.view || !this.view.sprite_body) {
            return defaultPos;
          }

          // 可以根据实际需求调整这个逻辑
          var spriteBody = this.view.sprite_body;
          // 获取精灵尺寸
          var uiTransform = spriteBody.node.getComponent(UITransform);
          var size = uiTransform ? uiTransform.contentSize : new Size(0, 0);

          // 设置默认挂载点为精灵顶部中心位置
          this._tempV3_1.set(0, size.height / 2, 0);
          return this._tempV3_1;
        }

        /**
         * 根据类型获取buff挂载节点
         * @param type
         * @returns
         */;
        _proto.getBuffNode = function getBuffNode(type) {
          if (type === 1) {
            return this.buffUp;
          } else {
            return this.buffBack;
          }
        }

        /**
         * 获得buff挂载节点局部坐标
         * @param type
         * @param guaWorld
         * @returns
         */;
        _proto.getBuffLocationPos = function getBuffLocationPos(type, guaWorld) {
          var buffParent = this.getBuffNode(type);
          return buffParent.uiTransform.convertToNodeSpaceAR(guaWorld);
        }

        //更新普攻CD（攻速）
        ;

        _proto.updateAttackInterval = function updateAttackInterval() {
          // let nLock = this._roleVO.getLockAttr(BattlePropertyName.lock_gongsu);
          // if (nLock != undefined) return nLock;

          var nAttr = this._roleVO.getRoleAttr(BattlePropertyName.gongsu);
          var JiNeng = DBRecord.fetchId("Skill", this.roleVO.atkId);
          if (nAttr >= 0) {
            this.atkSkill.CD = JiNeng.CD / ((10000 + nAttr) / 10000);
          } else {
            this.atkSkill.CD = JiNeng.CD * ((10000 - nAttr) / 10000);
          }
        }

        /**
         *  buff属性执行
         */;
        _proto.execBattleBufferAtti = function execBattleBufferAtti() {}

        /**
         * 角色特殊技能
         * @param _skillVo
         * @param _actionName
         * @param _quality
         * @param _eventName
         * @param _cb
         */;
        _proto.doRoleSkill = function doRoleSkill(_skillVo, _actionName, _quality, _eventName, _cb) {}

        /**
         * 设置朝向
         * @param direction
         * @returns
         */;
        _proto.setFaceDirection = function setFaceDirection(direction) {
          if (!this.state.canTurn()) return;
          if (direction.x === 0 && direction.y === 0) return;
          this._faceDirection.set(direction);

          // 直接更新朝向，不依赖移动
          var newDirection = BattleUtil.analysisDirection(direction);
          if (newDirection !== GameBattle.Direction.None) {
            this.curDirection = newDirection;
          }
        }

        /**
         * 是否为boss
         * @returns
         */;
        _proto.isBoss = function isBoss() {
          return false;
        }

        /**
         * 检查角色是否存活
         * @returns boolean - 角色是否存活
         */;
        _proto.isAlive = function isAlive() {
          // 角色存活的条件：未标记为死亡、对象有效、生命值大于0
          return !this._isDead && this.checkValid() && this._roleVO && this._roleVO.curHP > 0;
        }

        /**
         * 检查是否可以使用技能
         * @param skill 要检查的技能对象
         * @returns boolean - 是否可以使用技能
         */;
        _proto.canUseSkill = function canUseSkill(skill) {
          // 1. 检查角色是否存活
          if (!this.isAlive()) {
            return false;
          }

          // 2. 检查公共冷却时间是否已结束
          if (this.publicSkillCd > 0) {
            return false;
          }

          // 3. 检查技能对象是否有效
          if (!skill) {
            return false;
          }

          // 4. 检查技能是否就绪（CD是否结束）
          if (!skill.isReady()) {
            return false;
          }

          // 5. 检查技能是否可以施放（可能包含能量/怒气等消耗检查）
          if (!skill.checkCast()) {
            return false;
          }

          // 6. 检查是否在可攻击状态
          if (!this.state.canAttack()) {
            return false;
          }
          return true;
        }

        /**
         * 移动时的动作状态，随从特殊，其他都是ActionState.Move
         * @returns
         */;
        _proto.getMoveActionState = function getMoveActionState() {
          return GameBattle.ActionState.Move;
        }

        /**
         * 切状态是否需要清除动画，目前只有随从雷牙需要
         * @returns
         */;
        _proto.needClearAnimation = function needClearAnimation() {
          return false;
        }

        /**
         * 是否需要追击，怪物需要
         * @returns
         */;
        _proto.needZhuiJi = function needZhuiJi() {
          return false;
        }

        /**
         * 免疫吸附、拉怪
         */;
        _proto.immuneDrag = function immuneDrag() {
          return false;
        }

        /**
         * 根据职业获取真正动作名称
         * @param action 动作名称
         * @returns 实际动作名称
         */;
        _proto.getRealActionName = function getRealActionName(action) {
          return action;
        }

        /**
         * 设置自动战斗AI激活状态
         */;
        _proto.setAutoFightAIActive = function setAutoFightAIActive(_active) {}

        /**
         * 使用最大深度寻路的对象：boss，随从，宠物
         */;
        _proto.findPathUseMaxDeep = function findPathUseMaxDeep() {
          return this.roleVO.quality === GameBattle.MonsterQuality.Boss;
        }

        /**
         * 设置目标信息
         * @param _target 目标
         */;
        _proto.setTargetInfo = function setTargetInfo(_target) {};
        _createClass(RoleBase, [{
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "side",
          get: function get() {
            return this._side;
          },
          set: function set(v) {
            this._side = v;
          }
        }, {
          key: "masterId",
          get: function get() {
            return this._masterId;
          },
          set: function set(v) {
            this._masterId = v;
          }
        }, {
          key: "uid",
          get: function get() {
            return this._uid;
          },
          set: function set(v) {
            this._uid = v;
          }
        }, {
          key: "isUsable",
          get: function get() {
            return this._isUsable;
          },
          set: function set(value) {
            this._isUsable = value;
          }
        }, {
          key: "roleVO",
          get: function get() {
            return this._roleVO;
          }
        }, {
          key: "roleSkill",
          get: function get() {
            return this._roleSkill;
          }
        }, {
          key: "lockTargetCtrl",
          get: function get() {
            return this._lockTargetCtrl;
          }
        }, {
          key: "moveDirection",
          get: function get() {
            return this._moveDirection;
          }
        }, {
          key: "curLane",
          get: function get() {
            return this._curLane;
          },
          set: function set(v) {
            this._curLane = v;
          }
        }, {
          key: "curDirection",
          get: function get() {
            return this._curDirection;
          },
          set: function set(v) {
            if (this._curDirection === v) return;
            this._curDirection = v;
            if (this._curDirection === GameBattle.Direction.Up || this._curDirection === GameBattle.Direction.Down) {
              return;
            }
            var needFlipX = this._curDirection === GameBattle.Direction.Right || this._curDirection === GameBattle.Direction.RightUp || this._curDirection === GameBattle.Direction.RightDown;
            if (!this.roleVO || !this.roleVO.lockOrientation || this.roleVO.lockOrientation !== 1) {
              this.view.isFlipX = this.needFlip && needFlipX;
            }
          }
        }, {
          key: "atkSkill",
          get: function get() {
            return this._atkSkill;
          },
          set: function set(value) {
            this._atkSkill = value;
          }
        }, {
          key: "state",
          get: function get() {
            return this._state;
          },
          set: function set(value) {
            this._state = value;
          }
        }, {
          key: "curSkillName",
          get: function get() {
            return this._curSkillName;
          },
          set: function set(value) {
            this._curSkillName = value;
          }
        }, {
          key: "curSkill",
          get: function get() {
            return this._curSkill;
          },
          set: function set(value) {
            this._curSkill = value;
          }
        }, {
          key: "isDead",
          get: function get() {
            return this._isDead;
          }
        }, {
          key: "invulnerable",
          get: function get() {
            return this._invulnerable;
          },
          set: function set(value) {
            this._invulnerable = value;
          }
        }]);
        return RoleBase;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "view", [_dec], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "hpBar", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "buffBack", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, "buffUp", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, "affected", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class)));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleBaseVO.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './Utils.ts', './BattleDefine.ts', './BattleProprMgr.ts'], function (exports) {
  var _createClass, _createForOfIteratorHelperLoose, cclegacy, DBRecord, Utils, GameBattle, BattlePropertyName, DMG_ATTR_ID, CURRENT_VIT_ID;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
      DMG_ATTR_ID = module.DMG_ATTR_ID;
      CURRENT_VIT_ID = module.CURRENT_VIT_ID;
    }],
    execute: function () {
      cclegacy._RF.push({}, "17868+lSdhCaISRisAK/KcV", "RoleBaseVO", undefined);
      var RoleBaseVO = exports('RoleBaseVO', /*#__PURE__*/function () {
        function RoleBaseVO() {
          this._owner = void 0;
          this._mInitAttr = void 0;
          //局外属性
          this._mEffcAttr = void 0;
          //Effect属性
          this._mRoleAttr = void 0;
          //最终属性
          this._mLastAttr = {};
          //属性记录
          this._mLockAttr = void 0;
          //优先属性
          this._mGroupEffc = {};
          this._mGroupCount = {};
          this._mGroupLock = {};
          this._mBuffLog = {};
          this._nRecover = 0;
          //迁移怪物 --------------------------------开始
          /** AI */
          this.AIType = 0;
          /** 品质 */
          this._quality = GameBattle.MonsterQuality.None;
          /**
           * 最小追击范围
           */
          this._pursuerange = void 0;
          //--------------------------------
          //迁移怪物 --------------------------------结束
          /** 当前生命值 */
          this._curHP = 0;
          this._tongGuan = 99999999;
          this._pvpYaSuo = 1;
          this._pvpPower = 1;
          //生命回复效率
          this._hpRecover = 1;
          //恢复生命
          /*** 当前能量*/
          this._curNengLiiang = 1;
          /** 身上是否携带遗产效果 */
          this._hasYiChan = false;
          //----------------------------------------------------------------------------------
          // /** 移速(每秒移速) */
          this._moveSpeed = 0;
          // /** 普攻攻速 */
          this._atkInterval = 1;
          /** 锁定目标范围 */
          this._lockRange = [];
          /** 外观资源路径 */
          this._viewPath = "";
          this._offset = [];
          /** 技能ID列表 */
          this._skillIDList = [];
          /** 普攻ID */
          this._atkId = 0;
          /**当前基础等级*/
          this._curLvl0 = 1;
          /**当前巅峰等级*/
          this._curLvl1 = 1;
          /**
           * 是否锁朝向
           */
          this._lockOrientation = void 0;
          this._battleBufferAttrListTemp = new Map();
          this._battleAttrList = [];
          this._battleAttrMap = new Map();
          /** 碰撞盒数据 */
          this.crash_box = [];
          /** 初始buff列表 */
          this._init_buff_id = [];
        }
        var _proto = RoleBaseVO.prototype;
        //hpRate；固定回复效率
        _proto.updateCurHP = function updateCurHP(num, set, hpRate, fianlResult) {
          if (hpRate === void 0) {
            hpRate = 0;
          }
          if (fianlResult === void 0) {
            fianlResult = undefined;
          }
          var over_ = 0; //超出的伤害
          if (set) {
            this._curHP = num;
            //   this._curHP = 0;// 测试
          } else {
            var huiXueJiangDi = (10000 - this.getRoleAttr(BattlePropertyName.HuiXueJiangDi)) / 10000;
            var finalChangeHp = num > 0 ? num * ((hpRate || this._hpRecover) * huiXueJiangDi) : num;
            this._curHP += finalChangeHp;
            if (this._curHP < 0) {
              over_ = this._curHP;
              this._curHP = 0;
            } else {
              var maxHp = this.getRoleAttr(BattlePropertyName.shengming);
              this._curHP = this._curHP > maxHp ? maxHp : this._curHP;
            }
            if (fianlResult) {
              fianlResult.finalChangeHp = finalChangeHp;
            }
          }
          return over_;
        }

        /**
         * 是否满血
         * @returns
         */;
        _proto.isMaxHp = function isMaxHp() {
          return this._curHP >= this.getRoleAttr(BattlePropertyName.shengming);
        }

        /**
         * 是否满能量
         * @returns
         */;
        _proto.isMaxNengLiang = function isMaxNengLiang() {
          return this._curNengLiiang >= this.getRoleAttr(BattlePropertyName.nengliang);
        };
        _proto.updateCurNengLiang = function updateCurNengLiang(num, set) {
          //当前能量
          if (set) {
            this._curNengLiiang = num;
          } else {
            this._curNengLiiang += num;
            this._curNengLiiang = this._curNengLiiang < 0 ? 0 : this._curNengLiiang;
            // this._curNengLiiang = this._curNengLiiang > this._nengLiang ? this._nengLiang : this._curNengLiiang;
            var maxNengLiang = this.getRoleAttr(BattlePropertyName.nengliang);
            this._curNengLiiang = this._curNengLiiang > maxNengLiang ? maxNengLiang : this._curNengLiiang;
          }
        };
        _proto.init = function init(_id, owner) {
          this._owner = owner;
          this._mInitAttr = {};
        };
        _proto.reset = function reset() {
          // this._hp = 0;
          // this._def = 0;
          // this._atk = 0;
          // this._moveSpeed = 0;
          // this._atkInterval = 1;
          this._lockRange.length = 0;
          this._viewPath = "";
          this._skillIDList.length = 0;
          this._battleAttrList.length = 0; // 修复：清空战斗属性列表，避免对象池复用时属性累积
          this.crash_box.length = 0; // 修复：清空碰撞盒数据，避免对象池复用时碰撞盒累积
          this._init_buff_id.length = 0; // 修复：清空初始buff列表，避免对象池复用时buff累积

          this._curHP = 0;
          this._curLvl0 = 0;
          this._curLvl1 = 0;
          this._mRoleAttr = null;
          this._mLastAttr = {};
          this._mEffcAttr = null;
          this._mGroupEffc = {};
          this._mGroupCount = {};
          this._mGroupLock = {};
          this._mBuffLog = {};
        };
        _proto.setDefaultAtti = function setDefaultAtti() {
          var _this = this;
          var ShuXing = DBRecord.fetchAll("ShuXing");
          Utils.forArr(ShuXing, function (row) {
            _this._battleAttrMap.set(row.id, 0);
          });
        }

        //伤害属性-------------------------------------------------------------------------------------------
        ;

        _proto.addEffcAttr = function addEffcAttr(effcId, attrDt) {
          for (var _key in attrDt)
          //处理属性中的当前属性（当前生命，当前能量……）
          this._curEffcAttr(Number(_key), attrDt[_key]);
          this._mGroupEffc[effcId] = attrDt;
          this._mGroupCount[effcId] = this._mGroupCount[effcId] || 0 + 1;
          this.clrEffcAttr();
        };
        _proto.delEffcAttr = function delEffcAttr(effcId, _attrDt) {
          if (this._mGroupCount[effcId]) this._mGroupCount[effcId]--;
          if (this._mGroupCount[effcId] <= 0) {
            this._mGroupCount[effcId] = 0;
            delete this._mGroupEffc[effcId];
          }
          this.clrEffcAttr();
        };
        _proto.getBuffGroup = function getBuffGroup() {
          return this._mGroupCount;
        };
        _proto.addLockAttr = function addLockAttr(effcId, attrDt) {
          this._mGroupLock[effcId] = attrDt;
          this.clrLockAttr();
        };
        _proto.delLockAttr = function delLockAttr(effcId) {
          delete this._mGroupLock[effcId];
          this.clrLockAttr();
        }

        //配置格式
        ;

        _proto.udtInitAttrByCfg = function udtInitAttrByCfg(vAttr0) {
          var vAttr_ = [];
          for (var dx0 = 0; dx0 < vAttr0.length; dx0++) {
            var oAttr_ = {
              id: vAttr0[dx0][0],
              value: vAttr0[dx0][1]
            };
            vAttr_.push(oAttr_);
          }
          this.udtInitAttr(vAttr_);
        };
        _proto.udtInitAttr = function udtInitAttr(vAttr) {
          var mInitAttr = {};
          // 先把DMG_ATTR_ID的key都置成0
          for (var _key2 in DMG_ATTR_ID) {
            mInitAttr[_key2] = 0;
          }

          // 如果vAttr存在，则用vAttr的id和value填充到mInitAttr中
          if (vAttr && Array.isArray(vAttr)) {
            vAttr.forEach(function (key, _val) {
              if (DMG_ATTR_ID[key.id]) mInitAttr[key.id] = key.value;
            });
          }
          this._mInitAttr = mInitAttr;
          this.clrRoleAttr();
        };
        _proto.resetCurAttr = function resetCurAttr() {
          //重置生命，能量
          this._curHP = this.getRoleAttr(BattlePropertyName.shengming);
          this._curNengLiiang = this.getRoleAttr(BattlePropertyName.nengliang);
        };
        _proto.getJJCAttr = function getJJCAttr() {
          return {
            power: this._pvpPower,
            guanQiaId: this._tongGuan
          };
        };
        _proto.clrRoleAttr = function clrRoleAttr() {
          this._mRoleAttr = null;
        };
        _proto.clrEffcAttr = function clrEffcAttr() {
          this.clrRoleAttr();
          this._mEffcAttr = null;
        };
        _proto.clrLockAttr = function clrLockAttr() {
          this.clrRoleAttr();
          this._mLockAttr = null;
        };
        _proto.getFullAttr = function getFullAttr() {
          this._updtRoleAttr();
          return this._mRoleAttr;
        };
        _proto.getLockAttr = function getLockAttr(id) {
          this._updtLockAttr();
          return id === undefined ? this._mLockAttr : this._mLockAttr[id];
        };
        _proto.getRoleAttr = function getRoleAttr(id) {
          //测试数据
          // if (id === BattlePropertyName.shengming) {
          //     return 10000;
          // }

          this._updtLockAttr();
          if (this._mLockAttr[id] !== undefined) {
            return this._mLockAttr[id];
          }
          this._updtRoleAttr();
          return this._mRoleAttr[id] || 0;
        }
        /** 获取当前生命万分比 */;
        _proto.getCurWfbHp = function getCurWfbHp() {
          return this.curHP / this.getRoleAttr(BattlePropertyName.shengming) * 10000;
        };
        _proto.getTempAttr = function getTempAttr(id) {
          switch (id) {
            case BattlePropertyName.dangqianshengming:
              return this.curHP;
            case BattlePropertyName.dangqiangnengliang:
              return this.curNengLiiang;
            default:
              return 0;
          }
        };
        _proto._updtRoleAttr = function _updtRoleAttr() {
          if (this._mRoleAttr) {
            return;
          }
          var mRoleAttr = Utils.copyObj(this._mInitAttr);
          mRoleAttr = Utils.addVitM(mRoleAttr, this._getBuffAttr());
          // mRoleAttr = Utils.stdVitM(mRoleAttr);

          this._mRoleAttr = mRoleAttr;

          //上限变化处理
          var mLastAttr = this._mLastAttr;
          if (mLastAttr[BattlePropertyName.shengming]) {
            var add = mRoleAttr[BattlePropertyName.shengming] - mLastAttr[BattlePropertyName.shengming];
            if (add && this._curHP > 0) {
              this.updateCurHP(Math.max(-this._curHP + 1, add), false, 1);
            }
          }
          mLastAttr[BattlePropertyName.shengming] = mRoleAttr[BattlePropertyName.shengming];

          //console.log(`>>>>生命上限:>>>`, mRoleAttr[BattlePropertyName.shengming]);
        };

        _proto._updtLockAttr = function _updtLockAttr() {
          if (this._mLockAttr) return;
          var mLockAttr = {};
          for (var lockId in this._mGroupLock) {
            var lockDt = this._mGroupLock[lockId];
            for (var attrId in lockDt) mLockAttr[attrId] = mLockAttr[attrId] || 0 + lockDt[attrId];
          }
          this._mLockAttr = mLockAttr;
        };
        _proto._getBuffAttr = function _getBuffAttr() {
          if (!this._mEffcAttr) {
            var mEffcAttr = {};
            for (var buffId in this._mGroupEffc) {
              var mAttr0 = this._mGroupEffc[buffId];
              var nCount = this._mGroupCount[buffId] || 0;
              //Buff层数效果合并后再计算
              var mAttr1 = {};
              for (var _key3 in mAttr0) {
                mAttr1[_key3] = mAttr0[_key3] * nCount;
              }
              Utils.addVitM(mEffcAttr, mAttr1, 1);
            }
            this._mEffcAttr = mEffcAttr;
          }
          return this._mEffcAttr;
        };
        _proto._curEffcAttr = function _curEffcAttr(addId, addVal) {
          if (!CURRENT_VIT_ID[addId]) return;
          switch (addId) {
            case BattlePropertyName.dangqianshengming:
              this.updateCurHP(addVal);
              break;
            case BattlePropertyName.wfb_curShengming:
              this.updateCurHP(Math.ceil(this.getRoleAttr(BattlePropertyName.shengming) * addVal / 10000));
              break;
            case BattlePropertyName.dangqiangnengliang:
              this.updateCurNengLiang(addVal);
              break;
            case BattlePropertyName.wfb_nengliang2:
              this.updateCurNengLiang(Math.ceil(this.getRoleAttr(BattlePropertyName.nengliang) * addVal / 10000));
              break;
          }
        };
        _createClass(RoleBaseVO, [{
          key: "quality",
          get: function get() {
            return this._quality;
          },
          set: function set(v) {
            this._quality = v;
          }
        }, {
          key: "pursuerange",
          get: function get() {
            return this._pursuerange;
          },
          set: function set(value) {
            this._pursuerange = value;
          }
        }, {
          key: "curHP",
          get: function get() {
            return this._curHP;
          },
          set: function set(v) {
            this._curHP = v;
          }
        }, {
          key: "tongGuan",
          get:
          //通关关卡
          function get() {
            return this._tongGuan;
          }
        }, {
          key: "pvpYaSuo",
          get:
          //PVP系数
          function get() {
            return this._pvpYaSuo;
          }
        }, {
          key: "pvpPower",
          get:
          //PVP战力系数
          function get() {
            return this._pvpPower;
          }
        }, {
          key: "curNengLiiang",
          get: function get() {
            return this._curNengLiiang;
          },
          set: function set(v) {
            this._curNengLiiang = v;
          }
        }, {
          key: "hasYiChan",
          get: function get() {
            return this._hasYiChan;
          },
          set: function set(value) {
            this._hasYiChan = value;
          }
        }, {
          key: "lockRange",
          get: function get() {
            return this._lockRange;
          },
          set: function set(v) {
            this._lockRange = v;
          }
        }, {
          key: "viewPath",
          get: function get() {
            return this._viewPath;
          },
          set: function set(v) {
            this._viewPath = v;
          }
        }, {
          key: "offset",
          get: function get() {
            return this._offset;
          },
          set: function set(value) {
            this._offset = value;
          }
        }, {
          key: "skillIDList",
          get: function get() {
            return this._skillIDList;
          },
          set: function set(v) {
            this._skillIDList = v;
          }
        }, {
          key: "atkId",
          get: function get() {
            return this._atkId;
          },
          set: function set(v) {
            this._atkId = v;
          }
        }, {
          key: "curLvl0",
          get: function get() {
            return this._curLvl0;
          },
          set: function set(v) {
            this._curLvl0 = v;
          }
        }, {
          key: "curLvl1",
          get: function get() {
            return this._curLvl1;
          },
          set: function set(v) {
            this._curLvl1 = v;
          }
        }, {
          key: "lockOrientation",
          get: function get() {
            return this._lockOrientation;
          },
          set: function set(value) {
            this._lockOrientation = value;
          }
        }, {
          key: "battleAttrList",
          get: function get() {
            return this._battleAttrList;
          },
          set: function set(val) {
            this._battleAttrList = val;
            //转成map
            this.setDefaultAtti();
            for (var _iterator = _createForOfIteratorHelperLoose(val), _step; !(_step = _iterator()).done;) {
              var element = _step.value;
              this._battleAttrMap.set(element.id, element.value);
            }
          }
        }, {
          key: "lastAttrMap",
          get: function get() {
            return this._battleAttrMap;
          }
        }, {
          key: "init_buff_id",
          get: function get() {
            return this._init_buff_id;
          }
        }]);
        return RoleBaseVO;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BattleDefine.ts', './Monster.ts', './App.ts', './RoleFactory.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, ModuleDef, GameBattle, Monster, App, RoleFactory;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      App = module.App;
    }, function (module) {
      RoleFactory = module.RoleFactory;
    }],
    execute: function () {
      cclegacy._RF.push({}, "5fba5X6KwpH3b7lpj6B5mzH", "RoleCtrl", undefined);
      /**
       * 角色控制器
       */
      var RoleCtrl = exports('RoleCtrl', /*#__PURE__*/function () {
        function RoleCtrl() {
          /** 角色层级节点 */
          this._roleLayer = void 0;
          /** 实体列表 */
          this._entityMap = new Map();
          /** 实体分类列表 */
          this._entityTypeMap = {};
          this.cityRolelayer = void 0;
        }
        var _proto = RoleCtrl.prototype;
        _proto.init = function init() {
          //属性监听
          this.initPool();
        };
        _proto.dispose = function dispose() {
          this.onExit();
          this.clearPool();
        };
        _proto.initPool = function initPool() {
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Monster], {
            preloadCount: 5,
            maxSize: 50,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Hero], {
            preloadCount: 3,
            maxSize: 3,
            autoExpand: true
          });
          App.nodePoolMgr.createPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Soldier], {
            preloadCount: 10,
            maxSize: 50,
            autoExpand: true
          });
        };
        _proto.clearPool = function clearPool() {
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Monster]);
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Hero]);
          App.nodePoolMgr.clearPoolByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Soldier]);
        }

        /**
         * 进入战场
         */;
        _proto.onEnter = function onEnter() {
          // 请求更新玩家属性
          // 进入时 该请求服务器的请求服务器
          // netChannel.game.send(MonitorType.player_BaseAttributes, {});
          this._roleLayer = App.dungeonBattleMgr.battleMainViewCtrl.roleLayer;
          RoleFactory.inst.setRoleLayer(this._roleLayer);
        }

        /**
         * 退出战场
         */;
        _proto.onExit = function onExit() {
          this.recoveryAll();
          this.recoveryAllMonster();
        }

        /**
         * 进入主城
         */;
        _proto.onEnterCity = function onEnterCity(layer) {
          this.cityRolelayer = layer;
          // netChannel.game.send(MonitorType.player_BaseAttributes, {});
          this._roleLayer = null;
        };
        _proto.update = function update(dt) {
          for (var _iterator = _createForOfIteratorHelperLoose(this._entityMap), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              _key = _step$value[0],
              v = _step$value[1];
            v.onUpdate(dt);
          }
          this._updateRoleSiblingIndex();
        }

        /**
         * 更新角色层级
         * 在Cocos中，children数组索引小的先渲染（下层），索引大的后渲染（上层）
         * Cocos坐标系：Y轴向上为正，所以Y小=画面下方，Y大=画面上方
         * 游戏透视：画面下方的角色应该遮挡画面上方的角色
         * 因此：Y小的在上层，Y大的在下层
         *
         * 注意：角色节点的锚点已设置为(0.5, 0)，即底部中心
         * 所以worldPosition.y直接就是脚底位置，无需额外计算
         */;
        _proto._updateRoleSiblingIndex = function _updateRoleSiblingIndex() {
          if (!this._roleLayer) return;
          this._roleLayer.children.sort(function (nodA, nodB) {
            // Y从大到小排序：Y大的（画面上方）在数组前面（下层），Y小的（画面下方）在数组后面（上层）
            return nodB.worldPosition.y - nodA.worldPosition.y;
          });
        }

        /**
         * 创建怪物
         * @returns
         */;
        _proto.createMonster = function createMonster(param, loadCompleted) {
          var monster = RoleFactory.inst.createMonster(param, loadCompleted);
          // 添加到实体映射
          if (monster) {
            this._entityMap.set(monster.uid, monster);
            if (!this._entityTypeMap[GameBattle.RoleType.Monster]) {
              this._entityTypeMap[GameBattle.RoleType.Monster] = {};
            }
            this._entityTypeMap[GameBattle.RoleType.Monster][monster.uid] = monster;
          }
          return monster;
        }

        /**
         * 创建英雄
         */;
        _proto.createHero = function createHero(params) {
          var hero = RoleFactory.inst.createHero(params);

          // 添加到实体映射
          if (hero) {
            this._entityMap.set(hero.uid, hero);
            if (!this._entityTypeMap[GameBattle.RoleType.Hero]) {
              this._entityTypeMap[GameBattle.RoleType.Hero] = {};
            }
            this._entityTypeMap[GameBattle.RoleType.Hero][hero.uid] = hero;
          }
          return hero;
        }

        /**
         * 创建士兵
         */;
        _proto.createSoldier = function createSoldier(params) {
          var soldier = RoleFactory.inst.createSoldier(params);

          // 添加到实体映射
          if (soldier) {
            this._entityMap.set(soldier.uid, soldier);
            if (!this._entityTypeMap[GameBattle.RoleType.Soldier]) {
              this._entityTypeMap[GameBattle.RoleType.Soldier] = {};
            }
            this._entityTypeMap[GameBattle.RoleType.Soldier][soldier.uid] = soldier;
          }
          return soldier;
        }

        /**
         * 回收所有实体
         */;
        _proto.recoveryAll = function recoveryAll() {
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._entityMap.entries()), _step2; !(_step2 = _iterator2()).done;) {
            var _step2$value = _step2.value,
              _key2 = _step2$value[0],
              _entity = _step2$value[1];
            if (_entity.roleVO) {
              if (_entity.uid === 0) {
                _entity.uid = _key2;
              }
              this.recovery(_entity);
            }
          }
          this._entityMap.clear();
          this._entityTypeMap = {};
        }

        /**
         * 更新名字显示
         */;
        _proto.updtNameShow = function updtNameShow() {
          for (var _iterator3 = _createForOfIteratorHelperLoose(this._entityMap), _step3; !(_step3 = _iterator3()).done;) {
            var _step3$value = _step3.value,
              _key3 = _step3$value[0],
              _entity2 = _step3$value[1];
            if (_entity2 instanceof Monster) _entity2.updtNameShow();
          }
        }

        /**
         * 回收实体
         * @param entity 实体对象
         * @returns
         */;
        _proto.recovery = function recovery(entity) {
          if (!entity) return;

          // 从映射中移除
          this._entityMap["delete"](entity.uid);
          if (this._entityTypeMap[entity.type] && this._entityTypeMap[entity.type][entity.uid]) {
            delete this._entityTypeMap[entity.type][entity.uid];
          }

          // 实体回收逻辑
          entity.recovery();
          var path = GameBattle.RolePrefabPath[entity.type];
          if (typeof path === "string" && path !== "") {
            App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, path, entity.node);
          }
          entity.uid = 0;
        }
        /**
         * 回收全部怪物实体
         * @returns
         */;
        _proto.recoveryAllMonster = function recoveryAllMonster() {
          for (var _iterator4 = _createForOfIteratorHelperLoose(this._entityMap.entries()), _step4; !(_step4 = _iterator4()).done;) {
            var _step4$value = _step4.value,
              _key4 = _step4$value[0],
              _entity3 = _step4$value[1];
            if (_entity3 instanceof Monster) {
              if (_entity3.roleVO) {
                if (_entity3.uid === 0) {
                  _entity3.uid = _key4;
                }
                this.recovery(_entity3);
              }
            }
          }
        }

        /**
         * 遍历所有实体
         * @param callback 遍历回调
         */;
        _proto.foreachEntity = function foreachEntity(self, callback) {
          for (var _iterator5 = _createForOfIteratorHelperLoose(this._entityMap), _step5; !(_step5 = _iterator5()).done;) {
            var _step5$value = _step5.value,
              k = _step5$value[0],
              v = _step5$value[1];
            if (v instanceof Monster) {
              if (v.roleVO && (v.roleVO.hide === 0 || v.roleVO.selected === 2 || v.invulnerable || !v.isUsable)) {
                continue;
              }
            }
            if (callback.call(self, v)) break;
          }
        }

        /**
         * 锁定朝向的怪物，面向空旷地方
         */;
        _proto.adjustOrientation = function adjustOrientation(monster) {
          RoleFactory.inst.adjustOrientation(monster);
        }

        /**
         * 获取指定类型的角色
         * @param targetType
         * @returns
         */;
        _proto.getRolesByType = function getRolesByType(targetType) {
          return this._entityTypeMap[targetType] || {};
        }

        /**
         * 获取角色
         */;
        _proto.getRole = function getRole(uid) {
          return this._entityMap.get(uid);
        }

        /**
         * 获取当前战斗场景的boss
         * @returns
         */;
        _proto.getBoss = function getBoss() {
          for (var _iterator6 = _createForOfIteratorHelperLoose(this._entityMap), _step6; !(_step6 = _iterator6()).done;) {
            var _step6$value = _step6.value,
              k = _step6$value[0],
              v = _step6$value[1];
            if (v instanceof Monster && v.roleVO && v.roleVO.quality === GameBattle.MonsterQuality.Boss) {
              return v;
            }
          }
          return null;
        };
        _createClass(RoleCtrl, [{
          key: "entityMap",
          get: function get() {
            return this._entityMap;
          }
        }]);
        return RoleCtrl;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleDebugComp.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleProprMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Label, Component, BattlePropertyName;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Component = module.Component;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "e382eQxKDhNb5dtRcSkFrh7", "RoleDebugComp", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var RoleDebugComp = exports('RoleDebugComp', (_dec = ccclass("RoleDebugComp"), _dec2 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(RoleDebugComp, _Component);
        function RoleDebugComp() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 信息 */
          _initializerDefineProperty(_this, "lab_info", _descriptor, _assertThisInitialized(_this));
          /** 持有者 */
          _this._owner = void 0;
          return _this;
        }
        var _proto = RoleDebugComp.prototype;
        _proto.update = function update(deltaTime) {
          if (!this._owner || !this._owner.roleVO) return;
          var strInfo = "";
          // strInfo += `worldPosition:${this._owner.node.worldPosition}\n`;
          // strInfo += `RoleName:${this._owner.node.name}\n`;
          // strInfo += `[万分比]防御:${App.battleProprMgr.featchValueById(2002, this._owner.roleVO)}\n`;
          // strInfo += `爆伤:${App.battleProprMgr.featchValueById(10004, this._owner.roleVO)}\n`;
          // strInfo += `[总属性]防御:${App.battleProprMgr.featchValueById(2, this._owner.roleVO)}\n`;
          // strInfo += `增伤:${App.battleProprMgr.featchValueById(10007, this._owner.roleVO)}\n`;
          // if(this.owner.type == GameBattle.RoleType.Monster){
          //     strInfo += `技能释放次数:${(<Monster>this.owner)._monsterAI.skillUseTime}\n`;
          // }

          // strInfo += `UID :${this.owner.uid}\n`;
          // // strInfo += `atkTarget:${this._owner.lockTargetCtrl.target?.node.name}\n`;
          // // strInfo += `WorldBoundingBox:${this._owner.getBoundingBoxToWorld()}\n`;
          // // strInfo += `curState:${GameBattle.ActionState[this._owner.stateMachine.curState?.type]}\n`;
          // // strInfo += `moveFlag:${this._owner.stateMachine.moveFlag}\n`;
          // // strInfo += `CD:${this._owner.atkSkill.CD}\n`;

          strInfo += "\u6700\u5927\u8840\u91CF:" + this.owner.roleVO.getRoleAttr(BattlePropertyName.shengming) + "\n";
          strInfo += "\u5F53\u524D\u8840\u91CF:" + this.owner.roleVO.curHP + "\n";

          // strInfo += `全元素伤害:${this.owner.roleVO.getRoleAttr(10014)}\n`;
          this.lab_info.string = strInfo;
        };
        _createClass(RoleDebugComp, [{
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }]);
        return RoleDebugComp;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "lab_info", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleFactory.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BattleDefine.ts', './Monster.ts', './Hero.ts', './Soldier.ts', './App.ts', './Singleton.ts'], function (exports) {
  var _inheritsLoose, cclegacy, v3, ModuleDef, GameBattle, Monster, Hero, Soldier, App, Singleton;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      v3 = module.v3;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      Hero = module.Hero;
    }, function (module) {
      Soldier = module.Soldier;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Singleton = module.Singleton;
    }],
    execute: function () {
      cclegacy._RF.push({}, "5e320a5VcVP8JxIzfCXyyVJ", "RoleFactory", undefined);

      /**
       * 角色工厂类
       * 专注于角色实体的创建和回收
       */
      var RoleFactory = exports('RoleFactory', /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(RoleFactory, _Singleton);
        function RoleFactory() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          /** 角色层级节点 */
          _this._roleLayer = void 0;
          return _this;
        }
        var _proto = RoleFactory.prototype;
        /**
         * 设置角色层级节点
         */
        _proto.setRoleLayer = function setRoleLayer(layer) {
          this._roleLayer = layer;
        }

        /**
         * 获取唯一ID
         */;
        RoleFactory.generateUid = function generateUid() {
          return ++RoleFactory.uidCounter;
        }

        /**
         * 创建英雄
         */;
        _proto.createHero = function createHero(params) {
          // 从对象池获取英雄节点
          var heroNode = App.nodePoolMgr.getNode(ModuleDef.GAME_BATTLE_B + ":" + GameBattle.RolePrefabPath[GameBattle.RoleType.Hero]);
          if (!heroNode) {
            console.error("Failed to create hero: prefab not found");
            return null;
          }

          // 设置父节点
          if (params.parent) {
            heroNode.parent = params.parent;
          } else if (this._roleLayer) {
            heroNode.parent = this._roleLayer;
          }

          // 设置位置
          if (params.position) {
            heroNode.position = params.position;
          }

          // 获取Hero组件
          var hero = heroNode.getComponent(Hero);
          if (!hero) {
            console.error("Failed to get Hero component");
            App.nodePoolMgr.putNode(GameBattle.RolePrefabPath[GameBattle.RoleType.Hero], heroNode);
            return null;
          }

          // 初始化英雄
          hero.uid = RoleFactory.generateUid();
          hero.side = GameBattle.BattleSide.Player; // 设置为玩家阵营
          hero.initHeroData(params.heroId, params.level, params.stage, params.star);
          return hero;
        }

        /**
         * 创建士兵
         */;
        _proto.createSoldier = function createSoldier(params) {
          // 从对象池获取士兵节点
          var soldierNode = App.nodePoolMgr.getNode(ModuleDef.GAME_BATTLE_B + ":" + GameBattle.RolePrefabPath[GameBattle.RoleType.Soldier]);
          if (!soldierNode) {
            console.error("Failed to create soldier: prefab not found");
            return null;
          }

          // 设置父节点
          if (params.parent) {
            soldierNode.parent = params.parent;
          } else if (this._roleLayer) {
            soldierNode.parent = App.dungeonBattleMgr.battleMainViewCtrl.roleLayer;
          }

          // 设置位置
          if (params.position) {
            soldierNode.position = params.position;
          } else {
            // 计算默认位置
            var defaultPos = this.calculateSoldierSpawnPosition(params.lane);
            soldierNode.position = defaultPos;
          }

          // 获取Soldier组件
          var soldier = soldierNode.getComponent(Soldier);
          if (!soldier) {
            console.error("Failed to get Soldier component");
            App.nodePoolMgr.putNode(GameBattle.RolePrefabPath[GameBattle.RoleType.Soldier], soldierNode);
            return null;
          }

          // 初始化士兵
          soldier.uid = RoleFactory.generateUid();
          soldier.side = GameBattle.BattleSide.Player; // 设置为玩家阵营
          soldier.initSoldierData(params.soldierType, params.baseStage || 1, params.baseLevel || 1);
          soldier.deployToLane(params.lane, soldierNode.position);
          return soldier;
        }

        /**
         * 创建怪物
         */;
        _proto.createMonster = function createMonster(param, loadCompleted) {
          var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.RolePrefabPath[GameBattle.RoleType.Monster]);
          if (!node || !node.isValid) {
            App.log.logError("Failed to create monster: node is null");
            return null;
          }
          var comp = node.getComponent(Monster);
          if (!comp) {
            App.log.logError("Failed to get Monster component from node");
            App.nodePoolMgr.putNode(GameBattle.RolePrefabPath[GameBattle.RoleType.Monster], node);
            return null;
          }
          if (loadCompleted) {
            comp.setLoadCompleted(loadCompleted);
          }

          // 获取父节点，确保不为 null
          var parentNode = param.parent || App.dungeonBattleMgr.battleMainViewCtrl.roleLayer;
          if (!parentNode) {
            App.log.logError("Failed to create monster: parent node is null");
            return null;
          }

          // 设置为敌方阵营
          comp.side = GameBattle.BattleSide.Enemy;

          // 生成UID
          comp.uid = param.uid || RoleFactory.generateUid();

          // 设置父节点和位置
          if (param.layer) {
            param.layer.addUserNode(comp.node);
            if (!comp.myLayer) {
              comp.myLayer = param.layer;
            }
          } else if (parentNode) {
            setTimeout(function () {
              // 检查节点和父节点是否仍然有效
              if (comp.node && parentNode.isValid) {
                comp.node.parent = parentNode;
              }
            }, 500);
          }
          comp.node.setWorldPosition(param.position);
          comp.reuse(param.id);
          comp.node.name = GameBattle.RoleType[comp.type] + "_" + param.id + "_" + comp.uid;
          this.adjustOrientation(comp);
          return comp;
        }

        /**
         * 计算士兵生成位置
         */;
        _proto.calculateSoldierSpawnPosition = function calculateSoldierSpawnPosition(lane) {
          // 根据兵线计算具体的生成位置，避免重叠
          var positions = GameBattle.HeroPoints.get(lane);

          // 添加随机偏移，避免重叠（在出生点附近小范围随机）
          var offsetX = (Math.random() - 0.5) * 100; // -40 到 +40 像素
          var offsetY = (Math.random() - 0.5) * 60; // -30 到 +30 像素

          return v3(positions.x + offsetX, positions.y + offsetY, 0);
        }

        /**
         * 锁定朝向的怪物，面向空旷地方
         */;
        _proto.adjustOrientation = function adjustOrientation(monster) {
          if (monster.roleVO.lockOrientation) {
            var pos = monster.node.worldPosition;
            var tileWidth = App.mapMgr.tiledWidth;
            var step = 1;
            while (true) {
              var leftBlock = App.mapMgr.checkBlock(v3(pos.x - step * tileWidth, pos.y, 0));
              if (leftBlock) {
                monster.view.isFlipX = true;
                return;
              }
              var rightBlock = App.mapMgr.checkBlock(v3(pos.x + step * tileWidth, pos.y, 0));
              if (rightBlock) {
                monster.view.isFlipX = false;
                return;
              }
              step++;
            }
          }
        };
        return RoleFactory;
      }(Singleton()));
      /** 唯一ID生成器 */
      RoleFactory.uidCounter = 10000;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleFSM.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './Monster.ts'], function (exports) {
  var _createClass, cclegacy, GameBattle, Monster;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      Monster = module.Monster;
    }],
    execute: function () {
      var _AnimationName;
      cclegacy._RF.push({}, "d612bOb+x5OZpGhUhUSUZro", "RoleFSM", undefined); // 动画接口定义 - 用于支持多种动画实现
      /**
       * 状态动画对应关系
       */
      var AnimationName = (_AnimationName = {}, _AnimationName[GameBattle.ActionState.Idle] = {
        name: "Idle",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Move] = {
        name: "Move",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Stun] = {
        name: "Idle",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Rooted] = {
        name: "Move",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Feared] = {
        name: "Move",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Bewitch] = {
        name: "Move",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Attack] = {
        name: "Attack",
        loop: false
      }, _AnimationName[GameBattle.ActionState.UnderAttack] = {
        name: "Hit",
        loop: false
      }, _AnimationName[GameBattle.ActionState.Dead] = {
        name: "Dead",
        loop: false
      }, _AnimationName[GameBattle.ActionState.Affected] = {
        name: "Hit",
        loop: false
      }, _AnimationName[GameBattle.ActionState.Run] = {
        name: "Move",
        loop: true
      }, _AnimationName[GameBattle.ActionState.Skill] = {
        name: "Skill",
        loop: false
      }, _AnimationName);
      var RoleFSM = exports('RoleFSM', /*#__PURE__*/function () {
        function RoleFSM() {
          this._animationPlayer = null;
          this._type = 0;
          this.owner = void 0;
        }
        var _proto = RoleFSM.prototype;
        _proto.init = function init(animationPlayer) {
          this._animationPlayer = animationPlayer;
          this._type = GameBattle.ActionState.Idle;
          this._animationPlayer.play("Idle", true);
        }

        /**
         * 检查指定的状态是否已设置。
         *
         * @param state 要检查的状态标志。
         * @returns 如果当前实体的状态包含指定的状态标志，则返回 `true`；否则返回 `false`。
         */;
        _proto.isStateSet = function isStateSet(state) {
          return (this._type & state) === state;
        }

        /**
         * 检查指定的状态是否未设置。
         *
         * @param state 要检查的状态标志。
         * @returns 如果当前实体的状态不包含指定的状态标志，则返回 `true`；否则返回 `false`。
         */;
        _proto.isNotStateSet = function isNotStateSet(state) {
          return (this._type & state) !== state;
        }

        /**
         * 可移动
         * @returns
         */;
        _proto.canMove = function canMove() {
          var canMoveOrIdle = this.isStateSet(GameBattle.ActionState.Idle) || this.isStateSet(GameBattle.ActionState.Move);
          var isNotBind = this.isNotStateSet(GameBattle.ActionState.Stun) && this.isNotStateSet(GameBattle.ActionState.Rooted) && this.isNotStateSet(GameBattle.ActionState.Bewitch);
          // 怪物攻击或使用技能时不能移动，这里简化处理
          if (this.owner && this.owner instanceof Monster) {
            return canMoveOrIdle && this.isNotStateSet(GameBattle.ActionState.Attack) && this.isNotStateSet(GameBattle.ActionState.Skill);
          } else {
            // 其他实体只要处于空闲或移动状态就可以移动
            return canMoveOrIdle && isNotBind;
          }
        }

        /**
         * 可转向
         * @returns
         */;
        _proto.canTurn = function canTurn() {
          // 检查控制状态
          if (this.isStateSet(GameBattle.ActionState.Stun) || this.isStateSet(GameBattle.ActionState.Feared)) {
            return false;
          }
          return !this.isStateSet(GameBattle.ActionState.Dead);
        }

        /**
         * 可攻击
         * @returns
         */;
        _proto.canAttack = function canAttack() {
          // 可以攻击当且仅当不处于攻击状态或技能状态，并且处于空闲或移动状态
          var result = this.isNotStateSet(GameBattle.ActionState.Attack) && this.isNotStateSet(GameBattle.ActionState.Skill) && this.isNotStateSet(GameBattle.ActionState.Stun) && this.isNotStateSet(GameBattle.ActionState.Bewitch) && (this.isStateSet(GameBattle.ActionState.Idle) || this.isStateSet(GameBattle.ActionState.Move) || this.isStateSet(GameBattle.ActionState.Rooted));
          // console.log('当前状态', this.type);
          // console.log('可攻击', result);
          return result;
        }

        /**
         * 是否正在攻击
         * @returns
         */;
        _proto.isAttacking = function isAttacking() {
          return this.isStateSet(GameBattle.ActionState.Attack);
        }

        /**
         * 状态退出
         * @param type
         */;
        _proto.exitType = function exitType(type) {
          var temp = this._type;
          this._type = this._type & ~type;
          if (this._type === GameBattle.ActionState.Idle) {
            if (temp !== GameBattle.ActionState.Idle) {
              this._animationPlayer.play("Idle", true);
            }
          } else {
            if ((temp & type) > 0) {
              var data = AnimationName[type];
              if (data) {
                this._animationPlayer.clearAnimation(data.name);
              }
            }
          }
        };
        _proto.clearType = function clearType() {
          if (this._type !== GameBattle.ActionState.Idle) {
            this._type = GameBattle.ActionState.Idle;
            this._animationPlayer.play("Idle", true);
          }
        };
        _proto.setSkill = function setSkill(skillName, skill) {
          // Skill是强状态，直接设置，不叠加
          this._type = GameBattle.ActionState.Skill;
          var loop = false; // 技能动画不循环

          // 注意：不在这里设置完成回调，因为Hero/Monster已经在resetSpineEvent中设置了完整的回调机制
          // 动画完成后会通过Hero.resetSpineEvent中的setCompleteHandler回调来调用handleSkillComplete

          this._animationPlayer.addAnimation(skillName, loop);
        };
        _proto.isSkilling = function isSkilling() {
          return this.isStateSet(GameBattle.ActionState.Skill);
        };
        _proto.clearAniTrack = function clearAniTrack() {
          // 帧动画不需要清除track，动画系统会自动处理
          // 如果需要特殊处理，可以在这里添加逻辑
        };
        _createClass(RoleFSM, [{
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(type) {
            if ((this._type & type) > 0) return;
            var data = AnimationName[type];
            if (type > GameBattle.ActionState.MIDDLE) {
              if (data.name !== undefined && data.name.length > 0) {
                this._animationPlayer && this._animationPlayer.play(data.name, data.loop);
              }
              this._type = type;
            } else {
              if (this._type > GameBattle.ActionState.MIDDLE) {
                var _AnimationName$this$_;
                console.log("有强状态下不能改变状态");
                console.log("当前状态", (_AnimationName$this$_ = AnimationName[this._type]) == null ? void 0 : _AnimationName$this$_.des);
              } else {
                // 检查是否在Skill状态下尝试添加其他状态
                if (this._type === GameBattle.ActionState.Skill && type !== GameBattle.ActionState.Skill) {
                  return;
                }
                if (data.name !== undefined && data.name.length > 0) {
                  // if (this.owner && this.owner.needClearAnimation()) {
                  //     this.clearAniTrack();
                  // }
                  this._animationPlayer && this._animationPlayer.addAnimation(data.name, data.loop);
                }
                this._type |= type;
                // App.log.logBusiness("GameBatttle.ActionState:", "", this._type, data.name);
              }
            }
          }
        }]);

        return RoleFSM;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ModuleDef.ts', './DBRecord.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Node, Component, App, ModuleDef, DBRecord;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "7b781avwPFHzogdDMQAlkuO", "RoleItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * RoleItem 使用模式
       */
      var RoleItemMode = exports('RoleItemMode', /*#__PURE__*/function (RoleItemMode) {
        RoleItemMode[RoleItemMode["NORMAL"] = 0] = "NORMAL";
        RoleItemMode[RoleItemMode["DRESS_SELECT"] = 1] = "DRESS_SELECT";
        return RoleItemMode;
      }({}));
      var RoleItem = exports('RoleItem', (_dec = ccclass("RoleItem"), _dec2 = property(Sprite), _dec3 = property(Sprite), _dec4 = property({
        type: Node,
        tooltip: "锁定标识节点"
      }), _dec5 = property({
        type: Node,
        tooltip: "使用中标识节点"
      }), _dec6 = property({
        type: Node,
        tooltip: "选中标识节点"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(RoleItem, _Component);
        function RoleItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "imgBg", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "headIcon", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lockNode", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "inUseNode", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "selectedNode", _descriptor5, _assertThisInitialized(_this));
          /** 当前使用模式 */
          _this._mode = RoleItemMode.NORMAL;
          /** 是否已选中 */
          _this._isSelected = false;
          /** 是否已解锁 */
          _this._isUnlocked = true;
          /** 是否使用中 */
          _this._isInUse = false;
          /** 头像ID */
          _this._headId = 0;
          /** 点击回调（普通模式使用） */
          _this._clickCallback = null;
          /** 选择回调（装扮选择模式使用） */
          _this._selectCallback = null;
          return _this;
        }
        var _proto = RoleItem.prototype;
        /**
         * 初始化组件
         * @param mode 使用模式
         * @param headId 头像ID
         * @param isUnlocked 是否已解锁
         * @param isInUse 是否使用中
         */
        _proto.show = function show(mode, headId, isUnlocked, isInUse) {
          if (isUnlocked === void 0) {
            isUnlocked = true;
          }
          if (isInUse === void 0) {
            isInUse = false;
          }
          this._mode = mode;
          this._headId = headId;
          this._isUnlocked = isUnlocked;
          this._isInUse = isInUse;
          this._isSelected = false;
          this.updateDisplay();
        }

        /**
         * 设置点击回调（普通模式）
         */;
        _proto.setClickCallback = function setClickCallback(callback) {
          this._clickCallback = callback;
        }

        /**
         * 设置选择回调（装扮选择模式）
         */;
        _proto.setSelectCallback = function setSelectCallback(callback) {
          this._selectCallback = callback;
        }

        /**
         * 设置选中状态
         */;
        _proto.setSelected = function setSelected(selected) {
          this._isSelected = selected;
          this.updateDisplay();
        }

        /**
         * 获取是否选中
         */;
        _proto.isSelected = function isSelected() {
          return this._isSelected;
        }

        /**
         * 获取头像ID
         */;
        _proto.getHeadId = function getHeadId() {
          return this._headId;
        }

        /**
         * 更新显示
         */;
        _proto.updateDisplay = function updateDisplay() {
          if (this.headIcon && this._headId > 0) {
            var config = DBRecord.fetchId("Gexinghua", this._headId);
            if (config) {
              App.resMgr.loadImage(this.headIcon, ModuleDef.GAME_ICON, "/head_icon/" + config.icon);
            }
          }
          if (this._mode === RoleItemMode.DRESS_SELECT) {
            this.updateDressSelectMode();
          } else {
            this.updateNormalMode();
          }
        }

        /**
         * 更新装扮选择模式显示
         */;
        _proto.updateDressSelectMode = function updateDressSelectMode() {
          if (this.lockNode) {
            this.lockNode.active = !this._isUnlocked;
          }
          if (this.inUseNode) {
            this.inUseNode.active = this._isInUse;
          }
          if (this.selectedNode) {
            this.selectedNode.active = this._isSelected;
          }
        }

        /**
         * 更新普通模式显示
         */;
        _proto.updateNormalMode = function updateNormalMode() {
          if (this.lockNode) {
            this.lockNode.active = false;
          }
          if (this.inUseNode) {
            this.inUseNode.active = false;
          }
          if (this.selectedNode) {
            this.selectedNode.active = false;
          }
        }

        /**
         * 点击事件处理
         */;
        _proto.onBtnClick = function onBtnClick() {
          if (this._mode === RoleItemMode.DRESS_SELECT) {
            this.handleDressSelectClick();
          } else {
            this.handleNormalClick();
          }
        }

        /**
         * 处理装扮选择模式的点击
         */;
        _proto.handleDressSelectClick = function handleDressSelectClick() {
          if (this._selectCallback) {
            this._selectCallback(this._headId, this);
          }
        }

        /**
         * 处理普通模式的点击
         */;
        _proto.handleNormalClick = function handleNormalClick() {
          App.log.logBusiness("点击了英雄: " + this._headId);
          if (this._clickCallback) {
            this._clickCallback(this._headId);
          }
        };
        return RoleItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "imgBg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "headIcon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "inUseNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "selectedNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './NetChannelMgr.ts', './DBRecord.ts', './UtilityPlatform.ts', './App.ts', './GameShareMgr.ts', './GameDef.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, MonitorType, ModType, netChannel, DBRecord, UtilityPlatform, App, GameShareLogType, GameDef;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameShareLogType = module.GameShareLogType;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "60c6cYyyXBCObUU2k6y7bbf", "RoleMgr", undefined);
      var RoleMgr = exports('RoleMgr', /*#__PURE__*/function () {
        function RoleMgr() {
          /**
           * 角色数据
           */
          this._roleInfo = void 0;
          /**
           * 资源列表
           */
          this._asset_list = [];
          /**
           * 已解锁的头像ID列表
           */
          this._unlockedHeadList = [];
        }
        var _proto = RoleMgr.prototype;
        _proto._resetData = function _resetData() {
          this._roleInfo = undefined;
          this._asset_list = [];
          this._unlockedHeadList = [];
        };
        _proto.init = function init() {
          this._resetData();
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUserLoad, this.resUserLoad, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSetHead, this.resSetHead, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResHeadPictureList, this.resHeadPictureList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAddHeadPicture, this.resAddHeadPicture, this);
        };
        _proto.dispose = function dispose() {
          this._resetData();
          App.monitorMgr.offTarget(this);
        };
        _proto.getRoleUd = function getRoleUd() {
          var _this$_roleInfo;
          return ((_this$_roleInfo = this._roleInfo) == null ? void 0 : _this$_roleInfo.uid) + "";
        };
        _proto.chkSelfUd = function chkSelfUd(id) {
          var _this$_roleInfo2;
          return ((_this$_roleInfo2 = this._roleInfo) == null ? void 0 : _this$_roleInfo2.uid) === id;
        };
        _proto.getRoleLv = function getRoleLv() {
          if (this._roleInfo) {
            return this._roleInfo.lv;
          }
          return 0;
        };
        _proto.getRoleInfo = function getRoleInfo() {
          return this._roleInfo;
        };
        _proto.getRoleName = function getRoleName() {
          if (this._roleInfo) {
            return this._roleInfo.nickname;
          }
          return "";
        };
        _proto.setRoleName = function setRoleName(name) {
          this._roleInfo.nickname = name;
        }

        /**
         * 获取当前使用的头像ID
         */;
        _proto.getHeadId = function getHeadId() {
          var _this$_roleInfo3;
          return ((_this$_roleInfo3 = this._roleInfo) == null ? void 0 : _this$_roleInfo3.head_id) || 1;
        }

        /**
         * 设置头像ID
         */;
        _proto.setHeadId = function setHeadId(headId) {
          if (this._roleInfo) {
            this._roleInfo.head_id = headId;
          }
        }

        /**
         * 获取玩家资源数量
         * @param id 资源ID
         * @returns 资源数量
         */;
        _proto.getPlayerResCount = function getPlayerResCount(id) {
          return this._asset_list[id] || 0;
        }

        /**
         * 更新玩家资源列表
         * @param items 物品列表
         */;
        _proto.updatePlayerAsset = function updatePlayerAsset(items) {
          if (!items || items.length === 0) return;
          for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) {
            var item = _step.value;
            if (!item || !item.itemid) continue;
            var itemConfig = App.bagMgr.getItemConfig(item.itemid);
            if (itemConfig && itemConfig.type === 1) {
              this._asset_list[item.itemid] = item.num || 0;
            }
          }
        }

        /**
         * 设置单个资源数量
         * @param id 资源ID
         * @param count 数量
         */;
        _proto.setPlayerResCount = function setPlayerResCount(id, count) {
          this._asset_list[id] = count;
        }

        /**
         *  检测功能解锁
         */;
        _proto.chkGonNenJieSuo = function chkGonNenJieSuo(id) {
          var c_jiesuo = DBRecord.fetchId("GongNengJieSuo", id);
          if (!c_jiesuo) return false;
          var v_need = c_jiesuo.need;
          for (var dx0 = 0; dx0 < v_need.length; dx0++) {
            var c_need = v_need[dx0];
            if (c_need[0] === 1) {
              if (GameDef.shenHeZhong) {
                return false;
              }
              return App.battleMgr.getGuanQiaShouTongType(c_need[1]) > 0;
            } else if (c_need[0] === 2) {
              return this._roleInfo.lv >= c_need[2];
            } else if (c_need[0] === 3) {
              return this.chkGonNenJieSuo(c_need[1]);
            }
          }
          return true;
        }

        /**
         * 请求玩家信息
         */;
        _proto.reqPlayerInfo = function reqPlayerInfo() {
          console.error("请求玩家信息 =", App.loginMgr.selServer.sid);
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUserLoad, {});
        }

        /**
         * 请求头像列表
         */;
        _proto.reqHeadPictureList = function reqHeadPictureList() {
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqHeadPictureList, {});
        }

        /**
         * 获取已解锁的头像列表
         */;
        _proto.getUnlockedHeadList = function getUnlockedHeadList() {
          return this._unlockedHeadList;
        }

        /**
         * 检查头像是否已解锁
         * @param headId 头像ID
         */;
        _proto.isHeadUnlocked = function isHeadUnlocked(headId) {
          return this._unlockedHeadList.includes(headId);
        }

        /**
         * 请求设置头像
         * @param headId 头像ID
         */;
        _proto.reqSetHead = function reqSetHead(headId) {
          var msg = {};
          msg.head_id = headId;
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqSetHead, msg);
        }

        /**
         * 响应头像列表
         * @param obj 响应数据 { code: number, list: number[] }
         */;
        _proto.resHeadPictureList = function resHeadPictureList(obj) {
          if (obj.code !== 200) {
            App.log.logError("获取头像列表失败:", "玩家头像", obj.code);
            return;
          }
          if (obj.head_list && Array.isArray(obj.head_list)) {
            this._unlockedHeadList = obj.head_list;
            App.log.logBusiness("已解锁头像列表:", "玩家头像", this._unlockedHeadList);
          }
        }

        /**
         * 响应新增头像推送
         * @param obj 推送数据 { code: number, ids: number[] }
         */;
        _proto.resAddHeadPicture = function resAddHeadPicture(obj) {
          if (obj.code !== 200) {
            App.log.logError("新增头像失败:", "玩家头像", obj.code);
            return;
          }
          if (obj.head_list && Array.isArray(obj.head_list)) {
            for (var _iterator2 = _createForOfIteratorHelperLoose(obj.head_list), _step2; !(_step2 = _iterator2()).done;) {
              var id = _step2.value;
              if (!this._unlockedHeadList.includes(id)) {
                this._unlockedHeadList.push(id);
              }
            }
            App.log.logBusiness("新增头像:", "角色模块", obj.head_list, "当前已解锁:", this._unlockedHeadList);
          }
        }

        /**
         * 响应设置头像
         * @param obj 响应数据
         */;
        _proto.resSetHead = function resSetHead(obj) {
          if (obj.code !== 200) {
            App.log.logError("设置头像失败:", "玩家头像", obj.code);
            return;
          }
          if (this._roleInfo && obj.head_id !== undefined) {
            this._roleInfo.head_id = obj.head_id;
          }
        }

        /**
         * 加载用户信息请求返回数据
         * @param obj
         */;
        _proto.resUserLoad = function resUserLoad(obj) {
          if (!this._roleInfo) {
            var sdkData = {
              sid: obj.serverid + "",
              // 服务器id
              roleid: obj.uid + "",
              // 角色id
              rolename: obj.nickname,
              //角色名
              vip: "1",
              level: obj.lv.toString(),
              //用户等级
              sname: App.loginMgr.selServer.sname //服务器名
            };

            UtilityPlatform.getInstance().login(sdkData);
          }
          this._roleInfo = obj;
          App.saveDataMgr.setUser(this.getRoleUd());
          App.monitorMgr.dispatchEvent(MonitorType.battle_ui_view_update);
          var sopId = App.loginMgr.getSopServerDay();
          if (sopId) {
            UtilityPlatform.getInstance().SOPInfo(sopId);
          }
          if (App.loginMgr.needPostShareLog) {
            App.loginMgr.needPostShareLog = false;
            App.gameShareMgr.gameShareLog(GameShareLogType.ClickCard);
          }
        };
        return RoleMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/RoleSkill.ts", ['cc'], function (exports) {
  var cclegacy, _decorator;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "98220I1VKJEIan6haALtzKI", "RoleSkill", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var RoleSkill = exports('RoleSkill', (_dec = ccclass("RoleSkill"), _dec(_class = /*#__PURE__*/function () {
        function RoleSkill() {
          this._owner = void 0;
        }
        var _proto = RoleSkill.prototype;
        _proto.init = function init(id, owner) {
          this._owner = owner;
        };
        _proto.reset = function reset() {}
        /**
         * 眩晕
         * @param buff
         * @param buffEffect
         */;
        _proto.XuanYun = function XuanYun(buff, buffEffect) {}

        /**
         * 缠绕
         * @param buff
         * @param buffEffect
         */;
        _proto.Round = function Round(buff, buffEffect) {}

        /**
         * 技能效果
         * @param buff
         * @param buffEffect
         */;
        _proto.buffEffect = function buffEffect(buff, _buffEffect) {};
        return RoleSkill;
      }()) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SaveDataMgr.ts", ['cc', './MonitorType.ts', './App.ts', './GameDef.ts'], function (exports) {
  var cclegacy, sys, MonitorType, App, GameDef;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      sys = module.sys;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "3db07FgMylNtImMdpYvmxvh", "SaveDataMgr", undefined);

      /**
       * 本地存储key记录
       */
      var LOCAL_STORE_KEY = exports('LOCAL_STORE_KEY', /*#__PURE__*/function (LOCAL_STORE_KEY) {
        LOCAL_STORE_KEY["sound"] = "sound";
        LOCAL_STORE_KEY["autoTrain"] = "autoTrain";
        return LOCAL_STORE_KEY;
      }({}));

      /** 本地存储 */
      var SaveDataMgr = exports('SaveDataMgr', /*#__PURE__*/function () {
        function SaveDataMgr() {
          this._userId = "";
        }
        var _proto = SaveDataMgr.prototype;
        _proto.init = function init() {}

        /**
         * 设置用户唯一标识
         * @param id
         */;
        _proto.setUser = function setUser(id) {
          this._userId = id;
          App.monitorMgr.dispatchEvent(MonitorType.saveData_setUser_end, {});
        }

        /**
         * 存储本地数据
         * @param key 存储key
         * @param value 存储值
         * @returns
         */;
        _proto.set = function set(key, value, useUserId) {
          if (useUserId === void 0) {
            useUserId = true;
          }
          if (key === null) {
            console.warn("存储的key不能为空");
            return;
          }
          var keywords = useUserId ? this._userId + "_" + key : key;
          if (value === null) {
            console.warn("存储的值为空，则直接移除该存储");
            this.remove(keywords, useUserId);
            return;
          }
          if (typeof value === "function") {
            console.warn("储存的值不能为方法");
            return;
          }
          if (typeof value === "object") {
            try {
              value = JSON.stringify(value);
            } catch (e) {
              console.warn("\u89E3\u6790\u5931\u8D25\uFF0Cstr = " + value);
              return;
            }
          } else if (typeof value === "number") {
            value = value + "";
          }
          switch (GameDef.gamePlatform_video) {
            case 1:
            case 4:
            case 5:
            case 6:
            case 99:
              window.localStorage.setItem(keywords, value);
              break;
            case 2:
              //wx
              localStorage.setItem(keywords, value); //wx的api暂未导入
              break;
            default:
              window.localStorage.setItem(keywords, value);
              break;
          }
          sys.localStorage.setItem(keywords, value);
        }

        /**
         * 获取指定关键字的数据
         * @param key          获取的关键字
         * @param defaultValue 获取的默认值
         * @returns
         */;
        _proto.get = function get(key, defaultValue, useUserId) {
          if (defaultValue === void 0) {
            defaultValue = "";
          }
          if (useUserId === void 0) {
            useUserId = true;
          }
          if (key === null) {
            console.warn("存储的key不能为空");
            return null;
          }
          key = useUserId ? this._userId + "_" + key : key;
          var str = null;
          switch (GameDef.gamePlatform_video) {
            case 1:
            case 4:
            case 5:
            case 6:
            case 99:
              str = window.localStorage.getItem(key);
              break;
            case 2:
              //wx
              localStorage.getItem(key);
              break;
            default:
              str = window.localStorage.getItem(key);
              break;
          }
          // let str: string | null = sys.localStorage.getItem(key);
          if (str === null) {
            return defaultValue;
          }
          return str;
        }

        /** 获取指定关键字的数值 */;
        _proto.getNumber = function getNumber(key, defaultValue, useUserId) {
          if (defaultValue === void 0) {
            defaultValue = 0;
          }
          if (useUserId === void 0) {
            useUserId = true;
          }
          var r = this.get(key, "", useUserId);
          if (r === "0") {
            return Number(r);
          }
          return Number(r) || defaultValue;
        }

        /** 获取指定关键字的布尔值 */;
        _proto.getBoolean = function getBoolean(key, useUserId) {
          if (useUserId === void 0) {
            useUserId = true;
          }
          var r = this.get(key, "false", useUserId);
          return r === "true";
        }

        /** 获取指定关键字的JSON对象 */;
        _proto.getJson = function getJson(key, useUserId) {
          if (useUserId === void 0) {
            useUserId = true;
          }
          if (key === null) {
            console.warn("存储的key不能为空");
            return;
          }
          var keywords = useUserId ? this._userId + "_" + key : key;
          var r = this.get(keywords, "", useUserId);
          return r && JSON.parse(r) || null;
        }

        /**
         * 删除指定关键字的数据
         * @param key 需要移除的关键字
         * @returns
         */;
        _proto.remove = function remove(key, useUserId) {
          if (useUserId === void 0) {
            useUserId = true;
          }
          if (key === null) {
            console.warn("存储的key不能为空");
            return;
          }
          var keywords = useUserId ? this._userId + "_" + key : key;
          sys.localStorage.removeItem(keywords);
        }

        /** 清空整个本地存储 */;
        _proto.clear = function clear() {
          sys.localStorage.clear();
        };
        return SaveDataMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ScheduleMgr.ts", ['cc'], function (exports) {
  var cclegacy, director, Scheduler, Component;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      director = module.director;
      Scheduler = module.Scheduler;
      Component = module.Component;
    }],
    execute: function () {
      cclegacy._RF.push({}, "88419D4VLhL8JEFrnD2agiC", "ScheduleMgr", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-10-28 16:28:41
       * @FilePath: \CodeB\assets\script\frameworks\manager\base\ScheduleManager.ts
       * @LastEditors: xiehande www.xiehande@qq.com
       * @LastEditTime: 2025-10-21 18:46:26
       * @Description: 全局定时器管理器
       */
      /**
       * 定时器任务接口
       */
      var ScheduleMgr = exports('ScheduleMgr', /*#__PURE__*/function () {
        function ScheduleMgr() {
          this._tasks = new Map();
          this._updateId = 0;
          this._pausedTasks = new Map();
          this._scheduler = null;
          this._debugTaskId = void 0;
          this._compTarget = null;
          this._scheduler = director.getScheduler();
        }
        var _proto = ScheduleMgr.prototype;
        _proto.init = function init() {
          if (!this._scheduler) this._scheduler = director.getScheduler();
          this._compTarget = {
            uuid: "ScheduleManager",
            update: this.update.bind(this)
          };
          this._scheduler.unscheduleAllForTarget(this._compTarget);
          this._scheduler.unscheduleUpdate(this._compTarget);
          Scheduler.enableForTarget(this._compTarget);
          this._scheduler.scheduleUpdate(this._compTarget, 0, false);
          // this.startDebugPrint();
        }

        /**
         * 添加定时器任务
         * @param callback 回调函数
         * @param target 回调函数的this指向
         * @param interval 时间间隔(秒)
         * @param delay 延迟时间(秒)
         * @param repeat 重复次数(-1表示无限重复)
         * @returns taskId 任务ID
         */;
        _proto.schedule = function schedule(callback, target, interval, delay, repeat) {
          if (delay === void 0) {
            delay = 0;
          }
          if (repeat === void 0) {
            repeat = -1;
          }
          var taskId = "schedule_" + ++this._updateId;
          this._tasks.set(taskId, {
            callback: callback,
            target: target,
            interval: interval,
            delay: delay,
            repeat: repeat,
            accumulator: 0,
            repeatCount: 0
          });
          return taskId;
        }

        /**
         * 添加只执行一次的定时器任务
         * @param callback 回调函数
         * @param target 回调函数的this指向
         * @param delay 延迟时间(秒)
         * @returns taskId 任务ID
         */;
        _proto.scheduleOnce = function scheduleOnce(callback, target, delay) {
          if (delay === void 0) {
            delay = 0;
          }
          return this.schedule(callback, target, 0, delay, 1);
        }

        /**
         * 添加每帧执行的更新函数
         * @param callback 回调函数
         * @param target 回调函数的this指向
         * @returns taskId 任务ID
         */;
        _proto.scheduleUpdate = function scheduleUpdate(callback, target) {
          var taskId = "update_" + ++this._updateId;
          this._tasks.set(taskId, {
            callback: callback,
            target: target,
            interval: 0,
            isUpdate: true
          });
          return taskId;
        }

        /**
         * 添加带有安全检查的定时器任务
         * @param callback 回调函数
         * @param target 回调函数的this指向
         * @param interval 时间间隔(秒)
         * @param delay 延迟时间(秒)
         * @param repeat 重复次数(-1表示无限重复)
         * @returns taskId 任务ID
         */;
        _proto.scheduleSafe = function scheduleSafe(callback, target, interval, delay, repeat) {
          if (delay === void 0) {
            delay = 0;
          }
          if (repeat === void 0) {
            repeat = -1;
          }
          return this.schedule(this.createSafeCallback(callback, target), target, interval, delay, repeat);
        }

        /**
         * 添加带有安全检查的只执行一次的定时器
         * @param callback 回调函数
         * @param target 回调函数的this
         * @param delay 延迟时间(秒)
         * @returns taskId 任务ID
         */;
        _proto.scheduleOnceSafe = function scheduleOnceSafe(callback, target, delay) {
          if (delay === void 0) {
            delay = 0;
          }
          return this.scheduleOnce(this.createSafeCallback(callback, target), target, delay);
        }
        /**
         * 取消定时器任务
         * @param taskId 任务ID
         */;
        _proto.unschedule = function unschedule(taskId) {
          this._tasks["delete"](taskId);
        }

        /**
         * 取消target上的所有定时器任务
         * @param target 目标对象
         */;
        _proto.unscheduleAllForTarget = function unscheduleAllForTarget(target) {
          var _this = this;
          this._tasks.forEach(function (task, taskId) {
            if (task.target === target) {
              _this._tasks["delete"](taskId);
            }
          });
        }

        /**
         * 暂停所有定时器任务
         */;
        _proto.pauseAll = function pauseAll() {
          var _this2 = this;
          console.log("暂停所有任务");
          this._tasks.forEach(function (task, taskId) {
            if (task.interval >= 0) {
              // 只处理未暂停的任务
              _this2._pausedTasks.set(taskId, task.interval);
              task.interval = -1;
            }
          });
        }

        /**
         * 恢复所有定时器任务
         */;
        _proto.resumeAll = function resumeAll() {
          var _this3 = this;
          console.log("恢复所有任务");
          this._pausedTasks.forEach(function (interval, taskId) {
            var task = _this3._tasks.get(taskId);
            if (task) {
              task.interval = interval;
            }
          });
          this._pausedTasks.clear();
        }

        /**
         * 暂停定时器任务
         * @param taskId 任务ID
         */;
        _proto.pauseTask = function pauseTask(taskId) {
          var task = this._tasks.get(taskId);
          if (task && task.interval >= 0) {
            this._pausedTasks.set(taskId, task.interval);
            task.interval = -1;
          }
        }

        /**
         * 恢复定时器任务
         * @param taskId 任务ID
         * @param interval 时间间隔 如果提供了新的interval就使用新的，否则使用保存的原始值
         */;
        _proto.resumeTask = function resumeTask(taskId, interval) {
          var task = this._tasks.get(taskId);
          if (task) {
            var _ref;
            task.interval = (_ref = interval != null ? interval : this._pausedTasks.get(taskId)) != null ? _ref : 0;
            this._pausedTasks["delete"](taskId);
          }
        }

        /**
         * 帧更新
         * @param dt 帧间隔时间
         */;
        _proto.update = function update(dt) {
          var _this4 = this;
          this._tasks.forEach(function (task, taskId) {
            if (task.interval < 0) return; // 已暂停

            if (task.isUpdate) {
              // 每帧更新
              task.callback.call(task.target, dt);
              return;
            }

            // 处理延迟
            if (task.delay > 0) {
              task.delay -= dt;
              return;
            }
            task.accumulator += dt;
            if (task.accumulator >= task.interval) {
              task.callback.call(task.target, dt);
              task.accumulator = 0;

              // 处理重复次数
              if (task.repeat > 0) {
                task.repeatCount++;
                if (task.repeatCount >= task.repeat) {
                  _this4._tasks["delete"](taskId);
                }
              }
            }
          });
        }

        /**
         * 清理所有定时器任务
         */;
        _proto.clear = function clear() {
          this._tasks.clear();
          this._pausedTasks.clear();
        }

        /**
         * 销毁管理器
         */;
        _proto.dispose = function dispose() {
          this.clear();
          if (this._scheduler) {
            this._scheduler.unscheduleUpdate(this._compTarget);
          }
          this._scheduler = null;
          this._compTarget = null;
        }

        /**
         * 获取任务是否已暂停
         * @param taskId 任务ID
         * @returns boolean 是否已暂停
         */;
        _proto.isPaused = function isPaused(taskId) {
          var task = this._tasks.get(taskId);
          return task ? task.interval < 0 : false;
        }

        /**
         * 获取是否所有任务都已暂停
         * @returns boolean 是否所有任务都已暂停
         */;
        _proto.isAllPaused = function isAllPaused() {
          var allPaused = true;
          this._tasks.forEach(function (task) {
            if (task.interval >= 0) {
              allPaused = false;
            }
          });
          return allPaused;
        }

        /**
         * 获取所有定时器任务信息
         * @returns string 所有定时器任务的详细信息
         */;
        _proto.getAllScheduleInfo = function getAllScheduleInfo() {
          var info = "当前定时器任务列表:\n";
          this._tasks.forEach(function (task, taskId) {
            info += "[" + taskId + "] ";
            info += task.isUpdate ? "每帧更新" : "\u95F4\u9694" + task.interval + "\u79D2";
            info += task.interval < 0 ? "(已暂停)" : "(运行中)";
            info += " \u91CD\u590D\u6B21\u6570:" + task.repeat;
            if (task.delay > 0) {
              info += " \u5EF6\u8FDF:" + task.delay + "\u79D2";
            }
            info += "\n";
          });
          return info;
        }

        /**
         * 开始定时打印定时器信息
         */;
        _proto.startDebugPrint = function startDebugPrint() {
          var _this5 = this;
          // 如果已经在运行,先停止之前的
          if (this._debugTaskId) {
            this.unschedule(this._debugTaskId);
          }
          this._debugTaskId = this.schedule(function () {
            console.log(_this5.getAllScheduleInfo());
          }, this, 60 * 2);
        }

        /**
         * 停止打印定时器信息
         */;
        _proto.stopDebugPrint = function stopDebugPrint() {
          if (this._debugTaskId) {
            this.unschedule(this._debugTaskId);
            this._debugTaskId = null;
          }
        }

        /**
         * 创建一个带有有效性检查的回调函数
         * @param callback 原始回调函数
         * @param target 回调函数的this指向
         * @returns 包装后的回调函数
         */;
        _proto.createSafeCallback = function createSafeCallback(callback, target) {
          return function () {
            var _target$node;
            if (!(target != null && target.isValid)) {
              return;
            }
            if (target instanceof Component && !((_target$node = target.node) != null && _target$node.isValid)) {
              return;
            }
            for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
              args[_key] = arguments[_key];
            }
            callback.apply(target, args);
          };
        };
        return ScheduleMgr;
      }());

      // 使用示例
      /**
       *        // 示例1: 倒计时任务 - 每秒执行一次
              this._countDownTaskId = App.scheduleMgr.schedule(
                  this.onCountDown, // 回调函数
                  this, // 回调函数的this指向
                  1.0, // 间隔时间(秒)
                  0, // 延迟时间(秒)
                  this._totalTime // 重复次数
              );
                // 示例2: 每帧更新任务 - 用于平滑动画
              this._updateTaskId = App.scheduleMgr.scheduleUpdate(
                  this.onUpdate, // 回调函数
                  this // 回调函数的this指向
              );
                // 示例3: 延迟执行任务 - 3秒后执行一次
              App.scheduleMgr.scheduleOnce(
                  this.onDelayedTask, // 回调函数
                  this, // 回调函数的this指向
                  3.0 // 延迟时间(秒)
              );
       */
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ScrollList.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollListItem.ts', './ScrollListLayout.ts', './ItemSelScript.ts', './ListSelScript.ts', './ModuleDef.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Prefab, Node, Layout, UITransform, Vec2, Vec3, instantiate, ScrollView, ScrollListItem, ScrollListLayout, ItemSelScript, ListSelScript, ModuleDef, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Prefab = module.Prefab;
      Node = module.Node;
      Layout = module.Layout;
      UITransform = module.UITransform;
      Vec2 = module.Vec2;
      Vec3 = module.Vec3;
      instantiate = module.instantiate;
      ScrollView = module.ScrollView;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      ScrollListLayout = module.ScrollListLayout;
    }, function (module) {
      ItemSelScript = module.ItemSelScript;
    }, function (module) {
      ListSelScript = module.ListSelScript;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "fdc1bDBOrJDt6hSxTpxdzxk", "ScrollList", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var ScrollList = exports('ScrollList', (_dec = ccclass("ScrollList"), _dec2 = menu("Z框架基类/ScrollList"), _dec3 = property({
        type: Prefab,
        tooltip: "item子节点预制体"
      }), _dec4 = property({
        type: Node,
        tooltip: "item子节点预制体"
      }), _dec5 = property({
        tooltip: "是否启用快速滚动优化（主要用于背包等网格布局）"
      }), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_ScrollView) {
        _inheritsLoose(ScrollList, _ScrollView);
        function ScrollList() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollView.call.apply(_ScrollView, [this].concat(args)) || this;
          /**item子节点预制体*/
          _initializerDefineProperty(_this, "itemPrefab", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cellNode", _descriptor2, _assertThisInitialized(_this));
          /**是否启用快速滚动优化*/
          _initializerDefineProperty(_this, "fastScroll", _descriptor3, _assertThisInitialized(_this));
          /**单条记录高度*/
          _this._itemSizeH = void 0;
          /**单条记录宽度*/
          _this._itemSizeW = void 0;
          /**是否有在可视范围内+2 */
          _this._numIsAdd = false;
          /**需要多少个记录组件 在可视范围内+2条--除GRID布局*/
          _this._numItem = 0;
          /**横向显示记录组件数量--GRID布局用*/
          _this._numItemH = 1;
          //
          /**开始端下标*/
          _this._itemIndex = 0;
          /**结束端下标*/
          _this._dataIndex = 0;
          /**布局layout */
          _this._layout = void 0;
          _this.poolList = [];
          _this.runList = [];
          /**数据源*/
          _this._array = void 0;
          /**子节点刷新绑定事件，或者使用item继承的模式*/
          _this.onItemRender = void 0;
          /**列表元素点击回调*/
          _this.onItemClick = void 0;
          /**列表元素计算大小*/
          _this.onItemComputeSize = void 0;
          // 滚动优化相关
          _this._lastScrollTime = 0;
          _this._isScrolling = false;
          _this._scrollEndTimer = null;
          return _this;
        }
        var _proto = ScrollList.prototype;
        _proto.initLayout = function initLayout() {
          if (this._layout) return;
          if (!this._layout) {
            this._layout = this.content.getComponent(ScrollListLayout);
          }
          if (!this._layout) {
            this._layout = this.content.addComponent(ScrollListLayout);
            this._layout.type = Layout.Type.VERTICAL;
            this._layout.spacingY = 2;
            this.vertical = true;
            this.horizontal = false;
          }
          var _layout = this._layout;
          if (_layout) {
            this.horizontal = _layout.type === Layout.Type.HORIZONTAL;
            this.vertical = _layout.type !== Layout.Type.HORIZONTAL;
          } else {
            this.horizontal = false;
            this.vertical = true;
          }
          this.node.on("scrolling", this.scrollCheck, this);
          // this.node.on('scroll-ended', this.scrollEnded, this);
        };

        _proto.onLoad = function onLoad() {
          if (this.cellNode) {
            this.cellNode.active = false;
          }
        };
        _proto.start = function start() {
          _ScrollView.prototype.start.call(this);
        };
        _proto.onDestroy = function onDestroy() {
          if (this.node) {
            this.node.off("scrolling", this.scrollCheck, this);
            // this.node.off('scroll-ended', this.scrollEnded, this);
          }

          if (this.fastScroll && this._scrollEndTimer) {
            clearTimeout(this._scrollEndTimer);
            this._scrollEndTimer = null;
          }
          this._layout = null;
          this.runList = this.poolList = null;
        }

        /**获得数据后开始创建*/;
        _proto.createItem = function createItem() {
          var _showSizeH = this.node.getComponent(UITransform).height;
          var _showSizeW = this.node.getComponent(UITransform).width;
          //获得预制体的高度
          if (!this._itemSizeW || !this._itemSizeH) {
            var pNode = this.getItemPrefabNode(); //instantiate(this.itemPrefab);
            this._itemSizeW = pNode.getComponent(UITransform).contentSize.width;
            this._itemSizeH = pNode.getComponent(UITransform).contentSize.height;
            this.poolList.push(pNode);
          }

          //可视范围，对应可以创建多少个实体单例item
          switch (this._layout.type) {
            case Layout.Type.HORIZONTAL:
              this._numItem = Math.floor((_showSizeW + this._layout.spacingX) / (this._itemSizeW + this._layout.spacingX)) + 2;
              break;
            case Layout.Type.VERTICAL:
              this._numItem = Math.floor((_showSizeH + this._layout.spacingY) / (this._itemSizeH + this._layout.spacingY)) + 2;
              break;
            case Layout.Type.GRID:
              //网格布局特殊计算
              var showW = _showSizeW - this._layout.paddingLeft - this._layout.paddingRight;
              if (this.fastScroll) {
                this._numItemH = Math.floor((showW + this._layout.spacingX) / (this._itemSizeW + this._layout.spacingX));
                var visibleRows = Math.floor((_showSizeH + this._layout.spacingY) / (this._itemSizeH + this._layout.spacingY)) + 2;
                this._numItem = visibleRows * this._numItemH;
              } else {
                this._numItemH = Math.floor((showW + this._layout.spacingX) / (this._itemSizeW + this._layout.spacingX));
                this._numItem = (Math.floor((_showSizeH + this._layout.spacingY) / (this._itemSizeH + this._layout.spacingY)) + 10) * this._numItemH;
              }
              break;
          }
          this._numIsAdd = true;
          // log(_showSizeH, '初始化获得数量：', this._numItem, this._array.length);
          if (this._array.length < this._numItem) {
            this._numItem = this._array.length;
            this._numIsAdd = false;
          }
          for (var _index = this.runList.length - 1; _index >= this._numItem; _index--) {
            var _node = this.runList.pop();
            _node.removeFromParent();
            this.poolList.push(_node);
          }
          for (var _index2 = 0; _index2 < this._numItem; _index2++) {
            var _pNode = this.runList[_index2];
            if (!_pNode) {
              _pNode = this.poolList.pop();
              if (!_pNode) {
                _pNode = this.getItemPrefabNode(); //instantiate(this.itemPrefab);
              }

              _pNode.parent = this.content;
              if (this.onItemClick) {
                var comp = _pNode.getComponent(ScrollListItem);
                comp.onItemClick = this.onItemClick;
              }
              this.runList.push(_pNode);
            }
            this.itemRender(_pNode, _index2);
          }
          //设置容器大小
          var contentSize = 0;
          switch (this._layout.type) {
            case Layout.Type.HORIZONTAL:
              contentSize = this._itemSizeW * this._array.length;
              if (this.onItemComputeSize) {
                contentSize = 0;
                for (var i = 0; i < this._array.length; i++) {
                  contentSize += this.onItemComputeSize(this._layout.type, this._array[i]);
                }
              }
              contentSize += this._layout.paddingLeft + this._layout.paddingRight;
              contentSize += this._layout.spacingX * (this._array.length - 1);
              var position = this.content.getPosition();
              position.x = -_showSizeW / 2;
              this.content.setPosition(position);
              this.content.getComponent(UITransform).anchorPoint = new Vec2(0, 1);
              this.content.getComponent(UITransform).width = contentSize;
              break;
            case Layout.Type.VERTICAL:
              contentSize = this._itemSizeH * this._array.length;
              if (this.onItemComputeSize) {
                contentSize = 0;
                for (var _i = 0; _i < this._array.length; _i++) {
                  contentSize += this.onItemComputeSize(this._layout.type, this._array[_i]);
                }
              }
              contentSize += this._layout.paddingTop + this._layout.paddingBottom;
              contentSize += this._layout.spacingY * (this._array.length - 1);
              this.content.getComponent(UITransform).height = contentSize;
              break;
            case Layout.Type.GRID:
              //网格布局特殊计算
              var contentW = this._numItemH * this._itemSizeW + (this._numItemH - 1) * this._layout.spacingX + this._layout.paddingLeft + this._layout.paddingRight;
              this.content.getComponent(UITransform).width = contentW;
              var numH = Math.ceil(this._array.length / this._numItemH);
              contentSize = numH * this._itemSizeH + (numH - 1) * this._layout.spacingY + this._layout.paddingTop + this._layout.paddingBottom;
              this.content.getComponent(UITransform).height = contentSize;
              break;
          }
          this._itemIndex = this._dataIndex = this.runList.length - 1;
          // log("初始化结束：", this._dataIndex, this._itemArr.length);
        };

        _proto.scrollCheck = function scrollCheck() {
          if (this.fastScroll) {
            this.optimizedScrollCheck();
            return;
          }
          this.originalScrollCheck();
        }

        /**
         * 检测是否处于回弹状态
         */;
        _proto.isInBounceback = function isInBounceback() {
          var scrollOffset = this.getScrollOffset();
          var contentSize = this.content.getComponent(UITransform);
          var viewSize = this.node.getComponent(UITransform);
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            // 水平滚动的回弹检测
            return scrollOffset.x > 0 || scrollOffset.x < -(contentSize.width - viewSize.width);
          } else {
            // 垂直滚动的回弹检测
            return scrollOffset.y < 0 || scrollOffset.y > contentSize.height - viewSize.height;
          }
        }

        /**
         * 优化的滚动检查（仅在fastScroll为true时使用）
         */;
        _proto.optimizedScrollCheck = function optimizedScrollCheck() {
          var _this2 = this;
          var currentTime = Date.now();
          var isBouncingBack = this.isInBounceback();
          var throttleTime = isBouncingBack ? 8 : 12; // 回弹8ms，正常滚动12ms

          if (currentTime - this._lastScrollTime < throttleTime) {
            return;
          }
          this._lastScrollTime = currentTime;
          this._isScrolling = true;
          if (this._scrollEndTimer) {
            clearTimeout(this._scrollEndTimer);
          }
          // 如果在回弹状态，缩短等待时间
          var endDetectionTime = isBouncingBack ? 50 : 100;

          // 设置滚动结束检测
          this._scrollEndTimer = setTimeout(function () {
            _this2._isScrolling = false;
            _this2.ensureVisibleItemsRendered();
          }, endDetectionTime);
          var nowPos = this.getScrollOffset().y;
          var topPos = 0;
          var itemSize = this._itemSizeH;
          var padding = this._layout.paddingTop;
          var spacing = this._layout.spacingY;
          var size = this._itemSizeH;
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            itemSize = this._itemSizeW;
            padding = this._layout.paddingLeft;
            spacing = this._layout.spacingX;
            nowPos = this.getScrollOffset().x;
            size = -this._itemSizeW;
          }
          var currentStartIndex = this.calculateCurrentStartIndex(nowPos);
          var currentEndIndex = Math.min(currentStartIndex + this._numItem - 1, this._array.length - 1);
          var expectedStartIndex = this._dataIndex + 1 - this._numItem;
          var indexDiff = Math.abs(currentStartIndex - expectedStartIndex);
          if (isBouncingBack || indexDiff > 0) {
            this.batchUpdateItems(currentStartIndex, currentEndIndex);
            return;
          }
          this.originalScrollLogic(nowPos, topPos, itemSize, padding, spacing, size);
          this.validateVisibleArea();
        }

        /**
         * 原始的滚动检查逻辑
         */;
        _proto.originalScrollCheck = function originalScrollCheck() {
          var nowPos = this.getScrollOffset().y;
          var topPos = 0;
          var itemSize = this._itemSizeH;
          var padding = this._layout.paddingTop;
          var spacing = this._layout.spacingY;
          var size = this._itemSizeH;
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            itemSize = this._itemSizeW;
            padding = this._layout.paddingLeft;
            spacing = this._layout.spacingX;
            nowPos = this.getScrollOffset().x;
            size = -this._itemSizeW;
          }
          this.originalScrollLogic(nowPos, topPos, itemSize, padding, spacing, size);
        }

        /**
         * 原始的滚动逻辑
         */;
        _proto.originalScrollLogic = function originalScrollLogic(nowPos, topPos, itemSize, padding, spacing, size) {
          topPos = Math.ceil((this._dataIndex + 1 - this._numItem) / this._numItemH) * itemSize; //当前屏幕中靠近最开始的坐标
          if (this._layout.type !== Layout.Type.GRID && this.onItemComputeSize) {
            topPos = this.getItemListSize(this._layout.type, 0, this._dataIndex + 1 - this._numItem);
          }
          topPos += padding;
          topPos += spacing * Math.ceil((this._dataIndex + 1 - this._numItem) / this._numItemH);
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            topPos = -topPos;
          }

          //判断向结束端滚动，滚动点和初始点对比
          if ((this._layout.type === Layout.Type.VERTICAL || this._layout.type === Layout.Type.GRID) && nowPos > size + topPos || this._layout.type === Layout.Type.HORIZONTAL && nowPos < size + topPos) {
            var newIndex = this._dataIndex + 1;
            // Log.log(this._dataIndex, "-判断向结束端滚动 1 --将头部item转移到最后---", nowPos, topPos);
            if (newIndex >= this._array.length) {
              return; //如果滚动到底部最后一条数据，不再进行写入
            }

            this._dataIndex = newIndex;
            var topItemIndex = this._itemIndex + 1;
            if (topItemIndex >= this._numItem) {
              topItemIndex = 0;
            }
            var item = this.runList[topItemIndex];
            if (item) {
              this.itemRender(item, newIndex);
              // Log.error(topItemIndex, "转移到最后", item.node.position);
            }

            this._itemIndex = topItemIndex;

            // 在快速滚动模式下，检查是否需要额外的项目更新
            if (this.fastScroll) {
              this.checkForAdditionalUpdates();
            }
          }

          //判断向开始端滚动
          else if ((this._layout.type === Layout.Type.VERTICAL || this._layout.type === Layout.Type.GRID) && nowPos < topPos || this._layout.type === Layout.Type.HORIZONTAL && nowPos > topPos) {
            var _newIndex = this._dataIndex + 1 - this._numItem - 1;
            // Log.log(this._dataIndex, "-判断向上滚动 2 -将最后item转移到头部----", newIndex);
            if (_newIndex < 0) {
              // Log.warn("如果滚动到第一条数据，不再进行写入", newIndex)
              return; //如果滚动到第一条数据，不再进行写入
            }

            this._dataIndex--;
            // Log.error(this._itemIndex, "将最后item转移到头部", this._dataIndex, newIndex, newIndex * -this._itemSize);
            var _item = this.runList[this._itemIndex];
            if (_item) {
              this.itemRender(_item, _newIndex);
              // Log.error(this._itemIndex, "转移头部", item.node.position);
            }

            this._itemIndex--;
            if (this._itemIndex < 0) {
              this._itemIndex = this._numItem - 1;
            }

            // 在快速滚动模式下，检查是否需要额外的项目更新
            if (this.fastScroll) {
              this.checkForAdditionalUpdates();
            }
          }
        }

        /**
         * 检查是否需要额外的项目更新（快速滚动时使用）
         */;
        _proto.checkForAdditionalUpdates = function checkForAdditionalUpdates() {
          // 获取当前滚动位置应该显示的起始索引
          var nowPos = this.getScrollOffset().y;
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            nowPos = this.getScrollOffset().x;
          }
          var currentStartIndex = this.calculateCurrentStartIndex(nowPos);
          var expectedStartIndex = this._dataIndex + 1 - this._numItem;

          // 如果计算出的当前位置与期望位置差距较大，进行批量更新
          if (Math.abs(currentStartIndex - expectedStartIndex) > 2) {
            var currentEndIndex = Math.min(currentStartIndex + this._numItem - 1, this._array.length - 1);
            this.batchUpdateItems(currentStartIndex, currentEndIndex);
          }
        }

        /**
         * 计算当前滚动位置应该显示的起始索引
         */;
        _proto.calculateCurrentStartIndex = function calculateCurrentStartIndex(scrollPos) {
          var index = 0;
          var itemSize = this._itemSizeH;
          var padding = this._layout.paddingTop;
          var spacing = this._layout.spacingY;
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            itemSize = this._itemSizeW;
            padding = this._layout.paddingLeft;
            spacing = this._layout.spacingX;
            scrollPos = -scrollPos; // 水平滚动方向相反
          }

          switch (this._layout.type) {
            case Layout.Type.VERTICAL:
            case Layout.Type.HORIZONTAL:
              if (this.onItemComputeSize) {
                // 自定义大小计算
                var totalSize = padding;
                for (var i = 0; i < this._array.length; i++) {
                  var currentItemSize = this.onItemComputeSize(this._layout.type, this._array[i]);
                  if (totalSize + currentItemSize / 2 > scrollPos) {
                    index = i;
                    break;
                  }
                  totalSize += currentItemSize + spacing;
                }
              } else {
                // 固定大小计算
                var _adjustedPos = Math.max(0, scrollPos - padding);
                index = Math.floor(_adjustedPos / (itemSize + spacing));
              }
              break;
            case Layout.Type.GRID:
              var adjustedPos = Math.max(0, scrollPos - padding);
              var rowIndex = Math.floor(adjustedPos / (itemSize + spacing));
              index = rowIndex * this._numItemH;
              break;
          }
          return Math.max(0, Math.min(index, this._array.length - 1));
        }

        /**
         * 批量更新items（用于快速滚动）
         */;
        _proto.batchUpdateItems = function batchUpdateItems(startIndex, endIndex) {
          if (startIndex < 0 || startIndex >= this._array.length) return;

          // 更新数据索引
          this._dataIndex = endIndex;
          this._itemIndex = this._numItem - 1;

          // 批量更新所有可见的items，确保每个item都显示正确的数据
          for (var i = 0; i < this.runList.length && i < this._numItem; i++) {
            var dataIndex = startIndex + i;
            if (dataIndex <= endIndex && dataIndex < this._array.length) {
              // 强制重新渲染，确保数据正确
              this.itemRender(this.runList[i], dataIndex);
            }
          }
        }

        /**
         * 确保所有可见项都正确渲染
         */;
        _proto.ensureVisibleItemsRendered = function ensureVisibleItemsRendered() {
          if (!this.fastScroll || !this._array || this._array.length === 0) return;
          var nowPos = this.getScrollOffset().y;
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            nowPos = this.getScrollOffset().x;
          }
          var currentStartIndex = this.calculateCurrentStartIndex(nowPos);
          var currentEndIndex = Math.min(currentStartIndex + this._numItem - 1, this._array.length - 1);

          // 检查是否刚结束回弹状态
          var wasBouncingBack = this.isInBounceback();

          // 检查当前显示的items是否与应该显示的匹配
          var needUpdate = false;
          var expectedStartIndex = this._dataIndex + 1 - this._numItem;

          // 如果是回弹状态或者索引不匹配，都需要更新
          if (wasBouncingBack || Math.abs(currentStartIndex - expectedStartIndex) > 0) {
            needUpdate = true;
          }
          if (!needUpdate) {
            for (var i = 0; i < this.runList.length && i < this._numItem; i++) {
              var expectedDataIndex = currentStartIndex + i;
              if (expectedDataIndex >= 0 && expectedDataIndex < this._array.length) {
                var item = this.runList[i];
                var itemComponent = item == null ? void 0 : item.getComponent(ScrollListItem);

                // 如果item组件不存在或显示的数据索引不匹配，需要更新
                if (!itemComponent || itemComponent.index !== expectedDataIndex) {
                  needUpdate = true;
                  break;
                }
              }
            }
          }
          if (needUpdate) {
            // 强制更新所有可见item
            this.batchUpdateItems(currentStartIndex, currentEndIndex);
          }
        }

        /**刷新单项*/;
        _proto.itemRender = function itemRender(node, newIndex) {
          var item = node.getComponent(ScrollListItem);
          if (item) {
            item.onItemRender(this._array[newIndex]);
            item.index = newIndex;
          }
          //设置有全局得刷新事件
          if (this.onItemRender) {
            this.onItemRender(node, newIndex, this._array[newIndex]);
          }
          var selSp = node.getComponent(ItemSelScript);
          if (selSp) {
            //有设置选中脚本的
            var ListSelSp = this.node.getComponent(ListSelScript);
            if (ListSelSp) {
              var isSel = ListSelSp.selIdxArr.indexOf(newIndex) !== -1;
              selSp.setSel(isSel);
            }
          }
          this.setPos(node, newIndex);
        }

        /**设置坐标*/;
        _proto.setPos = function setPos(node, index) {
          var pos = this.countPosByIndex(index);
          node.setPosition(new Vec3(pos.x, -pos.y));
        }

        /**根据下标计算坐标。 0 ~ length-1*/;
        _proto.countPosByIndex = function countPosByIndex(index) {
          var x = 0;
          var y = 0;
          switch (this._layout.type) {
            case Layout.Type.HORIZONTAL:
              if (this.onItemComputeSize) x += this.getItemListSize(this._layout.type, 0, index) + this.getItemListSize(this._layout.type, index, index + 1) / 2;else x += (1 / 2 + index) * this._itemSizeW;
              x += this._layout.paddingLeft;
              x += this._layout.spacingX * index;
              y = 1 / 2 * this._itemSizeH;
              break;
            case Layout.Type.VERTICAL:
              if (this.onItemComputeSize) y = this.getItemListSize(this._layout.type, 0, index) + this.getItemListSize(this._layout.type, index, index + 1) / 2;else y = (1 / 2 + index) * this._itemSizeH;
              y += this._layout.paddingTop;
              y += this._layout.spacingY * index;
              break;
            case Layout.Type.GRID:
              var x_idx = index % this._numItemH;
              var contentW = this._numItemH * this._itemSizeW + (this._numItemH - 1) * this._layout.spacingX + this._layout.paddingLeft + this._layout.paddingRight;
              x = -contentW / 2;
              x += (1 / 2 + x_idx) * this._itemSizeW;
              x += this._layout.paddingLeft;
              x += this._layout.spacingX * x_idx;
              var y_idx = Math.floor(index / this._numItemH);
              y = (1 / 2 + y_idx) * this._itemSizeH;
              y += this._layout.paddingTop;
              y += this._layout.spacingY * y_idx;
              break;
          }
          return {
            x: x,
            y: y
          };
        }

        /**滚动到指定下标*/;
        _proto.scrollToIndex = function scrollToIndex(index) {
          this.stopAutoScroll();
          //太靠近结束点，需要回退屏幕显示数量
          index -= index % this._numItemH;
          var canShowNum = this._numIsAdd ? this._numItem - 2 * this._numItemH : this._numItem;
          if (index > this._array.length - canShowNum) {
            var showMax = this._array.length;
            if (showMax % this._numItemH !== 0) {
              showMax = this._array.length + this._numItemH - this._array.length % this._numItemH;
            }
            index = showMax - canShowNum;
          }
          if (index < 0) {
            index = 0;
          }

          /**设置滚动坐标*/
          var pos = this.countPosByIndex(index);
          var posX = pos.x - 1 / 2 * this._itemSizeW;
          var posY = pos.y - 1 / 2 * this._itemSizeH;
          var ve = new Vec2(0, posY);
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            ve = new Vec2(posX, 0);
          }
          this.scrollToOffset(ve); //滚动

          if (index + this.runList.length > this._array.length) {
            //实际显示---如果还有半显示的
            index -= 2 * this._numItemH;
          }
          if (index <= 0) index = 0;
          this._dataIndex = this.runList.length - 1 + index;
          this._itemIndex = this.runList.length - 1;
          for (var x = 0; x < this.runList.length; x++) {
            var topItemIndex = index + x;
            if (topItemIndex >= this._array.length) {
              break;
            }
            this.itemRender(this.runList[x], topItemIndex);
          }
        };
        _proto.getItem = function getItem(idx) {
          var showIdx = idx % this.runList.length;
          var item = this.runList[showIdx];
          return item;
        };
        _proto.updateItem = function updateItem(index, data) {
          if (data === void 0) {
            data = undefined;
          }
          if (!data) {
            data = this._array[index];
          }
          this._array[index] = data;
          var item = this.getItem(index);
          if (item) {
            var itemSp = item.getComponent(ScrollListItem);
            if (itemSp) {
              itemSp.onItemRender(data);
              itemSp.index = index;
            }
            if (this.onItemRender) {
              this.onItemRender(item, index, data);
            }
          }
        }

        /**
         * 更新所有的items
         */;
        _proto.updateAllItems = function updateAllItems() {
          for (var i = 0; i < this._array.length; i++) {
            this.updateItem(i, this._array[i]);
          }
        }

        /**选中list处理 */;
        _proto.selItem = function selItem(idx, sel) {
          var showIdx = idx % this.runList.length;
          var item = this.runList[showIdx];
          if (item) {
            var selSp = item.getComponent(ItemSelScript);
            if (selSp) {
              selSp.setSel(sel);
            }
          }
        };
        _proto.getItemListSize = function getItemListSize(type, startIndex, endIndex) {
          var size = 0;
          if (!this.onItemComputeSize) return size;
          for (var i = startIndex; i < endIndex && i >= 0 && i < this.array.length; i++) {
            size += this.onItemComputeSize(type, this.array[i]);
          }
          return size;
        };
        _proto.getAllItem = function getAllItem() {
          return this.runList;
        };
        _proto.getItemPrefabNode = function getItemPrefabNode() {
          if (this.itemPrefab) {
            if (this.itemPrefab.name === "itemProp") {
              var _node2 = App.nodePoolMgr.getNodeByPath(ModuleDef.BASE_COMMON, "prefab/item/itemProp");
              if (_node2) {
                _node2.setScale(this.itemPrefab.data.getScale());
                return _node2;
              }
            }
            var pNode = instantiate(this.itemPrefab);
            return pNode;
          } else if (!this.itemPrefab && this.cellNode) {
            var _node3 = instantiate(this.cellNode);
            _node3.active = true;
            return _node3;
          }
        }

        /**
         * 启用快速滚动优化
         */;
        _proto.setFastScroll = function setFastScroll(enable) {
          this.fastScroll = enable;
          if (!this.fastScroll) {
            // 清理相关定时器
            if (this._scrollEndTimer) {
              clearTimeout(this._scrollEndTimer);
              this._scrollEndTimer = null;
            }
            this._isScrolling = false;
          }
        }

        /**
         * 滚动结束事件处理
         */;
        _proto.scrollEnded = function scrollEnded() {
          // if (this.fastScroll) {
          //     this._isScrolling = false;
          //     this.ensureVisibleItemsRendered();
          // }
        }

        /**
         * 验证可见区域的完整性
         */;
        _proto.validateVisibleArea = function validateVisibleArea() {
          if (!this.fastScroll || !this._array || this._array.length === 0) return;
          var nowPos = this.getScrollOffset().y;
          if (this._layout.type === Layout.Type.HORIZONTAL) {
            nowPos = this.getScrollOffset().x;
          }
          var currentStartIndex = this.calculateCurrentStartIndex(nowPos);
          for (var i = 0; i < this.runList.length && i < this._numItem; i++) {
            var expectedDataIndex = currentStartIndex + i;
            if (expectedDataIndex >= 0 && expectedDataIndex < this._array.length) {
              var item = this.runList[i];
              var itemComponent = item == null ? void 0 : item.getComponent(ScrollListItem);
              if (!itemComponent || itemComponent.index !== expectedDataIndex) {
                this.itemRender(item, expectedDataIndex);
              }
            }
          }
        };
        _createClass(ScrollList, [{
          key: "array",
          get: function get() {
            return this._array;
          },
          set: function set(arr) {
            this.initLayout();
            this._array = arr;
            this.createItem();
          }
        }]);
        return ScrollList;
      }(ScrollView), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "itemPrefab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "cellNode", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "fastScroll", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return false;
        }
      })), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ScrollListItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Node, Button, find, Sprite, Label, RichText, ScrollView, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Button = module.Button;
      find = module.find;
      Sprite = module.Sprite;
      Label = module.Label;
      RichText = module.RichText;
      ScrollView = module.ScrollView;
      Component = module.Component;
    }],
    execute: function () {
      cclegacy._RF.push({}, "968dahgvORL56+04AVKkSBQ", "ScrollListItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var ScrollListItem = exports('ScrollListItem', /*#__PURE__*/function (_Component) {
        _inheritsLoose(ScrollListItem, _Component);
        function ScrollListItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.index = void 0;
          _this.isSel = void 0;
          _this._data = void 0;
          /**列表元素点击回调*/
          _this.onItemClick = void 0;
          return _this;
        }
        var _proto = ScrollListItem.prototype;
        /**滚动列表数据变更*/
        _proto.onItemRender = function onItemRender(data) {}
        /** item选中回调 */;
        _proto.setSel = function setSel(b) {
          console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx setSel");
        };
        /**
         * item 有按钮再初始化，没有则忽略
         */
        _proto.initItemButton_ifHas = function initItemButton_ifHas(_custom, layoutCls) {
          this.bindControl(_custom, layoutCls);
        }

        //item 按钮绑定， uibase搬运.
        ;

        _proto.bindControl = function bindControl(_custom, layoutCls) {
          var _this2 = this;
          //按钮绑定
          var _layout = this.node.getComponent(layoutCls);
          var _loop = function _loop(name) {
            var proto = _custom.binding[name];
            _this2.onButtonEvent(_layout[name], function () {
              _this2[proto.method].call(_this2);
              _this2.onItemClick == null || _this2.onItemClick(_this2.node, name);
            });
          };
          for (var name in _custom.binding || {}) {
            _loop(name);
          }
        }

        /**
         * @en add button event handler
         * @zh 添加按钮事件
         * @param relativeNodePath to indicate a button node, can pass `string`|`Node`|`Button` here.
         * @param cb will be called when event emits. method format:(btn:Button,args:any)=>void
         * @param target the `this` argument of `cb`
         *  */;
        _proto.onButtonEvent = function onButtonEvent(relativeNodePath, cb, target, args) {
          var buttonNode = null;
          if (relativeNodePath instanceof Node) {
            buttonNode = relativeNodePath;
          } else if (relativeNodePath instanceof Button) {
            buttonNode = relativeNodePath.node;
          } else {
            buttonNode = find(relativeNodePath, this.node);
          }
          if (!buttonNode) {
            return null;
          }
          var btn = buttonNode.getComponent(Button);
          var clickEvents = btn.clickEvents;
          var handler = new ScrollListItem.EventHandler();
          handler.target = this.node;
          handler.component = "EventAgent";
          handler.handler = "onButtonClicked";
          handler.customEventData = "" + ScrollListItem._idBase++;
          //附加额外信息 供事件转发使用
          handler["$cb$"] = cb;
          handler["$target$"] = target;
          handler["$args$"] = args;
          clickEvents.push(handler);
          btn.clickEvents = clickEvents;
        }

        /**
         * 获得目标节点
         * @param name 节点唯一名称
         * @returns 返回目标节点
         */;
        _proto.getNode = function getNode(name) {
          if (!this.node) {
            return;
          }
          if (!this.node.getChildByName) {
            return;
          }
          var _node = this.node.getChildByName(name);
          if (_node) {
            return _node;
          } else {
            var _findFlag = false;
            var findNodeTree = function findNodeTree(node) {
              for (var i in node.children) {
                if (_findFlag) {
                  return;
                }
                var _findNode = node.children[i];
                if (!_findNode) return;
                if (_findNode.name === name) {
                  _node = _findNode;
                  _findFlag = true;
                  return;
                }
                if (_findNode.children.length) {
                  findNodeTree(_findNode);
                }
              }
            };
            findNodeTree(this.node);
            if (_findFlag) {
              return _node;
            }
          }
        }

        /**
         * 获得目标节点的控件(无代码提示)
         * @param name 节点唯一名称
         * @param com 控件名称
         * @returns 返回目标节点的控件
         */;
        _proto.getCom = function getCom(name, com) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(com);
          }
        }

        /**
         * 获得目标节点的Sprite控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的Sprite控件
         */;
        _proto.getSprite = function getSprite(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(Sprite);
          }
        }

        /**
         * 获得目标节点的Button控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的Button控件
         */;
        _proto.getButton = function getButton(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(Button);
          }
        }

        /**
         * 获得目标节点的Label控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的Label控件
         */;
        _proto.getLabel = function getLabel(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(Label);
          }
        }

        /**
         * 获得目标节点的RichText控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的RichText控件
         */;
        _proto.getRichText = function getRichText(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(RichText);
          }
        }

        /**
         * 获得目标节点的ScrollView控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的ScrollView控件
         */;
        _proto.getScrollView = function getScrollView(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(ScrollView);
          }
        };
        return ScrollListItem;
      }(Component));
      ScrollListItem._idBase = 100000;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ScrollListLayout.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Layout;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Layout = module.Layout;
    }],
    execute: function () {
      var _dec, _dec2, _class;
      cclegacy._RF.push({}, "ecd665kPtpLnZPcYnKB7PNz", "ScrollListLayout", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;
      var ScrollListLayout = exports('ScrollListLayout', (_dec = ccclass("ScrollListLayout"), _dec2 = menu("性能优化/ScrollListLayout"), _dec(_class = _dec2(_class = /*#__PURE__*/function (_Layout) {
        _inheritsLoose(ScrollListLayout, _Layout);
        function ScrollListLayout() {
          return _Layout.apply(this, arguments) || this;
        }
        var _proto = ScrollListLayout.prototype;
        _proto.start = function start() {};
        _proto.updateLayout = function updateLayout(force) {
          _Layout.prototype.updateLayout.call(this);
        };
        return ScrollListLayout;
      }(Layout)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ShangDian.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './App.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './EventType.ts', './UIUtil.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, BuildingBase, App, PlaceConfigMgr, PlaceGameMgr, EventType, UIUtil;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "65000uFUQtB85se3BxyV7Yf", "ShangDian", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var ShangDian = exports('ShangDian', (_dec = ccclass("ShangDian"), _dec2 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(ShangDian, _BuildingBase);
        function ShangDian() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lvUpImg", _descriptor, _assertThisInitialized(_this));
          _this._dataModel = void 0;
          return _this;
        }
        var _proto = ShangDian.prototype;
        _proto.initDataModel = function initDataModel(data) {
          // 初始化数据模型
          // TODO: 根据需要实现具体逻辑
          // 初始化后更新可升级图标
          this.updateLevUpImg();
        };
        _proto.updateDataModel = function updateDataModel(data) {
          // 更新数据模型
          // TODO: 根据需要实现具体逻辑
          // 更新后刷新可升级图标
          this.updateLevUpImg();
        }

        /**
         * 组件激活时调用
         */;
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          UIUtil.showTip("功能暂未开启");
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.buildType);
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.buildType, targetLevel);
          this.lvUpImg.active = flag;
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("播放升级动效");
        }
        //======================子类虚函数=====================================
        ;

        return ShangDian;
      }(BuildingBase), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SheBei.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './PlaceConfigMgr.ts', './App.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Sprite, Node, Component, PlaceConfigMgr, App, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Sprite = module.Sprite;
      Node = module.Node;
      Component = module.Component;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "47538R5ao1Il46W25pXBNNj", "SheBei", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var SheBei = exports('SheBei', (_dec = ccclass("SheBei"), _dec2 = property({
        type: Label,
        displayName: "设备名称",
        tooltip: "设备名称"
      }), _dec3 = property({
        type: Sprite,
        displayName: "设备图标",
        tooltip: "设备图标"
      }), _dec4 = property({
        type: Label,
        displayName: "设备等级",
        tooltip: "设备等级"
      }), _dec5 = property({
        type: Node,
        displayName: "选中图片",
        tooltip: "选中后展示的图片"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(SheBei, _Component);
        function SheBei() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "sbName", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "icon", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "level", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "selectNode", _descriptor4, _assertThisInitialized(_this));
          _this._sbId = 0;
          _this._callFunc = null;
          return _this;
        }
        var _proto = SheBei.prototype;
        _proto.getSBId = function getSBId() {
          return this._sbId;
        };
        _proto.onEnable = function onEnable() {
          this.node.on(Node.EventType.TOUCH_END, this._onClick, this);
        };
        _proto.onDisable = function onDisable() {
          this.node.off(Node.EventType.TOUCH_END, this._onClick, this);
        };
        _proto._onClick = function _onClick() {
          if (this._callFunc) {
            this._callFunc(this.getSBId());
          }
        };
        _proto.show = function show(sbId, level, callFunc) {
          var cfg = PlaceConfigMgr.inst.getSheBeiConfig(sbId);
          if (!cfg) {
            App.log.logError("设备配置不存在，请检查");
            return;
          }
          this._sbId = sbId;
          this._callFunc = callFunc;
          if (this.sbName) {
            this.sbName.string = cfg.name;
          }
          if (this.level) {
            if (level > 0) {
              this.level.string = level.toString();
            } else {
              this.level.string = "";
            }
          }
          UtilGame.loadSheBeiIcon(this.icon, sbId);
        };
        _proto.setSelect = function setSelect(flag) {
          if (this.selectNode) {
            this.selectNode.active = flag;
          }
        };
        _proto.isSelect = function isSelect() {
          if (this.selectNode) {
            return this.selectNode.active;
          }
          return false;
        };
        _proto.getLevel = function getLevel() {
          if (this.level) {
            if (this.level.string === "") {
              return 0;
            } else {
              return parseInt(this.level.string);
            }
          }
          return 0;
        };
        _proto.setLevel = function setLevel(level) {
          if (this.level) {
            if (level > 0) {
              this.level.string = level.toString();
            } else {
              this.level.string = "";
            }
          }
        };
        _proto.getSbName = function getSbName() {
          if (this.sbName) {
            return this.sbName.string;
          }
          return "";
        };
        return SheBei;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "sbName", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "icon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "level", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "selectNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Singleton.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './SingletonRegistry.ts'], function (exports) {
  var _createClass, cclegacy, singletonRegistry;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      singletonRegistry = module.singletonRegistry;
    }],
    execute: function () {
      exports('Singleton', Singleton);
      cclegacy._RF.push({}, "1dd91XnQs5Ldr7/zZ6caYHy", "Singleton", undefined);
      function Singleton() {
        var SingletonE = /*#__PURE__*/function () {
          function SingletonE() {
            this._singletonId = null;
          }
          var _proto = SingletonE.prototype;
          /** 销毁单例 */
          _proto.destroySingletonIns = function destroySingletonIns() {
            if (SingletonE._inst) {
              singletonRegistry["delete"](this._singletonId);
              SingletonE._inst = null;
            }
          };
          _createClass(SingletonE, null, [{
            key: "inst",
            get: function get() {
              if (SingletonE._inst === null) {
                SingletonE._inst = new this();
                var list = Array.from(singletonRegistry.keys());
                var id = list.length ? list[list.length - 1] + 1 : 0;
                SingletonE._inst._singletonId = id;
                singletonRegistry.set(id, SingletonE._inst);
              }
              return SingletonE._inst;
            }
          }]);
          return SingletonE;
        }();
        SingletonE._inst = null;
        return SingletonE;
      }
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SingletonRegistry.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "28f90GZlKJBKoPLarqSTkfj", "SingletonRegistry", undefined);
      /*
       * @Author: xiehande www.xiehande@qq.com
       * @Date: 2025-12-11 19:50:00
       * @FilePath: \qianduan\assets\script\base_common\base\SingletonRegistry.ts
       * @Description: 单例注册表，用于避免循环依赖
       */

      /**
       * 单例实例注册表
       */
      var singletonRegistry = exports('singletonRegistry', new Map());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SkillCtrl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './SkillVO.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, DBRecord, SkillVO;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      SkillVO = module.SkillVO;
    }],
    execute: function () {
      cclegacy._RF.push({}, "2221ee84WlH+qRr8hi0OJrt", "SkillCtrl", undefined);

      /**
       * 技能控制器
       */
      var SkillCtrl = exports('SkillCtrl', /*#__PURE__*/function () {
        function SkillCtrl() {
          /** 实体列表 */
          this._entityMap = new Map();
          /** 普攻实体列表 */
          this._entityAtkMap = new Map();
        }
        var _proto = SkillCtrl.prototype;
        _proto.init = function init() {};
        _proto.dispose = function dispose() {
          this.onExit();
        };
        _proto.initPool = function initPool() {};
        _proto.clearPool = function clearPool() {};
        _proto.update = function update(dt) {
          this._entityMap.forEach(function (v) {
            for (var _iterator = _createForOfIteratorHelperLoose(v), _step; !(_step = _iterator()).done;) {
              var it = _step.value;
              it == null || it.onUpdate(dt);
            }
          });
          this._entityAtkMap.forEach(function (v) {
            v == null || v.onUpdate(dt);
          });
        }

        /**
         * 进入战场
         */;
        _proto.onEnter = function onEnter() {}

        /**
         * 退出战场
         */;
        _proto.onExit = function onExit() {
          this._destroyAllSkill();
        }

        /**
         * 销毁所有技能
         */;
        _proto._destroyAllSkill = function _destroyAllSkill() {
          this._entityMap.forEach(function (v) {
            for (var _iterator2 = _createForOfIteratorHelperLoose(v), _step2; !(_step2 = _iterator2()).done;) {
              var _it;
              var it = _step2.value;
              (_it = it) == null || _it.destroy();
              it = null;
            }
            v.length = 0;
          });
          this._entityMap.clear();
          this._entityAtkMap.forEach(function (v) {
            var _v;
            (_v = v) == null || _v.destroy();
            v = null;
          });
          this._entityAtkMap.clear();
        }

        /**
         * 获取主角的技能列表
         * @returns
         */;
        _proto.getPlayerSkills = function getPlayerSkills() {
          // const uid = App.battleMgr.roleCtrl.player.uid;
          return []; //this.getSkills(uid);
        }

        /**
         * 获取单个技能
         * @param uid 角色UID
         * @param skill_id 技能id
         * @returns
         */;
        _proto.getSkill = function getSkill(uid, skill_id) {
          var list = this._entityMap.get(uid);
          if (Array.isArray(list)) {
            for (var i = 0; i < list.length; i++) {
              if (list[i].skillID === skill_id) {
                return list[i];
              }
            }
          }
          return null;
        }

        /**
         * 获取技能列表
         * @param uid 角色UID
         * @returns
         */;
        _proto.getSkills = function getSkills(uid) {
          if (this._entityMap.has(uid)) {
            return this._entityMap.get(uid);
          }
          return [];
        }

        /**
         * 移除对应uid的skills
         * @param uid
         */;
        _proto.removeSkills = function removeSkills(uid) {
          var list = this._entityMap.get(uid);
          if (list) {
            for (var i = 0; i < list.length; i++) {
              list[i].destroy();
              list[i] = null;
            }
            list.length = 0;
            this._entityMap["delete"](uid);
          }
        }

        /**
         * 获取单个技能
         * @param uid 角色UID
         * @param skill_id 技能id
         * @returns
         */;
        _proto.getAtkSkill = function getAtkSkill(uid) {
          return this._entityAtkMap.get(uid);
        }

        /**
         * 添加技能
         * @param role 角色对象
         * @param skillID 技能ID
         */;
        _proto.addSkill = function addSkill(role, skillID) {
          var list = this._entityMap.get(role.uid);
          if (!Array.isArray(list)) {
            list = [];
            this._entityMap.set(role.uid, list);
          }
          var skill = this.createSkill(skillID);
          if (skill) {
            skill.owner = role;
            list.push(skill);
          }
        }

        /**
         * 创建技能
         * @param id 技能ID
         * @returns
         */;
        _proto.createSkill = function createSkill(id) {
          var cfg = DBRecord.fetchId("Skill", id);
          var skill;
          if (cfg) {
            skill = new SkillVO();
            skill.init(cfg);
          }
          return skill;
        }

        /**
         * 添加普攻技能
         * @param role 角色对象
         * @param skill 普攻技能
         */;
        _proto.addAtkSkill = function addAtkSkill(role, skill) {
          // skill.cd /= (1 + role.roleVO.atkInterval) + 10000
          // skill.cd = 0.001;
          // let temp: number = role.roleVO.atkInterval;
          this._entityAtkMap.set(role.uid, skill);
        }

        /**
         * 通过被动技能id找到对应的主动技能id
         * @param passiveSkillId 被动技能id
         */;
        _proto.getActiveSkillId = function getActiveSkillId(passiveSkillId) {
          var cfg = DBRecord.fetchId("JiNengShu", passiveSkillId);
          if (cfg) {
            var currentCfg = cfg;
            while (currentCfg.relationship) {
              currentCfg = DBRecord.fetchId("JiNengShu", currentCfg.relationship);
              if (!currentCfg) {
                return;
              }
            }
            return currentCfg.son_id;
          }
        };
        _createClass(SkillCtrl, [{
          key: "entityMap",
          get: function get() {
            return this._entityMap;
          }
        }, {
          key: "entityAtkMap",
          get: function get() {
            return this._entityAtkMap;
          }
        }]);
        return SkillCtrl;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SkillEffect.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts'], function (exports) {
  var _createClass, cclegacy, GameBattle;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      GameBattle = module.GameBattle;
    }],
    execute: function () {
      cclegacy._RF.push({}, "969dceNs6NEKr7UA2p2TxFp", "SkillEffect", undefined);
      var SkillEffect = exports('SkillEffect', /*#__PURE__*/function () {
        function SkillEffect() {
          /** 效果ID */
          this._effectID = 0;
          /** 作用目标类型 */
          this._targetType = GameBattle.SkillApplyTarget.None;
          /** 效果类型 */
          this._type = GameBattle.SkillEffectType.None;
          /** 作用时机 */
          this._applyTime = 0;
          /** 算法ID */
          this._algorithmID = 0;
          /** 属性类型 */
          this._attrType = 0;
          /** 属性参数 */
          this._attrParam = [];
        }
        _createClass(SkillEffect, [{
          key: "effectID",
          get: function get() {
            return this._effectID;
          },
          set: function set(v) {
            this._effectID = v;
          }
        }, {
          key: "targetType",
          get: function get() {
            return this._targetType;
          },
          set: function set(v) {
            this._targetType = v;
          }
        }, {
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "applyTime",
          get: function get() {
            return this._applyTime;
          },
          set: function set(v) {
            this._applyTime = v;
          }
        }, {
          key: "algorithmID",
          get: function get() {
            return this._algorithmID;
          },
          set: function set(v) {
            this._algorithmID = v;
          }
        }, {
          key: "attrType",
          get: function get() {
            return this._attrType;
          },
          set: function set(v) {
            this._attrType = v;
          }
        }, {
          key: "attrParam",
          get: function get() {
            return this._attrParam;
          },
          set: function set(v) {
            this._attrParam = v;
          }
        }]);
        return SkillEffect;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SkillMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './Utils.ts', './NetChannelMgr.ts', './DBRecord.ts', './UIMgr.ts', './BattleDefine.ts', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, MonitorType, Utils, netChannel, DBRecord, UIMgr, LayerType, GameBattle, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "f9124TtXxpGyLsvq+YLwQn/", "SkillMgr", undefined);
      var SkillStudyType = exports('SkillStudyType', /*#__PURE__*/function (SkillStudyType) {
        SkillStudyType[SkillStudyType["ok"] = 0] = "ok";
        SkillStudyType[SkillStudyType["lock"] = 1] = "lock";
        SkillStudyType[SkillStudyType["not_front"] = 2] = "not_front";
        SkillStudyType[SkillStudyType["mutex"] = 3] = "mutex";
        return SkillStudyType;
      }({}));
      var SkillMgr = exports('SkillMgr', /*#__PURE__*/function () {
        function SkillMgr() {
          this._vSkillData = [];
          this._mGiftData = {};
          //------------------------------------------------------------         声明变量         -------------------------------------------------------------------------------------------
          this._skill_map = new Map();
          this._skill_presuppose_map = new Map();
          this._jineng_dian = 0;
          this._skill_id_last = 0;
        }
        var _proto = SkillMgr.prototype;
        _proto._resetData = function _resetData() {
          this._vSkillData = [];
          this._mGiftData = {};
        };
        //-------------------------------------------------------------         初始化         --------------------------------------------------------------------------------------------
        _proto.init = function init() {
          this._resetData();
          // App.monitorMgr.addEventListener(MonitorType.web_skill_add_point, this.sc_get_skill_20002, this);
          // App.monitorMgr.addEventListener(MonitorType.web_skill_return_point, this.sc_get_skill_20003, this);
          // App.monitorMgr.addEventListener(MonitorType.web_skill_reset, this.sc_get_skill_20004, this);
          // App.monitorMgr.addEventListener(MonitorType.web_skill_use_presuppose, this.sc_get_skill_20005, this);
          // App.monitorMgr.addEventListener(MonitorType.web_skill_presuppose, this.sc_get_skill_20006, this);

          App.monitorMgr.addEventListener(MonitorType.web_skill_data0, this.recSkillData0, this);
          App.monitorMgr.addEventListener(MonitorType.web_skill_learn, this.recSkillData0, this);
          App.monitorMgr.addEventListener(MonitorType.rec_gift_data0, this.recGiftData0, this);
          App.monitorMgr.addEventListener(MonitorType.create_role_select_job, this.recSelectJob, this);
        };
        _proto.dispose = function dispose() {
          this._resetData();
          App.monitorMgr.offTarget(this);
        }

        //-------------------------------------------------------------------------------------------------
        ;

        _proto.getLearnLv = function getLearnLv(id) {
          var JiNengShu = DBRecord.fetchId("JiNengShu", id);
          var JueSeJiNeng = DBRecord.fetchId("JueSeJiNeng", JiNengShu.mother_id % 10);
          for (var dx0 = 0; dx0 < 4; dx0++) {
            var _vGroup = dx0 === 0 ? JueSeJiNeng.skill_group : JueSeJiNeng["passive_group" + dx0];
            if (!_vGroup) continue;
            for (var dx1 = 0; dx1 < _vGroup.length; dx1++) {
              if (_vGroup[dx1] === id) {
                if (dx0 === 0) {
                  return JueSeJiNeng.unlock_skill;
                }
                return JueSeJiNeng["unlock_passive" + dx0];
              }
            }
          }
          var vGroup = JueSeJiNeng.passive_skill_groups || [];
          for (var _dx = 0; _dx < vGroup.length; _dx++) {
            var vPassive = vGroup[_dx];
            for (var _dx2 = 0; _dx2 < vPassive.length; _dx2++) {
              if (vPassive[_dx2] === id) {
                if (_dx2 === 0) {
                  return JueSeJiNeng.unlock_skill;
                }
                return JueSeJiNeng["unlock_passive" + _dx2];
              }
            }
          }
          return 0;
        };
        _proto.getRelyId = function getRelyId(id) {
          var vRely = [];
          var JiNengShu = DBRecord.fetchId("JiNengShu", id) || {};
          while (JiNengShu.relationship) {
            vRely.unshift(JiNengShu.relationship);
            JiNengShu = DBRecord.fetchId("JiNengShu", JiNengShu.relationship);
          }
          return vRely;
        }
        //获取主技能Id
        ;

        _proto.getFirstSkillId = function getFirstSkillId(id) {
          var firstId = id;
          var JiNengShu = DBRecord.fetchId("JiNengShu", id) || {};
          while (JiNengShu.relationship) {
            firstId = JiNengShu.relationship;
            JiNengShu = DBRecord.fetchId("JiNengShu", firstId);
          }
          return firstId;
        }

        //获取已学习的被动技能Id
        ;

        _proto.getLearnPassiveId = function getLearnPassiveId() {
          var vPassive = [];
          var vSkillData = this._vSkillData;
          for (var dx0 = 1; dx0 <= GameBattle.PlayerSkillTierNum; dx0++) {
            var vSubSkill = vSkillData[dx0];
            for (var dx1 = 0; dx1 < vSubSkill.length; dx1++) {
              var jineng_id = vSubSkill[dx1].jineng_id;
              var JiNengShu = DBRecord.fetchId("JiNengShu", jineng_id);
              if (JiNengShu.mother_id >= 10) {
                vPassive.push(jineng_id);
              }
            }
          }
          return vPassive;
        }
        //获取被动技能对应主动技能ID
        ;

        _proto.getFirstIdOfPassive = function getFirstIdOfPassive(id) {
          var JiNengShu = DBRecord.fetchId("JiNengShu", id);
          if (JiNengShu.mother_id < 10) {
            return;
          }
          var JueSeJiNeng = DBRecord.fetchId("JueSeJiNeng", JiNengShu.mother_id % 10);
          return JueSeJiNeng.skill_group;
        };
        _proto.chkIsPassiveSkill = function chkIsPassiveSkill(id) {
          var JiNengShu = DBRecord.fetchId("JiNengShu", id);
          if (JiNengShu.mother_id >= 10) {
            return true;
          }
          return false;
        }

        //被动技能是否解锁
        ;

        _proto.chkPassiveSkillOpen = function chkPassiveSkillOpen(nRoleLv) {
          if (nRoleLv === void 0) {
            nRoleLv = 0;
          }
          nRoleLv = nRoleLv || App.roleMgr.getRoleLv();
          var nSkillLv = this.getPassiveSkillOpenLv();
          return nRoleLv >= nSkillLv;
        }
        //被动技能解锁等级
        ;

        _proto.getPassiveSkillOpenLv = function getPassiveSkillOpenLv() {
          var oJueSeJiNeng = DBRecord.fetchId("JueSeJiNeng", GameBattle.PlayerSkillTierNum);
          if (oJueSeJiNeng) {
            return oJueSeJiNeng.unlock_skill;
          }
          return 50;
        }

        //分支效果后的CD
        ;

        _proto.getSkillCD1 = function getSkillCD1(skillId0) {
          var JiNeng0 = DBRecord.fetchId("Skill", skillId0);
          var skillCd = JiNeng0.CD || 0;
          if (!skillCd) {
            return skillCd;
          }
          var vSkillData = this._vSkillData;
          for (var dx0 = 0; dx0 < 10; dx0++) {
            var vSubSkill = vSkillData[dx0] || [];
            for (var dx1 = 0; dx1 < vSubSkill.length; dx1++) {
              var skillId1 = vSubSkill[dx1].jineng_id;
              var JiNeng1 = DBRecord.fetchId("Skill", skillId1);
              if (!JiNeng1.buff_id) {
                continue;
              }
              for (var dx2 = 0; dx2 < JiNeng1.buff_id.length; dx2++) {
                var JiNengBuff = DBRecord.fetchId("JiNengBuff", JiNeng1.buff_id[dx2]);
                if (!JiNengBuff.effect_ids) {
                  continue;
                }
                for (var dx3 = 0; dx3 < JiNengBuff.effect_ids.length; dx3++) {
                  var JiNengBuffXiaoGuo = DBRecord.fetchId("JiNengBuffXiaoGuo", JiNengBuff.effect_ids[dx3]);
                  if (JiNengBuffXiaoGuo.type === 901 && JiNengBuffXiaoGuo.configuration === "CD") {
                    if (JiNengBuffXiaoGuo.atr.findIndex(function (val) {
                      return val === skillId0;
                    }) !== -1) {
                      skillCd *= JiNengBuffXiaoGuo.value[0];
                    }
                  }
                }
              }
            }
          }
          return skillCd;
        }

        //-------------------------------------------------------------------------------------------------
        ;

        _proto.reqSkillData0 = function reqSkillData0() {
          var msg = {};
          netChannel.game.send(MonitorType.web_skill_data0, msg);
        };
        _proto.reqSkillLearn = function reqSkillLearn(id) {
          var vSkillData = Utils.copyObj(this._vSkillData);
          var JiNengShu = DBRecord.fetchId("JiNengShu", id);
          var vTempData = [];
          if (JiNengShu.mother_id < 10) {
            //左侧技能
            var vRighData = vSkillData[JiNengShu.mother_id + 10];
            for (var dx0 = 0; dx0 < vRighData.length; dx0++) {
              vRighData[dx0].jineng_lv = 0;
            }
            vTempData[0] = {
              jineng_id: id,
              jineng_lv: 1
            };
            for (var _dx3 = 0; _dx3 < 10; _dx3++) {
              var nRely = JiNengShu.relationship;
              if (nRely) {
                vTempData.unshift({
                  jineng_id: nRely,
                  jineng_lv: 1
                });
                JiNengShu = DBRecord.fetchId("JiNengShu", nRely);
              } else {
                break;
              }
            }
          } else {
            //右侧技能
            var JueSeJiNeng = DBRecord.fetchId("JueSeJiNeng", JiNengShu.mother_id % 10);
            var v_temp = JueSeJiNeng.passive_skill_groups || [];
            for (var _dx4 = 0; _dx4 < v_temp.length; _dx4++) {
              var v_group = v_temp[_dx4] || [];
              for (var dx1 = 0; dx1 < v_group.length; dx1++) {
                if (v_group[dx1] === id) {
                  var _vRighData = vSkillData[JiNengShu.mother_id] || [];
                  var vLeftData = vSkillData[JiNengShu.mother_id % 10] || [];
                  for (var dx2 = 0; dx2 < v_group.length; dx2++) {
                    var oData = _vRighData[dx2]; //{ jineng_id: v_group[dx2], jineng_lv: 0 }
                    oData.jineng_id = v_group[dx2];
                    if (dx2 < Math.max(vLeftData.length, dx1 + 1)) {
                      oData.jineng_lv = 1;
                      vTempData.push(oData);
                    }
                  }
                  break;
                }
              }
            }
          }
          vSkillData[JiNengShu.mother_id % 10] = vTempData;
          // vSkillData[JiNengShu.mother_id] = vTempData

          var msg = {};
          for (var _dx5 = 1; _dx5 <= GameBattle.PlayerSkillTierNum; _dx5++) {
            msg["skill_list" + _dx5] = vSkillData[_dx5];
            msg["skill_list" + (_dx5 + 10)] = vSkillData[_dx5 + 10];
          }
          netChannel.game.send(MonitorType.web_skill_learn, msg);
        }
        //选职业后重新初始化被动技能
        ;

        _proto.recSelectJob = function recSelectJob() {
          this.reqSkillReset();
        };
        _proto.reqSkillReset = function reqSkillReset() {
          var msg = {};
          netChannel.game.send(MonitorType.web_skill_learn, msg);
        };
        _proto.reqReturnSkill = function reqReturnSkill(id) {
          var vSkillData = Utils.copyObj(this._vSkillData);
          var JiNengShu = DBRecord.fetchId("JiNengShu", id);
          var vTempData = vSkillData[JiNengShu.mother_id];
          for (var dx0 = 0; dx0 < vTempData.length; dx0++) {
            if (vTempData[dx0].jineng_id === id) {
              vTempData.length = dx0;
              break;
            }
          }
          var msg = {};
          for (var _dx6 = 1; _dx6 <= GameBattle.PlayerSkillTierNum; _dx6++) {
            msg["skill_list" + _dx6] = vSkillData[_dx6];
            msg["skill_list" + (_dx6 + 10)] = vSkillData[_dx6 + 10];
          }
          // msg.skill_list1 = vSkillData[1]
          // msg.skill_list2 = vSkillData[2]
          // msg.skill_list3 = vSkillData[3]
          // msg.skill_list4 = vSkillData[4]
          // msg.skill_list5 = vSkillData[5]
          netChannel.game.send(MonitorType.web_skill_learn, msg);
        };
        _proto.recSkillData0 = function recSkillData0(msg) {
          if (msg.err_code) {
            return;
          }
          var vSkillData = [];
          for (var dx0 = 1; dx0 <= GameBattle.PlayerSkillTierNum; dx0++) {
            vSkillData[dx0] = msg["skill_list" + dx0];
            var vSkill1 = msg["skill_list" + (dx0 + 10)];
            if (!vSkill1.length) {
              vSkill1 = this.getInitSkill1(dx0);
            }
            vSkillData[dx0 + 10] = vSkill1;
          }
          this._vSkillData = vSkillData;
        }
        //初始化被动技能
        ;

        _proto.getInitSkill1 = function getInitSkill1(dx0) {
          if (dx0 === void 0) {
            dx0 = 1;
          }
          var vSkill1 = [];
          var JueSeJiNeng = DBRecord.fetchId("JueSeJiNeng", dx0) || {};
          var v_group = JueSeJiNeng.passive_skill_groups ? JueSeJiNeng.passive_skill_groups[0] : [];
          for (var dx1 = 0; dx1 < v_group.length; dx1++) {
            vSkill1[dx1] = {
              jineng_id: v_group[dx1],
              jineng_lv: 0
            };
          }
          return vSkill1;
        };
        _proto.getSkillData = function getSkillData() {
          return this._vSkillData;
        };
        _proto.fmtSkillData = function fmtSkillData(mSkillData) {
          var vSkillData = [];
          for (var dx0 = 1; dx0 <= GameBattle.PlayerSkillTierNum; dx0++) {
            vSkillData[dx0] = mSkillData["skill_list" + dx0];
            vSkillData[dx0 + 10] = mSkillData["skill_list" + (dx0 + 10)];
          }
          return vSkillData;
        }

        //---------------------------------------------- 天赋相关 ---------------------------------------------------
        ;

        _proto.reqGiftData0 = function reqGiftData0() {
          var msg = {};
          netChannel.game.send(MonitorType.web_gift_data0, msg);
        };
        _proto.recGiftData0 = function recGiftData0(msg) {
          this._mGiftData = msg;
        }
        //天赋升级
        ;

        _proto.reqGiftLvup = function reqGiftLvup(id) {
          var msg = {};
          msg.id = id;
          netChannel.game.send(MonitorType.web_gift_lvup, msg);
        }
        //天赋进阶
        ;

        _proto.reqGiftStup = function reqGiftStup() {
          var msg = {};
          netChannel.game.send(MonitorType.web_gift_stup, msg);
        }
        //天赋重置
        ;

        _proto.reqGiftReset = function reqGiftReset() {
          var msg = {};
          netChannel.game.send(MonitorType.web_gift_reset, msg);
        };
        _proto.recGiftLearn = function recGiftLearn(msg) {
          if (msg.err_code) return;
        };
        _proto.getGiftData = function getGiftData() {
          return this._mGiftData;
        };
        _proto.getGiftCfg = function getGiftCfg(group, lv) {
          var vTianFu = DBRecord.fetchAll("TianFu");
          for (var dx0 = 0; dx0 < vTianFu.length; dx0++) {
            var oTianFu = vTianFu[dx0];
            if (oTianFu.group_id === group && oTianFu.level === lv) {
              return oTianFu;
            }
          }
        }

        /**
         * 根据天赋页id和当前英雄获取天赋组id
         * @param tianFuYeId 天赋页id
         */;
        _proto.getGiftGroup = function getGiftGroup(tianFuYeId) {
          var cfg = DBRecord.fetchId("TianFuYe", tianFuYeId);
          if (cfg) {
            // const heroId = App.heroTavernManager.curHeroId || 10001;
            // const data = cfg.groupid.find((val) => val[0] === heroId);
            // if (!data) {
            //     console.error('...........>>>> getGiftGroup ,data null:', cfg, cfg.groupid, heroId, tianFuYeId);
            // }
            // return data[1];
            return 0;
          }
        }

        /**
         * 获取当前英雄天赋中的所加的属性
         * @returns
         */;
        _proto.getGiftHeroAttr = function getGiftHeroAttr() {
          // const heroId = App.heroTavernManager.curHeroId || 10001;
          var vTianFuYe = DBRecord.fetchAll("TianFuYe");
          var vHeroAttr = [];
          // let vTianFu: dbr.TianFu[] = DBRecord.fetchAll('TianFu');
          // for (let dx0 = 0; dx0 < vTianFuYe.length; dx0++) {
          //     const oTianFuYe = vTianFuYe[dx0];
          //     const groupId = oTianFuYe.groupid.find((val) => val[0] === heroId)[1];
          //     const cfgTianfu: dbr.TianFu = vTianFu.find((val) => val.group_id === groupId);
          //     let cfg: dbr.TianFuZu = DBRecord.fetchId('TianFuZu', groupId);
          //     vHeroAttr.push({ attr: cfgTianfu.attribute, icon: cfg.icon });
          // }
          //console.log("getGiftHeroAttr ,vHeroAttr",vHeroAttr);
          return vHeroAttr;
        }

        /**
         * 获取某阶段的总点数
         * @param tianfuYeIndex 天赋页
         * @returns
         */;
        _proto.getTotalJieDuanDian = function getTotalJieDuanDian(tianfuYeIndex) {
          // let vTianFuYe = DBRecord.fetchAll("TianFuYe");
          // let totalDianShu = 0;
          // for (let dx0 = 0; dx0 < vTianFuYe.length; dx0++) {
          //     const oTianFuYe = vTianFuYe[dx0];
          //     if(dx0===tianfuYeIndex){
          //         break;
          //     }
          //     totalDianShu += oTianFuYe.need_lv;
          // }
          // return totalDianShu+this._mGiftData.jieduan_dian;
          return this._mGiftData.jieduan_dian;
        }

        /**
         * 天赋红点判定：可升阶，或者金币超过升级10倍
         */;
        _proto.checkCanUpGrade = function checkCanUpGrade() {
          if (!this._mGiftData) {
            return false;
          }
          if (!App.lockMgr.checkFuncLock(300)) {
            return false;
          }
          var allCfg = DBRecord.fetchAll("TianFuYe");
          var isMaxLevel = this._mGiftData.jieduan_ye >= allCfg.length;
          if (isMaxLevel) {
            return false;
          }
          var cfgTianFuYe = allCfg[this._mGiftData.jieduan_ye || 0];
          var hasPasQuanQia = App.battleMgr.tongguanGuanQiaId >= cfgTianFuYe.need;
          var isLevelEnough = this._mGiftData.jieduan_dian >= cfgTianFuYe.need_lv;
          //可升阶
          var canUpGrade = hasPasQuanQia && isLevelEnough;
          var haveGold = App.roleMgr.getPlayerResourceCount(AssetId.gold);
          var costGold = 0;
          var groupId = DBRecord.fetchAll("TianFuZu")[0].id;
          var tianfuLevel = 1;
          for (var _iterator = _createForOfIteratorHelperLoose(this._mGiftData.talent_list), _step; !(_step = _iterator()).done;) {
            var element = _step.value;
            if (element.id === groupId) {
              tianfuLevel = element.level;
              break;
            }
          }
          var cfgTianFu = this.getGiftCfg(groupId, tianfuLevel);
          if (cfgTianFu) {
            costGold = cfgTianFu.expend[1];
          }
          //金币超消耗5倍
          var canTianFuUp = haveGold >= costGold * 5 && !isLevelEnough;
          return canUpGrade || canTianFuUp;
        }

        //-------------------------------------------------------------------------------------------------
        ;

        _proto.getSkillKind = function getSkillKind(skillId) {
          if (skillId === void 0) {
            skillId = 0;
          }
          var c_skill = DBRecord.fetchId("Skill", skillId);
          return 0;
        };
        _proto.getAllLearnedSkill = function getAllLearnedSkill() {
          var skillList = [];
          var vSkillData = this._vSkillData;
          for (var dx0 = 0; dx0 < vSkillData.length; dx0++) {
            var vTemp = vSkillData[dx0] || [];
            for (var key in vTemp) {
              var val = vTemp[key];
              skillList.push(val.jineng_id);
            }
          }
          return skillList;
        }
        //获取主动技能（已学习）
        ;

        _proto.getDirectSkill = function getDirectSkill() {
          var skillList = [];
          var vSkillData = this._vSkillData;
          for (var dx0 = 0; dx0 < vSkillData.length; dx0++) {
            var vTemp = vSkillData[dx0] || [];
            for (var key in vTemp) {
              var val = vTemp[key];
              var JiNengShu = DBRecord.fetchId("JiNengShu", val.jineng_id);
              if (JiNengShu && JiNengShu.mother_id <= 10) {
                skillList.push(val.jineng_id);
              }
            }
          }
          return skillList;
        };
        _proto.getSkillPreset = function getSkillPreset(id, lv, job) {
          var TuiJian = DBRecord.fetchId("TuiJian", id);
          var vSkillDt = this.getSkillDtById(TuiJian.all_skill, lv, job);
          return vSkillDt;
        }
        //按技能列表还原技能数据
        ;

        _proto.getSkillDtById = function getSkillDtById(vSkillId, lv, job) {
          var vSkillDt = [];
          for (var dx0 = 0; dx0 < vSkillId.length; dx0++) {
            var JiNengShu = DBRecord.fetchId("JiNengShu", vSkillId[dx0], job);
            if (!JiNengShu) continue;
            var vTemp = vSkillDt[JiNengShu.mother_id];
            if (!vTemp) {
              vTemp = [];
              vSkillDt[JiNengShu.mother_id] = vTemp;
            }
            var tempCfg = JiNengShu;
            while (tempCfg) {
              if (!lv || this.chkSkillRequire(tempCfg.son_id, lv)) {
                var oTemp = {};
                oTemp.jineng_id = tempCfg.son_id;
                oTemp.jineng_lv = 1;
                vTemp.unshift(oTemp);
              }
              tempCfg = DBRecord.fetchId("JiNengShu", tempCfg.relationship, job);
            }
          }
          return vSkillDt;
        }
        //按技能列表还原技能信息
        ;

        _proto.getSkillSetById = function getSkillSetById(vId, nLv, job) {
          if (nLv === void 0) {
            nLv = 0;
          }
          var vSkillDt = this.getSkillDtById(vId, nLv, job);
          var skillSet = {};
          skillSet.jineng_dian = 0;
          skillSet.skill_list1 = vSkillDt[1] || [];
          skillSet.skill_list2 = vSkillDt[2] || [];
          skillSet.skill_list3 = vSkillDt[3] || [];
          skillSet.skill_list4 = vSkillDt[4] || [];
          skillSet.skill_list5 = vSkillDt[5] || [];
          return skillSet;
        }

        //技能是否可学习
        ;

        _proto.chkSkillRequire = function chkSkillRequire(id, lv) {
          lv = lv || App.roleMgr.getRoleLv();
          var vJueSeJiNeng = DBRecord.fetchAll("JueSeJiNeng");
          for (var dx0 = 0; dx0 < vJueSeJiNeng.length; dx0++) {
            var oJueSeJiNeng = vJueSeJiNeng[dx0];
            for (var dx1 = 0; dx1 < oJueSeJiNeng.skill_group.length; dx1++) {
              if (oJueSeJiNeng.skill_group[dx1] === id) {
                return lv >= oJueSeJiNeng.unlock_skill;
              }
            }
            for (var dx2 = 1; dx2 < 4; dx2++) {
              var vId = oJueSeJiNeng["passive_group" + dx2] || [];
              if (vId.find(function (val) {
                return val === id;
              })) {
                return lv >= oJueSeJiNeng["unlock_passive" + dx2];
              }
            }
          }
          return false;
        }

        //-------------------------------------------------------------------------------------------------
        ;

        _proto.reqUsePreset = function reqUsePreset(id) {
          var TuiJian = DBRecord.fetchId("TuiJian", id);
          if (!TuiJian) return;
          for (var dx0 = 0; dx0 < TuiJian.all_equipment.length; dx0++) {
            var itemId = TuiJian.all_equipment[dx0];
            var oItem0 = App.bagMgr.getWearEquipDataByItemId(itemId);
            var oItem1 = App.bagMgr.getBagItemByItemid(itemId);
            if (oItem1 && (!oItem0 || oItem0.equipment.color < oItem1.equipment.color)) {
              App.bagMgr.cs_bag_wear_equip_40005(oItem1.bag_id);
            }
          }
          var vSkill = this.getSkillPreset(id, App.roleMgr.getRoleLv());
          var msg = {};
          msg.skill_list1 = vSkill[1];
          msg.skill_list2 = vSkill[2];
          msg.skill_list3 = vSkill[3];
          msg.skill_list4 = vSkill[4];
          msg.skill_list5 = vSkill[5];
          netChannel.game.send(MonitorType.web_skill_learn, msg);
        };
        _proto.getSkillGouYu = function getSkillGouYu(skillId) {
          var vGouYu = [];
          var mInlay = App.bagMgr.getGouYuInlay();
          for (var key in mInlay) {
            var oItem0 = mInlay[key];
            var BaoShiShuXing = DBRecord.fetchId("BaoShiShuXing", oItem0.gem.sx_id);
            if (BaoShiShuXing.skill === skillId) {
              vGouYu.push(oItem0);
            }
            // mGouYuLock[nPart] = true;
            // if (App.mixMgr.chkSameGroup(oItem0, oItem1)) {
            //     if (oItem1.gem.fighting > oItem0.gem.fighting) {
            //         return nPart;
            //     } else {
            //         if (bTip) {
            //             Prompt.popTip(Utils.getGlobalTxt(402))
            //         }
            //         return 0
            //     }
            // }
          }

          return vGouYu;
        }

        // private recSkillData0(obj: m_proto.SC_20001) {
        //     this._skill_map.clear();
        //     this._vSkillData = []
        //     for (let dx0 = 0; dx0 < 5; dx0++) {
        //         let list = obj[`skill_list${dx0 + 1}`];
        //         for (let k = 0; k < list.length; k++) {
        //             this._skill_map.set(list[k].jineng_id, list[k].jineng_lv);
        //         }

        //         this._vSkillData[dx0] = list
        //     }
        //     // this._jineng_dian = obj.jineng_dian;

        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_main_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_point_change);
        // }

        // public getGroupData(dx0: number) {
        //     return this._vSkillData[dx0]
        // }
        ;

        _proto.getSkillLv = function getSkillLv(son_id) {
          if (UIMgr.inst.getLayerNode(LayerType.panel).getChildByName("uiSkillEcho")) {
            return this._skill_presuppose_map.get(son_id) || 0;
          }
          return this._skill_map.get(son_id) || 0;
        }

        //-------------------------------------------------------------         逻辑处理         --------------------------------------------------------------------------------------------

        // skillList.push(160001); //圣光庇护立场
        // skillList.push(161001); //圣光治愈力场

        // public getJiNengCfg(group_id: number, skill_lv: number): dbr.JiNeng | null {
        //     let JiNengCfg: dbr.JiNeng[] = DBRecord.fetchAll('JiNeng');
        //     for (const v of JiNengCfg) {
        //         if (v.group_id === group_id && v.skill_lv === skill_lv) return v;
        //     }
        //     return null;
        // }

        // public getUnlockSkillNeedPoint(mother_id: number): number {
        //     let jueSeJiNengCfg: dbr.JueSeJiNeng[] = DBRecord.fetchAll('JueSeJiNeng');
        //     let point_list: number[] = [];
        //     for (let i = 0; i < jueSeJiNengCfg.length; i++) {
        //         let cfg = jueSeJiNengCfg[i];
        //         if (!cfg || cfg.mother_id >= mother_id) continue;
        //         point_list[cfg.mother_id] = this.getSkillPointsByMotherId(cfg.mother_id);
        //     }
        //     let point = 0;
        //     for (let i = 0; i < point_list.length; i++) {
        //         let cfg: dbr.JueSeJiNeng = DBRecord.fetchId('JueSeJiNeng', i);
        //         if (!cfg) continue;
        //         point += point_list[i] || 0;
        //         if (cfg.need_point > point) break;
        //     }
        //     let cfg = DBRecord.fetchId('JueSeJiNeng', mother_id);
        //     if (!cfg) return 0;
        //     return cfg.need_point - point;
        // }

        // public getSkillPointsByMotherId(mother_id: number): number {
        //     let points = 0;
        //     for (const [k, v] of this._skill_map) {
        //         let cfg: dbr.JiNengShu = DBRecord.fetchId('JiNengShu', k);
        //         if (!cfg || cfg.mother_id !== mother_id) continue;
        //         points += v;
        //     }
        //     return points;
        // }

        // public getUsedSkillPoints() {
        //     let points = 0;
        //     for (const [k, v] of this._skill_map) {
        //         points += v;
        //     }
        //     return points;
        // }

        // public getSkillStudyType(son_id: number): SkillStudyType {
        //     let targetCfg = DBRecord.fetchId('JiNengShu', son_id);
        //     if (this.getUnlockSkillNeedPoint(targetCfg.mother_id) > 0)
        //         //判断是否解锁
        //         return SkillStudyType.lock;

        //     if (targetCfg.relationship > 0) {
        //         //判断是否学了前置技能
        //         let relationshipCfg = DBRecord.fetchId('JiNengShu', targetCfg.relationship);
        //         if (this.getSkillLv(relationshipCfg.son_id) <= 0) return SkillStudyType.not_front;
        //     }
        //     let jiNengShuConfig: dbr.JiNengShu[] = DBRecord.fetchAll('JiNengShu');
        //     for (let i = 0; i < jiNengShuConfig.length; i++) {
        //         let cfg = jiNengShuConfig[i];
        //         if (cfg.son_id === son_id || cfg.mother_id !== targetCfg.mother_id || cfg.floor !== targetCfg.floor) continue;
        //         if (this.getSkillLv(cfg.son_id) > 0)
        //             //判断是否有互斥技能
        //             return SkillStudyType.mutex;
        //     }

        //     return SkillStudyType.ok;
        // }

        // //---------------------------------------------------------         华丽分割线(协议部分)         --------------------------------------------------------------------------------------------

        // public cs_get_skill_20002(jineng_id: number) {
        //     let obj: m_proto.ICS_20002 = {
        //         jineng_id: jineng_id
        //     };
        //     netChannel.game.send(MonitorType.web_skill_add_point, obj);
        // }

        // private sc_get_skill_20002(obj: m_proto.SC_20002) {
        //     if (obj.err_code) return;
        //     let jineng_id = obj.jineng_id;
        //     let jineng_lv = obj.jineng_lv;
        //     this._jineng_dian = obj.jineng_dian;

        //     this._skill_map.set(jineng_id, jineng_lv);
        //     this._skill_id_last = jineng_id;

        //     Prompt.popTip(App.languageMgr.getTextById(10));
        //     App.soundMgr.playUIEffect(SoundDef.Sound_Audio_SkillUp);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_main_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_info_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_point_change);
        // }

        // public cs_get_skill_20003(jineng_id: number) {
        //     let obj: m_proto.ICS_20003 = {
        //         jineng_id: jineng_id
        //     };
        //     netChannel.game.send(MonitorType.web_skill_return_point, obj);
        // }

        // private sc_get_skill_20003(obj: m_proto.SC_20003) {
        //     if (obj.err_code) return;
        //     this._jineng_dian = obj.jineng_dian;

        //     let list = obj.skill_list;
        //     for (let i = 0; i < list.length; i++) {
        //         this._skill_map.set(list[i].jineng_id, list[i].jineng_lv);
        //     }

        //     Prompt.popTip(App.languageMgr.getTextById(11));
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_main_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_info_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_point_change);
        // }

        // public cs_get_skill_20004() {
        //     netChannel.game.send(MonitorType.web_skill_reset);
        // }

        // private sc_get_skill_20004(obj: m_proto.SC_20004) {
        //     this._jineng_dian = obj.jineng_dian;
        //     this._skill_map.clear();

        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_main_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_point_change);
        // }
        ;

        _proto.cs_get_skill_20001 = function cs_get_skill_20001() {
          netChannel.game.send(MonitorType.web_skill_data0);
        }

        // public cs_get_skill_20006(id: number) {
        //     let obj: m_proto.ICS_20006 = {
        //         id: id
        //     };
        //     netChannel.game.send(MonitorType.web_skill_presuppose, obj);
        // }

        // public sc_get_skill_20006(obj: m_proto.SC_20006) {
        //     if (obj.err_code) return;
        //     let id = obj.id;
        //     this._jineng_dian = obj.jineng_dian;

        //     this._skill_presuppose_map.clear();
        //     for (let i = 0; i < 5; i++) {
        //         let list = obj[`skill_list${i + 1}`];
        //         for (let k = 0; k < list.length; k++) {
        //             this._skill_presuppose_map.set(list[k].jineng_id, list[k].jineng_lv);
        //         }
        //     }

        //     App.monitorMgr.dispatchEvent(MonitorType.skill_update_echo_view);
        //     App.monitorMgr.dispatchEvent(MonitorType.skill_point_change);
        // }

        //---------------------------------------------------------         通知(协议部分)         --------------------------------------------------------------------------------------------
        ;

        _createClass(SkillMgr, [{
          key: "jineng_dian",
          get: function get() {
            return this._jineng_dian;
          }
        }, {
          key: "skill_id_last",
          get: function get() {
            return this._skill_id_last;
          }
        }, {
          key: "skill_presuppose_map",
          get: function get() {
            return this._skill_presuppose_map;
          }
        }]);
        return SkillMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SkillVO.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './BattleDefine.ts', './RoleBase.ts', './MyBulletLauncher.ts', './ModuleDef.ts', './BulletVO.ts', './BulletEffect.ts', './Monster.ts', './BattleProprMgr.ts', './UtilGame.ts', './BattleGlobalData.ts', './AxingManager.ts', './Prompt.ts', './App.ts', './BattleUtil.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, Tween, tween, v3, Vec3, sp, DBRecord, GameBattle, RoleBase, MyBulletLauncher, ModuleDef, BulletVO, BulletEffect, Monster, BattlePropertyName, UtilGame, BattleGlobalDataType, FindPathDeepType, Prompt, App, BattleUtil;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      tween = module.tween;
      v3 = module.v3;
      Vec3 = module.Vec3;
      sp = module.sp;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      MyBulletLauncher = module.MyBulletLauncher;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      BulletVO = module.BulletVO;
    }, function (module) {
      BulletEffect = module.BulletEffect;
    }, function (module) {
      Monster = module.Monster;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      BattleGlobalDataType = module.BattleGlobalDataType;
    }, function (module) {
      FindPathDeepType = module.FindPathDeepType;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }],
    execute: function () {
      cclegacy._RF.push({}, "2852aOMC+ZAjbsB4rdJLTs2", "SkillVO", undefined);
      /**
       * 位移类型
       */
      var MoveType = exports('MoveType', /*#__PURE__*/function (MoveType) {
        MoveType[MoveType["Normal"] = 1] = "Normal";
        MoveType[MoveType["FixedPoint"] = 2] = "FixedPoint";
        MoveType[MoveType["YuHui"] = 3] = "YuHui";
        MoveType[MoveType["PlayerMoveDir"] = 4] = "PlayerMoveDir";
        return MoveType;
      }({}));

      /**
       * 预警对象
       */
      var WarningTarget = exports('WarningTarget', /*#__PURE__*/function (WarningTarget) {
        WarningTarget[WarningTarget["self"] = 1] = "self";
        WarningTarget[WarningTarget["target"] = 2] = "target";
        return WarningTarget;
      }({}));

      /**  角色技能技能 */
      var RoleSkillsNames = exports('RoleSkillsNames', {
        JuliXuanFeng: 550002,
        RouGou: 550003,
        DuoCengRouGou: 550004,
        DanGeZhenDangbo: 550005,
        DuoCengZhenDangbo: 550006,
        TufuBorn: 550007,
        CangBaiQiShiBorn: 500031,
        KuangBao: 550008,
        TianBengDiLie: 550009,
        juDuPingzi: 500009,
        BuffEffectSkill: 6600000,
        XuanYun: 6600001,
        Round: 6600002
      });
      var Skill_State = exports('Skill_State', /*#__PURE__*/function (Skill_State) {
        Skill_State[Skill_State["None"] = 0] = "None";
        Skill_State[Skill_State["Doing"] = 1] = "Doing";
        Skill_State[Skill_State["Finish"] = 2] = "Finish";
        return Skill_State;
      }({}));

      /**
       * 技能类型
       */
      var SkillType = exports('SkillType', /*#__PURE__*/function (SkillType) {
        SkillType[SkillType["Active"] = 1] = "Active";
        SkillType[SkillType["Passive"] = 2] = "Passive";
        SkillType[SkillType["YuHui"] = 3] = "YuHui";
        SkillType[SkillType["ZhuiZong"] = 4] = "ZhuiZong";
        SkillType[SkillType["TuFuLaRen"] = 5] = "TuFuLaRen";
        return SkillType;
      }({}));

      /**
       * 技能buff触发时机
       */
      var SkillBuffTiggerTime = exports('SkillBuffTiggerTime', /*#__PURE__*/function (SkillBuffTiggerTime) {
        SkillBuffTiggerTime[SkillBuffTiggerTime["use"] = 0] = "use";
        SkillBuffTiggerTime[SkillBuffTiggerTime["begin"] = 1] = "begin";
        SkillBuffTiggerTime[SkillBuffTiggerTime["end"] = 2] = "end";
        return SkillBuffTiggerTime;
      }({}));

      /**
       * 技能类
       */
      var SkillVO = exports('SkillVO', /*#__PURE__*/function () {
        function SkillVO() {
          /** 技能ID */
          this._skillID = 0;
          /** 名称 */
          this._name = "";
          /** 描述 */
          this._describe = "";
          /** 图标 */
          this._icon = "";
          /** 技能动作 */
          this._arts_action = "";
          /** 技能组ID */
          this._groupID = 0;
          /** 等级 */
          this._level = 0;
          /** 类型 */
          this._type = 0;
          /** 作用目标类型 */
          this._targetType = GameBattle.SkillApplyTarget.None;
          /** 施放范围 */
          this._distance = [];
          /** CD时间 */
          this._CD = 0;
          /** 消耗 */
          this._cast = [];
          /** 消耗 */
          this._cast_value = [];
          /** 子弹ID */
          this._bullet_id = [];
          /** 效果ID */
          this._effectID = 0;
          /** buffID */
          this._buff_id = [];
          /** buff 目标 */
          this._buff_target = [];
          /** buff 目标参数 */
          this._buff_target_value = [];
          //---------------------------
          /** 持有者 */
          this._owner = void 0;
          /** 当前CD时间 */
          this._curCD = 0;
          /** 发射间隔 */
          this._launch_interval = void 0;
          /** 子弹偏移角度 */
          this._launch_angle = void 0;
          /** 子弹延迟时间 */
          this._launch_delay = void 0;
          /** 子弹数量 */
          this._bullet_number = void 0;
          /** 预警动画 */
          this._warning_effect = void 0;
          /**预警对象 */
          this._warning_target = void 0;
          /**预警对象参数 */
          this._warning_target_value = void 0;
          // /**预警形状 */
          // private _warning_shape: number;
          // public get warning_shape(): number {
          //     return this._warning_shape;
          // }
          // public set warning_shape(v) {
          //     this._warning_shape = v;
          // }
          // /**预警偏移 */
          // private _warning_anchoroffset: number[];
          // public get warning_anchoroffset(): number[] {
          //     return this._warning_anchoroffset;
          // }
          // public set warning_anchoroffset(v) {
          //     this._warning_anchoroffset = v;
          // }
          // /**预警缩放 */
          // private _warning_size: number[];
          // public get warning_size(): number[] {
          //     return this._warning_size;
          // }
          // public set warning_size(v) {
          //     this._warning_size = v;
          // }
          // /**预警时长 */
          // private _warning_duration: number;
          // public get warning_duration() {
          //     return this._warning_duration
          // }
          // public set warning_duration(v) {
          //     this._warning_duration = v
          // }
          /** 施放特效 */
          this._cast_effect = void 0;
          /** 施放特效层级 */
          this._hierarchy = void 0;
          /** 施放特效大小 */
          this._volume = void 0;
          /** 施放特效参数 */
          this._cast_effect_param = void 0;
          /** 挂载点 */
          this._mount_point = void 0;
          /** 位移参数 */
          this._move_value = [];
          /**
           * 目标位移
           */
          this._targetmove_value = void 0;
          /** 子弹数量 */
          this._use_time = void 0;
          /** 预警缩放比例 */
          this._warning_proportion = [];
          /**位移类型 */
          this._move_type = void 0;
          /**
           * 技能释放状态
           */
          // private _skillState: Skill_State = Skill_State.None;
          // public get skillState(): Skill_State {
          //     return this._skillState
          // }
          // public set skillState(v) {
          //     this._skillState = v
          // }
          this._isUsing = false;
          this._actionTween = null;
          this._stopAcitons = false;
          this._sound = void 0;
          this._buff_time = [];
          /**消除子弹ID */
          this.remove_bullet_id = [];
          this.targetPos = v3(0, 0, 0);
          this.bulletVo = {};
          this.weaponAngle = null;
          this.weaponDir = new Vec3();
          /**技能多段位移的索引 */
          this.moveActionIndex = 0;
        }
        var _proto = SkillVO.prototype;
        _proto.init = function init(cfg) {
          var _this$_distance, _this$_bullet_id, _cfg$arts_action, _this$_buff_target;
          this._skillID = cfg.id;
          this._level = 1; //cfg.skill_lv;
          this._groupID = 0; //cfg.group_id;
          this._type = cfg.type;
          this._distance = [];
          cfg.distance && (_this$_distance = this._distance).push.apply(_this$_distance, cfg.distance);
          this.CD = cfg.CD;
          this._bullet_id = [];
          cfg.bullet_id && (_this$_bullet_id = this._bullet_id).push.apply(_this$_bullet_id, cfg.bullet_id);
          this.bulletVo = {};
          for (var i = 0; i < this._bullet_id.length; i++) {
            var bullet_id = this._bullet_id[i];
            this.bulletVo[bullet_id] = new BulletVO();
            var _cfg = DBRecord.fetchId("JiNengZiDan", bullet_id);
            this.bulletVo[bullet_id].load(_cfg);
            this.bulletVo[bullet_id].bulletEffect = {};
            for (var j = 0; j < this.bulletVo[bullet_id].effect_id.length; j++) {
              var effect_id = this.bulletVo[bullet_id].effect_id[j];
              this.bulletVo[bullet_id].bulletEffect[effect_id] = new BulletEffect();
              var cfg2 = DBRecord.fetchId("JiNengXiaoGuo", effect_id);
              this.bulletVo[bullet_id].bulletEffect[effect_id].load(cfg2);
            }
          }
          this._targetType = cfg.bullet_target ? cfg.bullet_target[0] : 0;
          this._bullet_number = cfg.bullet_number ? cfg.bullet_number[0] : 0;
          this._launch_angle = 0; //cfg.launch_angle * (Math.PI / 180);
          this._launch_delay = cfg.launch_delay;
          this._launch_interval = 0.8; //cfg.launch_interval / 1000;
          this._arts_action = (_cfg$arts_action = cfg.arts_action) != null ? _cfg$arts_action : "";
          this._move_value = [];
          if (cfg.move_value && cfg.move_value.length > 0) {
            for (var index = 0; index < cfg.move_value.length; index++) {
              var _this$_move_value$ind;
              var element = cfg.move_value[index];
              if (!Array.isArray(element)) {
                break;
              }
              this._move_value[index] = [];
              (_this$_move_value$ind = this._move_value[index]).push.apply(_this$_move_value$ind, element);
            }
          }
          this._cast = [];
          // cfg.cast && this._cast.push(...cfg.cast);
          this._cast_value = [];
          // cfg.cast_value && this._cast_value.push(...cfg.cast_value);

          // this.warning_effect = cfg.warning_effect ?? "";
          // this.warning_target = cfg.warning_target;
          // if (cfg.warning_target_value) {
          //     this._warning_target_value = [...cfg.warning_target_value];
          // }
          this._buff_id = [];
          cfg.buff_id && (this._buff_id = [].concat(cfg.buff_id));
          this._buff_target = [];
          cfg.buff_target && (_this$_buff_target = this._buff_target).push.apply(_this$_buff_target, cfg.buff_target);
          this._buff_target_value = [];
          // if (cfg.buff_target_value) {
          //     this._buff_target_value.push(...cfg.buff_target_value);
          // }

          this._cast_effect = ""; //cfg.cast_effect;
          this._cast_effect_param = [];
          // if (cfg.cast_effect_param) {
          //     this._cast_effect_param.push(...cfg.cast_effect_param);
          // }

          this.mount_point = "body"; //cfg.mount_point;
          this._isUsing = false;
          this._curCD = 0;
          this.use_time = cfg.use_time;
          this._warning_proportion = [];
          // cfg.warning_proportion && (this._warning_proportion = [...cfg.warning_proportion]);
          this._move_type = cfg.move_type;
          this.stopAcitons = false;

          // this._warning_shape = cfg.warning_shape;
          // this._warning_anchoroffset = cfg.warning_anchoroffset
          // this._warning_size = cfg.warning_size
          // this._warning_duration = cfg.warning_duration
          // this._targetmove_value = cfg.targetmove_value
          this.weaponAngle = null;
          this.name = cfg.name; //App.languageMgr.getTextById(cfg.name);
          this.sound = ""; //cfg.sound;

          this.buff_time = [];
          // cfg.buff_time && (this.buff_time = [...cfg.buff_time]);
          this.remove_bullet_id = [];
          // cfg.remove_bullet_id && (this.remove_bullet_id = [...cfg.remove_bullet_id]);
          // this.hierarchy = cfg.hierarchy;
          // this.volume = cfg.volume;
        };

        _proto.reset = function reset() {
          this._actionTween = null;
          this._curCD = 0;
          this.targetPos.set(0, 0, 0);
          this.moveActionIndex = 0;
        }
        /** 回收 */;
        _proto.destroy = function destroy() {
          this._actionTween = null;
          this.moveActionIndex = 0;
          for (var _key in this.bulletVo) {
            this.bulletVo[_key].reset();
            delete this.bulletVo[_key];
          }
          this.bulletVo = {};
          this._curCD = this._CD;
          this._isUsing = false;
          this._actionTween = null;
          Tween.stopAllByTarget(this._owner.node);
          this.moveActionIndex = 0;
        };
        _proto.onUpdate = function onUpdate(dt) {
          this._updateCD(dt);
          this._updateLogic(dt);
        };
        _proto.use = function use() {
          // if (this._owner.state.type = GameBattle.ActionState.Dead) {
          //     if (this._actionTween) {
          //         Tween.stopAllByTarget(this._owner.node)
          //         this._actionTween = null
          //     }
          //     return;
          // }
          // if (!this.isReady()) {
          //     console.log('Attack skill use cd', this.isReady())
          //     return;
          // }
          // this._curCD = this._CD;
          this._isUsing = true;
          if (this.sound && this.sound !== "") {
            App.soundMgr.playEffect(this.sound);
          }

          //通用迂回
          if (this._type === SkillType.YuHui) {
            this.yuHui();
            return;
          }
          this._createBullet();
          this._removeBullet();
          this.createBuff(SkillBuffTiggerTime.use);
          if (!this.isDelayCastEffect()) {
            this._createEffect();
          }
          this.setCast();
          if (this._skillID === 130011) console.log("use skill_" + this._skillID + "   " + Math.floor(new Date().getTime() / 1000));
        }

        /**
         * 施法特效是否从技能动作起始，延迟一定时间播放，而不是技能关键帧播放
         */;
        _proto.isDelayCastEffect = function isDelayCastEffect() {
          if (this._cast_effect_param && this._cast_effect_param.length > 0) {
            return true;
          }
          return false;
        }

        /**
         * 施法特效延迟时间
         */;
        _proto.getCastEffectDelay = function getCastEffectDelay() {
          if (this._cast_effect_param && this._cast_effect_param.length > 0) {
            return this._cast_effect_param[0];
          }
          return 0;
        }

        /**
         * 迂回技能逻辑
         */;
        _proto.yuHui = function yuHui() {
          var _this = this;
          var target = this.getTarget();
          if (!target) {
            return;
          }
          var node = this._owner.node;
          var temp = this._move_value[0];
          if (!Array.isArray(temp)) {
            this._owner.state.exitType(GameBattle.ActionState.Skill);
            this.end();
            return;
          }
          var tm = this._move_value[0][0] / 1000;
          var moveDirection = this._owner.node.worldPosition.clone().subtract(target.node.worldPosition).normalize();
          var curDirection = BattleUtil.analysisDirection(moveDirection);
          this._owner.curDirection = curDirection;
          var frameSpeed = this._owner.getFrameSpeed();
          //this._owner.view.play('Move', true);
          var offset = moveDirection.multiplyScalar(frameSpeed);
          var self = this;
          tween(node).tag(GameBattle.BattleTweenTag).to(tm, {
            scale_z: 1
          }, {
            onUpdate: function onUpdate(node, _ratio) {
              if (!self._owner.checkValid() || !node) return;
              var pos = node.worldPosition.clone();
              var x = offset.x;
              var y = offset.y;
              if (!App.mapMgr.checkCanMove(v3(pos.x + x, pos.y, 0), self._owner.type === GameBattle.RoleType.Hero || self._owner.isBoss())) {
                x = 0;
              }
              if (!App.mapMgr.checkCanMove(v3(pos.x, pos.y + y, 0), self._owner.type === GameBattle.RoleType.Hero || self._owner.isBoss())) {
                y = 0;
              }
              pos.add3f(x, y, 0);
              node.worldPosition = pos;
            }
          }).call(function () {
            if (!self._owner.checkValid()) return;
            self._owner.state.exitType(GameBattle.ActionState.Skill);
            var moveDirection = target.node.worldPosition.clone().subtract(_this._owner.node.worldPosition).normalize();
            var curDirection = BattleUtil.analysisDirection(moveDirection);
            self._owner.curDirection = curDirection;
            _this.end();
          }).start();
        }
        /**
         * 位移动画
         */;
        _proto.doMoveAction = function doMoveAction(dir, targetPos) {
          var _this2 = this;
          //迂回
          if (this._type === SkillType.YuHui) {
            return;
          }
          var needResetMoveDir = false;
          if (this._move_type === MoveType.PlayerMoveDir) {
            needResetMoveDir = true;
            if (this._owner.moveDirection.x !== 0 || this._owner.moveDirection.y !== 0) {
              dir = this._owner.moveDirection.clone().normalize();
            } else {
              var target = this.getTarget();
              if (target) {
                dir = target.node.worldPosition.clone().subtract(this._owner.node.worldPosition).normalize();
              }
            }
          }
          if (dir) {
            this.owner.skillMoveDirVec = dir.clone();
            //console.log('doMoveAction------------->>>>', dir);
          }

          if (this._move_type === MoveType.FixedPoint) {
            if (this.arts_action.length > 0 && this._move_value.length > 0 && this._stopAcitons === false) {
              if (this._actionTween) {
                //技能释放中, 有多段
                return;
              }
              if (targetPos) {
                var node = this._owner.node;
                var moveValue = this._move_value[0];
                if (!moveValue || !Array.isArray(moveValue)) {
                  return;
                }
                var delayTime = this._move_value[0][0];
                var endTime = this._move_value[0][1] - delayTime;
                this._actionTween = tween(node).tag(GameBattle.BattleTweenTag).delay(delayTime).to(endTime, {
                  worldPosition: targetPos
                }).call(function () {
                  //阿斯托娅暗影步，瞬移到目标背后，立即面向目标背刺
                  if (_this2.warning_target_value && _this2.warning_target_value.length > 0 && _this2.warning_target_value[0] === 1) {
                    _this2._owner._updateDirection(true);
                  }
                }).start();
              }
            }
          } else {
            if (this.arts_action.length > 0 && this._move_value.length > 0 && this._stopAcitons === false) {
              if (this._actionTween && this._move_value.length <= 1) {
                //技能释放中, 有多段
                return;
              }
              var _target2 = this.getTarget();
              if (!_target2) return;
              var moveDirection = dir;
              if (!moveDirection) {
                moveDirection = _target2.node.worldPosition.clone().subtract(this._owner.node.worldPosition).normalize();
              }
              this._owner._updateDirection(true);
              var _node = this._owner.node;
              var _moveValue = this._move_value[this.moveActionIndex];
              if (!_moveValue || !Array.isArray(_moveValue)) {
                return;
              }
              var _delayTime = _moveValue[0];
              var _endTime = _moveValue[1] - _delayTime;
              var frameSpeed = _moveValue[2] / _endTime / 100; //Number(game.frameRate)
              var offset = moveDirection.multiplyScalar(frameSpeed);
              var self = this;
              this._actionTween = tween(_node).tag(GameBattle.BattleTweenTag).delay(_delayTime).to(_endTime, {
                scale_z: 1
              }, {
                onUpdate: function onUpdate(_target, _ratio) {
                  if (!_node) return;
                  //玩家冲刺技能，在释放时获取方向
                  if (needResetMoveDir) {
                    needResetMoveDir = false;
                    if (self._owner.moveDirection.x !== 0 || self._owner.moveDirection.y !== 0) {
                      var _moveDirection = self._owner.moveDirection.clone().normalize();
                      self.owner.skillMoveDirVec = _moveDirection.clone();
                      offset = _moveDirection.multiplyScalar(frameSpeed);
                      //console.log('doMoveAction------------->>>>**************************', self.owner.skillMoveDirVec);
                    }
                  }

                  var pos = _node.worldPosition.clone();
                  var x = offset.x;
                  var y = offset.y;
                  var isPlayer = self._owner.type === GameBattle.RoleType.Hero;
                  var isBoss = self._owner.isBoss();
                  var flag = isPlayer || isBoss;
                  if (!App.mapMgr.checkCanMove(v3(pos.x + x, pos.y + y, 0), flag)) {
                    if (App.mapMgr.checkCanMove(v3(pos.x + x, pos.y, 0), flag)) {
                      y = 0;
                    } else if (App.mapMgr.checkCanMove(v3(pos.x, pos.y + y, 0), flag)) {
                      x = 0;
                    } else {
                      x = 0;
                      y = 0;
                    }
                  }
                  pos.add3f(x, y, 0);
                  // console.log('skill move', x, y , pos.x, pos.y, node.worldPosition.x, node.worldPosition.y)
                  _node.worldPosition = pos;
                  if (self._move_type === MoveType.PlayerMoveDir) {
                    var player = self._owner;
                  }
                }
              }).call(function () {
                if (self.moveActionIndex < self._move_value.length && self._move_value.length > 1) {
                  _this2.moveActionIndex++;
                  _this2._owner._updateDirection(true);
                  self.doMoveAction(dir, targetPos);
                }
              }).start();
            }
          }
        };
        _proto.end = function end() {
          // console.log('curtype skill end')

          this.createBuff(SkillBuffTiggerTime.end);
          this._curCD = this._CD;
          this._isUsing = false;
          if (this._actionTween) {
            // console.log('skill move stop')
            this._actionTween = null;
          }
          Tween.stopAllByTarget(this._owner.node);
          this.moveActionIndex = 0;
        };
        _proto.endAction = function endAction() {
          this._curCD = 0;
          this._isUsing = false;
          if (this._actionTween) {
            // console.log('skill move stop')

            Tween.stopAllByTarget(this._owner.node);
            this._actionTween = null;
          }
        };
        _proto.endCD = function endCD() {
          this._curCD = 0;
          this._isUsing = false;
        }

        /**
         * 技能CD是否就绪
         * @returns
         */;
        _proto.isReady = function isReady() {
          return this._curCD === 0 && !this._isUsing && this.checkCast();
        }

        /**
         * 检查技能CD是否结束
         * @returns boolean - CD是否结束
         */;
        _proto.checkCD = function checkCD() {
          return this._curCD === 0;
        }

        /**
         * 开始技能冷却
         */;
        _proto.startCD = function startCD() {
          this._curCD = this._CD;
          this._isUsing = false;
        }

        /**
         * 检测是否符满足消耗
         * @returns
         */;
        _proto.checkCast = function checkCast() {
          // return true
          if (this._cast.length === 0) return true;

          // if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.MuZhuang && App.battleMgr.battleMainViewCtrl.battleMuZhuang.noLimitNengLiang) {
          //     // 木桩副本不检测消耗
          //     return true;
          // }
          var odds = App.battleMgr.globalData.getData(BattleGlobalDataType.skillCost);
          var ret = true;
          for (var i = 0; i < this._cast.length; i++) {
            var propId = this._cast[i];
            if (this._cast_value[i] < 0) {
              odds = 1;
            }
            var cast = this._cast_value[i] * odds;
            var cur = App.battleProprMgr.featchValueById(propId, this._owner.roleVO);
            if (cur < cast) {
              ret = false;
              break;
            }
          }
          if (!ret) {
            var tip = App.languageMgr.getTextById(28);
            var str = UtilGame.formateStr(tip, this.name);
            App.battleMgr.popTips(str, GameBattle.CommomUiTip.skill);
          }
          return ret;
        }

        /**
         * 扣除消耗
         */;
        _proto.setCast = function setCast() {
          if (this._cast.length === 0) return;

          // if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.MuZhuang && App.battleMgr.battleMainViewCtrl.battleMuZhuang.noLimitNengLiang) {
          //     // 木桩副本不扣除消耗
          //     return;
          // }
          var odds = App.battleMgr.globalData.getData(BattleGlobalDataType.skillCost);
          for (var i = 0; i < this._cast.length; i++) {
            var propId = this._cast[i];
            if (this._cast_value[i] < 0) {
              odds = 1;
            }
            var cast = this._cast_value[i] * odds;
            App.battleProprMgr.changeValueById(propId, -cast, this._owner.roleVO, true);
          }
        }

        /**
         * 检测是否符合施放范围
         * @returns
         */;
        _proto.checkRange = function checkRange() {
          //如果已经有了释放动作则不检测释放范围
          if (this._isUsing) {
            return true;
          }
          var result = false;
          var target = this.getTarget();
          if (!(target instanceof RoleBase)) {
            var dungeonMgr = App.dungeonBattleMgr;
            if (dungeonMgr) {
              var city = dungeonMgr.city;
              var min = this._distance[0];
              var max = this._distance[1];
              var distance = Vec3.distance(city.getTargetWorldPosition(), this._owner.node.worldPosition);
              result = distance >= min && distance <= max;
            }
          } else {
            // 检查目标有效性：存在、节点激活、有效、且未死亡
            if (target && target.node.active && target.checkValid() && !target.isDead) {
              var _min = this._distance[0];
              var _max = this._distance[1];
              var _distance = Vec3.distance(target.node.worldPosition, this._owner.node.worldPosition);
              result = _distance >= _min && _distance <= _max;
            }
          }
          return result;
        }

        /**
         * 获取技能作用目标对象
         * @returns
         */;
        _proto.getTarget = function getTarget() {
          var target;
          var list;
          switch (this._targetType) {
            case GameBattle.SkillApplyTarget.Self:
              target = this._owner;
              break;
            case GameBattle.SkillApplyTarget.Enemy:
              target = this._owner.lockTargetCtrl.target;
              break;
            case GameBattle.SkillApplyTarget.Friends:
              list = this._owner.lockTargetCtrl.getTargetByType(this._owner.type, this.distance, undefined, 1);
              if (list && list.length > 0) {
                target = list[0];
              }
              break;
            case GameBattle.SkillApplyTarget.SelfAndFriends:
              list = this._owner.lockTargetCtrl.getTargetByType(this._owner.type, this.distance);
              target = this._owner;
              for (var _iterator = _createForOfIteratorHelperLoose(list), _step; !(_step = _iterator()).done;) {
                var entity = _step.value;
                if (target.uid === entity.uid) continue;
                if (target.roleVO.curHP / target.roleVO.getRoleAttr(BattlePropertyName.shengming) > entity.roleVO.curHP / entity.roleVO.getRoleAttr(BattlePropertyName.shengming)) {
                  target = entity;
                }
              }
              break;
            case GameBattle.SkillApplyTarget.All:
              break;
          }
          return target;
        }
        /**
         * 获取技能作用新的目标对象
         * @returns
         */;
        _proto.getNewTarget = function getNewTarget() {
          var target;
          switch (this._targetType) {
            case GameBattle.SkillApplyTarget.Self:
              target = this._owner;
              break;
            case GameBattle.SkillApplyTarget.Enemy:
              target = this._owner.lockTargetCtrl.target;
              break;
            case GameBattle.SkillApplyTarget.Friends:
              break;
            case GameBattle.SkillApplyTarget.SelfAndFriends:
              break;
            case GameBattle.SkillApplyTarget.All:
              break;
          }
          return target;
        }
        /**
         * 获取技能作用目标对象
         * @param id 指定id
         * @returns
         */;
        _proto.getTargetByType = function getTargetByType(targetType, id) {
          var target;
          var list;
          switch (targetType) {
            case GameBattle.SkillApplyTarget.Self:
              target = this._owner;
              break;
            case GameBattle.SkillApplyTarget.Enemy:
              target = this._owner.lockTargetCtrl.target;
              break;
            case GameBattle.SkillApplyTarget.Friends:
              list = this._owner.lockTargetCtrl.getTargetByType(this._owner.type, this.distance, id, 1);
              if (list && list.length > 0) {
                target = list[0];
              }
              break;
            case GameBattle.SkillApplyTarget.SelfAndFriends:
              list = this._owner.lockTargetCtrl.getTargetByType(this._owner.type, this.distance);
              target = this._owner;
              for (var _iterator2 = _createForOfIteratorHelperLoose(list), _step2; !(_step2 = _iterator2()).done;) {
                var entity = _step2.value;
                if (target.uid === entity.uid) continue;
                if (target.roleVO.curHP / target.roleVO.getRoleAttr(BattlePropertyName.shengming) > entity.roleVO.curHP / entity.roleVO.getRoleAttr(BattlePropertyName.shengming)) {
                  target = entity;
                }
              }
              break;
            case GameBattle.SkillApplyTarget.All:
              break;
          }
          return target;
        }

        /**
         * 创建子弹
         */;
        _proto._createBullet = function _createBullet() {
          for (var i = 0; i < this._bullet_id.length; i++) {
            var id = this._bullet_id[i];
            MyBulletLauncher.addBullet(this, id, this.bulletVo[id]);
          }
        }

        /**
         * 创建buff
         */;
        _proto.createBuff = function createBuff(time) {
          if (this._buff_id) {
            for (var buffIndex = 0; buffIndex < this._buff_id.length; buffIndex++) {
              if (this.buff_time.length === 0 && time === SkillBuffTiggerTime.use || this.buff_time[buffIndex] === time) {
                var buff_id = this._buff_id[buffIndex];
                var target = this.getTargetByType(this.buff_target[buffIndex], this.buff_target_value.length > 0 && this.buff_target_value[buffIndex]);
                if (!target) continue;
                target._buffBox.addBuff(buff_id, this._owner, this.skillID);
              }
            }
          }
        }

        /**
         * 更新技能CD
         * @param dt
         */;
        _proto._updateCD = function _updateCD(dt) {
          if (this._curCD === 0) {
            this._isUsing = false;
            return;
          }
          this._curCD -= dt;
          this._curCD = this._curCD < 0 ? 0 : this._curCD;
          if (this._curCD === 0) {
            var _this$_owner$atkSkill;
            if (this._skillID === ((_this$_owner$atkSkill = this._owner.atkSkill) == null ? void 0 : _this$_owner$atkSkill._skillID)) {
              this._owner.state.exitType(GameBattle.ActionState.Attack);
              if (this.owner.type === GameBattle.RoleType.Monster) {
                var ai = this._owner._monsterAI;
                ai.stateLock = false;
              }
            }
          }
        }

        /**
         * 创建技能施放特效
         */;
        _proto._createEffect = function _createEffect() {
          if (this._cast_effect) {
            var node = App.nodePoolMgr.getNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillCastEffect);
            if (!node) {
              // TODO 弹提示
              Prompt.popTip("技能效果加载失败");
              return;
            }
            node.parent = this._owner.node;
            var pos = this._owner.getMountPoint(this._mount_point, this._owner.node.worldPosition);
            // node.name = node_name
            node.setWorldPosition(pos);
            var neexFlip = 1;
            if (!this._owner.view.isFlipX) {
              neexFlip = -1;
            }
            if (this._volume) {
              node.setScale(this._volume * neexFlip, this._volume, this._volume);
            }
            if (this._hierarchy && this._hierarchy === 2) {
              node.setSiblingIndex(2);
            }
            var spine = node.getComponent(sp.Skeleton);
            var path = "SkillEffect/" + this._cast_effect;
            App.resMgr.loadAsset(ModuleDef.SPINE, path, sp.SkeletonData, null, function (err, res) {
              if (err) {
                console.error(err);
                App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillCastEffect, node);
                return;
              }
              spine.skeletonData = res;
              spine.setAnimation(0, "animation", false);
              spine.setCompleteListener(function () {
                spine.setCompleteListener(null);
                App.nodePoolMgr.putNodeByPath(ModuleDef.GAME_BATTLE_B, GameBattle.OtherPrefabPath.skillCastEffect, node);
              });
            });
          }
        }

        /**
         * 更新逻辑
         */;
        _proto._updateLogic = function _updateLogic(_dt) {
          //技能类型4：追踪
          if (this.type === SkillType.ZhuiZong) {
            if (this.owner instanceof Monster && this.owner.curSkill && this.owner.curSkill.skillID === this.skillID) {
              var target = this._owner.lockTargetCtrl.target;
              if (!target) {
                return;
              }
              if (this.owner.state.type === GameBattle.ActionState.Dead) {
                return;
              }
              var moveVec = App.mapMgr.getMoveVector(this._owner.node.worldPosition, target.node.worldPosition, false, FindPathDeepType.Boss);
              if (moveVec.x === 0 && moveVec.y === 0) {
                this.owner.handleSkillComplete(true);
                return;
              }
              this.owner.moveDirection.set(moveVec);
              this.owner._doMove(true);
              var conditon = this.owner._monsterAI.condtion;
              var nextSkillIndex = -1;
              var canUseNextSkill = false;
              out: for (var index = 0; index < conditon.length; index++) {
                var element = conditon[index];
                if (element.AI_group1) {
                  for (var j = 0; j < element.AI_group1.length; j++) {
                    var con = element.AI_group1[j];
                    if (con[0] === 306 && con[1] === this.skillID) {
                      nextSkillIndex = j;
                      break out;
                    }
                  }
                }
              }
              if (nextSkillIndex >= 0) {
                var nextSkillId = this.owner.roleVO.skillIDList[nextSkillIndex];
                if (nextSkillId) {
                  var skill = App.battleMgr.skillCtrl.getSkill(this.owner.uid, nextSkillId);
                  if (skill) {
                    canUseNextSkill = skill.checkRange();
                  }
                }
              }

              //追踪到目标,或可使用接驳节能时，结束追踪
              var dis = target.node.worldPosition.clone().subtract(this.owner.node.worldPosition).length();
              if (dis <= 70 || canUseNextSkill) {
                this.owner.handleSkillComplete(true);
              }
            }
          }
        }

        /**
         * 消除子弹
         */;
        _proto._removeBullet = function _removeBullet() {
          if (this.remove_bullet_id.length <= 0) {
            return;
          }
          for (var i = 0; i < this.remove_bullet_id.length; i++) {
            var bullets = App.battleMgr.bulletCtrl.getBulletsByBullId(this.remove_bullet_id[i]);
            for (var index = 0; index < bullets.length; index++) {
              var bullet = bullets[index];
              if (bullet) {
                bullet.end();
              }
            }
          }
        }

        /**
         * 释放技能后，是否增加施法者的skillUseTime
         */;
        _proto.checkUpdateUseTime = function checkUpdateUseTime() {
          return this.type === SkillType.Active || this.type === SkillType.TuFuLaRen;
        };
        _createClass(SkillVO, [{
          key: "skillID",
          get: function get() {
            return this._skillID;
          },
          set: function set(v) {
            this._skillID = v;
          }
        }, {
          key: "name",
          get: function get() {
            return this._name;
          },
          set: function set(v) {
            this._name = v;
          }
        }, {
          key: "describe",
          get: function get() {
            return this._describe;
          },
          set: function set(v) {
            this._describe = v;
          }
        }, {
          key: "icon",
          get: function get() {
            return this._icon;
          },
          set: function set(v) {
            this._icon = v;
          }
        }, {
          key: "arts_action",
          get: function get() {
            return this._arts_action;
          },
          set: function set(v) {
            this._arts_action = v;
          }
        }, {
          key: "groupID",
          get: function get() {
            return this._groupID;
          },
          set: function set(v) {
            this._groupID = v;
          }
        }, {
          key: "level",
          get: function get() {
            return this._level;
          },
          set: function set(v) {
            this._level = v;
          }
        }, {
          key: "type",
          get: function get() {
            return this._type;
          },
          set: function set(v) {
            this._type = v;
          }
        }, {
          key: "targetType",
          get: function get() {
            return this._targetType;
          },
          set: function set(v) {
            this._targetType = v;
          }
        }, {
          key: "distance",
          get: function get() {
            return this._distance;
          },
          set: function set(v) {
            this._distance = v;
          }
        }, {
          key: "CD",
          get: function get() {
            return this._CD;
          },
          set: function set(v) {
            //console.log('CDCDCDCDCDCDCDCDCDCDCDCDCD', v, this.bullet_id);
            this._CD = v / 1000;
          }
        }, {
          key: "cast",
          get: function get() {
            return this._cast;
          },
          set: function set(v) {
            this._cast = v;
          }
        }, {
          key: "cast_value",
          get: function get() {
            return this._cast_value;
          },
          set: function set(v) {
            this._cast_value = v;
          }
        }, {
          key: "bullet_id",
          get: function get() {
            return this._bullet_id;
          },
          set: function set(v) {
            this._bullet_id = v;
            for (var i = 0; i < this._bullet_id.length; i++) {
              var bullet_id = this._bullet_id[i];
              if (!this.bulletVo[bullet_id]) {
                this.bulletVo[bullet_id] = new BulletVO();
                var cfg = DBRecord.fetchId("JiNengZiDan", bullet_id);
                this.bulletVo[bullet_id].load(cfg);
                this.bulletVo[bullet_id].bulletEffect = {};
                for (var j = 0; j < this.bulletVo[bullet_id].effect_id.length; j++) {
                  var effect_id = this.bulletVo[bullet_id].effect_id[j];
                  this.bulletVo[bullet_id].bulletEffect[effect_id] = new BulletEffect();
                  var cfg2 = DBRecord.fetchId("JiNengXiaoGuo", effect_id);
                  this.bulletVo[bullet_id].bulletEffect[effect_id].load(cfg2);
                }
              }
            }
            for (var id in this.bulletVo) {
              if (v.indexOf(Number(id)) === -1) {
                delete this.bulletVo[id];
              }
            }
          }
        }, {
          key: "effectID",
          get: function get() {
            return this._effectID;
          },
          set: function set(v) {
            this._effectID = v;
          }
        }, {
          key: "buff_id",
          get: function get() {
            return this._buff_id;
          },
          set: function set(v) {
            this._buff_id = v;
          }
        }, {
          key: "buff_target",
          get: function get() {
            return this._buff_target;
          },
          set: function set(v) {
            this._buff_target = v;
          }
        }, {
          key: "buff_target_value",
          get: function get() {
            return this._buff_target_value;
          },
          set: function set(v) {
            this._buff_target_value = v;
          }
        }, {
          key: "owner",
          get: function get() {
            return this._owner;
          },
          set: function set(v) {
            this._owner = v;
          }
        }, {
          key: "curCD",
          get: function get() {
            return this._curCD;
          },
          set: function set(v) {
            this._curCD = v;
          }
        }, {
          key: "launch_interval",
          get: function get() {
            return this._launch_interval;
          },
          set: function set(value) {
            this._launch_interval = value;
          }
        }, {
          key: "launch_angle",
          get: function get() {
            return this._launch_angle;
          },
          set: function set(value) {
            this._launch_angle = value;
          }
        }, {
          key: "launch_delay",
          get: function get() {
            return this._launch_delay;
          },
          set: function set(value) {
            this._launch_delay = value;
          }
        }, {
          key: "bullet_number",
          get: function get() {
            return this._bullet_number;
          },
          set: function set(value) {
            this._bullet_number = value;
          }
        }, {
          key: "warning_effect",
          get: function get() {
            return this._warning_effect;
          },
          set: function set(value) {
            this._warning_effect = value;
          }
        }, {
          key: "warning_target",
          get: function get() {
            return this._warning_target;
          },
          set: function set(value) {
            this._warning_target = value;
          }
        }, {
          key: "warning_target_value",
          get: function get() {
            return this._warning_target_value;
          },
          set: function set(value) {
            this._warning_target_value = value;
          }
        }, {
          key: "cast_effect",
          get: function get() {
            return this._cast_effect;
          },
          set: function set(value) {
            this._cast_effect = value;
          }
        }, {
          key: "hierarchy",
          get: function get() {
            return this._hierarchy;
          },
          set: function set(value) {
            this._hierarchy = value;
          }
        }, {
          key: "volume",
          get: function get() {
            return this._volume;
          },
          set: function set(value) {
            this._volume = value;
          }
        }, {
          key: "cast_effect_param",
          get: function get() {
            return this._cast_effect_param;
          },
          set: function set(value) {
            this._cast_effect_param = value;
          }
        }, {
          key: "mount_point",
          get: function get() {
            return this._mount_point;
          },
          set: function set(value) {
            this._mount_point = value;
          }
        }, {
          key: "move_value",
          set: function set(value) {
            this._move_value = value;
          }
        }, {
          key: "targetmove_value",
          get: function get() {
            return this._targetmove_value;
          },
          set: function set(v) {
            this._targetmove_value = v;
          }
        }, {
          key: "use_time",
          get: function get() {
            return this._use_time;
          },
          set: function set(v) {
            this._use_time = v;
          }
        }, {
          key: "warning_proportion",
          get: function get() {
            return this._warning_proportion;
          },
          set: function set(value) {
            this._warning_proportion = value;
          }
        }, {
          key: "move_type",
          get: function get() {
            return this._move_type;
          },
          set: function set(v) {
            this._move_type = v;
          }
        }, {
          key: "isUsing",
          get: function get() {
            return this._isUsing;
          }
        }, {
          key: "stopAcitons",
          get: function get() {
            return this._stopAcitons;
          },
          set: function set(v) {
            this._stopAcitons = v;
          }
        }, {
          key: "sound",
          get: function get() {
            return this._sound;
          },
          set: function set(v) {
            this._sound = v;
          }
        }, {
          key: "buff_time",
          get: function get() {
            return this._buff_time;
          },
          set: function set(v) {
            this._buff_time = v;
          }
        }]);
        return SkillVO;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SlotComponent.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Label, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Label = module.Label;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "bfe34n0TwZIDY78lhiCrSwJ", "SlotComponent", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var SlotComponent = exports('default', (_dec = ccclass("SlotComponent"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(SlotComponent, _Component);
        function SlotComponent() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "highlightNode", _descriptor, _assertThisInitialized(_this));
          // 高亮节点
          // @property(Item_prop)
          // private itemProp: Item_prop = null;
          _initializerDefineProperty(_this, "imgMore", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lblBeishu", _descriptor3, _assertThisInitialized(_this));
          _this.isActive = false;
          return _this;
        }
        var _proto = SlotComponent.prototype;
        // 当前格子是否被选中
        // 初始化
        _proto.start = function start() {
          this.updateSlotState();
          this.imgMore.active = false;
          this.lblBeishu.string = "";
        };
        _proto.setItemData = function setItemData() {}

        // 设置选中状态
        ;

        _proto.select = function select(isSelected) {
          this.isActive = isSelected;
          this.updateSlotState();
          this.imgMore.active = false;
          this.lblBeishu.string = "";
        }

        /**
         * 设置选中状态和倍数
         * @param isSelected 是否选中
         * @param beishu 倍数
         */;
        _proto.selectResult = function selectResult(isSelected, beishu) {
          this.isActive = isSelected;
          this.updateSlotState();
          this.showBeishu(beishu);
        }

        // 显示倍数
        ;

        _proto.showBeishu = function showBeishu(beishu) {
          if (beishu > 1) {
            this.imgMore.active = true;
            this.lblBeishu.string = beishu.toString();
          } else {
            this.imgMore.active = false;
            this.lblBeishu.string = "";
          }
        }

        // 更新格子的显示状态
        ;

        _proto.updateSlotState = function updateSlotState() {
          if (this.highlightNode) {
            this.highlightNode.active = this.isActive; // 控制高亮显示
          }
        }

        // 应用拖尾效果
        ;

        _proto.applyTrailEffect = function applyTrailEffect(isAccelerating, index, totalSlots) {
          if (isAccelerating) {
            // 计算后面两个格子的索引
            var nextIndex1 = (index + 1) % totalSlots;
            var nextIndex2 = (index + 2) % totalSlots;

            // 设置后面两个格子的透明度
            var nextSlot1 = this.node.parent.getChildByName("Slot" + nextIndex1);
            var nextSlot2 = this.node.parent.getChildByName("Slot" + nextIndex2);
            if (nextSlot1) {
              nextSlot1.opacity = 100; // 渐隐效果
            }

            if (nextSlot2) {
              nextSlot2.opacity = 50; // 更加渐隐效果
            }
          } else {
            // 恢复透明度
            this.node.parent.children.forEach(function (slot) {
              slot.opacity = 255; // 恢复为不透明
            });
          }
        };

        return SlotComponent;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "highlightNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgMore", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lblBeishu", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SlotController.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './SlotComponent.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Component, SlotComponent;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }, function (module) {
      SlotComponent = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _class, _class2, _descriptor;
      cclegacy._RF.push({}, "b3117Hxx5BNdqBRx5J9JMsK", "SlotController", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var SlotController = exports('default', (_dec = ccclass("SlotController"), _dec2 = property([SlotComponent]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(SlotController, _Component);
        function SlotController() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "slots", _descriptor, _assertThisInitialized(_this));
          // 存储所有格子组件
          _this.startPoint = 0;
          // 起始点索引
          _this.accelerationTime = 2;
          // 加速时间（秒）
          _this.startSpeed = 2;
          // 初始速度（格子/秒）
          _this.maxSpeed = 10;
          // 最高速度（格子/秒）
          _this.constantSpeedCircles = 5;
          // 匀速转动的圈数
          _this.decelerationTime = 3;
          // 减速时间（秒）
          _this.endPoint = 8;
          // 结束点索引
          _this.totalSlots = 11;
          // 总格子数
          _this.currentSlotIndex = 0;
          // 当前选中格子索引
          _this.onComplete = null;
          // 完成回调
          _this.timeoutIds = [];
          return _this;
        }
        var _proto = SlotController.prototype;
        // 存储所有计时器ID
        _proto.onEnable = function onEnable() {
          this.totalSlots = this.slots.length;
        }

        /**
         * 添加一个受管理的计时器
         */;
        _proto.addManagedTimeout = function addManagedTimeout(callback, delay) {
          var _this2 = this;
          var timeoutId = window.setTimeout(function () {
            callback();
            var index = _this2.timeoutIds.indexOf(timeoutId);
            if (index > -1) {
              _this2.timeoutIds.splice(index, 1);
            }
          }, delay);
          this.timeoutIds.push(timeoutId);
          return timeoutId;
        }

        /**
         * 清理所有计时器
         */;
        _proto.clearAllTimeouts = function clearAllTimeouts() {
          this.timeoutIds.forEach(function (id) {
            return clearTimeout(id);
          });
          this.timeoutIds = [];
        };
        _proto.onDestroy = function onDestroy() {
          this.clearAllTimeouts();
        }

        /**
         * 初始化配置
         * @param config 配置对象
         */;
        _proto.initialize = function initialize(config) {
          if (config.startPoint !== undefined) this.startPoint = config.startPoint;
          if (config.accelerationTime !== undefined) this.accelerationTime = config.accelerationTime;
          if (config.startSpeed !== undefined) this.startSpeed = config.startSpeed; // 设置初始速度
          if (config.maxSpeed !== undefined) this.maxSpeed = config.maxSpeed;
          if (config.constantSpeedCircles !== undefined) this.constantSpeedCircles = config.constantSpeedCircles;
          if (config.decelerationTime !== undefined) this.decelerationTime = config.decelerationTime;
          if (config.endPoint !== undefined) this.endPoint = config.endPoint;
          if (config.onComplete) this.onComplete = config.onComplete;
          this.currentSlotIndex = this.startPoint;
          this.updateSlotSelection();
        }

        /**
         * 设置开始位置
         * @param num
         */;
        _proto.setStartPoint = function setStartPoint(num) {
          this.startPoint = num;
          this.currentSlotIndex = this.startPoint;
          this.updateSlotSelection();
        }

        /**
         * 设置结束位置
         * @param num
         */;
        _proto.setEndPoint = function setEndPoint(num) {
          this.endPoint = num;
        }

        /**
         * 开始滚动
         */;
        _proto.startSpin = function startSpin() {
          this.accelerate();
        };
        _proto.instantResult = function instantResult() {
          this.currentSlotIndex = this.endPoint;
          this.updateSlotSelection();
        }

        /**
         * 加速
         */;
        _proto.accelerate = function accelerate() {
          var _this3 = this;
          console.log("\u4ECE " + this.startPoint + " \u5F00\u59CB\u52A0\u901F\uFF0C\u6301\u7EED " + this.accelerationTime + " \u79D2\uFF0C\u4ECE " + this.startSpeed + " \u52A0\u901F\u5230 " + this.maxSpeed);
          var startTime = Date.now();
          var updateInterval = function updateInterval() {
            if (!_this3.isValid) return; // 检查组件是否有效

            var elapsedTime = (Date.now() - startTime) / 1000;
            if (elapsedTime >= _this3.accelerationTime) {
              _this3.constantSpeed();
              return;
            }
            var progress = elapsedTime / _this3.accelerationTime;
            var currentSpeed = _this3.startSpeed + (_this3.maxSpeed - _this3.startSpeed) * progress;
            _this3.currentSlotIndex = (_this3.currentSlotIndex + 1) % _this3.totalSlots;
            _this3.updateSlotSelection(true);
            var nextInterval = 1000 / currentSpeed;
            _this3.addManagedTimeout(updateInterval, nextInterval);
          };
          updateInterval();
        }

        /**
         * 匀速
         */;
        _proto.constantSpeed = function constantSpeed() {
          var _this4 = this;
          if (!this.isValid) return; // 检查组件是否有效

          console.log("\u4EE5 " + this.maxSpeed + " \u7684\u901F\u5EA6\u5300\u901F\u8F6C\u52A8 " + this.constantSpeedCircles + " \u5708");
          var totalSteps = this.constantSpeedCircles * this.totalSlots;
          var currentSteps = 0;
          var updateInterval = function updateInterval() {
            if (!_this4.isValid) return;
            _this4.currentSlotIndex = (_this4.currentSlotIndex + 1) % _this4.totalSlots;
            _this4.updateSlotSelection(false);
            currentSteps++;
            // 达到了指定的圈数，切换到减速阶段
            if (currentSteps >= totalSteps) {
              _this4.decelerate();
              return;
            }
            _this4.addManagedTimeout(updateInterval, 1000 / _this4.maxSpeed);
          };
          updateInterval();
        }

        /**
         * 减速
         */;
        _proto.decelerate = function decelerate() {
          var _this5 = this;
          if (!this.isValid) return; // 检查组件是否有效

          // 计算需要走过的格子数
          var stepsToEnd = this.endPoint - this.currentSlotIndex;
          if (stepsToEnd <= 0) {
            stepsToEnd += this.totalSlots;
          }
          console.log("\u5F00\u59CB\u51CF\u901F\uFF0C\u6301\u7EED " + this.decelerationTime + " \u79D2\uFF0C\u4ECE " + this.maxSpeed + " \u51CF\u901F\uFF0C\u7ECF\u8FC7 " + stepsToEnd + " \u683C\u540E\u505C\u5728 " + this.endPoint);
          var startTime = Date.now();
          var remainingSteps = stepsToEnd;
          var finalStepsInterval = 500; // 最后几格的固定时间间隔（毫秒）
          var finalStepsCount = 3; // 最后几格的数量
          var preSlowdownCount = 3; // 提前减速的格子数

          var updateInterval = function updateInterval() {
            if (!_this5.isValid) return;
            var elapsedTime = (Date.now() - startTime) / 1000;
            if (elapsedTime >= _this5.decelerationTime || remainingSteps <= 0) {
              console.log("转动完成，停在格子:", _this5.currentSlotIndex);
              if (_this5.onComplete && _this5.isValid) {
                _this5.onComplete();
              }
              return;
            }
            _this5.currentSlotIndex = (_this5.currentSlotIndex + 1) % _this5.totalSlots;
            _this5.updateSlotSelection(false);
            remainingSteps--;

            // 计算下一次更新的时间间隔
            var nextInterval;
            if (remainingSteps <= finalStepsCount) {
              nextInterval = finalStepsInterval;
            } else if (remainingSteps <= finalStepsCount + preSlowdownCount) {
              var slowdownProgress = (remainingSteps - finalStepsCount) / preSlowdownCount;
              var transitionInterval = finalStepsInterval * 0.4; // 过渡阶段的基础间隔
              nextInterval = transitionInterval + (finalStepsInterval - transitionInterval) * (1 - slowdownProgress);
            } else {
              var progress = elapsedTime / _this5.decelerationTime;
              var speedProgress = Math.pow(1 - progress, 8);
              var currentSpeed = _this5.maxSpeed * speedProgress;
              var minSpeed = 1000 / (finalStepsInterval * 0.4);
              var effectiveSpeed = Math.max(currentSpeed, minSpeed);
              nextInterval = 1000 / effectiveSpeed;
            }
            _this5.addManagedTimeout(updateInterval, nextInterval);
          };
          updateInterval();
        }

        /**
         * 更新格子选中
         * @param isAccelerating
         */;
        _proto.updateSlotSelection = function updateSlotSelection(isAccelerating) {
          var _this6 = this;
          if (isAccelerating === void 0) {
            isAccelerating = false;
          }
          if (!this.isValid || !this.slots) return;
          this.slots.forEach(function (slot, index) {
            if (slot && slot.isValid) {
              slot.select(index === _this6.currentSlotIndex);
              slot.applyTrailEffect(isAccelerating, _this6.currentSlotIndex, _this6.slots.length);
            }
          });
        }

        // 切换到下一个格子
        ;

        _proto.nextSlot = function nextSlot() {
          this.currentSlotIndex = (this.currentSlotIndex + 1) % this.slots.length;
          this.updateSlotSelection();
        };
        return SlotController;
      }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "slots", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Soldier.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BattleDefine.ts', './RoleBase.ts', './SoldierVO.ts', './SoldierSkill.ts', './SoldierModelFrameAnimation.ts', './App.ts', './SoldierAI.ts', './BattleProprMgr.ts', './Utils.ts', './SkillVO.ts', './BattleUtil.ts', './GameConfig.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Node, UITransform, Label, Vec3, v3, UIOpacity, GameBattle, RoleBase, SoldierVO, SoldierSkill, SoldierModelFrameAnimation, App, SoldierAI, FormulaResultItem, Utils, SkillBuffTiggerTime, SkillType, BattleUtil, GameConfig;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      UITransform = module.UITransform;
      Label = module.Label;
      Vec3 = module.Vec3;
      v3 = module.v3;
      UIOpacity = module.UIOpacity;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      SoldierVO = module.SoldierVO;
    }, function (module) {
      SoldierSkill = module.SoldierSkill;
    }, function (module) {
      SoldierModelFrameAnimation = module.SoldierModelFrameAnimation;
    }, function (module) {
      App = module.App;
    }, function (module) {
      SoldierAI = module.SoldierAI;
    }, function (module) {
      FormulaResultItem = module.FormulaResultItem;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      SkillBuffTiggerTime = module.SkillBuffTiggerTime;
      SkillType = module.SkillType;
    }, function (module) {
      BattleUtil = module.BattleUtil;
    }, function (module) {
      GameConfig = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "c8d24l+QNxNy7DUHMHjPgKQ", "Soldier", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 士兵单位
       */
      var Soldier = exports('Soldier', (_dec = ccclass("Soldier"), _dec2 = property({
        type: SoldierModelFrameAnimation
      }), _dec3 = property(Node), _dec4 = property(UITransform), _dec5 = property(Label), _dec6 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_RoleBase) {
        _inheritsLoose(Soldier, _RoleBase);
        function Soldier() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleBase.call.apply(_RoleBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "view", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgYingZi", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "hitBox", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbTitle", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "uiNode", _descriptor5, _assertThisInitialized(_this));
          // 士兵类型
          _this._soldierType = GameBattle.SoldierType.None;
          // 当前兵线
          _this._currentLane = GameBattle.LanePosition.None;
          /** 当前阶数 */
          _this._currentStage = 1;
          // 当前等级
          _this._currentLevel = 1;
          // 是否觉醒
          _this._isAwakened = false;
          // 刷新CD
          _this._refreshCD = 0;
          _this._soldierAI = new SoldierAI();
          _this._isRealMonster = false;
          // 奇偶帧分组
          _this._updateGroup = 0;
          _this._tempSkillTimes = 0;
          _this._dt = 0;
          _this._AIdt = 0;
          _this._endActionNames = ["Hookend"];
          /**
           * 刷新角色朝向
           */
          _this._targetDir = new Vec3();
          return _this;
        }
        var _proto = Soldier.prototype;
        _proto._init = function _init() {
          this.view.init();
          this.view.owne = this;
          this._isDead = false;
          this.type = GameBattle.RoleType.Soldier;
          this._roleVO = new SoldierVO();
          this._roleVO.init(1, this);
          this._roleSkill = new SoldierSkill();
          this._currentLevel = 1;
          this._isAwakened = false;
          this._soldierAI.pause = false;
          this._soldierAI.stateLock = false;

          // const cfg = DBRecord.fetchId("Skill", this.roleVO.atkId);
          // this._atkSkill = new SkillVO();
          // this._atkSkill.init(cfg);
          // this._atkSkill.owner = this;

          //战斗测试临时设置viewPath
          // this._roleVO.viewPath = `gongbing`;

          this.resetSpineEvent();
        }

        /**
         * 初始化士兵数据
         */;
        _proto.initSoldierData = function initSoldierData(soldierType, baseStage, baseLevel) {
          var _this2 = this;
          console.log("Initializing soldier data...");
          this._updateGroup = Math.floor(Math.random() * 2);
          this._soldierType = soldierType;
          this._currentStage = baseStage;
          this._currentLevel = baseLevel;
          this._init();
          // this.reuse(1001);
          // this.roleVO.curHP = 10000;

          this.roleVO.initSoldierData(soldierType, baseStage, baseLevel);
          this.hpBar.owner = this;
          this.hpBar.node.active = false;
          this.roleSkill._owner = this;
          this.roleSkill.setAwakenedSkill(this.roleVO.atkId);
          this.atkSkill = this.roleSkill.awakenedSkill;
          this.updateLevelProperties();
          this.setLoadCompleted(this.soldierLoadCompleted);
          this._loadView(function () {
            _this2.isUsable = true;
            _this2.state.init(_this2.view);

            // 确保spine_body已正确初始化
            _this2.hitPos = v3(0, _this2.view.height / 2);
            var s = _this2.roleVO.size / 10000;
            _this2.imgYingZi.setScale(s, s, s);
            if (_this2.view) {
              _this2.view.node.setScale(s, s, s);
              _this2.view.isFlipX = true;
            }
            _this2._buffBox.init(_this2);
            _this2.hitBox.width = _this2.roleVO.crash_box[0] * s;
            _this2.hitBox.height = _this2.roleVO.crash_box[1] * s;
            var bodyPos = _this2.view.sprite_body.node.getPosition();
            _this2.view.sprite_body.node.setPosition(v3(bodyPos.x + _this2.roleVO.offset[0], bodyPos.y + _this2.roleVO.offset[1]));

            // 动态设置血条位置：根据Idle动画帧高度
            _this2.updateHpBarPosition();

            // 先加载AI
            // this._soldierAI.load(this);

            // 确保视图完全初始化后再设置事件处理器
            setTimeout(function () {
              _this2.resetSpineEvent();
              _this2.loadCompleted == null || _this2.loadCompleted(_this2);
            }, 1);
          });
          App.battleMgr.skillCtrl.addAtkSkill(this, this.atkSkill);
          {
            this.hitBox.node.children[0].active = GameConfig.DebugInfo.showSoldierBox;
          }
          this._lockTargetCtrl.range = this.roleVO.lockRange;
          this._lockTargetCtrl.owner = this;
          // 设置士兵的目标类型为怪物，使其能够寻找敌人
          this._lockTargetCtrl.addTargetTypes(GameBattle.RoleType.Monster);
          this._lockTargetCtrl.setChangeHandler(this._onChangeLockTarget.bind(this));
          this.addInitBuff();
        };
        _proto.soldierLoadCompleted = function soldierLoadCompleted() {
          this._soldierAI.load(this);
        };
        _proto.addInitBuff = function addInitBuff() {
          var initBuffList = this.roleVO.init_buff_id;
          if (initBuffList) {
            for (var index = 0; index < initBuffList.length; index++) {
              var element = initBuffList[index];
              this._buffBox.addBuff(element, this);
            }
          }
        };
        _proto.recovery = function recovery() {
          // this.uiNode.setParent(this.node)
          this.curSkill = null;
          this.curSkillName = "noSkill";
          if (this.view) {
            this.view.clearAllHandler();
          }
          _RoleBase.prototype.recovery.call(this);
        }

        // 移除原来的monsterLoadCompleted方法，因为功能已移至_loadView回调中
        /** 设置骨骼回调事件 */;
        _proto.resetSpineEvent = function resetSpineEvent() {
          var _this3 = this;
          // 检查view是否存在
          if (!this.view) {
            console.error("resetSpineEvent: Soldier view is not initialized!");
            return;
          }
          this.view.clearAllHandler();
          this.view.setCompleteHandler(function (trace) {
            var eventName = trace["name"];
            if (eventName === "Attack") {
              _this3._soldierAI.stateLock = false;
              if (_this3.state.isAttacking()) {
                _this3.state.exitType(GameBattle.ActionState.Attack);
                _this3.atkSkill.end();
              }
              // this._soldierAI.stateLock = true;
              // this.atkSkill.use();
            } else if (eventName === _this3.curSkillName) {
              _this3.handleSkillComplete();
              // } else if (eventName === 'Hit') {
              //     this.state.exitType(GameBattle.ActionState.Affected);
            } else if (eventName === "Dead") {
              _this3.dead();
            }
          });
          this.view.setFrameEventHandler(function (trace, _event) {
            var eventName = trace["name"];
            if (eventName === "Attack") {
              if (_this3.state.isAttacking()) {
                if (_this3.roleVO.hide === 0) {
                  _this3.node.getComponent(UIOpacity).opacity = 255;
                  _this3.roleVO.hide = 1;
                  _this3.invulnerable = false;
                }
                _this3._soldierAI.stateLock = true;
                _this3.atkSkill.use();
              }
            } else if (eventName === _this3.curSkillName) {
              if (!_this3.curSkill) {
                return;
              }
              if (_this3.roleVO.hide === 0) {
                _this3.node.uiOpacity.opacity = 255;
                _this3.roleVO.hide = 1;
                _this3.invulnerable = false;
              }
              if (_this3._isDead) {
                _this3.curSkill.end();
                _this3.state.type = GameBattle.ActionState.Dead;
                _this3._soldierAI.stateLock = false;
                return;
              }

              //一个动作多次事件
              if (_this3._endActionNames.findIndex(function (val) {
                return val === eventName;
              }) !== -1) {
                return;
              }
              _this3.doRoleSkill(_this3.curSkill, eventName, _this3.roleVO.quality, eventName, function (_data) {
                _this3.curSkill.endCD();
                _this3.curSkill.use();
              });
            } else {
              _this3._soldierAI.stateLock = false;
            }
          });
          this.view.setStartHandler(function (trace) {
            var eventName = trace["name"];
            if (eventName === "Attack") {
              _this3._soldierAI.stateLock = true;
              // this.showWarning(this.atkSkill);

              if (_this3.roleVO.hide === 0) {
                _this3.node.getComponent(UIOpacity).opacity = 255;
              }
            } else if (eventName === _this3.curSkillName) {
              if (!_this3.curSkill) {
                return;
              }
              _this3.publicSkillCd = _this3.roleVO.publicCD;
              // let [dir, targetPos] = this.showWarning(this.curSkill);
              // this.curSkill.doMoveAction(dir, targetPos);
              _this3.curSkill.createBuff(SkillBuffTiggerTime.begin);
              if (_this3.roleVO.hide === 0) {
                _this3.node.getComponent(UIOpacity).opacity = 255;
              }
            } else if (eventName === "Dead") {
              // 血条消失
              _this3.hpBar.node.active = false;
              _this3.lbTitle.node.active = false;
            }
          });
        }
        /**
         * 技能动画结束回调处理
         * @param force 强制执行
         * @returns
         */;
        _proto.handleSkillComplete = function handleSkillComplete(force) {
          if (force === void 0) {
            force = false;
          }
          if (!this.curSkill) {
            return;
          }
          //这里返回, 否则迂回和追踪技能会被打断
          if (this.curSkill && (this.curSkill.type === SkillType.YuHui || this.curSkill.type === SkillType.ZhuiZong) && !force) {
            return;
          }
          if (this._isDead) {
            this.state.exitType(GameBattle.ActionState.Skill);
            this._soldierAI.stateLock = false;
            this.curSkillName = "noSkill";
            this.curSkill.end();
            return;
          }
          this._tempSkillTimes--;
          if (this._tempSkillTimes > 0) {
            // this.state.exitType(GameBattle.ActionState.Skill)
            // this.curSkillName = ''
            this.curSkill.endAction();
            if (this.needFlip) {
              this.view.isFlipX = this.node.position.x > this.curSkill.getTarget().node.position.x;
            }
            // this.curSkill.use();
            this.state.setSkill(this.curSkill.arts_action, this.curSkill);
            // this.showWarning(this.curSkill);
            //再次开始
            return;
          }
          this.state.exitType(GameBattle.ActionState.Skill);
          this.curSkillName = "noSkill";
          this.curSkill.end();
          this._soldierAI.stateLock = false;
        };
        _proto.underAttack = function underAttack(damage, attrType, hit_effect, hit_type) {
          // if (DEBUG) {
          //     if (GameConfig.DebugInfo.monsterDmgReduce) {
          //         damage = -1;
          //     }
          //     if (GameConfig.DebugInfo.monsterDmgMax) {
          //         damage *= 1000000000;
          //     }
          // }

          if (!this.isUsable) {
            return 0;
          }
          var oweHp = _RoleBase.prototype.underAttack.call(this, damage, attrType, hit_effect, hit_type);

          // 闪白
          if (hit_type !== FormulaResultItem._sanbi) {
            Utils.flashWhite(this.view.sprite_body.node);
          }
          this.hpBar.refreshUI();
          if (this.roleVO.curHP <= 0) {
            this._soldierAI.stateLock = false;
            this.isUsable = false;
            this.dead(); // 调用死亡方法移除模型
          }

          return oweHp;
        };
        _proto._loadView = function _loadView(_onCompleted, _onFaild) {
          var _this4 = this;
          this.view.loadAnimationData(this._roleVO.viewPath, function () {
            _this4.initStateMachine();
            _onCompleted && _onCompleted();
          }, _onFaild);
        }

        /**
         * 部署士兵到指定兵线
         */;
        _proto.deployToLane = function deployToLane(lane, position) {
          this._currentLane = lane;
          this.node.position = position;
        }

        /**
         * 升级士兵
         */;
        _proto.levelUp = function levelUp() {
          if (this._currentLevel >= 5) return false;
          this._currentLevel++;
          this.updateLevelProperties();

          // 检查是否觉醒
          if (this._currentLevel >= 5 && !this._isAwakened) {
            this.awaken();
          }
          return true;
        }

        /**
         * 觉醒
         */;
        _proto.awaken = function awaken() {
          this._isAwakened = true;
          // TODO: 应用觉醒属性加成
          // TODO: 改变模型大小
          // TODO: 添加觉醒特效
        }

        /**
         * 更新等级属性
         */;
        _proto.updateLevelProperties = function updateLevelProperties() {
          // 根据当前等级应用属性加成
          var levelBonus = this.roleVO.levelBonus[this._currentLevel - 1];
        }

        /**
         * 士兵死亡
         */;
        _proto.dead = function dead() {
          _RoleBase.prototype.dead.call(this);
          this._isDead = true;
          // TODO: 通知战斗管理器处理士兵死亡
        };

        _proto.onDeadCallback = function onDeadCallback() {}

        /**
         * 获取士兵人口消耗
         */;
        _proto.getPopulationCost = function getPopulationCost() {
          return this.roleVO.basePopulationCost + (this._currentLevel - 1) * this.roleVO.populationCostPerLevel;
        }

        /**
         * 获取每次刷新的士兵数量
         */;
        _proto.getRefreshCount = function getRefreshCount() {
          var count = this.roleVO.baseRefreshCount;
          // 5阶之后增加刷新数量
          if (this._currentLevel >= 5) {
            count += this.roleVO.awakenedRefreshCountBonus;
          }
          return count;
        }

        /**
         * 更新
         */;
        _proto.onUpdate = function onUpdate(dt) {
          _RoleBase.prototype.onUpdate.call(this, dt);
          this.publicSkillCd -= dt;
          if (this.roleVO.survivaltime > 0) {
            this.roleVO.survivaltime -= dt;
            if (this.roleVO.survivaltime < 0) {
              this.roleVO.updateCurHP(0, true);
              this._soldierAI.doDead();
            }
          }
          this._dt += dt;
          if (this._dt > 1) {
            //buff属性
            this.execBattleBufferAtti();
            this._dt = 0;
          }

          //寻路降帧 大概3帧一次
          this._AIdt += dt;
          if (this._AIdt > 0.04) {
            if (!App.battleMgr.isInBattle() || App.battleMgr.getCurrentFrame() === this._updateGroup) {
              this._soldierAI.onUpdate(this._AIdt);
            }
            this._AIdt = 0;
          }
          this.detectEnemyAndAttack();
          {
            this.hitBox.node.children[0].active = GameConfig.DebugInfo.showSoldierBox || GameConfig.DebugInfo.showAllBox;
          }
        }
        /**
         * 检测周围敌人并发起攻击
         */;
        _proto.detectEnemyAndAttack = function detectEnemyAndAttack() {
          if (this._lockTargetCtrl.target && !this._lockTargetCtrl.target.isDead) {
            this._soldierAI.moveToTarget(this._lockTargetCtrl.target);
            // 检查是否有新的目标距离更近，目标变更为最近距离的
            var range = this.roleVO.lockRange[1] || 1100;
            var _enemies = this.getNearbyEnemies(range);
            if (_enemies.length > 0) {
              // 找到距离最近的敌人
              var currTarget = this._lockTargetCtrl.target;
              var monsterPos = this.node.worldPosition;
              var currDistance = currTarget ? Vec3.distance(monsterPos, currTarget.node.worldPosition) : Number.POSITIVE_INFINITY;
              var minEnemy = currTarget;
              var minDistance = currDistance;
              for (var _iterator = _createForOfIteratorHelperLoose(_enemies), _step; !(_step = _iterator()).done;) {
                var enemy = _step.value;
                if (!enemy || !enemy.node || !enemy.node.active || enemy.isDead) continue;
                var dist = Vec3.distance(monsterPos, enemy.node.worldPosition);
                if (dist < minDistance) {
                  minEnemy = enemy;
                  minDistance = dist;
                }
              }
              // 如果有更近的目标，则切换目标
              if (minEnemy !== currTarget && minEnemy !== null) {
                this._lockTargetCtrl.target = minEnemy;
              }
            }
            this._soldierAI.moveToTarget(this._lockTargetCtrl.target);
            return;
          }
          // 获取周围100范围内的我方敌人
          var enemies = this.getNearbyEnemies(1000);
          if (enemies.length > 0) {
            // 锁定第一个敌人作为目标
            var target = enemies[0];
            this.lockTargetCtrl.target = target;

            // 移动到目标点20范围并攻击
            this._soldierAI.moveToTarget(target);
          } else {
            // 如果没有敌人，执行巡逻
            this._soldierAI.patrol();
          }
        }

        /**
         * 获取周围指定范围内的我方敌人
         * @param range 检测范围
         * @returns 敌人数组
         */;
        _proto.getNearbyEnemies = function getNearbyEnemies(range) {
          var enemies = [];
          var soldierPos = this.node.worldPosition;

          // 从战斗管理器获取所有我方角色（敌人）
          // 检测怪物
          if (App.dungeonBattleMgr && App.dungeonBattleMgr.activeEnemies) {
            var monsters = App.dungeonBattleMgr.activeEnemies;
            for (var _iterator2 = _createForOfIteratorHelperLoose(monsters), _step2; !(_step2 = _iterator2()).done;) {
              var monsterArr = _step2.value;
              var monster = monsterArr[1];
              if (monster && monster.node.active && monster.isUsable && !monster.isDead) {
                var distance = Vec3.distance(soldierPos, monster.node.worldPosition);
                if (distance <= range) {
                  enemies.push(monster);
                }
              }
            }
          }

          // 按距离排序，最近的敌人排在前面
          enemies.sort(function (a, b) {
            var distA = Vec3.distance(soldierPos, a.node.worldPosition);
            var distB = Vec3.distance(soldierPos, b.node.worldPosition);
            return distA - distB;
          });
          return enemies;
        };
        _proto._updateDirection = function _updateDirection(force) {
          if (force === void 0) {
            force = false;
          }
          // 检查是否可以转向
          if (!this.state.canTurn()) return;

          // 如果是怪物且正在攻击或施法，不改变方向
          if ((this.state.isAttacking() || this.state.isSkilling()) && !force) {
            return;
          }

          // 优先使用锁定目标的方向
          var target = this._lockTargetCtrl.target;
          if (target && target.node.active && this.alwaysFaceToTarget()) {
            this._targetDir.set(target.node.worldPosition);
            this._targetDir.subtract(this.node.worldPosition).normalize();
            if (this._targetDir.y !== 0 || force) {
              var direction = BattleUtil.analysisDirection(this._targetDir);
              if (direction !== GameBattle.Direction.None) {
                this.curDirection = direction;
              }
            }
          }
          // 否则使用面向方向
          else if (this._faceDirection.y !== 0) {
            var _direction = BattleUtil.analysisDirection(this._faceDirection);
            if (_direction !== GameBattle.Direction.None) {
              this.curDirection = _direction;
            }
          }
        }

        /**
         * 是否始终面向目标
         */;
        _proto.alwaysFaceToTarget = function alwaysFaceToTarget() {
          return true;
        };
        _proto.isRealMonster = function isRealMonster() {
          return this._isRealMonster;
        }
        /**
         * 获取世界坐标系下包围盒
         * @returns
         */;
        _proto.getBoundingBoxToWorld = function getBoundingBoxToWorld() {
          return this.hitBox.getBoundingBoxToWorld();
        };
        _proto.attack = function attack() {
          _RoleBase.prototype.attack.call(this);
        };
        _proto.useSkill = function useSkill(skill) {
          _RoleBase.prototype.useSkill.call(this, skill);
          this._tempSkillTimes = skill.use_time;
        };
        _proto.doDead = function doDead() {
          this._soldierAI.stateLock = false;
          this.roleVO.curHP = 0;
          this.roleVO.updateCurHP(0, true);
          this._soldierAI.doDead();
        };
        _proto.getFirePosition = function getFirePosition(dummy_pos) {
          var skeleton = this.view.sprite_body;
          if (!dummy_pos || dummy_pos.length === 0) {
            return skeleton.node.worldPosition;
          }
          return skeleton.node.worldPosition;
        };
        _createClass(Soldier, [{
          key: "soldierType",
          get: function get() {
            return this._soldierType;
          },
          set: function set(value) {
            this._soldierType = value;
          }
        }, {
          key: "currentLane",
          get: function get() {
            return this._currentLane;
          },
          set: function set(value) {
            this._currentLane = value;
          }
        }, {
          key: "currentStage",
          get: function get() {
            return this._currentStage;
          },
          set: function set(value) {
            this._currentStage = value;
          }
        }, {
          key: "currentLevel",
          get: function get() {
            return this._currentLevel;
          },
          set: function set(value) {
            this._currentLevel = Math.max(1, Math.min(value, 5));
            this.updateLevelProperties();
          }
        }, {
          key: "isAwakened",
          get: function get() {
            return this._isAwakened;
          }
        }, {
          key: "refreshCD",
          get: function get() {
            return this._refreshCD;
          },
          set: function set(value) {
            this._refreshCD = Math.max(0, value);
          }
        }, {
          key: "roleVO",
          get: function get() {
            return this._roleVO;
          }
        }, {
          key: "roleSkill",
          get: function get() {
            return this._roleSkill;
          }
        }]);
        return Soldier;
      }(RoleBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "view", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgYingZi", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "hitBox", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "lbTitle", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "uiNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierAI.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './CommonCfgUtil.ts', './BattleDefine.ts', './BaseAi.ts', './SkillVO.ts', './GameConfig.ts', './RoleBase.ts', './AxingManager.ts', './App.ts', './RoleFSM.ts'], function (exports) {
  var _inheritsLoose, _createClass, _assertThisInitialized, cclegacy, Tween, Vec3, CommonCfgUtil, EShuoMingQuanJu, GameBattle, AI_BEHAVIOR, BaseAi, SkillType, GameConfig, RoleBase, FindPathDeepType, App, RoleFSM;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      Tween = module.Tween;
      Vec3 = module.Vec3;
    }, function (module) {
      CommonCfgUtil = module.CommonCfgUtil;
      EShuoMingQuanJu = module.EShuoMingQuanJu;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      AI_BEHAVIOR = module.AI_BEHAVIOR;
      BaseAi = module.BaseAi;
    }, function (module) {
      SkillType = module.SkillType;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      RoleBase = module.RoleBase;
    }, function (module) {
      FindPathDeepType = module.FindPathDeepType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      RoleFSM = module.RoleFSM;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a5256eHbQNBQKISpLbh/VK3", "SoldierAI", undefined);

      // Administrator:
      // 影响怪物AI行为
      // 1=木桩
      // 2=炮台
      // 3=近战莽夫
      // 4=远程莽夫

      var AI_TYPE = exports('AI_TYPE', /*#__PURE__*/function (AI_TYPE) {
        AI_TYPE[AI_TYPE["MUZHUANG"] = 1] = "MUZHUANG";
        AI_TYPE[AI_TYPE["PAOTAI"] = 2] = "PAOTAI";
        AI_TYPE[AI_TYPE["JINZHANMANGFU"] = 3] = "JINZHANMANGFU";
        AI_TYPE[AI_TYPE["YUANCHENGMANGFU"] = 4] = "YUANCHENGMANGFU";
        AI_TYPE[AI_TYPE["JINZHANWEISUO"] = 5] = "JINZHANWEISUO";
        AI_TYPE[AI_TYPE["YUANCHENGWEISUO"] = 6] = "YUANCHENGWEISUO";
        return AI_TYPE;
      }({}));
      /**
       * 士兵AI
       */
      var SoldierAI = exports('SoldierAI', /*#__PURE__*/function (_BaseAi) {
        _inheritsLoose(SoldierAI, _BaseAi);
        function SoldierAI() {
          var _this;
          _this = _BaseAi.call(this) || this;
          /** 出生点 */
          _this._homePoint = void 0;
          /** 巡逻半径 */
          _this._patrolRadius = 300;
          /** 锁敌脱战距离 */
          _this._targetDistance = 0;
          /** 出生点脱战距离 */
          _this._homeDistance = 0;
          /** 是否已脱战 */
          _this._isExitBattle = true;
          _this._roleFSM = new RoleFSM();
          _this.pursuitTime = 0;
          /** AI 类型 */
          _this._behaviors = [];
          _this._curBehavior = AI_BEHAVIOR.DAIJI;
          /** 状态检查函数 */
          _this._checkTypeFuncMap = {};
          /** 状态执行函数 */
          _this._doTypeFuncMap = {};
          _this._pause = false;
          /** 是否索敌中 */
          _this._locking = false;
          /** 是否是真实怪物 */
          // 玩家的召唤物和宠物不算真正的怪物
          _this._isRealMonster = false;
          /**
           * 状态保持
           */
          _this._stateLock = false;
          _this._curSkill = null;
          _this._testCanPursuit = -1;
          /** 共用向量 */
          _this._tempVec3 = new Vec3();
          _this._target = null;
          _this._maxLockRange = 0;
          // 相关变量
          _this._isTargetReached = false;
          _this._lastTarget = null;
          _this._frameCount = 0;
          /** 是否正在释放技能 */
          _this._isSkilling = false;
          _this.testname = ["待机", "迂回", "脱战", "跟随", "追击", "攻击", "技能", "追逐宝箱", "开宝箱", "死亡"];
          /**
           * 受击状态计时器
           */
          _this._underAttackTimer = 0;
          _this._checkTypeFuncMap[AI_BEHAVIOR.ZHUIJI] = _this.checkPursuit.bind(_assertThisInitialized(_this));
          // this._doTypeFuncMap[AI_BEHAVIOR.ZHUIJI] = this.doPursuit.bind(this);

          _this._checkTypeFuncMap[AI_BEHAVIOR.GONGJI] = _this.checkAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.GONGJI] = _this.doAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.DAIJI] = _this.doDaiji.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.SIWANG] = _this.checkDead.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.SIWANG] = _this.doDead.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.SKILL] = _this.checkSkill.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.SKILL] = _this.doSkill.bind(_assertThisInitialized(_this));
          _this._checkTypeFuncMap[AI_BEHAVIOR.UNDERATTACK] = _this.checkUnderAttack.bind(_assertThisInitialized(_this));
          _this._doTypeFuncMap[AI_BEHAVIOR.UNDERATTACK] = _this.doUnderAttack.bind(_assertThisInitialized(_this));
          return _this;
        }
        var _proto = SoldierAI.prototype;
        _proto.onUpdate = function onUpdate(dt) {
          if (this.pursuitTime > 0) {
            this.pursuitTime -= dt;
            return;
          }
          if (this.stateLock) {
            return;
          }
          if (!this._owner || this.pause) {
            return;
          }

          // 更新受击计时器
          if (this._underAttackTimer > 0) {
            this._underAttackTimer -= dt;
          }

          // 更新技能状态
          if (this._isSkilling && !this._owner.state.isSkilling()) {
            this._isSkilling = false;
          }
          var type = AI_BEHAVIOR.DAIJI;
          this._owner.behaviorFollowFlag = true;
          for (var i = this._behaviors.length; i--;) {
            var behavior = this._behaviors[i];
            var checkFunc = this._checkTypeFuncMap[behavior];
            if (checkFunc() && behavior >= this._curBehavior) {
              type = behavior;
              break;
            }
          }
          if (type === AI_BEHAVIOR.DAIJI && this._locking) {
            return;
          }
          if (type !== this._curBehavior) {
            this._curBehavior = type;
          }
          if (this._doTypeFuncMap[type]) {
            this._doTypeFuncMap[type]();
          }
        };
        _proto.load = function load(owner) {
          _BaseAi.prototype.init.call(this, owner);
          this._owner = owner;
          this._targetDistance = CommonCfgUtil.getCommonCfgValue(EShuoMingQuanJu.ExitBattleTargetDistance);
          this._homeDistance = CommonCfgUtil.getCommonCfgValue(EShuoMingQuanJu.ExitBattleHomeDistance);
          this._roleFSM.owner = owner;
          this._homePoint = this._owner.node.worldPosition.clone();
          var aiType = this._owner.roleVO.AIType;
          this._behaviors = [];
          this._testCanPursuit = -1;

          // 首先添加UNDERATTACK行为到列表开头
          this._behaviors.push(AI_BEHAVIOR.UNDERATTACK);

          // 对于不同类型的怪物，设置不同的行为优先级
          if (aiType === AI_TYPE.PAOTAI) {
            // 炮台类型优先使用技能
            this._behaviors.push(AI_BEHAVIOR.SKILL);
            if (owner.atkSkill.skillID !== 0) {
              //skillid为0则是为了不放普攻
              this._behaviors.push(AI_BEHAVIOR.GONGJI);
            }
          } else if (aiType === AI_TYPE.JINZHANMANGFU || aiType === AI_TYPE.YUANCHENGMANGFU) {
            // 莽夫类型先追击，然后是技能，最后是普通攻击
            this._behaviors.push(AI_BEHAVIOR.ZHUIJI);
            this._behaviors.push(AI_BEHAVIOR.SKILL);
            if (owner.atkSkill.skillID !== 0) {
              //skillid为0则是为了不放普攻
              this._behaviors.push(AI_BEHAVIOR.GONGJI);
            }
          } else {
            // 其他类型怪物
            this._behaviors.push(AI_BEHAVIOR.ZHUIJI);
            this._behaviors.push(AI_BEHAVIOR.SKILL);
            if (owner.atkSkill.skillID !== 0) {
              //skillid为0则是为了不放普攻
              this._behaviors.push(AI_BEHAVIOR.GONGJI);
            }
          }
          this._behaviors.push(AI_BEHAVIOR.SIWANG);
          this._locking = false;
          this._isRealMonster = owner.isRealMonster();
          if (App.battleMgr.guanQiaType === GameBattle.GuanQiaType.None) {
            this._maxLockRange = 1000000;
          } else {
            this._maxLockRange = this._owner.roleVO.lockRange[1];
          }
        }

        /**
         * 检测死亡
         */;
        _proto.checkDead = function checkDead() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          return this._owner.roleVO.curHP <= 0;
        }

        /**
         * 播放死亡动画
         */;
        _proto.doDead = function doDead() {
          this._owner.exitMove();
          Tween.stopAllByTarget(this._owner.node);
          this._owner.state.type = GameBattle.ActionState.Dead;
          this._owner.isUsable = false;
          if (this._owner.isBoss()) {
            App.battleMgr.bossIsDead = true;
          }
        }

        /**
         * 待机
         */;
        _proto.doDaiji = function doDaiji() {
          // 即使在待机状态，也要检查是否需要避让
          var avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
          if (avoidanceForce && (avoidanceForce.x !== 0 || avoidanceForce.y !== 0)) {
            // 如果有避让力，应用位置调整
            var ownerPos = this._owner.node.worldPosition;
            var newPos = ownerPos.clone().add(avoidanceForce.multiplyScalar(1.0)); // 完整应用避让力
            this._owner.node.worldPosition = newPos;
          }
          this._owner.moveDirection.set(0, 0, 0);
          this._owner.state.clearType();
        }

        /**
         * 检查重叠并返回避让力（不改变移动方向，只返回避让向量）
         */;
        _proto.checkOverlapAndGetAvoidanceForce = function checkOverlapAndGetAvoidanceForce() {
          var _this2 = this;
          var ownerPos = this._owner.node.worldPosition;
          var avoidanceRadius = 60; // 避让半径
          var avoidanceForce = new Vec3(0, 0, 0);
          var nearbyCount = 0;

          // 检查附近的友军
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            if ((entity.type === GameBattle.RoleType.Soldier || entity.type === GameBattle.RoleType.Hero) && entity.uid !== _this2._owner.uid) {
              var distance = Vec3.distance(entity.node.worldPosition, ownerPos);

              // 只在非常近的时候才推开
              if (distance < avoidanceRadius && distance > 0.1) {
                var repulsion = ownerPos.clone().subtract(entity.node.worldPosition);
                repulsion.normalize();

                // 距离越近，排斥力越大（使用更陡峭的曲线）
                var strength = (avoidanceRadius - distance) / avoidanceRadius;

                // 非常近时使用指数增强
                if (distance < 30) {
                  strength = Math.pow(strength, 2); // 平方
                  repulsion.multiplyScalar(strength * 5); // 5倍排斥力
                } else {
                  strength = Math.pow(strength, 3); // 三次方
                  repulsion.multiplyScalar(strength * 3); // 3倍排斥力
                }

                avoidanceForce.add(repulsion);
                nearbyCount++;
              }
            }
            return false;
          });
          return nearbyCount > 0 ? avoidanceForce : null;
        }

        /**
         * 攻击
         */;
        _proto.doAttack = function doAttack() {
          if (this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.isAttacking()) {
            // 即使在攻击状态，也要检查是否需要避让
            var _avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
            if (_avoidanceForce && (_avoidanceForce.x !== 0 || _avoidanceForce.y !== 0)) {
              var ownerPos = this._owner.node.worldPosition;
              var newPos = ownerPos.clone().add(_avoidanceForce.multiplyScalar(1.0));
              this._owner.node.worldPosition = newPos;
            }
            return;
          }

          // 攻击前也检查避让
          var avoidanceForce = this.checkOverlapAndGetAvoidanceForce();
          if (avoidanceForce && (avoidanceForce.x !== 0 || avoidanceForce.y !== 0)) {
            var _ownerPos = this._owner.node.worldPosition;
            var _newPos = _ownerPos.clone().add(avoidanceForce.multiplyScalar(1.0));
            this._owner.node.worldPosition = _newPos;
          }
          this._owner.updateAttackInterval();
          this._owner.exitMove();
          this._owner.state.type = GameBattle.ActionState.Attack;
          this.atkUseTime++;
          if (this._owner.needFlip) {
            this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
          }
        }
        /**
         * 检测能否攻击
         */;
        _proto.checkAttack = function checkAttack() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 先检查是否正在攻击
          if (this._owner.state.isAttacking()) {
            // 如果正在攻击，检查目标是否还有效
            if (!this.target || this.target.isDead || !this.target.checkValid()) {
              var _this$_owner$atkSkill;
              // 目标已死亡或无效，停止攻击
              this._owner.state.exitType(GameBattle.ActionState.Attack);
              (_this$_owner$atkSkill = this._owner.atkSkill) == null || _this$_owner$atkSkill.end();
              this.findNearestEnemy();
              return false;
            }
            return true;
          }
          if (this._owner.state.isSkilling()) {
            //已经在放技能了
            return false;
          }

          // 检查目标是否有效，如果目标死亡则重新寻找
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            this.findNearestEnemy();
            if (!this.target) {
              return false;
            }
          }
          var ret = this._owner.checkAttack();
          if (ret) {
            this._owner.behaviorFollowFlag = false;
          }
          return ret;
        }

        //强制技能
        ;

        _proto.forceSkill = function forceSkill(id) {
          var skill = App.battleMgr.skillCtrl.getSkill(this._owner.uid, id);
          if (!skill) return;
          if (skill.type === SkillType.YuHui) {
            skill.use();
          } else if (skill.checkUpdateUseTime()) {
            this.skillUseTime++;
          }
          this._owner.exitMove();
          this._owner.useSkill(skill);
          this._owner.state.setSkill(skill.arts_action, skill);
          this.lastSkillId = skill.skillID;
        }
        /**
         * 释放技能
         */;
        _proto.doSkill = function doSkill() {
          // 检查各种状态限制
          if (this._owner.state.isSkilling() || this._owner.state.type === GameBattle.ActionState.Dead || this._owner.state.type === GameBattle.ActionState.Skill || !this.target) {
            return;
          }
          var skill = this._curSkill;
          // 再次检查技能是否有效
          if (!skill || !skill.checkCD() || !skill.checkRange()) {
            // 如果当前技能无效，尝试获取新的可用技能
            skill = this._owner.getUsableSkill();
            if (!skill || !skill.checkCD() || !skill.checkRange()) {
              return;
            }
            this._curSkill = skill;
          }

          // 记录技能释放日志
          if (GameConfig.DebugInfo.showMonsterSkillLog) {
            console.log("\u58EB\u5175\u91CA\u653E\u6280\u80FD: " + skill.skillID + ", \u7C7B\u578B: " + SkillType[skill.type]);
          }

          // 停止移动
          this._owner.exitMove();

          // 标记为正在释放技能
          this._isSkilling = true;

          // 根据技能类型处理
          if (skill.type === SkillType.YuHui) {
            // 迂回类技能直接使用
            skill.use();
          } else {
            // 其他类型技能更新使用时间
            if (skill.checkUpdateUseTime()) {
              this.skillUseTime++;
            }

            // 播放技能预警（如果需要）
            // this._owner.showWarning(skill, () => {});
          }

          // 使用技能
          this._owner.useSkill(skill);

          // 设置技能状态和动作
          this._owner.state.setSkill(skill.arts_action, skill);

          // 记录最后使用的技能ID
          this.lastSkillId = skill.skillID;

          // 调整朝向
          if (this._owner.needFlip && this.target) {
            this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
          }

          // 清除当前技能引用
          this._curSkill = null;
        }

        /**
         * 检测能否释放技能
         */;
        _proto.checkSkill = function checkSkill() {
          // 检查战斗状态
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 重置当前技能
          this._curSkill = null;

          // 如果正在释放技能，直接返回true
          if (this._owner.state.isSkilling() || this._isSkilling) {
            return true;
          }

          // 检查是否有可用目标
          if (!this.target || !this.target.isAlive()) {
            return false;
          }

          // 获取可用技能
          var skill = this._owner.getUsableSkill();
          if (!skill) {
            return false;
          }

          // 检查技能是否在冷却中
          if (!skill.checkCD()) {
            return false;
          }

          // 检查技能是否在范围内
          if (!skill.checkRange()) {
            return false;
          }

          // 检查怪物是否可以使用技能（能量/怒气等）
          if (!this._owner.canUseSkill(skill)) {
            return false;
          }

          // 设置当前技能
          this._curSkill = skill;

          // 记录最后一次检查到的可用技能ID
          this.lastSkillId = skill.skillID;

          // 如果是迂回类技能，优先释放
          if (skill.type === SkillType.YuHui) {
            return true;
          }

          // 如果技能没有动作动画，可以直接释放，无需等待普攻结束
          if (skill.arts_action.length === 0) {
            return true;
          }

          // 有技能动作时，需要检查是否正在进行普通攻击
          // 如果正在攻击，可以等待攻击动作结束后再释放技能
          // 这里可以添加更多的策略，比如某些重要技能可以打断普通攻击
          return !this._owner.state.isAttacking();
        }

        /**
         * 脱战
         * @returns
         */;
        _proto.doExitBattle = function doExitBattle() {
          this.goHome();
        };
        /**
         * 设置受击状态
         */
        _proto.setUnderAttack = function setUnderAttack() {
          this._underAttackTimer = 0.2; // 受击状态持续0.2秒
          this._isSkilling = false;
          this._doTypeFuncMap[AI_BEHAVIOR.UNDERATTACK]();
        }

        /**
         * 检测是否处于受击状态
         */;
        _proto.checkUnderAttack = function checkUnderAttack() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果受击计时器大于0，则处于受击状态
          return this._underAttackTimer > 0;
        }

        /**
         * 执行受击动作
         */;
        _proto.doUnderAttack = function doUnderAttack() {
          if (this._owner.state.type === GameBattle.ActionState.Dead) {
            return;
          }

          // 播放受击动画
          this._owner.state.type = GameBattle.ActionState.UnderAttack;
          // 取消技能释放状态
          this._isSkilling = false;

          // 减少受击计时器
          this._underAttackTimer -= 0.016; // 假设60fps，每帧减少约0.016秒
          if (this._underAttackTimer < 0) {
            this._underAttackTimer = 0;
          }
        }

        /**
         * 检测脱战
         * @returns
         */;
        _proto.checkExitBattle = function checkExitBattle() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }
          if (this._testCanPursuit > 0) return false;
          if (this._isRealMonster) {
            //士兵索敌后只有超出脱战范围才会脱战
            var target = this._owner; //App.battleMgr.roleCtrl.player;
            if (target) {
              //有目标, 但超出了攻击范围 脱战
              this._tempVec3.set(target.node.worldPosition);
              var targetDistance = this._tempVec3.subtract(this._owner.node.worldPosition).length();
              if (targetDistance > this._targetDistance) {
                this._locking = false;
                return true;
              }
            }
          } else {
            var _target = this._owner.lockTargetCtrl.target;
            this._tempVec3.set(this._owner.node.worldPosition);
            var homeDistance = this._tempVec3.subtract(this._homePoint).length();
            if (homeDistance > this._homeDistance) {
              //不在锁敌范围里 脱战
              this._locking = false;
              return true;
            }
            if (!_target && homeDistance > 10) {
              //没有目标， 又离开了出生地 脱战
              this._locking = false;
              return true;
            }
            if (_target) {
              //有目标, 但超出了攻击范围 脱战
              this._tempVec3.set(_target.node.worldPosition);
              var _targetDistance = this._tempVec3.subtract(this._owner.node.worldPosition).length();
              if (_targetDistance > this._targetDistance) {
                this._locking = false;
                return true;
              }
            }
          }
          return false;
        }

        /**
         * 追击
         */;
        _proto.doPursuit = function doPursuit() {
          if (this.pause) {
            return;
          }

          // 检查当前目标是否有效
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            // 目标无效，重新寻找目标
            this.findNearestEnemy();
            if (!this.target) {
              // 没有找到目标，停止追击
              this._locking = false;
              return;
            }
          }

          // 计算从士兵到目标的方向向量
          var targetPos = this.target.node.worldPosition;
          var ownerPos = this._owner.node.worldPosition;
          var direction = targetPos.clone().subtract(ownerPos).normalize();

          // 添加单位避让逻辑，避免重叠
          direction = this.avoidOverlap(direction);
          this._locking = true;
          this._owner.move(direction, this._owner.getMoveActionState());
          if (this._owner.needFlip) {
            this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
          }
        }

        /**
         * 单位避让逻辑，避免与其他友军重叠
         */;
        _proto.avoidOverlap = function avoidOverlap(originalDirection) {
          var _this3 = this;
          var ownerPos = this._owner.node.worldPosition;
          var avoidanceRadius = 60; // 避让半径
          var avoidanceForce = new Vec3(0, 0, 0);
          var nearbyCount = 0;
          var hasVeryClose = false; // 是否有非常近的单位

          // 检查附近的友军
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 检查友军（士兵和英雄）
            if ((entity.type === GameBattle.RoleType.Soldier || entity.type === GameBattle.RoleType.Hero) && entity.uid !== _this3._owner.uid) {
              var distance = Vec3.distance(entity.node.worldPosition, ownerPos);

              // 如果距离小于避让半径，计算排斥力
              if (distance < avoidanceRadius && distance > 0.1) {
                var repulsion = ownerPos.clone().subtract(entity.node.worldPosition);
                repulsion.normalize();

                // 距离越近，排斥力越大（使用平方增强近距离排斥）
                var strength = (avoidanceRadius - distance) / avoidanceRadius;
                strength = strength * strength; // 平方增强

                // 如果非常近（小于30像素），标记为紧急避让
                if (distance < 30) {
                  hasVeryClose = true;
                  strength *= 2; // 双倍排斥力
                }

                repulsion.multiplyScalar(strength);
                avoidanceForce.add(repulsion);
                nearbyCount++;
              }
            }
            return false;
          });

          // 如果有附近的友军，混合原方向和避让力
          if (nearbyCount > 0) {
            avoidanceForce.normalize();

            // 根据距离动态调整权重
            var avoidWeight = hasVeryClose ? 0.7 : 0.5; // 非常近时避让权重更高
            var targetWeight = 1.0 - avoidWeight;
            var finalDirection = originalDirection.clone().multiplyScalar(targetWeight).add(avoidanceForce.multiplyScalar(avoidWeight));
            finalDirection.normalize();
            return finalDirection;
          }
          return originalDirection;
        }
        /**
         * 检测能否追击
         */;
        _proto.checkPursuit = function checkPursuit() {
          if (!App.battleMgr.isInBattle()) {
            return false;
          }

          // 如果没有目标，尝试寻找最近的敌人
          if (!this.target || this.target.isDead || !this.target.checkValid()) {
            this.findNearestEnemy();
          }

          // 如果还是没有目标，不追击
          if (!this.target) {
            return false;
          }
          var distance = Vec3.distance(this.target.node.worldPosition, this._owner.node.worldPosition);

          // 有目标且距离大于攻击范围且不在攻击/释放技能中就追击
          var ret = distance > this._owner.roleVO.pursuerange && !this._owner.state.isAttacking() && !this._owner.checkCanUseSkill();
          if (ret) {
            this._owner.behaviorFollowFlag = false;
          }
          return ret;
        }

        /**
         * 寻找最近的敌人目标（士兵攻击怪物）
         */;
        _proto.findNearestEnemy = function findNearestEnemy() {
          var _this4 = this;
          var closestEnemy = null;
          var minDistance = Number.MAX_VALUE;
          App.battleMgr.roleCtrl.foreachEntity(this, function (entity) {
            // 士兵只寻找怪物类型
            if (entity.type === GameBattle.RoleType.Monster) {
              if (entity.checkValid() && !entity.isDead) {
                var distance = Vec3.distance(entity.node.worldPosition, _this4._owner.node.worldPosition);
                if (distance < minDistance) {
                  minDistance = distance;
                  closestEnemy = entity;
                }
              }
            }
            return false;
          });

          // 更新锁定目标
          this._owner.lockTargetCtrl.target = closestEnemy;
        }

        /**
         * 返回领地
         */;
        _proto.goHome = function goHome() {
          return;
        }

        /**
         * 巡逻
         */;
        _proto.patrol = function patrol() {
          // 只有不在攻击状态且没有目标时才能巡逻
          if (this._owner.state.isAttacking() || this.target) {
            return;
          }

          // 获取出生点位置（通常就是_homePoint，如果没有则用当前节点位置初始化）
          if (!this._homePoint) {
            if (this._owner && this._owner.node) {
              this._homePoint = this._owner.node.worldPosition.clone();
            } else {
              return;
            }
          }

          // 只要Y位置低于1095（有浮点误差缓冲），就持续向出生点Y(最大不超过1100)靠近，否则转换为待机
          var ownerPos = this._owner.node.worldPosition;
          var birthY = 1100;

          // 如果已经到达了目标y区域（比如靠近等于1100以内5像素），切为待机
          if (ownerPos.y >= birthY - 5) {
            // 切换为待机状态（如果已有方法可用，可调整如下）
            if (this._owner.state && this._owner.state.type !== GameBattle.ActionState.Idle) {
              this._owner.state.type = GameBattle.ActionState.Idle;
            }
            // 停止可能的移动
            if (typeof this._owner.exitMove === "function") {
              this._owner.exitMove();
            }
            return;
          }
          this._isTargetReached = false;
          this._locking = true;
          // 向出生点Y方向移动，x坐标不变
          var patrolTarget = ownerPos.clone();
          patrolTarget.y = birthY;
          this.moveToTarget(patrolTarget);
        }

        /**
         * 移动到目标点100范围并攻击（主函数）
         * @param target 目标角色或目标位置
         */;
        _proto.moveToTarget = function moveToTarget(target) {
          if (target instanceof Vec3 && (target.x >= GameBattle.BattleScope.big_x || target.y >= 1160 || target.x <= GameBattle.BattleScope.min_x || target.y <= 0)) {
            return;
          }
          this._frameCount++;

          // 检查基本条件
          if (!this._checkBasicConditions()) {
            return;
          }

          // 检查目标有效性并获取目标位置
          var targetPos = this._getTargetPosition(target);
          if (!targetPos) {
            return;
          }

          // 检查目标是否变化
          if (this._lastTarget !== target) {
            this._lastTarget = target;
            // 重置到达标志
            this._isTargetReached = false;
          }
          // 计算到目标的距离
          var distance = Vec3.distance(this._owner.node.worldPosition, targetPos);
          // 获取停止距离（技能攻击范围）
          var stopDistance = this._owner.roleVO.pursuerange;
          if (this._owner.atkSkill && this._owner.atkSkill.distance) {
            stopDistance = this._owner.atkSkill.distance[1] || this._owner.roleVO.pursuerange;
          }

          // 检查是否到达目标位置
          if (distance <= stopDistance) {
            // 到达目标位置，停止移动并攻击
            this._handleTargetReached(target);
            return;
          }

          // 执行实际的移动逻辑
          this._executeMoveLogic(target, targetPos);
        }

        /**
         * 检查基本条件
         */;
        _proto._checkBasicConditions = function _checkBasicConditions() {
          if (!this._owner || this.pause || !App.battleMgr.isInBattle()) {
            return false;
          }
          return true;
        }

        /**
         * 获取目标位置
         */;
        _proto._getTargetPosition = function _getTargetPosition(target) {
          if (target instanceof Vec3) {
            return target;
          } else {
            // 如果是角色对象，获取其世界位置
            if (!target || !target.node) {
              return null;
            }
            return target.node.worldPosition;
          }
        }

        /**
         * 执行实际的移动逻辑
         */;
        _proto._executeMoveLogic = function _executeMoveLogic(target, targetPos) {
          if (target instanceof Vec3) {
            this._moveToTargetPosition(target, targetPos);
            return;
          }
          // 计算到目标的距离
          var distance = Vec3.distance(this._owner.node.worldPosition, targetPos);
          var max = this._owner.atkSkill.checkRange() ? this._owner.atkSkill.distance[1] : 100;
          // 如果距离大于100，向目标移动
          if (distance > max) {
            this._isTargetReached = false;
            this._moveToTargetPosition(target, targetPos);
          } else {
            // 距离小于等于100，停止移动并攻击
            this._handleTargetReached(target);
          }
        }

        /**
         * 向目标位置移动
         */;
        _proto._moveToTargetPosition = function _moveToTargetPosition(target, targetPos) {
          if (target instanceof Vec3) {
            this._handleZeroVectorMove(target, targetPos);
            return;
          }
          // 使用getMoveVector获取正确的移动方向向量
          var pos = App.mapMgr.getMoveVector(this._owner.node.worldPosition, targetPos, false, this._owner.findPathUseMaxDeep() ? FindPathDeepType.Boss : FindPathDeepType.Normal);

          // 如果getMoveVector返回零向量，直接控制怪物位置向目标移动
          if (target instanceof RoleBase && pos.x === 0 && pos.y === 0) {
            this._handleZeroVectorMove(target, targetPos);
          } else if (pos.x !== 0 || pos.y !== 0) {
            this._handleNormalMove(target, pos);
          } else {
            this._owner.exitMove();
          }
        }

        /**
         * 处理零向量移动情况
         */;
        _proto._handleZeroVectorMove = function _handleZeroVectorMove(target, targetPos) {
          if (!this._owner || !this._owner.node) return;
          // 计算从士兵到目标的方向向量
          // const ownerPos = this._owner.node.worldPosition;
          // let direction = targetPos.clone().subtract(ownerPos).normalize();

          // // 添加单位避让逻辑，避免重叠
          // direction = this.avoidOverlap(direction);

          // this._locking = true;
          // this._owner.move(direction, this._owner.getMoveActionState());
          // if (this._owner.needFlip) {
          //     this._owner.view.isFlipX = this._owner.node.position.x < this.target.node.position.x;
          // }
          // 计算移动方向
          var dirX = targetPos.x - this._owner.node.worldPosition.x;
          var dirY = targetPos.y - this._owner.node.worldPosition.y;
          var length = Math.sqrt(dirX * dirX + dirY * dirY);
          if (length > 0.1) {
            if (this._owner.state.isAttacking()) {
              this._owner.exitMove();
              return;
            }
            this._locking = true;
            // 只有当有实际移动时才播放移动动画
            // 直接设置移动状态，确保播放移动动画
            if (this._owner.state.type !== GameBattle.ActionState.Move) {
              this._owner.state.type = GameBattle.ActionState.Move;
            }

            // 根据移动速度计算每帧移动距离（像素/秒 * 秒 = 像素）
            // const moveSpeed = this._owner.roleVO._moveSpeed; // 每秒移动的像素数
            // const moveStep = Math.min(length, moveSpeed * this._dt); // 本帧实际移动距离

            // // 计算新位置
            // const newX = this._owner.node.worldPosition.x + (dirX / length) * moveStep;
            // const newY = this._owner.node.worldPosition.y + (dirY / length) * moveStep;

            // // 直接设置位置
            // this._owner.node.worldPosition = new Vec3(newX, newY, 0);

            // // 设置朝向
            // if (this._owner.needFlip && target instanceof RoleBase) {
            //     this._owner.view.isFlipX = this._owner.node.position.x < target.node.position.x;
            // }
            // 计算从士兵到目标的方向向量
            var ownerPos = this._owner.node.worldPosition;
            var direction = targetPos.clone().subtract(ownerPos).normalize();

            // 添加单位避让逻辑，避免重叠
            direction = this.avoidOverlap(direction);
            this._owner.move(direction, this._owner.getMoveActionState());
            if (this._owner.needFlip && this.target) {
              this._owner.view.isFlipX = this._owner.node.position.x > this.target.node.position.x;
            }
          } else {
            // 距离目标太近，退出移动状态
            this._owner.exitMove();
          }
        }

        /**
         * 处理正常移动情况
         */;
        _proto._handleNormalMove = function _handleNormalMove(target, pos) {
          this._locking = true;
          var ownerPos = this._owner.node.worldPosition;
          var direction = pos.clone().subtract(ownerPos).normalize();
          this._owner.move(direction, this._owner.getMoveActionState());
          if (this._owner.needFlip && target instanceof RoleBase) {
            this._owner.view.isFlipX = this._owner.node.position.x > target.node.position.x;
          }
        }

        /**
         * 处理到达目标的情况
         */;
        _proto._handleTargetReached = function _handleTargetReached(target) {
          this._owner.exitMove();
          this._isTargetReached = true;

          // 如果目标是角色对象，设置为锁定目标
          if (target instanceof RoleBase) {
            this._owner.lockTargetCtrl.target = target;
          }

          // 执行攻击
          if (this._owner.lockTargetCtrl.target && this._owner.atkSkill && this._owner.atkSkill.skillID !== 0 && !this._owner.state.isAttacking() && !this._owner.state.isSkilling()) {
            this.doAttack();
          }
        };
        _createClass(SoldierAI, [{
          key: "pause",
          get: function get() {
            return this._pause;
          },
          set: function set(value) {
            this._pause = value;
            if (value) {
              this.doDaiji();
            }
          }
        }, {
          key: "stateLock",
          get: function get() {
            return this._stateLock;
          },
          set: function set(v) {
            this._stateLock = v;
          }
        }, {
          key: "target",
          get: function get() {
            this._target = this._owner.lockTargetCtrl.target;
            return this._target;
          },
          set: function set(value) {
            this._target = value;
          }
        }]);
        return SoldierAI;
      }(BaseAi));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierAvatarItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './TeamMgr.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Node, Label, Component, DBRecord, TeamMgr, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      Component = module.Component;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
      cclegacy._RF.push({}, "868ec7VlI1HBKzQE2wpK5DO", "SoldierAvatarItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var SoldierAvatarItem = exports('SoldierAvatarItem', (_dec = ccclass("SoldierAvatarItem"), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Sprite
      }), _dec6 = property({
        type: Node
      }), _dec7 = property({
        type: Label
      }), _dec8 = property({
        type: Node
      }), _dec9 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(SoldierAvatarItem, _Component);
        function SoldierAvatarItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 头像品质框 */
          _initializerDefineProperty(_this, "headBg", _descriptor, _assertThisInitialized(_this));
          /** 头像框 */
          _initializerDefineProperty(_this, "headIcon", _descriptor2, _assertThisInitialized(_this));
          /** 头像锁定 */
          _initializerDefineProperty(_this, "lockSp", _descriptor3, _assertThisInitialized(_this));
          /** 添加士兵+号标识 */
          _initializerDefineProperty(_this, "addSp", _descriptor4, _assertThisInitialized(_this));
          /** 士兵等级节点 */
          _initializerDefineProperty(_this, "lvNode", _descriptor5, _assertThisInitialized(_this));
          /** 士兵等级 */
          _initializerDefineProperty(_this, "lvLab", _descriptor6, _assertThisInitialized(_this));
          /** 士兵阶级节点 */
          _initializerDefineProperty(_this, "stageNode", _descriptor7, _assertThisInitialized(_this));
          /** 士兵阶级 */
          _initializerDefineProperty(_this, "stageLabel", _descriptor8, _assertThisInitialized(_this));
          _this._pos = 0;
          _this._currFormation = 0;
          _this._isLocked = false;
          _this._onTouchCb = null;
          _this._data = void 0;
          return _this;
        }
        var _proto = SoldierAvatarItem.prototype;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          this.node.on(Node.EventType.TOUCH_END, function () {
            if (_this2._onTouchCb) {
              _this2._onTouchCb(_this2, _this2._data);
            }
          });
        };
        _proto.onDestroy = function onDestroy() {
          this.node.off(Node.EventType.TOUCH_END, this._onTouchCb, this);
        };
        _proto.show = function show(data, pos, index) {
          var _this3 = this;
          this._data = data;
          if (pos) {
            this._pos = pos;
            this._currFormation = index;
            var cfgs = DBRecord.fetchKvs("Biandui", {
              type: 2
            });
            var posCfg = null;
            cfgs.forEach(function (element) {
              if (element.sort === _this3._pos) {
                posCfg = element;
                return;
              }
            });
            this._isLocked = this.lockSp.enabled = posCfg.locksodier && posCfg.locksodier > 0;
            if (data && data.id && data.id > 0) {
              //获取英雄数据更新相关信息
              this.lvNode.active = true;
              this.stageNode.active = true;
              this.addSp.node.active = false;
              this.headIcon.enabled = true;
              var soldier = TeamMgr.inst.getSoldierById(data.id);
              UtilGame.loadSoldierHeadIcon(this.headIcon, data.id);
              this.lvLab.string = soldier.level + "\u7EA7";
              this.stageLabel.string = soldier.stage + "\u9636";
            } else {
              this.lvNode.active = false;
              this.stageNode.active = false;
              this.addSp.node.active = true;
              this.headIcon.enabled = false;
            }
          }
        };
        _proto.onTouchCellBack = function onTouchCellBack(cb) {
          var _this4 = this;
          if (cb) {
            this._onTouchCb = function () {
              return cb(_this4, _this4._data);
            };
          } else {
            this._onTouchCb = undefined;
          }
        };
        return SoldierAvatarItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "headBg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "headIcon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lockSp", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "addSp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "lvNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lvLab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "stageNode", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "stageLabel", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierModelFrameAnimation.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModelFrameAnimation.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ModuleDef, ModelFrameAnimation;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModelFrameAnimation = module.ModelFrameAnimation;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "b7fb1u0BIxNEoNrB9cLu0vQ", "SoldierModelFrameAnimation", undefined);
      var ccclass = _decorator.ccclass;
      var SoldierModelFrameAnimation = exports('SoldierModelFrameAnimation', (_dec = ccclass("SoldierModelFrameAnimation"), _dec(_class = /*#__PURE__*/function (_ModelFrameAnimation) {
        _inheritsLoose(SoldierModelFrameAnimation, _ModelFrameAnimation);
        function SoldierModelFrameAnimation() {
          return _ModelFrameAnimation.apply(this, arguments) || this;
        }
        var _proto = SoldierModelFrameAnimation.prototype;
        /**
         * 加载士兵动画数据
         */
        _proto.loadAnimationData = /*#__PURE__*/
        function () {
          var _loadAnimationData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, onCompleted, onFaild) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  try {
                    // 初始化组件
                    this.init();
                    // 设置动画相关属性
                    this.animationName = path;
                    this.moduleType = ModuleDef.SOLDIER;
                    onCompleted && onCompleted();
                  } catch (error) {
                    console.error("Failed to load soldier animation data", error);
                    onFaild && onFaild(error);
                  }
                case 1:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function loadAnimationData(_x, _x2, _x3) {
            return _loadAnimationData.apply(this, arguments);
          }
          return loadAnimationData;
        }();
        return SoldierModelFrameAnimation;
      }(ModelFrameAnimation)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierModelSpine.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModelSpine.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, UITransform, ModelSpine;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UITransform = module.UITransform;
    }, function (module) {
      ModelSpine = module.ModelSpine;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "1d32b8WAqdG2JP+7fKQKJSY", "SoldierModelSpine", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var SoldierModelSpine = exports('SoldierModelSpine', (_dec = ccclass("SoldierModelSpine"), _dec(_class = /*#__PURE__*/function (_ModelSpine) {
        _inheritsLoose(SoldierModelSpine, _ModelSpine);
        function SoldierModelSpine() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ModelSpine.call.apply(_ModelSpine, [this].concat(args)) || this;
          /** 是否翻转 */
          _this._isFlipX = false;
          return _this;
        }
        var _proto = SoldierModelSpine.prototype;
        // 重写setFrameEventHandler方法，确保直接作用到spine_body组件
        _proto.setFrameEventHandler = function setFrameEventHandler(handler) {
          if (this.spine_body) {
            this.spine_body.setFrameEventHandler(handler);
          }
          // 同时调用父类方法以确保兼容性
          _ModelSpine.prototype.setFrameEventHandler.call(this, handler);
        }

        // 重写setStartHandler方法，确保直接作用到spine_body组件
        ;

        _proto.setStartHandler = function setStartHandler(handler) {
          if (this.spine_body) {
            this.spine_body.setStartHandler(handler);
          }
          _ModelSpine.prototype.setStartHandler.call(this, handler);
        }

        // 重写setCompleteHandler方法，确保直接作用到spine_body组件
        ;

        _proto.setCompleteHandler = function setCompleteHandler(handler) {
          if (this.spine_body) {
            this.spine_body.setCompleteHandler(handler);
          }
          _ModelSpine.prototype.setCompleteHandler.call(this, handler);
        }

        // 重写clearAllHandler方法，确保直接作用到spine_body组件
        ;

        _proto.clearAllHandler = function clearAllHandler() {
          if (this.spine_body) {
            this.spine_body.clearAllHandler();
          }
          _ModelSpine.prototype.clearAllHandler.call(this);
        };
        _proto.init = function init() {
          _ModelSpine.prototype.init.call(this); // 调用父类的init方法
          this._parts = [];
          if (this.spine_body) {
            this._parts.push(this.spine_body);
          }
        };
        _proto.loadSkeletonData = function loadSkeletonData(data) {
          var _this2 = this;
          var cur = 0;
          var max = 0;
          var fnUpdateProgress = function fnUpdateProgress() {
            cur++;
            if (cur === max) {
              if (_this2.node) {
                _this2.node.getComponent(UITransform).width = _this2.spine_body.getComponent(UITransform).width;
                _this2.node.getComponent(UITransform).height = _this2.spine_body.getComponent(UITransform).height;
              }
              data.onComplete();
            }
          };
          if (typeof data.body === "string") max++;
          if (this.spine_body) {
            this.spine_body.loadSoldierSkeletonData(data.body, function () {
              fnUpdateProgress();
            }, function () {});
          }
        }

        /**
         * 是否有动画名
         */;
        _proto.hasAnimation = function hasAnimation(name) {
          if (!this.spine_body || !this.spine_body.skeleton || !this.spine_body.skeleton.skeletonData) {
            return false;
          }
          var animsEnum = this.spine_body.skeleton.skeletonData.getAnimsEnum();
          return !!animsEnum[name];
        };
        _proto.clearSpine = function clearSpine() {
          if (this.spine_body && this.spine_body.skeleton) {
            this.spine_body.skeleton.skeletonData = null;
          }
        };
        _createClass(SoldierModelSpine, [{
          key: "isFlipX",
          get: function get() {
            return this._isFlipX;
          },
          set: function set(v) {
            v = !!v;
            if (this._isFlipX === v) return;
            this._isFlipX = v;
            if (v) {
              this.node.setScale(-this.node.scale.x, this.node.scale.y, this.node.scale.z);
            } else {
              this.node.setScale(Math.abs(this.node.scale.x), this.node.scale.y, this.node.scale.z);
            }
          }
        }]);
        return SoldierModelSpine;
      }(ModelSpine)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierSkill.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RoleSkill.ts', './SkillVO.ts', './App.ts', './DBRecord.ts', './BattleProprMgr.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, cclegacy, RoleSkill, SkillVO, App, DBRecord, BattlePropertyName;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      RoleSkill = module.RoleSkill;
    }, function (module) {
      SkillVO = module.SkillVO;
    }, function (module) {
      App = module.App;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }],
    execute: function () {
      cclegacy._RF.push({}, "7b254329FZFPY8GrujhlzJr", "SoldierSkill", undefined);

      /**
       * 士兵技能管理器
       */
      var SoldierSkill = exports('SoldierSkill', /*#__PURE__*/function (_RoleSkill) {
        _inheritsLoose(SoldierSkill, _RoleSkill);
        function SoldierSkill() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleSkill.call.apply(_RoleSkill, [this].concat(args)) || this;
          // 觉醒技能
          _this._awakenedSkill = null;
          // 技能触发概率
          _this._skillTriggerProbability = 0.1;
          return _this;
        }
        var _proto = SoldierSkill.prototype;
        // 10%概率触发
        /**
         * 设置觉醒技能
         */
        _proto.setAwakenedSkill = function setAwakenedSkill(skillId) {
          var cfg = DBRecord.fetchId("Skill", skillId);
          this._awakenedSkill = new SkillVO();
          this._awakenedSkill.init(cfg);
          this.awakenedSkill.owner = this._owner;
        }

        /**
         * 尝试触发技能（在普通攻击时有概率触发）
         */;
        _proto.tryTriggerSkill = function tryTriggerSkill() {
          if (!this._awakenedSkill || !this._owner) {
            return false;
          }

          // 检查是否可以使用技能
          // if (!this._awakenedSkill.canUse()) {
          //     return false;
          // }

          // 随机判断是否触发
          if (Math.random() > this._skillTriggerProbability) {
            return false;
          }

          // 触发技能
          this.triggerSkill(this._awakenedSkill);
          return true;
        }

        /**
         * 触发技能
         */;
        _proto.triggerSkill = function triggerSkill(skill) {
          if (!this._owner) return;

          // 播放技能动画
          this.playSkillAnimation(skill);

          // 获取技能目标
          var targets = this.getSkillTargets(skill);
          if (targets.length === 0) {
            return;
          }

          // 对每个目标应用技能效果
          for (var _iterator = _createForOfIteratorHelperLoose(targets), _step; !(_step = _iterator()).done;) {
            var target = _step.value;
            // 计算伤害
            var damage = this.calculateSkillDamage(skill, target);

            // 应用伤害
            target.hurt(damage, this._owner);

            // 应用buff
            this.applySkillBuffs(skill, target);
          }

          // 播放技能特效
          this.playSkillEffect(skill);

          // 开始技能冷却
          skill.startCD();
        }

        /**
         * 播放技能动画
         */;
        _proto.playSkillAnimation = function playSkillAnimation(skill) {
          if (!this._owner) return;

          // TODO: 播放技能动画
        }

        /**
         * 获取技能目标
         */;
        _proto.getSkillTargets = function getSkillTargets(skill) {
          var targets = [];
          if (!this._owner) return targets;

          // 根据技能类型和范围获取目标
          var roleCtrl = App.battleMgr.roleCtrl;
          var position = this._owner.node.position;

          // TODO: 根据技能的目标类型、范围、数量等获取有效的目标

          return targets;
        }

        /**
         * 计算技能伤害
         */;
        _proto.calculateSkillDamage = function calculateSkillDamage(skill, target) {
          if (!this._owner) return 0;

          // 基础伤害 = 攻击力 * 技能系数
          var damage = this._owner.roleVO.getRoleAttr(BattlePropertyName.gongji) * skill.damageFactor;

          // 考虑目标防御
          if (target.roleVO.def > 0) {
            damage = damage * (damage / (damage + target.roleVO.def));
          }
          return Math.floor(damage);
        }

        /**
         * 应用技能buff
         */;
        _proto.applySkillBuffs = function applySkillBuffs(skill, target) {
          // TODO: 应用技能附带的buff效果
        }

        /**
         * 播放技能特效
         */;
        _proto.playSkillEffect = function playSkillEffect(skill) {
          // TODO: 播放技能特效
        }

        /**
         * 更新技能CD
         */;
        _proto.update = function update(dt) {
          if (this._awakenedSkill) {
            this._awakenedSkill.onUpdate(dt);
          }
        };
        _createClass(SoldierSkill, [{
          key: "awakenedSkill",
          get: function get() {
            return this._awakenedSkill;
          }
        }]);
        return SoldierSkill;
      }(RoleSkill));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierSpawnMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './TeamMgr.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Component, App, TeamMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "a165bO9aNdMcqtnCk9XZFhl", "SoldierSpawnMgr", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 兵种配置接口
       */

      /**
       * 士兵生成管理器
       * 负责管理己方士兵的刷新、CD、人口等
       */
      var SoldierSpawnMgr = exports('SoldierSpawnMgr', (_dec = ccclass("SoldierSpawnMgr"), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(SoldierSpawnMgr, _Component);
        function SoldierSpawnMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          // 兵种配置
          _this._soldierConfigs = new Map([]);
          // 刷新CD计时器
          _this._spawnCdTimers = new Map();
          // 当前存活士兵数量
          _this._currentPopulation = new Map();
          // 士气系统引用
          _this._moraleSystem = null;
          // 创建士兵回调
          _this._createSoldierCallback = null;
          // 检查军令回调
          _this._checkArmyTokenCallback = null;
          // 消耗军令回调
          _this._consumeArmyTokenCallback = null;
          return _this;
        }
        var _proto = SoldierSpawnMgr.prototype;
        /**
         * 初始化士兵生成管理器
         */
        _proto.init = function init(params) {
          this._moraleSystem = params.moraleSystem;
          this._createSoldierCallback = params.createSoldierCallback;
          this._checkArmyTokenCallback = params.checkArmyTokenCallback;
          this._consumeArmyTokenCallback = params.consumeArmyTokenCallback;
          this.reset();
        }

        /**
         * 更新
         */;
        _proto.update = function update(deltaTime) {
          var _this2 = this;
          if (App.battleMgr.pause) return;
          // 更新所有兵种的CD计时器
          this._soldierConfigs.forEach(function (config, soldierType) {
            if (!_this2._spawnCdTimers.has(soldierType)) {
              _this2._spawnCdTimers.set(soldierType, 0);
            }
            var currentCd = _this2._spawnCdTimers.get(soldierType);
            if (currentCd > 0) {
              currentCd -= deltaTime;
              if (currentCd < 0) currentCd = 0;
              _this2._spawnCdTimers.set(soldierType, currentCd);
            } else {
              _this2._spawnCdTimers.set(soldierType, 0);
              // const lane: number = Math.ceil(Math.random() * 3);
              _this2.spawnSoldier(soldierType, 2);
            }
          });
        }

        /**
         /**
          * 生成士兵
          */;
        _proto.spawnSoldier = function spawnSoldier(soldierType, lane, isManual) {
          if (isManual === void 0) {
            isManual = false;
          }
          // 检查兵种是否已激活
          if (!this._moraleSystem.isSoldierTypeActivated(soldierType)) {
            return false;
          }
          var config = this._soldierConfigs.get(soldierType);
          if (!config) {
            App.log.logBusiness("Config not found for soldier type " + soldierType);
            return false;
          }

          // 检查CD是否就绪
          var currentCd = this._spawnCdTimers.get(soldierType) || 0;
          if (currentCd > 0 && !isManual) {
            return false;
          }
          // 获取兵种阶级
          var soldierStage = this._moraleSystem.getSoldierStage(soldierType);

          // 检查人口是否已满
          var currentCount = this._currentPopulation.get(soldierType) || 0;
          var maxPopulation = this.getSoldierMaxCount(soldierType);
          if (currentCount >= maxPopulation) {
            return false;
          }

          // 计算本次生成数量
          var spawnCount = this.calculateSpawnCount(soldierType, soldierStage);

          // 检查生成后是否会超过人口上限
          if (currentCount + spawnCount > maxPopulation) {
            // 调整生成数量
            var adjustedCount = maxPopulation - currentCount;
            if (adjustedCount <= 0) {
              return false;
            }

            // 生成士兵
            this.doSpawnSoldiers(soldierType, lane, soldierStage, adjustedCount);
          } else {
            // 生成士兵
            this.doSpawnSoldiers(soldierType, lane, soldierStage, spawnCount);
          }

          // 重置CD
          if (!isManual) {
            this._spawnCdTimers.set(soldierType, config.spawnCd);
          }
          return true;
        }

        /**
         * 执行士兵生成
         */;
        _proto.doSpawnSoldiers = function doSpawnSoldiers(soldierType, lane, stage, count) {
          var _this3 = this;
          for (var i = 0; i < count; i++) {
            // 添加随机延迟，避免同时生成的士兵重叠（1-2秒）
            var randomDelay = 1.0 + Math.random() * 1.0;
            var totalDelay = i * 0.2 + randomDelay;
            this.scheduleOnce(function () {
              var soldier = _this3._createSoldierCallback(soldierType, lane, stage);
              if (soldier) {
                // 增加人口计数
                var currentCount = _this3._currentPopulation.get(soldierType) || 0;
                _this3._currentPopulation.set(soldierType, currentCount + 1);

                // 设置死亡回调
                // soldier.onDeadCallback = () => {
                //     this.onSoldierDead(soldierType);
                // };
              }
            }, totalDelay);
          }
        }

        /**
         * 计算生成数量
         */;
        _proto.calculateSpawnCount = function calculateSpawnCount(soldierType, stage) {
          var stageCfg = TeamMgr.inst.getSoldierStageCfg(soldierType, stage);
          return stageCfg.membernum;
        }

        /**
         * 获取兵种CD剩余时间
         */;
        _proto.getSoldierCd = function getSoldierCd(soldierType) {
          return this._spawnCdTimers.get(soldierType) || 0;
        }

        /**
         * 获取兵种当前数量
         */;
        _proto.getSoldierCount = function getSoldierCount(soldierType) {
          return this._currentPopulation.get(soldierType) || 0;
        }

        /**
         * 获取兵种最大数量
         */;
        _proto.getSoldierMaxCount = function getSoldierMaxCount(soldierType) {
          var stage = this._moraleSystem.getSoldierStage(soldierType);
          if (stage <= 0) {
            return 0;
          }
          return TeamMgr.inst.getSoldierStageCfg(soldierType, stage).population;
        }

        /**
         * 检查是否可以生成士兵
         */;
        _proto.canSpawnSoldier = function canSpawnSoldier(soldierType, stage) {
          // 检查兵种是否已激活
          if (!this._moraleSystem.isSoldierTypeActivated(soldierType)) {
            return false;
          }
          var config = this._soldierConfigs.get(soldierType);
          if (!config) {
            return false;
          }

          // 检查CD
          var currentCd = this._spawnCdTimers.get(soldierType) || 0;
          if (currentCd > 0) {
            return false;
          }

          // 检查人口
          var currentCount = this._currentPopulation.get(soldierType) || 0;
          var maxCount = this.calculateSpawnCount(soldierType, stage);
          return currentCount < maxCount;
        };
        _proto.activateSoldierType = function activateSoldierType(soldierType) {
          this._moraleSystem.activateSoldierType(soldierType);
        }

        /**
         * 重置管理器
         */;
        _proto.reset = function reset() {
          var _this4 = this;
          // 重置CD计时器
          this._spawnCdTimers.clear();

          // 重置人口计数
          this._currentPopulation.clear();

          // 初始化所有兵种的CD为0
          this._soldierConfigs.forEach(function (config, soldierType) {
            _this4._spawnCdTimers.set(soldierType, 0);
            _this4._currentPopulation.set(soldierType, 0);
          });
        }

        /**
         * 设置兵种配置
         */;
        _proto.setSoldierConfig = function setSoldierConfig(soldierType, config) {
          this._soldierConfigs.set(soldierType, config);
        };
        return SoldierSpawnMgr;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoldierVO.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './RoleBaseVO.ts', './BattleDefine.ts', './BattleProprMgr.ts', './DBRecord.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, RoleBaseVO, GameBattle, BattlePropertyName, DBRecord;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      RoleBaseVO = module.RoleBaseVO;
    }, function (module) {
      GameBattle = module.GameBattle;
    }, function (module) {
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      DBRecord = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "72b3cMrH45Dq4pD2zMhUwmz", "SoldierVO", undefined);

      /**
       * 等级加成数据
       */

      /**
       * 士兵数据模型
       */
      var SoldierVO = exports('SoldierVO', /*#__PURE__*/function (_RoleBaseVO) {
        _inheritsLoose(SoldierVO, _RoleBaseVO);
        function SoldierVO() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _RoleBaseVO.call.apply(_RoleBaseVO, [this].concat(args)) || this;
          /** 士兵类型 */
          _this.soldierType = GameBattle.SoldierType.None;
          /** 基础阶级 */
          _this.baseStage = 1;
          /** 基础等级 */
          _this.baseLevel = 1;
          /** 基础攻击力 */
          _this.baseAtk = 0;
          /** 基础防御力 */
          _this.baseDef = 0;
          /** 基础最大生命值 */
          _this.baseMaxHp = 0;
          /** 基础移动速度 */
          _this.baseSpeed = 0;
          /** 刷新CD */
          _this.refreshCD = 10;
          /** 人口消耗 */
          _this.basePopulationCost = 1;
          /** 每级增加的人口消耗 */
          _this.populationCostPerLevel = 0;
          /** 基础刷新数量 */
          _this.baseRefreshCount = 1;
          /** 觉醒后刷新数量加成 */
          _this.awakenedRefreshCountBonus = 1;
          /** 等级加成 */
          _this.levelBonus = [];
          /**免疫吸附、拉怪 */
          _this.immuneDrag = false;
          _this.title = "";
          _this.jop = void 0;
          /** 名称 */
          _this._name = "";
          _this._definition = void 0;
          /** 进度值 */
          _this._progress = 0;
          /** 大小值 */
          _this._size = 0;
          /**
           * 存活时间
           */
          _this._survivaltime = -1;
          /**
           * 是否可选中
           */
          _this._selected = void 0;
          /**
           * 隐身
           */
          _this._hide = void 0;
          /**
           * 体型
           */
          _this._body_size = 1;
          /**
           * 是否可选中
           */
          _this._res_skin = "";
          _this._publicCD = 0;
          _this._hpHeight = 0;
          /** 士兵编号 */
          _this._id = 0;
          return _this;
        }
        var _proto = SoldierVO.prototype;
        _proto.init = function init(id, owner) {
          this.id = id;
          this._owner = owner;
        }

        /**
         * 初始化士兵数据
         */;
        _proto.initSoldierData = function initSoldierData(soldierType, baseStage, baseLevel) {
          this.soldierType = soldierType;
          this.baseLevel = baseLevel;
          this.baseStage = baseStage;

          // 从配置表中加载士兵基础数据
          this.loadSoldierConfig();

          // 初始化等级加成数据
          this.initLevelBonus();
          this.udtInitAttr(this.battleAttrList);
        }

        /**
         * 从配置表加载士兵数据
         */;
        _proto.loadSoldierConfig = function loadSoldierConfig() {
          var _this$_lockRange, _this$_skillIDList, _DBRecord$fetchId, _this$crash_box;
          // this.udtInitAttr();
          // TODO: 从配置表中获取士兵基础数据
          // 这里根据不同兵种设置不同的基础属性
          switch (this.soldierType) {
            case GameBattle.SoldierType.Infantry:
              this.baseAtk = 50;
              this.baseDef = 30;
              this.baseMaxHp = 300;
              this.baseSpeed = 80;
              this.refreshCD = 5000;
              this.basePopulationCost = 1;
              this.baseRefreshCount = 1;
              break;
            case GameBattle.SoldierType.Archer:
              this.baseAtk = 80;
              this.baseDef = 10;
              this.baseMaxHp = 150;
              this.baseSpeed = 70;
              this.refreshCD = 6000;
              this.basePopulationCost = 1;
              this.baseRefreshCount = 1;
              break;
            case GameBattle.SoldierType.Cavalry:
              this.baseAtk = 120;
              this.baseDef = 20;
              this.baseMaxHp = 250;
              this.baseSpeed = 120;
              this.refreshCD = 8000;
              this.basePopulationCost = 2;
              this.baseRefreshCount = 1;
              break;
            case GameBattle.SoldierType.Mage:
              this.baseAtk = 150;
              this.baseDef = 5;
              this.baseMaxHp = 100;
              this.baseSpeed = 60;
              this.refreshCD = 7000;
              this.basePopulationCost = 2;
              this.baseRefreshCount = 1;
              break;
            case GameBattle.SoldierType.Shield:
              this.baseAtk = 30;
              this.baseDef = 50;
              this.baseMaxHp = 400;
              this.baseSpeed = 65;
              this.refreshCD = 6000;
              this.basePopulationCost = 1;
              this.baseRefreshCount = 1;
              break;
          }
          this._hpHeight = 90;
          var type_cfg = DBRecord.fetchId("Soldier", this.soldierType);
          this.jop = type_cfg.job;
          var stage_id = this.jop * 1000 + this.baseStage;
          var level_id = this.jop * 1000 + this.baseLevel;
          var stage_cfg = DBRecord.fetchId("Soldier_Stage", stage_id);
          var level_cfg = DBRecord.fetchId("Soldier_Level", level_id);
          this._offset = type_cfg.offset;
          this._moveSpeed = level_cfg.movespeed;
          (_this$_lockRange = this._lockRange).push.apply(_this$_lockRange, type_cfg.lockrange);
          this._quality = 1;
          this._viewPath = type_cfg.res; //`/Monster/${cfg.res}/${cfg.res}`;
          // this._viewPath = cfg.res;
          this._progress = 1; //cfg.progress;
          this._pursuerange = type_cfg.pursuerange;
          this._selected = -1; //cfg.selected;
          this._hide = -1; //cfg.hide;
          this._body_size = type_cfg.size;
          this._curHP = level_cfg.max_hp; //this.getRoleAttr(BattlePropertyName.shengming);

          this._skillIDList = [];
          this.atkId = stage_cfg.atk_id;
          stage_cfg.skill_id && (_this$_skillIDList = this._skillIDList).push.apply(_this$_skillIDList, stage_cfg.skill_id);
          this.AIType = 0; //type_cfg.job;
          // let style = DBRecord.fetchId("DuoYuYan", cfg.style)?.cn || "";
          var name = ((_DBRecord$fetchId = DBRecord.fetchId("DuoYuYan", type_cfg.name)) == null ? void 0 : _DBRecord$fetchId.cn) || "";
          this._publicCD = -1; //cfg.publicCD ?? -1;
          this._init_buff_id = [];
          // if (cfg.init_buff_id) {
          //     this._init_buff_id.push(...cfg.init_buff_id);
          // }

          this._name = name;
          this.title = "" + name;
          var jineng_cfg = DBRecord.fetchId("Skill", stage_cfg.atk_id);
          this._atkInterval = jineng_cfg.CD;
          this._size = type_cfg.size;
          this.lockOrientation = -1; //cfg.lockOrientation;

          //初始化战斗属性列表
          //战斗
          var attItem_atk = {
            id: BattlePropertyName.gongji,
            value: level_cfg.atk
          };
          //防御
          var attItem_def = {
            id: BattlePropertyName.fangyu,
            value: level_cfg.def
          };

          //最大生命
          var attItem_hp = {
            id: BattlePropertyName.shengming,
            value: level_cfg.max_hp
          };

          //攻速
          var attItem_atk_interval = {
            id: BattlePropertyName.gongsu,
            value: 0
          };

          //移速
          var attItem_moveSpeed = {
            id: BattlePropertyName.yisu,
            value: level_cfg.movespeed
          };

          //易伤
          var attItem_yishang = {
            id: BattlePropertyName.yishang,
            value: 0
          };
          this.battleAttrList.push(attItem_atk);
          this.battleAttrList.push(attItem_def);
          this.battleAttrList.push(attItem_hp);
          this.battleAttrList.push(attItem_atk_interval);
          this.battleAttrList.push(attItem_moveSpeed);
          this.battleAttrList.push(attItem_yishang);
          this.crash_box = [60, 130];
          type_cfg.crash_box && (_this$crash_box = this.crash_box).push.apply(_this$crash_box, type_cfg.crash_box);
          // this.hpHeight = cfg.lifebar;
          // this.immuneDrag = cfg.immune_drag > 0;

          // 初始化当前属性
          // this.atk = this.baseAtk;
          // this.def = this.baseDef;
          // this.maxHp = this.baseMaxHp;
          // this.hp = this.maxHp;
          // this.speed = this.baseSpeed;
        }

        /**
         * 初始化等级加成数据
         */;
        _proto.initLevelBonus = function initLevelBonus() {
          // 每阶的属性加成
          this.levelBonus = [{
            atkMultiplier: 1.0,
            defMultiplier: 1.0,
            hpMultiplier: 1.0,
            speedMultiplier: 1.0
          },
          // 1阶
          {
            atkMultiplier: 1.2,
            defMultiplier: 1.2,
            hpMultiplier: 1.2,
            speedMultiplier: 1.0
          },
          // 2阶
          {
            atkMultiplier: 1.5,
            defMultiplier: 1.5,
            hpMultiplier: 1.5,
            speedMultiplier: 1.0
          },
          // 3阶
          {
            atkMultiplier: 1.8,
            defMultiplier: 1.8,
            hpMultiplier: 1.8,
            speedMultiplier: 1.0
          },
          // 4阶
          {
            atkMultiplier: 2.0,
            defMultiplier: 2.0,
            hpMultiplier: 2.0,
            speedMultiplier: 1.1
          } // 5阶（觉醒）
          ];
        };

        _createClass(SoldierVO, [{
          key: "name",
          get: function get() {
            return this._name;
          },
          set: function set(v) {
            this._name = v;
          }
        }, {
          key: "definition",
          get: function get() {
            return this._definition;
          },
          set: function set(value) {
            this._definition = value;
          }
        }, {
          key: "progress",
          get: function get() {
            return this._progress;
          },
          set: function set(v) {
            this._progress = v;
          }
        }, {
          key: "size",
          get: function get() {
            return this._size;
          },
          set: function set(v) {
            this._size = v;
          }
        }, {
          key: "survivaltime",
          get: function get() {
            return this._survivaltime;
          },
          set: function set(value) {
            this._survivaltime = value;
          }
        }, {
          key: "selected",
          get: function get() {
            return this._selected;
          },
          set: function set(value) {
            this._selected = value;
          }
        }, {
          key: "hide",
          get: function get() {
            return this._hide;
          },
          set: function set(value) {
            this._hide = value;
          }
        }, {
          key: "body_size",
          get: function get() {
            return this._body_size;
          },
          set: function set(value) {
            this._body_size = value;
          }
        }, {
          key: "res_skin",
          get: function get() {
            return this._res_skin;
          },
          set: function set(value) {
            this._res_skin = value;
          }
        }, {
          key: "publicCD",
          get: function get() {
            return this._publicCD;
          },
          set: function set(value) {
            this._publicCD = value;
          }
        }, {
          key: "hpHeight",
          get: function get() {
            return this._hpHeight;
          }
        }, {
          key: "id",
          get: function get() {
            return this._id;
          },
          set: function set(v) {
            this._id = v;
          }
        }]);
        return SoldierVO;
      }(RoleBaseVO));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoundDef.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "9e5c9c1NfpLp7V55BUPxK7p", "SoundDef", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-11-13 11:20:02
       * @FilePath: \CodeB\assets\script\def\SoundDef.ts
       * @LastEditors: xiehande www.xiehande@qq.com
       * @LastEditTime: 2025-12-22 14:41:51
       * @Description: 音乐音效定义
       */

      var MusicDef = exports('MusicDef', function MusicDef() {});
      MusicDef.Sound_BGM_Login = "main_bgm";
      var SoundDef = exports('SoundDef', function SoundDef() {});
      SoundDef.Sound_Audio_CommonButton1 = "Sound_Audio_CommonButton1";
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoundEffect.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, AudioClip, error, AudioSource, ModuleDef, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      AudioClip = module.AudioClip;
      error = module.error;
      AudioSource = module.AudioSource;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "62889nXW4RHB7FsxkgEIQKI", "SoundEffect", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu;

      /**
       * 注：用playOneShot播放的音乐效果，在播放期间暂时没办法即时关闭音乐
       */

      /** 游戏音效 */
      var SoundEffect = exports('SoundEffect', (_dec = ccclass("AudioMusic"), _dec(_class = /*#__PURE__*/function (_AudioSource) {
        _inheritsLoose(SoundEffect, _AudioSource);
        function SoundEffect() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _AudioSource.call.apply(_AudioSource, [this].concat(args)) || this;
          _this.effects = new Map();
          return _this;
        }
        var _proto = SoundEffect.prototype;
        /**
         * 加载音效并播放
         * @param url           音效资源地址
         * @param callback      资源加载完成并开始播放回调
         */
        _proto.load = function load(url, callback) {
          var _this2 = this;
          url = "sound/" + url;
          if (this.effects.has(url)) {
            var cachedClip = this.effects.get(url);
            this.playOneShot(cachedClip, this.volume);
            callback && callback();
            return;
          }
          App.resMgr.loadAsset(ModuleDef.AUDIO, url, AudioClip, null, function (err, data) {
            if (err) {
              error(err);
              return;
            }
            _this2.effects.set(url, data);
            _this2.playOneShot(data, _this2.volume);
            callback && callback();
          });
        }

        /**
         * 加载音效并播放
         * @param url           音效资源地址
         * @param callback      资源加载完成并开始播放回调
         */;
        _proto.load2 = function load2(url, callback) {
          var _this3 = this;
          url = "sound/" + url;
          if (this.effects.has(url)) {
            var cachedClip = this.effects.get(url);
            this.stop();
            this.clip = cachedClip;
            this.play();
            callback && callback();
            return;
          }
          App.resMgr.loadAsset(ModuleDef.AUDIO, url, AudioClip, null, function (err, data) {
            if (err) {
              error(err);
              return;
            }
            _this3.effects.set(url, data);
            _this3.stop();
            _this3.clip = data;
            _this3.play();
            callback && callback();
          });
        }

        /** 释放所有已使用过的音效资源 */;
        _proto.release = function release() {
          for (var key in this.effects) {
            App.resMgr.release(key, ModuleDef.AUDIO);
          }
          this.effects.clear();
        };
        return SoundEffect;
      }(AudioSource)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoundMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './SoundEffect.ts', './SoundMusic.ts', './DBRecord.ts', './GameConfig.ts', './App.ts'], function (exports) {
  var _createClass, cclegacy, SoundEffect, SoundMusic, DBRecord, GameConfig, App;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      SoundEffect = module.SoundEffect;
    }, function (module) {
      SoundMusic = module.SoundMusic;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      GameConfig = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "022ffB70DpNeIn9klv9Dg4u", "SoundMgr", undefined);

      /**
       * 音频管理
       * @example
       */
      var SoundMgr = exports('SoundMgr', /*#__PURE__*/function () {
        function SoundMgr() {
          this.music = void 0;
          this.effect = void 0;
          this._volume_music = 1;
          this._volume_effect = 1;
          this._switch_music = true;
          this._switch_effect = true;
          this._playingSounds = new Map();
          this._maxConcurrentSounds = 10;
          this._clearTime = 1000;
        }
        var _proto = SoundMgr.prototype;
        /**
         * 获取boss音乐id
         * @param diMao 地图id
         * @returns
         */
        _proto.getBossMusicId = function getBossMusicId(diMao) {
          var configs = DBRecord.fetchKvs("YinXiao", {
            type: 4
          });
          for (var index = 0; index < configs.length; index++) {
            var element = configs[index];
            if (element.subtype === diMao) {
              return element.id;
            }
          }
          return 40001;
        }

        /**
         * 获取战斗副本音乐id
         * @param diMao 地图id
         * @returns
         */;
        _proto.getBattleMusicId = function getBattleMusicId(diMao) {
          var configs = DBRecord.fetchKvs("YinXiao", {
            type: 3
          });
          for (var index = 0; index < configs.length; index++) {
            var element = configs[index];
            if (element.subtype === diMao) {
              return element.id;
            }
          }
          return 30001;
        }

        /**
         * 播放背景音乐
         * @param url        资源地址
         * @param callback   音乐播放完成事件
         */;
        _proto.playMusic = function playMusic(url, callback) {
          var _this = this;
          // if (this.music) {
          //     this.music.stop();
          // }
          App.resMgr.LoadAudio(this.music, "music/" + url, false, function () {
            if (!_this._switch_music) {
              _this.music.stop();
            } else {
              _this.music.play();
            }
            if (callback) callback();
          });
          this.music.loop = true;
        }

        /**
         * 根据配置播放背景音乐
         * @param url        资源地址
         * @param callback   音乐播放完成事件
         */;
        _proto.playMusicById = function playMusicById(sId, callback) {
          var _this2 = this;
          var config = DBRecord.fetchId("YinXiao", sId);
          if (config) {
            // if (this.music) {
            //     this.music.stop();
            // }
            App.resMgr.LoadAudio(this.music, "music/" + config.sound, false, function () {
              if (!_this2._switch_music) {
                _this2.music.stop();
              }
              if (callback) callback();
            });
            if (config.time === -1) {
              this.music.loop = true;
            } else {
              this.music.loop = false;
            }
          }
        }

        /**
         * 预加载背景音乐
         * @param sId 音乐ID
         * @param callback 加载完成回调
         */;
        _proto.preloadMusic = function preloadMusic(sId, callback) {
          var _this3 = this;
          var config = DBRecord.fetchId("YinXiao", sId);
          if (config) {
            App.resMgr.LoadAudio(this.music, "music/" + config.sound, false, function () {
              _this3.music.stop();
              if (callback) {
                callback();
              }
            });
          } else {
            if (callback) {
              callback();
            }
          }
        }

        /**
         * 根据配置播放音效
         * @param sId        YinXiao表ID
         */;
        _proto.playEffectById = function playEffectById(sId) {
          var config = DBRecord.fetchId("YinXiao", sId);
          if (config) this.playUIEffect(config.sound);
        }

        /**
         * 获取背景音乐音量
         */;
        /**
         * 播放战斗音效（只用于战斗技能使用）
         * @param url 资源地址
         */
        _proto.playEffect = function playEffect(url) {
          if (!this._switch_effect) return;
          var currentTime = Date.now();
          var lastPlayTime = this._playingSounds.get(url) || 0;
          this.cleanUpOldSounds();
          // 检查是否超过最大同时播放数量
          if (this._playingSounds.size >= this._maxConcurrentSounds) {
            if (GameConfig.DebugInfo.showSoundEffectLog) {
              console.log("\u97F3\u6548\u64AD\u653E\u8FBE\u5230\u4E0A\u9650: " + url);
            }
            return;
          }

          // 检查音效去重时间间隔（例如200毫秒
          if (currentTime - lastPlayTime < 200) {
            if (GameConfig.DebugInfo.showSoundEffectLog) {
              console.log("\u97F3\u6548\u64AD\u653E\u8FC7\u4E8E\u9891\u7E41: " + url);
            }
            return;
          }
          this._playingSounds.set(url, currentTime);
          this.effect.load(url);
        }

        /**
         * 播放UI音效
         * @param url 资源地址
         */;
        _proto.playUIEffect = function playUIEffect(url) {
          if (this._switch_effect) {
            this.effect.load(url);
          }
        }

        /**
         * 播放UI音效
         * @param url 资源地址
         */;
        _proto.playUIEffect2 = function playUIEffect2(url) {
          if (this._switch_effect) {
            this.effect.load2(url);
          }
        }

        /**
         * 强制播放UI音效 忽略开关
         * @param url 资源地址
         */;
        _proto.playUIEffectForce = function playUIEffectForce(url) {
          this.effect.load(url);
        }

        /**
         * 获取音效音量
         */;
        /** 恢复当前暂停的音乐与音效播放 */
        _proto.resumeAll = function resumeAll() {
          if (this.music && this._switch_music) {
            this.effect.play();
          }
          if (this.effect && this._switch_effect) {
            this.effect.play();
          }
        }

        /** 暂停当前音乐与音效的播放 */;
        _proto.pauseAll = function pauseAll() {
          if (this.music) {
            this.music.pause();
            this.effect.pause();
          }
        }

        /** 停止当前音乐与音效的播放 */;
        _proto.stopAll = function stopAll() {
          if (this.music) {
            this.music.stop();
            this.effect.stop();
          }
        }

        /** 保存音乐音效的音量、开关配置数据到本地 */;
        _proto.save = function save() {
          // this.local_data.volume_music = this._volume_music;
          // this.local_data.volume_effect = this._volume_effect;
          // this.local_data.switch_music = this._switch_music;
          // this.local_data.switch_effect = this._switch_effect;
          // let data = JSON.stringify(this.local_data);
          // App.saveDataMgr.set(LOCAL_STORE_KEY.sound, data);
        }

        /** 本地加载音乐音效的音量、开关配置数据并设置到游戏中 */;
        _proto.init = function init(root) {
          this.music = root.getComponent(SoundMusic) || root.addComponent(SoundMusic);
          this.effect = root.getComponent(SoundEffect) || root.addComponent(SoundEffect);
          this.music.loop = true;

          // this.music.volume = App.mixManager.getGameSet('nMusic');
          // this.effect.volume = App.mixManager.getGameSet('nVoice');
          // this._switch_music = App.mixManager.getGameSet('bMusic');
          // this._switch_effect = App.mixManager.getGameSet('bVoice');

          if (!this._switch_music) this.music.stop();

          // let data = App.saveDataMgr.get(LOCAL_STORE_KEY.sound);
          // if (data) {
          //     try {
          //         this.local_data = JSON.parse(data);
          //         this._volume_music = this.local_data.volume_music;
          //         this._volume_effect = this.local_data.volume_effect;
          //         this._switch_music = this.local_data.switch_music;
          //         this._switch_effect = this.local_data.switch_effect;
          //     } catch (e) {
          //         this.local_data = {};
          //         this._volume_music = 1;
          //         this._volume_effect = 1;
          //         this._switch_music = true;
          //         this._switch_effect = true;
          //     }
          //     if (this.music) this.music.volume = this._volume_music;
          //     if (this.effect) this.effect.volume = this._volume_effect;
          //     //----可优化----
          //     //根据策划配表，或者固定的登录页背景音乐或者游戏主背景音乐，先在这里循环播放。进主界面或者进战斗界面等，再切换背景音乐。
          // }
        }

        /**
         * 清理过期的音效记录
         */;
        _proto.cleanUpOldSounds = function cleanUpOldSounds() {
          var _this4 = this;
          var currentTime = Date.now();
          this._playingSounds.forEach(function (time, soundName) {
            if (currentTime - time > _this4._clearTime) {
              _this4._playingSounds["delete"](soundName);
            }
          });
        }

        /**
         * 清除所有战斗音效
         */;
        _proto.clearAllBattleSound = function clearAllBattleSound() {
          this._playingSounds.clear();
        };
        _createClass(SoundMgr, [{
          key: "volumeMusic",
          get: function get() {
            return this._volume_music;
          }
          /**
           * 设置背景音乐音量
           * @param value     音乐音量值
           */,
          set: function set(value) {
            this._volume_music = value;
            this.music.volume = value;
          }

          /**
           * 获取背景音乐开关值
           */
        }, {
          key: "switchMusic",
          get: function get() {
            return this._switch_music;
          }
          /**
           * 设置背景音乐开关值
           * @param value     开关值
           */,
          set: function set(value) {
            this._switch_music = value;
            if (value === false) this.music.stop();else if (value === true) this.music.play();
          }
        }, {
          key: "volumeEffect",
          get: function get() {
            return this._volume_effect;
          }
          /**
           * 设置获取音效音量
           * @param value     音效音量值
           */,
          set: function set(value) {
            this._volume_effect = value;
            this.effect.volume = value;
          }

          /**
           * 获取音效开关值
           */
        }, {
          key: "switchEffect",
          get: function get() {
            return this._switch_effect;
          }
          /**
           * 设置音效开关值
           * @param value     音效开关值
           */,
          set: function set(value) {
            this._switch_effect = value;
            if (value === false) this.effect.stop();
          }
        }]);
        return SoundMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SoundMusic.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _createClass, cclegacy, _decorator, AudioClip, error, AudioSource, ModuleDef, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      AudioClip = module.AudioClip;
      error = module.error;
      AudioSource = module.AudioSource;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "c569ct400JD5K2xJG6lq/Jq", "SoundMusic", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu;

      /** 背景音乐 */
      var SoundMusic = exports('SoundMusic', (_dec = ccclass("AudioMusic"), _dec(_class = /*#__PURE__*/function (_AudioSource) {
        _inheritsLoose(SoundMusic, _AudioSource);
        function SoundMusic() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _AudioSource.call.apply(_AudioSource, [this].concat(args)) || this;
          /** 背景音乐播放完成回调 */
          _this.onComplete = null;
          _this._progress = 0;
          _this._url = null;
          _this._isPlay = false;
          return _this;
        }
        var _proto = SoundMusic.prototype;
        /**
         * 加载音乐并播放
         * @param url          音乐资源地址
         * @param callback     加载完成回调
         */
        _proto.load = function load(url, callback) {
          var _this2 = this;
          url = "music/" + url;
          App.resMgr.loadAsset(ModuleDef.AUDIO, url, AudioClip, null, function (err, data) {
            if (err) {
              error(err);
              return;
            }
            if (_this2.playing) {
              _this2._isPlay = false;
              _this2.stop();
            }
            if (_this2._url) {
              App.resMgr.release(_this2._url, ModuleDef.AUDIO);
            }
            _this2.enabled = true;
            _this2.clip = data;

            // 注：事件定义在这里，是为了在播放前设置初始播放位置数据
            callback && callback();
            _this2.play();
            _this2._url = url;
          });
        }

        /** cc.Component 生命周期方法，验证背景音乐播放完成逻辑，建议不要主动调用 */;
        _proto.update = function update(dt) {
          if (this.currentTime > 0) {
            this._isPlay = true;
          }
          if (this._isPlay && this.playing === false) {
            this._isPlay = false;
            this.enabled = false;
            this.onComplete && this.onComplete();
          }
        }

        /** 释放当前背景音乐资源 */;
        _proto.release = function release() {
          if (this._url) {
            App.resMgr.release(this._url, ModuleDef.AUDIO);
            this._url = null;
          }
        };
        _createClass(SoundMusic, [{
          key: "progress",
          get: /** 获取音乐播放进度 */
          function get() {
            if (this.duration > 0) this._progress = this.currentTime / this.duration;
            return this._progress;
          }
          /**
           * 设置音乐当前播放进度
           * @param value     进度百分比0到1之间
           */,
          set: function set(value) {
            this._progress = value;
            this.currentTime = value * this.duration;
          }
        }]);
        return SoundMusic;
      }(AudioSource)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SpineFlashWhiteComp.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, sp, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      sp = module.sp;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "71184kzZH9P5rhQtrSn/Iiu", "SpineFlashWhiteComp", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * Spine动画闪白组件
       */
      var SpineFlashWhiteComp = exports('SpineFlashWhiteComp', (_dec = ccclass('SpineFlashWhiteComp'), _dec(_class = /*#__PURE__*/function (_Component) {
        _inheritsLoose(SpineFlashWhiteComp, _Component);
        function SpineFlashWhiteComp() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _this.duration = 0.5;
          _this.median = 0;
          _this.time = 0;
          _this.materia = null;
          _this.skeleton = null;
          return _this;
        }
        var _proto = SpineFlashWhiteComp.prototype;
        _proto.onLoad = function onLoad() {
          this.median = this.duration * 0.5;
          this.skeleton = this.node.getComponent(sp.Skeleton);
          this.materia = this.skeleton.customMaterial;
          this.materia.setProperty('u_rate', 1);
        };
        _proto.update = function update(dt) {
          if (this.time > 0) {
            this.time -= dt;
            this.time = this.time < 0 ? 0 : this.time;
            var rate = Math.abs(this.time - this.median) * 2 / this.duration;
            {
              //@ts-ignore
              var cache = this.skeleton._materialCache;
              for (var i in cache) {
                var tempMateria = cache[i];
                tempMateria.setProperty('u_rate', rate);
              }
              if (this.time == 0) {
                this.flashComplete();
              }
            }
          }
        };
        _proto.flashComplete = function flashComplete() {
          if (this.skeleton.customMaterial != null) {
            this.skeleton.customMaterial.destroy();
            this.skeleton.customMaterial = null;
          }
        };
        _proto.execute = function execute(cusTime) {
          this.time = cusTime;
        };
        return SpineFlashWhiteComp;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SpineMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './BaseSpine.ts', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, sp, Node, ModuleDef, BaseSpine, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      sp = module.sp;
      Node = module.Node;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      BaseSpine = module.BaseSpine;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "70cd79rJe1LOLTBkvtQgh3O", "SpineMgr", undefined);

      /**spine的数据格式 */

      /**spine的回调函数格式 */

      /**回调类型 */
      var spine_call_back_enum = exports('spine_call_back_enum', /*#__PURE__*/function (spine_call_back_enum) {
        spine_call_back_enum[spine_call_back_enum["start"] = 0] = "start";
        spine_call_back_enum[spine_call_back_enum["event"] = 1] = "event";
        spine_call_back_enum[spine_call_back_enum["end"] = 2] = "end";
        spine_call_back_enum[spine_call_back_enum["complete"] = 3] = "complete";
        return spine_call_back_enum;
      }({}));
      var SpineMgr = exports('SpineMgr', /*#__PURE__*/function () {
        function SpineMgr() {}
        var _proto = SpineMgr.prototype;
        _proto.init = function init() {};
        _proto.create = function create(url, onCompleted, onFaild) {
          App.resMgr.loadAsset(ModuleDef.SPINE, url, sp.SkeletonData, null, function (err, res) {
            if (err) {
              onFaild == null || onFaild(err);
            }
            var node = new Node();
            var skeleton = node.addComponent(sp.Skeleton);
            skeleton.skeletonData = res;
            var spine = node.addComponent(BaseSpine);
            onCompleted == null || onCompleted(spine);
          });
        }
        /**
         * 播放单个动画，默认是循环动画
         * @param sp sp.Skeleton组件节点
         * @param spineData spine的数据格式
         * @param callBack 回调函数
         */;
        _proto.playAnimation = function playAnimation(sp, spineData) {
          sp.clearAnimations();
          if (spineData.skinName) sp.setSkin(spineData.skinName);
          sp.setAnimation(spineData.trackIndex, spineData.animationName, spineData.isLoop);
          if (spineData.callBackData && spineData.callBackData.callBack) {
            switch (spineData.callBackData.type) {
              case spine_call_back_enum.start:
                sp.setStartListener(function () {
                  spineData.callBackData.callBack();
                });
                break;
              case spine_call_back_enum.event:
                sp.setEventListener(function () {
                  spineData.callBackData.callBack();
                });
                break;
              case spine_call_back_enum.end:
                sp.setEndListener(function () {
                  spineData.callBackData.callBack();
                });
                break;
              case spine_call_back_enum.complete:
                sp.setCompleteListener(function () {
                  spineData.callBackData.callBack();
                });
                break;
            }
          }
        }

        /**
         * 添加融合动画
         * @param sp sp.Skeleton组件节点
         * @param animationName 动画名称
         * @param isLoop 是否循环，默认为true
         */;
        _proto.addAnimation = function addAnimation(sp, animationName, isLoop) {
          if (isLoop === void 0) {
            isLoop = true;
          }
          // 添加的通道索引
          var trackIndex = sp.getState().tracks.length;
          sp.setAnimation(trackIndex, animationName, isLoop);
        }

        /**
         * 清除单一动画
         * @param sp sp.Skeleton组件节点
         * @param animationName 清除的动画名称
         */;
        _proto.clearAnimation = function clearAnimation(sp, animationName) {
          var tracks = sp.getState().tracks;
          for (var _iterator = _createForOfIteratorHelperLoose(tracks), _step; !(_step = _iterator()).done;) {
            var value = _step.value;
            if (!!value && value.animation.name === animationName) {
              sp.clearAnimation(value.trackIndex);
              break;
            }
          }
        }

        /**
         * 清除所有动画
         * @param sp sp.Skeleton组件节点
         */;
        _proto.clearAnimations = function clearAnimations(sp) {
          sp.clearAnimations();
        };
        return SpineMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SpineRunner.ts", ['cc'], function () {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "bf38dwcND9AMbYIaTdKCrde", "SpineRunner", undefined);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SpineUtils.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "f5044B7uFZJtIV8gYgvSHPs", "SpineUtils", undefined);
      /*
       * @Author: xhd
       * @Date: 2024-01-19 16:36:07
       * @FilePath: \CodeB\assets\script\frameworks\tool\SpineUtils.ts
       * @LastEditors: heyuanguang www.heyuanguang@qq.com
       * @LastEditTime: 2025-10-27 15:59:28
       * @Description: spine帮助类
       */
      var SpineUtils = exports('default', /*#__PURE__*/function () {
        function SpineUtils() {}
        /** 播放动画 */
        SpineUtils.play = function play(sp, animation, loop, cb, timeScale) {
          if (animation === void 0) {
            animation = "animation";
          }
          if (loop === void 0) {
            loop = false;
          }
          if (!sp.skeletonData) {
            console.log(sp, "不存在骨骼数据");
            cb == null || cb(false);
            return;
          }
          sp.setToSetupPose();
          if (!sp.findAnimation(animation)) {
            console.error(sp.skeletonData.name + "\u627E\u4E0D\u5230\u52A8\u753B " + animation);
            cb == null || cb(false);
            return;
          }
          sp.clearTracks();
          // sp.enableBatch = true
          var track = sp.setAnimation(0, animation, loop);
          if (timeScale) {
            track.timeScale = timeScale;
            if (timeScale < 0) {
              track.trackTime = track.animationEnd;
            }
          }
          if (track) {
            sp.enabled = true;
            // 倒序播放且需要监听完成回调
            if (timeScale < 0 && cb) {
              setTimeout(function () {
                cb(true);
              }, track.trackTime - 0.1);
            } else {
              sp.setCompleteListener(function (trackEntry) {
                var name = trackEntry.animation ? trackEntry.animation.name : "";
                if (name === animation && cb) {
                  cb(true);
                }
              });
            }
          }
        }

        /** 播放动画并等待完成回调 */;
        SpineUtils.playAndComplete = function playAndComplete(sp, animation, loop, timeScale) {
          if (animation === void 0) {
            animation = "animation";
          }
          if (loop === void 0) {
            loop = false;
          }
          return new Promise(function (resolve, reject) {
            SpineUtils.play(sp, animation, loop, function (result) {
              resolve(result);
            }, timeScale);
          });
        }

        /**
         * 监听帧事件
         * @param sp
         * @param name 帧事件name属性
         * @param cb 回调
         */;
        SpineUtils.setEventListener = function setEventListener(sp, name, cb) {
          sp.setEventListener(function (track, evt) {
            if (evt.data.name === name) {
              cb();
            }
          });
        }

        /**
         * 让 Spine 停止在指定帧（需要先指定某个播放动画后在调用这个方法）
         * @param spine spine 组件
         * @param frame 帧数。1是开始，-1是最后
         * @param frameRate 帧率。一般 spine 是 30帧/秒
         */;
        SpineUtils.stopAtFrame = function stopAtFrame(spine, frame, frameRate) {
          if (frameRate === void 0) {
            frameRate = 24;
          }
          var te = spine.getCurrent(0);
          if (!te) {
            console.error("不可以获取TrackEntry");
            return;
          }
          // 算出帧对应的时间点
          var time;
          if (frame <= 0) {
            // 最后一帧对应的时间
            time = te.animation.duration;
          } else if (frame === 0) {
            // 第一帧对应的时间点
            time = 0;
          } else {
            // 根据帧率算出对应时间，spine帧率是30
            if (frameRate <= 0) {
              console.error("\u5E27\u7387\u5F02\u5E38\uFF0C\u5C06\u8BA9 Spine(" + spine.name + ") \u505C\u6B62\u5728\u7B2C\u4E00\u5E27");
              time = 0;
            } else {
              time = (frame - 1) / frameRate;
            }
          }

          // 对 time 做对time作限制
          if (time < 0) {
            time = 0;
          }

          // 太精确的话，动画会停在首帧，所以要减一点
          if (time >= te.animation.duration) {
            time = te.animation.duration - 0.01;
          }

          // 让动画停止
          te.timeScale = 0;
          te.trackTime = time;
        }

        /**
         * 获取动画时长
         * @param sp
         * @param animation
         * @returns
         */;
        SpineUtils.getAnimationDuration = function getAnimationDuration(sp, animation) {
          var skeletonData = sp.skeletonData;
          if (!skeletonData) return 0;
          var _skeletonCache = skeletonData["_skeletonCache"];
          if (!_skeletonCache) return 0;
          var _animations = _skeletonCache["animations"];
          if (!_animations) return 0;
          var aniData = _animations.find(function (p) {
            return p.name === animation;
          });
          return aniData ? aniData.duration : 0;
        }

        /**
         * 检查动画是否存在某个名称的动作
         * @param sp
         * @param name
         * @returns
         */;
        SpineUtils.checkAnimaionByName = function checkAnimaionByName(sp, name) {
          var skeletonData = sp.skeletonData;
          if (!skeletonData) return false;
          var _skeletonCache = skeletonData["_skeletonCache"];
          if (!_skeletonCache) return false;
          var _animations = _skeletonCache["animations"];
          if (!_animations) return false;
          var aniData = _animations.find(function (p) {
            return p.name === name;
          });
          return aniData ? true : false;
        }

        /**
         * 检查当前动画是不是再播放传入的动画
         * @param sp
         * @param name
         * @returns
         */;
        SpineUtils.checkAnimationPlaying = function checkAnimationPlaying(sp, name) {
          var currentAnimation = sp.animation;
          return currentAnimation === name;
        }

        /**
         * 骨骼播放默认动画
         * @param spine 需要播放的骨骼
         * @param loop 是否循环
         */;
        SpineUtils.spinePlayDefault = function spinePlayDefault(spine, loop, cb) {
          var animsEnum = spine.skeletonData.getAnimsEnum();
          var name = String(animsEnum[1]);
          spine.setAnimation(0, name, loop);
          spine.setEventListener(function (trackEntry, event) {
            cb && cb();
          });
        }
        /**
         * 骨骼播放默认动画
         * @param spine 需要播放的骨骼
         * @param loop 是否循环
         */;
        SpineUtils.spinePlayDefaultAndCB = function spinePlayDefaultAndCB(spine, loop, cb) {
          var animsEnum = spine.skeletonData.getAnimsEnum();
          var name = String(animsEnum[1]);
          spine.setAnimation(0, name, loop);
          spine.setCompleteListener(function (trackEntry) {
            spine.setCompleteListener(null);
            cb && cb();
          });
        };
        return SpineUtils;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/StageDescItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, Color, Component;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      Color = module.Color;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "8efbf0GsSdAnLbL6BugujI4", "StageDescItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var StageDescItem = exports('StageDescItem', (_dec = ccclass('StageDescItem'), _dec2 = property({
        type: Sprite
      }), _dec3 = property({
        type: Label
      }), _dec4 = property({
        type: Label
      }), _dec5 = property({
        type: Label
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(StageDescItem, _Component);
        function StageDescItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** 背景 */
          _initializerDefineProperty(_this, "bgSp", _descriptor, _assertThisInitialized(_this));
          /** 阶级 */
          _initializerDefineProperty(_this, "stageLab", _descriptor2, _assertThisInitialized(_this));
          /** 消耗士气：值 */
          _initializerDefineProperty(_this, "constLab", _descriptor3, _assertThisInitialized(_this));
          /** 当前阶级效果描述 */
          _initializerDefineProperty(_this, "descLab", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = StageDescItem.prototype;
        _proto.show = function show(data) {
          if (!data) return;

          // 设置阶级
          if (this.stageLab) {
            this.stageLab.string = data.stage + "\u9636";
          }

          // 设置消耗士气
          if (this.constLab) {
            this.constLab.string = "\u6D88\u8017\u58EB\u6C14\uFF1A" + data.morale;
          }

          // 设置描述文本和颜色
          if (this.descLab) {
            this.descLab.string = data.desc;
            // 根据是否激活设置颜色：未激活显示红色，已激活显示绿色
            if (data.isAct) {
              this.descLab.color = new Color().fromHEX('#238C0E'); // 绿色
            } else {
              this.descLab.color = new Color().fromHEX('#FF3E3E'); // 红色
            }
          }
        };

        return StageDescItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bgSp", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "stageLab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "constLab", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "descLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SubscribeMgr.ts", ['cc', './UtilityPlatform.ts', './DBRecord.ts', './App.ts'], function (exports) {
  var cclegacy, UtilityPlatform, DBRecord, App;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "33e9egDVk9BgLk22JPBbjDC", "SubscribeMgr", undefined);
      var SubscribeMgr = exports('SubscribeMgr', /*#__PURE__*/function () {
        function SubscribeMgr() {
          /**订阅信息,包含已订阅的id列表 */
          this.dingYueInfo = [];
          /**微信订阅状态, 是否订阅 */
          this.isDingYueState = false;
          /**微信设置，消息通知的总开关是否打开 */
          this.isMainSwitchOpen = false;
          /**已订阅消息模板id列表, 用于自动订阅 */
          this.dingYueTempIds = new Set();
          /**自动订阅计数上限，50次后每次登录订阅一次 */
          this.autoDingYueMax = 50;
          /**自动订阅计数 */
          this.autoDingYueCount = 0;
          /**自动订阅本次登录是否完成 */
          this.autoDingYueDone = false;
        }
        var _proto = SubscribeMgr.prototype;
        _proto._resetData = function _resetData() {
          console.log("GameShareManager _resetData");
        };
        _proto.addEventListener = function addEventListener() {
          // App.monitorMgr.addEventListener(MonitorType.web_ding_yue_info, this.recDingYueInfo, this);
          // App.monitorMgr.addEventListener(MonitorType.web_ding_yue_switch, this.recDingYueSwitch, this);
          // App.monitorMgr.addEventListener(MonitorType.web_ding_yue_close_reset, this.recResetAllDingYue, this);
        };
        _proto.init = function init() {
          this._resetData();
          this.addEventListener();
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
          this.dingYueInfo = [];
          this.isDingYueState = false;
          this.isMainSwitchOpen = false;
          this.dingYueTempIds.clear();
        }

        /**
         * 初始化自动订阅计数
         */;
        _proto.initAutoDingYueCount = function initAutoDingYueCount() {
          var count = parseInt(App.saveDataMgr.get(SubscribeMgr.AUTO_DING_YUE_KEY, 0));
          console.warn("SubscribeMgr initAutoDingYueCount count", count);
          if (count) {
            this.autoDingYueCount = count;
          }
        }

        /**
         * 保存自动订阅计数
         */;
        _proto.saveAutoDingYueCount = function saveAutoDingYueCount() {
          App.saveDataMgr.set(SubscribeMgr.AUTO_DING_YUE_KEY, this.autoDingYueCount, true);
        }

        /**
         * 后台配置订阅开关是否打开
         * @returns 是否打开
         */;
        _proto.isConfigSwitchOpen = function isConfigSwitchOpen() {
          {
            return false;
          }
          // return GameDef.switchConfig.subscribeSwitch === SwitchConfigState.Open;
        }

        /**
         * 请求订阅信息
         */;
        _proto.reqDingYueInfo = function reqDingYueInfo() {
          if (!this.isConfigSwitchOpen()) {
            return;
          }
          console.warn("SubscribeManager reqDingYueInfo DingYue");
          // netChannel.game.send(MonitorType.web_ding_yue_info);
        }
        // public recDingYueInfo(msg: m_proto.SC_130036 | m_proto.SC_130035 | m_proto.SC_130037) {
        //     this.dingYueInfo = msg.ids || [];
        //     console.warn("SubscribeManager recDingYueInfo DingYue", this.dingYueInfo);
        //     App.monitorMgr.dispatchEvent(MonitorType.ding_yue_info_update);
        // }

        // /**
        //  * 请求设置订阅开关
        //  * @param id 订阅id
        //  * @param open 开关（0-关 1-开）
        //  */
        // public reqDingYueSwitch(id: number, open: boolean) {
        //     if (!this.isConfigSwitchOpen()) {
        //         return;
        //     }
        //     let msg = {} as m_proto.CS_130035;
        //     msg.id = id;
        //     msg.flag = open ? 1 : 0;
        //     console.warn("SubscribeManager reqDingYueSwitch DingYue", msg);
        //     netChannel.game.send(MonitorType.web_ding_yue_switch, msg);
        // }
        // public recDingYueSwitch(msg: m_proto.SC_130035) {
        //     this.recDingYueInfo(msg);
        // }

        /**
         * 请求设置订阅开关
         * @param id 订阅id
         * @param open 开关（0-关 1-开）
         */;
        _proto.reqResetAllDingYue = function reqResetAllDingYue(ids) {
          if (!this.isConfigSwitchOpen()) {
            return;
          }
          console.warn("SubscribeManager reqResetAllDingYue DingYue:", ids);
          var msg = {
            ids: ids
          };
          netChannel.game.send(MonitorType.web_ding_yue_close_reset, msg);
        };
        _proto.recResetAllDingYue = function recResetAllDingYue(msg) {
          this.recDingYueInfo(msg);
        }

        /**
         * 检测是否订阅了指定ID
         * @param id 订阅ID, 为0表示任意id
         * @returns 是否已订阅
         */;
        _proto.isDingYueOpen = function isDingYueOpen(id) {
          if (!this.dingYueInfo || !Array.isArray(this.dingYueInfo)) {
            return false;
          }
          if (id === 0) {
            return this.dingYueInfo.length > 0;
          } else {
            return this.dingYueInfo.indexOf(id) !== -1;
          }
        }

        /**
         * 获取微信订阅状态
         * @param callBack 获取订阅状态回调
         * @param isSync 是否同步给后端
         */;
        _proto.getDingYueState = function getDingYueState(callBack, isSync) {
          if (callBack === void 0) {
            callBack = undefined;
          }
          if (isSync === void 0) {
            isSync = true;
          }
          console.warn("SubscribeManager getDingYueState DingYue isConfigSwitchOpen", this.isConfigSwitchOpen());
          if (!this.isConfigSwitchOpen()) {
            return;
          }
          UtilityPlatform.getInstance().getDingYueState(callBack, isSync);
        }

        /**
         * 微信订阅
         * @param tempId 订阅id
         * @param callBack 订阅回调
         */;
        _proto.dingYue = function dingYue(tempId, callBack) {
          if (!this.isConfigSwitchOpen()) {
            return;
          }
          UtilityPlatform.getInstance().dingYue(tempId, function () {
            callBack && callBack();
          });
        }

        /**
         * 检查是否需要自动订阅
         */;
        _proto.checkAutoDingYue = function checkAutoDingYue() {
          console.warn("SubscribeManager checkAutoDingYue this.autoDingYueCount, this.autoDingYueMax, this.autoDingYueDone", this.autoDingYueCount, this.autoDingYueMax, this.autoDingYueDone);
          if (this.autoDingYueCount < this.autoDingYueMax) {
            this.autoDingYueCount++;
            this.saveAutoDingYueCount();
            this.autoDingYue(false);
          } else {
            if (!this.autoDingYueDone) {
              this.autoDingYueDone = true;
              this.autoDingYue(false);
            }
          }
        }

        /**
         * 微信自动订阅，已经订阅过的消息，进入城镇自动订阅一次
         * @param needGetState 是否需要查询订阅状态
         * */;
        _proto.autoDingYue = function autoDingYue(needGetState) {
          if (needGetState === void 0) {
            needGetState = true;
          }
          if (!this.isConfigSwitchOpen()) {
            return;
          }
          UtilityPlatform.getInstance().autoDingYue(needGetState);
        }

        /**
         *根据site获取对应的模板id
         * @returns
         */;
        _proto.getDingYueTemplateId = function getDingYueTemplateId(cfg) {
          if (!cfg) {
            return undefined;
          }
          var templateId = cfg.site_template.find(function (item) {
            return item[0] === UtilityPlatform.getInstance().site;
          });
          return templateId ? templateId[1] : undefined;
        }

        /**
         * 获取通用订阅模板id
         * @returns 通用订阅模板id
         */;
        _proto.getCommonDingYueTemplateId = function getCommonDingYueTemplateId() {
          var cfgList = DBRecord.fetchAll("DingYue");
          var commonTempId = "";
          cfgList.forEach(function (item) {
            var templateId = App.subscribeMgr.getDingYueTemplateId(item);
            if (templateId) {
              if (!item.text2) {
                commonTempId = templateId;
              }
            }
          });
          return commonTempId;
        };
        return SubscribeMgr;
      }());
      /**自动订阅记录key*/
      SubscribeMgr.AUTO_DING_YUE_KEY = "autoDingYueKey";
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/SystemDef.ts", ['cc'], function (exports) {
  var cclegacy;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }],
    execute: function () {
      cclegacy._RF.push({}, "237b8civwVAmbRBf/vzu13i", "SystemDef", undefined);
      /*
       * @Author: xhd
       * @Date: 2025-04-24 17:18:52
       * @FilePath: \qianduan\assets\script\frameworks\manager\base\SystemDef.ts
       * @LastEditors: xiehande 741687776@qq.com
       * @LastEditTime: 2025-09-22 00:37:51
       * @Description: 系统定义
       */

      var SYS_ID = exports('SYS_ID', /*#__PURE__*/function (SYS_ID) {
        SYS_ID[SYS_ID["MiJing"] = 100] = "MiJing";
        SYS_ID[SYS_ID["PaTa"] = 100] = "PaTa";
        SYS_ID[SYS_ID["Skill"] = 200] = "Skill";
        SYS_ID[SYS_ID["TianFu"] = 300] = "TianFu";
        SYS_ID[SYS_ID["Bag"] = 601] = "Bag";
        SYS_ID[SYS_ID["Shop"] = 900] = "Shop";
        SYS_ID[SYS_ID["Pay0"] = 1000] = "Pay0";
        SYS_ID[SYS_ID["Peermit"] = 1100] = "Peermit";
        SYS_ID[SYS_ID["Advert"] = 4600] = "Advert";
        SYS_ID[SYS_ID["PLJJ"] = 3001] = "PLJJ";
        SYS_ID[SYS_ID["Email"] = 1200] = "Email";
        SYS_ID[SYS_ID["Rank"] = 1300] = "Rank";
        SYS_ID[SYS_ID["Sign7"] = 1600] = "Sign7";
        SYS_ID[SYS_ID["Fashion"] = 1700] = "Fashion";
        SYS_ID[SYS_ID["Wings0"] = 5200] = "Wings0";
        SYS_ID[SYS_ID["Wings1"] = 5201] = "Wings1";
        SYS_ID[SYS_ID["Wings2"] = 5202] = "Wings2";
        SYS_ID[SYS_ID["FashionUpLevel"] = 1701] = "FashionUpLevel";
        SYS_ID[SYS_ID["FashionJingLian"] = 1702] = "FashionJingLian";
        SYS_ID[SYS_ID["Forge"] = 2200] = "Forge";
        SYS_ID[SYS_ID["XiLian"] = 2201] = "XiLian";
        SYS_ID[SYS_ID["Pay1"] = 2700] = "Pay1";
        SYS_ID[SYS_ID["Weal"] = 2800] = "Weal";
        SYS_ID[SYS_ID["Task"] = 2900] = "Task";
        SYS_ID[SYS_ID["Fund"] = 3000] = "Fund";
        SYS_ID[SYS_ID["Trial"] = 3200] = "Trial";
        SYS_ID[SYS_ID["YXJG"] = 1900] = "YXJG";
        SYS_ID[SYS_ID["YXJG2"] = 1901] = "YXJG2";
        SYS_ID[SYS_ID["YXJGUpLevel"] = 1902] = "YXJGUpLevel";
        SYS_ID[SYS_ID["YXJGUpXunLi"] = 1903] = "YXJGUpXunLi";
        SYS_ID[SYS_ID["WYBQ"] = 400] = "WYBQ";
        SYS_ID[SYS_ID["KPBL"] = 3201] = "KPBL";
        SYS_ID[SYS_ID["TouZiDream"] = 3202] = "TouZiDream";
        SYS_ID[SYS_ID["TuBoShu"] = 3203] = "TuBoShu";
        SYS_ID[SYS_ID["DiYuBaoKu"] = 3204] = "DiYuBaoKu";
        SYS_ID[SYS_ID["BaoShi"] = 800] = "BaoShi";
        SYS_ID[SYS_ID["GouYu"] = 801] = "GouYu";
        SYS_ID[SYS_ID["Fuwen"] = 802] = "Fuwen";
        SYS_ID[SYS_ID["Target7"] = 3500] = "Target7";
        SYS_ID[SYS_ID["OnHook"] = 3700] = "OnHook";
        SYS_ID[SYS_ID["FuShi"] = 3900] = "FuShi";
        SYS_ID[SYS_ID["Questionnaire"] = 4000] = "Questionnaire";
        SYS_ID[SYS_ID["SpecialGif"] = 4200] = "SpecialGif";
        SYS_ID[SYS_ID["CZSC"] = 4300] = "CZSC";
        SYS_ID[SYS_ID["TimeActivity"] = 4001] = "TimeActivity";
        SYS_ID[SYS_ID["Tired"] = 4700] = "Tired";
        SYS_ID[SYS_ID["TeQuanKa"] = 3100] = "TeQuanKa";
        SYS_ID[SYS_ID["XianShiHuoDong"] = 4001] = "XianShiHuoDong";
        SYS_ID[SYS_ID["XingYunZhuanPan"] = 4100] = "XingYunZhuanPan";
        SYS_ID[SYS_ID["WorldBoss"] = 4400] = "WorldBoss";
        SYS_ID[SYS_ID["RPK"] = 4601] = "RPK";
        SYS_ID[SYS_ID["GuaiWuTuJian"] = 3300] = "GuaiWuTuJian";
        SYS_ID[SYS_ID["GuaiWuCaiLiao"] = 3301] = "GuaiWuCaiLiao";
        SYS_ID[SYS_ID["ZhuXianRenWu"] = 4800] = "ZhuXianRenWu";
        SYS_ID[SYS_ID["SJYL"] = 4900] = "SJYL";
        SYS_ID[SYS_ID["SJTQ"] = 5300] = "SJTQ";
        SYS_ID[SYS_ID["PetUplevel"] = 1800] = "PetUplevel";
        SYS_ID[SYS_ID["PetUpstar"] = 1801] = "PetUpstar";
        SYS_ID[SYS_ID["PetSkill"] = 1802] = "PetSkill";
        SYS_ID[SYS_ID["PetShop"] = 1803] = "PetShop";
        SYS_ID[SYS_ID["PetCard"] = 1820] = "PetCard";
        SYS_ID[SYS_ID["MiJingB"] = 3205] = "MiJingB";
        SYS_ID[SYS_ID["MiJingA"] = 3206] = "MiJingA";
        SYS_ID[SYS_ID["WxShare"] = 4602] = "WxShare";
        SYS_ID[SYS_ID["SeckillGift"] = 3101] = "SeckillGift";
        SYS_ID[SYS_ID["ShengTan"] = 3600] = "ShengTan";
        SYS_ID[SYS_ID["PiLaoJiJin"] = 3001] = "PiLaoJiJin";
        SYS_ID[SYS_ID["PaiQian"] = 1810] = "PaiQian";
        SYS_ID[SYS_ID["KuangDong"] = 1811] = "KuangDong";
        SYS_ID[SYS_ID["JJC"] = 5100] = "JJC";
        SYS_ID[SYS_ID["SeasonCard"] = 5300] = "SeasonCard";
        SYS_ID[SYS_ID["Pata"] = 5400] = "Pata";
        SYS_ID[SYS_ID["LingLu"] = 5700] = "LingLu";
        SYS_ID[SYS_ID["ShengQi"] = 5500] = "ShengQi";
        return SYS_ID;
      }({}));
      var PLAYER_HERO_ID = exports('PLAYER_HERO_ID', 10001); //玩家默认英雄ID
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TableView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './TableViewCell.ts', './ReDefineTableViewRender.ts', './Utils.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, ScrollView, UITransform, Enum, Prefab, _decorator, Node, EventHandler, v3, size, instantiate, v2, Component, TableViewCell, ReDefineTableViewRender, Utils;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      ScrollView = module.ScrollView;
      UITransform = module.UITransform;
      Enum = module.Enum;
      Prefab = module.Prefab;
      _decorator = module._decorator;
      Node = module.Node;
      EventHandler = module.EventHandler;
      v3 = module.v3;
      size = module.size;
      instantiate = module.instantiate;
      v2 = module.v2;
      Component = module.Component;
    }, function (module) {
      TableViewCell = module.TableViewCell;
    }, function (module) {
      ReDefineTableViewRender = module.ReDefineTableViewRender;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "46a9fTm0yhJH5W85Cun2/iV", "TableView", undefined);

      /**
       * liuhongtai
       */
      var _cc$_decorator = _decorator,
        ccclass = _cc$_decorator.ccclass,
        property = _cc$_decorator.property,
        requireComponent = _cc$_decorator.requireComponent;
      var DirectType = exports('DirectType', /*#__PURE__*/function (DirectType) {
        DirectType[DirectType["VERTICAL"] = 0] = "VERTICAL";
        DirectType[DirectType["HORIZONTAL"] = 1] = "HORIZONTAL";
        DirectType[DirectType["TILE"] = 2] = "TILE";
        DirectType[DirectType["VERTICAL_FIX"] = 3] = "VERTICAL_FIX";
        DirectType[DirectType["HORIZONTAL_FIX"] = 4] = "HORIZONTAL_FIX";
        return DirectType;
      }({}));
      var TableView = exports('TableView', (_dec = ccclass('TableView'), _dec2 = requireComponent(ScrollView), _dec3 = requireComponent(UITransform), _dec4 = property({
        type: Enum(DirectType),
        displayName: 'direct'
      }), _dec5 = property({
        displayName: 'item',
        tooltip: '列表中的item',
        type: Prefab
      }), _dec6 = property({
        displayName: 'space_x',
        tooltip: 'item之间横轴的间隔'
      }), _dec7 = property({
        displayName: 'space_y',
        tooltip: 'item之间竖轴的间隔'
      }), _dec8 = property({
        displayName: 'headEndGap',
        tooltip: '列表头部和尾部的间隙'
      }), _dec9 = property({
        displayName: 'redefineRender',
        tooltip: '是否使用重定义Render实现DrawCall优化'
      }), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = /*#__PURE__*/function (_cc$Component) {
        _inheritsLoose(TableView, _cc$Component);
        function TableView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _cc$Component.call.apply(_cc$Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "m_director", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "m_item", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "m_spaceing_x", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "m_spaceing_y", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "m_headEndGap", _descriptor5, _assertThisInitialized(_this));
          _this.m_tile_num = 0;
          _initializerDefineProperty(_this, "m_redefineRender", _descriptor6, _assertThisInitialized(_this));
          _this.m_data = [];
          _this.m_extendData = null;
          _this.m_showNodes = new Map();
          _this.m_freeNodes = [];
          _this.m_vCellPositions = [];
          _this.m_vCellPositions_x = [];
          _this.m_vCellPositions_y = [];
          _this.m_templateCell = null;
          _this.m_scrollView = null;
          _this.m_uitranform = null;
          _this.m_content = null;
          _this.m_contentUITransform = null;
          _this.m_preScrollOffset = null;
          _this.m_cellClickCallback = null;
          _this.m_scrollEanble = true;
          _this._m_cell_size = null;
          _this._fix_MaxOffset = null;
          /**用render下标取对应的计算后的宽高----数据生命周期仅维持到下次 reloadData前 */
          _this.fix_item_num = [];
          // /**用render下标取对应的计算后的坐标位置----数据生命周期仅维持到下次 reloadData前 */
          // protected fix_item_pos: number[] = [];
          /**当前可视窗口展示的item初始 */
          _this.fix_last_idx_start = undefined;
          /**当前可视窗口展示的item魔只 */
          _this.fix_last_idx_end = undefined;
          _this._scrollTo_idx = void 0;
          _this._scrollTo_dt = void 0;
          /**优化分帧加载 */
          _this._intervalId = void 0;
          _this._timeoutId = void 0;
          _this._startIdx = void 0;
          _this._endIdx = void 0;
          return _this;
        }
        var _proto = TableView.prototype;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          this.initControl();
          console.log('tableview start');
          this.node.on(Node.EventType.SIZE_CHANGED, function () {
            console.log('tableview resize');
            var offset = _this2.m_preScrollOffset;
            if (offset == null) offset = 0;
            _this2.setContainerOffset(offset);
            _this2.m_preScrollOffset = null;
            setTimeout(function () {
              _this2 && _this2.node && _this2.node.components && _this2.handleResize();
            }, 5);
          });
        };
        _proto.setScrollEnable = function setScrollEnable(enable) {
          this.m_scrollView.horizontal = enable;
          this.m_scrollView.vertical = enable;
        };
        _proto.handleResize = function handleResize() {
          this.reloadData(true);
        };
        _proto.setClickCallback = function setClickCallback(callback) {
          this.m_cellClickCallback = callback;
        };
        _proto.setViewSize = function setViewSize(size) {
          var uitranform = this.getComponent(UITransform);
          var scrollView = this.getComponent(ScrollView);
          if (scrollView) {
            scrollView.view.width = size.width;
            scrollView.view.height = size.height;
          }
          if (uitranform) {
            uitranform.width = size.width;
            uitranform.height = size.height;
          }
        };
        _proto.setScrollEanble = function setScrollEanble(enable) {
          this.m_scrollEanble = enable;
          var scrollView = this.getComponent(ScrollView);
          scrollView.vertical = this.m_scrollEanble && (this.m_director == DirectType.VERTICAL || this.m_director == DirectType.TILE);
          scrollView.horizontal = this.m_scrollEanble && this.m_director == DirectType.HORIZONTAL;
        };
        _proto.doClickCellItem = function doClickCellItem(index) {
          if (!this.m_data || !this.m_data[index]) return;
          var cellData = this.m_data[index];
          this.handleClickCellitem(index, cellData);
          if (this.m_cellClickCallback != null) {
            this.m_cellClickCallback(index, cellData);
          }
        };
        _proto.handleClickCellitem = function handleClickCellitem(index, cellData) {};
        _proto.initControl = function initControl() {
          this.m_scrollView = this.getComponent(ScrollView);
          this.m_uitranform = this.getComponent(UITransform);
          if (this.m_scrollView) {
            this.m_content = this.m_scrollView.content;
            if (this.m_content) {
              this.m_contentUITransform = this.m_content.getComponent(UITransform);
              if (this.m_redefineRender) {
                if (!this.m_content.getComponent(ReDefineTableViewRender)) {
                  var redefine = this.m_content.addComponent(ReDefineTableViewRender);
                  redefine.setTableView(this);
                }
              }
            }
            var eventHandler = new EventHandler();
            eventHandler.target = this.node;
            eventHandler.component = 'TableView';
            eventHandler.handler = 'scrollViewDidScroll';
            this.m_scrollView.scrollEvents.push(eventHandler);
            this.m_scrollView.vertical = this.m_scrollEanble && (this.m_director == DirectType.VERTICAL || this.m_director == DirectType.VERTICAL_FIX || this.m_director == DirectType.TILE);
            this.m_scrollView.horizontal = this.m_scrollEanble && (this.m_director == DirectType.HORIZONTAL || this.m_director == DirectType.HORIZONTAL_FIX);
          }
          if (this.m_contentUITransform) {
            var viewSize = this.getViewSize();
            if (this.m_director == DirectType.HORIZONTAL || this.m_director == DirectType.HORIZONTAL_FIX) {
              var _this$m_content;
              this.m_contentUITransform.setAnchorPoint(0, 0.5);
              (_this$m_content = this.m_content) == null || _this$m_content.setPosition(v3(-1 * viewSize.width / 2, 0, 0));
            } else if (this.m_director == DirectType.VERTICAL || this.m_director == DirectType.VERTICAL_FIX) {
              var _this$m_content2;
              this.m_contentUITransform.setAnchorPoint(0.5, 1);
              (_this$m_content2 = this.m_content) == null || _this$m_content2.setPosition(v3(0, viewSize.height / 2, 0));
            } else {
              var _this$m_content3;
              this.m_contentUITransform.setAnchorPoint(0, 1);
              (_this$m_content3 = this.m_content) == null || _this$m_content3.setPosition(v3(-1 * viewSize.width / 2, viewSize.height / 2, 0));
              this.m_tile_num = Math.floor(viewSize.width / this.cellSizeForTable(0).width);
            }
            this.m_contentUITransform.contentSize = viewSize;
          }
        };
        _proto.setData = function setData(data) {
          this.m_data = data;
          this.fix_item_num = [];
          // this.fix_item_pos = [];
        };

        _proto.setExtendData = function setExtendData(data) {
          this.m_extendData = data;
        };
        _proto.getExtendData = function getExtendData() {
          return this.m_extendData;
        };
        _proto.getShowNodes = function getShowNodes() {
          return this.m_showNodes;
        }
        // /**刷新render的数据到idx  刷新render的同时  fix_item_num  跟  fix_item_pos 计算到idx  */
        // protected ref_render_size_fix(idx: number) {
        //     let start = this.fix_item_num.length;
        //     for (let i = start; i <= idx; i++) {

        //     }
        //     return 1
        // }
        ;

        _proto.cellSizeForTable = function cellSizeForTable(idx) {
          // if (this.m_director == DirectType.VERTICAL_FIX) {
          //     //自适应的时候。切记要按下标顺序取、否则存储的fix_item_pos会不对
          //     let num = this.fix_item_num[idx]
          //     if (num === null || num === undefined)
          //         num = this.ref_render_size_fix(idx);
          //     return cc.size(0, num)
          // } else if (this.m_director == DirectType.HORIZONTAL_FIX) {
          //     //自适应的时候。切记要按下标顺序取、否则存储的fix_item_pos会不对
          //     let num = this.fix_item_num[idx]
          //     if (num === null || num === undefined)
          //         num = this.ref_render_size_fix(idx);
          //     return cc.size(num, 0)
          // } else {
          if (this._m_cell_size) return this._m_cell_size;
          if (this.m_item == null) return size(0, 0);
          if (this.m_templateCell == null) {
            var _this$m_content4;
            this.m_templateCell = instantiate(this.m_item);
            this.m_templateCell.active = false;
            (_this$m_content4 = this.m_content) == null || _this$m_content4.addChild(this.m_templateCell);
          }
          var size$1 = Utils.getNodeSize(this.m_templateCell);
          this._m_cell_size = size$1;
          return size$1;
          // }
        };

        _proto.updateCellPositions = function updateCellPositions(start) {
          if (start === void 0) {
            start = 0;
          }
          var cellCount = this.getCellCount();
          var m_director = this.m_director;
          if (start) curPos = this.m_vCellPositions[start];else var curPos = this.m_headEndGap;
          var cellSize = null; //
          if (m_director != DirectType.HORIZONTAL_FIX && m_director != DirectType.VERTICAL_FIX) cellSize = this.cellSizeForTable(0);
          var curPos_x = 0;
          var curPos_y = this.m_headEndGap;
          for (var i = start; i < cellCount; i++) {
            switch (m_director) {
              case DirectType.HORIZONTAL:
                this.m_vCellPositions[i] = curPos;
                curPos += cellSize.width;
                if (i < cellCount - 1) curPos += this.m_spaceing_x;
                break;
              case DirectType.VERTICAL:
                this.m_vCellPositions[i] = curPos;
                curPos += cellSize.height;
                if (i < cellCount - 1) curPos += this.m_spaceing_y;
                break;
              case DirectType.VERTICAL_FIX:
                this.m_vCellPositions[i] = curPos;
                var wn = this.getFixNum(this.m_data[i]);
                this.fix_item_num[i] = wn;
                curPos += wn;
                if (i < cellCount - 1) curPos += this.m_spaceing_y;
                break;
              case DirectType.HORIZONTAL_FIX:
                this.m_vCellPositions[i] = curPos;
                wn = this.getFixNum(this.m_data[i]);
                this.fix_item_num[i] = wn;
                curPos += wn;
                if (i < cellCount - 1) curPos += this.m_spaceing_x;
                break;
              default:
                this.m_vCellPositions_x[i] = curPos_x;
                this.m_vCellPositions_y[i] = curPos_y;
                if (i && (i + 1) % this.m_tile_num == 0) {
                  curPos_y -= cellSize.height;
                  curPos_y -= this.m_spaceing_y;
                  curPos_x = -cellSize.width - this.m_spaceing_x;
                }
                curPos_x += cellSize.width;
                if (i < cellCount - 1) curPos_x += this.m_spaceing_x;
                break;
            }
          }
          if (this.getDirection() == DirectType.TILE) {
            this.m_vCellPositions_x[cellCount] = curPos_x;
            this.m_vCellPositions_y[cellCount] = curPos_y;
          } else {
            this.m_vCellPositions[cellCount] = curPos;
          }
        };
        _proto.getViewSize = function getViewSize() {
          if (this.m_uitranform) return this.m_uitranform.contentSize;
          return size(0, 0);
        };
        _proto.updateContentSize = function updateContentSize() {
          if (this.m_contentUITransform == null) return;
          var size$1 = this.getViewSize();
          var cellCount = this.getCellCount();
          if (cellCount > 0) {
            if (this.getDirection() == DirectType.HORIZONTAL || this.getDirection() == DirectType.HORIZONTAL_FIX) {
              var maxPos = this.m_vCellPositions[cellCount];
              this._fix_MaxOffset = maxPos - size$1.width / 2;
              maxPos = Math.max(size$1.width, maxPos) + this.m_headEndGap;
              size$1 = size(maxPos, size$1.height);
            } else if (this.getDirection() == DirectType.VERTICAL || this.getDirection() == DirectType.VERTICAL_FIX) {
              maxPos = this.m_vCellPositions[cellCount];
              this._fix_MaxOffset = maxPos - size$1.height / 2;
              maxPos = Math.max(size$1.height, maxPos) + this.m_headEndGap;
              size$1 = size(size$1.width, maxPos);
            } else {
              var maxPos_y = Math.abs(this.m_vCellPositions_y[cellCount]);
              this._fix_MaxOffset = maxPos_y - size$1.height / 2;
              // maxPos_x = Math.max(size.width, maxPos_x) + 0;
              if (cellCount % this.m_tile_num == 0) {
                maxPos_y = Math.max(size$1.height, maxPos_y) + this.m_headEndGap;
              } else {
                var cellSize = this.cellSizeForTable(0);
                maxPos_y = Math.max(size$1.height, maxPos_y + cellSize.height) + this.m_headEndGap;
              }
              size$1 = size(size$1.width, maxPos_y);
            }
          }
          this.m_contentUITransform.contentSize = size$1;
        };
        _proto.setContainerOffset = function setContainerOffset(offset) {
          if (this.m_content == null) return;
          var viewSzie = this.getViewSize();
          this.fix_last_idx_end = undefined;
          this.fix_last_idx_start = undefined;
          if (this.m_director == DirectType.HORIZONTAL || this.m_director == DirectType.HORIZONTAL_FIX) {
            Utils.setPositionX(this.m_content, offset - viewSzie.width / 2);
          } else {
            Utils.setPositionY(this.m_content, offset + viewSzie.height / 2);
          }
        };
        _proto.__indexFromOffset = function __indexFromOffset(offset, isStart) {
          var low = 0;
          var search = offset;
          var high = this.getCellCount() - 1;
          while (high >= low) {
            var index = low + Math.floor((high - low) / 2);
            var cellStart = this.m_vCellPositions[index];
            var cellEnd = this.m_vCellPositions[index + 1];
            if (search >= cellStart && search <= cellEnd) {
              low = index;
              break;
            } else if (search < cellStart) {
              high = index - 1;
            } else {
              low = index + 1;
            }
          }
          var count = this.getCellCount() - 1;
          if (low <= 0) {
            return 0;
          } else if (low >= count) {
            return count;
          }
          return low;
        };
        _proto._indexFromOffset = function _indexFromOffset(offset, isStart) {
          var maxIdx = this.getCellCount() - 1;
          if (this.m_director == DirectType.TILE) maxIdx = Math.ceil(maxIdx / this.m_tile_num);
          var index = this.__indexFromOffset(offset, isStart);
          index = Math.max(0, index);
          index = Math.min(index, maxIdx);
          return index;
        };
        _proto.scrollTo = function scrollTo(index, dt) {
          var _this3 = this;
          if (dt === void 0) {
            dt = 0;
          }
          if (this.m_scrollView && this['isInit_effect'] && this.m_scrollView && this.m_scrollView.node && this.m_scrollView.node.components) {
            var pos = this.getItemPos(index);
            var n = Math.min(-1 * pos.y, this._fix_MaxOffset);
            this.m_scrollView.scrollToOffset(v2(pos.x, n), dt);
            setTimeout(function () {
              _this3.m_scrollView.node && _this3.m_scrollView.node.components && _this3.updateScrollViewContent && _this3.updateScrollViewContent(true, true);
            }, dt * 1000 + 1);
          } else {
            this._scrollTo_idx = index;
            this._scrollTo_dt = dt;
          }
        };
        _proto.getOffsetIdx = function getOffsetIdx(nowOffset, lastIdx, isUp, isStart) {
          var lastOffset = this.m_vCellPositions[lastIdx + (isStart ? 1 : 0)];
          var textIdx = isUp ? lastIdx + 1 : lastIdx - 1;
          if (!isStart) lastOffset -= this.fix_item_num[lastIdx] / 2;
          // let newOffset = this.m_vCellPositions[textIdx];
          if (isUp) {
            return nowOffset >= lastOffset ? textIdx : lastIdx;
          } else {
            return nowOffset <= lastOffset ? textIdx : lastIdx;
          }
        };
        _proto.updateScrollViewContent = function updateScrollViewContent(forceUpdate, refData) {
          var _this4 = this;
          if (refData === void 0) {
            refData = false;
          }
          var offset = this.getContainerOffset();
          // if(this.m_preScrollOffset != null && this.m_preScrollOffset == offset) return;
          if (!forceUpdate && this.m_preScrollOffset != null && Math.floor(this.m_preScrollOffset) == Math.floor(offset)) return;
          var isUp = Math.floor(offset) > this.m_preScrollOffset;
          this.m_preScrollOffset = offset;
          var cellCount = this.getCellCount();
          if (cellCount <= 0) return;
          var startIdx = 0,
            endIdx = 0,
            maxIdx = 0;
          var viewSize = this.getViewSize();
          maxIdx = Math.max(cellCount - 1, 0);
          if (this.m_director == DirectType.HORIZONTAL_FIX || this.m_director == DirectType.VERTICAL_FIX) {
            if (this.fix_last_idx_start === undefined) {
              startIdx = 0;
              if (this.m_director == DirectType.HORIZONTAL_FIX) {
                offset = offset + viewSize.width;
              } else {
                offset = offset + viewSize.height;
              }
              for (var i = startIdx + 1; i < startIdx + 40; i++) {
                if (i >= this.m_vCellPositions.length) break;
                var newOffset = this.m_vCellPositions[i] - this.fix_item_num[i] / 2;
                if (newOffset > offset) {
                  break;
                }
                endIdx = i;
              }
            } else {
              if (offset == 0) startIdx = 0;else if (refData || forceUpdate) {
                startIdx = 0;
                for (var _i = 0; _i < 999; _i++) {
                  if (_i >= this.m_vCellPositions.length) break;
                  var newOffset = this.m_vCellPositions[_i] + this.fix_item_num[_i] / 2;
                  startIdx = _i;
                  if (newOffset > offset) {
                    break;
                  }
                }
              } else startIdx = this.getOffsetIdx(offset, this.fix_last_idx_start, isUp, true);
              if (this.m_director == DirectType.HORIZONTAL_FIX) {
                offset = offset + viewSize.width;
              } else {
                offset = offset + viewSize.height;
              }
              if (forceUpdate) {
                for (var _i2 = startIdx + 1; _i2 < startIdx + 40; _i2++) {
                  if (_i2 >= this.m_vCellPositions.length) break;
                  var newOffset = this.m_vCellPositions[_i2] - this.fix_item_num[_i2] / 2;
                  if (newOffset > offset) {
                    break;
                  }
                  endIdx = _i2;
                }
              } else endIdx = this.getOffsetIdx(offset, this.fix_last_idx_end, isUp, false);
            }
            startIdx = Math.min(Math.max(0, startIdx), maxIdx);
            endIdx = Math.min(Math.max(0, endIdx), maxIdx);
            this.fix_last_idx_start = startIdx;
            this.fix_last_idx_end = endIdx;
          } else {
            var cellSize = this.cellSizeForTable(0);
            startIdx = Math.floor((offset + this.m_spaceing_y) / (cellSize.height + this.m_spaceing_y));
            if (this.m_director == DirectType.HORIZONTAL) {
              offset = offset + viewSize.width;
              endIdx = Math.ceil((offset + this.m_spaceing_y) / (cellSize.width + this.m_spaceing_y));
            } else {
              offset = offset + viewSize.height;
              endIdx = Math.ceil((offset + this.m_spaceing_y) / (cellSize.height + this.m_spaceing_y));
            }
          }

          // console.log('-------------------', startIdx, '----', endIdx)
          if (!!this._intervalId) {
            clearInterval(this._intervalId);
            this._intervalId = null;
          }
          if (!!this._timeoutId) {
            clearTimeout(this._timeoutId);
            this._timeoutId = null;
          }
          var isInit_effect = this['isInit_effect'];
          var m_tile_num = this.m_tile_num;
          this.m_showNodes.forEach(function (cell) {
            var cellIdx = cell.getCellIndex();
            var cellIdx_1 = cellIdx;
            if (_this4.m_director == DirectType.TILE) cellIdx = Math.floor(cellIdx / m_tile_num);
            if (cellIdx < 0 || cellIdx < startIdx || cellIdx > endIdx) {
              _this4.freeCell(cell);
              _this4.m_showNodes["delete"](cellIdx_1);
            } else if (!isInit_effect) cell.node.active = false;
          });
          if (this.m_director == DirectType.TILE) {
            startIdx = startIdx * m_tile_num;
            endIdx = endIdx * m_tile_num - 1;
          }
          if (!isInit_effect) {
            this._startIdx = startIdx;
            this._endIdx = endIdx;
            var delay = 0.5;
            this._timeoutId = setTimeout(function () {
              if (!!_this4._timeoutId) {
                clearTimeout(_this4._timeoutId);
                _this4._timeoutId = null;
              }
              _this4._intervalId = setInterval(function () {
                delay = 0.1;
                if (!_this4.node || !_this4.node.components || _this4._startIdx > _this4._endIdx || _this4._startIdx > cellCount) {
                  _this4['isInit_effect'] = true;
                  if (_this4._startIdx > _this4._endIdx || _this4._startIdx > cellCount) {
                    var pos = _this4.getItemPos(_this4._scrollTo_idx);
                    var n = Math.min(-1 * pos.y, _this4._fix_MaxOffset);
                    _this4.m_scrollView && _this4.m_scrollView.node && _this4.m_scrollView.node.components && _this4.m_scrollView.scrollToOffset(v2(pos.x, n), _this4._scrollTo_dt || 0);
                    setTimeout(function () {
                      _this4.m_scrollView.node && _this4.m_scrollView.node.components && _this4.updateScrollViewContent && _this4.updateScrollViewContent(true, true);
                    }, _this4._scrollTo_dt * 1000 + 1);
                    _this4._scrollTo_idx = null;
                    _this4._scrollTo_dt = null;
                  }
                  if (!!_this4._intervalId) {
                    clearInterval(_this4._intervalId);
                    _this4._intervalId = null;
                    return;
                  }
                }
                _this4.updateCellAtIndex(_this4._startIdx);
                _this4._startIdx++;
              }, delay);
            }, 20);
            return;
          }
          // console.log('TableView子项数量：', (endIdx - startIdx + 1))
          for (var _i3 = startIdx; _i3 <= endIdx; _i3++) {
            if (_i3 < 0 || _i3 > cellCount) {
              continue;
            }
            this.updateCellAtIndex(_i3, refData);
          }
          // console.timeEnd("xxxxxxxxxxxxxxx");
        };

        _proto.scrollViewDidScroll = function scrollViewDidScroll(e, t) {
          this.updateScrollViewContent(false);
        };
        _proto.freeCell = function freeCell(cell) {
          cell.node.active = false;
          this.m_freeNodes.push(cell);
        };
        _proto.getDequeueCell = function getDequeueCell() {
          var cell = this.m_freeNodes.shift();
          if (cell != null) {
            return cell;
          }
          if (this.m_item) {
            var _this$m_content5;
            var newNode = instantiate(this.m_item);
            (_this$m_content5 = this.m_content) == null || _this$m_content5.addChild(newNode);
            var _cell = newNode.getComponent(TableViewCell);
            if (_cell == null) {
              _cell = newNode.addComponent(TableViewCell);
            }
            if (this.m_redefineRender) _cell.__redefineInit();
            _cell.setTree(this);
            return _cell;
          }
        };
        _proto.getItemPos = function getItemPos(idx) {
          var x = 0,
            y = 0;
          if (this.m_director == DirectType.VERTICAL_FIX) {
            if (!this.m_vCellPositions) return v3(x, y, 0);
            y = -1 * this.m_vCellPositions[idx];
          } else if (this.m_director == DirectType.HORIZONTAL_FIX) {
            if (!this.m_vCellPositions) return v3(x, y, 0);
            x = this.m_vCellPositions[idx];
          } else if (this.m_director == DirectType.HORIZONTAL) {
            if (!this.m_vCellPositions) return v3(x, y, 0);
            x = this.m_vCellPositions[idx];
          } else if (this.m_director == DirectType.VERTICAL) {
            if (!this.m_vCellPositions) return v3(x, y, 0);
            y = -1 * this.m_vCellPositions[idx];
          } else {
            if (!this.m_vCellPositions_x || !this.m_vCellPositions_y) return v3(x, y, 0);
            x = this.m_vCellPositions_x[idx];
            y = this.m_vCellPositions_y[idx];
          }
          return v3(x, y, 0);
        };
        _proto.setCellPos = function setCellPos(node, pos) {
          var uitranform = node.getComponent(UITransform);
          if (uitranform) {
            if (this.m_director == DirectType.HORIZONTAL || this.m_director == DirectType.HORIZONTAL_FIX) {
              pos.x += uitranform.anchorX * uitranform.width;
            } else if (this.m_director == DirectType.VERTICAL || this.m_director == DirectType.VERTICAL_FIX) {
              pos.y -= uitranform.anchorY * uitranform.height;
            } else {
              pos.x += uitranform.anchorX * uitranform.width;
              pos.y -= uitranform.anchorY * uitranform.height;
            }
          }
          if (node.position.x != pos.x || node.position.y != pos.y) node.position = pos;
        };
        _proto.updateCellAtIndex = function updateCellAtIndex(idx, redData) {
          if (redData === void 0) {
            redData = false;
          }
          if (!this.m_data) return;
          var cellData = this.m_data[idx];
          if (!cellData) return;
          var cell = this.m_showNodes.get(idx);
          if (cell == null) {
            cell = this.getDequeueCell();
            cell.node.active = true;
            cell.setData(idx, cellData, this.m_extendData);
            this.setCellPos(cell.node, this.getItemPos(idx));
            this.m_showNodes.set(idx, cell);
          } else {
            redData && cell.setData(idx, cellData, this.m_extendData);
            if (!cell.node.active) cell.node.active = true;
            this.setCellPos(cell.node, this.getItemPos(idx));
          }
        }
        /**
         *
         * @param keep 是否维持当前滚动列表的滚动位置，不重置到起始点
         * @param forceUpdate 是否锁定更新状态、当false的时候。如果数据长度不变。不会刷新显示
         */;
        _proto.reloadData = function reloadData(keep, forceUpdate) {
          var _this5 = this;
          if (keep === void 0) {
            keep = false;
          }
          if (forceUpdate === void 0) {
            forceUpdate = true;
          }
          var cellsCount = this.getCellCount();
          this.m_showNodes.forEach(function (cell) {
            _this5.freeCell(cell);
          });
          this.m_showNodes.clear();
          this.updateCellPositions();
          this.updateContentSize();
          if (!keep) {
            this.setContainerOffset(0);
          }
          if (cellsCount > 0) {
            this.updateScrollViewContent(forceUpdate);
          }
        };
        _proto.getData = function getData() {
          return this.m_data || [];
        };
        _proto.getCellCount = function getCellCount() {
          if (!this.m_data) return 0;
          return this.m_data.length;
        };
        _proto.getDirection = function getDirection() {
          return this.m_director;
        };
        _proto.getContainerOffset = function getContainerOffset() {
          if (this.m_scrollView == null) return 0;
          var content = this.m_scrollView.content;
          if (content == null) return 0;
          var parentNode = content.parent;
          if (parentNode == null) return 0;
          var viewSize = this.getViewSize();
          if (this.m_director == DirectType.HORIZONTAL) {
            return (content.position.x + viewSize.width / 2) * -1;
          } else {
            return content.position.y - viewSize.height / 2;
          }
        };
        _proto.getContainerSize = function getContainerSize() {
          if (this.m_scrollView) {
            var content = this.m_scrollView.content;
            if (content) {
              var transform = content.getComponent(UITransform);
              if (transform) {
                return transform.contentSize;
              }
            }
          }
          return size(0, 0);
        }

        //更新Item数据
        ;

        _proto.updateItemData = function updateItemData(idx, cellData) {
          if (this.m_data && this.m_data[idx]) {
            this.m_data[idx] = cellData;
            var cell = this.m_showNodes.get(idx);
            if (cell) {
              cell.setData(idx, this.m_data[idx], this.m_extendData);
            }
          }
        }

        /**选中list处理 */;
        _proto.selItem = function selItem(idx, sel) {
          if (this.m_data && this.m_data[idx]) {
            var _cellData = this.m_data[idx];
            _cellData['selStatus'] = sel;
            var cell = this.m_showNodes.get(idx);
            if (cell) {
              cell['setSelect'] && cell['setSelect'](sel);
              // cell!.setData(idx, this.m_data[idx], this.m_extendData);
            }
          }
        }

        /**用data来计算真实高宽度的接口    VERTICAL_FIX  ||  HORIZONTAL_FIX  必须实现这个接口 */;
        _proto.getFixNum = function getFixNum(data) {
          return 0;
        }

        /**addItem */;
        _proto.addItem = function addItem(data, srcollToButtom) {
          if (srcollToButtom === void 0) {
            srcollToButtom = true;
          }
          if (!data || !this.node || !this.node.components) return;
          if (!this.m_data) this.m_data = [];
          this.m_data.push(data);
          this.updateCellPositions(this.m_data.length - 1);
          this.updateContentSize();
          this.updateScrollViewContent(true);
          if (srcollToButtom) this.scrollTo(this.m_data.length - 1, 0);
        };
        return TableView;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "m_director", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return DirectType.VERTICAL;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "m_item", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "m_spaceing_x", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "m_spaceing_y", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "m_headEndGap", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "m_redefineRender", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      })), _class2)) || _class) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TableViewCell.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _inheritsLoose, cclegacy, UIRenderer, UITransform, size, _decorator, Component;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      UIRenderer = module.UIRenderer;
      UITransform = module.UITransform;
      size = module.size;
      _decorator = module._decorator;
      Component = module.Component;
    }],
    execute: function () {
      var _dec, _class;
      cclegacy._RF.push({}, "b54e2Robn1A6ZlSAv4i5Oay", "TableViewCell", undefined);
      var _cc$_decorator = _decorator,
        ccclass = _cc$_decorator.ccclass,
        property = _cc$_decorator.property;
      var TableViewCell = exports('TableViewCell', (_dec = ccclass('TableViewCell'), _dec(_class = /*#__PURE__*/function (_cc$Component) {
        _inheritsLoose(TableViewCell, _cc$Component);
        function TableViewCell() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _cc$Component.call.apply(_cc$Component, [this].concat(args)) || this;
          _this.m_index = -1;
          _this.m_data = null;
          _this.m_tree = null;
          _this.m_renders = [];
          return _this;
        }
        var _proto = TableViewCell.prototype;
        _proto.__redefineInit = function __redefineInit() {
          this.m_renders = this.node.getComponentsInChildren(UIRenderer);
          this.m_renders.forEach(function (render) {
            var rendertemp = render;
            if (rendertemp._realRenderFunc == null) {
              rendertemp._realRenderFunc = rendertemp._render;
              rendertemp._render = function () {};
            }
          });
        };
        _proto.___redefineReset = function ___redefineReset() {
          this.m_renders.forEach(function (render) {
            var rendertemp = render;
            if (rendertemp._realRenderFunc != null) {
              rendertemp._render = rendertemp._realRenderFunc;
              rendertemp._realRenderFunc = null;
            }
          });
          this.m_renders = [];
        };
        _proto.__renderUI = function __renderUI(level, batcher) {
          var render = this.m_renders[level];
          if (render && render.node.active) {
            render._realRenderFunc(batcher);
            return true;
          }
          return false;
        };
        _proto.getCellIndex = function getCellIndex() {
          return this.m_index;
        };
        _proto.setCellIndex = function setCellIndex(index) {
          this.m_index = index;
        };
        _proto.setTree = function setTree(tree) {
          this.m_tree = tree;
        };
        _proto.getCellData = function getCellData() {
          return this.m_data;
        };
        _proto.setData = function setData(idx, cellData, extendData) {
          this.m_index = idx;
          this.m_data = cellData;
          this.updateData(idx, cellData, extendData);
        };
        _proto.doClickCellItem = function doClickCellItem() {
          this.m_tree.doClickCellItem(this.m_index);
        };
        _proto.updateData = function updateData(idx, cellData, extendData) {};
        _proto.getCellSize = function getCellSize(idx, cellData) {
          var uitransform = this.node.getComponent(UITransform);
          if (uitransform) {
            return uitransform.contentSize;
          }
          return size(0, 0);
        };
        return TableViewCell;
      }(Component)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TaskSelectItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ModuleDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, Node, Color, Component, App, ModuleDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
      Label = module.Label;
      Node = module.Node;
      Color = module.Color;
      Component = module.Component;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
      cclegacy._RF.push({}, "28677cqK4BBsIu3dcNG6QWa", "TaskSelectItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var TaskSelectItem = exports('TaskSelectItem', (_dec = ccclass("TaskSelectItem"), _dec2 = property(Sprite), _dec3 = property(Sprite), _dec4 = property(Label), _dec5 = property(Node), _dec6 = property(Node), _dec7 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(TaskSelectItem, _Component);
        function TaskSelectItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "bg", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "imgIcon", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lbName", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "selectimg", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "maskNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "ingNode", _descriptor6, _assertThisInitialized(_this));
          _this._data = null;
          _this._onSelectCallback = void 0;
          _this._qualityColor = {
            2: "#ACFF57",
            3: "#8CEBFD",
            4: "#F392FF"
          };
          return _this;
        }
        var _proto = TaskSelectItem.prototype;
        _proto.setData = function setData(data) {
          this._data = data;
          this.updateView();
        };
        _proto.onItemRender = function onItemRender(data) {
          this._data = data;
          this.updateView();
        };
        _proto.updateView = function updateView() {
          if (!this._data) return;

          // 更新品质图标
          if (this.bg) {
            App.resMgr.loadImage(this.bg, ModuleDef.BASE_COMMON, "/texture/new_common/com_iconbg_0" + this._data.quality);
          }

          // 更新图标
          if (this._data.icon && this.imgIcon) {
            App.resMgr.loadImage(this.imgIcon, ModuleDef.PLACE_GAME_TASK, "/texture/mx_icon_0" + this._data.icon);
          }

          // 更新品质名称
          if (this.lbName) {
            this.lbName.string = this._data.name || "";
            this.lbName.color = new Color(this._qualityColor[this._data.quality]);
          }

          // 更新选中状态
          if (this.selectimg) {
            this.selectimg.active = this._data.isSelected;
          }
          if (this.maskNode) {
            this.maskNode.active = this._data.islock && this._data.id !== this._data.selectedTaskId;
          }
          if (this.ingNode) {
            this.ingNode.active = this._data.isIng;
          }
        };
        _proto.setSelectCallback = function setSelectCallback(callback) {
          this._onSelectCallback = callback;
        };
        _proto.onSelectClick = function onSelectClick() {
          if (this._data.islock && this._data.id !== this._data.selectedTaskId) return;
          if (this._onSelectCallback) {
            this._onSelectCallback(this._data);
          }
        };
        _proto.setSelected = function setSelected(selected) {
          if (this._data) {
            this._data.isSelected = selected;
          }
          if (this.selectimg) {
            this.selectimg.active = selected;
          }
        };
        _proto.getData = function getData() {
          return this._data;
        };
        return TaskSelectItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "bg", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "imgIcon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lbName", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "selectimg", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "maskNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "ingNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TeamHeroItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './ScrollListItem.ts', './Layout_TeamHeroItem.ts', './TeamMgr.ts', './ModuleDef.ts', './UtilGame.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, CCBoolean, Sprite, Node, Label, ProgressBar, App, ScrollListItem, Layout_TeamHeroItem, TeamMgr, HeroJobIcon, ModuleDef, UtilGame;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCBoolean = module.CCBoolean;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      Layout_TeamHeroItem = module.Layout_TeamHeroItem;
    }, function (module) {
      TeamMgr = module.TeamMgr;
      HeroJobIcon = module.HeroJobIcon;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _class3, _binding;
      cclegacy._RF.push({}, "8f541+IJOVOkIQyaL6ud4i+", "TeamHeroItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var TeamHeroItem = exports('TeamHeroItem', (_dec = ccclass("TeamHeroItem"), _dec2 = property(CCBoolean), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Sprite
      }), _dec6 = property({
        type: Node
      }), _dec7 = property({
        type: Label
      }), _dec8 = property({
        type: Node
      }), _dec9 = property({
        type: Label
      }), _dec10 = property({
        type: Sprite
      }), _dec11 = property({
        type: Node
      }), _dec12 = property({
        type: [Sprite]
      }), _dec13 = property({
        type: Node
      }), _dec14 = property({
        type: Sprite
      }), _dec15 = property({
        type: Label
      }), _dec16 = property({
        type: ProgressBar
      }), _dec17 = property({
        type: Label
      }), _dec18 = property({
        type: Node
      }), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(TeamHeroItem, _ScrollListItem);
        function TeamHeroItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "canClick", _descriptor, _assertThisInitialized(_this));
          /** 选中Sp */
          _initializerDefineProperty(_this, "selectedSp", _descriptor2, _assertThisInitialized(_this));
          // 头部背景
          _initializerDefineProperty(_this, "headBg", _descriptor3, _assertThisInitialized(_this));
          // 头像
          _initializerDefineProperty(_this, "headIcon", _descriptor4, _assertThisInitialized(_this));
          // 等级节点
          _initializerDefineProperty(_this, "levelNode", _descriptor5, _assertThisInitialized(_this));
          // 等级标签
          _initializerDefineProperty(_this, "lvLab", _descriptor6, _assertThisInitialized(_this));
          // 阶段节点
          _initializerDefineProperty(_this, "stageNode", _descriptor7, _assertThisInitialized(_this));
          // 阶段标签
          _initializerDefineProperty(_this, "stageLab", _descriptor8, _assertThisInitialized(_this));
          // 职业精灵
          _initializerDefineProperty(_this, "jobSp", _descriptor9, _assertThisInitialized(_this));
          // 星星节点
          _initializerDefineProperty(_this, "starNode", _descriptor10, _assertThisInitialized(_this));
          // 星星精灵数组
          _initializerDefineProperty(_this, "starSprites", _descriptor11, _assertThisInitialized(_this));
          // 锁定节点
          _initializerDefineProperty(_this, "lockNode", _descriptor12, _assertThisInitialized(_this));
          // 锁定精灵
          _initializerDefineProperty(_this, "lockSp", _descriptor13, _assertThisInitialized(_this));
          //激活文本
          _initializerDefineProperty(_this, "actLab", _descriptor14, _assertThisInitialized(_this));
          // 进度条
          _initializerDefineProperty(_this, "pieceBar", _descriptor15, _assertThisInitialized(_this));
          // 进度条标签
          _initializerDefineProperty(_this, "barLab", _descriptor16, _assertThisInitialized(_this));
          /** 已上阵 */
          _initializerDefineProperty(_this, "intoBattleNode", _descriptor17, _assertThisInitialized(_this));
          /** 打开的编队位置 */
          _this._currFormation = 0;
          _this.isCanAct = false;
          return _this;
        }
        var _proto = TeamHeroItem.prototype;
        _proto.onLoad = function onLoad() {
          if (this.canClick) {
            this.initItemButton_ifHas(TeamHeroItem.custom, Layout_TeamHeroItem);
          }
        };
        _proto.onBtnClick = function onBtnClick() {
          console.log("TeamHeroItem clicked:", this._data);
          // 这里可以添加点击后的逻辑，比如打开英雄详情界面
        };

        _proto.show = function show(data, index) {
          if (!data || !data.hero_id) return;
          this._currFormation = index;
          this._data = data; // 保存数据供点击事件使用
          // 从配置表获取激活需要的碎片数量
          var heroCfg = TeamMgr.inst.getHeroIdCfg(data.hero_id);
          UtilGame.loadHeroHeadIcon(this.headIcon, data.hero_id, "_list");
          App.resMgr.loadImage(this.jobSp, ModuleDef.BASE_COMMON, "/texture/new_common/" + HeroJobIcon[heroCfg.job].icon);
          UtilGame.loadHeroHeadBg(this.headBg, heroCfg.color);
          // 判断是否激活：有level且level > 0
          var isActivated = data.level && data.level > 0;
          if (isActivated) {
            // 激活状态：隐藏锁定节点，显示等级、阶级、星星
            this.lockNode.active = false;
            this.intoBattleNode.active = this._currFormation && TeamMgr.inst.isHeroIntoBattle(data.hero_id, this._currFormation);
            if (this.levelNode) {
              this.levelNode.active = true;
            }
            if (this.stageNode) {
              this.stageNode.active = true;
            }
            // 设置等级
            if (this.lvLab) {
              this.lvLab.string = data.level + "\u7EA7";
            }

            // 设置阶级
            if (this.stageLab) {
              this.stageLab.string = (data.stage || 0) + "\u9636";
            }

            // 设置星星显示
            if (this.starSprites && this.starSprites.length > 0) {
              var starCount = data.star || 0;
              for (var i = 0; i < this.starSprites.length; i++) {
                this.starSprites[i].node.active = i < starCount;
              }
            }
          } else {
            var _heroCfg$fenjie;
            // 未激活状态：显示锁定节点，隐藏等级、阶级、星星
            this.lockNode.active = true;
            this.intoBattleNode.active = false;
            if (this.levelNode) {
              this.levelNode.active = false;
            }
            if (this.starNode) {
              this.starNode.active = false;
            }
            if (this.stageNode) {
              this.stageNode.active = false;
            }

            // 查询背包中的英雄碎片
            var heroFragmentId = heroCfg.fenjie[0][0];
            var fragmentCount = App.bagMgr.getItemCount(heroFragmentId);
            var needFragmentCount = (heroCfg == null || (_heroCfg$fenjie = heroCfg.fenjie) == null || (_heroCfg$fenjie = _heroCfg$fenjie[0]) == null ? void 0 : _heroCfg$fenjie[1]) || 30; // 默认30个

            UtilGame.loadHeroHeadIcon(this.headIcon, data.hero_id);

            // 设置进度条
            if (this.pieceBar) {
              this.pieceBar.progress = Math.min(fragmentCount / needFragmentCount, 1);
            }
            var isCanAct = fragmentCount >= needFragmentCount;
            this.isCanAct = isCanAct;
            this.actLab.node.active = isCanAct;
            this.lockSp.node.active = !isCanAct;

            // 设置进度条标签
            if (this.barLab) {
              this.barLab.string = fragmentCount + "/" + needFragmentCount;
            }
          }
        };
        _proto.setSel = function setSel(b) {
          this.selectedSp.node.active = b;
        };
        _proto.activeteHero = function activeteHero(hero_id) {
          if (this.isCanAct) {
            TeamMgr.inst.reqActivateHero(hero_id);
          }
        }

        // public get data(): m_proto.IHero{
        //     return this._data
        // }
        ;

        return TeamHeroItem;
      }(ScrollListItem), _class3.custom = {
        binding: (_binding = {}, _binding["btnClick"] = {
          method: "onBtnClick"
        }, _binding)
      }, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "canClick", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "selectedSp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "headBg", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "headIcon", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "levelNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "lvLab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "stageNode", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "stageLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "jobSp", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "starNode", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "starSprites", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "lockSp", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "actLab", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "pieceBar", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "barLab", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "intoBattleNode", [_dec18], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TeamMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './App.ts', './NetChannelMgr.ts', './DBRecord.ts', './Singleton.ts', './Utils.ts', './UIMgr.ts', './UI_GetHeroView.ts', './Layout_UI_GetHeroView.ts', './UI_HeroSkillActivityTips.ts', './Layout_UI_HeroSkillActivityTips.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _createClass, cclegacy, MonitorType, ModType, App, netChannel, DBRecord, Singleton, Utils, UIMgr, LayerType, UI_GetHeroView, Layout_UI_GetHeroView, UI_HeroSkillActivityTips, Layout_UI_HeroSkillActivityTips;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Singleton = module.Singleton;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_GetHeroView = module.UI_GetHeroView;
    }, function (module) {
      Layout_UI_GetHeroView = module.Layout_UI_GetHeroView;
    }, function (module) {
      UI_HeroSkillActivityTips = module.UI_HeroSkillActivityTips;
    }, function (module) {
      Layout_UI_HeroSkillActivityTips = module.Layout_UI_HeroSkillActivityTips;
    }],
    execute: function () {
      var _SoldierName, _HeroJobIcon;
      cclegacy._RF.push({}, "ec9e68dsWxCB6s/WJDclx12", "TeamMgr", undefined);

      // 英雄分类枚举
      var HeroType = exports('HeroType', /*#__PURE__*/function (HeroType) {
        HeroType[HeroType["ALL"] = 0] = "ALL";
        HeroType[HeroType["MELEE"] = 1] = "MELEE";
        HeroType[HeroType["SHIELD"] = 2] = "SHIELD";
        HeroType[HeroType["RANGED"] = 3] = "RANGED";
        return HeroType;
      }({}));
      // 士兵分类枚举
      var SoldierType = exports('SoldierType', /*#__PURE__*/function (SoldierType) {
        SoldierType[SoldierType["ALL"] = 0] = "ALL";
        SoldierType[SoldierType["INFANTRY"] = 1] = "INFANTRY";
        SoldierType[SoldierType["ARCHER"] = 2] = "ARCHER";
        SoldierType[SoldierType["CAVALRY"] = 3] = "CAVALRY";
        SoldierType[SoldierType["SPECIAL"] = 4] = "SPECIAL";
        return SoldierType;
      }({}));
      var SoldierName = exports('SoldierName', (_SoldierName = {}, _SoldierName[SoldierType.ALL] = {
        name: "全部",
        icon: "com_zhiye_quanbu"
      }, _SoldierName[SoldierType.INFANTRY] = {
        name: "步兵",
        icon: "com_littleicon_bzbubing"
      }, _SoldierName[SoldierType.ARCHER] = {
        name: "工兵",
        icon: "com_littleicon_bzgongbing"
      }, _SoldierName[SoldierType.CAVALRY] = {
        name: "骑兵",
        icon: "com_littleicon_bzqibing"
      }, _SoldierName[SoldierType.SPECIAL] = {
        name: "特殊",
        icon: "com_littleicon_bzteshu"
      }, _SoldierName));
      var HeroJobIcon = exports('HeroJobIcon', (_HeroJobIcon = {}, _HeroJobIcon[HeroType.ALL] = {
        name: "全部",
        icon: "com_zhiye_quanbu"
      }, _HeroJobIcon[HeroType.MELEE] = {
        name: "近战",
        icon: "com_zhiye_zhanshi"
      }, _HeroJobIcon[HeroType.SHIELD] = {
        name: "盾",
        icon: "com_zhiye_tanke"
      }, _HeroJobIcon[HeroType.RANGED] = {
        name: "远程",
        icon: "com_zhiye_sheshou"
      }, _HeroJobIcon));
      var TeamMgr = exports('TeamMgr', /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(TeamMgr, _Singleton);
        function TeamMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          // 英雄相关数据
          _this._heroList = [];
          _this._soldierList = [];
          _this._formations = void 0;
          _this._currFormation = void 0;
          return _this;
        }
        var _proto = TeamMgr.prototype;
        //不能在构造函数调用
        _proto.init = function init() {
          this.reset();
          // 英雄相关监听
          App.monitorMgr.addEventListener(MonitorType.CMD_ResHeroList, this.onResHeroList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResNewHero, this.onResNewHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResActivateHero, this.onResActivateHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeHero, this.onResUpgradeHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpStageHero, this.resUpStageHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpStarHero, this.onResUpStarHero, this);

          // 士兵相关监听
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSoldierList, this.onResSoldierList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResNewSoldier, this.onResNewSoldier, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResActivateSoldier, this.onResActivateSoldier, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeSoldier, this.onResUpgradeSoldier, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpStageSoldier, this.onResUpStageSoldier, this);

          // 编队相关监听
          App.monitorMgr.addEventListener(MonitorType.CMD_ResFormationInfo, this.onResFormationInfo, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResFormationChangeName, this.onResFormationChangeName, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOn, this.onResOn, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUse, this.onResUse, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUnlockPos, this.onResUnlockPos, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResEnterDungeon, this.onResEnterDungeon, this);
        };
        _proto.dispose = function dispose() {
          App.monitorMgr.offTarget(this);
        };
        _proto.reset = function reset() {
          this._heroList = [];
          this._soldierList = [];
          this._formations = [];
        }

        // ==================== 英雄相关接口 ====================

        /** 获取英雄列表 (CMD_ReqHeroList - 47) */;
        _proto.reqHeroList = function reqHeroList() {
          var obj = {};
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqHeroList, obj);
        }

        /** 获取英雄列表返回 (CMD_ResHeroList - 48) */;
        _proto.onResHeroList = function onResHeroList(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          if (msg && msg.heros) {
            this._heroList = msg.heros;
            var hero_cfg = DBRecord._getRes("Hero");
            for (var key in hero_cfg) {
              if (!hero_cfg.hasOwnProperty(key)) continue;
              var element = hero_cfg[key];
              var hero_info = this.getHeroById(element.id);
              if (!hero_info) {
                var info = {};
                info.hero_id = element.id;
                info.level = 0;
                info.stage = 0;
                info.star = 0;
                info.zhuanwu_id = 0;
                info.zhuanwu_star = 0;
                info.attrs = null;
                this._heroList.push(info);
              }
            }
          }
        }

        /** 增加新英雄推送 (CMD_ResNewHero - 49) */;
        _proto.onResNewHero = function onResNewHero(msg) {
          if (msg && msg.code === 200) {
            for (var index = 0; index < this._heroList.length; index++) {
              var element = this._heroList[index];
              if (element.hero_id === msg.hero.hero_id) {
                this._heroList[index] = msg.hero;
                UIMgr.inst.open(UI_GetHeroView, LayerType.panel, Layout_UI_GetHeroView, [msg.hero]);
                break;
              }
            }
          }
        }

        /** 激活英雄请求 (CMD_ReqActivateHero - 50) */;
        _proto.reqActivateHero = function reqActivateHero(heroId) {
          var obj = {
            hero_id: heroId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqActivateHero, obj);
        }

        /** 激活英雄响应 (CMD_ResActivateHero - 51) */;
        _proto.onResActivateHero = function onResActivateHero(data) {
          if (data && data.code === 200) ;
        }

        /** 英雄升级请求 (CMD_ReqUpgradeHero - 52) */;
        _proto.reqUpgradeHero = function reqUpgradeHero(heroId) {
          var obj = {
            hero_id: heroId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUpgradeHero, obj);
        }

        /** 英雄升级响应 (CMD_ResUpgradeHero - 53) */;
        _proto.onResUpgradeHero = function onResUpgradeHero(msg) {
          if (msg && msg.code === 200 && msg.hero_id) {
            var heroIndex = this._heroList.findIndex(function (h) {
              return h.hero_id === msg.hero_id;
            });
            if (heroIndex !== -1) {
              this._heroList[heroIndex].level = msg.level;
            }
          }
        }

        /** 英雄升阶请求 (CMD_ReqUpStageHero - 54) */;
        _proto.reqUpStageHero = function reqUpStageHero(heroId) {
          var obj = {
            hero_id: heroId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUpStageHero, obj);
        }

        /** 英雄升阶响应 (CMD_ResUpStageHero - 55) */;
        _proto.resUpStageHero = function resUpStageHero(msg) {
          if (msg && msg.code === 200 && msg.hero_id) {
            var heroIndex = this._heroList.findIndex(function (h) {
              return h.hero_id === msg.hero_id;
            });
            if (heroIndex !== -1) {
              this._heroList[heroIndex].stage = msg.stage;
              this.checkBreakthroughSkill(this._heroList[heroIndex]);
            }
          }
        }

        /** 英雄升星请求 (CMD_ReqUpStarHero - 56) */;
        _proto.reqUpStarHero = function reqUpStarHero(heroId) {
          var obj = {
            hero_id: heroId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUpStarHero, obj);
        }

        /** 英雄升星响应 (CMD_ResUpStarHero - 57) */;
        _proto.onResUpStarHero = function onResUpStarHero(msg) {
          if (msg && msg.code === 200 && msg.hero_id) {
            var heroIndex = this._heroList.findIndex(function (h) {
              return h.hero_id === msg.hero_id;
            });
            if (heroIndex !== -1) {
              this._heroList[heroIndex].star = msg.star;
            }
          }
        }

        // ==================== 士兵相关接口 ====================

        /** 获取士兵列表 (CMD_ReqSoldierList - 58) */;
        _proto.reqSoldierList = function reqSoldierList() {
          var obj = {};
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqSoldierList, obj);
        }

        /** 获取士兵列表返回 (CMD_ResSoldierList - 59) */;
        _proto.onResSoldierList = function onResSoldierList(data) {
          if (data && data.code === 200 && data.soldiers) {
            this._soldierList = data.soldiers;
            var soldier_cfg = DBRecord._getRes("Soldier");
            for (var key in soldier_cfg) {
              if (!soldier_cfg.hasOwnProperty(key)) continue;
              var element = soldier_cfg[key];
              var soldier_info = this.getSoldierById(element.id);
              if (!soldier_info) {
                var info = {};
                info.soldier_id = element.id;
                info.level = 0;
                info.stage = 0;
                this._soldierList.push(info);
              }
            }
          }
        }

        /** 增加新士兵推送 (CMD_ResNewSoldier - 60) */;
        _proto.onResNewSoldier = function onResNewSoldier(msg) {
          if (msg && msg.code === 200) {
            for (var index = 0; index < this._soldierList.length; index++) {
              var element = this._soldierList[index];
              if (element.soldier_id === msg.soldier.soldier_id) {
                this._soldierList[index] = msg.soldier;
                // UIMgr.inst.open(UI_GetHeroView, LayerType.panel, Layout_UI_GetHeroView, [msg.hero]);
                break;
              }
            }
          }
        }

        /** 激活士兵请求 (CMD_ReqActivateSoldier - 61) */;
        _proto.reqActivateSoldier = function reqActivateSoldier(soldierId) {
          var obj = {
            soldier_id: soldierId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqActivateSoldier, obj);
        }

        /** 激活士兵响应 (CMD_ResActivateSoldier - 62) */;
        _proto.onResActivateSoldier = function onResActivateSoldier(data) {
          if (data && data.code === 200) ;
        }

        /** 士兵升级请求 (CMD_ReqUpgradeSoldier - 63) */;
        _proto.reqUpgradeSoldier = function reqUpgradeSoldier(soldierId) {
          var obj = {
            soldier_id: soldierId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUpgradeSoldier, obj);
        }

        /** 士兵升级响应 (CMD_ResUpgradeSoldier - 64) */;
        _proto.onResUpgradeSoldier = function onResUpgradeSoldier(msg) {
          if (msg && msg.code === 200) {
            var soldierIndex = this._soldierList.findIndex(function (h) {
              return h.soldier_id === msg.soldier_id;
            });
            if (soldierIndex !== -1) {
              this._soldierList[soldierIndex].level = msg.level;
            }
          }
        }

        /** 士兵升阶请求 (CMD_ReqUpStageSoldier - 65) */;
        _proto.reqUpStageSoldier = function reqUpStageSoldier(soldierId) {
          var obj = {
            soldier_id: soldierId
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUpStageSoldier, obj);
        }

        /** 士兵升阶响应 (CMD_ResUpStageSoldier - 66) */;
        _proto.onResUpStageSoldier = function onResUpStageSoldier(msg) {
          if (msg && msg.code === 200) {
            var soldierIndex = this._soldierList.findIndex(function (h) {
              return h.soldier_id === msg.soldier_id;
            });
            if (soldierIndex !== -1) {
              this._soldierList[soldierIndex].stage = msg.stage;
            }
          }
        }

        // ==================== 编队相关接口 ====================

        /** 请求编队信息 (CMD_ReqFormationInfo - 67) */;
        _proto.reqFormationInfo = function reqFormationInfo() {
          var obj = {};
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqFormationInfo, obj);
        }

        /** 响应编队信息 (CMD_ResFormationInfo - 68) */;
        _proto.onResFormationInfo = function onResFormationInfo(data) {
          if (data && data.code === 200 && data.formations) {
            this._formations = data.formations;
            this._formations.sort(function (a, b) {
              return (a.index || 0) - (b.index || 0);
            });
            this.updateCurrFormation();
          }
        };
        _proto.updateCurrFormation = function updateCurrFormation() {
          var _this2 = this;
          this._formations.forEach(function (item, _index) {
            // 对英雄列表按pos从小到大排序
            if (item.heros && item.heros.length > 0) {
              item.heros.sort(function (a, b) {
                return (a.pos || 0) - (b.pos || 0);
              });
            }

            // 对士兵列表按pos从小到大排序
            if (item.soldiers && item.soldiers.length > 0) {
              item.soldiers.sort(function (a, b) {
                return (a.pos || 0) - (b.pos || 0);
              });
            }
            if (item.current_formation === 1) {
              _this2._currFormation = item;
            }
          });
        };
        _proto.updateFormationList = function updateFormationList(data) {
          var typeList = [];
          this._formations.forEach(function (item, _index) {
            if (item.index === data.index) {
              if (data.type === 1) {
                typeList = item.heros;
              } else if (data.type === 2) {
                typeList = item.soldiers;
              }
              return;
            }
          });
          typeList.forEach(function (item, _index) {
            if (item.pos === data.pos) {
              item.id = data.id;
              return;
            }
          });
        }

        /** 编队改名请求 (CMD_ReqFormationChangeName - 69) */;
        _proto.reqFormationChangeName = function reqFormationChangeName(formationId, newName) {
          var obj = {
            index: formationId,
            name: newName
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqFormationChangeName, obj);
        }

        /** 编队改名响应 (CMD_ResFormationChangeName - 70) */;
        _proto.onResFormationChangeName = function onResFormationChangeName(data) {
          if (data && data.code === 200) {
            this._formations.forEach(function (item, _index) {
              if (item.index === data.index) {
                item.name = data.name;
                return;
              }
            });
          }
        }

        /** 上阵请求 (CMD_ReqOn - 71)
         * @param index 编队索引
         * @param type 1:表示上阵英雄， 2:表示上阵士兵
         * @param pos 编队位置
         * @param id 英雄id或者士兵id
         */;
        _proto.reqOn = function reqOn(index, type, pos, id) {
          var obj = {
            index: index,
            type: type,
            pos: pos,
            id: id
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqOn, obj);
        }

        /** 上阵响应 (CMD_ResOn - 72) */;
        _proto.onResOn = function onResOn(msg) {
          if (msg && msg.code === 200) {
            this.updateFormationList(msg);
          }
        }

        /** 使用编队请求 (CMD_ReqUse - 73) */;
        _proto.reqUse = function reqUse(index) {
          var obj = {
            index: index
          };
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqUse, obj);
        }

        /** 使用编队响应 (CMD_ResUse - 74) */;
        _proto.onResUse = function onResUse(msg) {
          if (msg && msg.code === 200) {
            // 遍历所有编队，更新current_formation状态
            if (this._formations && this._formations.length > 0) {
              for (var _iterator = _createForOfIteratorHelperLoose(this._formations), _step; !(_step = _iterator()).done;) {
                var formation = _step.value;
                if (formation.index === msg.cur_index) {
                  // 将匹配的编队设置为使用状态
                  formation.current_formation = 1;
                  this._currFormation = formation;
                } else {
                  // 其他编队设置为未使用状态
                  formation.current_formation = 0;
                }
              }
            }
          }
        }
        /**
         * 解锁编队位置响应
         * @param msg IResUnlockPos
         */;
        _proto.onResUnlockPos = function onResUnlockPos(msg) {
          if (msg && msg.code === 200) {
            // 遍历所有编队，更新current_formation状态
            if (this._formations && this._formations.length > 0) {
              for (var _iterator2 = _createForOfIteratorHelperLoose(this._formations), _step2; !(_step2 = _iterator2()).done;) {
                var formation = _step2.value;
                if (msg.type === 1) {
                  formation.heros.push({
                    pos: msg.pos,
                    id: msg.id
                  });
                } else {
                  for (var i = 0; i < formation.soldiers.length; i++) {
                    if (formation[i].pos === msg.pos) {
                      formation[i].id = msg.id;
                      break;
                    }
                  }
                }
              }
            }
          }
        }

        /**
         * 进入战斗返回
         */;
        _proto.onResEnterDungeon = function onResEnterDungeon(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.dungeonBattleMgr.onEnterDungeon(msg);
        }

        // ==================== Getter方法 ====================
        ;

        _proto.getHeroList = function getHeroList() {
          return this._heroList;
        };
        _proto.getHeroJobList = function getHeroJobList(job) {
          if (job === 0) {
            return this._heroList;
          }
          var list = [];
          // 遍历英雄列表，根据职业筛选
          this._heroList.forEach(function (hero) {
            // 从配置表获取英雄配置
            var heroCfg = DBRecord.fetchId("Hero", hero.hero_id);
            // 如果英雄职业匹配，添加到列表
            if (heroCfg && heroCfg.job === job) {
              list.push(hero);
            }
          });
          return list;
        };
        _proto.getSoldierList = function getSoldierList() {
          return this._soldierList;
        };
        /**
         * @param pos 编队位置
         * @param type 获取的编队类型：1 英雄编队， 2 士兵编队
         */
        _proto.getPosIUnit = function getPosIUnit(pos, type) {
          var info = null;
          var arr = null;
          if (type === 1) {
            arr = this._currFormation.heros;
          } else {
            arr = this._currFormation.soldiers;
          }
          arr.forEach(function (element) {
            if (element && element.pos === pos) {
              info = element;
              return element;
            }
          });
          return info;
        };
        _proto.getHeroById = function getHeroById(heroId) {
          return this._heroList.find(function (h) {
            return h.hero_id === heroId;
          });
        }
        /** 英雄是否已上阵 */;
        _proto.isHeroIntoBattle = function isHeroIntoBattle(heroId, pos) {
          if (!this._formations || this._formations.length === 0) {
            return false;
          }

          // 遍历当前编队
          for (var _iterator3 = _createForOfIteratorHelperLoose(this._formations), _step3; !(_step3 = _iterator3()).done;) {
            var formation = _step3.value;
            if (!pos) pos = formation.index;
            if (formation.heros && formation.heros.length > 0 && formation.index === pos) {
              // 检查该编队的英雄列表中是否存在该英雄ID
              var hero = formation.heros.find(function (unit) {
                return unit.id === heroId;
              });
              if (hero) {
                return true;
              }
            }
          }
          return false;
        };
        _proto.getSoldierById = function getSoldierById(soldierId) {
          return this._soldierList.find(function (s) {
            return s.soldier_id === soldierId;
          });
        }
        /** 士兵是否已上阵 */;
        _proto.isSoldierIntoBattle = function isSoldierIntoBattle(soldierId, pos) {
          if (!this._formations || this._formations.length === 0) {
            return false;
          }

          // 遍历所有编队
          for (var _iterator4 = _createForOfIteratorHelperLoose(this._formations), _step4; !(_step4 = _iterator4()).done;) {
            var formation = _step4.value;
            if (!pos) pos = formation.index;
            if (formation.soldiers && formation.soldiers.length > 0 && formation.index === pos) {
              // 检查该编队的英雄列表中是否存在该士兵ID
              var soldier = formation.soldiers.find(function (unit) {
                return unit.id === soldierId;
              });
              if (soldier) {
                return true;
              }
            }
          }
          return false;
        };
        _proto.getSoldierJobList = function getSoldierJobList(job) {
          if (job === 0) {
            return this._soldierList;
          }
          var list = [];
          // 遍历英雄列表，根据职业筛选
          this._soldierList.forEach(function (soldier) {
            // 从配置表获取英雄配置
            var soldierCfg = DBRecord.fetchId("Soldier", soldier.soldier_id);
            // 如果英雄职业匹配，添加到列表
            if (soldierCfg && soldierCfg.job === job) {
              list.push(soldier);
            }
          });
          return list;
        }

        // ==================== Getter获取配置方法 ====================
        /**
         * 根据英雄id获取英雄配置
         * @param hero_id 英雄id
         * @returns
         */;
        _proto.getHeroIdCfg = function getHeroIdCfg(hero_id) {
          // 从配置表获取英雄配置
          var heroCfg = DBRecord.fetchId("Hero", hero_id);
          if (!heroCfg) {
            App.log.logBusiness("获取英雄配置失败-heroId:" + hero_id);
          }
          return heroCfg;
        }
        /**
         * 获取英雄等级配置
         * @param hero_id 英雄id
         * @param hero_lv 英雄等级
         * @returns
         */;
        _proto.getHeroLevelCfg = function getHeroLevelCfg(hero_id, hero_lv) {
          var level_id = hero_id * 1000 + hero_lv;
          var level_cfg = DBRecord.fetchId("Hero_Level", level_id);
          if (!level_cfg) {
            App.log.logBusiness("获取英雄等级配置配置失败-heroId:" + hero_id + " level:" + hero_lv);
          }
          return level_cfg;
        }
        /**
         * 获取英雄阶级配置
         * @param hero_id 英雄id
         * @param hero_stage 英雄等级
         * @returns
         */;
        _proto.getHeroStageCfg = function getHeroStageCfg(hero_id, hero_stage) {
          var stage_id = hero_id * 1000 + hero_stage;
          var stage_cfg = DBRecord.fetchId("Hero_Stage", stage_id);
          if (!stage_cfg) {
            App.log.logBusiness("获取英雄阶级配置配置失败-heroId:" + hero_id + " stage:" + hero_stage);
          }
          return stage_cfg;
        }
        /**
         * 获取英雄星级配置
         * @param hero_id 英雄id
         * @param hero_star 英雄星级
         * @returns
         */;
        _proto.getHeroStarCfg = function getHeroStarCfg(hero_id, hero_star) {
          var star_id = hero_id * 1000 + hero_star;
          var star_cfg = DBRecord.fetchId("Hero_Star", star_id);
          if (!star_cfg) {
            App.log.logBusiness("获取英雄星级配置配置失败-heroId:" + hero_id + " star:" + hero_star);
          }
          return star_cfg;
        }
        /**
         * 获取英雄升级属性 +下一级属性
         * @param id 英雄id
         * @param level 英雄等级
         * * @param type 1或者null，默认为英雄； 2为士兵
         * @returns 返回属性数组，每个属性包含 {icon, name, value, nextValue}
         */;
        _proto.getAttrInfo = function getAttrInfo(id, level, type) {
          // 属性ID映射：max_hp:3  atk:1  def:2  movespeed:7
          var attrMap = [{
            key: "max_hp",
            id: 3
          }, {
            key: "atk",
            id: 1
          }, {
            key: "def",
            id: 2
          }, {
            key: "movespeed",
            id: 7
          }];

          // 获取当前等级配置
          var currentLevelCfg = null;
          if (type === 2) {
            currentLevelCfg = this.getSoldierLevelCfg(id, level);
          } else {
            currentLevelCfg = this.getHeroLevelCfg(id, level);
          }

          // if (!currentLevelCfg) {
          //     return [];
          // }

          // 获取下一级配置
          var nextLevelCfg = null;
          if (type === 2) {
            nextLevelCfg = this.getSoldierLevelCfg(id, level + 1);
          } else {
            nextLevelCfg = this.getHeroLevelCfg(id, level + 1);
          }
          var attrInfoList = [];

          // 遍历四个属性
          for (var _i = 0, _attrMap = attrMap; _i < _attrMap.length; _i++) {
            var attr = _attrMap[_i];
            var currentValue = currentLevelCfg && currentLevelCfg[attr.key] || 0;
            var nextValue = nextLevelCfg ? nextLevelCfg[attr.key] || 0 : currentValue;

            // 通过Utils.getVitName获取属性名称和图标
            var _Utils$getVitName = Utils.getVitName(attr.id, currentValue),
              name = _Utils$getVitName[0],
              _valueStr = _Utils$getVitName[1],
              icon = _Utils$getVitName[2];
            if (attr.id === 7) {
              name = "移速";
            }
            attrInfoList.push({
              icon: icon,
              name: name,
              value: currentValue,
              nextValue: nextValue
            });
          }
          return attrInfoList;
        }
        /**
         * 获取英雄技能信息
         * @param hero_id 英雄id
         * @param hero_stage 英雄阶级
         * @param hero_star 英雄星级
         * @returns 返回技能ID数组，排序：atk_id -> hero_star.skill_id -> hero_stage.skill_id
         */;
        _proto.getHeroSkillInfo = function getHeroSkillInfo(hero_id, hero_stage, hero_star) {
          var skillIds = [];
          var skillLists = [];

          // 1. 获取当前阶级配置中的 atk_id
          var stageCfg = this.getHeroStageCfg(hero_id, hero_stage > 0 ? hero_stage : 1);
          if (stageCfg && stageCfg.atk_id) {
            var skillCfg = DBRecord.fetchId("Skill", stageCfg.atk_id);
            skillLists.push({
              hero_id: hero_id,
              type: skillCfg.type,
              cfg: skillCfg,
              activate: hero_stage > 0
            });
            if (stageCfg.skill_id && hero_stage > 0) {
              skillIds = stageCfg.skill_id;
            }
          }

          // 2. 获取星级配置中的 skill_id
          var starCfg = this.getHeroStarCfg(hero_id, hero_star > 0 ? hero_star : 1);
          if (starCfg && starCfg.skill_id) {
            var _skillCfg = DBRecord.fetchId("Skill", starCfg.skill_id);
            skillLists.push({
              hero_id: hero_id,
              type: _skillCfg.type,
              cfg: _skillCfg,
              activate: hero_star > 0
            });
            if (hero_star > 0) {
              skillIds.push(starCfg.skill_id);
            }
          }

          // 3. 获取当前英雄最高阶级的 skill_id 列表
          var cfgs = DBRecord.fetchKvs("Hero_Stage", {
            hero: hero_id
          });
          if (cfgs && cfgs.length > 0) {
            // 找到最大阶级的配置
            var maxStageCfg = cfgs[cfgs.length - 1];

            // 将最大阶级的 skill_id 列表添加到 skillIds
            if (maxStageCfg && maxStageCfg.skill_id && maxStageCfg.skill_id.length > 0) {
              maxStageCfg.skill_id.forEach(function (skillId) {
                var skillCfg = DBRecord.fetchId("Skill", skillId);
                if (skillCfg) {
                  skillLists.push({
                    hero_id: hero_id,
                    type: skillCfg.type,
                    cfg: skillCfg,
                    activate: Array.isArray(skillIds) && skillIds.includes(skillId)
                  });
                }
              });
            }
          }
          return skillLists;
        }
        /**
         * 获取技能激活的阶级
         * @param hero_id 英雄ID
         * @param skill_id 技能ID
         */;
        _proto.getHeroSkillActStage = function getHeroSkillActStage(hero_id, skill_id) {
          var cfgs = DBRecord.fetchKvs("Hero_Stage", {
            hero: hero_id
          });
          var stage = 1;
          for (var i = 0; i < cfgs.length; i++) {
            var skillIds = cfgs[i].skill_id;
            if (skillIds && skillIds.includes(skill_id)) {
              stage = cfgs[i].stage;
              break;
            }
          }
          return stage;
        }
        /**
         * 获取英雄升级消耗
         * @param hero_id 英雄id
         * @param hero_lv 英雄等级
         * @returns
         */;
        _proto.getHeroUpLevelCost = function getHeroUpLevelCost(hero_id, hero_lv) {
          var cfg = this.getHeroLevelCfg(hero_id, hero_lv + 1);
          var costs = [];
          if (cfg && cfg.cost_item) {
            costs = cfg.cost_item[0];
          }
          return costs;
        };
        _proto.getHeroSkillCfg = function getHeroSkillCfg(skill_id) {
          var cfg = DBRecord.fetchId("Skill", skill_id);
          return cfg;
        }

        /**
         * 检查是否需要突破
         * @param data 英雄数据
         * @returns true表示需要突破，false表示可以继续升级
         */;
        _proto.checkNeedBreakthrough = function checkNeedBreakthrough(data) {
          // 获取下一级的配置
          var nextLevelCfg = this.getHeroLevelCfg(data.hero_id, data.level + 1);
          if (!nextLevelCfg) {
            // 没有下一级配置，可能已经满级
            return false;
          }

          // 如果下一级配置要求的stage大于当前stage，则需要突破
          return nextLevelCfg.stage > data.stage;
        }
        /**
         * 检查突破是否解锁新技能
         * @param data 英雄数据
         */;
        _proto.checkBreakthroughSkill = function checkBreakthroughSkill(data) {
          // 获取上一级的配置
          var upStageCfg = this.getHeroStageCfg(data.hero_id, data.stage - 1);
          var curStageCfg = this.getHeroStageCfg(data.hero_id, data.stage);
          if (upStageCfg.skill_id && upStageCfg.skill_id.length === curStageCfg.skill_id.length) {
            return;
          }
          if (!upStageCfg.skill_id) {
            var skillData = null;
            if (curStageCfg && curStageCfg.skill_id) {
              var skillCfg = DBRecord.fetchId("Skill", curStageCfg.skill_id[0]);
              skillData = {
                hero_id: data.hero_id,
                type: skillCfg.type,
                cfg: skillCfg,
                activate: true
              };
            }
            UIMgr.inst.open(UI_HeroSkillActivityTips, LayerType.touchTip, Layout_UI_HeroSkillActivityTips, [skillData]);
            return;
          }
          for (var index = 0; index < curStageCfg.skill_id.length; index++) {
            var skill_id = curStageCfg.skill_id[index];
            if (!upStageCfg.skill_id.includes(skill_id)) {
              var _skillData = null;
              if (curStageCfg && curStageCfg.skill_id) {
                var _skillCfg2 = DBRecord.fetchId("Skill", skill_id);
                _skillData = {
                  hero_id: data.hero_id,
                  type: _skillCfg2.type,
                  cfg: _skillCfg2,
                  activate: true
                };
              }
              UIMgr.inst.open(UI_HeroSkillActivityTips, LayerType.touchTip, Layout_UI_HeroSkillActivityTips, [_skillData]);
              break;
            }
          }
        }

        /**
         * 根据士兵id获取士兵配置
         * @param soldier_id 士兵id
         * @returns
         */;
        _proto.getSoldierIdCfg = function getSoldierIdCfg(soldier_id) {
          // 从配置表获取士兵配置
          var soldierCfg = DBRecord.fetchId("Soldier", soldier_id);
          if (!soldierCfg) {
            App.log.logBusiness("获取士兵配置失败-heroId:" + soldier_id);
          }
          return soldierCfg;
        }
        /**
         * 获取士兵升级消耗
         * @param soldier_id 士兵id
         * @param soldier_lv 士兵等级
         * @returns
         */;
        _proto.getSoldierUpLevelCost = function getSoldierUpLevelCost(soldier_id, soldier_lv) {
          var cfg = this.getSoldierLevelCfg(soldier_id, soldier_lv + 1);
          var costs = [];
          if (cfg && cfg.cost_item) {
            costs = cfg.cost_item;
          }
          return costs;
        }
        /**
         * 获取士兵等级配置
         * @param soldier_id 士兵id
         * @param soldier_lv 士兵等级
         * @returns
         */;
        _proto.getSoldierLevelCfg = function getSoldierLevelCfg(soldier_id, soldier_lv) {
          var level_id = soldier_id * 1000 + soldier_lv;
          var level_cfg = DBRecord.fetchId("Soldier_Level", level_id);
          if (!level_cfg) {
            App.log.logBusiness("获取soldier等级配置配置失败-heroId:" + soldier_id + " level:" + soldier_lv);
          }
          return level_cfg;
        }
        /**
         * 获取士兵阶级配置
         * @param soldier_id 士兵id
         * @param soldier_stage 士兵阶级
         * @returns
         */;
        _proto.getSoldierStageCfg = function getSoldierStageCfg(soldier_id, soldier_stage) {
          var stage_id = soldier_id * 1000 + soldier_stage;
          var stage_cfg = DBRecord.fetchId("Soldier_Stage", stage_id);
          if (!stage_cfg) {
            App.log.logBusiness("获取士兵阶级配置配置失败-soldierId:" + soldier_id + " stage:" + soldier_stage);
          }
          return stage_cfg;
        }
        /**
         * 获取士兵升级消耗
         * @param soldier_id 士兵id
         * @param soldier_stage 士兵阶级
         * @returns
         */;
        _proto.getSoldierUpStageCost = function getSoldierUpStageCost(soldier_id, soldier_stage) {
          var cfg = this.getSoldierStageCfg(soldier_id, soldier_stage + 1);
          var costs = [];
          if (cfg && cfg.cost_item) {
            costs = cfg.cost_item[0];
          }
          return costs;
        }
        /**
         * 获取士兵进阶效果
         * @param soldier_id 士兵id
         * @param soldier_stage 当前士兵阶级
         * @returns 返回阶级效果数组，每个阶级包含 {stage, morale, desc, isAct}
         */;
        _proto.getStageResultInfos = function getStageResultInfos(soldier_id, soldier_stage) {
          // 获取该士兵的所有阶级配置
          var cfgs = DBRecord.fetchKvs("Soldier_Stage", {
            soldier: soldier_id
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logBusiness("获取士兵阶级配置列表失败-soldierId:" + soldier_id);
            return [];
          }

          // 按阶级排序
          cfgs.sort(function (a, b) {
            return a.stage - b.stage;
          });
          var stageResultList = [];

          // 遍历所有阶级配置
          for (var i = 0; i < cfgs.length; i++) {
            var cfg = cfgs[i];
            // 获取当前级配置的 cost_shiqi 作为消耗士气
            // const nextCfg = cfgs[i + 1];
            var morale = cfg ? cfg.cost_shiqi || 0 : 0;
            stageResultList.push({
              stage: cfg.stage,
              // 阶级
              morale: morale,
              // 消耗士气（下一级的cost_shiqi）
              desc: cfg.desc || "",
              // 进阶描述
              isAct: cfg.stage <= soldier_stage // 是否已激活（当前阶级大于等于配置阶级）
            });
          }

          return stageResultList;
        }
        /**
         * 获取士兵战斗相关
         * @param soldier_id 士兵id
         * @returns [cd,membernum,population]--[刷新间隔，没出刷出数量，人口上限]
         */;
        _proto.getSoldierBattle = function getSoldierBattle(soldier_id) {
          var numArr = [];
          var info = this.getSoldierById(soldier_id);
          var cfg = this.getSoldierStageCfg(soldier_id, info.stage);
          if (cfg) {
            return [cfg.cd, cfg.membernum, cfg.population];
          }
          return numArr;
        }
        /**
         * 获取随机副本
         * @returns
         */;
        _proto.getRandomDungeonId = function getRandomDungeonId() {
          var cfgs = DBRecord.fetchKvs("Fb", {
            type: 1
          });
          if (!cfgs || cfgs.length === 0) {
            App.log.logBusiness("获取副本配置列表失败");
            return 0;
          }
          var randCfg = cfgs[Math.floor(Math.random() * cfgs.length)];
          return randCfg.id;
        };
        _createClass(TeamMgr, [{
          key: "formations",
          get: function get() {
            return this._formations;
          }
        }, {
          key: "currFormation",
          get: function get() {
            return this._currFormation;
          }
        }]);
        return TeamMgr;
      }(Singleton()));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TeamMyItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './HeroAvatarItem.ts', './SoldierAvatarItem.ts', './ScrollListItem.ts', './TeamMgr.ts', './UIUtil.ts', './UIMgr.ts', './UI_TeamHeroListView.ts', './Layout_UI_TeamHeroListView.ts', './UI_TeamSoldierListView.ts', './Layout_UI_TeamSoldierListView.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Label, Button, EditBox, HeroAvatarItem, SoldierAvatarItem, ScrollListItem, TeamMgr, UIUtil, UIMgr, LayerType, UI_TeamHeroListView, Layout_UI_TeamHeroListView, UI_TeamSoldierListView, Layout_UI_TeamSoldierListView;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Label = module.Label;
      Button = module.Button;
      EditBox = module.EditBox;
    }, function (module) {
      HeroAvatarItem = module.HeroAvatarItem;
    }, function (module) {
      SoldierAvatarItem = module.SoldierAvatarItem;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_TeamHeroListView = module.UI_TeamHeroListView;
    }, function (module) {
      Layout_UI_TeamHeroListView = module.Layout_UI_TeamHeroListView;
    }, function (module) {
      UI_TeamSoldierListView = module.UI_TeamSoldierListView;
    }, function (module) {
      Layout_UI_TeamSoldierListView = module.Layout_UI_TeamSoldierListView;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
      cclegacy._RF.push({}, "838b9m9/TxHob38OCODWf4H", "TeamMyItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var TeamMyItem = exports('TeamMyItem', (_dec = ccclass("TeamMyItem"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Label
      }), _dec4 = property({
        type: Button
      }), _dec5 = property({
        type: Node
      }), _dec6 = property([HeroAvatarItem]), _dec7 = property({
        type: Node
      }), _dec8 = property([SoldierAvatarItem]), _dec9 = property({
        type: Button
      }), _dec10 = property({
        type: Node
      }), _dec11 = property({
        type: EditBox
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(TeamMyItem, _ScrollListItem);
        function TeamMyItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          /** 名称标签节点 */
          _initializerDefineProperty(_this, "nameNode", _descriptor, _assertThisInitialized(_this));
          /** 名称标签 - 显示"我的阵容1"等 */
          _initializerDefineProperty(_this, "nameLab", _descriptor2, _assertThisInitialized(_this));
          /** 名称修改按钮 */
          _initializerDefineProperty(_this, "btnChange", _descriptor3, _assertThisInitialized(_this));
          /** 英雄节点容器 */
          _initializerDefineProperty(_this, "heroNode", _descriptor4, _assertThisInitialized(_this));
          /** 英雄阵容列表 - HeroAvatarItem-001 到 004 */
          _initializerDefineProperty(_this, "heroList", _descriptor5, _assertThisInitialized(_this));
          /** 士兵节点容器 */
          _initializerDefineProperty(_this, "soldierNode", _descriptor6, _assertThisInitialized(_this));
          /** 士兵阵容列表 - SoldierAvatarItem-001 到 004 */
          _initializerDefineProperty(_this, "soldierList", _descriptor7, _assertThisInitialized(_this));
          /** 使用按钮 */
          _initializerDefineProperty(_this, "btnUse", _descriptor8, _assertThisInitialized(_this));
          /** 标签节点 - 显示"使用"文本 */
          _initializerDefineProperty(_this, "txtUse", _descriptor9, _assertThisInitialized(_this));
          /** 隐藏的输入框节点 - 用于调起系统输入法 */
          _initializerDefineProperty(_this, "nameEditBox", _descriptor10, _assertThisInitialized(_this));
          _this._formationData = null;
          return _this;
        }
        var _proto = TeamMyItem.prototype;
        _proto.onLoad = function onLoad() {
          this.nameEditBox.string = "";
          // 绑定按钮事件
          if (this.btnChange) {
            this.btnChange.node.on(Node.EventType.TOUCH_END, this.onChangeName, this);
          }
          if (this.btnUse) {
            this.btnUse.node.on(Node.EventType.TOUCH_END, this.onUseFormation, this);
          }
          // nameEditBox监听点击输入框正在输入状态事件
          if (this.nameEditBox) {
            this.nameEditBox.node.on(EditBox.EventType.EDITING_DID_BEGAN, this.onEditBoxFocus, this);
            // 监听输入完成事件
            this.nameEditBox.node.on(EditBox.EventType.EDITING_DID_ENDED, this.onNameEditEnded, this);
          }
        };
        _proto.onDestroy = function onDestroy() {
          if (this.btnChange && this.btnChange.node) {
            this.btnChange.node.off(Node.EventType.TOUCH_END, this.onChangeName, this);
          }
          if (this.btnUse && this.btnUse.node) {
            this.btnUse.node.off(Node.EventType.TOUCH_END, this.onUseFormation, this);
          }
          if (this.nameEditBox && this.btnChange.node) {
            this.nameEditBox.node.off(EditBox.EventType.EDITING_DID_BEGAN, this.onEditBoxFocus, this);
            this.nameEditBox.node.off(EditBox.EventType.EDITING_DID_ENDED, this.onNameEditEnded, this);
          }
        }

        /**
         * 显示编队信息
         * @param formationData 编队数据
         */;
        _proto.show = function show(formationData) {
          this._formationData = formationData;
          // 设置编队名称
          if (this.nameLab && formationData.name) {
            this.nameLab.string = formationData.name;
          }

          // 更新英雄列表
          if (this.heroList && formationData.heros) {
            for (var i = 0; i < this.heroList.length; i++) {
              var heroItem = this.heroList[i];
              if (!heroItem) continue;
              heroItem._onTouchCb = this.onClickHero.bind(this);
              var heroData = formationData.heros[i];
              heroItem.setConditionLab(false);
              if (heroItem && heroData && heroData.pos) {
                heroItem.show(heroData, heroData.pos, formationData.index);
              } else {
                heroItem.show(heroData, i + 1, formationData.index);
              }
            }
          }

          // 更新士兵列表
          if (this.soldierList && formationData.soldiers) {
            for (var _i = 0; _i < this.soldierList.length; _i++) {
              var soldierItem = this.soldierList[_i];
              var soldierData = formationData.soldiers[_i];
              if (soldierItem) {
                soldierItem._onTouchCb = this.onClickSoldier.bind(this);
                soldierItem.show(soldierData, soldierData.pos, formationData.index);
              }
            }
          }

          // 设置使用按钮状态
          var isCurrentFormation = formationData.current_formation === 1;
          console.log("我的阵容使用按钮状态：", formationData.index, formationData.current_formation);
          this.updateButtonState(isCurrentFormation);
        };
        _proto.onClickHero = function onClickHero(item, data) {
          if (!item) return;
          if (item._isLocked) {
            return;
          }
          UIMgr.inst.open(UI_TeamHeroListView, LayerType.panel, Layout_UI_TeamHeroListView, [{
            pos: data.pos,
            index: item._currFormation,
            type: "add"
          }], function () {});
        };
        _proto.onClickSoldier = function onClickSoldier(item, data) {
          if (!item) return;
          if (item._isLocked) {
            return;
          }
          UIMgr.inst.open(UI_TeamSoldierListView, LayerType.panel, Layout_UI_TeamSoldierListView, [{
            pos: data.pos,
            index: item._currFormation,
            type: "add"
          }], function () {});
        };
        _proto.onEditBoxFocus = function onEditBoxFocus() {
          if (!this.nameEditBox) {
            console.error("nameEditBox 未配置");
            return;
          }

          // 设置当前名称到输入框
          if (this.nameLab) {
            this.nameEditBox.string = this.nameLab.string;
          }
          this.nameNode.active = false;
        }

        /**
         * 修改编队名称
         */;
        _proto.onChangeName = function onChangeName() {
          if (!this.nameEditBox) {
            console.error("nameEditBox 未配置");
            return;
          }

          // 设置当前名称到输入框
          if (this.nameLab) {
            this.nameEditBox.string = this.nameLab.string;
          }
          this.nameNode.active = false;

          // 聚焦输入框，调起系统输入法
          this.nameEditBox.focus();
        }

        /**
         * 输入完成回调
         */;
        _proto.onNameEditEnded = function onNameEditEnded(editBox) {
          var newName = editBox.string.trim();
          this.nameNode.active = true;

          // 如果输入为空或未改变，则不处理
          if (!newName || newName === this.nameLab.string) {
            return;
          }

          // 调用服务器接口保存新名称
          if (this._formationData && this._formationData.index !== undefined) {
            TeamMgr.inst.reqFormationChangeName(this._formationData.index, newName);
            this.nameEditBox.string = "";
          }
        }

        /**
         * 使用该编队
         */;
        _proto.onUseFormation = function onUseFormation() {
          console.log("使用该编队");
          // TODO: 调用使用编队接口
          TeamMgr.inst.reqUse(this._formationData.index);
        }

        /**
         * 更新按钮状态
         * @param isCurrentFormation 是否为当前使用的编队
         */;
        _proto.updateButtonState = function updateButtonState(isCurrentFormation) {
          if (this.btnUse) {
            this.btnUse.interactable = !isCurrentFormation;
            UIUtil.setButtonEnable(this.btnUse, !isCurrentFormation, isCurrentFormation);
          }

          // 更新按钮文本
          if (this.txtUse) {
            var label = this.txtUse.getComponent(Label);
            if (label) {
              label.string = isCurrentFormation ? "当前上阵" : "使用";
            }
          }
        }
        /** 编队改名响应 (CMD_ResFormationChangeName - 70) */;
        _proto.updateChangeName = function updateChangeName(name) {
          this.nameEditBox.string = "";
          this.nameLab.string = name;
          this.nameNode.active = true;
        };
        return TeamMyItem;
      }(ScrollListItem), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "nameNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "btnChange", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "heroNode", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "heroList", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "soldierNode", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "soldierList", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "btnUse", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "txtUse", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "nameEditBox", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TeamSoldierItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './ScrollListItem.ts', './Layout_TeamSoldierItem.ts', './TeamMgr.ts', './UtilGame.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, CCBoolean, Sprite, Node, Label, Color, DBRecord, ScrollListItem, Layout_TeamSoldierItem, TeamMgr, UtilGame, PlaceGameMgr, PlaceConfigMgr, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      CCBoolean = module.CCBoolean;
      Sprite = module.Sprite;
      Node = module.Node;
      Label = module.Label;
      Color = module.Color;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      Layout_TeamSoldierItem = module.Layout_TeamSoldierItem;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _class3, _binding;
      cclegacy._RF.push({}, "f05330M+49ONoXosnsCJB5j", "TeamSoldierItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var TeamSoldierItem = exports('TeamSoldierItem', (_dec = ccclass("TeamSoldierItem"), _dec2 = property(CCBoolean), _dec3 = property({
        type: Sprite
      }), _dec4 = property({
        type: Sprite
      }), _dec5 = property({
        type: Sprite
      }), _dec6 = property({
        type: Node
      }), _dec7 = property([Sprite]), _dec8 = property({
        type: Node
      }), _dec9 = property({
        type: Label
      }), _dec10 = property({
        type: Label
      }), _dec11 = property({
        type: Node
      }), _dec12 = property({
        type: Label
      }), _dec13 = property({
        type: Sprite
      }), _dec14 = property({
        type: Node
      }), _dec15 = property({
        type: Sprite
      }), _dec16 = property({
        type: Label
      }), _dec17 = property({
        type: Node
      }), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(TeamSoldierItem, _ScrollListItem);
        function TeamSoldierItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "canClick", _descriptor, _assertThisInitialized(_this));
          // 背景精灵
          _initializerDefineProperty(_this, "bgSp", _descriptor2, _assertThisInitialized(_this));
          // 阴影精灵
          _initializerDefineProperty(_this, "yinyingSp", _descriptor3, _assertThisInitialized(_this));
          // 士兵图标精灵
          _initializerDefineProperty(_this, "soldierSp", _descriptor4, _assertThisInitialized(_this));
          // 显示节点
          _initializerDefineProperty(_this, "displayNode", _descriptor5, _assertThisInitialized(_this));
          // 阶段节点数组
          _initializerDefineProperty(_this, "danSprites", _descriptor6, _assertThisInitialized(_this));
          // 等级节点
          _initializerDefineProperty(_this, "levelNode", _descriptor7, _assertThisInitialized(_this));
          // 等级标签
          _initializerDefineProperty(_this, "lvLab", _descriptor8, _assertThisInitialized(_this));
          // 名称标签
          _initializerDefineProperty(_this, "nameLab", _descriptor9, _assertThisInitialized(_this));
          // 阶段节点
          _initializerDefineProperty(_this, "stageNode", _descriptor10, _assertThisInitialized(_this));
          // 阶段标签
          _initializerDefineProperty(_this, "stageLabel", _descriptor11, _assertThisInitialized(_this));
          // 选中精灵
          _initializerDefineProperty(_this, "selectSp", _descriptor12, _assertThisInitialized(_this));
          // 锁定节点
          _initializerDefineProperty(_this, "lockNode", _descriptor13, _assertThisInitialized(_this));
          // 锁定精灵
          _initializerDefineProperty(_this, "lockSp", _descriptor14, _assertThisInitialized(_this));
          // 锁定标签
          _initializerDefineProperty(_this, "lockLab", _descriptor15, _assertThisInitialized(_this));
          // 已上阵节点
          _initializerDefineProperty(_this, "intoBattleNode", _descriptor16, _assertThisInitialized(_this));
          _this._data = void 0;
          /** 打开的编队Index */
          _this._currFormation = 0;
          _this.isCanAct = false;
          return _this;
        }
        var _proto = TeamSoldierItem.prototype;
        _proto.onLoad = function onLoad() {
          if (this.canClick) {
            this.initItemButton_ifHas(TeamSoldierItem.custom, Layout_TeamSoldierItem);
          }
        };
        _proto.onBtnClick = function onBtnClick() {
          console.log("TeamSoldierItem clicked:", this._data);
        };
        _proto.show = function show(data, index) {
          if (!data || !data.soldier_id) return;
          this._data = data;
          this._currFormation = index;
          var soldierCfg = TeamMgr.inst.getSoldierIdCfg(data.soldier_id);
          UtilGame.loadSoldierHeadIcon(this.soldierSp, soldierCfg.id, "_list");
          // 设置名称
          if (this.nameLab && soldierCfg) {
            this.nameLab.string = soldierCfg.name;
          }

          // 判断是否激活：有level且level > 0
          var isActivated = data.level && data.level > 0;
          if (isActivated) {
            // 激活状态：隐藏锁定节点，显示等级、阶级等信息
            this.lockNode.active = false;
            this.intoBattleNode.active = this._currFormation && TeamMgr.inst.isSoldierIntoBattle(data.soldier_id, this._currFormation);

            // 设置等级
            if (this.lvLab) {
              this.lvLab.string = data.level + "\u7EA7";
            }

            // 设置阶级
            if (this.stageNode && data.stage) {
              this.stageNode.active = true;
              // 根据阶级设置显示
              this.stageLabel.string = data.stage + "\u9636";
            }

            // 设置阶段显示（dan1, dan2, dan3）
            if (this.danSprites && this.danSprites.length > 0) {
              var stage_id = data.soldier_id * 1000 + 1;
              var _soldierCfg = DBRecord.fetchId("Soldier_Stage", stage_id);
              for (var i = 0; i < this.danSprites.length; i++) {
                this.danSprites[i].node.active = i < _soldierCfg.membernum;
              }
            }
          } else {
            // 未激活状态：显示锁定节点
            this.lockNode.active = true;
            this.displayNode.active = false;
            var requirement = soldierCfg.jihuo[0];
            var buildingType = requirement[0]; // 建筑类型
            var requiredLevel = requirement[1]; // 需要的等级
            var buildingName = PlaceConfigMgr.inst.getBuildingName(buildingType);
            var buildComp = PlaceGameMgr.inst.getBuildingComp(buildingType, 1);
            var buildModel = null;
            if (buildComp) {
              buildModel = buildComp.dataModel;
              if (requiredLevel <= buildModel.level) {
                var card = soldierCfg.soldier_card[0];
                var flag = App.bagMgr.checkPropEnough(card[0], card[1]);
                if (flag) {
                  this.isCanAct = true;
                  this.lockSp.node.active = false;
                  this.lockLab.string = "\u6FC0\u6D3B";
                  this.lockLab.color = new Color().fromHEX("#50FE2E");
                } else {
                  this.isCanAct = true;
                  this.lockSp.node.active = false;
                  this.lockLab.string = "\u672A\u83B7\u5F97";
                  this.lockLab.color = new Color().fromHEX("#FF3E3E");
                }
              } else {
                this.isCanAct = false;
                this.lockSp.node.active = true;
                this.lockLab.color = new Color().fromHEX("#FF3E3E");
                this.lockLab.string = "" + buildingName + requiredLevel + "\u7EA7\u89E3\u9501";
              }
            }
          }
        };
        _proto.setSel = function setSel(b) {
          this.selectSp.node.active = b;
        };
        _proto.activeteSoloder = function activeteSoloder(soldier_id) {
          if (this.isCanAct) {
            TeamMgr.inst.reqActivateSoldier(soldier_id);
          }
        };
        return TeamSoldierItem;
      }(ScrollListItem), _class3.custom = {
        binding: (_binding = {}, _binding["btnClick"] = {
          method: "onBtnClick"
        }, _binding)
      }, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "canClick", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return true;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "bgSp", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "yinyingSp", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "soldierSp", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "displayNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "danSprites", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return [];
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "levelNode", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "lvLab", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "nameLab", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "stageNode", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "stageLabel", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "selectSp", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "lockSp", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "lockLab", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "intoBattleNode", [_dec17], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TrainingMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './TrainingNPC.ts', './PlaceGameEnum.ts', './App.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, _createClass, cclegacy, TrainingNPC, SoldierType, BuildingType, App;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      TrainingNPC = module.TrainingNPC;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingType = module.BuildingType;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      cclegacy._RF.push({}, "9112b5v8Y5FQpZt+wBxUOlt", "TrainingMgr", undefined);

      /**
       * 训练设备信息
       */

      /**
       * 训练设备管理器
       * 管理兵营中的训练设备占用、释放、等待队列
       */
      var TrainingMgr = exports('TrainingMgr', /*#__PURE__*/function () {
        function TrainingMgr() {
          /**
           * 所有训练设备
           */
          this._equipments = [];
          /**
           * 训练完成回调
           */
          this._onCompleteCallback = null;
          /**
           * 士兵类型
           */
          this._soldierType = SoldierType.BuBing;
          /**
           * 建筑类型
           */
          this._buildingType = BuildingType.BuBingYing;
          this.timer = null;
        }
        var _proto = TrainingMgr.prototype;
        /**
         * 初始化训练设备管理器
         * @param equipmentParent 训练设备父节点
         * @param trainingNPCParent 训练NPC父节点
         * @param soldierType 士兵类型
         * @param buildingType 建筑类型
         * @param onComplete 训练完成回调
         */
        _proto.initialize = function initialize(equipmentParent, trainingNPCParent, soldierType, buildingType, onComplete) {
          this._soldierType = soldierType;
          this._buildingType = buildingType;
          this._equipments = [];
          this._onCompleteCallback = onComplete;
          if (this.timer) {
            clearTimeout(this.timer);
            this.timer = null;
          }
          if (!equipmentParent || !trainingNPCParent) {
            return;
          }
          var equipmentChildren = equipmentParent.children.slice().sort(function (a, b) {
            return a.name.localeCompare(b.name);
          });
          var trainingNPCChildren = trainingNPCParent.children.slice().sort(function (a, b) {
            return a.name.localeCompare(b.name);
          });
          var equipmentCount = Math.min(equipmentChildren.length, trainingNPCChildren.length);
          for (var i = 0; i < equipmentCount; i++) {
            var equipmentNode = equipmentChildren[i];
            var trainingNPCNode = trainingNPCChildren[i];
            var trainingNPC = trainingNPCNode.getComponent(TrainingNPC);
            if (!trainingNPC) {
              continue;
            }
            this._equipments.push({
              equipmentNode: equipmentNode,
              trainingNPC: trainingNPC,
              isOccupied: false,
              index: i
            });
            trainingNPCNode.active = false;
          }
          console.log("TrainingEquipmentManager: \u521D\u59CB\u5316\u5B8C\u6210\uFF0C\u8BBE\u5907\u6570\u91CF: " + this._equipments.length);
        }

        /**
         * 获取一个空闲设备 标记已占用
         * @returns TrainingNPC节点，如果没有空闲设备返回null
         */;
        _proto.getFreeEquipmentNode = function getFreeEquipmentNode() {
          var freeEquipment = this._equipments.find(function (eq) {
            return !eq.isOccupied;
          });
          if (!freeEquipment) {
            return null;
          }
          freeEquipment.isOccupied = true;
          return freeEquipment.trainingNPC.node;
        }

        /**
         * 在已预占用的设备上开始训练
         * @param trainingNPCNode TrainingNPC节点
         * @param npcId 训练的NPC ID
         * @param totalTime 总训练时长（毫秒）
         * @returns 是否成功开始训练
         */;
        _proto.occupyEquipmentByNode = function occupyEquipmentByNode(trainingNPCNode, npcId, totalTime) {
          var _this = this;
          var equipment = this._equipments.find(function (eq) {
            return eq.trainingNPC.node === trainingNPCNode;
          });
          if (!equipment) {
            App.log.logError("\u627E\u4E0D\u5230\u5BF9\u5E94\u7684\u8BBE\u5907\u8282\u70B9");
            return false;
          }
          if (!equipment.isOccupied) {
            return false;
          }
          equipment.trainingNPC.node.active = true;
          equipment.trainingNPC.startTraining(this._soldierType, this._buildingType, totalTime, npcId, function (completedNpcId) {
            _this._onEqTrainingComplete(equipment, completedNpcId);
          });
          return true;
        }

        /**
         * 设备训练完成回调
         * @param equipment 完成训练的设备
         * @param npcId NPC ID
         */;
        _proto._onEqTrainingComplete = function _onEqTrainingComplete(equipment, npcId) {
          var _this2 = this;
          console.log("\u8BBE\u5907 " + equipment.index + " \u8BAD\u7EC3\u5B8C\u6210 NPC " + npcId);
          equipment.trainingNPC.showExperienceGained();
          this.timer = setTimeout(function () {
            if (_this2._onCompleteCallback) {
              _this2._onCompleteCallback(npcId);
            }
            equipment.isOccupied = false;
            equipment.trainingNPC.node.active = false;
            equipment.trainingNPC.reset();
          }, 500);
        }

        /**
         * 更新所有设备的训练进度
         * @param deltaTime 时间增量（毫秒）
         */;
        _proto.updateProgress = function updateProgress(deltaTime) {
          for (var _iterator = _createForOfIteratorHelperLoose(this._equipments), _step; !(_step = _iterator()).done;) {
            var equipment = _step.value;
            if (equipment.isOccupied && equipment.trainingNPC) {
              var isCompleted = equipment.trainingNPC.updateProgress(deltaTime);
              if (isCompleted) {
                console.log("\u8BBE\u5907 " + equipment.index + " \u4E0A\u7684\u8BAD\u7EC3\u5DF2\u5B8C\u6210");
              }
            }
          }
        }

        /**
         * 获取空闲设备数量
         */;
        _proto.getFreeEquipmentCount = function getFreeEquipmentCount() {
          return this._equipments.filter(function (eq) {
            return !eq.isOccupied;
          }).length;
        }

        /**
         * 获取总设备数量
         */;
        _proto.getTotalEquipmentCount = function getTotalEquipmentCount() {
          return this._equipments.length;
        };
        _proto.clearAll = function clearAll() {
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._equipments), _step2; !(_step2 = _iterator2()).done;) {
            var equipment = _step2.value;
            if (equipment.isOccupied) {
              equipment.trainingNPC.cancelTraining();
              equipment.trainingNPC.node.active = false;
              equipment.isOccupied = false;
            }
          }
        };
        _proto.destroy = function destroy() {
          this.clearAll();
          this._equipments = [];
          this._onCompleteCallback = null;
        };
        _createClass(TrainingMgr, [{
          key: "soldierType",
          get:
          /**
           * 士兵类型
           */
          function get() {
            return this._soldierType;
          }
        }, {
          key: "buildingType",
          get:
          /**
           * 建筑类型
           */
          function get() {
            return this._buildingType;
          }
        }]);
        return TrainingMgr;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/TrainingNPC.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ActionFramesItem.ts', './ModuleDef.ts', './App.ts', './PlaceGameEnum.ts', './MoneyTips.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Node, Sprite, tween, Component, ActionFramesItem, ModuleDef, App, SoldierType, BuildingType, MoneyTips, PlaceConfigMgr, PlaceGameMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Sprite = module.Sprite;
      tween = module.tween;
      Component = module.Component;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingType = module.BuildingType;
    }, function (module) {
      MoneyTips = module.MoneyTips;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "b9ce3W4I+1Mu7AWro7kgqqs", "TrainingNPC", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 训练NPC组件
       * 负责在训练设备上显示训练进度和序列帧动画
       */
      var TrainingNPC = exports('TrainingNPC', (_dec = ccclass("TrainingNPC"), _dec2 = property(Node), _dec3 = property(Sprite), _dec4 = property(ActionFramesItem), _dec5 = property(MoneyTips), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(TrainingNPC, _Component);
        function TrainingNPC() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /**
           * 训练进度条节点
           */
          _initializerDefineProperty(_this, "progressNode", _descriptor, _assertThisInitialized(_this));
          /**
           * 进度条
           */
          _initializerDefineProperty(_this, "proBar", _descriptor2, _assertThisInitialized(_this));
          /**
           * 序列帧动画组件
           */
          _initializerDefineProperty(_this, "actionFrames", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "moneyTips", _descriptor4, _assertThisInitialized(_this));
          /**
           * 训练总时长（毫秒）
           */
          _this._totalTrainingTime = 0;
          /**
           * 已训练时长（毫秒）
           */
          _this._hadTrainingTime = 0;
          /**
           * 训练是否已完成
           */
          _this._isCompleted = false;
          /**
           * 训练完成回调函数
           */
          _this._onCompleteCallback = null;
          /**
           * 训练ID，用于标识这个训练实例
           */
          _this._trainingId = -1;
          /**
           * 士兵类型
           */
          _this._soldierType = SoldierType.BuBing;
          /**
           * 建筑类型
           */
          _this._buildingType = BuildingType.BuBingYing;
          return _this;
        }
        var _proto = TrainingNPC.prototype;
        /**
         * 设置训练参数并开始训练
         * @param soldierType 士兵类型
         * @param totalTrainingTime 总训练时长（毫秒）
         * @param trainingId 训练ID（可选）
         * @param onComplete 训练完成回调（可选）
         */
        _proto.startTraining = function startTraining(soldierType, buildingType, totalTrainingTime, trainingId, onComplete) {
          if (trainingId === void 0) {
            trainingId = -1;
          }
          this._totalTrainingTime = totalTrainingTime;
          this._hadTrainingTime = 0;
          this._isCompleted = false;
          this._soldierType = soldierType;
          this._buildingType = buildingType;
          this._trainingId = trainingId;
          this._onCompleteCallback = onComplete;
          App.log.logBusiness("TrainingNPC[" + trainingId + "] \u5F00\u59CB\u8BAD\u7EC3 - \u603B\u65F6\u957F: " + totalTrainingTime + "ms, proBar\u5B58\u5728: " + !!this.proBar + ", progressNode\u5B58\u5728: " + !!this.progressNode);

          // 显示进度条节点
          if (this.progressNode) {
            this.progressNode.active = true;
          } else {
            App.log.logError("TrainingNPC[" + trainingId + "] progressNode \u672A\u6302\u8F7D\uFF01");
          }

          // 初始化进度条
          if (this.proBar) {
            this.proBar.fillRange = 0;
            this.proBar.node.active = true;
            App.log.logBusiness("TrainingNPC[" + trainingId + "] \u8FDB\u5EA6\u6761\u521D\u59CB\u5316\u5B8C\u6210\uFF0CfillRange: 0");
          } else {
            App.log.logError("TrainingNPC[" + trainingId + "] proBar \u672A\u6302\u8F7D\uFF01\u65E0\u6CD5\u663E\u793A\u8FDB\u5EA6");
          }

          // 播放动画
          if (this._soldierType === SoldierType.BuBing) {
            this.playTrainingAnimation(ModuleDef.SOLDIER, "daodunbing", "Attack");
          } else if (this._soldierType === SoldierType.GongBing) {
            this.playTrainingAnimation(ModuleDef.SOLDIER, "gongjianbing", "Attack");
          } else if (this._soldierType === SoldierType.QiBing) {
            this.playTrainingAnimation(ModuleDef.SOLDIER, "qingqibing", "Attack");
          }
        }

        /**
         * 播放训练动画（序列帧）
         * @param bundleName 资源包名称
         * @param name 动画名称
         * @param action 动作名称
         */;
        _proto.playTrainingAnimation = function playTrainingAnimation(bundleName, name, action) {
          if (!this.actionFrames) {
            App.log.logError("TrainingNPC[" + this._trainingId + "] actionFrames \u672A\u6302\u8F7D\uFF01");
            return;
          }
          if (bundleName && name && action) {
            App.log.logBusiness("TrainingNPC[" + this._trainingId + "] \u64AD\u653E\u52A8\u753B: " + bundleName + "/" + name + "/" + action);
            this.actionFrames.playWithResource(bundleName, name, action);
          } else {
            App.log.logBusiness("TrainingNPC[" + this._trainingId + "] \u64AD\u653E\u9884\u8BBE\u52A8\u753B");
            this.actionFrames.play();
          }
        }

        /**
         * 停止训练动画
         */;
        _proto.stopTrainingAnimation = function stopTrainingAnimation() {
          if (this.actionFrames) {
            this.actionFrames.stop();
          }
        }

        /**
         * 更新训练进度
         * @param deltaTime 时间增量（毫秒）
         * @returns 是否训练完成
         */;
        _proto.updateProgress = function updateProgress(deltaTime) {
          if (this._isCompleted) {
            return true;
          }
          if (!this.proBar) {
            return true;
          }
          this._hadTrainingTime += deltaTime;
          if (this._hadTrainingTime >= this._totalTrainingTime) {
            this._hadTrainingTime = this._totalTrainingTime;
            this._isCompleted = true;
            this.proBar.fillRange = 1;
            this.stopTrainingAnimation();
            App.log.logBusiness("TrainingNPC[" + this._trainingId + "] \u8BAD\u7EC3\u5B8C\u6210\uFF01\u603B\u65F6\u957F: " + this._totalTrainingTime + "ms");
            if (this.progressNode) {
              this.progressNode.active = false;
            }
            if (this._onCompleteCallback) {
              App.log.logBusiness("TrainingNPC[" + this._trainingId + "] \u6267\u884C\u5B8C\u6210\u56DE\u8C03");
              this._onCompleteCallback(this._trainingId);
            } else {
              App.log.logError("TrainingNPC[" + this._trainingId + "] \u5B8C\u6210\u56DE\u8C03\u51FD\u6570\u4E3Anull");
            }
            return true;
          }
          var progress = this._hadTrainingTime / this._totalTrainingTime;
          var newFillRange = Math.max(0, Math.min(1, progress));
          this.proBar.fillRange = newFillRange;
          return false;
        }

        /**
         * 获取训练ID
         */;
        /**
         * 展示经验获得的飘字效果
         */
        _proto.showExperienceGained = function showExperienceGained() {
          var _this2 = this;
          if (!this.progressNode) {
            this.progressNode.active = false;
          }
          var buildingLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(this._buildingType);
          var rewards = PlaceConfigMgr.inst.getBingYingTrainReward(this._buildingType, buildingLevel);
          if (rewards && rewards.length > 0) {
            var _rewards$ = rewards[0],
              itemId = _rewards$[0],
              count = _rewards$[1];
            if (this.moneyTips) {
              this.moneyTips.node.active = true;
              this.moneyTips.shuoMoneyTip(itemId, count);
              var originalPosition = this.moneyTips.node.position.clone();
              tween(this.moneyTips.node).to(0.5, {
                position: originalPosition.add3f(0, 20, 0)
              }, {
                easing: "sineInOut"
              }).call(function () {
                _this2.moneyTips.node.position = originalPosition;
                _this2.moneyTips.node.opacity = 255;
                _this2.moneyTips.node.active = false;
              }).start();
            }
          }
        }

        /**
         * 取消训练
         */;
        _proto.cancelTraining = function cancelTraining() {
          this._isCompleted = true;
          this.stopTrainingAnimation();
          if (this.progressNode) {
            this.progressNode.active = false;
          }
          this._onCompleteCallback = null;
        }

        /**
         * 重置NPC状态
         */;
        _proto.reset = function reset() {
          this._isCompleted = false;
          this._hadTrainingTime = 0;
          this._totalTrainingTime = 0;
          this._trainingId = -1;
          this._onCompleteCallback = null;
          this.stopTrainingAnimation();
          if (this.progressNode) {
            this.progressNode.active = false;
          }
          if (this.proBar) {
            this.proBar.fillRange = 0;
          }
        };
        _createClass(TrainingNPC, [{
          key: "soldierType",
          get:
          /**
           * 士兵类型
           */
          function get() {
            return this._soldierType;
          }
        }, {
          key: "buildingType",
          get:
          /**
           * 建筑类型
           */
          function get() {
            return this._buildingType;
          }
        }, {
          key: "trainingId",
          get: function get() {
            return this._trainingId;
          }

          /**
           * 训练是否完成
           */
        }, {
          key: "isCompleted",
          get: function get() {
            return this._isCompleted;
          }

          /**
           * 获取当前进度百分比
           */
        }, {
          key: "progressPercentage",
          get: function get() {
            if (this._totalTrainingTime <= 0) return 0;
            return Math.min(1, this._hadTrainingTime / this._totalTrainingTime);
          }
        }]);
        return TrainingNPC;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "progressNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "proBar", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "actionFrames", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "moneyTips", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_age.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, UIBase, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "8bacdujQ2BAB7zZLoVskaQ0", "Ui_age", undefined);
      var Ui_age = exports('Ui_age', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_age, _UIBase);
        function Ui_age() {
          return _UIBase.call(this, Ui_age.custom) || this;
        }
        var _proto = Ui_age.prototype;
        _proto.onBtnBackClick = function onBtnBackClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          _UIBase.prototype.onClose.call(this);
        };
        _proto.onDispose = function onDispose() {};
        _proto.onCreated = function onCreated(title, descrip) {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIBase.prototype.onCreated.call(this);
        };
        return Ui_age;
      }(UIBase));
      Ui_age.custom = {
        prefab: "prefab/view/uiAge",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding)
      };
      ModuleContext.attachModule(Ui_age, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_agreement.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, Label, instantiate, UIBase, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Label = module.Label;
      instantiate = module.instantiate;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "227c3ZcwQ1KTat4SELyH+NC", "Ui_agreement", undefined);
      var Ui_agreement = exports('Ui_agreement', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_agreement, _UIBase);
        function Ui_agreement() {
          var _this;
          _this = _UIBase.call(this, Ui_agreement.custom) || this;
          _this._title = void 0;
          _this._descrip = void 0;
          return _this;
        }
        var _proto = Ui_agreement.prototype;
        _proto.onBtnBackClick = function onBtnBackClick() {
          this.onClose();
        };
        _proto.onDispose = function onDispose() {};
        _proto.onCreated = function onCreated(title, descrip) {
          _UIBase.prototype.onCreated.call(this);
          this._title = title;
          this._descrip = descrip;
          this._updtView();
        };
        _proto._updtView = function _updtView() {
          var _this2 = this;
          this.getLabel('lblTitle').string = this._title || '';
          setTimeout(function () {
            var lbNode = _this2.getNode('lbItem');
            var strArr = _this2._descrip.split('&&&');
            var addLab = function addLab(str) {
              var lbN = instantiate(lbNode);
              lbN.getComponent(Label).string = str;
              lbN.parent = lbNode.parent;
            };
            var _loop = function _loop(i) {
                if (i == 0) {
                  rt = lbNode.getComponent(Label);
                  rt.string = strArr[i];
                } else {
                  setTimeout(function () {
                    addLab(strArr[i]);
                  }, 50);
                }
              },
              rt;
            for (var i = 0; i < strArr.length; i++) {
              _loop(i);
            }
          }, 40);
        };
        return Ui_agreement;
      }(UIBase));
      Ui_agreement.custom = {
        prefab: 'prefab/view/uiAgreement',
        binding: (_binding = {}, _binding['imgBack'] = {
          method: 'onClose'
        }, _binding['btnBack'] = {
          method: 'onBtnBackClick'
        }, _binding)
      };
      ModuleContext.attachModule(Ui_agreement, ModuleDef.GAME_LOGIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_BagView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './App.ts', './Item_prop.ts', './EventType.ts', './BagMgr.ts', './UIMgr.ts', './UI_ItemDetailView.ts', './Layout_UI_ItemDetailView.ts'], function (exports) {
  var _inheritsLoose, cclegacy, Widget, Toggle, ModuleDef, ModuleContext, UIBase, App, Item_prop, EventType, BagType, UIMgr, LayerType, UI_ItemDetailView, Layout_UI_ItemDetailView;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Widget = module.Widget;
      Toggle = module.Toggle;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      BagType = module.BagType;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_ItemDetailView = module.UI_ItemDetailView;
    }, function (module) {
      Layout_UI_ItemDetailView = module.Layout_UI_ItemDetailView;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "25b0dJ+mStO8bUQEwZHQuNT", "UI_BagView", undefined);
      var UI_BagView = exports('UI_BagView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_BagView, _UIBase);
        function UI_BagView() {
          var _this;
          _this = _UIBase.call(this, UI_BagView.custom) || this;
          _this.layoutObj = null;
          _this.curTabIndex = 0;
          /** 背包标签枚举 */
          _this.bagTabArr = [BagType.prop, BagType.suipian, BagType.libao];
          return _this;
        }
        var _proto = UI_BagView.prototype;
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initUI();
          App.bagMgr.reqLoadBag();
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
          _UIBase.prototype.onDispose.call(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateBagList, this);
        }

        /**
         * 初始化UI
         */;
        _proto.initUI = function initUI() {
          this.layoutObj.scrollList.content.removeAllChildren();
          this.layoutObj.scrollList.getComponent(Widget).updateAlignment();
          this.layoutObj.scrollList.onItemRender = this.onItemRender.bind(this);
          // this.layoutObj.scrollList.setFastScroll(true);
          this.initToggleGroup();
        }

        /**
         * 初始化单选切换组
         */;
        _proto.initToggleGroup = function initToggleGroup() {
          var _this2 = this;
          var toggleContainer = this.layoutObj.toggleGroup;
          if (!toggleContainer) return;
          var toggles = toggleContainer.node.children;
          var _loop = function _loop(i) {
            var toggle = toggles[i].getComponent(Toggle);
            if (toggle) {
              toggle.node.on("toggle", function () {
                if (toggle.isChecked) {
                  _this2.onToggleChanged(i);
                }
              }, _this2);
            }
          };
          for (var i = 0; i < toggles.length; i++) {
            _loop(i);
          }
          if (toggles.length > 0) {
            var firstToggle = toggles[0].getComponent(Toggle);
            if (firstToggle) {
              firstToggle.isChecked = true;
            }
          }
        }

        /**
         * ScrollList 渲染回调
         * @param node 节点
         * @param index 索引
         */;
        _proto.onItemRender = function onItemRender(node, index) {
          var _this3 = this;
          var bagData = this.getCurrentBagData();
          if (index < 0 || index >= bagData.length) return;
          var itemData = bagData[index];
          var itemProp = node.getComponent(Item_prop);
          if (!itemProp || !itemData) return;
          itemProp.setClickFunc(function () {
            _this3.onItemClick(itemData, index);
          });
        }

        /**
         * 道具点击回调
         * @param itemData 道具数据
         * @param index 索引
         */;
        _proto.onItemClick = function onItemClick(itemData, index) {
          UIMgr.inst.open(UI_ItemDetailView, LayerType.panel, Layout_UI_ItemDetailView, [itemData]);
        }

        /**
         * 刷新背包显示
         */;
        _proto.updateBagList = function updateBagList() {
          var bagData = this.getCurrentBagData();
          this.layoutObj.scrollList.array = bagData;
          if (bagData.length === 0) {
            this.layoutObj.noDataNode.active = true;
          } else {
            this.layoutObj.noDataNode.active = false;
          }
        }

        /**
         * 获取背包道具
         * @returns
         */;
        _proto.getCurrentBagData = function getCurrentBagData() {
          var bagType = this.bagTabArr[this.curTabIndex];
          return App.bagMgr.getBagItemList(bagType) || [];
        };
        _proto.onToggleChanged = function onToggleChanged(tabIndex) {
          this.curTabIndex = tabIndex;
          this.updateBagList();
        }

        /**
         * 关闭按钮点击
         */;
        _proto.onBtnCloseClick = function onBtnCloseClick() {
          this.onClose();
        }

        /**
         * 一键使用礼包
         */;
        _proto.onAKeyUseGift = function onAKeyUseGift() {
          App.bagMgr.reqAKeyUseGift();
        }

        /**
         * 使用可选礼包
         */;
        _proto.onUseOptionalGift = function onUseOptionalGift(giftId) {
          App.bagMgr.reqUseOptionalGift(giftId);
        }

        /**
         * 碎片合成
         */;
        _proto.onFragmentCombine = function onFragmentCombine(fragmentId, count) {
          App.bagMgr.reqFragmentCombine(fragmentId, count);
        };
        return UI_BagView;
      }(UIBase));
      UI_BagView.custom = {
        prefab: "prefab/view/UI_BagView",
        binding: (_binding = {}, _binding["btnClose"] = {
          method: "onBtnCloseClick"
        }, _binding)
      };
      ModuleContext.attachModule(UI_BagView, ModuleDef.GAME_BAG);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_BuildUpgradeView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './PlaceGameMgr.ts', './PlaceGameEnum.ts', './PlaceConfigMgr.ts', './MonitorType.ts', './Utils.ts', './ConditionCell.ts', './UIUtil.ts', './Item_prop.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, Label, Layout, ProgressBar, UIBase, ModuleContext, ModuleDef, App, PlaceGameMgr, BuildingType, PlaceConfigMgr, MonitorType, Utils, ConditionCell, UIUtil, Item_prop;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Layout = module.Layout;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      ConditionCell = module.ConditionCell;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      Item_prop = module.Item_prop;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "1b44ewnsqJCoZCpkcd9VwOw", "UI_BuildUpgradeView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var UI_BuildUpgradeView = exports('UI_BuildUpgradeView', (_dec = ccclass("UI_BuildUpgradeView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_BuildUpgradeView, _UIBase);
        function UI_BuildUpgradeView() {
          var _this;
          _this = _UIBase.call(this, UI_BuildUpgradeView.custom) || this;
          _this.layoutObj = null;
          _this.curLevel = 1;
          _this.targetLevel = 2;
          _this.dataModel = null;
          _this._upgradeTimer = null;
          _this._remainTime = 0;
          _this._totalTime = 0;
          // 加速道具
          _this._speedItems = [];
          _this._selectedItem = null;
          _this._currentCount = 1;
          return _this;
        }
        var _proto = UI_BuildUpgradeView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this.stopUpgradeTimer();
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSpeedCardUpgrade, this.resSpeedCardUpgrade, this);
          if (this.layoutObj.countSlider) {
            this.layoutObj.countSlider.node.on("slide", this.onSliderChanged, this);
          }
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          var comp = PlaceGameMgr.inst.getBuildingComp(data.buildType, data.buildIndex);
          if (comp) {
            this.dataModel = comp.dataModel;
          }
          this.addEventListeners();
          this.initNode();
          this.initSpeedItems();
          this.updateView();
        };
        _proto.initNode = function initNode() {
          this.layoutObj.tjScrollList.content.removeAllChildren();
          this.layoutObj.tjScrollList.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.tjScrollList.onItemClick = this.onItemClick.bind(this);
          this.layoutObj.xgScrollList.content.removeAllChildren();
          this.layoutObj.xgScrollList.onItemRender = this.onItemRender2.bind(this);
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.tjScrollList.array[index];
          var cellComp = item.getComponent(ConditionCell);
          cellComp.show(data, index);
        };
        _proto.onItemRender2 = function onItemRender2(node, index) {
          if (!node || !this.layoutObj.xgScrollList.array || index < 0 || index >= this.layoutObj.xgScrollList.array.length) {
            return;
          }
          var data = this.layoutObj.xgScrollList.array[index];
          if (!data) {
            return;
          }
          var leftNode = Utils.findNode("leftLab", node);
          var rightNode = Utils.findNode("rightLab", node);
          if (leftNode) {
            var leftLab = leftNode.getComponent(Label);
            if (leftLab) {
              leftLab.string = data.left || "";
            }
          }
          if (rightNode) {
            var rightLab = rightNode.getComponent(Label);
            if (rightLab) {
              rightLab.string = data.right || "";
            }
          }
        };
        _proto.onItemClick = function onItemClick(item, index) {
          App.log.logBusiness("index", "", index);
        };
        _proto.updateView = function updateView() {
          if (this._selectedItem) {
            var maxCount = this.getMaxUsableCount(this._selectedItem);
            this._currentCount = Math.min(this._currentCount, maxCount);
            this.updateCountDisplay();
            this.updateTotalSpeedTime();
            this.updateSlider();
          }
          this.curLevel = this.dataModel.level;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (this.curLevel >= maxLevel) {
            this.targetLevel = maxLevel;
          } else {
            this.targetLevel = this.curLevel + 1;
          }
          if (this.layoutObj.buildName2) {
            this.layoutObj.buildName2.string = PlaceConfigMgr.inst.getBuildingName(this.dataModel.buildType);
          }
          if (this.layoutObj.txtCurLevel2) {
            this.layoutObj.txtCurLevel2.string = this.curLevel + "\u7EA7";
          }
          this._updateXiaoGuo();
          if (this.dataModel.isUpgrading) {
            this.layoutObj.tiaojianNode.active = false;
            this.layoutObj.jiasuNode.active = true;
            this.startUpgradeTimer();
          } else {
            this.layoutObj.tiaojianNode.active = true;
            this.layoutObj.jiasuNode.active = false;
            this._updateUConditions();
            var time = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, this.targetLevel);
            this.layoutObj.upNeedTimeLab.string = Utils.timeFormat(time);
            if (PlaceGameMgr.inst.checkBuildCondition(this.dataModel.buildType, this.targetLevel)) {
              UIUtil.setButtonEnable(this.layoutObj.btnUpgrade, true, true);
            } else {
              UIUtil.setButtonEnable(this.layoutObj.btnUpgrade, false, true);
            }
          }
        };
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this._onUpgrageComplete();
        };
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          // this.updateView();
          this.onClose();
        };
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this.updateView();
        };
        _proto._updateUConditions = function _updateUConditions() {
          var config = PlaceConfigMgr.inst.getBuildingUnLockConfig(this.dataModel.buildType, this.targetLevel);
          var jianzhulimit = config.jianzhulimit;
          var cost_item = config.cost_item;
          var conditionArr = [];
          for (var i = 0; i < jianzhulimit.length; i++) {
            var limit = jianzhulimit[i];
            var data = {
              type: 1,
              buildType: limit[0],
              level: limit[1]
            };
            data.type = 1;
            data.buildType = limit[0];
            data.level = limit[1];
            conditionArr.push(data);
          }
          for (var _i = 0; _i < cost_item.length; _i++) {
            var item = cost_item[_i];
            var _data = {
              type: 2,
              itemId: item[0],
              count: item[1]
            };
            _data.type = 2;
            _data.itemId = item[0];
            _data.count = item[1];
            conditionArr.push(_data);
          }
          this.layoutObj.tjScrollList.array = conditionArr;
        }

        /**
         * 更新升级效果
         */;
        _proto._updateXiaoGuo = function _updateXiaoGuo() {
          var curLevelConfig = PlaceConfigMgr.inst.getBuildLevelConfigByType(this.dataModel.buildType, this.curLevel);
          var targetLevelConfig = PlaceConfigMgr.inst.getBuildLevelConfigByType(this.dataModel.buildType, this.targetLevel);
          if (!curLevelConfig || !targetLevelConfig) {
            this.layoutObj.xgScrollList.array = [];
            return;
          }
          var xiaoguoArr = [];
          var curDesc = curLevelConfig.desc || "";
          var targetDesc = targetLevelConfig.desc || "";
          var curLines = curDesc.split("<br>");
          var targetLines = targetDesc.split("<br>");
          var lineCount = Math.min(curLines.length, targetLines.length);
          for (var i = 0; i < lineCount; i++) {
            var curLine = curLines[i].trim();
            var targetLine = targetLines[i].trim();
            if (curLine && targetLine) {
              xiaoguoArr.push({
                left: curLine,
                right: targetLine
              });
            }
          }
          this.layoutObj.xgScrollList.array = xiaoguoArr;
        }

        /**
         * 开始升级计时器
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this2 = this;
          if (!this.dataModel.isUpgrading) {
            return;
          }
          var nextLevel = this.dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType)) {
            App.log.logError("建筑已经达到最高级");
            return;
          }
          switch (this.dataModel.buildType) {
            case BuildingType.FuHua:
              {
                var model = this.dataModel;
                this._remainTime = model.getRemainBuildTime();
                this._totalTime = model.getToTalBuildTime();
              }
              break;
            case BuildingType.FaMuChang:
            case BuildingType.MoFang:
            case BuildingType.CaiKuangChang:
              {
                var _model = this.dataModel;
                this._remainTime = _model.getRemainBuildTime();
                this._totalTime = _model.getToTalBuildTime();
              }
              break;
            case BuildingType.BuBingYing:
            case BuildingType.GongBingYing:
            case BuildingType.QiBingYing:
              {
                var _model2 = this.dataModel;
                this._remainTime = _model2.getRemainBuildTime();
                this._totalTime = _model2.getToTalBuildTime();
              }
              break;
            case BuildingType.DiBiao:
              {
                var _model3 = this.dataModel;
                this._remainTime = _model3.getRemainBuildTime();
                this._totalTime = _model3.getToTalBuildTime();
              }
              break;
            case BuildingType.ZhiHuiBu:
              {
                var _model4 = this.dataModel;
                this._remainTime = _model4.getRemainBuildTime();
                this._totalTime = _model4.getToTalBuildTime();
              }
              break;
            default:
              this._remainTime = 0;
              this._totalTime = 0;
              break;
          }
          if (this._remainTime > 0) {
            this.stopUpgradeTimer();
            this.layoutObj.progressBar.node.active = true;
            this.onUpgradeTimerUpdate();
            this._upgradeTimer = setInterval(function () {
              _this2.onUpgradeTimerUpdate();
            }, 1000);
          }
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this.layoutObj.progressBar.node.active = false;
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        };
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.layoutObj || !this.layoutObj.isValid) return;
          var progress = Math.max(0, this._remainTime / this._totalTime);
          if (progress > 0) {
            this._remainTime--;
            this.layoutObj.progressBar.progress = 1 - progress;
            this.layoutObj.txtRemainingTime.string = Utils.timeFormat(this._remainTime);
            var config = PlaceConfigMgr.inst.getDiamondCost();
            var costDiamond = Math.ceil(this._remainTime * 1000 / config[1]);
            this.layoutObj.costItem.setData([config[0], costDiamond]);
          } else {
            this.stopUpgradeTimer();
            // 倒计时结束后，不直接调用updateView，避免递归调用
            // 等待服务器的升级完成通知来更新界面
            // 手动更新界面状态，避免显示异常
            this.layoutObj.tiaojianNode.active = true;
            this.layoutObj.jiasuNode.active = false;
          }
        };
        _proto._onUpgrageComplete = function _onUpgrageComplete() {
          this.stopUpgradeTimer();
          this.onClose();
        }

        /**
         * 建筑升级按钮点击事件
         */;
        _proto.onUpgradeClick = function onUpgradeClick() {
          PlaceGameMgr.inst.reqUpgradeBuilding(this.dataModel.buildingUid, this.dataModel.buildType);
        }

        /**
         * 立即完成
         */;
        _proto.onBtnQuickClick = function onBtnQuickClick() {
          PlaceGameMgr.inst.reqDiamondUpgrade(this.dataModel.buildingUid, this.dataModel.buildType);
        }
        /**
         * 初始化加速道具列表
         */;
        _proto.initSpeedItems = function initSpeedItems() {
          this._speedItems = [];
          var speed_card_cost = PlaceConfigMgr.inst.getSpeedCardCost();
          for (var _iterator = _createForOfIteratorHelperLoose(speed_card_cost), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              itemId = _step$value[0],
              speedTime = _step$value[1];
            this._speedItems.push(itemId);
          }
          this.createItemList();
          if (this._speedItems.length > 0) {
            this.selectItem(this._speedItems[0]);
          }
        }

        /**
         * 创建加速道具列表
         */;
        _proto.createItemList = function createItemList() {
          var _this3 = this;
          if (!this.layoutObj.itemListContent) {
            return;
          }
          this.layoutObj.itemListContent.removeAllChildren();
          var itemData = [];
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._speedItems), _step2; !(_step2 = _iterator2()).done;) {
            var _itemId = _step2.value;
            var bagItem = App.bagMgr.getBagItemByItemid(_itemId);
            var _count = bagItem ? bagItem.num : 0;
            itemData.push([_itemId, _count]);
          }
          UIUtil.addItemProps(this.layoutObj.itemListContent, itemData, this, function (node) {
            var itemProp = node.getComponent(Item_prop);
            if (itemProp) {
              var itemId = itemProp.getItemId();
              _this3.selectItem(itemId);
            }
          });
          var layout = this.layoutObj.itemListContent.getComponent(Layout);
          if (layout) {
            layout.updateLayout();
          }

          // 遍历所有道具节点进行置灰处理
          for (var i = 0; i < this.layoutObj.itemListContent.children.length; i++) {
            var itemNode = this.layoutObj.itemListContent.children[i];
            var itemProp = itemNode.getComponent(Item_prop);
            if (itemProp) {
              var itemId = itemProp.getItemId();
              var count = this.getItemCount(itemId);
              if (count <= 0) {
                UIUtil.setGrayByNode(itemNode, true, true);
              }
            }
          }
        }

        /**
         * 获取道具的加速时长
         */;
        _proto.getSpeedTime = function getSpeedTime(itemId) {
          var speedCardCost = PlaceConfigMgr.inst.getSpeedCardCost();
          for (var _iterator3 = _createForOfIteratorHelperLoose(speedCardCost), _step3; !(_step3 = _iterator3()).done;) {
            var _step3$value = _step3.value,
              id = _step3$value[0],
              speedTime = _step3$value[1];
            if (id === itemId) {
              return speedTime;
            }
          }
          return 0;
        }

        /**
         * 获取背包中道具的数量
         */;
        _proto.getItemCount = function getItemCount(itemId) {
          var bagItem = App.bagMgr.getBagItemByItemid(itemId);
          return bagItem ? bagItem.num : 0;
        }

        /**
         * 获取基于剩余时间的最大可用道具数量
         */;
        _proto.getMaxUsableCount = function getMaxUsableCount(itemId) {
          var itemCount = this.getItemCount(itemId);
          var speedTime = this.getSpeedTime(itemId) / 1000; // 转换为秒
          var remainTime = this._remainTime;
          var maxBasedOnTime = speedTime > 0 ? Math.ceil(remainTime / speedTime) : 0;
          return Math.min(itemCount, maxBasedOnTime);
        }

        /**
         * 选择道具
         */;
        _proto.selectItem = function selectItem(itemId) {
          this._selectedItem = itemId;
          var maxCount = this.getMaxUsableCount(itemId);
          if (maxCount <= 0) {
            this._currentCount = 0;
            this.disableAllControls();
          } else {
            this._currentCount = 1;
            this.enableAllControls();
          }
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          this.updateSlider();
          this.updateItemSelectState();
        }

        /**
         * 更新所有道具的选中状态
         */;
        _proto.updateItemSelectState = function updateItemSelectState() {
          if (!this.layoutObj.itemListContent) return;
          for (var i = 0; i < this.layoutObj.itemListContent.children.length; i++) {
            var itemNode = this.layoutObj.itemListContent.children[i];
            var itemProp = itemNode.getComponent(Item_prop);
            if (itemProp) {
              var itemId = itemProp.getItemId();
              itemProp.setSelect(itemId === this._selectedItem);
            }
          }
        }

        /**
         * 禁用所有控件（没有道具时）
         */;
        _proto.disableAllControls = function disableAllControls() {
          if (this.layoutObj.btnAdd) {
            this.layoutObj.btnAdd.interactable = false;
          }
          if (this.layoutObj.btnSub) {
            this.layoutObj.btnSub.interactable = false;
          }
          if (this.layoutObj.countSlider) {
            this.layoutObj.countSlider.progress = 1;
            this.layoutObj.countSlider.node.getComponent("cc.Slider").enabled = false;
          }
          UIUtil.setButtonEnable(this.layoutObj.btnUse, false, true);
        }

        /**
         * 启用所有控件（有道具时）
         */;
        _proto.enableAllControls = function enableAllControls() {
          if (this.layoutObj.countSlider) {
            this.layoutObj.countSlider.node.getComponent("cc.Slider").enabled = true;
          }
          UIUtil.setButtonEnable(this.layoutObj.btnUse, true, true);
        }

        /**
         * 更新数量显示
         */;
        _proto.updateCountDisplay = function updateCountDisplay() {
          if (!this.layoutObj.txtCurrentCount || !this._selectedItem) return;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          this.layoutObj.txtCurrentCount.string = "" + this._currentCount;
          if (maxCount <= 0) {
            UIUtil.setButtonEnable(this.layoutObj.btnSub, false, true);
            UIUtil.setButtonEnable(this.layoutObj.btnAdd, false, true);
            UIUtil.setButtonEnable(this.layoutObj.btnUse, false, true);
          } else {
            UIUtil.setButtonEnable(this.layoutObj.btnSub, this._currentCount > 1, true);
            UIUtil.setButtonEnable(this.layoutObj.btnAdd, this._currentCount < maxCount, true);
            UIUtil.setButtonEnable(this.layoutObj.btnUse, this._currentCount > 0, true);
          }
        }

        /**
         * 更新总加速时间
         */;
        _proto.updateTotalSpeedTime = function updateTotalSpeedTime() {
          if (!this.layoutObj.totalTimeLab) {
            return;
          }
          var totalSeconds = 0;
          if (!this._selectedItem) {
            totalSeconds = 0;
          } else {
            var speedTime = this.getSpeedTime(this._selectedItem);
            totalSeconds = speedTime * this._currentCount;
          }
          totalSeconds /= 1000;
          this.layoutObj.totalTimeLab.string = Utils.timeFormat(totalSeconds);
        }

        /**
         * 更新滑动块
         */;
        _proto.updateSlider = function updateSlider() {
          if (this.layoutObj.countSlider) {
            var maxCount = this.getMaxUsableCount(this._selectedItem);
            var node = this.layoutObj.countSlider.node.getChildByName("ProgressBar");
            var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
            if (maxCount <= 0) {
              this.layoutObj.countSlider.progress = 0;
              proBar.progress = 0;
            } else {
              var progressNum = (this._currentCount - 1) / Math.max(1, maxCount - 1);
              this.layoutObj.countSlider.progress = progressNum;
              proBar.progress = progressNum;
            }
          }
        }

        /**
         * 减少数量
         */;
        _proto.onBtnSubClick = function onBtnSubClick() {
          if (!this._selectedItem || this._currentCount <= 1) return;
          this._currentCount--;
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          this.updateSlider();
        }

        /**
         * 增加数量
         */;
        _proto.onBtnAddClick = function onBtnAddClick() {
          if (!this._selectedItem) return;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          if (this._currentCount >= maxCount) return;
          this._currentCount++;
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          this.updateSlider();
        }

        /**
         * 滑动条改变
         */;
        _proto.onSliderChanged = function onSliderChanged() {
          if (!this.layoutObj.countSlider || !this._selectedItem) return;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          this._currentCount = Math.max(1, Math.ceil(this.layoutObj.countSlider.progress * maxCount));
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          var node = this.layoutObj.countSlider.node.getChildByName("ProgressBar");
          var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
          if (maxCount <= 0) {
            proBar.progress = 0;
          } else {
            var progressNum = (this._currentCount - 1) / Math.max(1, maxCount - 1);
            proBar.progress = progressNum;
          }
        }

        /**
         * 使用加速卡
         */;
        _proto.onBtnUseClick = function onBtnUseClick() {
          if (!this._selectedItem) {
            App.log.logBusiness("请先选择加速道具");
            return;
          }
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          if (maxCount < this._currentCount) {
            App.log.logBusiness("加速道具数量不足或超过剩余时间需求");
            return;
          }
          App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361 - \u9053\u5177ID: " + this._selectedItem + ", \u6570\u91CF: " + this._currentCount);
          PlaceGameMgr.inst.reqSpeedCardUpgrade(this.dataModel.buildingUid, this.dataModel.buildType, this._selectedItem, this._currentCount);
        }

        /**
         * 使用加速卡响应
         */;
        _proto.resSpeedCardUpgrade = function resSpeedCardUpgrade(msg) {
          if (msg.building_uid !== this.dataModel.buildingUid) return;
          if (msg.code !== 200) {
            App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361\u5931\u8D25: " + msg.code);
            return;
          }
          App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361\u6210\u529F");
          this._remainTime = this.dataModel.getRemainBuildTime();
          this._totalTime = this.dataModel.getToTalBuildTime();
          if (this._remainTime <= 0) {
            this.onClose();
          } else {
            this.updateView();
          }
        };
        return UI_BuildUpgradeView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_BuildUpgradeView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onClose"
        }, _binding["btnUpgrade"] = {
          method: "onUpgradeClick"
        }, _binding["btnQuick"] = {
          method: "onBtnQuickClick"
        }, _binding["btnUse"] = {
          method: "onBtnUseClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_BuildUpgradeView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_ChooseHeroView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './HeroZhiPaiItem.ts', './PlaceGameMgr.ts', './MonitorType.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, ModuleContext, ModuleDef, App, HeroZhiPaiItem, PlaceGameMgr, MonitorType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      HeroZhiPaiItem = module.HeroZhiPaiItem;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      MonitorType = module.MonitorType;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "eb147P0UCVJQpLJMHG59XuR", "UI_ChooseHeroView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_ChooseHeroView = exports('UI_ChooseHeroView', (_dec = ccclass("UI_ChooseHeroView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_ChooseHeroView, _UIBase);
        function UI_ChooseHeroView() {
          var _this;
          _this = _UIBase.call(this, UI_ChooseHeroView.custom) || this;
          _this.layoutObj = null;
          // 当前英雄ID
          _this._openHeroId = 0;
          _this._openBuildingUid = 0;
          _this._openBuildType = null;
          _this._heroList = [];
          return _this;
        }
        var _proto = UI_ChooseHeroView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAssignHeroChange, this.resAssignHeroChange, this);
        }

        /**
         * 界面创建
         * @param data 传入参数
         * @param data.buildingUid 建筑唯一ID
         * @param data.buildType 建筑类型
         * @param data.currentHeroId 当前已指派的英雄ID
         * @param data.onAssign 指派成功回调
         */;
        _proto.onCreated = function onCreated(data) {
          this.layoutObj = this.layout;
          _UIBase.prototype.onCreated.call(this);
          if (data) {
            this._openBuildingUid = data.buildingUid || 0;
            this._openBuildType = data.buildType;
            this._openHeroId = data.curHeroId || 0;
          }
          this.initNode();
          this.addEventListeners();
          this.updateHeroList();
        };
        _proto.initNode = function initNode() {
          if (!this.layoutObj || !this.layoutObj.scrollList) return;
          this.layoutObj.scrollList.content.removeAllChildren();
          this.layoutObj.scrollList.onItemRender = this.onItemRender.bind(this);
        };
        _proto.updateHeroList = function updateHeroList() {
          var _this2 = this;
          if (this.layoutObj && this.layoutObj.scrollList) {
            this._heroList = PlaceGameMgr.inst.getAllAssignHeroes();

            // 实现排序逻辑
            this._heroList.sort(function (a, b) {
              if (a.hero_id === _this2._openHeroId) return -1;
              if (b.hero_id === _this2._openHeroId) return 1;
              var aAssigned = a.building_uid > 0;
              var bAssigned = b.building_uid > 0;
              if (aAssigned && !bAssigned) return -1;
              if (!aAssigned && bAssigned) return 1;
              return a.hero_id - b.hero_id;
            });
            this.layoutObj.scrollList.array = this._heroList;
            if (this._heroList.length === 0) {
              this.layoutObj.noDataNode.active = true;
            } else {
              this.layoutObj.noDataNode.active = false;
            }
          }
        }

        /**
         * 列表项渲染回调
         */;
        _proto.onItemRender = function onItemRender(item, index) {
          var assignHero = this._heroList[index];
          if (!assignHero) return;
          var zhiPaiHeroItem = item.getComponent(HeroZhiPaiItem);
          if (!zhiPaiHeroItem) {
            return;
          }
          zhiPaiHeroItem.setData(assignHero, this._openBuildingUid, this._openBuildType);
        }

        /**
         * 指派英雄变化通知
         */;
        _proto.resAssignHeroChange = function resAssignHeroChange(msg) {
          if (msg.code !== 200 || !msg.assign_hero) {
            return;
          }
          this.updateHeroList();
        };
        return UI_ChooseHeroView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_ChooseHeroView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_ChooseHeroView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ui_Defeat.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './App.ts', './UIListBase.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, ModuleDef, ModuleContext, App, UIListBase;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UIListBase = module.UIListBase;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "0e7e8JU06hBsrMbVpuWcwsZ", "ui_Defeat", undefined);
      // import { AutoJumpType } from './AutoFightManager';
      var ccclass = _decorator.ccclass;
      var DefeatFailType = exports('DefeatFailType', /*#__PURE__*/function (DefeatFailType) {
        DefeatFailType[DefeatFailType["TimeLimit"] = 1] = "TimeLimit";
        DefeatFailType[DefeatFailType["Die"] = 2] = "Die";
        return DefeatFailType;
      }({}));
      var ui_Defeat = exports('ui_Defeat', (_dec = ccclass("ui_Defeat"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(ui_Defeat, _UIListBase);
        function ui_Defeat() {
          var _this;
          _this = _UIListBase.call(this, ui_Defeat.custom) || this;
          _this._limitTime = null;
          _this._RoleCannotDie = null;
          _this._ErrorSp = null;
          _this._isClosing = false;
          return _this;
        }
        var _proto = ui_Defeat.prototype;
        _proto.onCreated = function onCreated(items) {
          _UIListBase.prototype.onCreated.call(this, items);
          // this.itemPrefab = items;
          this.initList();
          this.scrollList.array = items;
        };
        _proto.onBtnRest = function onBtnRest() {
          var _this2 = this;
          App.battleMgr.onExit(0, function () {
            App.dungeonBattleMgr.ReqEnterDungeon(App.battleMgr.challengeGuanQiaId);
            _this2.onClose();
            _this2.release();
          });
        };
        _proto.onBtnBack = function onBtnBack() {
          var _this3 = this;
          // 防止重复点击
          if (this._isClosing) {
            console.warn("正在关闭，不可重复关闭");
            return;
          }
          this._isClosing = true;
          App.battleMgr.onExit(0, function (result) {
            if (result === 0) {
              _this3.onClose();
              _this3.release();
            }
          });
        };
        _proto.onBtnData = function onBtnData() {
          // UIMgr.inst.openOnce(ui_Data, LayerType.panel, Layout_uiData, [
          //     this._monsterDrops
          // ]);
        };
        return ui_Defeat;
      }(UIListBase), _class2.custom = {
        prefab: "prefabs/view/uiDefeat",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onBtnBack"
        }, _binding["btnBack"] = {
          method: "onBtnBack"
        }, _binding["btnRest"] = {
          method: "onBtnRest"
        }, _binding["btnData"] = {
          method: "onBtnData"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(ui_Defeat, ModuleDef.GAME_SETTLEMENT);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_DYReward.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleDef.ts', './ModuleContext.ts', './Utils.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, ModuleDef, ModuleContext, Utils, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "fa2e3m+cRxAz7sqHkAbk9Je", "Ui_DYReward", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var Ui_DYReward = exports('Ui_DYReward', (_dec = ccclass('Ui_DYReward'), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_DYReward, _UIBase);
        function Ui_DYReward() {
          var _this;
          _this = _UIBase.call(this, Ui_DYReward.custom) || this;
          _this._info = void 0;
          return _this;
        }
        var _proto = Ui_DYReward.prototype;
        _proto.onCreated = function onCreated() {
          _UIBase.prototype.onCreated.call(this);
          //  App.monitorMgr.addEventListener(MonitorType.dy_cbl_state_change, this._on_dy_cbl_state_change, this);
          this.initItem();
        };
        _proto.initItem = function initItem() {
          // let content = Utils.findNode(`content`, this.node);
          // content.removeAllChildren();
          // let cfg: dbr.ShuoMingQuanJu = DBRecord.fetchId(`ShuoMingQuanJu`, 116);
          // for (let v of cfg.value) {
          //     let node = App.nodePoolMgr.getNodeByPath(ModuleDef.BASE_COMMON, 'prefab/item/itemProp');
          //     let item = instantiate(node);
          //     let comp = item.getComponent(Item_prop);
          //     comp.updateItem(v[0], v[1]);
          //     content.addChild(item);
          // }
          // this._on_dy_cbl_state_change();
        };
        _proto._on_dy_cbl_state_change = function _on_dy_cbl_state_change() {
          //按钮设置 。
          var dyCblObject = App.roleMgr.dyCblObject;
          if (!dyCblObject) {
            console.warn('配置异常。dy-cbl');
            return;
          }
          var btnWay = Utils.findNode('btnWay', this.node);
          btnWay.active = dyCblObject.state == 0; //前往按钮

          var btnGet = Utils.findNode('btnGet', this.node);
          btnGet.active = dyCblObject.state == 1; //领取按钮

          var btnGot = Utils.findNode('btnGot', this.node);
          btnGot.active = dyCblObject.state == 2; //已领取
        };

        _proto.onClose = function onClose() {
          _UIBase.prototype.onClose.call(this);
          //  App.monitorMgr.removeEventListener(MonitorType.dy_cbl_state_change, this._on_dy_cbl_state_change, this);
        };

        _proto.onbtnWay = function onbtnWay() {
          var succ = function succ() {
            console.log('侧边栏跳转成功');
          };
          var err = function err() {
            console.log('侧边栏跳转失败');
          };
          P8SDK.navigateToScene(succ, err);
        };
        _proto.onbtnGet = function onbtnGet() {
          App.roleMgr.cs_web_dy_btn_state_130030(3); //
        };

        return Ui_DYReward;
      }(UIBase), _class2.custom = {
        prefab: 'prefab/uiDYReward',
        binding: (_binding = {}, _binding['imgBack'] = {
          method: 'onClose'
        }, _binding['btnBack'] = {
          method: 'onClose'
        }, _binding['btnWay'] = {
          method: 'onbtnWay'
        }, _binding['btnGet'] = {
          method: 'onbtnGet'
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(Ui_DYReward, ModuleDef.GAME_MAIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_email.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './MonitorType.ts', './Utils.ts', './DBRecord.ts', './Prompt.ts', './ModuleContext.ts', './ModuleDef.ts', './UIListBase.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _assertThisInitialized, cclegacy, App, MonitorType, Utils, DBRecord, Prompt, ModuleContext, ModuleDef, UIListBase;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UIListBase = module.UIListBase;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "19d91/EqXZM6ZJuXwiAb4XZ", "Ui_email", undefined);
      var Ui_email = exports('Ui_email', /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(Ui_email, _UIListBase);
        function Ui_email() {
          var _this;
          _this = _UIListBase.call(this, Ui_email.custom) || this;
          App.monitorMgr.addEventListener(MonitorType.email_update_main_view, _this.updateView, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Ui_email.prototype;
        _proto.onCreated = function onCreated() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIListBase.prototype.onCreated.call(this);
          App.emailMgr.cs_get_email_50001();
          this.initList();
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.removeEventListener(MonitorType.email_update_main_view, this.updateView, this);
          this.release();
        };
        _proto.updateView = function updateView() {
          var dataArr = App.emailMgr.emails || [];
          this.scrollList.array = dataArr;
          this.getLabel("lbNone").string = DBRecord.fetchId("ShuoMingWenBen", 1001).descrip;
          this.getNode("lbNone").active = dataArr.length == 0;
          //`邮件${DBRecord.fetchId('ShuoMingQuanJu', 'key1').value}天自动过期删除，请尽快领取附件`
          this.getLabel("lbTip").string = Utils.fillText(App.languageMgr.getTextById(360), [30]);
          this.updateRed(dataArr);
        };
        _proto.updateRed = function updateRed(dataArr) {
          // this.getNode("imgRed33").active = false;
          for (var _iterator = _createForOfIteratorHelperLoose(dataArr), _step; !(_step = _iterator()).done;) {
            var value = _step.value;
            // 0：未读无附件 1：已读 2：未读有附件 3：已读有附件
            if (value.cstatus > 1) {
              this.getNode("imgRed33").active = true;
              break;
            }
          }
        };
        _proto.onBtnBackClick = function onBtnBackClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          _UIListBase.prototype.onClose.call(this);
        };
        _proto.onBtnDelete = function onBtnDelete() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          App.emailMgr.cs_one_key_delete_email_50004();
        };
        _proto.onBtnGet = function onBtnGet() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          var dataArr = App.emailMgr.emails;
          if (dataArr && dataArr.length) {
            for (var _iterator2 = _createForOfIteratorHelperLoose(dataArr), _step2; !(_step2 = _iterator2()).done;) {
              var value = _step2.value;
              if (value.cstatus !== 1) {
                App.emailMgr.cs_one_key_get_email_rwd_50006();
                return;
              }
            }
          }
          var errConfig = DBRecord.fetchId("CuoWuMa", 12101);
          Prompt.popTip(Utils.setRichText(errConfig.descrip));
        };
        return Ui_email;
      }(UIListBase));
      Ui_email.custom = {
        prefab: "prefab/view/uiEmail",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding["btnDelete"] = {
          method: "onBtnDelete"
        }, _binding["btnGet"] = {
          method: "onBtnGet"
        }, _binding)
      };
      ModuleContext.attachModule(Ui_email, ModuleDef.GAME_EMAIL);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_emailInfo.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIListBase.ts', './App.ts', './MonitorType.ts', './Item_prop.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, UITransform, UIListBase, App, MonitorType, Item_prop, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      UITransform = module.UITransform;
    }, function (module) {
      UIListBase = module.UIListBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "d8c99PVazpDgpSzmY9eDBnt", "Ui_emailInfo", undefined);
      var Ui_emailInfo = exports('Ui_emailInfo', /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(Ui_emailInfo, _UIListBase);
        function Ui_emailInfo() {
          var _this;
          _this = _UIListBase.call(this, Ui_emailInfo.custom) || this;
          _this._data = void 0;
          App.monitorMgr.addEventListener(MonitorType.email_update_info_view, _this.updateView, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Ui_emailInfo.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.removeEventListener(MonitorType.email_update_info_view, this.updateView, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIListBase.prototype.onCreated.call(this);
          this._data = data;
          this.initList();
          this.updateView();
        };
        _proto.updateView = function updateView(data) {
          var _this2 = this;
          if (!!data) {
            this._data = data;
          }
          var dataArr = this._data.attachments;
          this.scrollList.onItemRender = this.onItemRender.bind(this);
          this.scrollList.array = dataArr;
          this.getLabel("lbTitle").string = this._data.title;
          this.getRichText("lbrItem").string = "<b>" + this._data.content + "</b>";
          // 等待渲染队列
          setTimeout(function () {
            _this2.getNode("contentLbr").getComponent(UITransform).height = _this2.getNode("lbrItem").getComponent(UITransform).height;
          }, 0);
          this.getNode("imgAwardBg").active = this.getNode("lbEnclosure").active = dataArr.length != 0;
          // 0：未读无附件 1：已读 2：未读有附件 3：已读有附件
          this.getLabel("lbBtn").string = this._data.cstatus <= 1 ? "删除" : "领取";
        };
        _proto.onItemRender = function onItemRender(node, index) {
          // 0：未读无附件 1：已读 2：未读有附件 3：已读有附件
          var item = node.getComponent(Item_prop);
          item.setImgSelect(this._data.cstatus === 3);
        };
        _proto.onGetClick = function onGetClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          if (this._data.cstatus <= 1) {
            // 删除
            App.emailMgr.cs_delete_email_50003(this._data.mailId);
            this.onClose();
          } else {
            // 领取
            App.emailMgr.cs_get_email_rwd_50005(this._data.mailId);
          }
        };
        _proto.onBtnClickBack = function onBtnClickBack() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          _UIListBase.prototype.onClose.call(this);
        };
        return Ui_emailInfo;
      }(UIListBase));
      Ui_emailInfo.custom = {
        prefab: "prefab/view/uiEmailInfo",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnClickBack"
        }, _binding["btnClick"] = {
          method: "onGetClick"
        }, _binding)
      };
      ModuleContext.attachModule(Ui_emailInfo, ModuleDef.GAME_EMAIL);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_GetHeroView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './TeamMgr.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, ModuleContext, ModuleDef, TeamMgr, HeroJobIcon, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      TeamMgr = module.TeamMgr;
      HeroJobIcon = module.HeroJobIcon;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "3daa4IW5GtMdr5fc1Ml4RZm", "UI_GetHeroView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_GetHeroView = exports('UI_GetHeroView', (_dec = ccclass("UI_GetHeroView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_GetHeroView, _UIBase);
        function UI_GetHeroView() {
          var _this;
          _this = _UIBase.call(this, UI_GetHeroView.custom) || this;
          _this.layoutObj = null;
          return _this;
        }
        var _proto = UI_GetHeroView.prototype;
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this.layoutObj = this.layout;
          var hero_cfg = TeamMgr.inst.getHeroIdCfg(data.hero_id);
          App.resMgr.loadImage(this.layoutObj.jobSp, ModuleDef.BASE_COMMON, "/texture/new_common/" + HeroJobIcon[hero_cfg.job].icon);
          this.layoutObj.nameLabel.string = hero_cfg.name;
          this.layoutObj.action.onDestroy();
          this.layoutObj.action.playWithResource(ModuleDef.HERO, hero_cfg.res, "Idle");
          for (var index = 0; index < data.star; index++) {
            var star = this.layoutObj.starList[index];
            if (star) {
              star.node.active = index < data.star;
            }
          }
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
          this.layoutObj.action.onDestroy();
        };
        return UI_GetHeroView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_GetHeroView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_GetHeroView, ModuleDef.GAME_RECRUITMENT);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_GetRewardView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleContext.ts', './ModuleDef.ts', './UIListBase.ts', './App.ts', './Item_prop.ts'], function (exports) {
  var _inheritsLoose, cclegacy, Layout, UITransform, Vec3, tween, ModuleContext, ModuleDef, UIListBase, App, Item_prop;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Layout = module.Layout;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
      tween = module.tween;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UIListBase = module.UIListBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Item_prop = module.Item_prop;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "6beeboVWb5KTYUMHSweSDh6", "UI_GetRewardView", undefined);
      var UI_GetRewardView = exports('UI_GetRewardView', /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(UI_GetRewardView, _UIListBase);
        function UI_GetRewardView() {
          var _this;
          _this = _UIListBase.call(this, UI_GetRewardView.custom) || this;
          _this._data = void 0;
          _this._closeCb = null;
          _this.layoutObj = null;
          return _this;
        }
        var _proto = UI_GetRewardView.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
          this.release();
        }

        /**
         * 创建界面
         * @param data 奖励数据
         * @param closeCb 关闭回调
         * @param showXingPanUp 显示星盘升级
         * @param showFuShiHeCheng 显示符石合成
         * @param isAutoJump 是否自动跳转下一关
         */;
        _proto.onCreated = function onCreated(items, closeCb, isAutoJump) {
          _UIListBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this._data = items;
          this._closeCb = closeCb;
          this.initList();
          this.updateList();
        };
        _proto.updateList = function updateList() {
          this.scrollList.content.removeAllChildren();
          this.scrollList.onItemRender = this.onItemRender.bind(this);
          if (!Array.isArray(this._data)) {
            this.scrollList.array = [];
            this.adjustBgNodeHeight(0);
            return;
          }
          var vData = App.bagMgr.sortAward(this._data);
          this.scrollList.array = vData;
          this.adjustBgNodeHeight(Math.ceil(vData.length / 5));
          this.centerItemsIfNeeded(vData.length);
        }

        /**
         * 当道具数量少于5个时，设置居中显示
         * @param dataCount 数据数量
         */;
        _proto.centerItemsIfNeeded = function centerItemsIfNeeded(dataCount) {
          if (dataCount >= 5) return;
          var contentNode = this.scrollList.content;
          var layout = contentNode.getComponent(Layout);
          if (!layout) return;
          var itemWidth = 104;
          var spacingX = layout.spacingX || 20;
          var totalContentWidth = dataCount * itemWidth + (dataCount - 1) * spacingX;
          var scrollViewWidth = this.scrollList.node.getComponent(UITransform).width;
          var availableWidth = scrollViewWidth - layout.paddingLeft - layout.paddingRight;
          var newPaddingLeft = layout.paddingLeft + (availableWidth - totalContentWidth) / 2;
          layout.paddingLeft = newPaddingLeft;
          layout.updateLayout();
        }

        /**
         * 根据数据量调整bgNode高度
         * @param dataCount 数据数量
         */;
        _proto.adjustBgNodeHeight = function adjustBgNodeHeight(dataCount) {
          if (!this.layoutObj || !this.layoutObj.bgNode) return;
          var bgUITransform = this.layoutObj.bgNode.getComponent(UITransform);
          if (!bgUITransform) return;
          var minHeight = 220;
          var maxHeight = 581.593;
          var targetHeight = minHeight;
          if (dataCount > 0) {
            var itemHeight = 110;
            targetHeight = Math.min(minHeight + (dataCount - 1) * itemHeight, maxHeight);
          }
          bgUITransform.height = targetHeight;
        };
        _proto.onItemRender = function onItemRender(item, index) {
          item.setScale(new Vec3(0.75, 0.75, 0.75));
          tween(item).to(0.05 + 0.025 * index, {
            scale: new Vec3(1, 1, 1)
          }).start();
          var data = this.scrollList.array[index];
          item.getComponent(Item_prop).updateItem(data);
        };
        _proto.onClose = function onClose() {
          var _this$_closeCb;
          _UIListBase.prototype.onClose.call(this);
          (_this$_closeCb = this._closeCb) == null || _this$_closeCb.call(this);

          // 自动激活使用的道具
          // for (let dx0 = 0; dx0 < this._data.length; dx0++) {
          //     let oData = this._data[dx0];
          //     const itemConfig = App.bagMgr.getItemConfig(oData.itemid);
          //     if (!itemConfig) {
          //         continue;
          //     }
          //     // if (DaoJu.type === 6 && !mLog[DaoJu.type]) {
          //     //     //宝箱时装
          //     //     // let fashionId = DaoJu.synthesis_results;
          //     //     // if (App.fashionManager.checkCanActivation(fashionId)) {
          //     //     //     App.fashionManager.reqFashionActivation(fashionId);
          //     //     //     mLog[DaoJu.type] = 1;
          //     //     // }
          //     // }
          // }
        }

        /**
         * 确认按钮点击
         */;
        _proto.onBtnBackClick = function onBtnBackClick() {
          this.onClose();
        };
        return UI_GetRewardView;
      }(UIListBase));
      UI_GetRewardView.custom = {
        prefab: "prefab/view/UI_GetRewardView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding)
      };
      ModuleContext.attachModule(UI_GetRewardView, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_GMView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './App.ts', './Prompt.ts', './NetChannelMgr.ts', './MonitorType.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, Label, EditBox, Button, ModuleDef, ModuleContext, UIBase, App, Prompt, netChannel, ModType, MonitorType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Label = module.Label;
      EditBox = module.EditBox;
      Button = module.Button;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      ModType = module.ModType;
      MonitorType = module.MonitorType;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "fefb1Qgnr9OoZT1DylNl8Hb", "UI_GMView", undefined);

      /**
       * GM命令数据接口
       */

      /**
       * GM界面
       */
      var UI_GMView = exports('UI_GMView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_GMView, _UIBase);
        function UI_GMView() {
          var _this;
          _this = _UIBase.call(this, UI_GMView.custom) || this;
          /**
           * GM命令参数提示配置
           */
          _this.GM_PARAMSNAMES = {
            1: "道具ID,数量",
            2: "英雄ID",
            3: "等级",
            4: "建筑ID,sid",
            5: "任务ID",
            6: "无需参数",
            7: "士兵ID",
            8: "无需参数",
            1001: "批量命令，一键资源",
            // 批量执行命令（前端预设）
            1002: "批量命令，一键英雄，士兵" // 批量执行命令（前端预设）
          };
          /**
           * GM命令默认参数配置
           */
          _this.DEFAULT_PARAMS = {
            1: '{"item_id":10001,"num":100}',
            2: '{"hero_id":2}',
            3: '{"level":100}',
            4: '{"building_id":10001,"sid":1}',
            5: '{"task_id":10001}',
            6: "{}",
            7: '{"soldier_id":2}',
            8: "{}",
            1001: '[{"gm_type":1,"params":{"item_id":1,"num":10000}},{"gm_type":1,"params":{"item_id":2,"num":10000}},{"gm_type":1,"params":{"item_id":3,"num":10000}},{"gm_type":1,"params":{"item_id":4,"num":10000}},{"gm_type":1,"params":{"item_id":5,"num":10000}},{"gm_type":1,"params":{"item_id":6,"num":10000}}]',
            // 批量增加道具（1-6）
            1002: '[{"gm_type":2,"params":{"hero_id":2}},{"gm_type":7,"params":{"soldier_id":2}},{"gm_type":7,"params":{"soldier_id":3}}]' // 批量增加英雄，士兵
          };

          _this.layoutObj = null;
          _this.commandList = [];
          return _this;
        }
        var _proto = UI_GMView.prototype;
        _proto.onCreated = function onCreated(_data) {
          this.layoutObj = this.layout;
          _UIBase.prototype.onCreated.call(this);
          this.addEventListeners();
          netChannel.game.send(ModType.gm, MonitorType.CMD_ReqGMCommandList, {
            gm_level: 1
          });
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGMCommandList, this.resGMCommandList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGMExecute, this.resGMExecute, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGMBatchExecute, this.resGMBatchExecute, this);
        }

        /**
         * GM命令列表加载完成
         */;
        _proto.resGMCommandList = function resGMCommandList(res) {
          if (res && res.code === 200) {
            try {
              var commands = JSON.parse(res.commands);
              if (Array.isArray(commands)) {
                this.commandList = commands;
                this.addBatchExecuteCommand();
                this.createCommandList();
              } else {
                Prompt.popTip("GM命令列表格式错误");
              }
            } catch (_unused) {
              Prompt.popTip("解析GM命令列表失败");
            }
          } else {
            Prompt.popTip("获取GM命令列表失败");
          }
        }

        /**
         * 添加批量执行命令到列表
         */;
        _proto.addBatchExecuteCommand = function addBatchExecuteCommand() {
          // 批量增加道具（道具ID 1-6）
          var batchAddItemsCommand = {
            gm_type: 1001,
            name: "一键资源",
            level: 1
          };
          var exists1001 = this.commandList.some(function (cmd) {
            return cmd.gm_type === 1001;
          });
          if (!exists1001) {
            this.commandList.push(batchAddItemsCommand);
          }

          // 批量增加英雄和士兵
          var batchAddHeroSoldierCommand = {
            gm_type: 1002,
            name: "一键兵种",
            level: 1
          };
          var exists1002 = this.commandList.some(function (cmd) {
            return cmd.gm_type === 1002;
          });
          if (!exists1002) {
            this.commandList.push(batchAddHeroSoldierCommand);
          }
        };
        _proto.createCommandList = function createCommandList() {
          if (!this.layoutObj.scrollList) return;
          this.layoutObj.scrollList.content.removeAllChildren();
          this.layoutObj.scrollList.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.scrollList.array = this.commandList;
        }

        /**
         * 列表项渲染回调
         * @param node 节点
         * @param index 索引
         */;
        _proto.onItemRender = function onItemRender(node, index) {
          var _node$getChildByName,
            _node$getChildByName2,
            _node$getChildByName3,
            _node$getChildByName4,
            _this2 = this;
          if (index < 0 || index >= this.commandList.length) return;
          var commandData = this.commandList[index];
          var nameLabel = (_node$getChildByName = node.getChildByName("nameLab")) == null ? void 0 : _node$getChildByName.getComponent(Label);
          var paramHintLabel = (_node$getChildByName2 = node.getChildByName("paramHintLabel")) == null ? void 0 : _node$getChildByName2.getComponent(Label);
          var paramInput = (_node$getChildByName3 = node.getChildByName("paramInput")) == null ? void 0 : _node$getChildByName3.getComponent(EditBox);
          var executeBtn = (_node$getChildByName4 = node.getChildByName("executeBtn")) == null ? void 0 : _node$getChildByName4.getComponent(Button);
          if (nameLabel) {
            nameLabel.string = commandData.name;
          }
          if (paramHintLabel) {
            paramHintLabel.string = this.GM_PARAMSNAMES[commandData.gm_type];
          }
          if (paramInput) {
            paramInput.maxLength = commandData.gm_type === 1001 ? 2000 : 500;
            paramInput.string = this.DEFAULT_PARAMS[commandData.gm_type] || "{}";
          }
          if (executeBtn) {
            executeBtn.node.off(Button.EventType.CLICK);
            executeBtn.node.on(Button.EventType.CLICK, function () {
              var params = paramInput ? paramInput.string : "{}";
              _this2.onExecuteCommand(commandData, params);
            }, this);
          }
        }

        /**
         * GM命令执行结果
         */;
        _proto.resGMExecute = function resGMExecute(res) {
          if (res && res.code === 200) {
            Prompt.popTip("GM执行成功");
            // 解析结果
            if (res.result) {
              var result = JSON.parse(res.result);
              App.log.logBusiness("GM命令执行结果:", result);
            }
          } else {
            Prompt.popTip("执行失败");
          }
        }

        /**
         * 批量执行GM命令结果
         */;
        _proto.resGMBatchExecute = function resGMBatchExecute(res) {
          if (res && res.code === 200) {
            try {
              var results = JSON.parse(res.results);
              if (Array.isArray(results)) {
                var successCount = 0;
                var failCount = 0;
                for (var _iterator = _createForOfIteratorHelperLoose(results), _step; !(_step = _iterator()).done;) {
                  var result = _step.value;
                  if (result.code === 200) {
                    successCount++;
                  } else {
                    failCount++;
                  }
                  App.log.logBusiness("\u6279\u91CF\u6267\u884C\u7ED3\u679C[" + result.index + "]:", result);
                }
                Prompt.popTip("\u6279\u91CF\u6267\u884C\u5B8C\u6210: \u6210\u529F" + successCount + "\u4E2A, \u5931\u8D25" + failCount + "\u4E2A");
              } else {
                Prompt.popTip("批量执行结果格式错误");
              }
            } catch (error) {
              Prompt.popTip("解析批量执行结果失败");
              App.log.logError("解析批量执行结果失败:", error);
            }
          } else {
            Prompt.popTip("批量执行失败");
          }
        }

        /**
         * 执行GM命令
         */;
        _proto.onExecuteCommand = function onExecuteCommand(data, params) {
          try {
            // 如果是批量执行命令,使用批量执行协议
            if (data.gm_type === 1001 || data.gm_type === 1002) {
              this.onExecuteBatchCommand(params);
              return;
            }

            // 单个命令执行
            try {
              JSON.parse(params);
            } catch (_unused2) {
              Prompt.popTip("参数格式错误，请输入正确的JSON格式");
              return;
            }
            var req = {
              gm_type: data.gm_type,
              params: params,
              gm_level: 1
            };
            netChannel.game.send(ModType.gm, MonitorType.CMD_ReqGMExecute, req);
          } catch (error) {
            App.log.logError("执行GM命令失败:", error);
          }
        }

        /**
         * 执行批量GM命令
         */;
        _proto.onExecuteBatchCommand = function onExecuteBatchCommand(params) {
          try {
            // 验证是否为有效的JSON数组格式
            var commands = JSON.parse(params);
            if (!Array.isArray(commands)) {
              Prompt.popTip("批量命令参数必须是JSON数组格式");
              return;
            }

            // 验证数组中每个命令的格式
            for (var i = 0; i < commands.length; i++) {
              var cmd = commands[i];
              if (!cmd.gm_type || cmd.params === undefined) {
                Prompt.popTip("\u6279\u91CF\u547D\u4EE4\u7B2C" + (i + 1) + "\u9879\u683C\u5F0F\u9519\u8BEF\uFF0C\u5FC5\u987B\u5305\u542Bgm_type\u548Cparams");
                return;
              }
              // 验证params是否为有效的JSON（如果是字符串，需要能解析；如果是对象，直接通过）
              if (typeof cmd.params === "string") {
                try {
                  JSON.parse(cmd.params);
                } catch (_unused3) {
                  Prompt.popTip("\u6279\u91CF\u547D\u4EE4\u7B2C" + (i + 1) + "\u9879\u7684params\u683C\u5F0F\u9519\u8BEF");
                  return;
                }
              } else if (typeof cmd.params !== "object") {
                Prompt.popTip("\u6279\u91CF\u547D\u4EE4\u7B2C" + (i + 1) + "\u9879\u7684params\u5FC5\u987B\u662F\u5BF9\u8C61\u6216JSON\u5B57\u7B26\u4E32");
                return;
              }
            }

            // 组装批量执行请求
            var req = {
              commands: params,
              // 直接使用JSON字符串
              gm_level: 1
            };
            App.log.logBusiness("批量执行GM命令:", JSON.stringify(commands));
            netChannel.game.send(ModType.gm, MonitorType.CMD_ReqGMBatchExecute, req);
          } catch (error) {
            Prompt.popTip("批量命令参数格式错误，请输入正确的JSON数组格式");
            App.log.logError("执行批量GM命令失败:", error);
          }
        };
        _proto.onBtnCloseClick = function onBtnCloseClick() {
          this.onClose();
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
          this.commandList = [];
        };
        return UI_GMView;
      }(UIBase));
      UI_GMView.custom = {
        prefab: "prefab/view/UI_GMView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnCloseClick"
        }, _binding)
      };
      ModuleContext.attachModule(UI_GMView, ModuleDef.GAME_MAIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_HeroAttributeTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './TeamMgr.ts', './DBRecord.ts', './Utils.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, ModuleContext, ModuleDef, TeamMgr, DBRecord, Utils;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "cccc7NY8klP4ZrCztgim6U5", "UI_HeroAttributeTips", undefined);
      var ccclass = _decorator.ccclass;
      var UI_HeroAttributeTips = exports('UI_HeroAttributeTips', (_dec = ccclass("UI_HeroAttributeTips"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_HeroAttributeTips, _UIBase);
        function UI_HeroAttributeTips() {
          var _this;
          _this = _UIBase.call(this, UI_HeroAttributeTips.custom) || this;
          _this.layoutObj = null;
          _this._heroData = void 0;
          return _this;
        }
        var _proto = UI_HeroAttributeTips.prototype;
        _proto.onCreated = function onCreated(heroData) {
          _UIBase.prototype.onCreated.call(this, heroData);
          this._heroData = heroData;
          this.layoutObj = this.layout;
          this.updateView();
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
        };
        _proto.updateView = function updateView() {
          var heroStageCfg = TeamMgr.inst.getHeroStageCfg(this._heroData.hero_id, this._heroData.stage);
          var attrInfoList = TeamMgr.inst.getAttrInfo(this._heroData.hero_id, this._heroData.level);
          this.layoutObj.timeLabel.string = "\u91CD\u751F\u65F6\u95F4\uFF1A" + heroStageCfg.cd + "\u79D2";
          for (var index = 0; index < this.layoutObj.ordLabes.length; index++) {
            var lab = this.layoutObj.ordLabes[index];
            var info = attrInfoList[index];
            if (info) {
              lab.node.active = true;
              lab.string = info.name + " " + info.value;
            } else {
              lab.string = "";
              lab.node.active = false;
            }
          }
          var ShuXing = DBRecord.fetchAll("ShuXing");
          var seniorAtts = [];
          Utils.forArr(ShuXing, function (row) {
            if (row.ordinary === 2) {
              var attrs = Utils.getVitName(row.id, 0);
              seniorAtts.push(attrs);
            }
          });
          for (var i = 0; i < this.layoutObj.seniorLabes.length; i++) {
            var _lab = this.layoutObj.seniorLabes[i];
            var senInfo = seniorAtts[i];
            if (senInfo && senInfo[0] !== undefined) {
              _lab.node.active = true;
              _lab.string = senInfo[0] + " " + senInfo[1];
            } else {
              _lab.string = "";
              _lab.node.active = false;
            }
          }
        };
        return UI_HeroAttributeTips;
      }(UIBase), _class2.custom = {
        prefab: "prefab/tips/UI_HeroAttributeTips",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_HeroAttributeTips, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_HeroCultivateView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './TeamMgr.ts', './TeamHeroItem.ts', './HeroSkillItem.ts', './App.ts', './MonitorType.ts', './UtilGame.ts', './UI_HeroSkillDescTips.ts', './UIMgr.ts', './Layout_UI_HeroSkillDescTips.ts', './UIUtil.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './UI_HeroAttributeTips.ts', './Layout_UI_HeroAttributeTips.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, Color, UIBase, ModuleContext, ModuleDef, TeamMgr, HeroType, HeroJobIcon, TeamHeroItem, HeroSkillItem, App, MonitorType, UtilGame, UI_HeroSkillDescTips, UIMgr, LayerType, Layout_UI_HeroSkillDescTips, UIUtil, PlaceConfigMgr, PlaceGameMgr, UI_HeroAttributeTips, Layout_UI_HeroAttributeTips;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      Color = module.Color;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      TeamMgr = module.TeamMgr;
      HeroType = module.HeroType;
      HeroJobIcon = module.HeroJobIcon;
    }, function (module) {
      TeamHeroItem = module.TeamHeroItem;
    }, function (module) {
      HeroSkillItem = module.HeroSkillItem;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      UI_HeroSkillDescTips = module.UI_HeroSkillDescTips;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      Layout_UI_HeroSkillDescTips = module.Layout_UI_HeroSkillDescTips;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      UI_HeroAttributeTips = module.UI_HeroAttributeTips;
    }, function (module) {
      Layout_UI_HeroAttributeTips = module.Layout_UI_HeroAttributeTips;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "32ab0CET6pHRLeUoPGe3sIj", "UI_HeroCultivateView", undefined);
      var ccclass = _decorator.ccclass;
      var PanelType = /*#__PURE__*/function (PanelType) {
        PanelType[PanelType["Cultivate"] = 0] = "Cultivate";
        PanelType[PanelType["Star"] = 1] = "Star";
        PanelType[PanelType["technology"] = 2] = "technology";
        return PanelType;
      }(PanelType || {});
      var UI_HeroCultivateView = exports('UI_HeroCultivateView', (_dec = ccclass("UI_HeroCultivateView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_HeroCultivateView, _UIBase);
        function UI_HeroCultivateView() {
          var _this;
          _this = _UIBase.call(this, UI_HeroCultivateView.custom) || this;
          _this.layoutObj = null;
          /** 按钮选项索引 */
          _this._btnIdx = 0;
          _this._curTabBtn = null;
          _this._curHeroItem = null;
          _this._curHeroData = null;
          return _this;
        }
        var _proto = UI_HeroCultivateView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this._btnIdx = (data == null ? void 0 : data.index) || 0;
          this.layoutObj = this.layout;
          this.layoutObj.stageCostItem.setClickTouch(false);
          this.layoutObj.lvCostItem.setClickTouch(false);
          this.addEventListeners();
          this.initHeroList();
          this.initSkillList();
          this.initToggleGroup();
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeHero, this.onResUpgradeHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpStageHero, this.onResUpStageHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpStarHero, this.onResUpStarHero, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResNewHero, this.onResNewHero, this);
        }
        /*
         * 初始化 ToggleGroup
         */;
        _proto.initToggleGroup = function initToggleGroup() {
          var _this2 = this;
          if (!this.layoutObj || !this.layoutObj.heroScroll || !this.layoutObj.heroScroll.content) {
            console.error("heroScroll 或 content 未初始化");
            return;
          }
          var toggles = this.layoutObj.tabBtn;

          // 为每个 Toggle 添加事件监听
          toggles.forEach(function (toggle, index) {
            toggle.node.on(Toggle.EventType.TOGGLE, function () {
              if (toggle.isChecked) {
                _this2.onTypeChanged(index);
              }
            });
          });

          // 默认选中第一个
          if (toggles.length > 0) {
            toggles[0].isChecked = true;
            this.onTypeChanged(0);
          }

          // 默认选中第一个英雄
          setTimeout(function () {
            _this2.selectFirstHero();
          }, 100);
        };
        _proto.initHeroList = function initHeroList() {
          this.layoutObj.heroScroll.content.removeAllChildren();
          this.layoutObj.heroScroll.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.heroScroll.onItemClick = this.onItemClick.bind(this);
          var heroList = TeamMgr.inst.getHeroJobList(HeroType.ALL);
          this.layoutObj.heroScroll.array = heroList;
        }
        /**
         * 初始化技能列表
         */;
        _proto.initSkillList = function initSkillList() {
          if (!this.layoutObj.skillScroll) return;
          this.layoutObj.skillScroll.content.removeAllChildren();
          this.layoutObj.skillScroll.onItemRender = this.onSkillItemRender.bind(this);
          this.layoutObj.skillScroll.onItemClick = this.onSkillItemClick.bind(this);
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.heroScroll.array[index];
          var cellComp = item.getComponent(TeamHeroItem);
          cellComp.show(data);
        };
        _proto.onItemClick = function onItemClick(item, _index) {
          if (this._curHeroItem) {
            this._curHeroItem.setSel(false);
          }
          var cellComp = item.getComponent(TeamHeroItem);
          cellComp.activeteHero(cellComp._data.hero_id);
          this._curHeroItem = cellComp;
          this._curHeroItem.setSel(true);
          this._curHeroData = cellComp._data;
          this.updateHeroInfo(cellComp._data);
        }
        /**
         * 选择第一个英雄
         */;
        _proto.selectFirstHero = function selectFirstHero() {
          if (!this.layoutObj.heroScroll || !this.layoutObj.heroScroll.content) return;
          var children = this.layoutObj.heroScroll.content.children;
          if (children.length > 0) {
            // 获取第一个子节点并调用 onItemClick
            this.onItemClick(children[0], 0);
          }
        }
        /**
         * 选择功能页面
         * @param index
         */;
        _proto.onTypeChanged = function onTypeChanged(index) {
          switch (index) {
            case PanelType.Cultivate:
              this.cultivatePanel();
              break;
            case PanelType.Star:
              this.starPanel();
              break;
            case PanelType.technology:
              this.layoutObj.tabBtn[this._btnIdx].isChecked = true;
              UIUtil.showTip("\u529F\u80FD\u6682\u672A\u5F00\u542F");
              // this.technologyPanel();
              break;
          }
          this._btnIdx = index;
          if (this._curHeroData) {
            this.updateHeroInfo(this._curHeroData);
          }
        }
        /**
         * 培养页面
         */;
        _proto.cultivatePanel = function cultivatePanel() {
          this.layoutObj.levelNode.active = true;
          this.layoutObj.upStarNode.active = false;
          this.layoutObj.lvBtn.node.active = true;
          this.layoutObj.stageBtn.node.active = false;
          this.layoutObj.actNode.active = false;
        }
        /**
         * 升星页面
         */;
        _proto.starPanel = function starPanel() {
          this.layoutObj.levelNode.active = false;
          this.layoutObj.upStarNode.active = true;
          this.layoutObj.lvBtn.node.active = false;
          this.layoutObj.stageBtn.node.active = false;
          this.layoutObj.actNode.active = false;

          // 更新升星信息
          if (this._curHeroData) {
            this.updateStarInfo(this._curHeroData);
          }
        }

        /**
         * 更新升星信息
         */;
        _proto.updateStarInfo = function updateStarInfo(data) {
          if (!data) return;
          var currentStar = data.star || 0;
          var isActivated = data.level && data.level > 0;
          this.layoutObj.actNode.active = !isActivated;
          // 获取当前星级配置
          if (currentStar > 0) {
            var currentStarCfg = TeamMgr.inst.getHeroStarCfg(data.hero_id, currentStar);
            if (currentStarCfg && currentStarCfg.skill_id) {
              var skillCfg = TeamMgr.inst.getHeroSkillCfg(currentStarCfg.skill_id);
              if (skillCfg) {
                this.layoutObj.curStgLab.string = skillCfg.name || "";
                this.layoutObj.curDescLab.string = skillCfg.desc || "";
              }
            } else {
              this.layoutObj.curStgLab.string = "无";
              this.layoutObj.curDescLab.string = "";
            }
          } else {
            this.layoutObj.curStgLab.string = "无";
            this.layoutObj.curDescLab.string = "";
          }

          // 获取下一星级配置
          var nextStarCfg = TeamMgr.inst.getHeroStarCfg(data.hero_id, currentStar + 1);
          if (nextStarCfg && nextStarCfg.skill_id) {
            var nextSkillCfg = TeamMgr.inst.getHeroSkillCfg(nextStarCfg.skill_id);
            if (nextSkillCfg) {
              this.layoutObj.nextStgLab.string = nextSkillCfg.name || "";
              this.layoutObj.nextDescLab.string = nextSkillCfg.desc || "";
            }
            this.layoutObj.upStarBtn.node.active = isActivated;
            this.layoutObj.upStarCost1.node.active = isActivated;
            this.layoutObj.upStarCost2.node.active = isActivated;
            if (isActivated) {
              // 设置升星消耗
              if (nextStarCfg.cost_item && nextStarCfg.cost_item.length > 0) {
                // 第一个消耗
                if (nextStarCfg.cost_item[0]) {
                  this.layoutObj.upStarCost1.setDataNeedCost("", nextStarCfg.cost_item[0]);
                }
                // 第二个消耗
                if (nextStarCfg.cost_item.length > 1 && nextStarCfg.cost_item[1]) {
                  this.layoutObj.upStarCost2.setDataNeedCost("", nextStarCfg.cost_item[1]);
                  this.layoutObj.upStarCost2.node.active = true;
                } else {
                  this.layoutObj.upStarCost2.node.active = false;
                }
              }
            } else {
              this.notActive(data);
            }
          } else {
            // 已经是最高星级
            this.layoutObj.nextStgLab.string = "已满星";
            this.layoutObj.nextDescLab.string = "";
            this.layoutObj.upStarCost1.node.active = false;
            this.layoutObj.upStarCost2.node.active = false;
          }
        }
        /**
         * 科技页面
         */;
        _proto.technologyPanel = function technologyPanel() {}
        /**
         * 刷新英雄数据
         */;
        _proto.updateHeroInfo = function updateHeroInfo(data) {
          this.layoutObj.lvLab.string = data.level + "\u7EA7";
          this.layoutObj.stageLab.string = data.stage + "\u9636";
          var heroCfg = TeamMgr.inst.getHeroIdCfg(data.hero_id);
          this.layoutObj.nameLab.string = "" + heroCfg.name;
          this.layoutObj.action.onDestroy();
          this.layoutObj.action.playWithResource(ModuleDef.HERO, heroCfg.res, "Idle");
          App.resMgr.loadImage(this.layoutObj.jobSp, ModuleDef.BASE_COMMON, "/texture/new_common/" + HeroJobIcon[heroCfg.job].icon);
          var starCount = data.star % 5 || 0;
          for (var i = 0; i < this.layoutObj.starList.length; i++) {
            if (data.star > 5) {
              App.resMgr.loadImage(this.layoutObj.starList[i], ModuleDef.BASE_COMMON, "/texture/new_common/com_star_red");
            }
            this.layoutObj.starList[i].node.active = i < starCount;
          }

          // 如果当前在升星页面，更新升星信息
          if (this._btnIdx === PanelType.Star) {
            this.updateStarInfo(data);
          } else if (this._btnIdx === PanelType.Cultivate) {
            var isActivated = data.level && data.level > 0;
            this.layoutObj.stageBtn.node.active = isActivated;
            this.layoutObj.lvBtn.node.active = isActivated;
            this.layoutObj.stageCostItem.node.active = isActivated;
            this.layoutObj.lvCostItem.node.active = isActivated;
            this.layoutObj.actNode.active = !isActivated;
            this.layoutObj.lvMaxLab.node.active = false;
            if (isActivated) {
              // 检查是否需要突破
              var needBreakthrough = TeamMgr.inst.checkNeedBreakthrough(data);
              if (needBreakthrough) {
                // 需要突破：显示突破按钮，隐藏升级按钮
                this.layoutObj.stageBtn.node.active = true;
                this.layoutObj.lvBtn.node.active = false;

                // 获取突破消耗
                var stageCfg = TeamMgr.inst.getHeroStageCfg(data.hero_id, data.stage + 1);
                if (stageCfg && stageCfg.cost_item && stageCfg.cost_item.length > 0) {
                  this.layoutObj.stageCostItem.setDataNeedCost("", stageCfg.cost_item[0]);
                }
              } else {
                if (this.checkBuildingRequirement(this._curHeroData.hero_id, this._curHeroData.level)) {
                  // 可以升级：显示升级按钮，隐藏突破按钮
                  this.layoutObj.lvBtn.node.active = true;
                  this.layoutObj.stageBtn.node.active = false;
                  // 获取升级消耗
                  var costs = TeamMgr.inst.getHeroUpLevelCost(this._curHeroData.hero_id, this._curHeroData.level);
                  this.layoutObj.lvCostItem.setDataNeedCost("", costs);
                }
              }
            } else {
              this.notActive(data);
            }

            //更新英雄形象

            // 更新属性列表
            this.updateAttrList(data);

            // 更新技能列表
            this.updateSkillList(data);
          }
        };
        _proto.notActive = function notActive(data) {
          var _heroCfg$fenjie;
          var heroCfg = TeamMgr.inst.getHeroIdCfg(data.hero_id);
          this.layoutObj.actNode.active = true;
          // 查询背包中的英雄碎片
          var heroFragmentId = heroCfg.fenjie[0][0];
          var fragmentCount = App.bagMgr.getItemCount(heroFragmentId);
          var needFragmentCount = (heroCfg == null || (_heroCfg$fenjie = heroCfg.fenjie) == null || (_heroCfg$fenjie = _heroCfg$fenjie[0]) == null ? void 0 : _heroCfg$fenjie[1]) || 30; // 默认30个

          // 设置进度条
          if (this.layoutObj.debrisBar) {
            UtilGame.loadHeroHeadIcon(this.layoutObj.debrisIcon, data.hero_id);
            this.layoutObj.debrisBar.progress = Math.min(fragmentCount / needFragmentCount, 1);
            this.layoutObj.debrisBarLab.string = fragmentCount + "/" + needFragmentCount;
          }
        }
        /**
         * 更新属性列表
         */;
        _proto.updateAttrList = function updateAttrList(data) {
          if (!data || !this.layoutObj.typeList) return;

          // 获取英雄属性信息
          var attrInfoList = TeamMgr.inst.getAttrInfo(data.hero_id, data.level);

          // 遍历属性列表并更新每个 AttrItem
          for (var i = 0; i < this.layoutObj.typeList.length && i < attrInfoList.length; i++) {
            this.layoutObj.typeList[i].show(attrInfoList[i]);
          }
        }
        /**
         * 更新技能列表
         */;
        _proto.updateSkillList = function updateSkillList(data) {
          if (!data || !this.layoutObj.skillScroll) return;

          // 获取英雄技能ID列表
          var skillLists = TeamMgr.inst.getHeroSkillInfo(data.hero_id, data.stage, data.star);

          // 设置技能列表数据
          // this.initSkillList();
          this.layoutObj.skillScroll.array = skillLists;
          this.layoutObj.skillScroll.updateAllItems();
        }
        /**
         * 技能列表渲染回调
         */;
        _proto.onSkillItemRender = function onSkillItemRender(item, index) {
          var skillId = this.layoutObj.skillScroll.array[index];
          var skillItem = item.getComponent(HeroSkillItem);
          if (skillItem) {
            skillItem.setScalle(0.8);
            skillItem.show(skillId);
          }
        };
        _proto.onSkillItemClick = function onSkillItemClick(item, _index) {
          var cellComp = item.getComponent(HeroSkillItem);
          if (cellComp) {
            UIMgr.inst.open(UI_HeroSkillDescTips, LayerType.touchTip, Layout_UI_HeroSkillDescTips, [cellComp._data]);
          }
        };
        _proto.showAttrUp = function showAttrUp() {
          // 获取英雄属性信息
          var attrInfoList = TeamMgr.inst.getAttrInfo(this._curHeroData.hero_id, this._curHeroData.level);
          var attrs = [];
          for (var i = 0; i < attrInfoList.length; i++) {
            var value = attrInfoList[i].value;
            var nextValue = attrInfoList[i].nextValue;
            var addValue = nextValue - value;
            if (addValue > 0) {
              attrs.push({
                attrName: attrInfoList[i].name,
                addValue: addValue
              });
            }
          }
          this.layoutObj.upAttrTipsItem.showMultipleTips(attrs);
        }
        /**
         * 英雄升级
         */;
        _proto.onUpLevel = function onUpLevel() {
          if (!this._curHeroData) {
            UIUtil.showTip("请先选择英雄");
            return;
          }

          // 检查消耗是否足够
          if (!this.layoutObj.lvCostItem.checkCostEnough()) {
            UIUtil.showTip("道具不足，无法升级");
            this.layoutObj.lvCostItem.openItemDetailView();
            return;
          }

          // 发送升级协议
          TeamMgr.inst.reqUpgradeHero(this._curHeroData.hero_id);
        }

        /**
         * 英雄突破
         */;
        _proto.onUpStage = function onUpStage() {
          if (!this._curHeroData) {
            UIUtil.showTip("请先选择英雄");
            return;
          }

          // 检查消耗是否足够
          if (!this.layoutObj.stageCostItem.checkCostEnough()) {
            UIUtil.showTip("道具不足，无法突破");
            this.layoutObj.stageCostItem.openItemDetailView();
            return;
          }

          // 发送突破协议
          TeamMgr.inst.reqUpStageHero(this._curHeroData.hero_id);
        }
        /**
         * 英雄升星
         */;
        _proto.onUpStar = function onUpStar() {
          if (!this._curHeroData) {
            UIUtil.showTip("请先选择英雄");
            return;
          }

          // 检查第一个消耗是否足够
          if (!this.layoutObj.upStarCost1.checkCostEnough()) {
            UIUtil.showTip("道具不足，无法升星");
            this.layoutObj.upStarCost1.openItemDetailView();
            return;
          }

          // 如果有第二个消耗，也需要检查
          if (this.layoutObj.upStarCost2.node.active && !this.layoutObj.upStarCost2.checkCostEnough()) {
            UIUtil.showTip("道具不足，无法升星");
            this.layoutObj.upStarCost2.openItemDetailView();
            return;
          }

          // 发送升星协议
          TeamMgr.inst.reqUpStarHero(this._curHeroData.hero_id);
        };
        _proto.onDebrisAddBtn = function onDebrisAddBtn() {
          var heroCfg = TeamMgr.inst.getHeroIdCfg(this._curHeroData.hero_id);
          var heroFragmentId = heroCfg.fenjie[0][0];
          App.bagMgr.showItemResources(heroFragmentId);
        };
        _proto.onDetailedBtn = function onDetailedBtn() {
          if (this._curHeroData.stage <= 0) {
            UIUtil.showTip("英雄未激活");
            return;
          }
          UIMgr.inst.open(UI_HeroAttributeTips, LayerType.touchTip, Layout_UI_HeroAttributeTips, [this._curHeroData]);
        }
        /**
         * 英雄升级返回
         */;
        _proto.onResUpgradeHero = function onResUpgradeHero(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u82F1\u96C4\u5347\u7EA7\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 更新当前选中英雄的数据
          if (this._curHeroData && this._curHeroData.hero_id === msg.hero_id) {
            this.showAttrUp();
            this._curHeroData.level = msg.level;

            // 更新当前选中的英雄item显示
            if (this._curHeroItem) {
              this._curHeroItem.show(this._curHeroData);
            }

            // 更新界面信息
            this.updateHeroInfo(this._curHeroData);
          }
        }

        /**
         * 英雄突破返回
         */;
        _proto.onResUpStageHero = function onResUpStageHero(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u82F1\u96C4\u7A81\u7834\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 更新当前选中英雄的数据
          if (this._curHeroData && this._curHeroData.hero_id === msg.hero_id) {
            this._curHeroData.stage = msg.stage;

            // 更新当前选中的英雄item显示
            if (this._curHeroItem) {
              this._curHeroItem.show(this._curHeroData);
            }

            // 更新界面信息
            this.updateHeroInfo(this._curHeroData);
          }
        }

        /**
         * 英雄升星返回
         */;
        _proto.onResUpStarHero = function onResUpStarHero(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u82F1\u96C4\u5347\u661F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 更新当前选中英雄的数据
          if (this._curHeroData && this._curHeroData.hero_id === msg.hero_id) {
            this._curHeroData.star = msg.star;

            // 更新当前选中的英雄item显示
            if (this._curHeroItem) {
              this._curHeroItem.show(this._curHeroData);
            }

            // 更新界面信息
            this.updateHeroInfo(this._curHeroData);
            this.starPanel();
          }
        };
        _proto.onResNewHero = function onResNewHero(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u65B0\u82F1\u96C4\u63A8\u9001\u6570\u636E - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          // 更新当前选中英雄的数据
          if (this._curHeroData && this._curHeroData.hero_id === msg.hero.hero_id) {
            this._curHeroData = msg.hero;

            // 更新当前选中的英雄item显示
            if (this._curHeroItem) {
              this._curHeroItem.show(this._curHeroData);
            }

            // 更新界面信息
            this.updateHeroInfo(this._curHeroData);
            if (this._btnIdx === PanelType.Star) {
              this.starPanel();
            }
          }
        }
        /**
         * 检查建筑等级要求
         * @param hero_id 士兵id
         * @param targetLevel 目标等级
         * @returns 是否满足建筑等级要求
         */;
        _proto.checkBuildingRequirement = function checkBuildingRequirement(hero_id, targetLevel) {
          // 获取目标等级配置
          var levelCfg = TeamMgr.inst.getHeroLevelCfg(hero_id, targetLevel + 1);
          if (!levelCfg) {
            // 没有配置，可能已满级
            if (this.layoutObj.lvBtn) {
              this.layoutObj.lvBtn.node.active = false;
            }
            if (this.layoutObj.lvMaxLab) {
              this.layoutObj.lvMaxLab.node.active = true;
              this.layoutObj.lvMaxLab.string = "已达到最高等级";
              this.layoutObj.lvMaxLab.color = new Color().fromHEX("#FF3E3E");
            }
            return false;
          }

          // 检查建筑等级限制
          if (levelCfg.jianzhu && levelCfg.jianzhu.length > 0) {
            for (var i = 0; i < levelCfg.jianzhu.length; i++) {
              var requirement = levelCfg.jianzhu[i];
              var buildingType = requirement[0]; // 建筑类型
              var requiredLevel = requirement[1]; // 需要的等级

              // 获取玩家当前该建筑的等级
              var currentLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(buildingType);
              if (currentLevel < requiredLevel) {
                // 建筑等级不足，隐藏升级按钮，显示提示
                if (this.layoutObj.lvBtn) {
                  this.layoutObj.lvBtn.node.active = false;
                }
                this.layoutObj.stageBtn.node.active = false;
                if (this.layoutObj.lvMaxLab) {
                  this.layoutObj.lvMaxLab.node.active = true;
                  // 获取建筑名称
                  var buildingName = PlaceConfigMgr.inst.getBuildingName(buildingType);
                  this.layoutObj.lvMaxLab.string = "\u5347\u7EA7\u6761\u4EF6\uFF1A" + buildingName + "\u8FBE\u5230" + requiredLevel + "\u7EA7";
                  this.layoutObj.lvMaxLab.color = new Color().fromHEX("#FF3E3E");
                }
                return false;
              }
            }
          }

          // 满足所有条件，显示升级按钮，隐藏提示
          if (this.layoutObj.lvBtn) {
            this.layoutObj.lvBtn.node.active = true;
          }
          if (this.layoutObj.lvMaxLab) {
            this.layoutObj.lvMaxLab.node.active = false;
          }
          return true;
        };
        return UI_HeroCultivateView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_HeroCultivateView",
        binding: (_binding = {}, _binding["btnBack"] = {
          method: "onClose"
        }, _binding["lvBtn"] = {
          method: "onUpLevel"
        }, _binding["stageBtn"] = {
          method: "onUpStage"
        }, _binding["upStarBtn"] = {
          method: "onUpStar"
        }, _binding["debrisAddBtn"] = {
          method: "onDebrisAddBtn"
        }, _binding["detailedBtn"] = {
          method: "onDetailedBtn"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_HeroCultivateView, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_HeroSkillActivityTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Color, UIBase, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Color = module.Color;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "ddceeBcjxpL7bakLxd3idB2", "UI_HeroSkillActivityTips", undefined);
      var ccclass = _decorator.ccclass;
      var UI_HeroSkillActivityTips = exports('UI_HeroSkillActivityTips', (_dec = ccclass("UI_HeroSkillActivityTips"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_HeroSkillActivityTips, _UIBase);
        function UI_HeroSkillActivityTips() {
          var _this;
          _this = _UIBase.call(this, UI_HeroSkillActivityTips.custom) || this;
          _this.layoutObj = null;
          return _this;
        }
        var _proto = UI_HeroSkillActivityTips.prototype;
        _proto.onCreated = function onCreated(skill_data) {
          _UIBase.prototype.onCreated.call(this, skill_data);
          this.layoutObj = this.layout;
          if (skill_data && skill_data.cfg) {
            var skill_cfg = skill_data.cfg;
            this.layoutObj.skillNameLab.string = skill_cfg.name;
            this.layoutObj.skillItem.show(skill_data);
            this.layoutObj.skillDesc.string = skill_cfg.desc;
            var str = this.getSkillTypeColor(skill_cfg.type);
            // this.layoutObj.skillTypeLab.string = str[0];
            this.layoutObj.skillNameLab.color = new Color().fromHEX(str[1]);
          }
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
        }
        /**
         * 获取技能类型文本颜色
         * @param type 技能类型
         */;
        _proto.getSkillTypeColor = function getSkillTypeColor(type) {
          // 根据实际的技能类型定义返回对应文本
          switch (type) {
            case 1:
              return ["普通技能", "#52FF55"];
            case 2:
            case 3:
              return ["被动技能", "#8BC5FF"];
            case 4:
              return ["怒气技能", "#FF7928"];
            default:
              return ["普通技能", "#52FF55"];
          }
        };
        return UI_HeroSkillActivityTips;
      }(UIBase), _class2.custom = {
        prefab: "prefab/tips/UI_HeroSkillActivityTips",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_HeroSkillActivityTips, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_HeroSkillDescTips.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './TeamMgr.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Color, UIBase, ModuleContext, ModuleDef, TeamMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Color = module.Color;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "98f98L5ZgZIoqUA/6HOtKXs", "UI_HeroSkillDescTips", undefined);
      var ccclass = _decorator.ccclass;
      var UI_HeroSkillDescTips = exports('UI_HeroSkillDescTips', (_dec = ccclass("UI_HeroSkillDescTips"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_HeroSkillDescTips, _UIBase);
        function UI_HeroSkillDescTips() {
          var _this;
          _this = _UIBase.call(this, UI_HeroSkillDescTips.custom) || this;
          _this.layoutObj = null;
          return _this;
        }
        var _proto = UI_HeroSkillDescTips.prototype;
        _proto.onCreated = function onCreated(skill_data) {
          _UIBase.prototype.onCreated.call(this, skill_data);
          this.layoutObj = this.layout;
          if (skill_data && skill_data.cfg) {
            var skill_cfg = skill_data.cfg;
            this.layoutObj.skillNameLab.string = skill_cfg.name;
            this.layoutObj.skillItem.show(skill_data);
            this.layoutObj.skillDesc.string = skill_cfg.desc;
            var str = this.getSkillTypeColor(skill_cfg.type);
            this.layoutObj.skillTypeLab.string = str[0];
            this.layoutObj.skillTypeLab.color = new Color().fromHEX(str[1]);
            this.layoutObj.actLab.string = "";
            if (!skill_data.activate) {
              var stage = TeamMgr.inst.getHeroSkillActStage(skill_data.hero_id, skill_data.cfg.id);
              this.layoutObj.actLab.string = "\u82F1\u96C4" + stage + "\u9636\u6FC0\u6D3B\u8BE5\u6280\u80FD";
            }
          }
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
        }
        /**
         * 获取技能类型文本颜色
         * @param type 技能类型
         */;
        _proto.getSkillTypeColor = function getSkillTypeColor(type) {
          // 根据实际的技能类型定义返回对应文本
          switch (type) {
            case 1:
              return ["普通技能", "#52FF55"];
            case 2:
            case 3:
              return ["被动技能", "#8BC5FF"];
            case 4:
              return ["怒气技能", "#FF7928"];
            default:
              return ["普通技能", "#52FF55"];
          }
        };
        return UI_HeroSkillDescTips;
      }(UIBase), _class2.custom = {
        prefab: "prefab/tips/UI_HeroSkillDescTips",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_HeroSkillDescTips, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_ItemDetailView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './App.ts', './UIUtil.ts', './UIMgr.ts', './UI_ItemSourceView.ts', './Layout_UI_ItemSourceView.ts', './BagMgr.ts', './MonitorType.ts'], function (exports) {
  var _inheritsLoose, cclegacy, ModuleDef, ModuleContext, UIBase, App, UIUtil, UIMgr, LayerType, UI_ItemSourceView, Layout_UI_ItemSourceView, ItemType, ItemSubType, MonitorType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_ItemSourceView = module.UI_ItemSourceView;
    }, function (module) {
      Layout_UI_ItemSourceView = module.Layout_UI_ItemSourceView;
    }, function (module) {
      ItemType = module.ItemType;
      ItemSubType = module.ItemSubType;
    }, function (module) {
      MonitorType = module.MonitorType;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "be052XEtRhNdJ3xG+y/Yejk", "UI_ItemDetailView", undefined);
      var UI_ItemDetailView = exports('UI_ItemDetailView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_ItemDetailView, _UIBase);
        function UI_ItemDetailView() {
          var _this;
          _this = _UIBase.call(this, UI_ItemDetailView.custom) || this;
          _this.layoutObj = null;
          _this.itemData = null;
          return _this;
        }
        var _proto = UI_ItemDetailView.prototype;
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.itemData = data;
          this.initUI();
        };
        _proto.onDispose = function onDispose() {
          this.itemData = null;
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUseItem, this.resUseItem, this);
        }

        /**
         * 初始化UI
         */;
        _proto.initUI = function initUI() {
          if (!this.itemData) return;
          var itemConfig = App.bagMgr.getItemConfig(this.itemData.itemid);
          if (!itemConfig) {
            App.log.logError("\u7269\u54C1\u914D\u7F6E\u4E0D\u5B58\u5728: itemid=" + this.itemData.itemid);
            return;
          }
          App.log.logBusiness("道具ID=", "道具", this.itemData.itemid);
          this.layoutObj.itemProp.updateItem(this.itemData);
          this.layoutObj.itemName.string = itemConfig.name || "";
          var currentNum = App.bagMgr.getItemCount(this.itemData.itemid);
          this.layoutObj.itemNum.string = "" + currentNum;
          this.layoutObj.detailTxt.string = itemConfig.desc || "";
          this.updateButtonsState(itemConfig);
        }

        /**
         * 更新按钮状态
         * @param itemConfig 道具配置
         */;
        _proto.updateButtonsState = function updateButtonsState(itemConfig) {
          var hasSource = !!(itemConfig.getAccess && itemConfig.getAccess.length > 0);
          UIUtil.setButtonEnable(this.layoutObj.sourceBtn, hasSource, true);
          if (itemConfig.type === ItemType.zhuangban && itemConfig.subtype === ItemSubType.head) {
            UIUtil.setButtonEnable(this.layoutObj.useBtn, true, true);
          } else {
            var canUse = !!(itemConfig.useAccess && itemConfig.useAccess.length > 0);
            UIUtil.setButtonEnable(this.layoutObj.useBtn, canUse, true);
          }
        }

        /**
         * 关闭按钮点击
         */;
        _proto.onBtnCloseClick = function onBtnCloseClick() {
          this.onClose();
        }

        /**
         * 来源按钮点击
         */;
        _proto.onBtnSourceClick = function onBtnSourceClick() {
          var itemConfig = App.bagMgr.getItemConfig(this.itemData.itemid);
          if (!itemConfig || !itemConfig.getAccess) return;
          UIMgr.inst.open(UI_ItemSourceView, LayerType.panel, Layout_UI_ItemSourceView, [this.itemData]);
          App.log.logBusiness("\u6253\u5F00\u83B7\u53D6\u9014\u5F84: itemid=" + this.itemData.itemid);
        }

        /**
         * 使用按钮点击
         */;
        _proto.onBtnUseClick = function onBtnUseClick() {
          var itemConfig = App.bagMgr.getItemConfig(this.itemData.itemid);
          if (itemConfig.type === ItemType.zhuangban && itemConfig.subtype === ItemSubType.head) {
            App.bagMgr.reqUseItem(this.itemData.itemUid);
          } else {
            if (!itemConfig || !itemConfig.useAccess) return;
            if (itemConfig.suipian) {
              // 打开碎片合成
              return;
            }
            // 跳转
            // UtilGame.jumpView
          }
        }

        /**
         * 请求使用道具返回
         * @param msg
         */;
        _proto.resUseItem = function resUseItem(msg) {
          if (msg.code !== 200) {
            App.log.logError(msg);
          }
          this.onClose();
        };
        return UI_ItemDetailView;
      }(UIBase));
      UI_ItemDetailView.custom = {
        prefab: "prefab/view/UI_ItemDetailView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnCloseClick"
        }, _binding["sourceBtn"] = {
          method: "onBtnSourceClick"
        }, _binding["useBtn"] = {
          method: "onBtnUseClick"
        }, _binding)
      };
      ModuleContext.attachModule(UI_ItemDetailView, ModuleDef.GAME_BAG);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_ItemSourceView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './App.ts', './DBRecord.ts', './UtilGame.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, Label, Button, ModuleDef, ModuleContext, UIBase, App, DBRecord, UtilGame;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Label = module.Label;
      Button = module.Button;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "6ce88bdRetHmKX4GOF9Pkx4", "UI_ItemSourceView", undefined);

      /**
       * 道具来源界面
       */
      var UI_ItemSourceView = exports('UI_ItemSourceView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_ItemSourceView, _UIBase);
        function UI_ItemSourceView() {
          var _this;
          _this = _UIBase.call(this, UI_ItemSourceView.custom) || this;
          _this.layoutObj = null;
          _this.itemData = null;
          _this.sourceList = [];
          return _this;
        }

        /**
         * 界面创建
         * @param itemData 道具数据
         */
        var _proto = UI_ItemSourceView.prototype;
        _proto.onCreated = function onCreated(itemData) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.itemData = itemData;
          this.initUI();
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
        }

        /**
         * 初始化UI
         */;
        _proto.initUI = function initUI() {
          if (!this.itemData) return;
          var itemConfig = App.bagMgr.getItemConfig(this.itemData.itemid);
          if (!itemConfig) return;
          this.layoutObj.itemProp.updateItem(this.itemData);
          this.layoutObj.itemName.string = itemConfig.name || "";
          var currentNum = App.bagMgr.getItemCount(this.itemData.itemid);
          this.layoutObj.itemNum.string = "" + currentNum;
          this.layoutObj.detailTxt.string = itemConfig.desc || "";
          this.initSourceList();
        }

        /**
         * 初始化来源列表
         */;
        _proto.initSourceList = function initSourceList() {
          var itemConfig = App.bagMgr.getItemConfig(this.itemData.itemid);
          if (!itemConfig || !itemConfig.getAccess) return;
          this.sourceList = [];
          var gainIds = itemConfig.getAccess;
          if (Array.isArray(gainIds)) {
            for (var _iterator = _createForOfIteratorHelperLoose(gainIds), _step; !(_step = _iterator()).done;) {
              var gainId = _step.value;
              var gainConfig = DBRecord.fetchId("Item_Gain", gainId);
              if (gainConfig) {
                this.sourceList.push({
                  id: gainId,
                  title: gainConfig.name || "",
                  desc: gainConfig.desc || "",
                  jump: gainConfig.jump || 0
                });
              }
            }
          }
          this.layoutObj.scrollList.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.scrollList.array = this.sourceList;
        }

        /**
         * 列表项渲染回调
         * @param node 节点
         * @param index 索引
         */;
        _proto.onItemRender = function onItemRender(node, index) {
          var _node$getChildByName,
            _node$getChildByName2,
            _node$getChildByName3,
            _this2 = this;
          if (index < 0 || index >= this.sourceList.length) return;
          var sourceData = this.sourceList[index];
          var titleLabel = (_node$getChildByName = node.getChildByName("titleLab")) == null ? void 0 : _node$getChildByName.getComponent(Label);
          var descLabel = (_node$getChildByName2 = node.getChildByName("descLab")) == null ? void 0 : _node$getChildByName2.getComponent(Label);
          var btnGo = (_node$getChildByName3 = node.getChildByName("btnGo")) == null ? void 0 : _node$getChildByName3.getComponent(Button);
          if (titleLabel) {
            titleLabel.string = sourceData.title || "";
          }
          if (descLabel) {
            descLabel.string = sourceData.desc || "";
          }
          if (btnGo) {
            btnGo.node.off(Button.EventType.CLICK);
            btnGo.node.on(Button.EventType.CLICK, function () {
              _this2.onSourceItemClick(sourceData);
            }, this);
          }
        }

        /**
         * 来源项点击
         * @param sourceData 来源数据
         */;
        _proto.onSourceItemClick = function onSourceItemClick(sourceData) {
          var jumpId = sourceData.jump;
          UtilGame.jumpView(jumpId);
          this.onClose();
        };
        _proto.onBtnCloseClick = function onBtnCloseClick() {
          this.onClose();
        };
        return UI_ItemSourceView;
      }(UIBase));
      UI_ItemSourceView.custom = {
        prefab: "prefab/view/UI_ItemSourceView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onBtnCloseClick"
        }, _binding)
      };
      ModuleContext.attachModule(UI_ItemSourceView, ModuleDef.GAME_BAG);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_loading.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './Prompt.ts', './App.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, _decorator, UIOpacity, tween, UIBase, ModuleContext, ModuleDef, Prompt, App, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      UIOpacity = module.UIOpacity;
      tween = module.tween;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "09f6eYOiktCXp9PlZRHuMVt", "Ui_loading", undefined);
      var ccclass = _decorator.ccclass;
      var Ui_loading = exports('Ui_loading', (_dec = ccclass("Ui_loading"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_loading, _UIBase);
        function Ui_loading() {
          var _this;
          _this = _UIBase.call(this, Ui_loading.custom) || this;
          _this._delayTime = void 0;
          _this._autoCloseTime = void 0;
          _this._timeoutId = void 0;
          _this._netTimeoutId = void 0;
          App.monitorMgr.addEventListener(EventType.loading_auto_close, _this.onBack, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Ui_loading.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.removeEventListener(EventType.loading_auto_close, this.onBack, this);
        };
        _proto.onCreated = function onCreated() {
          _UIBase.prototype.onCreated.call(this);
          this.node.active = false;
        };
        _proto.run = function run(delayTime, autoCloseTime) {
          var _this2 = this;
          if (this.node.active) {
            clearTimeout(this._timeoutId);
            this._timeoutId = setTimeout(function () {
              _this2.effect();
            }, this._delayTime);
            return;
          }
          this.node.active = true;
          this._delayTime = delayTime ? delayTime : 0;
          this._autoCloseTime = autoCloseTime ? autoCloseTime : 10;
          this.initView();
          this._netTimeoutId = setTimeout(function () {
            _this2.netTimeOut();
          }, 10 * 1000);
        };
        _proto.initView = function initView() {
          var _this3 = this;
          this.getNode("imgBg").getComponent(UIOpacity).opacity = 0;
          this.getNode("imgLoading").getComponent(UIOpacity).opacity = 0;
          this._timeoutId = setTimeout(function () {
            _this3.effect();
          }, this._delayTime);
          setTimeout(function () {
            _this3.onBack();
          }, this._autoCloseTime);
        };
        _proto.effect = function effect() {
          this.getNode("imgBg").getComponent(UIOpacity).opacity = 200;
          this.getNode("imgLoading").getComponent(UIOpacity).opacity = 255;
          tween(this.getNode("imgLoading")).by(1, {
            angle: -360
          }).repeatForever().start();
        };
        _proto.netTimeOut = function netTimeOut() {
          Prompt.popTipWindow(App.languageMgr.getTextById(21), App.languageMgr.getTextById(22), function () {
            App.goToLoginMain();
          }, App.languageMgr.getTextById(23));
        };
        _proto.onBack = function onBack() {
          clearTimeout(this._timeoutId);
          clearTimeout(this._netTimeoutId);
          this.node.active = false;
        };
        return Ui_loading;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/uiLoading",
        binding: {}
      }, _class2)) || _class));
      ModuleContext.attachModule(Ui_loading, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_loading2.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, UIOpacity, tween, UIBase, ModuleContext, ModuleDef, App, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      UIOpacity = module.UIOpacity;
      tween = module.tween;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b674a8F/1NK24BDBgDh/M+q", "Ui_loading", undefined);
      var Ui_loading = exports('Ui_loading', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_loading, _UIBase);
        function Ui_loading() {
          var _this;
          _this = _UIBase.call(this, Ui_loading.custom) || this;
          _this._delayTime = void 0;
          _this._autoCloseTime = void 0;
          _this._timeoutId = void 0;
          App.monitorMgr.addEventListener(EventType.loading_auto_close, _this.onBack, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Ui_loading.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.removeEventListener(EventType.loading_auto_close, this.onBack, this);
        };
        _proto.onCreated = function onCreated() {
          _UIBase.prototype.onCreated.call(this);
          this.node.active = false;
        };
        _proto.run = function run(delayTime, autoCloseTime) {
          if (!this.node || this.node.active) return;
          this.node.active = true;
          this._delayTime = delayTime ? delayTime : 0;
          this._autoCloseTime = autoCloseTime ? autoCloseTime : 10;
          this.initView();
        };
        _proto.initView = function initView() {
          var _this2 = this;
          this.getNode("imgLoading").getComponent(UIOpacity).opacity = 0;
          this._timeoutId = setTimeout(function () {
            if (!_this2) {
              return;
            }
            _this2.effect();
          }, this._delayTime);
          setTimeout(function () {
            _this2.onBack();
          }, this._autoCloseTime);
        };
        _proto.effect = function effect() {
          this.getNode("imgLoading").getComponent(UIOpacity).opacity = 255;
          tween(this.getNode("imgLoading")).by(1, {
            angle: -360
          }).repeatForever().start();
        };
        _proto.onBack = function onBack() {
          clearTimeout(this._timeoutId);
          this.node && (this.node.active = false);
        };
        return Ui_loading;
      }(UIBase));
      Ui_loading.custom = {
        prefab: "prefab/view/uiLoading",
        binding: {}
      };
      ModuleContext.attachModule(Ui_loading, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_LoginView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './NetChannelMgr.ts', './ModuleContext.ts', './Prompt.ts', './Utils.ts', './UIBase.ts', './UIMgr.ts', './UtilityPlatform.ts', './Ui_age.ts', './SoundDef.ts', './env', './Item_server.ts', './UtilGame.ts', './uiGongGao.ts', './cc-button.ts', './GameBoot.ts', './myUiEnterLoading.ts', './GlobalData.ts', './App.ts', './GameShareMgr.ts', './DBRecord.ts', './Ui_agreement.ts', './Ui_promptAgreement.ts', './Layout_uiPromptAgreement.ts', './EventType.ts', './UI_ServerListView.ts', './Layout_UI_ServerListView.ts', './GameDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, cclegacy, EditBox, Sprite, Button, Toggle, assetManager, ModuleDef, netChannel, ModuleContext, Prompt, Utils, UIBase, UIMgr, LayerType, UtilityPlatform, Ui_age, MusicDef, SoundDef, BYTEDANCE, WECHAT, ServerState, UtilGame, uiGongGao, ButtonLock, GameBoot, myUiEnterLoading, App, GameShareLogPoint, DBRecord, Ui_agreement, Ui_promptAgreement, Layout_uiPromptAgreement, EventType, UI_ServerListView, Layout_UI_ServerListView, GameDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      EditBox = module.EditBox;
      Sprite = module.Sprite;
      Button = module.Button;
      Toggle = module.Toggle;
      assetManager = module.assetManager;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      Ui_age = module.Ui_age;
    }, function (module) {
      MusicDef = module.MusicDef;
      SoundDef = module.SoundDef;
    }, function (module) {
      BYTEDANCE = module.BYTEDANCE;
      WECHAT = module.WECHAT;
    }, function (module) {
      ServerState = module.ServerState;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      uiGongGao = module.uiGongGao;
    }, function (module) {
      ButtonLock = module.ButtonLock;
    }, function (module) {
      GameBoot = module.GameBoot;
    }, function (module) {
      myUiEnterLoading = module.myUiEnterLoading;
    }, null, function (module) {
      App = module.App;
    }, function (module) {
      GameShareLogPoint = module.GameShareLogPoint;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Ui_agreement = module.Ui_agreement;
    }, function (module) {
      Ui_promptAgreement = module.Ui_promptAgreement;
    }, function (module) {
      Layout_uiPromptAgreement = module.Layout_uiPromptAgreement;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UI_ServerListView = module.UI_ServerListView;
    }, function (module) {
      Layout_UI_ServerListView = module.Layout_UI_ServerListView;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "d29fedU8bRFZIRpooNDyGVm", "UI_LoginView", undefined);

      /** 服务器列表请求状态 */
      var ServerListState = /*#__PURE__*/function (ServerListState) {
        ServerListState[ServerListState["Idle"] = 0] = "Idle";
        ServerListState[ServerListState["Requesting"] = 1] = "Requesting";
        ServerListState[ServerListState["Success"] = 2] = "Success";
        return ServerListState;
      }(ServerListState || {});
      var UI_LoginView = exports('UI_LoginView', (_dec = ButtonLock(3), (_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_LoginView, _UIBase);
        function UI_LoginView() {
          var _this;
          _this = _UIBase.call(this, UI_LoginView.custom) || this;
          _this.edtUName = void 0;
          _this.btnNotice = void 0;
          _this.defaultSer = void 0;
          /** 服务器列表请求状态 */
          _this.listState = ServerListState.Idle;
          /**当前区服状态icon */
          _this.imgStatus = void 0;
          /**清除缓存按钮 */
          _this.btnClearCache = void 0;
          /**同意复选框*/
          _this.toggleAgree = void 0;
          /** 是否正在登录中 */
          _this.isLoggingIn = false;
          _this.enterCounter = 0;
          return _this;
        }
        var _proto = UI_LoginView.prototype;
        _proto.onCreated = function onCreated(needReqServerList) {
          var _this2 = this;
          if (needReqServerList === void 0) {
            needReqServerList = false;
          }
          _UIBase.prototype.onCreated.call(this);
          this.addEventListeners();
          GameBoot.Instance.showBg(false);
          this.edtUName = Utils.findComp("edtUName", EditBox, this.node);
          this.edtUName.string = App.saveDataMgr.get("local_actid") || Utils.GetRandomNum(100000, 1000000) + "";
          if (!GameDef.showUserEdit) {
            this.edtUName.node.active = false;
          }

          //客服按钮  字节或者微信
          Utils.findNode("btnService", this.node).active = BYTEDANCE;
          this.btnNotice = Utils.findNode("btnNotice", this.node);
          this.btnNotice.active = false;

          //公告按钮
          // this.checkNotice();

          this.imgStatus = Utils.findComp("imgStatus", Sprite, this.node);
          var serverCache = App.loginMgr.serverCache;
          this.initDefServer(serverCache);
          App.soundMgr.playMusic(MusicDef.Sound_BGM_Login);
          var lbVer = this.getLabel("lbVer");
          App.log.logBusiness("version***=", GameDef.version);
          var nativeVer = "";
          lbVer && (lbVer.string = "Ver : " + GameDef.version + nativeVer);
          if (needReqServerList || !serverCache) {
            this.listState = ServerListState.Requesting;
            App.loginMgr.reqServerList(function () {
              _this2.listState = ServerListState.Success;
            });
          } else {
            this.listState = ServerListState.Success;
          }
          this.enterCounter = 0;
          this.btnClearCache = Utils.findNode("btnCache", this.node);
          this.btnClearCache.on(Button.EventType.CLICK, this.onBtnClearCache, this);
          this.btnClearCache.active = WECHAT;
          this.getLabel("lbRead").string = UtilGame.getGlobalTxt(90);
          this.getLabel("lbAnd").string = UtilGame.getGlobalTxt(98);
          this.getLabel("lbUser").string = UtilGame.getGlobalTxt(99);
          this.getLabel("lbPrivacy").string = UtilGame.getGlobalTxt(100);
          this.toggleAgree = Utils.findNode("toggleAgree", this.node);
          this.toggleAgree.on(Toggle.EventType.TOGGLE, this.onToggleAgree, this);
          this.toggleAgree.getComponent(Toggle).isChecked = App.mixMgr.getIsAgreeUserAndPrivacy();
          App.gameShareMgr.getShareConfig(GameShareLogPoint.System, function (data) {
            App.gameShareMgr.shareConfigSystem = data;
            UtilityPlatform.getInstance().initShareMenu();
          });
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(EventType.login_select_ser, this.onSetDefaultServerData, this);
          App.monitorMgr.addEventListener(EventType.login_select_ser, this.resetBySelectServer, this);
          App.monitorMgr.addEventListener(EventType.net_checked, this.onNet_checked, this);
          App.monitorMgr.addEventListener(EventType.login_ser_refresh, this.initDefServer, this);
          App.monitorMgr.addEventListener(EventType.login_close, this.onClose, this);
          App.monitorMgr.addEventListener(EventType.net_on_error, this.onNetError, this);
        };
        _proto.initDefServer = function initDefServer(serverCache) {
          if (!serverCache) {
            return;
          }
          this.onSetDefaultServerData(App.loginMgr.getLoginServer(serverCache));
        }

        /**
         * @param defaultSer 首次获得 拿第一个。如果玩家手动选择，则覆盖
         */;
        _proto.onSetDefaultServerData = function onSetDefaultServerData(defaultSer) {
          this.defaultSer = defaultSer;
          var lb = this.getLabel("lbQufu");
          lb && (lb.string = defaultSer.sname);
          App.loginMgr.selServer = defaultSer;
          GameDef.SERVER_URL = defaultSer.ip;
          GameDef.newServerRoleInfo = defaultSer.host ? defaultSer.host + ":" + defaultSer.port : GameDef.newServerListInfo;
          App.loginMgr.setLastSidByClient(defaultSer.sid);
          var sstate = defaultSer.sstate;
          var icon = "";
          switch (sstate) {
            case ServerState.ZhengChang:
              icon = "dl_fwq_xinfu";
              break;
            case ServerState.WeiHu:
              icon = "dl_fwq_weihu";
              break;
            case ServerState.BaoMan:
              icon = "dl_fwq_baoman";
              break;
          }
          App.resMgr.loadImage(this.imgStatus, ModuleDef.GAME_LOGIN, "/texture/" + icon);
        }

        /**
         * 进入游戏按钮点击
         */;
        _proto.onBtnEnterPreCheck = function onBtnEnterPreCheck() {
          var _this3 = this;
          // 如果正在登录中，直接返回
          if (this.isLoggingIn) {
            Prompt.popTip("正在登录中，请稍候...");
            return;
          }
          var isAgree = App.mixMgr.getIsAgreeUserAndPrivacy();
          if (!isAgree) {
            UIMgr.inst.open(Ui_promptAgreement, LayerType.panel, Layout_uiPromptAgreement, [App.languageMgr.getTextById(333000012), function () {
              App.mixMgr.setIsAgreeUserAndPrivacy(true);
              _this3.onBtnEnter();
            }, App.languageMgr.getTextById(333000013), function () {}, App.languageMgr.getTextById(3105)]);
            return;
          } else {
            this.onBtnEnter();
          }
        };
        _proto.onBtnEnter = function onBtnEnter() {
          var _this4 = this;
          // 如果正在登录中，直接返回
          if (this.isLoggingIn) {
            Prompt.popTip("正在登录中，请稍候...");
            return;
          }

          // 如果列表未请求成功，则提示等待
          if (this.listState !== ServerListState.Success) {
            Prompt.popTip("正在获取服务器列表中, 请稍后再试");
            return;
          }

          //服务器列表限制登录
          var serverCache = App.loginMgr.serverCache;
          if (!serverCache) {
            this.listState = ServerListState.Requesting;
            App.loginMgr.reqServerList(function () {
              _this4.listState = ServerListState.Success;
            });
            Prompt.popTip("正在获取服务器列表中, 请稍后再试");
            return;
          }
          if (serverCache && serverCache.err_code) {
            //被封号了
            Prompt.popTip("账号封禁中");
            return;
          }
          if (serverCache && serverCache.server_state) {
            Prompt.popTip("服务器维护中");
            return;
          }
          switch (this.defaultSer.sstate) {
            case ServerState.WeiHu:
              if (!App.loginMgr.checkIgnoreWeiHu()) {
                Prompt.popTip(UtilGame.getGlobalTxt(91));
                return;
              }
              break;
            case ServerState.BaoMan:
              var cache = App.loginMgr.serverCache;
              var hasRole = !!cache.recently_smap[this.defaultSer.sid];
              if (!hasRole && !App.loginMgr.checkIgnoreBaoMan()) {
                Prompt.popTip(UtilGame.getGlobalTxt(92));
                return;
              }
              break;
          }

          // 设置登录状态为正在登录
          this.isLoggingIn = true;
          App.loginMgr.setActId(this.edtUName.string);
          App.loginMgr.loginServer(this.defaultSer, true).then(function (result) {
            _this4.enterCounter++;
            if (_this4.enterCounter >= 3) {
              var ipAddress = _this4.defaultSer.ip;
              var portIndex = ipAddress.lastIndexOf(":");
              var port = "";
              if (portIndex !== -1) {
                port = ipAddress.substring(portIndex + 1);
              }
              Prompt.popTip("网络连接异常_" + result + "_" + port + "_" + netChannel.game._state);
              // 登录失败，重置状态
              _this4.isLoggingIn = false;
            }
          })["catch"](function (error) {
            Prompt.popTip("登录失败，请重试");
            // 登录失败，重置状态
            _this4.isLoggingIn = false;
          });
        };
        _proto.resetBySelectServer = function resetBySelectServer() {
          GameBoot.clearShowLagLoading();
          this.enterCounter = 0;
          // 重置登录状态
          this.isLoggingIn = false;
        }

        /**
         * 打开服务器列表
         * @returns
         */;
        _proto.onOpenSLClick = function onOpenSLClick() {
          var _this5 = this;
          // 如果列表未请求成功，则提示等待
          if (this.listState !== ServerListState.Success) {
            Prompt.popTip("正在获取服务器列表中, 请稍后再试");
            return;
          }
          var serverCache = App.loginMgr.serverCache;
          if (!serverCache) {
            this.listState = ServerListState.Requesting;
            App.loginMgr.reqServerList(function () {
              _this5.listState = ServerListState.Success;
            });
            Prompt.popTip("正在获取服务器列表中, 请稍后再试");
            return;
          }
          UIMgr.inst.open(UI_ServerListView, LayerType.panel, Layout_UI_ServerListView);
        }

        /**上线。如果当前的公告跟缓存的公告不一致时主动弹出公告 */;
        _proto.checkNotice = function checkNotice() {
          var _this6 = this;
          App.log.logBusiness("开始请求公告");
          UtilityPlatform.getInstance().getNotice(function (vData) {
            if (vData === void 0) {
              vData = [];
            }
            _this6.btnNotice.active = Boolean(vData.length);
            //新公告自动弹出
            var newNoticeId = UtilityPlatform.getInstance().getNewNoticeId(vData);
            if (newNoticeId > 0) {
              UIMgr.inst.open(uiGongGao, LayerType.panel, null, [vData]);
              App.saveDataMgr.set("local_notice_id", newNoticeId);
            }
          });
        };
        _proto.onNotice = function onNotice() {
          // let vData = App.mixMgr.getNoticeData() || [];
          // if (vData.length) {
          //     UIMgr.inst.open(uiGongGao, LayerType.panel, null, [vData]);
          // }
        };
        _proto.onService = function onService() {
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
          UtilityPlatform.getInstance().aiService();
        };
        _proto.onBtnAge = function onBtnAge() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          UIMgr.inst.open(Ui_age, LayerType.panel, null, []);
        };
        _proto.openCb = function openCb(ui) {
          App.log.logBusiness("ui=", ui);
          this.onClose();
        };
        _proto.onClose = function onClose() {
          App.log.logBusiness("关闭登录界面");
          GameBoot.clearShowLagLoading();
          _UIBase.prototype.onClose.call(this);
        }

        //net连接正常，进入游戏主界面
        ;

        _proto.onNet_checked = function onNet_checked() {
          myUiEnterLoading.Instance.loadRes();
        };
        _proto.onDispose = function onDispose() {
          App.log.logBusiness("登录界面销毁了");
          App.monitorMgr.offTarget(this);
        };
        _proto.onNetError = function onNetError() {
          Prompt.popTip("网络错误_");
        };
        _proto.onBtnClearCache = function onBtnClearCache() {
          Prompt.popTipWindow(App.languageMgr.getTextById(333000012), App.languageMgr.getTextById(97), function () {
            console.warn("清除缓存开始", assetManager.cacheManager);
          }, App.languageMgr.getTextById(333000013), function () {}, App.languageMgr.getTextById(3105));
        }

        /**
         * 点击用户协议文本
         */;
        _proto.onUserAgreement = function onUserAgreement() {
          var config = DBRecord.fetchId("ShuoMingGuiZe", 102);
          UIMgr.inst.open(Ui_agreement, LayerType.panel, null, [UtilGame.getGlobalTxt(99), config.descrip]);
        }

        /**
         * 点击隐私协议文本
         */;
        _proto.onPrivacyAgreement = function onPrivacyAgreement() {
          var config = DBRecord.fetchId("ShuoMingGuiZe", 102);
          UIMgr.inst.open(Ui_agreement, LayerType.panel, null, [UtilGame.getGlobalTxt(100), config.descrip]);
        }

        /**点击协议复选框*/;
        _proto.onToggleAgree = function onToggleAgree() {
          var isChecked = this.toggleAgree.getComponent(Toggle).isChecked;
          App.mixMgr.setIsAgreeUserAndPrivacy(isChecked);
        };
        _proto.onbtnChange = function onbtnChange() {
          console.warn("登出游戏-----------------------");
        };
        return UI_LoginView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_LoginView",
        binding: (_binding = {}, _binding["btnEnter"] = {
          method: "onBtnEnterPreCheck"
        }, _binding["imgRect"] = {
          method: "onOpenSLClick"
        }, _binding["btnNotice"] = {
          method: "onNotice"
        }, _binding["btnService"] = {
          method: "onService"
        }, _binding["btnAge"] = {
          method: "onBtnAge"
        }, _binding["btnUser"] = {
          method: "onUserAgreement"
        }, _binding["btnPrivacy"] = {
          method: "onPrivacyAgreement"
        }, _binding["btnChange"] = {
          method: "onbtnChange"
        }, _binding)
      }, _class2), _applyDecoratedDescriptor(_class.prototype, "onBtnEnter", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, "onBtnEnter"), _class.prototype), _class)));
      ModuleContext.attachModule(UI_LoginView, ModuleDef.GAME_LOGIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_MainView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './App.ts', './UIMgr.ts', './Layout_UI_BagView.ts', './UI_BagView.ts', './UI_GMView.ts', './Layout_UI_GMView.ts', './UI_TeamMainView.ts', './Layout_UI_TeamMainView.ts', './UI_ZiYuanGetView.ts', './Layout_UI_ZiYuanGetView.ts', './UI_RoleInfoView.ts', './Layout_UI_RoleInfoView.ts', './RoleItem.ts', './itemMoney.ts', './PlaceGameMgr.ts', './EventType.ts', './MonitorType.ts', './UIUtil.ts', './MenuItem.ts', './SoundDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, tween, Size, Vec3, ModuleDef, ModuleContext, UIBase, App, UIMgr, LayerType, Layout_UI_BagView, UI_BagView, UI_GMView, Layout_UI_GMView, UI_TeamMainView, Layout_UI_TeamMainView, UI_ZiYuanGetView, Layout_UI_ZiYuanGetView, UI_RoleInfoView, Layout_UI_RoleInfoView, RoleItemMode, itemMoney, PlaceGameMgr, EventType, MonitorType, UIUtil, MenuItem, MusicDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      tween = module.tween;
      Size = module.Size;
      Vec3 = module.Vec3;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      Layout_UI_BagView = module.Layout_UI_BagView;
    }, function (module) {
      UI_BagView = module.UI_BagView;
    }, function (module) {
      UI_GMView = module.UI_GMView;
    }, function (module) {
      Layout_UI_GMView = module.Layout_UI_GMView;
    }, function (module) {
      UI_TeamMainView = module.UI_TeamMainView;
    }, function (module) {
      Layout_UI_TeamMainView = module.Layout_UI_TeamMainView;
    }, function (module) {
      UI_ZiYuanGetView = module.UI_ZiYuanGetView;
    }, function (module) {
      Layout_UI_ZiYuanGetView = module.Layout_UI_ZiYuanGetView;
    }, function (module) {
      UI_RoleInfoView = module.UI_RoleInfoView;
    }, function (module) {
      Layout_UI_RoleInfoView = module.Layout_UI_RoleInfoView;
    }, function (module) {
      RoleItemMode = module.RoleItemMode;
    }, function (module) {
      itemMoney = module.itemMoney;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      MenuItem = module.MenuItem;
    }, function (module) {
      MusicDef = module.MusicDef;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "d7f8cRTHg5Mq6huIavvSsaw", "UI_MainView", undefined);
      var UI_MainView = exports('UI_MainView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_MainView, _UIBase);
        function UI_MainView() {
          var _this;
          _this = _UIBase.call(this, UI_MainView.custom) || this;
          _this.layoutObj = null;
          _this._leftUpFlag = false;
          _this.moneyIdArrs = [3, 1, 2, 6, 4, 5];
          return _this;
        }
        var _proto = UI_MainView.prototype;
        _proto.onCreated = function onCreated(_data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.layoutObj.MenuShopBtn.getComponent(MenuItem).setUnlocked(false);
          this.layoutObj.MenuLMBtn.getComponent(MenuItem).setUnlocked(false);
          this.layoutObj.MenuYWBtn.getComponent(MenuItem).setUnlocked(false);
          this.updateView();
          // 从副本退出 需同步建筑数据
          PlaceGameMgr.inst.reqLoadBuilding();
          App.soundMgr.playMusic(MusicDef.Sound_BGM_Login);
        }

        /**
         * 注册事件监听
         */;
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSetHead, this.resSetHead, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.updateRedPoint, this);
        };
        _proto.onDispose = function onDispose() {
          // 移除事件监听
          App.monitorMgr.offTarget(this);
          _UIBase.prototype.onDispose.call(this);
        };
        _proto.resSetHead = function resSetHead(obj) {
          if (obj.code !== 200) {
            return;
          }
          this.layoutObj.roleItem.show(RoleItemMode.NORMAL, App.roleMgr.getHeadId(), true, false);
        }

        /**
         * 更新界面
         */;
        _proto.updateView = function updateView() {
          this.layoutObj.roleItem.show(RoleItemMode.NORMAL, App.roleMgr.getHeadId(), true, false);
          this.updateMoneys();
          this.updateRedPoint();
        }

        /**
         * 暂时使用这种笨方法  后续开发灵活通用的红点管理系统
         */;
        _proto.updateRedPoint = function updateRedPoint() {
          if (!this.layoutObj.baoxiangBtn) return;
          var redNode = this.layoutObj.baoxiangBtn.node.getChildByName("red");
          if (redNode) {
            var hasReserve = PlaceGameMgr.inst.checkReserveSoldiers();
            redNode.active = hasReserve;
          }
        }

        /**
         * 更新货币显示
         */;
        _proto.updateMoneys = function updateMoneys() {
          if (!this.layoutObj.moneyNode) return;
          var children = this.layoutObj.moneyNode.children;
          for (var i = 0; i < children.length && i < this.moneyIdArrs.length; i++) {
            var moneyComp = children[i].getComponent(itemMoney);
            if (moneyComp) {
              if (this.moneyIdArrs[i] === 1 || this.moneyIdArrs[i] === 2) {
                moneyComp.setMoneyId(this.moneyIdArrs[i], true);
              } else {
                moneyComp.setMoneyId(this.moneyIdArrs[i], false);
              }
            }
          }
        }

        /**
         * 设置按钮点击
         */;
        _proto.onSetBtnClick = function onSetBtnClick() {
          // TODO: 打开设置界面
          UIMgr.inst.openOnce(UI_RoleInfoView, LayerType.panel, Layout_UI_RoleInfoView);
        }

        /**
         * 任务按钮点击
         */;
        _proto.onMenuTaskBtnClick = function onMenuTaskBtnClick() {
          // TODO: 打开任务界面
          App.log.logBusiness("任务按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 邮件按钮点击
         */;
        _proto.onMenuEmailBtnClick = function onMenuEmailBtnClick() {
          // TODO: 打开邮件界面
          App.log.logBusiness("邮件按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 排行榜按钮点击
         */;
        _proto.onMenuRankBtnClick = function onMenuRankBtnClick() {
          // TODO: 打开排行榜界面
          App.log.logBusiness("排行榜按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 切换按钮点击
         */;
        _proto.onSwitchBtnClick = function onSwitchBtnClick() {
          this._leftUpFlag = !this._leftUpFlag;
          var currentSize = this.layoutObj.leftBg.uiTransform.contentSize;
          var currentWidth = currentSize.width;
          var targetHeight;
          if (this._leftUpFlag) {
            targetHeight = 160;
          } else {
            targetHeight = 407;
          }

          // 控制按钮显示状态
          if (this.layoutObj.MenuEmailBtn) {
            this.layoutObj.MenuEmailBtn.node.active = !this._leftUpFlag;
          }
          if (this.layoutObj.MenuRankBtn) {
            this.layoutObj.MenuRankBtn.node.active = false; // 始终隐藏
          }

          tween(this.layoutObj.leftBg.uiTransform).to(0.1, {
            contentSize: new Size(currentWidth, targetHeight)
          }, {
            easing: "smooth"
          }).start();
          var switchButton = this.layoutObj.switchBtn.node;
          var currentRotation = switchButton.eulerAngles;
          var targetRotationZ;
          if (this._leftUpFlag) {
            targetRotationZ = currentRotation.z + 180;
          } else {
            targetRotationZ = currentRotation.z - 180;
          }
          var heightDiff = currentSize.height - targetHeight;
          var currentPos = switchButton.position;
          var targetY = currentPos.y + heightDiff;
          tween(switchButton).to(0.1, {
            eulerAngles: new Vec3(currentRotation.x, currentRotation.y, targetRotationZ),
            position: new Vec3(currentPos.x, targetY, currentPos.z)
          }, {
            easing: "smooth"
          }).start();
        }

        /**
         * 英雄出征按钮点击
         */;
        _proto.onYxczBtnClick = function onYxczBtnClick() {
          // TODO: 打开英雄出征界面
          App.log.logBusiness("英雄出征按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 英雄首充按钮点击
         */;
        _proto.onMenuCCBtnClick = function onMenuCCBtnClick() {
          UIMgr.inst.open;
          // TODO: 打开充值界面
          App.log.logBusiness("英雄首充按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 福利按钮点击
         */;
        _proto.onMenuFLBtnClick = function onMenuFLBtnClick() {
          // TODO: 打开福利界面
          App.log.logBusiness("福利按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 活动按钮点击
         */;
        _proto.onMenuHDBtnClick = function onMenuHDBtnClick() {
          // TODO: 打开活动界面
          App.log.logBusiness("活动按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 宝箱按钮点击
         */;
        _proto.onBaoxiangBtnClick = function onBaoxiangBtnClick() {
          // TODO: 打开宝箱界面
          App.log.logBusiness("宝箱按钮点击");
          UIMgr.inst.openOnce(UI_ZiYuanGetView, LayerType.panel, Layout_UI_ZiYuanGetView);
        }

        /**
         * 战斗按钮点击
         */;
        _proto.onMenuFightBtnClick = function onMenuFightBtnClick() {
          // TODO: 打开战斗界面
          App.log.logBusiness("战斗按钮点击");
          if (App.battleMgr.isInBattle()) {
            // 如果正在战斗，关闭主界面
            this.onClose();
          } else {
            // 否则打开队伍界面
            UIMgr.inst.open(UI_TeamMainView, LayerType.panel, Layout_UI_TeamMainView, [{
              type: "onBattle"
            }]);
          }
        }

        /**
         * 阵容按钮点击
         */;
        _proto.onMenuZRBtnClick = function onMenuZRBtnClick() {
          // TODO: 打开阵容界面
          App.log.logBusiness("阵容按钮点击");
          UIMgr.inst.open(UI_TeamMainView, LayerType.panel, Layout_UI_TeamMainView, [{
            type: "open"
          }]);
        }

        /**
         * 背包按钮点击
         */;
        _proto.onMenuBagBtnClick = function onMenuBagBtnClick() {
          UIMgr.inst.open(UI_BagView, LayerType.panel, Layout_UI_BagView);
        }

        /**
         * 商店按钮点击
         */;
        _proto.onMenuShopBtnClick = function onMenuShopBtnClick() {
          // TODO: 打开商店界面
          App.log.logBusiness("商店按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 联盟按钮点击
         */;
        _proto.onMenuLMBtnClick = function onMenuLMBtnClick() {
          // TODO: 打开联盟界面
          App.log.logBusiness("联盟按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * 野外按钮点击
         */;
        _proto.onMenuYWBtnClick = function onMenuYWBtnClick() {
          // TODO: 打开野外界面
          App.log.logBusiness("野外按钮点击");
          UIUtil.showTip("暂未开放");
        }

        /**
         * GM按钮点击
         */;
        _proto.onGMBtnClick = function onGMBtnClick() {
          UIMgr.inst.openOnce(UI_GMView, LayerType.panel, Layout_UI_GMView);
        };
        _proto.onTestBigClick = function onTestBigClick() {
          App.monitorMgr.dispatchEvent(EventType.TestMapBig);
        };
        _proto.onTestSmallClick = function onTestSmallClick() {
          App.monitorMgr.dispatchEvent(EventType.TestMapSmall);
        };
        return UI_MainView;
      }(UIBase));
      UI_MainView.custom = {
        prefab: "prefab/view/UI_MainView",
        binding: (_binding = {}, _binding["setBtn"] = {
          method: "onSetBtnClick"
        }, _binding["MenuTaskBtn"] = {
          method: "onMenuTaskBtnClick"
        }, _binding["MenuEmailBtn"] = {
          method: "onMenuEmailBtnClick"
        }, _binding["MenuRankBtn"] = {
          method: "onMenuRankBtnClick"
        }, _binding["switchBtn"] = {
          method: "onSwitchBtnClick"
        }, _binding["yxczBtn"] = {
          method: "onYxczBtnClick"
        }, _binding["MenuCCBtn"] = {
          method: "onMenuCCBtnClick"
        }, _binding["MenuFLBtn"] = {
          method: "onMenuFLBtnClick"
        }, _binding["MenuHDBtn"] = {
          method: "onMenuHDBtnClick"
        }, _binding["baoxiangBtn"] = {
          method: "onBaoxiangBtnClick"
        }, _binding["MenuFightBtn"] = {
          method: "onMenuFightBtnClick"
        }, _binding["MenuZRBtn"] = {
          method: "onMenuZRBtnClick"
        }, _binding["MenuBagBtn"] = {
          method: "onMenuBagBtnClick"
        }, _binding["MenuShopBtn"] = {
          method: "onMenuShopBtnClick"
        }, _binding["MenuLMBtn"] = {
          method: "onMenuLMBtnClick"
        }, _binding["MenuYWBtn"] = {
          method: "onMenuYWBtnClick"
        }, _binding["GMBtn"] = {
          method: "onGMBtnClick"
        }, _binding["TestBigBtn"] = {
          method: "onTestBigClick"
        }, _binding["TestSmallBtn"] = {
          method: "onTestSmallClick"
        }, _binding)
      };
      ModuleContext.attachModule(UI_MainView, ModuleDef.GAME_MAIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_notice.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './UtilGame.ts'], function (exports) {
  var _inheritsLoose, cclegacy, UITransform, UIBase, ModuleContext, ModuleDef, UtilGame;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      UITransform = module.UITransform;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "486e2OwYVBK6YspFRw5iEIr", "Ui_notice", undefined);
      var Ui_notice = exports('Ui_notice', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_notice, _UIBase);
        function Ui_notice() {
          var _this;
          _this = _UIBase.call(this, Ui_notice.custom) || this;
          _this._title = void 0;
          _this._descrip = void 0;
          return _this;
        }
        var _proto = Ui_notice.prototype;
        _proto.onBtnBackClick = function onBtnBackClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          this.onClose();
        };
        _proto.onDispose = function onDispose() {
          // this.release();
        };
        _proto.onCreated = function onCreated(title, descrip) {
          _UIBase.prototype.onCreated.call(this);
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          this._title = title;
          this._descrip = descrip;
          this._initComp();
          this._updtView();
          // this.initView();
        };

        _proto.initView = function initView() {
          var _this2 = this;
          this.getLabel("lbTitle").string = this._title;
          // this.getRichText('lbrItem').string = Utils.setRichText(this._descrip);
          // this.getRichText('lbrItem').string = UtilGame.formateStr(this._descrip);
          this.getRichText("lbrItem").string = "<outline color = black width = 0 b>" + UtilGame.formateStr(this._descrip) + "</>";

          // 等待渲染队列
          setTimeout(function () {
            _this2.getNode("content").getComponent(UITransform).height = _this2.getNode("lbrItem").getComponent(UITransform).height;
          }, 0);
        }

        //---------------------------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {};
        _proto._updtView = function _updtView() {
          this.getLabel("lblTitle").string = this._title || "";
          this.getRichText("rtxDesc").string = UtilGame.formateRtx(this._descrip || "", "#38322A", null, true);
        };
        return Ui_notice;
      }(UIBase));
      Ui_notice.custom = {
        prefab: "prefab/view/uiNotice",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding)
      };
      ModuleContext.attachModule(Ui_notice, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_PlaceGetRewardView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './App.ts', './Item_prop.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, instantiate, UIBase, App, Item_prop, PlaceConfigMgr, PlaceGameMgr, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      instantiate = module.instantiate;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "7e68978UBtEb6144vvtvuaf", "UI_PlaceGetRewardView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var UI_PlaceGetRewardView = exports('UI_PlaceGetRewardView', (_dec = ccclass("UI_PlaceGetRewardView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_PlaceGetRewardView, _UIBase);
        function UI_PlaceGetRewardView() {
          var _this;
          _this = _UIBase.call(this, UI_PlaceGetRewardView.custom) || this;
          _this.layoutObj = null;
          _this._taskData = null;
          _this._taskConfig = null;
          _this._rewardItems = [];
          return _this;
        }
        var _proto = UI_PlaceGetRewardView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this._rewardItems = [];
          this._taskData = null;
          this._taskConfig = null;
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this._taskData = data == null ? void 0 : data.task;
          if (this._taskData) {
            this._taskConfig = PlaceConfigMgr.inst.getTaskConfig(this._taskData.task_id);
            this.initUI();
          }
        };
        _proto.initUI = function initUI() {
          this.updateTitle();
          this.updateRewardList();
        };
        _proto.updateTitle = function updateTitle() {
          if (!this.layoutObj || !this.layoutObj.title || !this._taskConfig) return;
          this.layoutObj.title.string = this._taskConfig.name || "任务奖励";
        };
        _proto.updateRewardList = function updateRewardList() {
          if (!this._taskConfig || !this.layoutObj || !this.layoutObj.rewardLayout) return;
          this.layoutObj.rewardLayout.removeAllChildren();
          this._rewardItems = [];
          for (var _iterator = _createForOfIteratorHelperLoose(this._taskConfig.reward), _step; !(_step = _iterator()).done;) {
            var item = _step.value;
            var itemNode = instantiate(this.layoutObj.itemPropPrefab);
            this.layoutObj.rewardLayout.addChild(itemNode);
            var itemProp = itemNode.getComponent(Item_prop);
            if (itemProp) {
              var itemData = {
                itemid: item[0],
                num: item[1],
                itemuid: 0
              };
              itemProp.updateItem(itemData);
              this._rewardItems.push(itemProp);
            }
          }
        };
        _proto.onLingQuClick = function onLingQuClick() {
          if (this._taskData && this._taskData.task_id > 0) {
            PlaceGameMgr.inst.reqGetTaskReward(this._taskData.task_id);
            App.log.logBusiness("\u9886\u53D6\u4EFB\u52A1\u5956\u52B1 - \u4EFB\u52A1ID: " + this._taskData.task_id);
            this.onClose();
          }
        };
        return UI_PlaceGetRewardView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_PlaceGetRewardView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["closeBtn"] = {
          method: "onClose"
        }, _binding["lingquBtn"] = {
          method: "onLingQuClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_PlaceGetRewardView, ModuleDef.PLACE_GAME_TASK);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_PlaceTaskView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './BingLiCell.ts', './TaskSelectItem.ts', './Item_prop.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './App.ts', './ModuleContext.ts', './ModuleDef.ts', './MonitorType.ts', './Utils.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, instantiate, Layout, UITransform, UIBase, BingLiCell, TaskSelectItem, Item_prop, PlaceConfigMgr, PlaceGameMgr, App, ModuleContext, ModuleDef, MonitorType, Utils;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      instantiate = module.instantiate;
      Layout = module.Layout;
      UITransform = module.UITransform;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      BingLiCell = module.BingLiCell;
    }, function (module) {
      TaskSelectItem = module.TaskSelectItem;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Utils = module.Utils;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "09e2dlLlrRA0poXN1Xlb7R1", "UI_PlaceTaskView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_PlaceTaskView = exports('UI_PlaceTaskView', (_dec = ccclass("UI_PlaceTaskView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_PlaceTaskView, _UIBase);
        // 任务结束时间戳（毫秒）

        function UI_PlaceTaskView() {
          var _this;
          _this = _UIBase.call(this, UI_PlaceTaskView.custom) || this;
          _this.layoutObj = null;
          _this._taskDataList = [];
          _this._selectedTaskId = 0;
          _this._bingLiCells = [];
          _this._rewardItems = [];
          _this._taskSelectItems = [];
          _this._qualityName = {
            2: "普通",
            3: "精英",
            4: "史诗"
          };
          _this._countdownTimer = void 0;
          _this._countdownRemaining = 0;
          _this._taskEndTime = 0;
          return _this;
        }
        var _proto = UI_PlaceTaskView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
          this.stopCountdown();
          this._bingLiCells = [];
          this._rewardItems = [];
          this._taskSelectItems = [];
          this._taskDataList = [];
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.addEventListenter();
          this.layoutObj = this.layout;
          this._taskDataList = (data == null ? void 0 : data.tasks) || [];
          if (this._taskDataList.length > 0) {
            var curTaskData = this._taskDataList.find(function (t) {
              return t.state === 1;
            });
            if (curTaskData) {
              this._selectedTaskId = curTaskData.task_id;
            } else {
              this._selectedTaskId = this._taskDataList[0].task_id;
            }
            this.initUI();
          }
        };
        _proto.addEventListenter = function addEventListenter() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetTaskReward, this.resGetTaskReward, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAcceptTask, this.resAcceptTask, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTaskFinish, this.resTaskFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResImmFinishTask, this.resImmFinishTask, this);
        };
        _proto.initUI = function initUI() {
          this.createTaskSelectItems();
          this.updateView();
        };
        _proto.updateView = function updateView() {
          this.updateTaskView();
          this.updateBingLiList();
          this.updateRewardList();
          this.updateTaskSelectItems();
          this.updateRewardPos();
        }

        /**
         * 更新任务视图
         */;
        _proto.updateTaskView = function updateTaskView() {
          var _this2 = this;
          if (this._taskDataList.length === 0 || !this.layoutObj) return;
          var currentTaskData = this._taskDataList.find(function (t) {
            return t.task_id === _this2._selectedTaskId;
          });
          if (!currentTaskData) return;
          var taskConfig = PlaceConfigMgr.inst.getTaskConfig(currentTaskData.task_id);
          if (!taskConfig) return;
          if (this.layoutObj.lbTaskName) {
            this.layoutObj.lbTaskName.string = taskConfig.name || "";
          }
          if (this.layoutObj.lbTaskDesc) {
            this.layoutObj.lbTaskDesc.string = taskConfig.desc || "";
          }
          if (this.layoutObj.lbCostTime) {
            if (currentTaskData.state === 1) {
              this._taskEndTime = currentTaskData.task_duration || 0;
              this.initCountdownFromEndTime();
              this.startCountdown();
            } else {
              this._countdownRemaining = Math.floor(taskConfig.cost_time / 1000);
              this.layoutObj.lbCostTime.string = Utils.timeFormat(this._countdownRemaining);
              this.stopCountdown();
            }
          }
          this.updateBottomState(currentTaskData.state);
        }

        /**
         *更新兵力需求
         * @returns
         */;
        _proto.updateBingLiList = function updateBingLiList() {
          var _this3 = this;
          if (this._taskDataList.length === 0 || !this.layoutObj || !this.layoutObj.bingCellParent) return;
          var currentTaskData = this._taskDataList.find(function (t) {
            return t.task_id === _this3._selectedTaskId;
          });
          if (!currentTaskData) return;
          var taskConfig = PlaceConfigMgr.inst.getTaskConfig(currentTaskData.task_id);
          if (!taskConfig) return;
          this.layoutObj.bingCellParent.removeAllChildren();
          this._bingLiCells = [];
          var index = 0;
          for (var _iterator = _createForOfIteratorHelperLoose(taskConfig.cost_soldier), _step; !(_step = _iterator()).done;) {
            var soldier = _step.value;
            var cellNode = instantiate(this.layoutObj.bingLiCellPrefab);
            this.layoutObj.bingCellParent.addChild(cellNode);
            var cell = cellNode.getComponent(BingLiCell);
            if (cell) {
              cell.setData(soldier, index);
              this._bingLiCells.push(cell);
              index++;
            }
          }
        }

        /**
         * 更新奖励列表
         * @returns
         */;
        _proto.updateRewardList = function updateRewardList() {
          var _this4 = this;
          if (this._taskDataList.length === 0 || !this.layoutObj || !this.layoutObj.rewardLayout) return;
          var currentTaskData = this._taskDataList.find(function (t) {
            return t.task_id === _this4._selectedTaskId;
          });
          if (!currentTaskData) return;
          var taskConfig = PlaceConfigMgr.inst.getTaskConfig(currentTaskData.task_id);
          if (!taskConfig) return;
          this.layoutObj.rewardLayout.removeAllChildren();
          this._rewardItems = [];

          // 根据reward创建道具组件
          for (var _iterator2 = _createForOfIteratorHelperLoose(taskConfig.reward), _step2; !(_step2 = _iterator2()).done;) {
            var item = _step2.value;
            var itemNode = instantiate(this.layoutObj.itemPropPrefab);
            this.layoutObj.rewardLayout.addChild(itemNode);
            var itemProp = itemNode.getComponent(Item_prop);
            if (itemProp) {
              var tempItem = {};
              tempItem.itemid = item[0];
              tempItem.num = item[1];
              itemProp.updateItem(tempItem);
              this._rewardItems.push(itemProp);
            }
          }
        };
        _proto.updateBottomState = function updateBottomState(state) {
          if (state === void 0) {
            state = 0;
          }
          if (!this.layoutObj) return;
          if (this.layoutObj.bottomNode1) {
            this.layoutObj.bottomNode1.active = state === 0;
          }
          if (this.layoutObj.bottomNode2) {
            this.layoutObj.bottomNode2.active = state === 1;
            var config = PlaceConfigMgr.inst.getDiamondCost();
            if (this._countdownRemaining > 0) {
              this.layoutObj.cellCost.node.active = true;
              var costDiamond = Math.ceil(this._countdownRemaining * 1000 / config[1]);
              this.layoutObj.cellCost.setData([config[0], costDiamond]);
            } else {
              this.layoutObj.cellCost.node.active = false;
            }
          }
        };
        _proto.onReceiveClick = function onReceiveClick() {
          PlaceGameMgr.inst.reqAcceptTask(this._selectedTaskId);
        };
        _proto.onQuickBtn = function onQuickBtn() {
          if (this._selectedTaskId > 0) {
            PlaceGameMgr.inst.reqImmFinishTask(this._selectedTaskId);
          }
        };
        _proto.onWenHaoBtn = function onWenHaoBtn() {
          App.log.logBusiness("打开玩法说明");
        };
        _proto.onCloseBtnClick = function onCloseBtnClick() {
          this.onClose();
        }

        /**
         * 启动倒计时
         */;
        _proto.startCountdown = function startCountdown() {
          var _this5 = this;
          if (this._countdownTimer > 0) {
            return;
          }
          if (this._countdownRemaining <= 0) {
            App.log.logBusiness("倒计时为0,不启动倒计时");
            return;
          }
          this._countdownTimer = setInterval(function () {
            // 每秒减1，使用本地倒计时
            _this5._countdownRemaining--;
            if (_this5._countdownRemaining <= 0) {
              _this5.stopCountdown();
              _this5._countdownRemaining = 0;
              _this5.onClose();
            }
            _this5.updateCountdownDisplay();
          }, 1000);
        }

        /**
         * 停止倒计时
         */;
        _proto.stopCountdown = function stopCountdown() {
          if (this._countdownTimer > 0) {
            clearInterval(this._countdownTimer);
            this._countdownTimer = 0;
          }
        }

        /**
         * 从结束时间戳初始化倒计时
         */;
        _proto.initCountdownFromEndTime = function initCountdownFromEndTime() {
          if (!this.layoutObj || !this.layoutObj.lbCostTime) {
            return;
          }
          var currentTime = App.loginMgr.getServerTimeExact();
          this._countdownRemaining = Math.max(0, Math.floor((this._taskEndTime - currentTime) / 1000));
          this.layoutObj.lbCostTime.string = Utils.timeFormat(this._countdownRemaining);
        }

        /**
         * 更新倒计时显示
         */;
        _proto.updateCountdownDisplay = function updateCountdownDisplay() {
          if (this.layoutObj && this.layoutObj.lbCostTime) {
            this.layoutObj.lbCostTime.string = Utils.timeFormat(this._countdownRemaining);
          }
        }

        /**
         * 创建任务选择项
         */;
        _proto.createTaskSelectItems = function createTaskSelectItems() {
          var _this6 = this;
          if (!this.layoutObj || !this.layoutObj.taskSelectLayout) return;
          this.layoutObj.taskSelectLayout.removeAllChildren();
          this._taskSelectItems = [];
          var hasInProgressTask = this._taskDataList.some(function (task) {
            return task.state === 1;
          });
          for (var _iterator3 = _createForOfIteratorHelperLoose(this._taskDataList), _step3; !(_step3 = _iterator3()).done;) {
            var taskData = _step3.value;
            var itemNode = instantiate(this.layoutObj.taskSelectItem);
            this.layoutObj.taskSelectLayout.addChild(itemNode);
            var selectItem = itemNode.getComponent(TaskSelectItem);
            var config = PlaceConfigMgr.inst.getTaskConfig(taskData.task_id);
            if (selectItem) {
              var itemData = {
                id: taskData.task_id,
                name: this._qualityName[config.qua],
                icon: config.icon,
                quality: config.qua,
                isSelected: taskData.task_id === this._selectedTaskId,
                isIng: taskData.state === 1,
                islock: hasInProgressTask,
                selectedTaskId: this._selectedTaskId
              };
              selectItem.setData(itemData);
              selectItem.setSelectCallback(function (data) {
                return _this6.onTaskSelectItem(data);
              });
              this._taskSelectItems.push(selectItem);
            }
          }
          this.layoutObj.taskSelectLayout.getComponent(Layout).updateLayout();
        }

        /**
         * 更新任务选择项状态
         */;
        _proto.updateTaskSelectItems = function updateTaskSelectItems() {
          var _this7 = this;
          if (this._taskSelectItems.length === 0) return;
          var hasInProgressTask = this._taskDataList.some(function (task) {
            return task.state === 1;
          });
          var _loop = function _loop() {
              var selectItem = _step4.value;
              var itemData = selectItem.getData();
              if (!itemData) return 0; // continue
              var taskData = _this7._taskDataList.find(function (t) {
                return t.task_id === itemData.id;
              });
              if (!taskData) return 0; // continue
              itemData.isSelected = taskData.task_id === _this7._selectedTaskId;
              itemData.isIng = taskData.state === 1;
              itemData.islock = hasInProgressTask;
              itemData.selectedTaskId = _this7._selectedTaskId;
              selectItem.setData(itemData);
            },
            _ret;
          for (var _iterator4 = _createForOfIteratorHelperLoose(this._taskSelectItems), _step4; !(_step4 = _iterator4()).done;) {
            _ret = _loop();
            if (_ret === 0) continue;
          }
        };
        _proto.updateRewardPos = function updateRewardPos() {
          if (!this.layoutObj || !this.layoutObj.jiantou) return;
          var curSelectItem = null;
          for (var _iterator5 = _createForOfIteratorHelperLoose(this._taskSelectItems), _step5; !(_step5 = _iterator5()).done;) {
            var item = _step5.value;
            var itemData = item.getData();
            if (itemData.id === this._selectedTaskId) {
              curSelectItem = item;
              break;
            }
          }
          App.log.logBusiness("curSelectItem", curSelectItem.node.getPosition());
          var selectPos = curSelectItem.node.getWorldPosition();
          var rewardTipsParent = this.layoutObj.jiantou.parent;
          if (rewardTipsParent) {
            var localPos = rewardTipsParent.getComponent(UITransform).convertToNodeSpaceAR(selectPos);
            this.layoutObj.jiantou.x = localPos.x;
          }
        }

        /**
         * 任务选择项点击回调
         */;
        _proto.onTaskSelectItem = function onTaskSelectItem(data) {
          if (data && data.id) {
            this._selectedTaskId = data.id;
            for (var _iterator6 = _createForOfIteratorHelperLoose(this._taskSelectItems), _step6; !(_step6 = _iterator6()).done;) {
              var item = _step6.value;
              var itemData = item.getData();
              item.setSelected(itemData.id === this._selectedTaskId);
            }
            this.updateView();
          }
        }

        /**
         * 接受任务响应处理
         */;
        _proto.resAcceptTask = function resAcceptTask(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u63A5\u53D7\u4EFB\u52A1\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          if (this._selectedTaskId !== msg.task_id) {
            App.log.logError("\u63A5\u53D7\u4EFB\u52A1\u5931\u8D25 - \u4EFB\u52A1ID: " + msg.task_id + ", \u9009\u62E9\u7684\u4EFB\u52A1ID: " + this._selectedTaskId);
            this._selectedTaskId = msg.task_id;
          }
          var task = this._taskDataList.find(function (t) {
            return t.task_id === msg.task_id;
          });
          if (task) {
            task.task_duration = msg.task_duration;
            task.state = msg.state;
            if (task.task_id === this._selectedTaskId && task.state === 1) {
              this._taskEndTime = task.task_duration;
            }
            this.updateView();
          }
        }

        /**
         * 任务完成响应处理
         */;
        _proto.resTaskFinish = function resTaskFinish(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u4EFB\u52A1\u5B8C\u6210\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          if (this._selectedTaskId !== msg.task_id) {
            App.log.logError("\u4EFB\u52A1\u5B8C\u6210\u5931\u8D25 - \u4EFB\u52A1ID: " + msg.task_id + ", \u9009\u62E9\u7684\u4EFB\u52A1ID: " + this._selectedTaskId);
            this._selectedTaskId = msg.task_id;
          }
          var task = this._taskDataList.find(function (t) {
            return t.task_id === msg.task_id;
          });
          if (task) {
            task.state = msg.state;
            task.task_duration = 0;
            this.onClose();
          }
        };
        _proto.resGetTaskReward = function resGetTaskReward(msg) {
          if (msg.code !== 200) {
            return;
          }
          App.log.logBusiness("播放领取成功的奖励");
          this.onClose();
        };
        _proto.resImmFinishTask = function resImmFinishTask(msg) {
          if (msg.code !== 200) {
            return;
          }
          this.onClose();
        };
        return UI_PlaceTaskView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_PlaceTaskView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["receiveBtn"] = {
          method: "onReceiveClick"
        }, _binding["wenhaoBtn"] = {
          method: "onWenHaoBtn"
        }, _binding["closeBtn"] = {
          method: "onCloseBtnClick"
        }, _binding["quickBtn"] = {
          method: "onQuickBtn"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_PlaceTaskView, ModuleDef.PLACE_GAME_TASK);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_prompt.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, UIBase, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b68f2gwZEVLJ6kpk+0E2CuM", "Ui_prompt", undefined);
      var Ui_prompt = exports('Ui_prompt', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_prompt, _UIBase);
        function Ui_prompt() {
          return _UIBase.call(this, Ui_prompt.custom) || this;
        }
        var _proto = Ui_prompt.prototype;
        _proto.onCreated = function onCreated(desc) {
          _UIBase.prototype.onCreated.call(this);
          this.getRichText("lbrDesc").string = desc;
        };
        return Ui_prompt;
      }(UIBase));
      Ui_prompt.custom = {
        prefab: "prefab/view/uiPrompt",
        binding: {}
      };
      ModuleContext.attachModule(Ui_prompt, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_promptAgreement.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './UtilGame.ts', './DBRecord.ts', './Ui_agreement.ts', './UIMgr.ts'], function (exports) {
  var _inheritsLoose, cclegacy, UIBase, ModuleContext, ModuleDef, UtilGame, DBRecord, Ui_agreement, UIMgr, LayerType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      Ui_agreement = module.Ui_agreement;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "6dba6gPv4NL+YrpztU2PvpZ", "Ui_promptAgreement", undefined);
      var Ui_promptAgreement = exports('Ui_promptAgreement', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_promptAgreement, _UIBase);
        function Ui_promptAgreement() {
          var _this;
          _this = _UIBase.call(this, Ui_promptAgreement.custom) || this;
          _this._title = void 0;
          _this._funcCancel = void 0;
          _this._funcOk = void 0;
          _this._cancelStr = void 0;
          _this._okStr = void 0;
          return _this;
        }
        var _proto = Ui_promptAgreement.prototype;
        _proto.onDispose = function onDispose() {};
        _proto.onCreated = function onCreated(title, funcOk, okStr, funcCancel, cancelStr) {
          _UIBase.prototype.onCreated.call(this);
          this._title = title;
          this._funcOk = funcOk;
          this._funcCancel = funcCancel;
          this._okStr = okStr ? okStr : '确定';
          this._cancelStr = cancelStr ? cancelStr : '取消';
          this.initView();
        };
        _proto.initView = function initView() {
          this.getLabel('lbRead').string = UtilGame.getGlobalTxt(134);
          this.getLabel('lbAnd').string = UtilGame.getGlobalTxt(98);
          this.getLabel('lbUser').string = UtilGame.getGlobalTxt(99);
          this.getLabel('lbPrivacy').string = UtilGame.getGlobalTxt(100);
          this.getLabel('lbSure').string = UtilGame.getGlobalTxt(135);
          this.getLabel('lbTitle').string = this._title;
          this.getLabel('lbCancel').string = this._cancelStr;
          this.getLabel('lbOk').string = this._okStr;
        };
        _proto.onBtnCancel = function onBtnCancel() {
          this.onClose();
          this._funcCancel && this._funcCancel();
        };
        _proto.onBtnOk = function onBtnOk() {
          this.onClose();
          this._funcOk && this._funcOk();
        };
        _proto.onBtnBackClick = function onBtnBackClick() {
          this.onClose();
          this._funcCancel && this._funcCancel();
        }

        /**
         * 点击用户协议文本
         */;
        _proto.onUserAgreement = function onUserAgreement() {
          var config = DBRecord.fetchId('ShuoMingGuiZe', 10);
          UIMgr.inst.open(Ui_agreement, LayerType.panel, null, [UtilGame.getGlobalTxt(99), config.descrip]);
        }

        /**
         * 点击隐私协议文本
         */;
        _proto.onPrivacyAgreement = function onPrivacyAgreement() {
          var config = DBRecord.fetchId('ShuoMingGuiZe', 11);
          UIMgr.inst.open(Ui_agreement, LayerType.panel, null, [UtilGame.getGlobalTxt(100), config.descrip]);
        };
        return Ui_promptAgreement;
      }(UIBase));
      Ui_promptAgreement.custom = {
        prefab: 'prefab/view/uiPromptAgreement',
        binding: (_binding = {}, _binding['imgBack'] = {
          method: 'onBtnBackClick'
        }, _binding['btnCancel'] = {
          method: 'onBtnCancel'
        }, _binding['btnOk'] = {
          method: 'onBtnOk'
        }, _binding['btnUser'] = {
          method: 'onUserAgreement'
        }, _binding['btnPrivacy'] = {
          method: 'onPrivacyAgreement'
        }, _binding)
      };
      ModuleContext.attachModule(Ui_promptAgreement, ModuleDef.GAME_LOGIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Ui_promptWindow.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, Vec3, UIBase, ModuleContext, ModuleDef, App, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "b5c19ca3BNHNoQAXB+QYK6v", "Ui_promptWindow", undefined);
      var Ui_promptWindow = exports('Ui_promptWindow', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(Ui_promptWindow, _UIBase);
        function Ui_promptWindow() {
          var _this;
          _this = _UIBase.call(this, Ui_promptWindow.custom) || this;
          _this._title = void 0;
          _this._desc = void 0;
          _this._funcCancel = void 0;
          _this._funcOk = void 0;
          _this._cancelStr = void 0;
          _this._okStr = void 0;
          App.monitorMgr.addEventListener(EventType.login_select_ser, _this.initView, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = Ui_promptWindow.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.removeEventListener(EventType.login_select_ser, this.initView, this);
        };
        _proto.onCreated = function onCreated(title, desc, funcOk, okStr, funcCancel, cancelStr) {
          _UIBase.prototype.onCreated.call(this);
          this._title = title;
          this._desc = desc;
          this._funcOk = funcOk;
          this._funcCancel = funcCancel;
          this._okStr = okStr ? okStr : "确定";
          this._cancelStr = cancelStr ? cancelStr : "取消";
          this.initView();
        };
        _proto.initView = function initView() {
          this.getLabel("lbTitle").string = this._title;
          this.getRichText("lbrDesc").string = "<b>" + this._desc + "</b>";
          this.getLabel("lbCancel").string = this._cancelStr;
          this.getLabel("lbOk").string = this._okStr;

          // 单个确认框
          if (!this._funcCancel) {
            this.getButton("imgBack").interactable = !!this._funcCancel;
            this.getNode("btnCancel").active = !!this._funcCancel;
            this.getNode("btnOK").setPosition(new Vec3(0, this.getNode("btnOK").position.y, 0));
          }
        };
        _proto.onBtnCancel = function onBtnCancel() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          this.onClose();
          this._funcCancel && this._funcCancel();
        };
        _proto.onBtnOk = function onBtnOk() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          this.onClose();
          this._funcOk && this._funcOk();
        };
        return Ui_promptWindow;
      }(UIBase));
      Ui_promptWindow.custom = {
        prefab: "prefab/view/uiPromptWindow",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnCancel"] = {
          method: "onBtnCancel"
        }, _binding["btnOk"] = {
          method: "onBtnOk"
        }, _binding)
      };
      ModuleContext.attachModule(Ui_promptWindow, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_RenameView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './MonitorType.ts', './Prompt.ts', './NetChannelMgr.ts', './UtilGame.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, EditBox, UIBase, ModuleContext, ModuleDef, App, MonitorType, ModType, Prompt, netChannel, UtilGame;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      EditBox = module.EditBox;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
      ModType = module.ModType;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      netChannel = module.netChannel;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "87c932JK4dHuqFO2sFJuTRV", "UI_RenameView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_RenameView = exports('UI_RenameView', (_dec = ccclass("UI_RenameView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_RenameView, _UIBase);
        function UI_RenameView() {
          var _this;
          _this = _UIBase.call(this, UI_RenameView.custom) || this;
          _this.layoutObj = null;
          // 改名配置
          _this.MIN_NAME_LENGTH = 3;
          _this.MAX_NAME_LENGTH = 12;
          return _this;
        }
        var _proto = UI_RenameView.prototype;
        _proto.onDispose = function onDispose() {
          var _this$layoutObj;
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
          if ((_this$layoutObj = this.layoutObj) != null && _this$layoutObj.edtName) {
            this.layoutObj.edtName.node.off(EditBox.EventType.TEXT_CHANGED, this.onNameInputChanged, this);
          }
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResRename, this.resRename, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initUI();
        };
        _proto.getRenameCost = function getRenameCost() {
          return UtilGame.getZaXiangConfig("gaiming_cost") || [];
        }

        /**
         * 初始化UI
         */;
        _proto.initUI = function initUI() {
          if (this.layoutObj.lbTip1) {
            this.layoutObj.lbTip1.string = "\u6635\u79F0\u5FC5\u987B\u4ECB\u4E8E" + this.MIN_NAME_LENGTH + "-" + this.MAX_NAME_LENGTH + "\u4E2A\u5B57\u7B26\u4E4B\u95F4";
          }
          if (this.layoutObj.lbTip2) {
            this.layoutObj.lbTip2.string = "可以使用";
          }
          if (this.layoutObj.lbTip3) {
            this.layoutObj.lbTip3.string = "名称已被使用";
          }
          if (this.layoutObj.cellCost) {
            var costConfig = this.getRenameCost();
            if (costConfig && costConfig.length > 0) {
              if (costConfig.length > 1) {
                if (!App.bagMgr.checkItemCost([costConfig[0]]) && App.bagMgr.checkItemCost([costConfig[1]])) {
                  this.layoutObj.cellCost.setData(costConfig[1]);
                } else {
                  this.layoutObj.cellCost.setData(costConfig[0]);
                }
              } else {
                this.layoutObj.cellCost.setData(costConfig[0]);
              }
            }
          }
          if (this.layoutObj.edtName) {
            this.layoutObj.edtName.string = "";
            this.layoutObj.edtName.placeholder = "\u6635\u79F0\u5FC5\u987B\u4ECB\u4E8E" + this.MIN_NAME_LENGTH + "-" + this.MAX_NAME_LENGTH + "\u4E2A\u5B57\u7B26\u4E4B\u95F4";
            this.layoutObj.edtName.maxLength = this.MAX_NAME_LENGTH;
            this.layoutObj.edtName.node.on(EditBox.EventType.TEXT_CHANGED, this.onNameInputChanged, this);
          }
          this.updateValidateUI(3);
        }

        /**
         * 输入框内容变化
         */;
        _proto.onNameInputChanged = function onNameInputChanged() {
          var _this$layoutObj$edtNa;
          var name = ((_this$layoutObj$edtNa = this.layoutObj.edtName) == null || (_this$layoutObj$edtNa = _this$layoutObj$edtNa.string) == null ? void 0 : _this$layoutObj$edtNa.trim()) || "";
          if (!name) {
            this.updateValidateUI(3);
            return;
          }
          var formatValid = this.checkNameFormat(name);
          if (!formatValid) {
            this.updateValidateUI(3);
            return;
          }
          this.updateValidateUI(1);
        }

        /**
         * 更新验证UI显示
         * @param state 验证状态: 0-隐藏, 1-可用, 2-已被使用, 3-格式错误
         */;
        _proto.updateValidateUI = function updateValidateUI(state) {
          if (this.layoutObj.gouImg) {
            this.layoutObj.gouImg.active = false;
          }
          if (this.layoutObj.wrongImg) {
            this.layoutObj.wrongImg.active = false;
          }
          if (this.layoutObj.lbTip1) {
            this.layoutObj.lbTip1.node.active = false;
          }
          if (this.layoutObj.lbTip2) {
            this.layoutObj.lbTip2.node.active = false;
          }
          if (this.layoutObj.lbTip3) {
            this.layoutObj.lbTip3.node.active = false;
          }
          if (state === 0) {
            return;
          }
          switch (state) {
            case 1:
              // 名称可用
              if (this.layoutObj.gouImg) {
                this.layoutObj.gouImg.active = true;
              }
              if (this.layoutObj.lbTip2) {
                this.layoutObj.lbTip2.node.active = true;
              }
              break;
            case 2:
              // 名称已被使用
              if (this.layoutObj.wrongImg) {
                this.layoutObj.wrongImg.active = true;
              }
              if (this.layoutObj.lbTip3) {
                this.layoutObj.lbTip3.node.active = true;
              }
              break;
            case 3:
              // 格式错误
              if (this.layoutObj.wrongImg) {
                this.layoutObj.wrongImg.active = true;
              }
              if (this.layoutObj.lbTip1) {
                this.layoutObj.lbTip1.node.active = true;
              }
              break;
          }
        }

        /**
         * 检查名称格式
         * @param name 昵称
         * @returns 格式是否正确
         */;
        _proto.checkNameFormat = function checkNameFormat(name) {
          if (name.length < this.MIN_NAME_LENGTH || name.length > this.MAX_NAME_LENGTH) {
            return false;
          }
          var validPattern = /^[\u4e00-\u9fa5a-zA-Z0-9\s]+$/;
          if (!validPattern.test(name)) {
            return false;
          }
          return true;
        }

        /**
         * 使用按钮点击
         */;
        _proto.onBtnUseClick = function onBtnUseClick() {
          var _this$layoutObj$edtNa2;
          var newName = ((_this$layoutObj$edtNa2 = this.layoutObj.edtName) == null || (_this$layoutObj$edtNa2 = _this$layoutObj$edtNa2.string) == null ? void 0 : _this$layoutObj$edtNa2.trim()) || "";
          if (!this.validateName(newName)) {
            return;
          }
          if (!this.checkCostEnough()) {
            Prompt.popTip("消耗道具不足");
            return;
          }
          this.reqRename(newName);
        }

        /**
         * 验证昵称
         * @param name 昵称
         * @returns 是否有效
         */;
        _proto.validateName = function validateName(name) {
          if (!name) {
            Prompt.popTip("请输入昵称");
            return false;
          }
          if (name.length < this.MIN_NAME_LENGTH) {
            Prompt.popTip("\u6635\u79F0\u4E0D\u80FD\u5C11\u4E8E" + this.MIN_NAME_LENGTH + "\u4E2A\u5B57\u7B26");
            return false;
          }
          if (name.length > this.MAX_NAME_LENGTH) {
            Prompt.popTip("\u6635\u79F0\u4E0D\u80FD\u8D85\u8FC7" + this.MAX_NAME_LENGTH + "\u4E2A\u5B57\u7B26");
            return false;
          }
          var validPattern = /^[\u4e00-\u9fa5a-zA-Z0-9\s]+$/;
          if (!validPattern.test(name)) {
            Prompt.popTip("昵称只能包含文字、字母、数字和空格");
            return false;
          }
          return true;
        }

        /**
         * 检查消耗道具是否足够
         * @returns 是否足够
         */;
        _proto.checkCostEnough = function checkCostEnough() {
          var costConfig = this.getRenameCost();
          if (!costConfig || costConfig.length === 0) {
            return true;
          }
          return App.bagMgr.checkItemCost(costConfig, false);
        }

        /**
         * 发送改名请求
         * @param newName 新昵称
         */;
        _proto.reqRename = function reqRename(newName) {
          var msg = {};
          msg.name = newName;
          netChannel.game.send(ModType.user, MonitorType.CMD_ReqRename, msg);
        }

        /**
         * 改名响应
         * @param msg 响应消息
         */;
        _proto.resRename = function resRename(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6539\u540D\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            if (msg.code === 1105) {
              this.updateValidateUI(3);
            } else if (msg.code === 1106) {
              this.updateValidateUI(3);
            } else if (msg.code === 1102) {
              this.updateValidateUI(2);
            }
            return;
          }
          Prompt.popTip("改名成功");
          this.onClose();
        };
        return UI_RenameView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_RenameView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnUse"] = {
          method: "onBtnUseClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_RenameView, ModuleDef.GAME_ROLE);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_RoleInfoView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './UIMgr.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './UI_RenameView.ts', './Layout_UI_RenameView.ts', './Prompt.ts', './UtilityPlatform.ts', './MonitorType.ts', './UI_SettingView.ts', './Layout_UI_SettingView.ts', './UI_ZhuangBanView.ts', './Layout_UI_ZhuangBanView.ts', './RoleItem.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, UIMgr, LayerType, ModuleContext, ModuleDef, App, UI_RenameView, Layout_UI_RenameView, Prompt, UtilityPlatform, MonitorType, UI_SettingView, Layout_UI_SettingView, UI_ZhuangBanView, Layout_UI_ZhuangBanView, RoleItemMode;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      UI_RenameView = module.UI_RenameView;
    }, function (module) {
      Layout_UI_RenameView = module.Layout_UI_RenameView;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UI_SettingView = module.UI_SettingView;
    }, function (module) {
      Layout_UI_SettingView = module.Layout_UI_SettingView;
    }, function (module) {
      UI_ZhuangBanView = module.UI_ZhuangBanView;
    }, function (module) {
      Layout_UI_ZhuangBanView = module.Layout_UI_ZhuangBanView;
    }, function (module) {
      RoleItemMode = module.RoleItemMode;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "6d122e3utZMyZlqF0hHLVcC", "UI_RoleInfoView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_RoleInfoView = exports('UI_RoleInfoView', (_dec = ccclass("UI_RoleInfoView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_RoleInfoView, _UIBase);
        function UI_RoleInfoView() {
          var _this;
          _this = _UIBase.call(this, UI_RoleInfoView.custom) || this;
          _this.layoutObj = null;
          return _this;
        }
        var _proto = UI_RoleInfoView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.init();
        }

        /**
         * 初始化UI
         */;
        _proto.init = function init() {
          this.addEventListeners();
          this.updateRoleInfo();
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResRename, this.resRename, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSetHead, this.resSetHead, this);
        }

        /**
         * 更新角色信息
         */;
        _proto.updateRoleInfo = function updateRoleInfo() {
          var roleInfo = App.roleMgr.getRoleInfo();
          if (!roleInfo) {
            return;
          }

          // 更新等级
          // if (this.layoutObj.lbLevel) {
          //     const level = App.roleMgr.getRoleLv();
          //     this.layoutObj.lbLevel.string = level.toString();
          // }

          // // 更新头像
          if (this.layoutObj.roleItem) {
            this.layoutObj.roleItem.show(RoleItemMode.NORMAL, App.roleMgr.getHeadId(), true, false);
          }

          // 更新昵称
          if (this.layoutObj.lbName) {
            this.layoutObj.lbName.string = App.roleMgr.getRoleName() || "";
          }

          // // 更新用户ID
          if (this.layoutObj.lbxId) {
            this.layoutObj.lbxId.string = App.roleMgr.getRoleUd() || "";
          }

          // 更新区服
          if (this.layoutObj.lbsvName) {
            this.layoutObj.lbsvName.string = App.loginMgr.selServer.sname;
          }

          // 更新联盟名称
          if (this.layoutObj.lbLm) {
            this.layoutObj.lbLm.string = "暂无联盟";
          }
        };
        _proto.resRename = function resRename(msg) {
          if (msg.code !== 200) {
            return;
          }
          App.roleMgr.setRoleName(msg.name);
          this.updateRoleInfo();
        };
        _proto.resSetHead = function resSetHead(obj) {
          if (obj.code !== 200) {
            return;
          }
          this.updateRoleInfo();
        }

        /**
         * 装扮按钮点击
         */;
        _proto.onBtnZbClick = function onBtnZbClick() {
          UIMgr.inst.open(UI_ZhuangBanView, LayerType.panel, Layout_UI_ZhuangBanView);
        }

        /**
         * 昵称按钮点击
         */;
        _proto.onBtnNameClick = function onBtnNameClick() {
          UIMgr.inst.openOnce(UI_RenameView, LayerType.panel, Layout_UI_RenameView);
        }

        /**
         * 兑换码按钮点击
         */;
        _proto.onBtnDhmClick = function onBtnDhmClick() {
          Prompt.popTip("兑换码功能开发中");
        }

        /**
         * 复制ID按钮点击
         */;
        _proto.onBtnCopyIdClick = function onBtnCopyIdClick() {
          var uid = App.roleMgr.getRoleUd();
          if (uid) {
            UtilityPlatform.getInstance().setClipboardData(uid);
          }
        }

        /**
         * 设置按钮点击
         */;
        _proto.onBtnSettingClick = function onBtnSettingClick() {
          UIMgr.inst.open(UI_SettingView, LayerType.panel, Layout_UI_SettingView);
        };
        return UI_RoleInfoView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_RoleInfoView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onClose"
        }, _binding["btnZb"] = {
          method: "onBtnZbClick"
        }, _binding["btnDhm"] = {
          method: "onBtnDhmClick"
        }, _binding["btnName"] = {
          method: "onBtnNameClick"
        }, _binding["btnId"] = {
          method: "onBtnCopyIdClick"
        }, _binding["btnSetting"] = {
          method: "onBtnSettingClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_RoleInfoView, ModuleDef.GAME_ROLE);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_ServerListView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './App.ts', './EventType.ts', './Item_server.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Label, Button, ModuleDef, ModuleContext, UIBase, App, EventType, Item_server;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Button = module.Button;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      Item_server = module.Item_server;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "44d24LzJQFDNoi/VFvQziEX", "UI_ServerListView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_ServerListView = exports('UI_ServerListView', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_ServerListView, _UIBase);
        function UI_ServerListView() {
          var _this;
          _this = _UIBase.call(this, UI_ServerListView.custom) || this;
          _this.layoutObj = null;
          /** 当前选中的Tab索引 */
          _this._selectedTabIndex = -1;
          return _this;
        }
        var _proto = UI_ServerListView.prototype;
        _proto.onCreated = function onCreated() {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initUI();
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(EventType.login_serverList_close, this.onBtnClose, this);
        }

        /**
         * 初始化UI
         */;
        _proto.initUI = function initUI() {
          this.layoutObj.scrollTab.content.removeAllChildren();
          this.layoutObj.scrollTab.onItemRender = this.onTabItemRender.bind(this);
          this.layoutObj.scrollServer.content.removeAllChildren();
          this.layoutObj.scrollServer.onItemRender = this.onServerItemRender.bind(this);
          var tabArr = App.loginMgr.getSerListTabArr();
          this.layoutObj.scrollTab.array = tabArr;
          if (tabArr && tabArr.length > 0) {
            this.selectTab(0);
          }
        }

        /**
         * Tab项渲染回调
         */;
        _proto.onTabItemRender = function onTabItemRender(node, index, data) {
          var _node$getChildByName,
            _this2 = this;
          var selectImg = node.getChildByName("selectImg");
          var lbName = (_node$getChildByName = node.getChildByName("lbName")) == null ? void 0 : _node$getChildByName.getComponent(Label);
          if (lbName) {
            lbName.string = data.zname;
          }
          if (selectImg) {
            selectImg.active = index === this._selectedTabIndex;
          }
          var btn = node.getComponent(Button);
          if (!btn) {
            btn = node.addComponent(Button);
          }
          btn.node.off(Button.EventType.CLICK);
          btn.node.on(Button.EventType.CLICK, function () {
            _this2.onTabItemClick(index);
          }, this);
        }

        /**
         * Tab项点击回调
         */;
        _proto.onTabItemClick = function onTabItemClick(index) {
          if (index === this._selectedTabIndex) {
            return;
          }
          this.selectTab(index);
        }

        /**
         * 选中指定Tab
         */;
        _proto.selectTab = function selectTab(index) {
          var tabArr = App.loginMgr.getSerListTabArr();
          if (!tabArr || index < 0 || index >= tabArr.length) {
            return;
          }
          this._selectedTabIndex = index;
          this.layoutObj.scrollTab.updateAllItems();
          var tabData = tabArr[index];
          this.layoutObj.scrollServer.array = tabData.datas;
        }

        /**
         * 服务器项渲染回调
         */;
        _proto.onServerItemRender = function onServerItemRender(node, index, data) {
          var item = node.getComponent(Item_server);
          if (item) {
            item.index = index;
            item.onItemRender(data);
          }
        }

        /**
         * 关闭按钮点击
         */;
        _proto.onBtnClose = function onBtnClose() {
          this.onClose();
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
          _UIBase.prototype.onDispose.call(this);
        };
        return UI_ServerListView;
      }(UIBase));
      UI_ServerListView.custom = {
        prefab: "prefab/view/UI_ServerListView",
        binding: (_binding = {}, _binding["btnClose"] = {
          method: "onBtnClose"
        }, _binding["imgBack"] = {
          method: "onClose"
        }, _binding)
      };
      ModuleContext.attachModule(UI_ServerListView, ModuleDef.GAME_LOGIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_SettingView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './App.ts', './MonitorType.ts', './ModuleContext.ts', './ModuleDef.ts', './UIMgr.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, ProgressBar, UIBase, App, MonitorType, ModuleContext, ModuleDef, UIMgr;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "2b1e2Q1jlVKk7IX88U91Ekk", "UI_SettingView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_SettingView = exports('UI_SettingView', (_dec = ccclass("UI_SettingView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_SettingView, _UIBase);
        // 技能特效开关

        function UI_SettingView() {
          var _this;
          _this = _UIBase.call(this, UI_SettingView.custom) || this;
          _this.layoutObj = null;
          // 设置键名常量
          _this.KEY_MUSIC_ENABLED = "bMusic";
          // 音乐开关
          _this.KEY_MUSIC_VOLUME = "nMusic";
          // 音乐音量
          _this.KEY_SOUND_ENABLED = "bVoice";
          // 音效开关
          _this.KEY_SOUND_VOLUME = "nVoice";
          // 音效音量
          _this.KEY_DAMAGE_ENABLED = "bDamage";
          // 伤害飘字开关
          _this.KEY_SKILL_EFFECT_ENABLED = "bSkillEffect";
          return _this;
        }
        var _proto = UI_SettingView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this.removeEventListeners();
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this.init();
        }

        /**
         * 初始化UI
         */;
        _proto.init = function init() {
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.loadSettings();
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListeners = function addEventListeners() {
          // 音乐开关
          if (this.layoutObj.toggleMusic) {
            this.layoutObj.toggleMusic.node.on(Toggle.EventType.TOGGLE, this.onMusicToggleChanged, this);
          }

          // 音乐音量滑动条
          if (this.layoutObj.sliderMusic) {
            this.layoutObj.sliderMusic.node.on("slide", this.onMusicSliderChanged, this);
          }

          // 音效开关
          if (this.layoutObj.toggleSound) {
            this.layoutObj.toggleSound.node.on(Toggle.EventType.TOGGLE, this.onSoundToggleChanged, this);
          }

          // 音效音量滑动条
          if (this.layoutObj.sliderSound) {
            this.layoutObj.sliderSound.node.on("slide", this.onSoundSliderChanged, this);
          }

          // 伤害飘字开关
          if (this.layoutObj.toggleDamage) {
            this.layoutObj.toggleDamage.node.on(Toggle.EventType.TOGGLE, this.onDamageToggleChanged, this);
          }

          // 技能特效开关
          if (this.layoutObj.toggleSkillEffect) {
            this.layoutObj.toggleSkillEffect.node.on(Toggle.EventType.TOGGLE, this.onSkillEffectToggleChanged, this);
          }
        }

        /**
         * 移除事件监听
         */;
        _proto.removeEventListeners = function removeEventListeners() {
          if (this.layoutObj.toggleMusic) {
            this.layoutObj.toggleMusic.node.off(Toggle.EventType.TOGGLE, this.onMusicToggleChanged, this);
          }
          if (this.layoutObj.sliderMusic) {
            this.layoutObj.sliderMusic.node.off("slide", this.onMusicSliderChanged, this);
          }
          if (this.layoutObj.toggleSound) {
            this.layoutObj.toggleSound.node.off(Toggle.EventType.TOGGLE, this.onSoundToggleChanged, this);
          }
          if (this.layoutObj.sliderSound) {
            this.layoutObj.sliderSound.node.off("slide", this.onSoundSliderChanged, this);
          }
          if (this.layoutObj.toggleDamage) {
            this.layoutObj.toggleDamage.node.off(Toggle.EventType.TOGGLE, this.onDamageToggleChanged, this);
          }
          if (this.layoutObj.toggleSkillEffect) {
            this.layoutObj.toggleSkillEffect.node.off(Toggle.EventType.TOGGLE, this.onSkillEffectToggleChanged, this);
          }
        }

        /**
         * 加载设置
         */;
        _proto.loadSettings = function loadSettings() {
          var settings = App.mixMgr.getGameSet();

          // 音乐设置
          var musicEnabled = settings[this.KEY_MUSIC_ENABLED] !== false;
          var musicVolume = settings[this.KEY_MUSIC_VOLUME] || 100;
          if (this.layoutObj.toggleMusic) {
            this.layoutObj.toggleMusic.isChecked = musicEnabled;
          }
          if (this.layoutObj.sliderMusic) {
            this.layoutObj.sliderMusic.progress = musicVolume / 100;
            var progress = this.layoutObj.sliderMusic.node.getChildByName("ProgressBar");
            if (progress) {
              progress.getComponent(ProgressBar).progress = musicVolume / 100;
            }
          }

          // 音效设置
          var soundEnabled = settings[this.KEY_SOUND_ENABLED] !== false;
          var soundVolume = settings[this.KEY_SOUND_VOLUME] || 100;
          if (this.layoutObj.toggleSound) {
            this.layoutObj.toggleSound.isChecked = soundEnabled;
          }
          if (this.layoutObj.sliderSound) {
            this.layoutObj.sliderSound.progress = soundVolume / 100;
            var _progress = this.layoutObj.sliderSound.node.getChildByName("ProgressBar");
            if (_progress) {
              _progress.getComponent(ProgressBar).progress = soundVolume / 100;
            }
          }

          // 伤害飘字设置
          var damageEnabled = settings[this.KEY_DAMAGE_ENABLED] !== false;
          if (this.layoutObj.toggleDamage) {
            this.layoutObj.toggleDamage.isChecked = damageEnabled;
          }

          // 技能特效设置（默认开启）
          var skillEffectEnabled = settings[this.KEY_SKILL_EFFECT_ENABLED] !== false;
          if (this.layoutObj.toggleSkillEffect) {
            this.layoutObj.toggleSkillEffect.isChecked = skillEffectEnabled;
          }
        }

        /**
         * 音乐开关切换
         */;
        _proto.onMusicToggleChanged = function onMusicToggleChanged(toggle) {
          var enabled = toggle.isChecked;
          App.mixMgr.setGameSet(this.KEY_MUSIC_ENABLED, enabled);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, this.KEY_MUSIC_ENABLED, enabled);
        }

        /**
         * 音乐音量滑动条改变
         */;
        _proto.onMusicSliderChanged = function onMusicSliderChanged(slider) {
          var volume = Math.floor(slider.progress * 100);
          var progress = slider.node.getChildByName("ProgressBar");
          if (progress) {
            progress.getComponent(ProgressBar).progress = volume / 100;
          }
          App.mixMgr.setGameSet(this.KEY_MUSIC_VOLUME, volume);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, this.KEY_MUSIC_VOLUME, volume);
        }

        /**
         * 音效开关切换
         */;
        _proto.onSoundToggleChanged = function onSoundToggleChanged(toggle) {
          var enabled = toggle.isChecked;
          App.mixMgr.setGameSet(this.KEY_SOUND_ENABLED, enabled);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, this.KEY_SOUND_ENABLED, enabled);
        }

        /**
         * 音效音量滑动条改变
         */;
        _proto.onSoundSliderChanged = function onSoundSliderChanged(slider) {
          var volume = Math.floor(slider.progress * 100);
          var progress = slider.node.getChildByName("ProgressBar");
          if (progress) {
            progress.getComponent(ProgressBar).progress = volume / 100;
          }
          App.mixMgr.setGameSet(this.KEY_SOUND_VOLUME, volume);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, this.KEY_SOUND_VOLUME, volume);
        }

        /**
         * 伤害飘字开关切换
         */;
        _proto.onDamageToggleChanged = function onDamageToggleChanged(toggle) {
          var enabled = toggle.isChecked;
          App.mixMgr.setGameSet(this.KEY_DAMAGE_ENABLED, enabled);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, this.KEY_DAMAGE_ENABLED, enabled);
        }

        /**
         * 技能特效开关切换
         */;
        _proto.onSkillEffectToggleChanged = function onSkillEffectToggleChanged(toggle) {
          var enabled = toggle.isChecked;
          App.mixMgr.setGameSet(this.KEY_SKILL_EFFECT_ENABLED, enabled);
          App.monitorMgr.dispatchEvent(MonitorType.game_set, this.KEY_SKILL_EFFECT_ENABLED, enabled);
        }

        /**
         * 切换账号按钮点击
         */;
        _proto.onBtnSwitchAccountClick = function onBtnSwitchAccountClick() {
          UIMgr.inst.closeAllPanel();
          App.goToLoginMain();
        };
        return UI_SettingView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_SettingView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnChange"] = {
          method: "onBtnSwitchAccountClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_SettingView, ModuleDef.GAME_ROLE);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_SheBeiUpgradeView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './PlaceGameMgr.ts', './PlaceGameEnum.ts', './PlaceConfigMgr.ts', './SheBei.ts', './MonitorType.ts', './UIUtil.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Label, instantiate, UIBase, ModuleContext, ModuleDef, App, PlaceGameMgr, BuildingType, PlaceConfigMgr, SheBei, MonitorType, UIUtil;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      instantiate = module.instantiate;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      SheBei = module.SheBei;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "cfd44CKhCRE+7TB39cp45nK", "UI_SheBeiUpgradeView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var UI_SheBeiUpgradeView = exports('UI_SheBeiUpgradeView', (_dec = ccclass("UI_SheBeiUpgradeView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_SheBeiUpgradeView, _UIBase);
        function UI_SheBeiUpgradeView() {
          var _this;
          _this = _UIBase.call(this, UI_SheBeiUpgradeView.custom) || this;
          _this.layoutObj = null;
          _this.curSelectShebei = 0;
          _this.dataModel = null;
          return _this;
        }
        var _proto = UI_SheBeiUpgradeView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResShebeiUpgrade, this.resShebeiUpgrade, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          var comp = PlaceGameMgr.inst.getBuildingComp(data.buildType, data.buildIndex);
          if (comp) {
            this.dataModel = comp.dataModel;
          }
          this._initShebeiList();
          this.updateView();
        };
        _proto.updateView = function updateView() {
          this.updateBuildInfo();
          if (this.dataModel.buildType === BuildingType.MoFang || this.dataModel.buildType === BuildingType.CaiKuangChang || this.dataModel.buildType === BuildingType.FaMuChang) {
            this.layoutObj.yxzzNode.active = true;
            // this.updateYxzz();
          } else {
            this.layoutObj.yxzzNode.active = false;
          }
          var allSbMaxFlag = PlaceGameMgr.inst.checkAllShebeiMaxLevel(this.dataModel.buildingUid, this.dataModel.buildType);
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this.dataModel.buildType);
          if (this.dataModel.level >= maxLevel) {
            UIUtil.setButtonEnable(this.layoutObj.btnJumpUp, false, true);
            var lab = this.layoutObj.btnJumpUp.node.getChildByName("Label");
            if (lab) {
              lab.getComponent(Label).string = "已满级";
            }
          } else {
            UIUtil.setButtonEnable(this.layoutObj.btnJumpUp, allSbMaxFlag, true);
          }
          this.updateMessage();
        }

        /**
         * 初始化设备列表
         */;
        _proto._initShebeiList = function _initShebeiList() {
          var _serverData$shebeis,
            _this2 = this;
          this.layoutObj.shebeiNode.removeAllChildren();
          if (!this.layoutObj.shebeiItem) {
            return;
          }
          var sbIds = PlaceConfigMgr.inst.getBuildingSheBeiConfig(this.dataModel.buildType);
          var serverData = this.dataModel.getServerData();
          var serverSbMap = new Map();
          if (serverData != null && (_serverData$shebeis = serverData.shebeis) != null && _serverData$shebeis.length) {
            serverData.shebeis.forEach(function (sb) {
              return serverSbMap.set(sb.shebei_id, sb.shebei_level);
            });
          }
          sbIds.forEach(function (sbId) {
            var node = instantiate(_this2.layoutObj.shebeiItem);
            if (!node) return;
            var comp = node.getComponent(SheBei);
            if (comp) {
              var _serverSbMap$get;
              comp.show(sbId, (_serverSbMap$get = serverSbMap.get(sbId)) != null ? _serverSbMap$get : 0, _this2.deforeSelectFunc.bind(_this2));
              comp.setSelect(false);
            }
            _this2.layoutObj.shebeiNode.addChild(node);
          });
        };
        _proto.updateBuildInfo = function updateBuildInfo() {
          if (this.layoutObj.buildName1) {
            this.layoutObj.buildName1.string = PlaceConfigMgr.inst.getBuildingName(this.dataModel.buildType);
          }
          if (this.layoutObj.txtCurLevel) {
            this.layoutObj.txtCurLevel.string = this.dataModel.level + "\u7EA7";
          }
        };
        _proto.updateMessage = function updateMessage() {
          var curShebei = this.layoutObj.shebeiNode.children[this.curSelectShebei];
          if (curShebei) {
            var comp = curShebei.getComponent(SheBei);
            if (comp) {
              comp.setSelect(true);
            }
            this._updateSheBeiDetail();
            this._updateSBUpgradeBtn();
            if (this.layoutObj.curPersonNum) {
              if (comp.getLevel() <= 0) {
                this.layoutObj.curPersonNum.string = "未激活";
              } else {
                var cfg = PlaceConfigMgr.inst.getSheBeiLevelConfigByType(this.dataModel.buildType, comp.getSBId(), comp.getLevel());
                this.layoutObj.curPersonNum.string = cfg.desc;
              }
            }
            if (this.layoutObj.nextPersonNum) {
              var maxLevel = PlaceConfigMgr.inst.getShebeiMaxLevel(this.dataModel.buildType, comp.getSBId());
              var nextLv = comp.getLevel() + 1;
              if (nextLv <= maxLevel) {
                var _cfg = PlaceConfigMgr.inst.getSheBeiLevelConfigByType(this.dataModel.buildType, comp.getSBId(), nextLv);
                this.layoutObj.nextPersonNum.string = _cfg.desc;
              } else {
                this.layoutObj.nextPersonNum.string = "已满级";
              }
            }
          }
        }

        /**
         * 更新英雄驻扎的节点
         */
        // updateYxzz() {
        //     let itemNode = Utils.findNode("heroItem", this.layoutObj.yxzzNode);
        //     if (itemNode) {
        //         let heroComp = itemNode.getComponent(HeroItem);
        //         if (heroComp) {
        //             heroComp.show(this.dataModel.serverData.entry_hero);
        //         }
        //     }
        // }
        ;

        _proto.deforeSelectFunc = function deforeSelectFunc(sid) {
          var children = this.layoutObj.shebeiNode.children;
          for (var i = 0; i < children.length; i++) {
            var child = children[i];
            var comp = child.getComponent(SheBei);
            if (comp) {
              if (comp.getSBId() === sid) {
                this.curSelectShebei = i;
                comp.setSelect(true);
              } else {
                comp.setSelect(false);
              }
            }
          }
          this.updateMessage();
        };
        _proto._updateSBUpgradeBtn = function _updateSBUpgradeBtn() {
          if (!this.layoutObj.btnSheBeiUp) {
            return;
          }
          var shebei = this.layoutObj.shebeiNode.children[this.curSelectShebei];
          if (shebei) {
            var _serverData$shebeis2;
            var shebeimax = PlaceConfigMgr.inst.getUpgradeSheBeimax(this.dataModel.buildType, this.dataModel.level);
            var serverData = this.dataModel.getServerData();
            if (serverData != null && (_serverData$shebeis2 = serverData.shebeis) != null && _serverData$shebeis2.length) {
              var sb = serverData.shebeis.find(function (sb) {
                return sb.shebei_id === shebei.getComponent(SheBei).getSBId();
              });
              if (sb) {
                if (sb.shebei_level >= shebeimax) {
                  UIUtil.setButtonEnable(this.layoutObj.btnSheBeiUp, false, true);
                  this.layoutObj.btnSheBeiUp.node.getChildByName("maxLab").active = true;
                  this.layoutObj.btnSheBeiUp.node.getChildByName("noMax").active = false;
                  this.layoutObj.shebeiCostItem.node.active = false;
                } else {
                  UIUtil.setButtonEnable(this.layoutObj.btnSheBeiUp, true, true);
                  this.layoutObj.btnSheBeiUp.node.getChildByName("maxLab").active = false;
                  this.layoutObj.btnSheBeiUp.node.getChildByName("noMax").active = true;
                  this.layoutObj.shebeiCostItem.node.active = true;
                  if (this.layoutObj.shebeiCostItem) {
                    var costItem = PlaceConfigMgr.inst.getShebeiUpgradeCost(this.dataModel.buildType, sb.shebei_id, sb.shebei_level + 1);
                    this.layoutObj.shebeiCostItem.setData(costItem[0]);
                  }
                }
              } else {
                UIUtil.setButtonEnable(this.layoutObj.btnSheBeiUp, true, true);
                this.layoutObj.btnSheBeiUp.node.getChildByName("maxLab").active = false;
                this.layoutObj.btnSheBeiUp.node.getChildByName("noMax").active = true;
                this.layoutObj.shebeiCostItem.node.active = true;
                if (this.layoutObj.shebeiCostItem) {
                  var _costItem = PlaceConfigMgr.inst.getShebeiUpgradeCost(this.dataModel.buildType, shebei.getComponent(SheBei).getSBId(), shebei.getComponent(SheBei).getLevel() + 1);
                  this.layoutObj.shebeiCostItem.setData(_costItem[0]);
                }
              }
            }
          }
        }

        /**
         * 更新设备详情
         */;
        _proto._updateSheBeiDetail = function _updateSheBeiDetail() {
          var shebei = this.layoutObj.shebeiNode.children[this.curSelectShebei];
          if (shebei) {
            var selectComp = shebei.getComponent(SheBei);
            var cfg = PlaceConfigMgr.inst.getSheBeiConfig(selectComp.getSBId());
            if (this.layoutObj.dtSheBei) {
              this.layoutObj.dtSheBei.show(selectComp.getSBId(), selectComp.getLevel());
            }
            if (this.layoutObj.detailName) {
              this.layoutObj.detailName.string = (cfg == null ? void 0 : cfg.name) || "";
            }
            if (this.layoutObj.detailTxt) {
              this.layoutObj.detailTxt.string = (cfg == null ? void 0 : cfg.desc) || "";
            }
          }
        };
        _proto.resShebeiUpgrade = function resShebeiUpgrade(msg) {
          var _serverData$shebeis3;
          if (msg.code !== 200) {
            return;
          }
          var serverData = this.dataModel.getServerData();
          if (serverData != null && (_serverData$shebeis3 = serverData.shebeis) != null && _serverData$shebeis3.length) {
            var children = this.layoutObj.shebeiNode.children;
            children.forEach(function (child) {
              var comp = child.getComponent(SheBei);
              if (comp) {
                var sbId = comp.getSBId();
                var sb = serverData.shebeis.find(function (s) {
                  return s.shebei_id === sbId;
                });
                if (sb) {
                  comp.setLevel(sb.shebei_level);
                }
              }
            });
          }
          this.updateView();
        }

        /**
         * 处理设备升级按钮点击事件
         */;
        _proto.onBtnSheBeiUpClick = function onBtnSheBeiUpClick() {
          var shebei = this.layoutObj.shebeiNode.children[this.curSelectShebei];
          if (shebei) {
            var sbComp = shebei.getComponent(SheBei);
            if (!sbComp) return;
            var shebeimax = PlaceConfigMgr.inst.getUpgradeSheBeimax(this.dataModel.buildType, this.dataModel.level);
            if (sbComp.getLevel() >= shebeimax) {
              return;
            }
            var costList = PlaceConfigMgr.inst.getShebeiUpgradeCost(this.dataModel.buildType, sbComp.getSBId(), sbComp.getLevel() + 1) || [];
            if (App.bagMgr.checkPropEnoughList(costList, false, true)) {
              PlaceGameMgr.inst.reqShebeiUpgrade(this.dataModel.buildingUid, this.dataModel.buildType, sbComp.getSBId());
            }
          }
        };
        _proto.onJumpUpClick = function onJumpUpClick() {
          PlaceGameMgr.inst.showBuildUpgradeView(this.dataModel.buildingUid, this.dataModel.buildType, this.dataModel.buildIndex);
          this.onClose();
        };
        return UI_SheBeiUpgradeView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_SheBeiUpgradeView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnSheBeiUp"] = {
          method: "onBtnSheBeiUpClick"
        }, _binding["btnJumpUp"] = {
          method: "onJumpUpClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_SheBeiUpgradeView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_SoldierCultivateView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './TeamSoldierItem.ts', './App.ts', './TeamMgr.ts', './MonitorType.ts', './ModuleDef.ts', './StageDescItem.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './ModuleContext.ts', './UIUtil.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, Color, UIBase, TeamSoldierItem, App, TeamMgr, SoldierType, SoldierName, MonitorType, ModuleDef, StageDescItem, PlaceGameMgr, PlaceConfigMgr, ModuleContext, UIUtil;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      Color = module.Color;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      TeamSoldierItem = module.TeamSoldierItem;
    }, function (module) {
      App = module.App;
    }, function (module) {
      TeamMgr = module.TeamMgr;
      SoldierType = module.SoldierType;
      SoldierName = module.SoldierName;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      StageDescItem = module.StageDescItem;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "d9b0dxp/S5FQameH7ZiPumj", "UI_SoldierCultivateView", undefined);
      var ccclass = _decorator.ccclass;
      var PanelType = /*#__PURE__*/function (PanelType) {
        PanelType[PanelType["Cultivate"] = 0] = "Cultivate";
        PanelType[PanelType["Stage"] = 1] = "Stage";
        PanelType[PanelType["Technology"] = 2] = "Technology";
        return PanelType;
      }(PanelType || {});
      var UI_SoldierCultivateView = exports('UI_SoldierCultivateView', (_dec = ccclass("UI_SoldierCultivateView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_SoldierCultivateView, _UIBase);
        function UI_SoldierCultivateView() {
          var _this;
          _this = _UIBase.call(this, UI_SoldierCultivateView.custom) || this;
          _this.layoutObj = null;
          /** 按钮选项索引 */
          _this._btnIdx = 0;
          _this._curSoldierItem = null;
          _this._curSoldierData = null;
          return _this;
        }
        var _proto = UI_SoldierCultivateView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this.layoutObj.action.onDestroy();
          App.monitorMgr.offTarget(this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this._btnIdx = (data == null ? void 0 : data.index) || 0;
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initSoldierList();
          this.initToggleGroup();
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeSoldier, this.onResUpgradeSoldier, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpStageSoldier, this.onResUpStageSoldier, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResNewSoldier, this.onResNewSoldier, this);
        }
        /*
         * 初始化 ToggleGroup
         */;
        _proto.initToggleGroup = function initToggleGroup() {
          var _this2 = this;
          if (!this.layoutObj || !this.layoutObj.soldierScroll || !this.layoutObj.soldierScroll.content) {
            console.error("soldierScroll 或 content 未初始化");
            return;
          }
          var toggles = this.layoutObj.tabBtn;

          // 为每个 Toggle 添加事件监听
          toggles.forEach(function (toggle, index) {
            toggle.node.on(Toggle.EventType.TOGGLE, function () {
              if (toggle.isChecked) {
                _this2.onTypeChanged(index);
              }
            });
          });

          // 默认选中第一个
          if (toggles.length > 0) {
            toggles[0].isChecked = true;
            this.onTypeChanged(0);
          }

          // 默认选中第一个士兵
          setTimeout(function () {
            _this2.selectFirstSoldier();
          }, 100);
        };
        _proto.initSoldierList = function initSoldierList() {
          this.layoutObj.soldierScroll.content.removeAllChildren();
          this.layoutObj.soldierScroll.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.soldierScroll.onItemClick = this.onItemClick.bind(this);
          var soldierList = TeamMgr.inst.getSoldierJobList(SoldierType.ALL);
          this.layoutObj.soldierScroll.array = soldierList;
          this.layoutObj.descScroll.content.removeAllChildren();
          this.layoutObj.descScroll.onItemRender = this.onDescItemRender.bind(this);
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.soldierScroll.array[index];
          var cellComp = item.getComponent(TeamSoldierItem);
          cellComp.show(data);
        };
        _proto.onItemClick = function onItemClick(item, _index) {
          if (this._curSoldierItem) {
            this._curSoldierItem.setSel(false);
          }
          var cellComp = item.getComponent(TeamSoldierItem);
          this._curSoldierItem = cellComp;
          this._curSoldierItem.setSel(true);
          this._curSoldierData = cellComp._data;
          this.updateSoldierInfo(cellComp._data);
          cellComp.activeteSoloder(cellComp._data.soldier_id);
        };
        _proto.selectFirstSoldier = function selectFirstSoldier() {
          if (!this.layoutObj.soldierScroll || !this.layoutObj.soldierScroll.content) return;
          var children = this.layoutObj.soldierScroll.content.children;
          if (children.length > 0) {
            // 获取第一个子节点并调用 onItemClick
            this.onItemClick(children[0], 0);
          }
        }
        /**
         * 选择功能页面
         * @param index
         */;
        _proto.onTypeChanged = function onTypeChanged(index) {
          switch (index) {
            case PanelType.Cultivate:
              this.cultivatePanel();
              break;
            case PanelType.Stage:
              this.stagePanel();
              break;
            case PanelType.Technology:
              this.technologyPanel();
              break;
          }
          this._btnIdx = index;
          this.updateSoldierInfo(this._curSoldierData);
        }
        /**
         * 士兵培养
         */;
        _proto.cultivatePanel = function cultivatePanel() {
          this.layoutObj.stageBtn.node.active = false;
          this.layoutObj.lvBtn.node.active = true;
          this.layoutObj.costItem2.node.active = true;
          this.layoutObj.stageNode.active = false;
          this.layoutObj.cultivateNode.active = true;
        }
        /**
         * 士兵升阶
         */;
        _proto.stagePanel = function stagePanel() {
          this.layoutObj.stageBtn.node.active = true;
          this.layoutObj.lvBtn.node.active = false;
          this.layoutObj.costItem2.node.active = false;
          this.layoutObj.stageNode.active = true;
          this.layoutObj.cultivateNode.active = false;
          this.layoutObj.lvMaxLab.node.active = false;
        }
        /**
         * 士兵科技
         */;
        _proto.technologyPanel = function technologyPanel() {}
        /**
         * 刷新士兵数据
         */;
        _proto.updateSoldierInfo = function updateSoldierInfo(data) {
          if (!data) return;
          var isActivated = data.level && data.level > 0;
          if (this.layoutObj.lvLab) {
            this.layoutObj.lvLab.string = data.level + "\u7EA7";
          }
          if (this.layoutObj.stageLab) {
            this.layoutObj.stageLab.string = data.stage + "\u9636";
          }
          var soldier_cfg = TeamMgr.inst.getSoldierIdCfg(data.soldier_id);
          if (!soldier_cfg) return;
          this.layoutObj.action.onDestroy();
          this.layoutObj.action.playWithResource(ModuleDef.SOLDIER, soldier_cfg.res, "Idle");
          if (this.layoutObj.nameLab) {
            this.layoutObj.nameLab.string = "" + soldier_cfg.name;
          }
          if (this.layoutObj.hitDescLab) {
            // 将 HTML 换行符 <br> 转换为 Label 的换行符 \n
            var descText = "<b>" + soldier_cfg.kezhi_desc + "</b>";
            descText = descText.replace(/<br\s*\/?>/gi, "\n");
            this.layoutObj.hitDescLab.string = descText;
          }
          if (this.layoutObj.iconSp) {
            App.resMgr.loadImage(this.layoutObj.iconSp, ModuleDef.GAME_ICON, "/head_icon/" + soldier_cfg.icon + "_head");
          }
          if (this.layoutObj.jobSp) {
            App.resMgr.loadImage(this.layoutObj.jobSp, ModuleDef.BASE_COMMON, "/texture/new_common/" + SoldierName[soldier_cfg.job].icon);
          }
          if (this._btnIdx === PanelType.Cultivate) {
            this.layoutObj.lvBtn.node.active = isActivated;
            this.layoutObj.costItem1.node.active = isActivated;
            this.layoutObj.costItem2.node.active = isActivated;
            if (this.layoutObj.descLab) {
              this.layoutObj.descLab.string = soldier_cfg.desc;
            }
            if (isActivated) {
              // 检查建筑等级限制
              var canUpgrade = this.checkBuildingRequirement(data.soldier_id, data.level + 1);

              // 获取升级消耗
              if (canUpgrade) {
                var costs = TeamMgr.inst.getSoldierUpLevelCost(this._curSoldierData.soldier_id, this._curSoldierData.level);
                if (this.layoutObj.costItem1 && costs[0]) {
                  this.layoutObj.costItem1.setDataNeedCost("", costs[0]);
                }
                if (this.layoutObj.costItem2 && costs[1]) {
                  this.layoutObj.costItem2.setDataNeedCost("", costs[1]);
                }
              }
            }
            this.updateAttrList(this._curSoldierData);
          } else if (this._btnIdx === PanelType.Stage) {
            this.layoutObj.stageBtn.node.active = isActivated;
            this.layoutObj.costItem1.node.active = isActivated;
            if (isActivated) {
              // 获取升阶消耗
              var _costs = TeamMgr.inst.getSoldierUpStageCost(this._curSoldierData.soldier_id, this._curSoldierData.stage);
              if (this.layoutObj.costItem1 && _costs) {
                this.layoutObj.costItem1.setDataNeedCost("", _costs);
              }
            }

            //升阶等级限制判断
            var stageCfg = TeamMgr.inst.getSoldierStageCfg(data.soldier_id, data.stage + 1);
            //阶级已达上限
            if (!stageCfg) {
              this.layoutObj.lvMaxLab.node.active = true;
              this.layoutObj.lvMaxLab.string = "阶级已达最高级";
              this.layoutObj.stageBtn.node.active = false;
              this.layoutObj.costItem1.node.active = false;
            } else {
              if (data.level >= stageCfg.lvlimit) {
                this.layoutObj.lvMaxLab.node.active = false;
                this.layoutObj.stageBtn.node.active = true;
                this.layoutObj.costItem1.node.active = true;
              } else {
                this.layoutObj.lvMaxLab.node.active = true;
                this.layoutObj.lvMaxLab.string = "\u58EB\u5175\u7B49\u7EA7\u9700\u8981\u8FBE\u5230" + (stageCfg.lvlimit || 1) + "\u7EA7";
                this.layoutObj.stageBtn.node.active = false;
                this.layoutObj.costItem1.node.active = false;
              }
            }
            this.updateStageResult(this._curSoldierData);
          }
        }
        /**
         * 更新属性列表
         */;
        _proto.updateAttrList = function updateAttrList(data) {
          if (!data || !this.layoutObj.typeList) return;

          // 获取英雄属性信息
          var attrInfoList = TeamMgr.inst.getAttrInfo(data.soldier_id, data.level, 2);

          // 遍历属性列表并更新每个 AttrItem
          for (var i = 0; i < this.layoutObj.typeList.length && i < attrInfoList.length; i++) {
            this.layoutObj.typeList[i].show(attrInfoList[i]);
          }
        }
        /**
         * 更新阶级效果
         */;
        _proto.updateStageResult = function updateStageResult(data) {
          var stageDescList = TeamMgr.inst.getStageResultInfos(data.soldier_id, data.stage);
          this.layoutObj.descScroll.array = stageDescList;
        };
        _proto.onDescItemRender = function onDescItemRender(item, index) {
          var data = this.layoutObj.descScroll.array[index];
          var cellComp = item.getComponent(StageDescItem);
          cellComp.show(data);
        }
        /** 增加新士兵推送 (CMD_ResNewSoldier - 60) */;
        _proto.onResNewSoldier = function onResNewSoldier(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u58EB\u5175\u65B0\u589E - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          var soldierList = TeamMgr.inst.getSoldierJobList(SoldierType.ALL);
          this.layoutObj.soldierScroll.array = soldierList;
          // 更新当前选中英雄的数据
          if (this._curSoldierData && this._curSoldierData.soldier_id === msg.soldier.soldier_id) {
            this._curSoldierData = msg.soldier;

            // 更新当前选中的英雄item显示
            if (this._curSoldierItem) {
              this._curSoldierItem.show(this._curSoldierData);
            }

            // 更新界面信息
            this.updateSoldierInfo(this._curSoldierData);
            if (this._btnIdx === PanelType.Stage) {
              this.stagePanel();
            }
          }
        }

        /**
         * 士兵升级返回
         */;
        _proto.onResUpgradeSoldier = function onResUpgradeSoldier(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u58EB\u5175\u5347\u7EA7\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 更新当前选中士兵的数据
          if (this._curSoldierData && this._curSoldierData.soldier_id === msg.soldier_id) {
            this._curSoldierData.level = msg.level;

            // 更新当前选中的士兵item显示
            if (this._curSoldierItem) {
              this._curSoldierItem.show(this._curSoldierData);
            }

            // 更新界面信息
            this.updateSoldierInfo(this._curSoldierData);
          }
        }

        /**
         * 士兵进阶返回
         */;
        _proto.onResUpStageSoldier = function onResUpStageSoldier(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u58EB\u5175\u7A81\u7834\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 更新当前选中士兵的数据
          if (this._curSoldierData && this._curSoldierData.soldier_id === msg.soldier_id) {
            this._curSoldierData.stage = msg.stage;

            // 更新当前选中的士兵item显示
            if (this._curSoldierItem) {
              this._curSoldierItem.show(this._curSoldierData);
            }

            // 更新界面信息
            this.updateSoldierInfo(this._curSoldierData);
          }
        }
        /**
         * 士兵升级
         */;
        _proto.onUpLevel = function onUpLevel() {
          if (!this._curSoldierData) {
            UIUtil.showTip("请先选择士兵");
            return;
          }

          // 检查消耗是否足够
          if (!this.layoutObj.costItem1.checkCostEnough(true) || !this.layoutObj.costItem2.checkCostEnough(true)) {
            UIUtil.showTip("道具不足，无法升级");
            return;
          }

          // 发送升级协议
          TeamMgr.inst.reqUpgradeSoldier(this._curSoldierData.soldier_id);
        }

        /**
         * 士兵突破
         */;
        _proto.onUpStage = function onUpStage() {
          if (!this._curSoldierData) {
            UIUtil.showTip("请先选择士兵");
            return;
          }

          // 检查消耗是否足够
          if (!this.layoutObj.costItem1.checkCostEnough(true)) {
            UIUtil.showTip("道具不足，无法突破");
            return;
          }

          // 发送突破协议
          TeamMgr.inst.reqUpStageSoldier(this._curSoldierData.soldier_id);
        }

        /**
         * 检查建筑等级要求
         * @param soldier_id 士兵id
         * @param targetLevel 目标等级
         * @returns 是否满足建筑等级要求
         */;
        _proto.checkBuildingRequirement = function checkBuildingRequirement(soldier_id, targetLevel) {
          // 获取目标等级配置
          var levelCfg = TeamMgr.inst.getSoldierLevelCfg(soldier_id, targetLevel);
          if (!levelCfg) {
            // 没有配置，可能已满级
            if (this.layoutObj.lvBtn) {
              this.layoutObj.lvBtn.node.active = false;
            }
            if (this.layoutObj.lvMaxLab) {
              this.layoutObj.lvMaxLab.node.active = true;
              this.layoutObj.lvMaxLab.string = "已达到最高等级";
              this.layoutObj.lvMaxLab.color = new Color().fromHEX("#FF3E3E");
            }
            if (this.layoutObj.costItem1) {
              this.layoutObj.costItem1.node.active = false;
            }
            if (this.layoutObj.costItem2) {
              this.layoutObj.costItem2.node.active = false;
            }
            return false;
          }

          // 检查建筑等级限制
          if (levelCfg.jianzhu && levelCfg.jianzhu.length > 0) {
            for (var i = 0; i < levelCfg.jianzhu.length; i++) {
              var requirement = levelCfg.jianzhu[i];
              var buildingType = requirement[0]; // 建筑类型
              var requiredLevel = requirement[1]; // 需要的等级

              // 获取玩家当前该建筑的等级
              var currentLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(buildingType);
              if (currentLevel < requiredLevel) {
                // 建筑等级不足，隐藏升级按钮，显示提示
                if (this.layoutObj.lvBtn) {
                  this.layoutObj.lvBtn.node.active = false;
                }
                if (this.layoutObj.lvMaxLab) {
                  this.layoutObj.lvMaxLab.node.active = true;
                  // 获取建筑名称
                  var buildingName = PlaceConfigMgr.inst.getBuildingName(buildingType);
                  this.layoutObj.lvMaxLab.string = "\u5347\u7EA7\u6761\u4EF6\uFF1A" + buildingName + "\u8FBE\u5230" + requiredLevel + "\u7EA7";
                  this.layoutObj.lvMaxLab.color = new Color().fromHEX("#FF3E3E");
                }
                if (this.layoutObj.costItem1) {
                  this.layoutObj.costItem1.node.active = false;
                }
                if (this.layoutObj.costItem2) {
                  this.layoutObj.costItem2.node.active = false;
                }
                return false;
              }
            }
          }

          // 满足所有条件，显示升级按钮，隐藏提示
          if (this.layoutObj.lvBtn) {
            this.layoutObj.lvBtn.node.active = true;
          }
          if (this.layoutObj.lvMaxLab) {
            this.layoutObj.lvMaxLab.node.active = false;
          }
          if (this.layoutObj.costItem1) {
            this.layoutObj.costItem1.node.active = true;
          }
          if (this.layoutObj.costItem2) {
            this.layoutObj.costItem2.node.active = true;
          }
          return true;
        };
        return UI_SoldierCultivateView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_SoldierCultivateView",
        binding: (_binding = {}, _binding["btnBack"] = {
          method: "onClose"
        }, _binding["lvBtn"] = {
          method: "onUpLevel"
        }, _binding["stageBtn"] = {
          method: "onUpStage"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_SoldierCultivateView, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_SpeedUpView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './App.ts', './PlaceGameMgr.ts', './MonitorType.ts', './PlaceGameEnum.ts', './Utils.ts', './PlaceConfigMgr.ts', './EventType.ts', './ModuleContext.ts', './ModuleDef.ts', './UIUtil.ts', './Item_prop.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, Layout, ProgressBar, UIBase, App, PlaceGameMgr, MonitorType, BuildingType, Utils, PlaceConfigMgr, EventType, ModuleContext, ModuleDef, UIUtil, Item_prop;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Layout = module.Layout;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      Item_prop = module.Item_prop;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "b2c3dTlb3qLnA0eLzpLXG1+", "UI_SpeedUpView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_SpeedUpView = exports('UI_SpeedUpView', (_dec = ccclass("UI_SpeedUpView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_SpeedUpView, _UIBase);
        function UI_SpeedUpView() {
          var _this;
          _this = _UIBase.call(this, UI_SpeedUpView.custom) || this;
          _this.layoutObj = null;
          _this.dataModel = null;
          _this._remainingTime = 0;
          _this._totalBuildTime = 0;
          _this._upgradeTimer = null;
          // 加速道具
          _this._speedItems = [];
          _this._selectedItem = null;
          _this._currentCount = 1;
          return _this;
        }
        var _proto = UI_SpeedUpView.prototype;
        _proto.onCreated = function onCreated(data) {
          this.layoutObj = this.layout;
          var comp = PlaceGameMgr.inst.getBuildingComp(data.buildType, data.buildIndex);
          if (comp) {
            if (data.buildType === BuildingType.MoFang || data.buildType === BuildingType.FaMuChang || data.buildType === BuildingType.CaiKuangChang) {
              this.dataModel = comp.dataModel;
            } else if (data.buildType === BuildingType.BuBingYing || data.buildType === BuildingType.GongBingYing || data.buildType === BuildingType.QiBingYing) {
              this.dataModel = comp.dataModel;
            } else {
              this.dataModel = comp.dataModel;
            }
          }
          this._remainingTime = this.dataModel.getRemainBuildTime();
          this._totalBuildTime = this.dataModel.getToTalBuildTime();
          _UIBase.prototype.onCreated.call(this);
          this.addEventListeners();
          this.initUI();
          this.updateView();
          this.startUpgradeTimer();
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this._remainingTime = 0;
          this.stopUpgradeTimer();
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSpeedCardUpgrade, this.resSpeedCardUpgrade, this);
          this.layoutObj.countSlider.node.on("slide", this.onSliderChanged, this);
        };
        _proto.initUI = function initUI() {
          this._speedItems = [];
          var speed_card_cost = PlaceConfigMgr.inst.getSpeedCardCost();
          for (var _iterator = _createForOfIteratorHelperLoose(speed_card_cost), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              itemId = _step$value[0],
              speedTime = _step$value[1];
            this._speedItems.push(itemId);
          }
          this.createItemList();
          if (this._speedItems.length > 0) {
            this.selectItem(this._speedItems[0]);
          }
        }

        /**
         * 更新界面显示
         */;
        _proto.updateView = function updateView() {
          if (!this.layoutObj) return;
          this.updateBuildingName();
          this.updateRemainingTime();
          this.updateTotalSpeedTime();
          if (this._selectedItem) {
            var maxCount = this.getMaxUsableCount(this._selectedItem);
            this._currentCount = Math.min(this._currentCount, maxCount);
            this.updateCountDisplay();
            this.updateTotalSpeedTime();
            this.updateSlider();
          }
        }

        /**
         * 更新建筑名称
         */;
        _proto.updateBuildingName = function updateBuildingName() {
          if (!this.layoutObj.buildNameLab) return;
          var buildingName = PlaceConfigMgr.inst.getBuildingName(this.dataModel.buildType);
          this.layoutObj.buildNameLab.string = buildingName || "建筑";
        }

        /**
         * 更新倒计时
         */;
        _proto.updateRemainingTime = function updateRemainingTime() {
          if (!this.layoutObj || !this.layoutObj.isValid) return;
          if (this._remainingTime <= 0) {
            App.log.logBusiness("前端倒计时结束", "解锁");
            this.layoutObj.costItem.node.active = false;
            this.stopUpgradeTimer();
            return;
          }
          this.layoutObj.lastTimeLab.string = Utils.timeFormat(this._remainingTime);
          this.layoutObj.progressBar.progress = this.dataModel.getBuildProgress();
          var config = PlaceConfigMgr.inst.getDiamondCost();
          this.layoutObj.costItem.node.active = true;
          var costDiamond = Math.ceil(this._remainingTime * 1000 / config[1]);
          this.layoutObj.costItem.setData([config[0], costDiamond]);
        }

        /**
         * 创建加速道具列表
         */;
        _proto.createItemList = function createItemList() {
          var _this2 = this;
          if (!this.layoutObj.itemListContent) {
            return;
          }
          this.layoutObj.itemListContent.removeAllChildren();
          var itemData = [];
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._speedItems), _step2; !(_step2 = _iterator2()).done;) {
            var _itemId = _step2.value;
            var bagItem = App.bagMgr.getBagItemByItemid(_itemId);
            var _count = bagItem ? bagItem.num : 0;
            itemData.push([_itemId, _count]);
          }
          UIUtil.addItemProps(this.layoutObj.itemListContent, itemData, this, function (node) {
            var itemProp = node.getComponent(Item_prop);
            if (itemProp) {
              var itemId = itemProp.getItemId();
              _this2.selectItem(itemId);
            }
          });
          var layout = this.layoutObj.itemListContent.getComponent(Layout);
          if (layout) {
            layout.updateLayout();
          }
          for (var i = 0; i < this.layoutObj.itemListContent.children.length; i++) {
            var itemNode = this.layoutObj.itemListContent.children[i];
            var itemProp = itemNode.getComponent(Item_prop);
            if (itemProp) {
              var itemId = itemProp.getItemId();
              var count = this.getItemCount(itemId);
              if (count <= 0) {
                UIUtil.setGrayByNode(itemNode, true, true);
              }
            }
          }
        }

        /**
         * 获取道具的加速时长
         */;
        _proto.getSpeedTime = function getSpeedTime(itemId) {
          var speedCardCost = PlaceConfigMgr.inst.getSpeedCardCost();
          for (var _iterator3 = _createForOfIteratorHelperLoose(speedCardCost), _step3; !(_step3 = _iterator3()).done;) {
            var _step3$value = _step3.value,
              id = _step3$value[0],
              speedTime = _step3$value[1];
            if (id === itemId) {
              return speedTime;
            }
          }
          return 0;
        }

        /**
         * 获取背包中道具的数量
         */;
        _proto.getItemCount = function getItemCount(itemId) {
          var bagItem = App.bagMgr.getBagItemByItemid(itemId);
          return bagItem ? bagItem.num : 0;
        }

        /**
         * 获取基于剩余时间的最大可用道具数量
         */;
        _proto.getMaxUsableCount = function getMaxUsableCount(itemId) {
          var itemCount = this.getItemCount(itemId);
          var speedTime = this.getSpeedTime(itemId) / 1000;
          var remainTime = this._remainingTime;
          var maxBasedOnTime = speedTime > 0 ? Math.ceil(remainTime / speedTime) : 0;
          return Math.min(itemCount, maxBasedOnTime);
        }

        /**
         * 选择道具
         */;
        _proto.selectItem = function selectItem(itemId) {
          this._selectedItem = itemId;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          if (maxCount <= 0) {
            this._currentCount = 0;
            this.disableAllControls();
          } else {
            this._currentCount = 1;
            this.enableAllControls();
          }
          this.updateItemSelectState();
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          this.updateSlider();
        }

        /**
         * 更新所有道具的选中状态
         */;
        _proto.updateItemSelectState = function updateItemSelectState() {
          if (!this.layoutObj.itemListContent) return;
          for (var i = 0; i < this.layoutObj.itemListContent.children.length; i++) {
            var itemNode = this.layoutObj.itemListContent.children[i];
            var itemProp = itemNode.getComponent(Item_prop);
            if (itemProp) {
              var itemId = itemProp.getItemId();
              itemProp.setSelect(itemId === this._selectedItem);
            }
          }
        }

        /**
         * 禁用所有控件（没有道具时）
         */;
        _proto.disableAllControls = function disableAllControls() {
          // 置灰加减按钮
          if (this.layoutObj.btnAdd) {
            this.layoutObj.btnAdd.interactable = false;
          }
          if (this.layoutObj.btnSub) {
            this.layoutObj.btnSub.interactable = false;
          }

          // 滑动条滑到最右边且不可滑动
          if (this.layoutObj.countSlider) {
            this.layoutObj.countSlider.progress = 1;
            this.layoutObj.countSlider.node.getComponent("cc.Slider").enabled = false;
          }
          UIUtil.setButtonEnable(this.layoutObj.btnUse, false, true);
        }

        /**
         * 启用所有控件（有道具时）
         */;
        _proto.enableAllControls = function enableAllControls() {
          // 启用滑动条
          if (this.layoutObj.countSlider) {
            this.layoutObj.countSlider.node.getComponent("cc.Slider").enabled = true;
          }
          UIUtil.setButtonEnable(this.layoutObj.btnUse, true, true);
        }

        /**
         * 更新数量显示
         */;
        _proto.updateCountDisplay = function updateCountDisplay() {
          if (!this.layoutObj.txtCurrentCount || !this._selectedItem) return;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          this.layoutObj.txtCurrentCount.string = "" + this._currentCount;
          if (maxCount <= 0) {
            UIUtil.setButtonEnable(this.layoutObj.btnSub, false, true);
            UIUtil.setButtonEnable(this.layoutObj.btnAdd, false, true);
            UIUtil.setButtonEnable(this.layoutObj.btnUse, false, true);
          } else {
            UIUtil.setButtonEnable(this.layoutObj.btnSub, this._currentCount > 1, true);
            UIUtil.setButtonEnable(this.layoutObj.btnAdd, this._currentCount < maxCount, true);
            UIUtil.setButtonEnable(this.layoutObj.btnUse, this._currentCount > 0, true);
          }
        }

        /**
         * 更新总加速时间
         */;
        _proto.updateTotalSpeedTime = function updateTotalSpeedTime() {
          if (!this.layoutObj.totalTimeLab) {
            return;
          }
          var totalSeconds = 0;
          if (!this._selectedItem) {
            totalSeconds = 0;
          } else {
            var speedTime = this.getSpeedTime(this._selectedItem);
            totalSeconds = speedTime * this._currentCount;
          }
          totalSeconds /= 1000;
          this.layoutObj.totalTimeLab.string = Utils.timeFormat(totalSeconds);
        }

        /**
         * 更新滑动块
         */;
        _proto.updateSlider = function updateSlider() {
          if (this.layoutObj.countSlider) {
            var maxCount = this.getMaxUsableCount(this._selectedItem);
            var node = this.layoutObj.countSlider.node.getChildByName("ProgressBar");
            var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
            if (maxCount <= 0) {
              this.layoutObj.countSlider.progress = 0;
              proBar.progress = 0;
            } else {
              var progressNum = (this._currentCount - 1) / Math.max(1, maxCount - 1);
              this.layoutObj.countSlider.progress = progressNum;
              proBar.progress = progressNum;
            }
          }
        }

        /**
         * 启动更新定时器
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this3 = this;
          this.stopUpgradeTimer();
          this.updateRemainingTime();
          this._upgradeTimer = setInterval(function () {
            _this3._remainingTime--;
            _this3.updateRemainingTime();
          }, 1000);
        }

        /**
         * 停止更新定时器
         */;
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        //======================按钮事件==========================================
        /**
         * 减少数量
         */;
        _proto.onBtnSubClick = function onBtnSubClick() {
          if (!this._selectedItem || this._currentCount <= 1) return;
          this._currentCount--;
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          this.updateSlider();
        }

        /**
         * 增加数量
         */;
        _proto.onBtnAddClick = function onBtnAddClick() {
          if (!this._selectedItem) return;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          if (this._currentCount >= maxCount) return;
          this._currentCount++;
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          this.updateSlider();
        }

        /**
         * 滑动条改变
         */;
        _proto.onSliderChanged = function onSliderChanged() {
          if (!this.layoutObj.countSlider || !this._selectedItem) return;
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          this._currentCount = Math.max(1, Math.ceil(this.layoutObj.countSlider.progress * maxCount));
          this.updateCountDisplay();
          this.updateTotalSpeedTime();
          var node = this.layoutObj.countSlider.node.getChildByName("ProgressBar");
          var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
          if (maxCount <= 0) {
            proBar.progress = 0;
          } else {
            var progressNum = (this._currentCount - 1) / Math.max(1, maxCount - 1);
            proBar.progress = progressNum;
          }
        }

        /**
         * 立即完成（使用钻石）
         */;
        _proto.onBtnNowClick = function onBtnNowClick() {
          PlaceGameMgr.inst.reqDiamondUpgrade(this.dataModel.buildingUid, this.dataModel.buildType);
        }

        /**
         * 使用加速卡
         */;
        _proto.onBtnUseClick = function onBtnUseClick() {
          if (!this._selectedItem) {
            App.log.logBusiness("请先选择加速道具");
            return;
          }
          var maxCount = this.getMaxUsableCount(this._selectedItem);
          if (maxCount < this._currentCount) {
            App.log.logBusiness("加速道具数量不足或超过剩余时间需求");
            return;
          }
          App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361 - \u9053\u5177ID: " + this._selectedItem + ", \u6570\u91CF: " + this._currentCount);
          PlaceGameMgr.inst.reqSpeedCardUpgrade(this.dataModel.buildingUid, this.dataModel.buildType, this._selectedItem, this._currentCount);
        }

        /**
         * 建造完成回调
         */;
        _proto._onBuildingComplete = function _onBuildingComplete() {
          App.monitorMgr.dispatchEvent(EventType.BuildingComplete, this.dataModel);
          this.onClose();
        }

        /**
         * 使用加速卡响应
         */;
        _proto.resSpeedCardUpgrade = function resSpeedCardUpgrade(msg) {
          if (msg.building_uid !== this.dataModel.buildingUid) return;
          if (msg.code !== 200) {
            App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361\u5931\u8D25: " + msg.code);
            return;
          }
          App.log.logBusiness("\u4F7F\u7528\u52A0\u901F\u5361\u6210\u529F");
          this._remainingTime = this.dataModel.getRemainBuildTime();
          this._totalBuildTime = this.dataModel.getToTalBuildTime();
          if (this._remainingTime <= 0) {
            this.onClose();
          } else {
            this.updateView();
            this.startUpgradeTimer();
          }
        }

        /**
         * 快速完成协议
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this._onBuildingComplete();
        };
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this._onBuildingComplete();
        };
        return UI_SpeedUpView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_SpeedUpView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnAdd"] = {
          method: "onBtnAddClick"
        }, _binding["btnSub"] = {
          method: "onBtnSubClick"
        }, _binding["btnNow"] = {
          method: "onBtnNowClick"
        }, _binding["btnUse"] = {
          method: "onBtnUseClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_SpeedUpView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_TeamHeroListView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './App.ts', './TeamMgr.ts', './TeamHeroItem.ts', './MonitorType.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, UIBase, App, HeroType, TeamMgr, TeamHeroItem, MonitorType, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      HeroType = module.HeroType;
      TeamMgr = module.TeamMgr;
    }, function (module) {
      TeamHeroItem = module.TeamHeroItem;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "ea4bdio04xOb6GYd3FP3kF1", "UI_TeamHeroListView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_TeamHeroListView = exports('UI_TeamHeroListView', (_dec = ccclass("UI_TeamHeroListView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_TeamHeroListView, _UIBase);
        function UI_TeamHeroListView() {
          var _this;
          _this = _UIBase.call(this, UI_TeamHeroListView.custom) || this;
          _this.layoutObj = null;
          /** 当前选中的英雄类型 */
          _this._currentHeroType = HeroType.ALL;
          /** 当前打开类型 */
          _this._openType = "";
          /** 当前打开pos */
          _this._openPos = 0;
          /** 当前打开编队index */
          _this._currFormation = 0;
          return _this;
        }
        var _proto = UI_TeamHeroListView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResHeroList, this.resHeroList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOn, this.onResOn, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this._openType = (data == null ? void 0 : data.type) || "";
          this._openPos = (data == null ? void 0 : data.pos) || 0;
          this._currFormation = (data == null ? void 0 : data.index) || 0;
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initToggleGroup();
        }

        /**
         * 初始化 ToggleGroup
         */;
        _proto.initToggleGroup = function initToggleGroup() {
          var _this2 = this;
          if (!this.layoutObj || !this.layoutObj.heroScroll || !this.layoutObj.heroScroll.content) {
            console.error("heroScroll 或 content 未初始化");
            return;
          }
          this.layoutObj.heroScroll.content.removeAllChildren();
          this.layoutObj.heroScroll.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.heroScroll.onItemClick = this.onItemClick.bind(this);
          var toggles = this.layoutObj.toggles;

          // 为每个 Toggle 添加事件监听
          toggles.forEach(function (toggle, index) {
            toggle.node.on(Toggle.EventType.TOGGLE, function () {
              if (toggle.isChecked) {
                _this2.onHeroTypeChanged(index);
              }
            });
          });

          // 默认选中第一个（全部）
          if (toggles.length > 0) {
            toggles[0].isChecked = true;
            this.onHeroTypeChanged(0, true);
          }
        }

        /**
         * 英雄类型改变回调
         * @param typeIndex 类型索引 (0=全部, 1=近战, 2=盾, 3=远程)
         */;
        _proto.onHeroTypeChanged = function onHeroTypeChanged(typeIndex, first) {
          if (first === void 0) {
            first = false;
          }
          if (this._currentHeroType === typeIndex && !first) return;
          this._currentHeroType = typeIndex;
          var typeNames = ["全部", "近战", "盾", "远程"];
          console.log("\u82F1\u96C4\u5206\u7C7B\u5DF2\u5207\u6362\u4E3A: " + typeNames[typeIndex]);

          // 根据类型过滤英雄列表
          this.filterHeroList(this._currentHeroType);
        }

        /**
         * 根据类型过滤英雄列表
         * @param heroType 英雄类型
         */;
        _proto.filterHeroList = function filterHeroList(heroType) {
          // 这里应该调用 TeamMgr 获取英雄列表，然后根据类型过滤
          var heroList = TeamMgr.inst.getHeroJobList(heroType);
          // 然后更新 UI 显示
          this.layoutObj.heroScroll.array = heroList;
          this.layoutObj.heroScroll.updateAllItems();
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.heroScroll.array[index];
          var cellComp = item.getComponent(TeamHeroItem);
          cellComp.show(data, this._currFormation);
        };
        _proto.onItemClick = function onItemClick(item, index) {
          App.log.logBusiness("index", "", index);
          if (this._openType === "add") {
            var cellComp = item.getComponent(TeamHeroItem);
            var data = cellComp._data;
            TeamMgr.inst.reqOn(this._currFormation, 1, this._openPos, data.hero_id);
          }
        };
        _proto.resHeroList = function resHeroList(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this.initToggleGroup();
        }

        /**
         * 获取当前选中的英雄类型
         */;
        _proto.getCurrentHeroType = function getCurrentHeroType() {
          return this._currentHeroType;
        };
        _proto.onResOn = function onResOn(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this.filterHeroList(this._currentHeroType);
          this.onClose();
        };
        return UI_TeamHeroListView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_TeamHeroListView",
        binding: (_binding = {}, _binding["bgClose"] = {
          method: "onClose"
        }, _binding["btnClose"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_TeamHeroListView, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_TeamMainView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './MonitorType.ts', './TeamMgr.ts', './Layout_UI_TeamMyView.ts', './UIMgr.ts', './UI_TeamMyView.ts', './UI_HeroCultivateView.ts', './Layout_UI_HeroCultivateView.ts', './Layout_UI_SoldierCultivateView.ts', './UI_SoldierCultivateView.ts', './UIUtil.ts', './UI_TeamHeroListView.ts', './Layout_UI_TeamHeroListView.ts', './UI_TeamSoldierListView.ts', './Layout_UI_TeamSoldierListView.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, ModuleContext, ModuleDef, App, MonitorType, TeamMgr, Layout_UI_TeamMyView, UIMgr, LayerType, UI_TeamMyView, UI_HeroCultivateView, Layout_UI_HeroCultivateView, Layout_UI_SoldierCultivateView, UI_SoldierCultivateView, UIUtil, UI_TeamHeroListView, Layout_UI_TeamHeroListView, UI_TeamSoldierListView, Layout_UI_TeamSoldierListView;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      Layout_UI_TeamMyView = module.Layout_UI_TeamMyView;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_TeamMyView = module.UI_TeamMyView;
    }, function (module) {
      UI_HeroCultivateView = module.UI_HeroCultivateView;
    }, function (module) {
      Layout_UI_HeroCultivateView = module.Layout_UI_HeroCultivateView;
    }, function (module) {
      Layout_UI_SoldierCultivateView = module.Layout_UI_SoldierCultivateView;
    }, function (module) {
      UI_SoldierCultivateView = module.UI_SoldierCultivateView;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      UI_TeamHeroListView = module.UI_TeamHeroListView;
    }, function (module) {
      Layout_UI_TeamHeroListView = module.Layout_UI_TeamHeroListView;
    }, function (module) {
      UI_TeamSoldierListView = module.UI_TeamSoldierListView;
    }, function (module) {
      Layout_UI_TeamSoldierListView = module.Layout_UI_TeamSoldierListView;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "8132fRUSEBMrJVKaynVj+9z", "UI_TeamMainView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_TeamMainView = exports('UI_TeamMainView', (_dec = ccclass("UI_TeamMainView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_TeamMainView, _UIBase);
        function UI_TeamMainView() {
          var _this;
          _this = _UIBase.call(this, UI_TeamMainView.custom) || this;
          _this.layoutObj = null;
          _this._currFormation = null;
          return _this;
        }
        var _proto = UI_TeamMainView.prototype;
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this.layoutObj = this.layoutObj = this.layout;
          // this.actionTween(this.layoutObj.content);
          this.addEventListeners();
          TeamMgr.inst.reqHeroList();
          TeamMgr.inst.reqSoldierList();
          TeamMgr.inst.reqFormationInfo();
          if (data && data.type === "onBattle") {
            // 进入战斗编队
            this.layoutObj.challengeBtn.node.active = true;
            this.layoutObj.recruitBtn.node.active = false;
            this.layoutObj.btnGeneral.node.active = false;
            this.layoutObj.btnTraining.node.active = false;
          } else if (data && data.type === "open") {
            // 主城编队进入
            this.layoutObj.challengeBtn.node.active = false;
          }
        };
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this._currFormation = null;
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResFormationInfo, this.resFormationInfo, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOn, this.resOn, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUse, this.onResUse, this);
        }

        /** 编队信息返回 */;
        _proto.resFormationInfo = function resFormationInfo(msg) {
          if (msg && msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this._currFormation = TeamMgr.inst.currFormation;
          if (this._currFormation) {
            this.layoutObj.nameLab.string = this._currFormation.name;
            this.updateHeroList();
            this.updateSoldierList();
          }
        };
        _proto.resOn = function resOn(msg) {
          if (msg && msg.code === 200) {
            if (msg.type === 1) {
              this.updateHeroList();
            } else {
              this.updateSoldierList();
            }
          }
        };
        _proto.onResUse = function onResUse(msg) {
          if (msg && msg.code === 200) {
            this._currFormation = TeamMgr.inst.currFormation;
            this.layoutObj.nameLab.string = this._currFormation.name;
            this.updateHeroList();
            this.updateSoldierList();
          }
        }
        /** 更新英雄编队 */;
        _proto.updateHeroList = function updateHeroList() {
          for (var i = 0; i < this.layoutObj.heroList.length; i++) {
            var element = this.layoutObj.heroList[i];
            var pos = i + 1;
            var obj = TeamMgr.inst.getPosIUnit(pos, 1);
            element.onTouchCellBack(this.onClickHero.bind(this));
            element.show(obj, pos, this._currFormation.index);
          }
        }
        /** 更新士兵编队 */;
        _proto.updateSoldierList = function updateSoldierList() {
          for (var i = 0; i < this.layoutObj.soldierList.length; i++) {
            var element = this.layoutObj.soldierList[i];
            var pos = i + 1;
            var obj = TeamMgr.inst.getPosIUnit(pos, 2);
            element.onTouchCellBack(this.onClickSoldier.bind(this));
            element.show(obj, pos, this._currFormation.index);
          }
        };
        _proto.onClickHero = function onClickHero(item, data) {
          if (!item) return;
          if (item._isLocked) {
            return;
          }
          UIMgr.inst.open(UI_TeamHeroListView, LayerType.panel, Layout_UI_TeamHeroListView, [{
            pos: data.pos,
            index: item._currFormation,
            type: "add"
          }], function () {});
        };
        _proto.onClickSoldier = function onClickSoldier(item, data) {
          if (!item) return;
          if (item._isLocked) {
            return;
          }
          UIMgr.inst.open(UI_TeamSoldierListView, LayerType.panel, Layout_UI_TeamSoldierListView, [{
            pos: data.pos,
            index: item._currFormation,
            type: "add"
          }], function () {});
        }
        /** 打开阵容编队 */;
        _proto.onTeamEditClick = function onTeamEditClick() {
          UIMgr.inst.open(UI_TeamMyView, LayerType.panel, Layout_UI_TeamMyView);
        }
        /** 打开招募 */;
        _proto.onRecruitClick = function onRecruitClick() {
          UIUtil.showTip("\u529F\u80FD\u6682\u672A\u5F00\u542F");
        }
        /**
         * 打开点将台-英雄培养
         */;
        _proto.onGeneralClick = function onGeneralClick() {
          UIMgr.inst.open(UI_HeroCultivateView, LayerType.panel, Layout_UI_HeroCultivateView);
        }
        /**
         * 打开练兵台-士兵培养
         */;
        _proto.onTrainingClick = function onTrainingClick() {
          UIMgr.inst.open(UI_SoldierCultivateView, LayerType.panel, Layout_UI_SoldierCultivateView);
        }
        /**
         * 进入战斗
         */;
        _proto.onChallengeBtnClick = function onChallengeBtnClick() {
          App.dungeonBattleMgr.ReqEnterDungeon(TeamMgr.inst.getRandomDungeonId());
        };
        return UI_TeamMainView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_TeamMainView",
        binding: (_binding = {}, _binding["backBtn"] = {
          method: "onClose"
        }, _binding["recruitBtn"] = {
          method: "onRecruitClick"
        }, _binding["teamEditBtn"] = {
          method: "onTeamEditClick"
        }, _binding["btnGeneral"] = {
          method: "onGeneralClick"
        }, _binding["btnTraining"] = {
          method: "onTrainingClick"
        }, _binding["challengeBtn"] = {
          method: "onChallengeBtnClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_TeamMainView, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_TeamMyView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './App.ts', './MonitorType.ts', './ModuleContext.ts', './ModuleDef.ts', './TeamMgr.ts', './TeamMyItem.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, App, MonitorType, ModuleContext, ModuleDef, TeamMgr, TeamMyItem;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      TeamMyItem = module.TeamMyItem;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "c62fcZePONCd4frh39ITwJC", "UI_TeamMyView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_TeamMyView = exports('UI_TeamMyView', (_dec = ccclass("UI_TeamMyView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_TeamMyView, _UIBase);
        function UI_TeamMyView() {
          var _this;
          _this = _UIBase.call(this, UI_TeamMyView.custom) || this;
          _this.layoutObj = null;
          return _this;
        }
        var _proto = UI_TeamMyView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          // App.monitorMgr.addEventListener(MonitorType.CMD_ResHeroList, this.resHeroList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOn, this.onResOn, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUse, this.onResUse, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResFormationChangeName, this.resFormationChangeName, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this.addEventListeners();
          this.layoutObj = this.layout;
          this.initTeamList();
        }
        /** 初始化阵容列表 */;
        _proto.initTeamList = function initTeamList() {
          this.layoutObj.teamScroll.content.removeAllChildren();
          this.layoutObj.teamScroll.onItemRender = this.onItemRender.bind(this);
          // this.layoutObj.teamScroll.onItemClick = this.onItemClick.bind(this);

          var formations = TeamMgr.inst.formations;
          this.layoutObj.teamScroll.array = formations;
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.teamScroll.array[index];
          var cellComp = item.getComponent(TeamMyItem);
          cellComp.show(data);
        }
        /** 使用编队返回 */;
        _proto.onResUse = function onResUse(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u4F7F\u7528\u7F16\u961F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 根据msg.index查找对应的编队项并更新UI
          var formations = this.layoutObj.teamScroll.array;

          // 遍历所有编队项，更新按钮状态
          for (var i = 0; i < formations.length; i++) {
            var formation = formations[i];
            var item = this.layoutObj.teamScroll.content.children[i];
            if (item) {
              var teamMyItem = item.getComponent(TeamMyItem);
              if (teamMyItem) {
                // 如果是当前选中的编队，设置为"当前上阵"并置灰
                var isCurrentFormation = formation.index === msg.cur_index;
                teamMyItem.updateButtonState(isCurrentFormation);
              }
            }
          }
          this.onClose();
        }
        /**
         * @param msg 上阵更新
         */;
        _proto.onResOn = function onResOn(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u4E0A\u9635\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }

          // 根据msg.index查找对应的编队
          var formations = this.layoutObj.teamScroll.array;
          var formationIndex = formations.findIndex(function (f) {
            return f.index === msg.index;
          });
          if (formationIndex === -1) {
            App.log.logError("\u672A\u627E\u5230\u7F16\u961F index: " + msg.index);
            return;
          }

          // 获取对应的TeamMyItem组件
          var item = this.layoutObj.teamScroll.content.children[formationIndex];
          if (!item) {
            return;
          }
          var teamMyItem = item.getComponent(TeamMyItem);
          if (!teamMyItem) {
            return;
          }

          // 根据type判断是英雄还是士兵，刷新对应位置的数据
          if (msg.type === 1) {
            // 英雄上阵
            var heroItem = teamMyItem.heroList[msg.pos - 1];
            if (heroItem) {
              var heroData = {
                id: msg.id,
                pos: msg.pos
              };
              heroItem.show(heroData, msg.pos, msg.index);
            }
          } else if (msg.type === 2) {
            // 士兵上阵
            var soldierItem = teamMyItem.soldierList[msg.pos - 1];
            if (soldierItem) {
              var soldierData = {
                id: msg.id,
                pos: msg.pos
              };
              soldierItem.show(soldierData, msg.pos, msg.index);
            }
          }
        };
        _proto.resFormationChangeName = function resFormationChangeName(msg) {
          // 根据msg.index查找对应的编队项并更新UI
          var formations = this.layoutObj.teamScroll.array;

          // 遍历所有编队项，更新按钮状态
          for (var i = 0; i < formations.length; i++) {
            var formation = formations[i];
            var item = this.layoutObj.teamScroll.content.children[i];
            if (item) {
              var teamMyItem = item.getComponent(TeamMyItem);
              if (teamMyItem) {
                if (formation.index === msg.index) {
                  teamMyItem.updateChangeName(msg.name);
                }
              }
            }
          }
        };
        _proto.onItemClick = function onItemClick(item, index) {
          App.log.logBusiness("index", "", index);
        };
        return UI_TeamMyView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_TeamMyView",
        binding: (_binding = {}, _binding["bgClose"] = {
          method: "onClose"
        }, _binding["btnClose"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_TeamMyView, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_TeamSoldierListView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './App.ts', './TeamMgr.ts', './TeamSoldierItem.ts', './MonitorType.ts', './ModuleContext.ts', './ModuleDef.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, UIBase, App, SoldierType, TeamMgr, TeamSoldierItem, MonitorType, ModuleContext, ModuleDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }, function (module) {
      SoldierType = module.SoldierType;
      TeamMgr = module.TeamMgr;
    }, function (module) {
      TeamSoldierItem = module.TeamSoldierItem;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "035b5i0tb5L/rKSaA+onUCb", "UI_TeamSoldierListView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_TeamSoldierListView = exports('UI_TeamSoldierListView', (_dec = ccclass("UI_TeamSoldierListView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_TeamSoldierListView, _UIBase);
        function UI_TeamSoldierListView() {
          var _this;
          _this = _UIBase.call(this, UI_TeamSoldierListView.custom) || this;
          _this.layoutObj = null;
          /** 当前选中的士兵类型 */
          _this._currentSoldierType = SoldierType.ALL;
          /** 当前打开类型 */
          _this._openType = "";
          /** 当前打开pos */
          _this._openPos = 0;
          /** 当前打开编队Index */
          _this._currFormation = 0;
          return _this;
        }
        var _proto = UI_TeamSoldierListView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ReqSoldierList, this.resSoldierList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOn, this.onResOn, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this, data);
          this._openType = (data == null ? void 0 : data.type) || "";
          this._openPos = (data == null ? void 0 : data.pos) || 0;
          this._currFormation = (data == null ? void 0 : data.index) || 0;
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initToggleGroup();
        }

        /**
         * 初始化 ToggleGroup
         */;
        _proto.initToggleGroup = function initToggleGroup() {
          var _this2 = this;
          if (!this.layoutObj || !this.layoutObj.soldierScroll || !this.layoutObj.soldierScroll.content) {
            console.error("soldierScroll 或 content 未初始化");
            return;
          }
          this.layoutObj.soldierScroll.content.removeAllChildren();
          this.layoutObj.soldierScroll.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.soldierScroll.onItemClick = this.onItemClick.bind(this);
          var toggles = this.layoutObj.toggles;

          // 为每个 Toggle 添加事件监听
          toggles.forEach(function (toggle, index) {
            toggle.node.on(Toggle.EventType.TOGGLE, function () {
              if (toggle.isChecked) {
                _this2.onHeroTypeChanged(index);
              }
            });
          });

          // 默认选中第一个（全部）
          if (toggles.length > 0) {
            toggles[0].isChecked = true;
            this.onHeroTypeChanged(0);
          }
        }

        /**
         * 士兵类型改变回调
         * @param typeIndex 类型索引 (0=全部, 1=近战, 2=盾, 3=远程)
         */;
        _proto.onHeroTypeChanged = function onHeroTypeChanged(typeIndex) {
          this._currentSoldierType = typeIndex;
          var typeNames = ["全部", "刀盾兵", "弓箭兵", "轻骑兵", "特殊"];
          console.log("\u58EB\u5175\u5206\u7C7B\u5DF2\u5207\u6362\u4E3A: " + typeNames[typeIndex]);

          // 根据类型过滤士兵列表
          this.filterHeroList(this._currentSoldierType);
        }

        /**
         * 根据类型过滤士兵列表
         * @param soldierType 士兵类型
         */;
        _proto.filterHeroList = function filterHeroList(soldierType) {
          // 这里应该调用 TeamMgr 获取士兵列表，然后根据类型过滤
          var soldierList = TeamMgr.inst.getSoldierJobList(soldierType);
          // 然后更新 UI 显示
          this.layoutObj.soldierScroll.array = soldierList;
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.layoutObj.soldierScroll.array[index];
          var cellComp = item.getComponent(TeamSoldierItem);
          cellComp.show(data, this._currFormation);
        };
        _proto.onItemClick = function onItemClick(item, index) {
          App.log.logBusiness("index", "", index);
          if (this._openType === "add") {
            var cellComp = item.getComponent(TeamSoldierItem);
            var data = cellComp._data;
            TeamMgr.inst.reqOn(this._currFormation, 2, this._openPos, data.soldier_id);
          }
        };
        _proto.resSoldierList = function resSoldierList(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this.initToggleGroup();
        }

        /**
         * 获取当前选中的士兵类型
         */;
        _proto.getCurrentHeroType = function getCurrentHeroType() {
          return this._currentSoldierType;
        };
        _proto.onResOn = function onResOn(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u6E38\u620F\u7BA1\u7406\u5668: \u5EFA\u9020\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this.filterHeroList(this._currentSoldierType);
          this.onClose();
        };
        return UI_TeamSoldierListView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_TeamSoldierListView",
        binding: (_binding = {}, _binding["bgClose"] = {
          method: "onClose"
        }, _binding["btnClose"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_TeamSoldierListView, ModuleDef.GAME_TEAM);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_TrainingView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './PlaceGameEnum.ts', './MonitorType.ts', './UIUtil.ts', './UIMgr.ts', './UI_ChooseHeroView.ts', './Layout_UI_ChooseHeroView.ts', './TeamMgr.ts', './UtilGame.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, ProgressBar, UIBase, ModuleContext, ModuleDef, App, PlaceGameMgr, PlaceConfigMgr, SoldierType, BuildingType, MonitorType, UIUtil, UIMgr, LayerType, UI_ChooseHeroView, Layout_UI_ChooseHeroView, TeamMgr, UtilGame;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingType = module.BuildingType;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      UI_ChooseHeroView = module.UI_ChooseHeroView;
    }, function (module) {
      Layout_UI_ChooseHeroView = module.Layout_UI_ChooseHeroView;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      UtilGame = module.UtilGame;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "896b3V8X9VI8oykZos3zWIy", "UI_TrainingView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_TrainingView = exports('UI_TrainingView', (_dec = ccclass("UI_TrainingView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_TrainingView, _UIBase);
        // 最大服役人数

        function UI_TrainingView() {
          var _this;
          _this = _UIBase.call(this, UI_TrainingView.custom) || this;
          _this.layoutObj = null;
          _this.dataModel = null;
          // 训练参数
          _this._trainCount = 1;
          // 当前选择的训练数量
          _this._maxTrainCount = 100;
          // 最大可训练数量
          _this._isAutoTrain = false;
          // 是否自动训练
          // 人口数据
          _this._currentPopulation = 0;
          // 当前人口
          _this._maxPopulation = 0;
          // 最大人口
          _this._serviceCount = 0;
          // 当前服役人数
          _this._maxServiceCount = 0;
          return _this;
        }
        var _proto = UI_TrainingView.prototype;
        _proto.onCreated = function onCreated(data) {
          this.layoutObj = this.layout;
          var comp = PlaceGameMgr.inst.getBuildingComp(data.buildType, data.buildIndex);
          if (comp) {
            this.dataModel = comp.dataModel;
          }
          this._isAutoTrain = PlaceGameMgr.inst.getAutoTrainState(this.dataModel.buildingUid);
          this.addEventListeners();
          _UIBase.prototype.onCreated.call(this);
          this.updateView();
        }

        /**
         * 切换自动训练
         */;
        _proto.onToggleAutoTrain = function onToggleAutoTrain() {
          if (!this.layoutObj || !this.layoutObj.toggle) return;
          this._isAutoTrain = this.layoutObj.toggle.isChecked;
          if (!this._isAutoTrain) {
            // 取消的情况下 立即保存 确认自动的情况下，关闭页面保存
            PlaceGameMgr.inst.setAutoTrainState(this.dataModel.buildingUid, this._isAutoTrain);
          }
          App.log.logBusiness("\u81EA\u52A8\u8BAD\u7EC3: " + (this._isAutoTrain ? "开启" : "关闭"));
        }

        /**
         * 页面关闭时的处理
         */;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
          if (this.layoutObj && this.layoutObj.zzyxHeroItem) {
            this.layoutObj.zzyxHeroItem.onTouchCellBack(null);
          }
          if (this.dataModel) {
            PlaceGameMgr.inst.setAutoTrainState(this.dataModel.buildingUid, this._isAutoTrain);
          }
        };
        _proto.addEventListeners = function addEventListeners() {
          var _this2 = this;
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrain, this.onResTrain, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResTrainFinish, this.onResTrainFinish, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingDataChange, this.resBuildingDataChange, this);
          if (this.layoutObj && this.layoutObj.slider) {
            this.layoutObj.slider.node.on("slide", this.onSliderChanged, this);
          }
          if (this.layoutObj && this.layoutObj.toggle) {
            this.layoutObj.toggle.node.on("toggle", this.onToggleAutoTrain, this);
          }
          if (this.layoutObj && this.layoutObj.zzyxHeroItem) {
            this.layoutObj.zzyxHeroItem.onTouchCellBack(function () {
              _this2.onHeroItemClick();
            });
          }
        }

        /**
         * 训练响应
         */;
        _proto.onResTrain = function onResTrain(msg) {
          if (!this.dataModel || msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          App.log.logBusiness("\u8BAD\u7EC3\u54CD\u5E94 - \u5EFA\u7B51: " + msg.building_id + ", \u8BAD\u7EC3\u6570\u91CF: " + msg.train_count);
          this._trainCount = 1;
          this.updateView();
        }

        /**
         * 训练完成响应
         */;
        _proto.onResTrainFinish = function onResTrainFinish(msg) {
          if (!this.dataModel || msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          App.log.logBusiness("\u8BAD\u7EC3\u5B8C\u6210 - \u5EFA\u7B51: " + msg.building_id + ", \u9884\u5907\u5F79: " + msg.reserve_count);
          this.updateView();
        }

        /**
         * 更新界面显示
         */;
        _proto.updateView = function updateView() {
          if (!this.dataModel) return;
          this._calculatenNum();
          this._updateBuildingInfo();
          this._updateHeroInfo();
          this._updatePopulationInfo();
          this._updateTrainControl();
          this._updateCostDisplay();
        }

        /**
         * 更新建筑信息
         */;
        _proto._updateBuildingInfo = function _updateBuildingInfo() {
          if (!this.layoutObj || !this.dataModel) return;
          var buildingName = PlaceConfigMgr.inst.getBuildingName(this.dataModel.buildType);
          if (this.layoutObj.buildNameLab) {
            this.layoutObj.buildNameLab.string = buildingName;
          }
          if (this.layoutObj.buildLevelLab) {
            this.layoutObj.buildLevelLab.string = this.dataModel.level + "\u7EA7";
          }
        }

        /**
         * 更新英雄信息
         */;
        _proto._updateHeroInfo = function _updateHeroInfo() {
          if (!this.layoutObj || !this.dataModel) return;
          var entryHeroId = this.dataModel.serverData.entry_hero || 0;
          var hasHero = entryHeroId > 0;
          var heroName = "无";
          var addPercent = 0;
          var heroLevel = 0;
          if (hasHero) {
            var heroCfg = TeamMgr.inst.getHeroIdCfg(entryHeroId);
            heroName = heroCfg.name || "";
            var assignHero = PlaceGameMgr.inst.getAssignHeroByBuilding(this.dataModel.buildingUid, this.dataModel.buildType);
            if (assignHero && assignHero.hero_id === entryHeroId) {
              addPercent = assignHero.rate ? assignHero.rate / 100 : 0; // 万分比
              heroLevel = assignHero.level || 0;
            }
          }
          this.layoutObj.zzyxHeroItem.showByHeroId(entryHeroId);

          // 更新UI显示
          if (this.layoutObj.heroLevelLab) {
            this.layoutObj.heroLevelLab.string = heroLevel + "\u7EA7";
          }
          if (this.layoutObj.zzyxName) {
            this.layoutObj.zzyxName.string = heroName;
          }
          if (this.layoutObj.itemIcon) {
            var cfg = PlaceConfigMgr.inst.getJianZhuConfig(this.dataModel.buildType);
            if (cfg.expshow) {
              UtilGame.loadItemIcon(this.layoutObj.itemIcon, cfg.expshow);
            }
          }
          if (this.layoutObj.zengyiLab) {
            if (hasHero && addPercent > 0) {
              this.layoutObj.zengyiLab.string = "+" + addPercent + "%";
            } else {
              this.layoutObj.zengyiLab.string = "+0%";
            }
          }
          this.layoutObj.fuyuName.string = "\u670D\u5F79" + PlaceConfigMgr.inst.getSoldierNameByBuild(this.dataModel.buildType) + ":";
          this.layoutObj.yubeiName.string = "\u9884\u5907" + PlaceConfigMgr.inst.getSoldierNameByBuild(this.dataModel.buildType) + ":";
        }

        /**
         * 更新人口信息
         */;
        _proto._updatePopulationInfo = function _updatePopulationInfo() {
          if (!this.layoutObj || !this.dataModel) return;
          if (this.layoutObj.personNum) {
            this.layoutObj.personNum.string = this._currentPopulation + "/" + this._maxPopulation;
          }
          if (this.layoutObj.fyBubingNum) {
            this.layoutObj.fyBubingNum.string = this._serviceCount + "/" + this._maxServiceCount;
          }
          if (this.layoutObj.xlNum) {
            this.layoutObj.xlNum.string = "" + this.dataModel.trainingCount;
          }
          if (this.layoutObj.ybBubingNum) {
            this.layoutObj.ybBubingNum.string = "" + this.dataModel.reserveCount;
          }
        }

        /**
         * 计算数据
         */;
        _proto._calculatenNum = function _calculatenNum() {
          var _soldiermax;
          if (!this.dataModel) {
            this._maxTrainCount = 0;
            return;
          }
          var fuhuaComp = PlaceGameMgr.inst.buildingCtrl.getFuHuaComp();
          if (fuhuaComp) {
            this._currentPopulation = PlaceGameMgr.inst.getFuhuaCenterPeople();
            this._maxPopulation = fuhuaComp.dataModel.getActualMaxPeopleNum();
          }
          var zhiHuiBuComp = PlaceGameMgr.inst.buildingCtrl.getZhiHuiBuComp();
          var soldierType = SoldierType.BuBing;
          if (this.dataModel.buildType === BuildingType.BuBingYing) {
            soldierType = SoldierType.BuBing;
          } else if (this.dataModel.buildType === BuildingType.GongBingYing) {
            soldierType = SoldierType.GongBing;
          } else if (this.dataModel.buildType === BuildingType.QiBingYing) {
            soldierType = SoldierType.QiBing;
          }
          this._serviceCount = PlaceGameMgr.inst.getServicePersonCount(zhiHuiBuComp.dataModel.buildingUid, soldierType);
          var soldiermax = PlaceConfigMgr.inst.getZhiHuiBuSoldierMax(zhiHuiBuComp.dataModel.level);
          this._maxServiceCount = ((_soldiermax = soldiermax[soldierType - 1]) == null ? void 0 : _soldiermax[1]) || 0;
          var availableService = this._maxServiceCount - this._serviceCount - this.dataModel.trainingCount - this.dataModel.reserveCount;
          var maxSlotNum = this.dataModel.getAvailableXLSlots();
          var trainCount = this.dataModel.trainingCount;
          var maxCanTrainNum = maxSlotNum - trainCount;
          this._maxTrainCount = Math.min(maxCanTrainNum, Math.min(this._currentPopulation, availableService));
          if (this._maxTrainCount > 0) {
            if (this._trainCount > this._maxTrainCount) {
              this._trainCount = Math.max(1, this._maxTrainCount);
            }
          } else {
            this._trainCount = 0;
            this._maxTrainCount = 0;
          }
        }

        /**
         * 更新训练控制
         */;
        _proto._updateTrainControl = function _updateTrainControl() {
          if (!this.layoutObj) return;
          if (this.layoutObj.trainCount) {
            this.layoutObj.trainCount.string = "" + this._trainCount;
          }
          if (this.layoutObj.slider && this._maxTrainCount > 0) {
            this.layoutObj.slider.progress = this._trainCount / this._maxTrainCount;
            var node = this.layoutObj.slider.node.getChildByName("ProgressBar");
            var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
            if (proBar) {
              proBar.progress = this._trainCount / this._maxTrainCount;
            }
          }
          if (this.layoutObj.btnSub) {
            UIUtil.setGrayByNode(this.layoutObj.btnSub.node, this._trainCount <= 0);
          }
          if (this.layoutObj.btnAdd) {
            UIUtil.setGrayByNode(this.layoutObj.btnAdd.node, this._trainCount >= this._maxTrainCount);
          }
          if (this.layoutObj.slider) {
            this.layoutObj.slider.enabled = this._maxTrainCount > 0;
          }
          var hasAvailableSlot = this.dataModel && this.dataModel.getAvailableXLSlots() > 0;
          var canTrain = hasAvailableSlot && this._maxTrainCount > 0 && this._trainCount > 0;
          if (this.layoutObj.trainBtn) {
            UIUtil.setGrayByNode(this.layoutObj.trainBtn.node, !canTrain);
          }
          if (this.layoutObj.toggle) {
            this.layoutObj.toggle.isChecked = this._isAutoTrain;
          }
        }

        /**
         * 更新消耗显示
         */;
        _proto._updateCostDisplay = function _updateCostDisplay() {
          if (!this.layoutObj || !this.layoutObj.costItem || !this.dataModel) return;
          var baseFoodCost = PlaceConfigMgr.inst.getBingYingTrainFoodCost(this.dataModel.buildType, this.dataModel.level);
          var reductionRate = this.dataModel.calcFoodCostReduction() / 10000; // 万分比
          var totalCosts = [];
          for (var _iterator = _createForOfIteratorHelperLoose(baseFoodCost), _step; !(_step = _iterator()).done;) {
            var _step$value = _step.value,
              itemId = _step$value[0],
              itemCount = _step$value[1];
            var totalCount = itemCount * this._trainCount;
            var actualCount = Math.floor(totalCount * (1 - reductionRate));
            totalCosts.push([itemId, actualCount]);
          }
          this.layoutObj.costItem.setData(totalCosts[0]);
          this.layoutObj.costItem.setClickTouch(false);
          App.log.logBusiness("\u8BAD\u7EC3 " + this._trainCount + " \u4E2A\u58EB\u5175\uFF0C\u6D88\u8017\u9053\u5177: " + JSON.stringify(totalCosts) + ", \u51CF\u514D: " + reductionRate * 10000 + "\u4E07\u5206\u6BD4");
        }

        /**
         * 减少训练数量
         */;
        _proto.onBtnSubClick = function onBtnSubClick() {
          if (this._trainCount > 0) {
            this._trainCount--;
            this._updateTrainControl();
            this._updateCostDisplay();
            this.updateSlider();
          }
        }

        /**
         * 增加训练数量
         */;
        _proto.onBtnAddClick = function onBtnAddClick() {
          if (this._trainCount < this._maxTrainCount) {
            this._trainCount++;
            this._updateTrainControl();
            this._updateCostDisplay();
            this.updateSlider();
          }
        }

        /**
         * 滑动条变化事件
         */;
        _proto.onSliderChanged = function onSliderChanged() {
          if (!this.layoutObj || !this.layoutObj.slider) return;
          this._trainCount = Math.max(0, Math.floor(this.layoutObj.slider.progress * this._maxTrainCount));
          if (this._trainCount > this._maxTrainCount) {
            this._trainCount = this._maxTrainCount;
          }
          this._updateTrainControl();
          this._updateCostDisplay();
          var node = this.layoutObj.slider.node.getChildByName("ProgressBar");
          var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
          if (this._maxTrainCount <= 0) {
            proBar.progress = 0;
          } else {
            var progressNum = this._trainCount / this._maxTrainCount;
            proBar.progress = progressNum;
          }
        }

        /**
         * 更新滑动块
         */;
        _proto.updateSlider = function updateSlider() {
          if (this.layoutObj.slider) {
            var node = this.layoutObj.slider.node.getChildByName("ProgressBar");
            var proBar = node == null ? void 0 : node.getComponent(ProgressBar);
            if (this._maxTrainCount <= 0) {
              this.layoutObj.slider.progress = 0;
              if (proBar) proBar.progress = 0;
            } else {
              var progressNum = this._trainCount / this._maxTrainCount;
              this.layoutObj.slider.progress = progressNum;
              if (proBar) proBar.progress = progressNum;
            }
          }
        }

        /**
         * 开始训练按钮点击事件
         */;
        _proto.onStartTrain = function onStartTrain() {
          if (!this.dataModel) {
            App.log.logBusiness("训练失败：建筑数据未初始化");
            return;
          }
          if (this.dataModel.getAvailableXLSlots() <= 0) {
            UIUtil.showTip("训练失败：训练槽已满");
            return;
          }
          if (this._trainCount <= 0 || this._trainCount > this._maxTrainCount) {
            UIUtil.showTip("训练失败：训练数量不足");
            return;
          }
          var totalAfterTrain = this._serviceCount + this.dataModel.trainingCount + this.dataModel.reserveCount + this._trainCount;
          if (totalAfterTrain > this._maxServiceCount) {
            UIUtil.showTip("训练失败：服役人数将超过上限");
            return;
          }
          var baseFoodCost = PlaceConfigMgr.inst.getBingYingTrainFoodCost(this.dataModel.buildType, this.dataModel.level);
          var reductionRate = this.dataModel.calcFoodCostReduction() / 10000;
          var costList = [];
          for (var _iterator2 = _createForOfIteratorHelperLoose(baseFoodCost), _step2; !(_step2 = _iterator2()).done;) {
            var _step2$value = _step2.value,
              itemId = _step2$value[0],
              itemCount = _step2$value[1];
            var totalCount = itemCount * this._trainCount;
            var actualCount = Math.floor(totalCount * (1 - reductionRate));
            costList.push([itemId, actualCount]);
          }
          if (!App.bagMgr.checkPropEnoughList(costList)) {
            UIUtil.showTip("训练失败：资源不足");
            return;
          }
          PlaceGameMgr.inst.reqTrain(this.dataModel.buildingUid, this.dataModel.buildType, this._trainCount);
          this.onClose();
          App.log.logBusiness("\u53D1\u9001\u8BAD\u7EC3\u8BF7\u6C42 - \u5EFA\u7B51: " + this.dataModel.buildType + ", \u6570\u91CF: " + this._trainCount + ", \u6D88\u8017\u9053\u5177: " + JSON.stringify(costList));
        }

        /**
         * 英雄指派响应
         */;
        _proto.resBuildingDataChange = function resBuildingDataChange(msg) {
          if (msg.code !== 200 || !msg.building_uid) {
            return;
          }
          this.updateView();
        }

        /**
         * 英雄头像点击事件
         */;
        _proto.onHeroItemClick = function onHeroItemClick() {
          if (!this.dataModel) {
            return;
          }
          var curHeroId = this.dataModel.serverData.entry_hero || 0;
          UIMgr.inst.open(UI_ChooseHeroView, LayerType.panel, Layout_UI_ChooseHeroView, [{
            buildingUid: this.dataModel.buildingUid,
            buildType: this.dataModel.buildType,
            curHeroId: curHeroId
          }]);
        };
        return UI_TrainingView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_TrainingView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnSub"] = {
          method: "onBtnSubClick"
        }, _binding["btnAdd"] = {
          method: "onBtnAddClick"
        }, _binding["trainBtn"] = {
          method: "onStartTrain"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_TrainingView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_UnLockView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './PlaceGameEnum.ts', './UIListBase.ts', './Utils.ts', './PlaceConfigMgr.ts', './PlaceGameMgr.ts', './MonitorType.ts', './ConditionCell.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Sprite, ModuleContext, ModuleDef, App, BuildingType, UIListBase, Utils, PlaceConfigMgr, PlaceGameMgr, MonitorType, ConditionCell;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Sprite = module.Sprite;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BuildingType = module.BuildingType;
    }, function (module) {
      UIListBase = module.UIListBase;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ConditionCell = module.ConditionCell;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "1f0a5qOJllLyoYEq3jHb47R", "UI_UnLockView", undefined);
      var ccclass = _decorator.ccclass;
      var UI_UnLockView = exports('UI_UnLockView', (_dec = ccclass("UI_UnLockView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(UI_UnLockView, _UIListBase);
        function UI_UnLockView() {
          var _this;
          _this = _UIListBase.call(this, UI_UnLockView.custom) || this;
          _this.layoutObj = null;
          // 数据
          _this.dataModel = null;
          return _this;
        }
        var _proto = UI_UnLockView.prototype;
        _proto.onCreated = function onCreated(data) {
          this.layoutObj = this.layout;
          var comp = PlaceGameMgr.inst.getBuildingComp(data.buildingType, data.buildIndex);
          // this.actionTween(this.layoutObj.panel, TYPE_UI_VIEW.BOTTOM);
          if (comp) {
            if (data.buildingType === BuildingType.MoFang || data.buildingType === BuildingType.FaMuChang || data.buildingType === BuildingType.CaiKuangChang) {
              this.dataModel = comp.dataModel;
            } else if (data.buildingType === BuildingType.BuBingYing || data.buildingType === BuildingType.GongBingYing || data.buildingType === BuildingType.QiBingYing) {
              this.dataModel = comp.dataModel;
            } else {
              this.dataModel = comp.dataModel;
            }
          }
          this.addEventListeners();
          _UIListBase.prototype.onCreated.call(this);
          this.initNode();
          this.updateView();
        };
        _proto.initNode = function initNode() {
          this.initList();
          this.scrollList.content.removeAllChildren();
          this.scrollList.onItemRender = this.onItemRender.bind(this);
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuild, this.resBuild, this);
        };
        _proto.onItemRender = function onItemRender(item, index) {
          var data = this.scrollList.array[index];
          var cellComp = item.getComponent(ConditionCell);
          cellComp.show(data, index);
        }

        /**
         * 更新
         */;
        _proto.updateView = function updateView() {
          var buildingName = PlaceConfigMgr.inst.getBuildingName(this.dataModel.buildType);
          if (this.layoutObj.txtBuildingName) {
            this.layoutObj.txtBuildingName.string = "" + buildingName;
          }
          if (!this.dataModel.isUnlocked) {
            this._updateUnlockConditions();
            var time = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, 1);
            this.layoutObj.buildTimeLab.string = Utils.timeFormat(time);
            if (this._checkBuildCondition()) {
              this.layoutObj.btnBuild.interactable = true;
              this.layoutObj.btnBuild.node.getComponent(Sprite).grayscale = false;
            } else {
              this.layoutObj.btnBuild.interactable = false;
              this.layoutObj.btnBuild.node.getComponent(Sprite).grayscale = true;
            }
          } else {
            // 已经解锁
            App.log.logError("出错了，已经解锁的建造不可能进入解锁界面");
          }
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
        }

        /**
         * 更新解锁条件显示
         */;
        _proto._updateUnlockConditions = function _updateUnlockConditions() {
          var config = PlaceConfigMgr.inst.getBuildingUnLockConfig(this.dataModel.buildType, this.dataModel.level + 1);
          var jianzhulimit = config.jianzhulimit;
          var cost_item = config.cost_item;
          var conditionArr = [];
          if (jianzhulimit && jianzhulimit.length > 0) {
            for (var i = 0; i < jianzhulimit.length; i++) {
              var limit = jianzhulimit[i];
              var data = {
                type: 1,
                buildType: limit[0],
                level: limit[1]
              };
              data.type = 1;
              data.buildType = limit[0];
              data.level = limit[1];
              conditionArr.push(data);
            }
          }
          if (cost_item && cost_item.length > 0) {
            for (var _i = 0; _i < cost_item.length; _i++) {
              var item = cost_item[_i];
              var _data = {
                type: 2,
                itemId: item[0],
                count: item[1]
              };
              _data.type = 2;
              _data.itemId = item[0];
              _data.count = item[1];
              conditionArr.push(_data);
            }
          }
          this.scrollList.array = conditionArr;
        }

        /**
         * 检查建造条件
         */;
        _proto._checkBuildCondition = function _checkBuildCondition() {
          var config = PlaceConfigMgr.inst.getBuildingUnLockConfig(this.dataModel.buildType, this.dataModel.level + 1);
          var jianzhulimit = config.jianzhulimit;
          var cost_item = config.cost_item;
          if (jianzhulimit && jianzhulimit.length > 0) {
            for (var i = 0; i < jianzhulimit.length; i++) {
              var limit = jianzhulimit[i];
              var maxLevel = PlaceGameMgr.inst.getMaxLevelByBuildType(limit[0]);
              if (maxLevel < limit[1]) {
                return false;
              }
            }
          }
          if (cost_item && cost_item.length > 0) {
            if (!App.bagMgr.checkPropEnoughList(cost_item, false)) {
              return false;
            }
          }
          return true;
        }

        /**
         * 建造按钮点击事件
         */;
        _proto.onBuildClick = function onBuildClick() {
          var canBuild = this._checkBuildCondition();
          if (canBuild) {
            PlaceGameMgr.inst.reqBuild(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            App.log.logBusiness("建造条件不满足");
          }
        };
        _proto.resBuild = function resBuild(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this.dataModel.buildingUid) {
            return;
          }
          this.onClose();
          // PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
        };

        return UI_UnLockView;
      }(UIListBase), _class2.custom = {
        prefab: "prefab/view/UI_UnLockView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBuild"] = {
          method: "onBuildClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_UnLockView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ui_Victory.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIListBase.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ModuleDef, ModuleContext, UIListBase, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIListBase = module.UIListBase;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "436f4dBKCxBALGPR3gcm5kv", "ui_Victory", undefined);
      var ccclass = _decorator.ccclass;
      var ui_Victory = exports('ui_Victory', (_dec = ccclass("ui_Victory"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(ui_Victory, _UIListBase);
        function ui_Victory() {
          var _this;
          _this = _UIListBase.call(this, ui_Victory.custom) || this;
          _this._isClosing = false;
          return _this;
        }
        var _proto = ui_Victory.prototype;
        _proto.onCreated = function onCreated(items) {
          _UIListBase.prototype.onCreated.call(this, items);
          // this.itemPrefab = items;
          this.initList();
          this.scrollList.array = items;
        };
        _proto.onBtnRest = /*#__PURE__*/function () {
          var _onBtnRest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _context.next = 2;
                  return App.battleMgr.onExit(0, function () {}, false);
                case 2:
                  _context.next = 4;
                  return new Promise(function (resolve) {
                    return setTimeout(resolve, 2000);
                  });
                case 4:
                  App.dungeonBattleMgr.ReqEnterDungeon(App.battleMgr.challengeGuanQiaId);
                  this.onClose();
                  this.release();
                case 7:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function onBtnRest() {
            return _onBtnRest.apply(this, arguments);
          }
          return onBtnRest;
        }();
        _proto.onBtnBack = function onBtnBack() {
          var _this2 = this;
          // 防止重复点击
          if (this._isClosing) {
            App.log.logError("正在关闭，不可重复关闭");
            return;
          }
          this._isClosing = true;
          App.battleMgr.onExit(0, function (result) {
            if (result === 0) {
              _this2.onClose();
              _this2.release();
            }
          });
        };
        _proto.onBtnData = function onBtnData() {
          // UIMgr.inst.openOnce(ui_Data, LayerType.panel, Layout_uiData, [
          //     this._monsterDrops
          // ]);
        }
        /**
         * 下一关
         */;
        _proto.onBtnNext = /*#__PURE__*/
        function () {
          var _onBtnNext = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  this.onBtnBack();
                // const currentGuanQiaId = TeamMgr.inst.getRandomDungeonId();
                // if (!currentGuanQiaId || currentGuanQiaId <= 0) {
                //     App.log.logError("当前没有有效的关卡ID，无法重新进入战斗");
                //     this.onClose();
                //     return;
                // }

                // this._isClosing = true;
                // this.onClose();

                // try {
                //     // 1. 先退出当前战斗，清理战斗状态
                //     await App.battleMgr.onExit(0, null, false);
                //     // App.monitorMgr.dispatchEvent(MonitorType.battle_flow_back_home);

                //     // 3. 等待一帧确保清理完成
                //     await new Promise(resolve => setTimeout(resolve, 1000));

                //     // 4. 重新请求进入副本
                //     App.dungeonBattleMgr.ReqEnterDungeon(currentGuanQiaId);

                //     App.log.logBusiness(`重新进入关卡: ${currentGuanQiaId}`);
                // } catch (error) {
                //     App.log.logError("重新进入战斗失败:", error);
                //     // 失败时返回主城
                //     App.monitorMgr.dispatchEvent(MonitorType.battle_flow_back_home);
                // } finally {
                //     this._isClosing = false;
                // }
                case 1:
                case "end":
                  return _context2.stop();
              }
            }, _callee2, this);
          }));
          function onBtnNext() {
            return _onBtnNext.apply(this, arguments);
          }
          return onBtnNext;
        }();
        return ui_Victory;
      }(UIListBase), _class2.custom = {
        prefab: "prefabs/view/uiVictory",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onBtnBack"
        }, _binding["btnBack"] = {
          method: "onBtnBack"
        }, _binding["btnNext"] = {
          method: "onBtnNext"
        }, _binding["btnData"] = {
          method: "onBtnData"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(ui_Victory, ModuleDef.GAME_SETTLEMENT);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_ZhuangBanView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './RoleItem.ts', './Prompt.ts', './DBRecord.ts', './MonitorType.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, cclegacy, _decorator, Label, UIBase, ModuleContext, ModuleDef, App, RoleItem, RoleItemMode, Prompt, DBRecord, MonitorType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      RoleItem = module.RoleItem;
      RoleItemMode = module.RoleItemMode;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "f8a35jtv4dGBZXJt0/vcON1", "UI_ZhuangBanView", undefined);
      var ccclass = _decorator.ccclass;

      /**
       * 头像数据接口
       */

      var UI_ZhuangBanView = exports('UI_ZhuangBanView', (_dec = ccclass("UI_ZhuangBanView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_ZhuangBanView, _UIBase);
        function UI_ZhuangBanView() {
          var _this;
          _this = _UIBase.call(this, UI_ZhuangBanView.custom) || this;
          _this.layoutObj = null;
          /** 头像列表数据 */
          _this._avatarList = [];
          /** 当前选中的头像ID */
          _this._selectedHeadId = 0;
          /** 当前使用中的头像ID */
          _this._curHeadId = 0;
          /** 当前选中的 RoleItem 组件 */
          _this._selectedItem = null;
          return _this;
        }
        var _proto = UI_ZhuangBanView.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
          _UIBase.prototype.onDispose.call(this);
          this._selectedItem = null;
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          App.roleMgr.reqHeadPictureList();
        };
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResSetHead, this.resSetHead, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResHeadPictureList, this.resHeadPictureList, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAddHeadPicture, this.resAddHeadPicture, this);
        }

        /**
         * 初始化UI
         */;
        _proto.init = function init() {
          this.makeAvatarData();
          this.createAvatarList();
          this.updateCurRoleItem();
          this.updateButtonState();
        }

        /**
         * 组装头像数据
         */;
        _proto.makeAvatarData = function makeAvatarData() {
          var gexinghuaConfigs = DBRecord.fetchAll("Gexinghua");
          if (!gexinghuaConfigs || gexinghuaConfigs.length === 0) {
            App.log.logError("Gexinghua 配置表为空");
            return;
          }
          var curHeadId = App.roleMgr.getHeadId();
          var unlockedList = App.roleMgr.getUnlockedHeadList();
          this._avatarList = [];
          for (var _iterator = _createForOfIteratorHelperLoose(gexinghuaConfigs), _step; !(_step = _iterator()).done;) {
            var config = _step.value;
            var isUnlocked = unlockedList.includes(config.id);
            var isInUse = config.id === curHeadId;
            this._avatarList.push({
              headId: config.id,
              // 头像ID
              isUnlocked: isUnlocked,
              // 是否解锁
              isInUse: isInUse,
              // 是否使用中
              gainWay: config.gain_way || [] // 获得方式 [type, id]
            });

            if (isInUse) {
              this._curHeadId = config.id;
              this._selectedHeadId = config.id;
            }
          }
          this._avatarList.sort(function (a, b) {
            if (a.isUnlocked !== b.isUnlocked) {
              return a.isUnlocked ? -1 : 1;
            }
            return a.headId - b.headId;
          });
        }

        /**
         * 响应头像列表
         */;
        _proto.resHeadPictureList = function resHeadPictureList() {
          this.init();
        }

        /**
         * 响应新增头像
         */;
        _proto.resAddHeadPicture = function resAddHeadPicture() {
          this.makeAvatarData();
          this.createAvatarList();
        }

        /**
         * 创建头像列表
         */;
        _proto.createAvatarList = function createAvatarList() {
          if (!this.layoutObj.scrollList) {
            return;
          }
          this.layoutObj.scrollList.onItemRender = this.onItemRender.bind(this);
          this.layoutObj.scrollList.array = this._avatarList;
        };
        _proto.onItemRender = function onItemRender(itemNode, index, data) {
          var _this2 = this;
          var roleItem = itemNode.getComponent(RoleItem);
          if (!roleItem) {
            App.log.logError("RoleItem 组件不存在");
            return;
          }
          roleItem.show(RoleItemMode.DRESS_SELECT, data.headId, data.isUnlocked, data.isInUse);
          roleItem.setSelectCallback(function (headId, item) {
            _this2.onAvatarSelected(headId, item);
          });
          if (data.isInUse) {
            this._selectedItem = roleItem;
            this._selectedHeadId = data.headId;
            roleItem.setSelected(true);
          }
        };
        _proto.onAvatarSelected = function onAvatarSelected(headId, item) {
          if (this._selectedItem && this._selectedItem !== item) {
            this._selectedItem.setSelected(false);
          }
          this._selectedHeadId = headId;
          this._selectedItem = item;
          item.setSelected(true);
          this.updateButtonState();
          this.updateCurRoleItem();
        }

        /**
         * 确认按钮点击
         */;
        _proto.onBtnConfirmClick = function onBtnConfirmClick() {
          if (!this._selectedHeadId || this._selectedHeadId === this._curHeadId) {
            this.onClose();
            return;
          }
          App.roleMgr.reqSetHead(this._selectedHeadId);
        }

        /**
         * 响应设置头像
         */;
        _proto.resSetHead = function resSetHead(obj) {
          if (obj.code !== 200) {
            Prompt.popTip("头像更换失败");
            return;
          }
          var headId = obj.head_id;
          if (!headId) {
            return;
          }
          this._curHeadId = headId;
          for (var _iterator2 = _createForOfIteratorHelperLoose(this._avatarList), _step2; !(_step2 = _iterator2()).done;) {
            var avatar = _step2.value;
            avatar.isInUse = avatar.headId === headId;
          }
          this.updateCurRoleItem();
          this.updateButtonState();

          // 刷新滚动列表显示
          if (this.layoutObj.scrollList) {
            this.layoutObj.scrollList.updateAllItems();
          }
          Prompt.popTip("头像更换成功");
        }

        /**
         * 更新当前使用的头像组件
         */;
        _proto.updateCurRoleItem = function updateCurRoleItem() {
          if (!this.layoutObj.curRoleItem) {
            return;
          }
          if (this._selectedHeadId > 0) {
            this.layoutObj.curRoleItem.show(RoleItemMode.NORMAL, this._selectedHeadId, true, true);
          } else {
            var curHeadId = this._curHeadId || App.roleMgr.getHeadId();
            this.layoutObj.curRoleItem.show(RoleItemMode.NORMAL, curHeadId, true, true);
          }
        }

        /**
         * 获取解锁条件文本
         * @param headId 头像ID
         */;
        _proto.getUnlockConditionText = function getUnlockConditionText(headId) {
          var gexinghuaConfig = DBRecord.fetchId("Gexinghua", headId);
          if (!gexinghuaConfig || !gexinghuaConfig.desc) {
            return "未知解锁条件";
          }
          return gexinghuaConfig.desc;
        }

        /**
         * 更新按钮显示状态
         */;
        _proto.updateButtonState = function updateButtonState() {
          var _this3 = this;
          if (!this._selectedItem) {
            return;
          }
          var selectedData = this._avatarList.find(function (item) {
            return item.headId === _this3._selectedHeadId;
          });
          if (!selectedData) {
            return;
          }
          if (!selectedData.isUnlocked) {
            // 未解锁
            if (this.layoutObj.canotUseNode) {
              this.layoutObj.canotUseNode.active = true;
            }
            if (this.layoutObj.btnConfirm) {
              this.layoutObj.btnConfirm.node.active = false;
            }
            this.layoutObj.hadLabNode.active = false;
            this.layoutObj.noUseLab.active = true;
            if (this.layoutObj.unlockLab) {
              var unlockText = this.getUnlockConditionText(selectedData.headId);
              var label = this.layoutObj.unlockLab.getComponent(Label);
              if (label) {
                label.string = unlockText;
              }
              this.layoutObj.unlockLab.active = true;
            }
          } else {
            if (this.layoutObj.unlockLab) {
              this.layoutObj.unlockLab.active = false;
            }
            if (this._curHeadId === this._selectedHeadId) {
              this.layoutObj.canotUseNode.active = true;
              this.layoutObj.btnConfirm.node.active = false;
              this.layoutObj.hadLabNode.active = true;
              this.layoutObj.noUseLab.active = false;
            } else {
              this.layoutObj.canotUseNode.active = false;
              this.layoutObj.btnConfirm.node.active = true;
              this.layoutObj.hadLabNode.active = false;
              this.layoutObj.noUseLab.active = true;
            }
          }
        };
        return UI_ZhuangBanView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_ZhuangBanView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnConfirm"] = {
          method: "onBtnConfirmClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_ZhuangBanView, ModuleDef.GAME_ROLE);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UI_ZiYuanGetView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts', './PlaceGameMgr.ts', './PlaceConfigMgr.ts', './PlaceGameEnum.ts', './MonitorType.ts', './ZiYuanCellItem.ts', './UIUtil.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, UIBase, ModuleContext, ModuleDef, App, PlaceGameMgr, PlaceConfigMgr, BuildingType, SoldierType, MonitorType, ZiYuanCellItem, UIUtil;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      BuildingType = module.BuildingType;
      SoldierType = module.SoldierType;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ZiYuanCellItem = module.ZiYuanCellItem;
    }, function (module) {
      UIUtil = module.UIUtil;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "85c61PpyBtDTbLIqasNP9m2", "UI_ZiYuanGetView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var UI_ZiYuanGetView = exports('UI_ZiYuanGetView', (_dec = ccclass("UI_ZiYuanGetView"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UI_ZiYuanGetView, _UIBase);
        function UI_ZiYuanGetView() {
          var _this;
          _this = _UIBase.call(this, UI_ZiYuanGetView.custom) || this;
          _this.layoutObj = null;
          _this._ziYuanDataList = [];
          return _this;
        }
        var _proto = UI_ZiYuanGetView.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          App.monitorMgr.offTarget(this);
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListeners = function addEventListeners() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResQueryZiYuanYuanInfo, this.resQueryZiYuanYuanInfo, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetZiYuan, this.resGetZiYuan, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResOneKey, this.resOneKey, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResGetReserve, this.resGetReserve, this);
        };
        _proto.onCreated = function onCreated(data) {
          _UIBase.prototype.onCreated.call(this);
          this.layoutObj = this.layout;
          this.addEventListeners();
          this.initNode();
          this.requestZiYuanData();
        }

        /**
         * 初始化节点
         */;
        _proto.initNode = function initNode() {
          if (this.layoutObj.ziYuanScrollList) {
            this.layoutObj.ziYuanScrollList.content.removeAllChildren();
            this.layoutObj.ziYuanScrollList.onItemRender = this.onItemRender.bind(this);
          }
        }

        /**
         * 请求资源数据
         */;
        _proto.requestZiYuanData = function requestZiYuanData() {
          PlaceGameMgr.inst.reqQueryZiYuanYuanInfo();
        }

        /**
         * 响应查询资源信息
         */;
        _proto.resQueryZiYuanYuanInfo = function resQueryZiYuanYuanInfo(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u67E5\u8BE2\u8D44\u6E90\u4FE1\u606F\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          this._ziYuanDataList = [];
          if (msg.reserve_persons && msg.reserve_persons.length > 0) {
            for (var i = 0; i < msg.reserve_persons.length; i++) {
              var person = msg.reserve_persons[i];
              var _this$getSoldierBuild = this.getSoldierBuildingInfo(person.soldiertype),
                buildingId = _this$getSoldierBuild.buildingId,
                buildingName = _this$getSoldierBuild.buildingName;
              var buildingUid = PlaceGameMgr.inst.getBuildingUidByType(buildingId);
              var item = person.items[0];
              var canCollect = item && item.num > 0;
              var cellData = {
                buildingUid: buildingUid,
                buildingId: buildingId,
                buildingName: buildingName,
                item: item,
                solderNum: person.count,
                canCollect: canCollect
              };
              this._ziYuanDataList.push(cellData);
            }
          }
          this.updateView();
        }

        /**
         * 根据士兵类型获取对应的兵营信息
         * @param soldierType 士兵类型
         * @returns 兵营ID和名称
         */;
        _proto.getSoldierBuildingInfo = function getSoldierBuildingInfo(soldierType) {
          var buildingId;
          switch (soldierType) {
            case SoldierType.BuBing:
              buildingId = BuildingType.BuBingYing;
              break;
            case SoldierType.GongBing:
              buildingId = BuildingType.GongBingYing;
              break;
            case SoldierType.QiBing:
              buildingId = BuildingType.QiBingYing;
              break;
            default:
              App.log.logError("\u672A\u77E5\u7684\u58EB\u5175\u7C7B\u578B: " + soldierType);
              buildingId = BuildingType.BuBingYing;
              break;
          }
          var buildingName = PlaceConfigMgr.inst.getBuildingName(buildingId);
          return {
            buildingId: buildingId,
            buildingName: buildingName
          };
        }

        /**
         * 更新视图
         */;
        _proto.updateView = function updateView() {
          if (!this.layoutObj.ziYuanScrollList) {
            return;
          }
          this.layoutObj.ziYuanScrollList.array = this._ziYuanDataList;
          this.updateOneKeyButton();
        }

        /**
         * 更新一键领取按钮状态
         */;
        _proto.updateOneKeyButton = function updateOneKeyButton() {
          if (!this.layoutObj.btnOneKey) {
            return;
          }
          var hasCollectable = this._ziYuanDataList.some(function (data) {
            return data.canCollect;
          });
          UIUtil.setButtonEnable(this.layoutObj.btnOneKey, hasCollectable, true);
        }

        /**
         * 渲染列表项
         */;
        _proto.onItemRender = function onItemRender(node, index) {
          if (!node || !this.layoutObj.ziYuanScrollList.array || index < 0 || index >= this.layoutObj.ziYuanScrollList.array.length) {
            return;
          }
          var data = this.layoutObj.ziYuanScrollList.array[index];
          if (!data) {
            return;
          }
          var cellComp = node.getComponent(ZiYuanCellItem);
          if (cellComp) {
            cellComp.show(data, index);
          }
        }

        /**
         * 一键领取按钮点击
         */;
        _proto.onBtnOneKeyClick = function onBtnOneKeyClick() {
          App.log.logBusiness("一键领取资源");
          PlaceGameMgr.inst.reqOneKey();
        }

        /**
         * 领取资源响应
         */;
        _proto.resGetZiYuan = function resGetZiYuan(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u9886\u53D6\u8D44\u6E90\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("\u9886\u53D6\u8D44\u6E90\u6210\u529F - \u5EFA\u7B51UID: " + msg.building_uid + ", \u5EFA\u7B51ID: " + msg.building_id);
          this.requestZiYuanData();
        };
        _proto.resGetReserve = function resGetReserve(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u9886\u53D6\u8D44\u6E90\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("\u9886\u53D6\u8D44\u6E90\u6210\u529F - \u5EFA\u7B51UID: " + msg.building_uid + ", \u5EFA\u7B51ID: " + msg.building_id);
          this.requestZiYuanData();
        }

        /**
         * 一键领取响应
         */;
        _proto.resOneKey = function resOneKey(msg) {
          if (msg.code !== 200) {
            App.log.logError("\u4E00\u952E\u9886\u53D6\u5931\u8D25 - \u9519\u8BEF\u7801: " + msg.code);
            return;
          }
          App.log.logBusiness("一键领取成功");
          this.requestZiYuanData();
        };
        return UI_ZiYuanGetView;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/UI_ZiYuanGetView",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onClose"
        }, _binding["btnOneKey"] = {
          method: "onBtnOneKeyClick"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(UI_ZiYuanGetView, ModuleDef.PLACE_GAME);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UIActionMgr.ts", ['cc'], function (exports) {
  var cclegacy, UITransform, Vec3, tween;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
      tween = module.tween;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b0d41UvTvlK9bVFrpJM3xT9", "UIActionMgr", undefined);
      var TYPE_UI_VIEW = exports('TYPE_UI_VIEW', /*#__PURE__*/function (TYPE_UI_VIEW) {
        TYPE_UI_VIEW[TYPE_UI_VIEW["ALL"] = 0] = "ALL";
        TYPE_UI_VIEW[TYPE_UI_VIEW["CONTENT"] = 1] = "CONTENT";
        TYPE_UI_VIEW[TYPE_UI_VIEW["TOP"] = 2] = "TOP";
        TYPE_UI_VIEW[TYPE_UI_VIEW["BOTTOM"] = 3] = "BOTTOM";
        return TYPE_UI_VIEW;
      }({}));
      /**
       * 界面动画管理器
       */
      var UIActionManager = exports('UIActionManager', /*#__PURE__*/function () {
        function UIActionManager() {}
        var _proto = UIActionManager.prototype;
        /**
         * 获取缓动函数
         */
        _proto.getEasingFunction = function getEasingFunction(easingName) {
          if (!easingName) {
            return "cubicOut"; // 默认缓动
          }

          // 如果是自定义函数，直接返回
          if (typeof easingName === "function") {
            return easingName;
          }

          // 从映射表中获取
          var easing = UIActionManager.EASING_MAP[easingName];
          if (easing) {
            return easing;
          }
          console.warn("\u672A\u627E\u5230\u7F13\u52A8\u51FD\u6570: " + easingName + "\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u7F13\u52A8");
          return "cubicOut";
        }

        /**
         * 动画效果
         * @param node 节点
         * @param type 界面类型
         * @param appearFrom 出现方向
         * @param callback 完成回调
         * @param config 自定义动画配置
         */;
        _proto.actionTween = function actionTween(node, type, appearFrom, callback, config) {
          var _config$duration, _config$easing, _config$opacityFrom, _config$opacityTo, _config$scaleFrom;
          if (!node || !node.isValid) {
            callback == null || callback();
            return;
          }

          // 动画配置
          var animConfig = {
            duration: (_config$duration = config == null ? void 0 : config.duration) != null ? _config$duration : 0.3,
            easing: (_config$easing = config == null ? void 0 : config.easing) != null ? _config$easing : "cubicOut",
            opacityFrom: (_config$opacityFrom = config == null ? void 0 : config.opacityFrom) != null ? _config$opacityFrom : 0,
            opacityTo: (_config$opacityTo = config == null ? void 0 : config.opacityTo) != null ? _config$opacityTo : 255,
            scaleFrom: (_config$scaleFrom = config == null ? void 0 : config.scaleFrom) != null ? _config$scaleFrom : 0.6
          };

          // 获取原始状态
          var orgPos = node.getPosition();
          var orgScale = node.scale.clone();
          var uiTransform = node.getComponent(UITransform);

          // 设置初始状态并激活节点
          node.active = true;
          node.opacity = animConfig.opacityFrom;

          // 根据类型和方向确定动画方式
          var tweenAction = null;

          // 自动判断动画方向
          if (!appearFrom) {
            appearFrom = this.getAutoAppearDirection(type);
          }

          // 获取缓动函数
          var easingFunc = this.getEasingFunction(typeof animConfig.easing === "string" ? animConfig.easing : undefined);

          // 执行对应的动画
          switch (appearFrom) {
            case "bottom":
              tweenAction = this.createBottomAnimation(node, orgPos, uiTransform, animConfig, easingFunc);
              break;
            case "top":
              tweenAction = this.createTopAnimation(node, orgPos, uiTransform, animConfig, easingFunc);
              break;
            case "left":
              tweenAction = this.createLeftAnimation(node, orgPos, uiTransform, animConfig, easingFunc);
              break;
            case "right":
              tweenAction = this.createRightAnimation(node, orgPos, uiTransform, animConfig, easingFunc);
              break;
            case "scale":
            default:
              tweenAction = this.createScaleAnimation(node, orgScale, animConfig, easingFunc);
              break;
          }

          // 执行动画并回调
          if (tweenAction) {
            tweenAction.call(function () {
              if (uiTransform && appearFrom === "scale") {
                // 重新设置一次尺寸（如果需要）
                // 修改为设备的分辨率
                var frameSize = {
                  width: 720,
                  height: 1280
                };

                // 尝试多种方式获取帧大小
                // if (window["cc"]?.view?.getFrameSize) {
                //     frameSize = window["cc"].view.getFrameSize();
                // } else if (window["cc"]?.view?.frameSize) {
                //     frameSize = window["cc"].view.frameSize;
                // } else if (window.innerWidth && window.innerHeight) {
                //     // 回退到窗口尺寸
                //     frameSize = { width: window.innerWidth, height: window.innerHeight };
                // }
                var nodeParent = node.parent;
                if (nodeParent) {
                  frameSize.width = nodeParent.getComponent(UITransform).width;
                  frameSize.height = nodeParent.getComponent(UITransform).height;
                }
                if (frameSize && uiTransform) {
                  uiTransform.width = frameSize.width;
                  uiTransform.height = frameSize.height;

                  // 可选：记录日志用于调试
                  console.log("UI\u5C3A\u5BF8\u8C03\u6574\u4E3A: " + frameSize.width + " x " + frameSize.height);
                }
              }
              callback == null || callback();
            }).start();
          } else {
            node.opacity = animConfig.opacityTo;
            callback == null || callback();
          }
        }

        /**
         * 从下方进入动画
         */;
        _proto.createBottomAnimation = function createBottomAnimation(node, orgPos, uiTransform, config, easing) {
          var startPos = new Vec3(orgPos.x, -uiTransform.height, orgPos.z);
          node.setPosition(startPos);
          return tween(node).to(config.duration, {
            position: orgPos,
            opacity: config.opacityTo
          }, {
            easing: easing
          });
        }

        /**
         * 从上方进入动画
         */;
        _proto.createTopAnimation = function createTopAnimation(node, orgPos, uiTransform, config, easing) {
          var startPos = new Vec3(orgPos.x, uiTransform.height, orgPos.z);
          node.setPosition(startPos);
          return tween(node).to(config.duration, {
            position: orgPos,
            opacity: config.opacityTo
          }, {
            easing: easing
          });
        }

        /**
         * 从左侧进入动画
         */;
        _proto.createLeftAnimation = function createLeftAnimation(node, orgPos, uiTransform, config, easing) {
          var startPos = new Vec3(-uiTransform.width, orgPos.y, orgPos.z);
          node.setPosition(startPos);
          return tween(node).to(config.duration, {
            position: orgPos,
            opacity: config.opacityTo
          }, {
            easing: easing
          });
        }

        /**
         * 从右侧进入动画
         */;
        _proto.createRightAnimation = function createRightAnimation(node, orgPos, uiTransform, config, easing) {
          var startPos = new Vec3(uiTransform.width, orgPos.y, orgPos.z);
          node.setPosition(startPos);
          return tween(node).to(config.duration, {
            position: orgPos,
            opacity: config.opacityTo
          }, {
            easing: easing
          });
        }

        /**
         * 缩放动画
         */;
        _proto.createScaleAnimation = function createScaleAnimation(node, orgScale, config, easing) {
          node.setScale(config.scaleFrom, config.scaleFrom, orgScale.z);
          return tween(node).to(config.duration, {
            scale: orgScale,
            opacity: config.opacityTo
          }, {
            easing: easing
          });
        }

        /**
         * 根据类型自动判断动画方向
         */;
        _proto.getAutoAppearDirection = function getAutoAppearDirection(type) {
          switch (type) {
            case TYPE_UI_VIEW.BOTTOM:
              return "bottom";
            case TYPE_UI_VIEW.TOP:
              return "top";
            case TYPE_UI_VIEW.CONTENT:
            case TYPE_UI_VIEW.ALL:
            default:
              return "scale";
          }
        }

        /**
         * 关闭界面动画（反向动画）
         */;
        _proto.hideTween = function hideTween(node, disappearTo, callback, config) {
          var _config$duration2, _config$easing2, _config$opacityTo2, _config$scaleTo;
          if (!node || !node.isValid) {
            callback == null || callback();
            return;
          }
          var animConfig = {
            duration: (_config$duration2 = config == null ? void 0 : config.duration) != null ? _config$duration2 : 0.3,
            easing: (_config$easing2 = config == null ? void 0 : config.easing) != null ? _config$easing2 : "cubicIn",
            opacityTo: (_config$opacityTo2 = config == null ? void 0 : config.opacityTo) != null ? _config$opacityTo2 : 0,
            scaleTo: (_config$scaleTo = config == null ? void 0 : config.scaleTo) != null ? _config$scaleTo : 0.6
          };
          var orgPos = node.getPosition();
          var uiTransform = node.getComponent(UITransform);

          // 获取缓动函数
          var easingFunc = this.getEasingFunction(typeof animConfig.easing === "string" ? animConfig.easing : undefined);
          var tweenAction = null;
          switch (disappearTo) {
            case "bottom":
              var bottomEndPos = new Vec3(orgPos.x, -uiTransform.height, orgPos.z);
              tweenAction = tween(node).to(animConfig.duration, {
                position: bottomEndPos,
                opacity: animConfig.opacityTo
              }, {
                easing: easingFunc
              });
              break;
            case "top":
              var topEndPos = new Vec3(orgPos.x, uiTransform.height, orgPos.z);
              tweenAction = tween(node).to(animConfig.duration, {
                position: topEndPos,
                opacity: animConfig.opacityTo
              }, {
                easing: easingFunc
              });
              break;
            case "scale":
            default:
              var endScale = new Vec3(animConfig.scaleTo, animConfig.scaleTo, node.scale.z);
              tweenAction = tween(node).to(animConfig.duration, {
                scale: endScale,
                opacity: animConfig.opacityTo
              }, {
                easing: easingFunc
              });
              break;
          }
          if (tweenAction) {
            tweenAction.call(function () {
              node.active = false;
              callback == null || callback();
            }).start();
          } else {
            node.active = false;
            callback == null || callback();
          }
        };
        return UIActionManager;
      }());
      // 缓动函数映射表
      UIActionManager.EASING_MAP = {
        // 标准缓动
        linear: "linear",
        smooth: "smooth",
        fade: "fade",
        // 二次缓动
        quadIn: "quadIn",
        quadOut: "quadOut",
        quadInOut: "quadInOut",
        quadOutIn: "quadOutIn",
        // 三次缓动
        cubicIn: "cubicIn",
        cubicOut: "cubicOut",
        cubicInOut: "cubicInOut",
        cubicOutIn: "cubicOutIn",
        // 四次缓动
        quartIn: "quartIn",
        quartOut: "quartOut",
        quartInOut: "quartInOut",
        quartOutIn: "quartOutIn",
        // 五次缓动
        quintIn: "quintIn",
        quintOut: "quintOut",
        quintInOut: "quintInOut",
        quintOutIn: "quintOutIn",
        // 正弦缓动
        sineIn: "sineIn",
        sineOut: "sineOut",
        sineInOut: "sineInOut",
        sineOutIn: "sineOutIn",
        // 指数缓动
        expoIn: "expoIn",
        expoOut: "expoOut",
        expoInOut: "expoInOut",
        expoOutIn: "expoOutIn",
        // 圆形缓动
        circIn: "circIn",
        circOut: "circOut",
        circInOut: "circInOut",
        circOutIn: "circOutIn",
        // 弹性缓动
        elasticIn: "elasticIn",
        elasticOut: "elasticOut",
        elasticInOut: "elasticInOut",
        elasticOutIn: "elasticOutIn",
        // 回弹缓动
        backIn: "backIn",
        backOut: "backOut",
        backInOut: "backInOut",
        backOutIn: "backOutIn",
        // 弹跳缓动
        bounceIn: "bounceIn",
        bounceOut: "bounceOut",
        bounceInOut: "bounceInOut",
        bounceOutIn: "bounceOutIn"
      };
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UIBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIMgr.ts', './Utils.ts', './App.ts', './EventType.ts', './UIActionMgr.ts'], function (exports) {
  var _createClass, _createForOfIteratorHelperLoose, cclegacy, _decorator, Node, Button, find, EventHandler, Label, Sprite, RichText, ScrollView, ProgressBar, sp, UIMgr, Utils, App, EventType, UIActionManager;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Button = module.Button;
      find = module.find;
      EventHandler = module.EventHandler;
      Label = module.Label;
      Sprite = module.Sprite;
      RichText = module.RichText;
      ScrollView = module.ScrollView;
      ProgressBar = module.ProgressBar;
      sp = module.sp;
    }, function (module) {
      UIMgr = module.UIMgr;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      UIActionManager = module.UIActionManager;
    }],
    execute: function () {
      cclegacy._RF.push({}, "78034bWnMZPwrpmxdNx2uMj", "UIBase", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var TYPE_UI_VIEW = exports('TYPE_UI_VIEW', /*#__PURE__*/function (TYPE_UI_VIEW) {
        TYPE_UI_VIEW[TYPE_UI_VIEW["ALL"] = 0] = "ALL";
        TYPE_UI_VIEW[TYPE_UI_VIEW["CONTENT"] = 1] = "CONTENT";
        TYPE_UI_VIEW[TYPE_UI_VIEW["TOP"] = 2] = "TOP";
        TYPE_UI_VIEW[TYPE_UI_VIEW["BOTTOM"] = 3] = "BOTTOM";
        return TYPE_UI_VIEW;
      }({}));
      var UIBase = exports('UIBase', /*#__PURE__*/function () {
        // public bundle:AssetManager.Bundle;

        function UIBase(custom) {
          this._custom = void 0;
          this._prefab = void 0;
          this._layer = void 0;
          //ui层级
          this._layout = void 0;
          //布局
          this._uiName = void 0;
          this._upper = void 0;
          this.node = void 0;
          this._uiAction = void 0;
          this._custom = custom;
          this._prefab = custom.prefab; //多余?
          this._uiAction = new UIActionManager();
        }
        var _proto = UIBase.prototype;
        _proto.setUIBaseData = function setUIBaseData(layer, layoutCls) {}

        /**
         * @en add button event handler
         * @zh 添加按钮事件
         * @param relativeNodePath to indicate a button node, can pass `string`|`Node`|`Button` here.
         * @param cb will be called when event emits. method format:(btn:Button,args:any)=>void
         * @param target the `this` argument of `cb`
         *  */;
        _proto.onButtonEvent = function onButtonEvent(relativeNodePath, cb, target, args) {
          if (!relativeNodePath) {
            console.log("onButtonEvent", relativeNodePath);
          }
          var buttonNode = null;
          if (relativeNodePath instanceof Node) {
            buttonNode = relativeNodePath;
          } else if (relativeNodePath instanceof Button) {
            buttonNode = relativeNodePath.node;
          } else {
            buttonNode = find(relativeNodePath, this.node);
          }
          if (!buttonNode) {
            return null;
          }
          var btn = buttonNode.getComponent(Button);
          var clickEvents = btn.clickEvents;
          var handler = new EventHandler();
          handler.target = this.node;
          handler.component = "EventAgent"; // this.constructor.name  //'EventAgent';
          handler.handler = "onButtonClicked";
          handler.customEventData = "" + UIBase._idBase++;
          //附加额外信息 供事件转发使用
          handler["$cb$"] = cb;
          handler["$target$"] = target;
          handler["$args$"] = args;
          clickEvents.push(handler);
          btn.clickEvents = clickEvents;
        }

        //setup this ui,called by UIMgr.
        ;

        _proto.setup = function setup(node, layerType, layoutCls, data) {
          this.node = node;
          this._layer = layerType;
          this._layout = layoutCls;
          if (this._layout) {
            this._layout = this.node.getComponent(this._layout);
          }
          //notify sub class to handle something.
          //节点创建完毕，调用子类的处理函数。
          // data ? this.onCreated(...data) : this.onCreated();
          App.monitorMgr.addEventListener(EventType.manager_to_view_update, this.update, this);
          this.bindControl();
          this._initLang(this.node);
        };
        _proto.bindControl = function bindControl() {
          var _this = this;
          //按钮绑定
          if (Object.keys(this._custom.binding).length === 0) {
            return;
          }
          var node_catch = this._layout;
          if (!this._layout) {
            this.node.addComponent("EventAgent");
            node_catch = {};
            this.node.walk(function (node) {
              if (node.name in _this._custom.binding) {
                node_catch[node.name] = node;
              }
            });
          }
          var _loop = function _loop() {
            var proto = _this._custom.binding[name];
            _this.onButtonEvent(node_catch[name], function () {
              _this[proto.method].call(_this, proto.customEventData);
            }, _this.node, proto.customEventData);
          };
          for (var name in this._custom.binding) {
            _loop();
          }
        }

        /**
         * @zh 隐藏并销毁此UI面板
         *  */;
        _proto.onClose = function onClose() {
          try {
            this.hidePopup(this.node);
            UIMgr.inst.onCloseUi(this);
            if (this.node && this.node.isValid) {
              App.monitorMgr.removeEventListener(EventType.manager_to_view_update, this.update, this);
              // 检查父节点是否存在并且有效
              if (this.node.parent && this.node.parent.isValid) {
                this.node.removeFromParent();
              } else {
                console.warn("UI\u5173\u95ED: " + this.uiName + " \u7684\u7236\u8282\u70B9\u65E0\u6548");
              }
              this.onDispose();
              if (this.node.isValid) {
                this.node.destroy();
              }
              this.node = null;
              App.log.logBusiness("页面关闭", this.uiName);
            } else {
              console.warn("UI\u5173\u95ED: " + this.uiName + " \u7684\u8282\u70B9\u4E3A\u7A7A\u6216\u65E0\u6548");
            }
            App.monitorMgr.dispatchEvent(EventType.ui_close, this);
          } catch (error) {
            console.error("UI\u5173\u95ED\u51FA\u9519 " + this.uiName + ":", error);
            this.node = null;
          }
        };
        _proto.release = function release() {
          // this.bundle?.release(this._prefab);
        }
        /**
         * 动画效果
         * @param node 节点
         * @param type 类型
         * @param type TYPE_UI_VIEW.BOTTOM 半屏界面
         * @param type TYPE_UI_VIEW.TOP 顶部界面
         * @param type TYPE_UI_VIEW.CONTENT 内容界面
         * @param type TYPE_UI_VIEW.ALL 全部界面
         * @param callback 完成回调
         */;
        _proto.actionTween = function actionTween(node, type, callback) {
          this._uiAction.actionTween(node, type);
        }

        // 弹窗关闭动画
        ;

        _proto.hidePopup = function hidePopup(node, callback) {
          this._uiAction.hideTween(node);
        }

        /**
         * 获得目标节点
         * @param name 节点唯一名称
         * @param rootNode 查找的起始节点
         * @returns 返回目标节点
         */;
        _proto.getNode = function getNode(name, rootNode) {
          var baseNode = rootNode != null ? rootNode : this.node;
          if (!baseNode) {
            return null;
          }
          var _node = baseNode.getChildByName(name);
          if (_node) {
            return _node;
          }
          var findNodeTree = function findNodeTree(node) {
            if (node.name === name) {
              return node;
            }
            if (node.children && node.children.length > 0) {
              for (var _iterator = _createForOfIteratorHelperLoose(node.children), _step; !(_step = _iterator()).done;) {
                var child = _step.value;
                var foundNode = findNodeTree(child);
                if (foundNode) {
                  return foundNode;
                }
              }
            }
            return null;
          };
          return findNodeTree(baseNode);
        }

        /**
         * 获得目标节点的控件
         * @param name 节点唯一名称
         * @param com 控件名称
         * @returns 返回目标节点的控件
         */;
        _proto.getCom = function getCom(name, com) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(com);
          }
        };
        _proto._initLang = function _initLang(node0) {
          if (!node0 || !node0.children) {
            return;
          }
          for (var _key in node0.children) {
            var node1 = node0.children[_key];
            if (!node1) {
              continue;
            }
            this._initLang(node1);
            var label = node1.getComponent(Label);
            if (!label) {
              continue;
            }
            var strs = node1.name.split("lang");
            if (strs.length !== 2) {
              continue;
            }
            label.string = Utils.getGlobalTxt(Number(strs[1]));
          }
        }

        /**
         * 获得目标节点的Sprite控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的Sprite控件
         */;
        _proto.getSprite = function getSprite(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(Sprite);
          }
        }

        /**
         * 获得目标节点的Button控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的Button控件
         */;
        _proto.getButton = function getButton(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(Button);
          }
        }

        /**
         * 获得目标节点的Label控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的Label控件
         */;
        _proto.getLabel = function getLabel(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(Label);
          }
        }

        /**
         * 获得目标节点的RichText控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的RichText控件
         */;
        _proto.getRichText = function getRichText(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(RichText);
          }
        }

        /**
         * 获得目标节点的ScrollView控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的ScrollView控件
         */;
        _proto.getScrollView = function getScrollView(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(ScrollView);
          }
        }

        /**
         * 获得目标节点的ProgressBar控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的ProgressBar控件
         */;
        _proto.getProgressBar = function getProgressBar(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(ProgressBar);
          }
        }

        /**
         * 获得目标节点的sp.Skeleton控件
         * @param name 节点唯一名称
         * @returns 返回目标节点的sp.Skeleton控件
         */;
        _proto.getSpine = function getSpine(name) {
          var _node = this.getNode(name);
          if (_node) {
            return _node.getComponent(sp.Skeleton);
          }
        };
        //子类的所有操作，需要在这个函数之后。
        _proto.onCreated = function onCreated() {};
        _proto.update = function update(dt) {}
        //销毁
        ;

        _proto.onDispose = function onDispose() {}

        /***
         * @en url of the prefab used by this ui panel.
         * @zh 本UI使用prefab路径
         *  */;
        _proto.setUpper = function setUpper(upper) {
          this._upper = upper;
        };
        _proto.getUpper = function getUpper() {
          return this._upper;
        };
        _createClass(UIBase, [{
          key: "uiName",
          get: function get() {
            return this._uiName;
          },
          set: function set(name) {
            this._uiName = name;
          }
        }, {
          key: "prefab",
          get: function get() {
            return this._prefab;
          }

          /***
           * @en layer of this ui panel.
           * @zh 本UI所在的UI层级
           *  */
        }, {
          key: "layer",
          get: function get() {
            return this._layer;
          }

          /***
           * @en layout of this ui panel.
           * @zh 本UI所在的UI层级
           *  */
        }, {
          key: "layout",
          get: function get() {
            return this._layout;
          }
        }]);
        return UIBase;
      }());
      UIBase._idBase = 1000;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiBroadcast.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIBase.ts', './GameStateMgr.ts', './App.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, ModuleDef, ModuleContext, UIBase, GameState, App, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      GameState = module.GameState;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "951c8anJCtEXou/ISYe8LF/", "uiBroadcast", undefined);
      var uiBroadcast = exports('uiBroadcast', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiBroadcast, _UIBase);
        function uiBroadcast() {
          var _this;
          _this = _UIBase.call(this, uiBroadcast.custom) || this;
          _this._lbrDesc = null;
          _this._isPlaying = false;
          App.monitorMgr.addEventListener(EventType.manager_to_view_update, _this.update, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = uiBroadcast.prototype;
        _proto.onCreated = function onCreated(callBack) {
          _UIBase.prototype.onCreated.call(this);
          this._lbrDesc = this.getRichText("lbrDesc");
          this.show();
        };
        _proto.show = function show(delay) {
          var _this2 = this;
          if (delay === void 0) {
            delay = 0;
          }
          var msg = "";
          if (App.broadcastMgr.backMsgList.length > 0) {
            msg = App.broadcastMgr.backMsgList.shift();
          } else if (App.broadcastMgr.gameMsgList.length > 0) {
            if (App.gameStateMgr.state === GameState.City) {
              msg = App.broadcastMgr.gameMsgList.shift();
            } else {
              this.onClose();
            }
          }
          if (msg.length > 0) {
            this._lbrDesc.node.x = 300;
            this._lbrDesc.string = msg;
            if (delay > 0) {
              this._isPlaying = false;
              App.scheduleMgr.scheduleOnce(function () {
                _this2._isPlaying = true;
              }, this, delay);
            } else {
              this._isPlaying = true;
            }
          } else {
            this.onClose();
          }
        };
        _proto.onClose = function onClose() {
          _UIBase.prototype.onClose.call(this);
          this._isPlaying = false;
          App.broadcastMgr.isPlaying = false;
        };
        _proto.update = function update() {
          if (this._isPlaying) {
            this._lbrDesc.node.x -= 2.4;
            if (this._lbrDesc.node.x < -this._lbrDesc.node.w - 300) {
              this.show(2.0);
            }
          }
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
        };
        return uiBroadcast;
      }(UIBase));
      uiBroadcast.custom = {
        prefab: "prefab/view/uiBroadcast",
        binding: {}
      };
      ModuleContext.attachModule(uiBroadcast, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiDingYue.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './UIListBase.ts', './SoundDef.ts', './MonitorType.ts', './DBRecord.ts', './UIMgr.ts', './Ui_notice.ts', './Layout_uiNotice.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, ModuleDef, ModuleContext, UIListBase, SoundDef, MonitorType, DBRecord, UIMgr, LayerType, Ui_notice, Layout_uiNotice, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      UIListBase = module.UIListBase;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      Ui_notice = module.Ui_notice;
    }, function (module) {
      Layout_uiNotice = module.Layout_uiNotice;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "64e87u0UqFOCInowB4NSuiQ", "uiDingYue", undefined);

      /**
       * 微信订阅管理
       */
      var uiDingYue = exports('uiDingYue', /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(uiDingYue, _UIListBase);
        function uiDingYue() {
          var _this;
          _this = _UIListBase.call(this, uiDingYue.custom) || this;
          App.monitorMgr.addEventListener(MonitorType.ding_yue_info_update, _this.updateView, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = uiDingYue.prototype;
        _proto.onCreated = function onCreated() {
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIListBase.prototype.onCreated.call(this);
          this.initList();
          App.subscribeMgr.getDingYueState(function () {
            App.subscribeMgr.reqDingYueInfo();
          });
        };
        _proto.updateView = function updateView() {
          var cfgList = DBRecord.fetchAll('DingYue');
          this.scrollList.array = cfgList.filter(function (item) {
            return item.text2 > 0;
          });
          this.scrollList.scrollToIndex(0);
        };
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
        };
        _proto.onBtnBack = function onBtnBack() {
          _UIListBase.prototype.onClose.call(this);
        }

        /**
         * 玩法说明
         */;
        _proto.onBtnExpl = function onBtnExpl() {
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          var config = DBRecord.fetchId('ShuoMingGuiZe', 14);
          UIMgr.inst.open(Ui_notice, LayerType.panel, Layout_uiNotice, [config.title, config.descrip]);
        };
        return uiDingYue;
      }(UIListBase));
      uiDingYue.custom = {
        prefab: 'prefab/uiDingYue',
        binding: (_binding = {}, _binding['btnBack'] = {
          method: 'onBtnBack'
        }, _binding['imgBack'] = {
          method: 'onBtnBack'
        }, _binding['btnExpl'] = {
          method: 'onBtnExpl'
        }, _binding)
      };
      ModuleContext.attachModule(uiDingYue, ModuleDef.GAME_MAIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiFunctionUnlock.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './DBRecord.ts', './ModuleContext.ts', './Utils.ts', './UIBase.ts', './UIMgr.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, tween, v3, ModuleDef, DBRecord, ModuleContext, Utils, UIBase, UIMgr, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      tween = module.tween;
      v3 = module.v3;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      UIMgr = module.UIMgr;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "c1cf4ZhEypA45iwWpA77Tdx", "uiFunctionUnlock", undefined);
      var uiFunctionUnlock = exports('uiFunctionUnlock', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiFunctionUnlock, _UIBase);
        function uiFunctionUnlock() {
          var _this;
          _this = _UIBase.call(this, uiFunctionUnlock.custom) || this;
          _this._id = 0;
          _this._cb = null;
          return _this;
        }
        var _proto = uiFunctionUnlock.prototype;
        _proto.onDispose = function onDispose() {};
        _proto.onCreated = function onCreated(id, cb) {
          _UIBase.prototype.onCreated.call(this);
          this._id = id;
          this._cb = cb;
          var cfg = DBRecord.fetchId("GongNengJieSuo", id);
          var lb = this.getLabel("lbName");
          lb.string = App.languageMgr.getTextById(cfg.name);
          var sprite = this.getSprite("icon");
          App.resMgr.loadImage(sprite, ModuleDef.GAME_MAIN, "/texture/" + cfg.icon);
          var tm = 5;
          var self = this;
          setTimeout(function () {
            if (self) {
              self.hide();
            }
          }, tm * 1000);
          this.show();
        };
        _proto.initView = function initView() {};
        _proto.onBtnBack = function onBtnBack() {
          this.hide();
        };
        _proto.hide = function hide() {
          var _this2 = this;
          var cfg = DBRecord.fetchId("GongNengJieSuo", this._id);
          App.lockMgr.cs_setFuncUnlock(this._id);
          if (cfg.npc > 0) {
            var node = this.getNode("Sprite");
            // let pos = NPC.getNpcPos(cfg.npc);
            tween(node).to(0.3, {
              scale: v3(0.2, 0.2, 0.2)
            })
            // .to(0.4, { worldPosition: pos })
            .call(function () {
              _this2._cb == null || _this2._cb();
              _this2.onClose();
            }).start();
          } else if (cfg.entranceNode) {
            var _node = this.getNode("Sprite");
            var ui = UIMgr.inst.getUiNode(cfg.entranceNode[0]);
            if (!ui) {
              var _this$_cb;
              (_this$_cb = this._cb) == null || _this$_cb.call(this);
              this.onClose();
              return;
            }
            var target = Utils.findNode(cfg.entranceNode[cfg.entranceNode.length - 1], ui);
            if (!target) {
              var _this$_cb2;
              (_this$_cb2 = this._cb) == null || _this$_cb2.call(this);
              this.onClose();
              return;
            }
            target.active = true;
            tween(_node).to(0.3, {
              scale: v3(0.2, 0.2, 0.2)
            }).to(0.4, {
              worldPosition: target.worldPosition
            }).call(function () {
              _this2._cb == null || _this2._cb();
              // let itemLock = target.parent.getChildByName('itemLock');
              // if (itemLock) {
              //     App.nodePoolMgr.putNodeByPath(ModuleDef.BASE_COMMON, 'prefab/item/itemLock', itemLock);
              // }
              // target.active = true;
              _this2.onClose();
            }).start();
          } else {
            var _this$_cb3;
            (_this$_cb3 = this._cb) == null || _this$_cb3.call(this);
            this.onClose();
          }
        };
        _proto.show = function show() {
          this.node.setScale(0.2, 0.2, 0.2);
          tween(this.node).to(0.3, {
            scale: v3(1, 1, 1)
          }).start();
        };
        return uiFunctionUnlock;
      }(UIBase));
      uiFunctionUnlock.custom = {
        prefab: "prefab/view/uiFunctionUnlock",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onBtnBack"
        }, _binding)
      };
      ModuleContext.attachModule(uiFunctionUnlock, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiGameLoading.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleDef.ts', './ModuleContext.ts', './DBRecord.ts', './MathUtils.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Label, ProgressBar, UIBase, ModuleDef, ModuleContext, DBRecord, MathUtils, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      ProgressBar = module.ProgressBar;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      MathUtils = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "60c15lS/epB3aFI9ywutss0", "uiGameLoading", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var uiGameLoading = exports('uiGameLoading', (_dec = ccclass("uiGameLoading"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiGameLoading, _UIBase);
        function uiGameLoading() {
          var _this;
          _this = _UIBase.call(this, uiGameLoading.custom) || this;
          _this.progressBar = null;
          _this.progress = 0;
          _this.lbPercent = null;
          _this._colseByHand = false;
          _this._curProgress = 0;
          /**移动的角色 */
          _this._movingPlayerSpine = [];
          return _this;
        }
        var _proto = uiGameLoading.prototype;
        _proto.onCreated = function onCreated(data, callBack) {
          _UIBase.prototype.onCreated.call(this);
          this._colseByHand = false;
          this.lbPercent = this.getCom("lbPercent", Label);
          this.progressBar = this.getCom("progressBar", ProgressBar);
          this.progressBar.progress = 0;
          var cfg = DBRecord.fetchAll("JiaZaiWenBen");
          var cfgTxt = DBRecord.fetchAll("DuoYuYan");
          var _map = {};
          for (var i = cfgTxt.length; i--;) {
            _map[cfgTxt[i].id] = cfgTxt[i].cn;
          }
          var txt_list = [];
          var wightArr = [];
          var curGuanQiaID = App.battleMgr.curGuanQiaId;
          for (var _i = cfg.length; _i--;) {
            if (curGuanQiaID >= cfg[_i].need && curGuanQiaID < cfg[_i].eliminate) {
              txt_list.push(_map[cfg[_i].descrip]);
              wightArr.push(cfg[_i].weight);
            }
          }
          var index = MathUtils.randomByWeight(wightArr);
          this.getCom("lbTips", Label).string = txt_list[index];
          // for (let index = 0; index < GameBattle.RoleJobNum; index++) {
          //     let playerNode = this.getNode("MovingPlayer" + index);
          //     playerNode.active = index == App.roleMgr.getRoleJob() - 1;
          // }
        };

        _proto.onProgress = function onProgress(percent) {
          App.log.logBusiness("uiGameLoading=========" + percent);
          if (percent > this._curProgress) {
            this._curProgress = percent;
          }
          this.lbPercent.string = Math.floor(this._curProgress * 100) + "%";
          this.progressBar.progress = this._curProgress;
          if (percent >= 1 && !this._colseByHand) {
            console.log("uiGameLoading 加载完成");
            this.onClose();
          }
        };
        _proto.setCloseByHand = function setCloseByHand(flag) {
          this._colseByHand = flag;
        };
        return uiGameLoading;
      }(UIBase), _class2.custom = {
        prefab: "prefabs/uiLoading",
        binding: {
          // ["btnName"]: { method: "onBtnName" },
        }
      }, _class2)) || _class));
      ModuleContext.attachModule(uiGameLoading, ModuleDef.GAME_LOADING);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiGongGao.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './Utils.ts', './UIBase.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Label, RichText, Toggle, ModuleDef, ModuleContext, Utils, UIBase;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      RichText = module.RichText;
      Toggle = module.Toggle;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "33cf4G0nXdDAIQe1/VMjDuz", "uiGongGao", undefined);
      var ccclass = _decorator.ccclass;
      var uiGongGao = exports('uiGongGao', (_dec = ccclass("uiGongGao"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiGongGao, _UIBase);
        //-----------------------------------------------------------------------------------------------------------
        function uiGongGao() {
          var _this;
          _this = _UIBase.call(this, uiGongGao.custom) || this;
          _this._data = void 0;
          _this.vTogPage = [];
          _this._slcPage = 0;
          _this.vLblTitle0 = [];
          _this.vLblTitle1 = [];
          _this.rtxDesc = void 0;
          return _this;
        }
        var _proto = uiGongGao.prototype;
        _proto.onDispose = function onDispose() {
          // App.monitorMgr.offTarget(this)
        };
        _proto._registEvt = function _registEvt() {
          var _this2 = this;
          var _loop = function _loop(dx0) {
            _this2.vTogPage[dx0].on(Toggle.EventType.TOGGLE, function (evt) {
              if (evt.isChecked) {
                _this2._slcPage = dx0;
                _this2._updtPage();
              }
            });
          };
          for (var dx0 = 0; dx0 < this.vTogPage.length; dx0++) {
            _loop(dx0);
          }
        };
        _proto.onCreated = function onCreated(data) {
          this._data = data;
          this._initComp();
          this._registEvt();
          this._initData();
          this._updtView();
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {
          for (var dx0 = 0; dx0 < 8; dx0++) {
            this.vTogPage[dx0] = Utils.findNode("togPage" + dx0, this.node);
            this.vLblTitle0[dx0] = Utils.findComp("lblTitle0", Label, this.vTogPage[dx0]);
            this.vLblTitle1[dx0] = Utils.findComp("lblTitle1", Label, this.vTogPage[dx0]);
          }
          this.rtxDesc = Utils.findComp("rtxDesc", RichText, this.node);
        };
        _proto._initData = function _initData() {}

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._updtView = function _updtView() {
          var vData = this._data;
          for (var dx0 = 0; dx0 < this.vTogPage.length; dx0++) {
            var oData = vData[dx0];
            this.vTogPage[dx0].active = Boolean(oData);
            if (oData) {
              this.vLblTitle0[dx0].string = oData.title;
              this.vLblTitle1[dx0].string = oData.title;
            }
          }
          this._updtPage();
        };
        _proto._updtPage = function _updtPage() {
          var oData = this._data[this._slcPage] || {};
          this.rtxDesc.string = oData.content || "";
        };
        return uiGongGao;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/uiGongGao",
        binding: (_binding = {}, _binding["btnBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(uiGongGao, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UIListBase.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ScrollList.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, ScrollView, UIBase, ScrollList;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      ScrollView = module.ScrollView;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ScrollList = module.ScrollList;
    }],
    execute: function () {
      cclegacy._RF.push({}, "18ddf213clDpL4M5ktRVkJV", "UIListBase", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var UIListBase = exports('UIListBase', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(UIListBase, _UIBase);
        function UIListBase(custom) {
          var _this;
          _this = _UIBase.call(this, custom) || this;
          _this.itemPrefab = void 0;
          _this.scrollView = void 0;
          _this.scrollList = void 0;
          return _this;
        }
        var _proto = UIListBase.prototype;
        _proto.onCreated = function onCreated() {}
        //列表初始化
        ;

        _proto.initList = function initList() {
          this.itemPrefab = this.layout["itemPrefab"];
          this.scrollView = this.layout["scrollView"];
          var oldSv = this.scrollView.getComponent(ScrollView);
          if (oldSv) {
            var des = oldSv.destroy();
            console.log("des destroy== ", des);
          }
          this.scrollList = this.scrollView.addComponent(ScrollList);
          this.scrollList.itemPrefab = this.itemPrefab;
          this.scrollList.content = this.scrollView.content;
        };
        return UIListBase;
      }(UIBase));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UIMgr.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleContext.ts', './GameBoot.ts', './DBRecord.ts', './App.ts', './Singleton.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, UITransform, assetManager, Node, Widget, instantiate, ModuleContext, GameBoot, DBRecord, App, Singleton, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      UITransform = module.UITransform;
      assetManager = module.assetManager;
      Node = module.Node;
      Widget = module.Widget;
      instantiate = module.instantiate;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      GameBoot = module.GameBoot;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Singleton = module.Singleton;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "2a592glXaVLQ4tLweov0OWD", "UIMgr", undefined);

      /**
       * 页面分层类型
       */
      var LayerType = exports('LayerType', /*#__PURE__*/function (LayerType) {
        LayerType["main"] = "main";
        LayerType["panel"] = "panel";
        LayerType["mainUp"] = "mainUp";
        LayerType["guide"] = "guide";
        LayerType["effect"] = "effect";
        LayerType["guideIdle"] = "guideIdle";
        LayerType["touchTip"] = "touchTip";
        LayerType["load"] = "load";
        LayerType["top"] = "top";
        return LayerType;
      }({}));
      var layers = {};
      var UIMgr = exports('UIMgr', /*#__PURE__*/function (_Singleton) {
        _inheritsLoose(UIMgr, _Singleton);
        function UIMgr() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Singleton.call.apply(_Singleton, [this].concat(args)) || this;
          _this._uiCanvas = void 0;
          //预设
          _this._uiRoot = void 0;
          //ui 根节点
          _this._mOnceUi = {};
          //不重复界面
          _this._mLoadUi = {};
          //加载中界面
          _this._mWaitUi = {};
          return _this;
        }
        var _proto = UIMgr.prototype;
        //排队中界面
        /**
         * 初始化UI管理类
         * @param uiCanvas 画布节点
         */
        _proto.init = function init(uiCanvas) {
          this._uiCanvas = uiCanvas;
          var canvas = this._uiCanvas.getComponent(UITransform);
          this._uiRoot = this.createFullScreenNode("ui_root");
          canvas.node.addChild(this._uiRoot);
          this._initLayers(this._uiRoot);
        }

        /**
         * 初始化层级
         * @param _uiRoot 根节点
         */;
        _proto._initLayers = function _initLayers(_uiRoot) {
          layers = {
            main: this.createFullScreenNode(LayerType.main),
            panel: this.createFullScreenNode(LayerType.panel),
            mainUp: this.createFullScreenNode(LayerType.mainUp),
            guide: this.createFullScreenNode(LayerType.guide),
            effect: this.createFullScreenNode(LayerType.effect),
            guideIdle: this.createFullScreenNode(LayerType.guideIdle),
            touchTip: this.createFullScreenNode(LayerType.touchTip),
            load: this.createFullScreenNode(LayerType.load),
            top: this.createFullScreenNode(LayerType.top)
          };
          for (var k in layers) {
            var layer = layers[k];
            _uiRoot.addChild(layer);
          }
        }

        /**
         * 获取层级
         * @param name 层级名称
         * @returns 层级节点
         */;
        _proto.getLayer = function getLayer(name) {
          return layers[name];
        }

        /**
         * 关闭加载UI
         */;
        _proto.closeLoadingUI = function closeLoadingUI() {
          var layer = this.getLayer(LayerType.load);
          if (layer.children.length === 0) return;
          var _view = layer.children[0];
          _view && _view.parent && _view.parent.removeChild(_view);
        }

        /**
         * 预加载UI资源所在Bundle
         * @param uiCls UI类
         * @param cb 回调函数
         */;
        _proto.preloadUIBundle = function preloadUIBundle(uiCls, cb) {
          var bundleName = ModuleContext.getClassModule(uiCls);
          bundleName = bundleName || "resources";
          assetManager.loadBundle(bundleName, function (err, bundle) {
            if (err) {
              console.error("预加载页面bundle失败:", err);
              return;
            }
            if (cb) cb();
          });
        }

        /**
         * 打开界面
         * @param uiCls Bundle文件夹名称
         * @param layerType 所处的层级
         * @param layoutCls 该预制体UI控制器的名称
         * @param paramdata 参数:数组的形式 ["登录了",{a:1,b:"ddd"}]
         * @param cb 回调函数
         * @param thisArg 捆绑对象
         * @returns
         */;
        _proto.open = function open(uiCls, layerType, layoutCls, paramdata, cb, thisArg) {
          if (layerType === void 0) {
            layerType = LayerType.panel;
          }
          var uiName = uiCls.custom.prefab.split("/").pop();
          console.log("open uiName================", uiName);
          if (this._mOnceUi[uiName]) return this._mOnceUi[uiName];
          var bundleName = ModuleContext.getClassModule(uiCls);
          bundleName = bundleName || "resources";
          var ui = ModuleContext.createFromModule(uiCls);
          ui.uiName = uiName;
          var resArr = [];
          if (typeof ui.prefab === "string") {
            resArr.push(ui.prefab);
          }
          var vWaitUi = this._mWaitUi[uiName];
          if (!vWaitUi) {
            vWaitUi = new Array();
            this._mWaitUi[uiName] = vWaitUi;
          }
          vWaitUi.push({
            ui: ui,
            layerType: layerType || LayerType.panel,
            layoutCls: layoutCls,
            paramdata: paramdata,
            cb: cb,
            thisArg: thisArg
          });
          if (vWaitUi.length > 1) {
            return ui;
          }
          var openUi = function openUi(data, bundle) {
            var prefab = bundle.get(ui.prefab);
            if (!prefab) return;
            var uiNode = instantiate(prefab);
            if (data.layerType instanceof Node) {
              data.layerType.addChild(uiNode);
              uiNode["uiIns"] = data.ui;
              data.ui.setup(uiNode, LayerType.panel, data.layoutCls);
            } else {
              var layerNode = UIMgr.inst.getLayerNode(data.layerType);
              if (!layerNode) {
                console.error("Failed to get layer node for " + data.layerType);
                vWaitUi.length = 0;
                return;
              }
              layerNode.addChild(uiNode);
              uiNode["uiIns"] = data.ui;
              data.ui.setup(uiNode, data.layerType, data.layoutCls);
            }
            // ui.bundle = bundle;
            if (data.paramdata) {
              var _data$ui;
              (_data$ui = data.ui).onCreated.apply(_data$ui, data.paramdata);
            } else {
              data.ui.onCreated();
            }
            if (data.cb) {
              data.cb.call(data.thisArg, data.ui);
            }
            App.monitorMgr.dispatchEvent(EventType.ui_open, data.ui);
          };
          var fnLoadAndCreateFromBundle = function fnLoadAndCreateFromBundle(bundle) {
            var prefab = bundle.get(ui.prefab);
            if (prefab) {
              for (var dx0 = 0; dx0 < vWaitUi.length; dx0++) {
                openUi(vWaitUi[dx0], bundle);
              }
              vWaitUi.length = 0;
              return ui;
            }
            bundle.load(resArr, function (finish, total) {
              if (finish < total) {
                if (!!GameBoot && !!GameBoot.loadingIns) {
                  GameBoot.loadingIns.run(200, 5000);
                }
              } else {
                if (!!GameBoot && !!GameBoot.loadingIns) {
                  GameBoot.loadingIns.onBack();
                }
              }
            }, function (err, data) {
              if (err) {
                console.log(err);
                vWaitUi.length = 0;
                return;
              }
              for (var _dx = 0; _dx < vWaitUi.length; _dx++) {
                openUi(vWaitUi[_dx], bundle);
              }
              vWaitUi.length = 0;
            });
            return ui;
          };
          var bundle = assetManager.getBundle(bundleName);
          if (bundle) {
            return fnLoadAndCreateFromBundle(bundle);
          }
          assetManager.loadBundle(bundleName, null, function (err, bundle) {
            console.log("------module:<" + bundleName + ">loaded.---sub_ui");
            if (err) {
              console.log(err);
              vWaitUi.length = 0;
              return;
            } else {
              fnLoadAndCreateFromBundle(bundle);
              // this.open(uiCls, layerType, layoutCls, paramdata, cb, thisArg);
            }
          });

          return ui;
        }

        /**
         * 只打开一次界面
         * @param uiCls Bundle文件夹名称
         * @param layerType 所处的层级
         * @param layoutCls 该预制体UI控制器的名称
         * @param paramdata 参数:数组的形式 ["登录了",{a:1,b:"ddd"}]
         * @param cb 回调函数
         * @param thisArg 捆绑对象
         * @returns
         */;
        _proto.openOnce = /*#__PURE__*/
        function () {
          var _openOnce = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(uiCls, layerType, layoutCls, paramdata, cb, thisArg) {
            var uiName, self, ui;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (layerType === void 0) {
                    layerType = LayerType.panel;
                  }
                  uiName = uiCls.custom.prefab.split("/").pop();
                  console.log("openOnce uiName================", uiName);
                  self = UIMgr.inst;
                  if (!(self._mOnceUi[uiName] || self._mLoadUi[uiName])) {
                    _context.next = 6;
                    break;
                  }
                  return _context.abrupt("return");
                case 6:
                  self._mLoadUi[uiName] = 1;
                  _context.next = 9;
                  return self.asyncOpen(uiCls, layerType, layoutCls, paramdata, cb, thisArg);
                case 9:
                  ui = _context.sent;
                  self._mOnceUi[uiName] = ui;
                  delete self._mLoadUi[uiName];
                  App.monitorMgr.dispatchEvent(EventType.ui_open, ui);
                case 13:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          }));
          function openOnce(_x, _x2, _x3, _x4, _x5, _x6) {
            return _openOnce.apply(this, arguments);
          }
          return openOnce;
        }()
        /**
         * 获取Bundle
         * @param bundleName Bundle文件夹名称
         * @returns Bundle
         */;

        _proto.asyncGetBundle = /*#__PURE__*/
        function () {
          var _asyncGetBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(bundleName) {
            var bundle;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  bundle = assetManager.getBundle(bundleName);
                  if (!bundle) {
                    _context2.next = 3;
                    break;
                  }
                  return _context2.abrupt("return", bundle);
                case 3:
                  return _context2.abrupt("return", new Promise(function (resolve, reject) {
                    assetManager.loadBundle(bundleName, null, function (err, loadedBundle) {
                      console.log("------module:<" + bundleName + ">loaded.---sub_ui");
                      if (err) {
                        console.log(err);
                        resolve(null);
                      } else {
                        resolve(loadedBundle);
                      }
                    });
                  }));
                case 4:
                case "end":
                  return _context2.stop();
              }
            }, _callee2);
          }));
          function asyncGetBundle(_x7) {
            return _asyncGetBundle.apply(this, arguments);
          }
          return asyncGetBundle;
        }()
        /**
         * 同步打开界面
         * @param uiCls Bundle文件夹名称
         * @param layerType 所处的层级
         * @param layoutCls 该预制体UI控制器的名称
         * @param paramdata 参数:数组的形式 ["登录了",{a:1,b:"ddd"}]
         * @param cb 回调函数
         * @param thisArg 捆绑对象
         * @returns
         */;

        _proto.asyncOpen = /*#__PURE__*/
        function () {
          var _asyncOpen = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(uiCls, layerType, layoutCls, paramdata, cb, thisArg) {
            var _this2 = this;
            var bundleName, bundle, ui, resArr;
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  if (layerType === void 0) {
                    layerType = LayerType.panel;
                  }
                  _context3.prev = 1;
                  bundleName = ModuleContext.getClassModule(uiCls) || "resources";
                  _context3.next = 5;
                  return this.asyncGetBundle(bundleName);
                case 5:
                  bundle = _context3.sent;
                  if (bundle) {
                    _context3.next = 9;
                    break;
                  }
                  console.error("Failed to load bundle: " + bundleName);
                  return _context3.abrupt("return", null);
                case 9:
                  ui = ModuleContext.createFromModule(uiCls);
                  if (ui) {
                    _context3.next = 13;
                    break;
                  }
                  console.error("Failed to create UI from module: " + uiCls);
                  return _context3.abrupt("return", null);
                case 13:
                  ui.uiName = uiCls.custom.prefab.split("/").pop();
                  resArr = [];
                  if (typeof ui.prefab === "string") {
                    resArr.push(ui.prefab);
                  }
                  return _context3.abrupt("return", new Promise(function (resolve, reject) {
                    bundle.load(resArr, function (err, data) {
                      if (err) {
                        console.error("Bundle load error:", err);
                        resolve(null);
                        return;
                      }

                      // 检查UI是否被标记为关闭
                      if (_this2._mLoadUi[ui.uiName] === -1) {
                        console.log("UI " + ui.uiName + " was marked as closed during loading");
                        resolve(null);
                        return;
                      }
                      try {
                        var node = null;
                        var prefab;
                        if (typeof ui.prefab === "string") {
                          prefab = bundle.get(ui.prefab);
                        }
                        if (!prefab && typeof ui.prefab === "string") {
                          console.error("Failed to get prefab: " + ui.prefab);
                          resolve(null);
                          return;
                        }
                        if (prefab) {
                          node = instantiate(prefab);
                        } else {
                          node = _this2.createFullScreenNode();
                        }
                        if (!node) {
                          console.error("Failed to create node");
                          resolve(null);
                          return;
                        }

                        // ui.bundle = bundle;
                        ui.setup(node, layerType, layoutCls);
                        var parent = _this2.getLayerNode(ui.layer);
                        if (!parent) {
                          console.error("Failed to get layer node: " + ui.layer);
                          resolve(null);
                          return;
                        }
                        node["uiIns"] = ui;
                        parent.addChild(node);
                        if (paramdata) {
                          ui.onCreated.apply(ui, paramdata);
                        } else {
                          ui.onCreated();
                        }
                        if (cb) {
                          cb.call(thisArg, ui);
                        }
                        resolve(ui);
                      } catch (error) {
                        console.error("Error during UI creation:", error);
                        resolve(null);
                      }
                    });
                  }));
                case 19:
                  _context3.prev = 19;
                  _context3.t0 = _context3["catch"](1);
                  console.error("asyncOpen error:", _context3.t0);
                  return _context3.abrupt("return", null);
                case 23:
                case "end":
                  return _context3.stop();
              }
            }, _callee3, this, [[1, 19]]);
          }));
          function asyncOpen(_x8, _x9, _x10, _x11, _x12, _x13) {
            return _asyncOpen.apply(this, arguments);
          }
          return asyncOpen;
        }()
        /**
         * 获取层级节点
         * @param layerIndex 层级名称
         * @returns 层级节点
         */;

        _proto.getLayerNode = function getLayerNode(layerIndex) {
          if (!this._uiRoot) {
            console.error("UIMgr._uiRoot is null, cannot get layer node");
            return null;
          }
          return this._uiRoot.getChildByName(layerIndex) || this._uiRoot;
        }

        /**
         * 关闭特定层级
         * @param layerType 层级名称
         */;
        _proto.closeLayerByIdx = function closeLayerByIdx(layerType) {
          var ly = this._uiRoot.getChildByName(layerType);
          for (var i = ly.children.length; i--;) {
            var uiIns = ly.children[i]["uiIns"];
            if (uiIns) uiIns.onClose();
          }
          if (layerType === LayerType.panel) {
            this._mOnceUi = {};
            this._mWaitUi = {};
            for (var key in this._mLoadUi) {
              if (this._mLoadUi) this._mLoadUi = -1;
            }
          }
        }

        /**
         * 关闭UI
         * @param ui UI实例
         */;
        _proto.onCloseUi = function onCloseUi(ui) {
          var uiName = ui.uiName;
          delete this._mLoadUi[uiName];
          delete this._mOnceUi[uiName];
          var vWaitUi = this._mWaitUi[uiName] || [];
          for (var dx0 = 0; dx0 < vWaitUi.length; dx0++) {
            if (vWaitUi[dx0].ui === ui) {
              vWaitUi.splice(dx0, 1);
              break;
            }
          }
        }

        /**
         * 关闭所有panel View界面，可选择排除特定界面
         * @param exceptUINames 不关闭的UI名称数组
         */;
        _proto.closeAllPanel = function closeAllPanel(exceptUINames) {
          var _this3 = this;
          if (exceptUINames === void 0) {
            exceptUINames = [];
          }
          // 如果没有排除项，使用原来的逻辑
          if (!exceptUINames || exceptUINames.length === 0) {
            var _layerTypes = [];
            for (var key in LayerType) {
              if (LayerType.hasOwnProperty(key)) {
                _layerTypes.push(LayerType[key]);
              }
            }
            _layerTypes.forEach(function (type) {
              console.log("closeAllPanel:" + type);
              _this3.closeLayerByIdx(type);
            });
            return;
          }

          // 有排除项，手动关闭每个层级中不在排除列表中的UI
          var layerTypes = [];
          for (var _key2 in LayerType) {
            if (LayerType.hasOwnProperty(_key2)) {
              layerTypes.push(LayerType[_key2]);
            }
          }
          layerTypes.forEach(function (type) {
            console.log("closeAllPanel:" + type);
            var ly = _this3._uiRoot.getChildByName(type);
            if (!ly) return;

            // 收集需要关闭的UI，避免在遍历时修改数组
            var uisToClose = [];
            for (var i = 0; i < ly.children.length; i++) {
              var node = ly.children[i];
              var uiIns = node["uiIns"];

              // 如果UI不在排除列表中，则添加到关闭列表
              if (uiIns && uiIns.uiName && exceptUINames.indexOf(uiIns.uiName) === -1) {
                uisToClose.push(uiIns);
              }
            }

            // 异步关闭收集到的UI，避免同步操作中的冲突
            uisToClose.forEach(function (ui) {
              try {
                if (ui && ui.node && ui.node.isValid) {
                  ui.onClose();
                }
              } catch (error) {
                console.error("关闭UI失败:", error);
              }
            });
          });

          // 保留例外界面的缓存
          for (var _key3 in this._mOnceUi) {
            if (exceptUINames.indexOf(_key3) === -1) {
              delete this._mOnceUi[_key3];
            }
          }
        }

        /**
         * 创建一个满屏Node
         * @param nodeName 节点名称
         * @returns 节点
         */;
        _proto.createFullScreenNode = function createFullScreenNode(nodeName) {
          var canvas = this._uiCanvas.getComponent(UITransform);
          var node = new Node();
          node.layer = this._uiCanvas.layer;
          var uiTransform = node.addComponent(UITransform);
          uiTransform.width = canvas.width;
          uiTransform.height = canvas.height;
          var widget = node.addComponent(Widget);
          widget.isAlignBottom = true;
          widget.isAlignTop = true;
          widget.isAlignLeft = true;
          widget.isAlignRight = true;
          widget.left = 0;
          widget.right = 0;
          widget.top = 0;
          widget.bottom = 0;
          nodeName && (node.name = nodeName);
          return node;
        }

        /**
         * 获取UI节点
         * @param nodeName 节点名称
         * @returns 节点
         */;
        _proto.getUiNode = function getUiNode(nodeName) {
          for (var _iterator = _createForOfIteratorHelperLoose(this._uiRoot.children), _step; !(_step = _iterator()).done;) {
            var node = _step.value;
            var n = node.getChildByName(nodeName);
            if (n) {
              return n;
            }
          }
        };
        _proto.getUiRoot = function getUiRoot() {
          return this._uiRoot;
        }

        /**
         * 获取已打开的UI
         * @param uiNmae UI名称
         * @returns UI实例
         */;
        _proto.getOnceUi = function getOnceUi(uiNmae) {
          return this._mOnceUi[uiNmae];
        }

        /**
         * 关闭已打开的UI
         * @param uiName UI名称
         */;
        _proto.closeOnce = function closeOnce(uiName) {
          if (this._mOnceUi[uiName]) {
            this._mOnceUi[uiName].onClose();
            return;
          }
          if (this._mLoadUi[uiName]) this._mLoadUi[uiName] = -1;
        }

        /**
         * 打开系统UI
         * @param id 功能ID
         */;
        _proto.openSysUi = function openSysUi(id) {
          var GongNengJieSuo = DBRecord.fetchId("GongNengJieSuo", id);
          if (!GongNengJieSuo) return;

          // if (!SYS_UICLS[id]) return;

          // UIMgr.inst.open(SYS_UICLS[id], LayerType.panel, SYS_UILAY[id]);
        }

        /**
         * 判断某个UI是否激活中
         * @param layerType 层级
         * @param uiName UI名称
         * @returns 是否激活
         */;
        _proto.isUIActive = function isUIActive(layerType, uiName) {
          var ly = this._uiRoot.getChildByName(layerType);
          if (ly) {
            var ui = ly.getChildByName(uiName);
            return ui && ui.active;
          }
          return false;
        }

        /**
         * 关闭panel层特定界面
         * @param UIList
         * @returns
         */;
        _proto.closePanelList = function closePanelList(UIList) {
          if (!UIList) {
            return;
          }
          var ly = this._uiRoot.getChildByName(LayerType.panel);
          for (var index = 0; index < UIList.length; index++) {
            var uiNode = ly.getChildByName(UIList[index]);
            var uiIns = uiNode && uiNode["uiIns"];
            if (uiIns) {
              uiIns.onClose();
            }
          }
        }

        /**
         * 关闭指定UI
         * @param uiCls UI类
         * @param closeAll 是否关闭该类型的所有实例
         */;
        _proto.closeUI = function closeUI(uiCls, closeAll) {
          if (closeAll === void 0) {
            closeAll = false;
          }
          var uiName = uiCls.custom.prefab.split("/").pop();
          var layer = this.getLayer(LayerType.panel);
          for (var i = layer.children.length - 1; i >= 0; i--) {
            var node = layer.children[i];
            var uiIns = node["uiIns"];

            // 检查是否是目标UI
            if (uiIns && uiIns.uiName === uiName) {
              uiIns.onClose();
              if (!closeAll) {
                break;
              }
            }
          }
          var vWaitUi = this._mWaitUi[uiName];
          if (vWaitUi) {
            if (closeAll) {
              delete this._mWaitUi[uiName];
            } else {
              for (var _i = vWaitUi.length - 1; _i >= 0; _i--) {
                if (vWaitUi[_i].ui.uiName === uiName) {
                  vWaitUi.splice(_i, 1);
                  break;
                }
              }
            }
          }
          if (this._mOnceUi[uiName]) {
            delete this._mOnceUi[uiName];
          }
          if (this._mLoadUi[uiName]) {
            delete this._mLoadUi[uiName];
          }
        }

        /**
         * 根据层级和UI名称关闭UI
         * @param layerType 层级
         * @param uiName UI名称
         */;
        _proto.closeUIByName = function closeUIByName(layerType, uiName) {
          var layer = this.getLayer(layerType);
          if (!layer) return;
          for (var i = layer.children.length - 1; i >= 0; i--) {
            var node = layer.children[i];
            var uiIns = node["uiIns"];
            if (uiIns && uiIns.uiName === uiName) {
              uiIns.onClose();
              break;
            }
          }
          if (this._mOnceUi[uiName]) {
            delete this._mOnceUi[uiName];
          }
          if (this._mLoadUi[uiName]) {
            delete this._mLoadUi[uiName];
          }
          if (this._mWaitUi[uiName]) {
            delete this._mWaitUi[uiName];
          }
        }

        /**
         * 根据层级和UI名称关闭UI脚本
         * @param layerType 层级
         * @param uiName UI名称
         */;
        _proto.getUI = function getUI(layerType, uiName) {
          var layer = this.getLayer(layerType);
          if (!layer) return;
          for (var i = layer.children.length - 1; i >= 0; i--) {
            var node = layer.children[i];
            var uiIns = node["uiIns"];
            return uiIns;
          }
        };
        return UIMgr;
      }(Singleton()));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UIPageDef.ts", ['cc', './UI_BagView.ts', './Layout_UI_BagView.ts'], function (exports) {
  var cclegacy, UI_BagView, Layout_UI_BagView;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UI_BagView = module.UI_BagView;
    }, function (module) {
      Layout_UI_BagView = module.Layout_UI_BagView;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a5dcfsDNvVCwK73lOAhiu78", "UIPageDef", undefined);

      /**
       * UI页面跳转定义
       * 对应 Item_Gain 表中的 jump 字段
       * 
       * 使用方式：
       * 1. 策划在配置表配置 jump = 1
       * 3. 调用 UIMgr.inst.open(uiClass, LayerType.panel, layoutClass)
       */
      var UIPageDef = exports('UIPageDef', {
        1: {
          name: "背包",
          uiClass: UI_BagView,
          layoutClass: Layout_UI_BagView
        }
      });
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiPowerUp.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './MonitorType.ts', './ModuleContext.ts', './Utils.ts', './UIBase.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, _decorator, Label, Vec3, tween, ModuleDef, MonitorType, ModuleContext, Utils, UIBase, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Vec3 = module.Vec3;
      tween = module.tween;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2;
      cclegacy._RF.push({}, "75b67JkhnFGAp1ZOM7XyxOp", "uiPowerUp", undefined);
      var ccclass = _decorator.ccclass;
      var uiPowerUp = exports('uiPowerUp', (_dec = ccclass("uiPowerUp"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiPowerUp, _UIBase);
        //-----------------------------------------------------------------------------------------------------------
        function uiPowerUp() {
          var _this;
          _this = _UIBase.call(this, uiPowerUp.custom) || this;
          _this._data = void 0;
          _this._nTime = 0;
          _this._nPower0 = 0;
          _this.pnlPower = void 0;
          _this.lblPower0 = void 0;
          _this.lblPower1 = void 0;
          _this.imgArrow = void 0;
          App.monitorMgr.addEventListener(MonitorType.web_activity_update, _this.recMsgData, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = uiPowerUp.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
        };
        _proto._registEvt = function _registEvt() {};
        _proto.recMsgData = function recMsgData() {};
        _proto.onCreated = function onCreated(data) {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_PowerUp);
          this._data = data;
          this._initComp();
          this._registEvt();
          this._initData();
          this._updtView();
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.setViewData = function setViewData(data) {
          this._data = data;
          this._showPowerScr();
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {
          this.pnlPower = Utils.findNode("pnlPower", this.node);
          this.lblPower0 = Utils.findComp("lblPower0", Label, this.node);
          this.lblPower1 = Utils.findComp("lblPower1", Label, this.node);
          this.imgArrow = Utils.findNode("imgArrow", this.node);
        };
        _proto._initData = function _initData() {};
        _proto._updtView = function _updtView() {
          this._showPowerScr();
        };
        _proto._showPowerScr = function _showPowerScr() {
          var dData = this._data;
          this._nTime = 0;
          this._nPower0 = dData[0];
          this.lblPower0.string = dData[0];
          this.lblPower1.string = "+" + dData[1];
          this.imgArrow.active = true;
          if (dData[1] > dData[0] / 100 || dData[1] >= 10000) this._showPowerAnm();
        };
        _proto._showPowerAnm = function _showPowerAnm() {
          // Tween.stopAll()
          this.lblPower1.node.setScale(new Vec3(1.8, 1.8, 1));
          tween(this.lblPower1.node).to(0.1, {
            scale: new Vec3(1, 1, 1)
          }).start();
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.update = function update(dt) {
          this._nTime += dt;
          if (this._nTime <= 0.8) {
            this._nPower0 = this._data[0];
            this.imgArrow.active = true;
          } else if (this._nTime <= 1.6) {
            this._nPower0 += this._data[1] * dt;
            this.lblPower0.string = Math.round(this._nPower0).toString();
            this.lblPower1.string = "";
            this.imgArrow.active = false;
          } else if (this._nTime <= 2) {
            this._nPower0 = this._data[0] + this._data[1];
            this.lblPower0.string = this._nPower0.toString();
            this.lblPower1.string = "";
            this.imgArrow.active = false;
          } else if (this._nTime >= 2) {
            this.onClose();
          }
        };
        return uiPowerUp;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/uiPowerUp",
        binding: {}
      }, _class2)) || _class));
      ModuleContext.attachModule(uiPowerUp, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiPromptCheck.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './ModuleContext.ts', './Utils.ts', './UIBase.ts', './SoundDef.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, Label, RichText, ModuleDef, ModuleContext, Utils, UIBase, SoundDef, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      Label = module.Label;
      RichText = module.RichText;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "43121sDC1NICY4bEB7qdfxO", "uiPromptCheck", undefined);
      var ccclass = _decorator.ccclass;
      var uiPromptCheck = exports('uiPromptCheck', (_dec = ccclass("uiPromptCheck"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiPromptCheck, _UIBase);
        //-----------------------------------------------------------------------------------------------------------
        function uiPromptCheck() {
          var _this;
          _this = _UIBase.call(this, uiPromptCheck.custom) || this;
          _this._data = void 0;
          _this.lblTitle = void 0;
          _this.rtxDesc = void 0;
          _this.togNomore = void 0;
          _this.lblNomore = void 0;
          return _this;
        }
        var _proto = uiPromptCheck.prototype;
        _proto.onDispose = function onDispose() {};
        _proto._registEvt = function _registEvt() {
          this.togNomore.node.on(Toggle.EventType.TOGGLE, function (evt) {
            App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
            // App.mixMgr.setTipMark(this._data.key, evt.isChecked);
          });
        };

        _proto.onBtnSure = function onBtnSure() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          if (this._data.fSure) this._data.fSure();
          this.onClose();
        };
        _proto.onBtnUndoClick = function onBtnUndoClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          this.onClose();
        };
        _proto.onBtnBackClick = function onBtnBackClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          this.onClose();
        };
        _proto.onCreated = function onCreated(data) {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          this._data = data;
          this._initComp();
          this._registEvt();
          this._initData();
          this._updtView();
        }

        //-----------------------------------------------------------------------------------------------------------

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {
          this.lblTitle = Utils.findComp("lblTitle", Label, this.node);
          this.rtxDesc = Utils.findComp("rtxDesc", RichText, this.node);
          this.togNomore = Utils.findComp("togNomore", Toggle, this.node);
          // this.lblNomore = Utils.findComp("lblNomore", Label, this.node)
        };

        _proto._initData = function _initData() {};
        _proto._updtView = function _updtView() {
          var data = this._data;
          this.lblTitle.string = data.title;
          this.rtxDesc.string = "<outline color = black width = 0 b>" + data.desc + "</b>";
        };
        return uiPromptCheck;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/uiPromptCheck",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onClose"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding["btnUndo"] = {
          method: "onBtnUndoClick"
        }, _binding["btnSure"] = {
          method: "onBtnSure"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(uiPromptCheck, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiPromptQuan.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, Vec3, UIBase, ModuleContext, ModuleDef, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      Vec3 = module.Vec3;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _binding;
      cclegacy._RF.push({}, "71398D1BwhIHJn0ffAcL6Vh", "uiPromptQuan", undefined);
      var uiPromptQuan = exports('uiPromptQuan', /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiPromptQuan, _UIBase);
        function uiPromptQuan() {
          var _this;
          _this = _UIBase.call(this, uiPromptQuan.custom) || this;
          _this._title = void 0;
          _this._desc = void 0;
          _this._funcCancel = void 0;
          _this._funcOk = void 0;
          _this._cancelStr = void 0;
          _this._okStr = void 0;
          return _this;
        }
        var _proto = uiPromptQuan.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
        };
        _proto.onCreated = function onCreated(title, desc, funcOk, okStr, funcCancel, cancelStr) {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIBase.prototype.onCreated.call(this);
          this._title = title;
          this._desc = desc;
          this._funcOk = funcOk;
          this._funcCancel = funcCancel;
          this._okStr = okStr ? okStr : "确定";
          this._cancelStr = cancelStr ? cancelStr : "取消";
          this.initView();
        };
        _proto.initView = function initView() {
          this.getLabel("lbTitle").string = this._title;
          this.getRichText("lbrDesc").string = "<outline color = black width = 2 b>" + this._desc + "</b>";
          this.getLabel("lbCancel").string = this._cancelStr;
          this.getLabel("lbOk").string = this._okStr;

          // 纯净确认框
          if (!this._funcCancel) {
            this.getNode("btnBack").active = !!this._funcCancel;
            this.getButton("imgBack").interactable = !!this._funcCancel;
            this.getNode("btnCancel").active = !!this._funcCancel;
            this.getNode("btnOK").setPosition(new Vec3(0, this.getNode("btnOK").position.y, 0));
          }
        };
        _proto.onBtnCancel = function onBtnCancel() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          this.onClose();
          this._funcCancel && this._funcCancel();
        };
        _proto.onBtnOk = function onBtnOk() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          this.onClose();
          this._funcOk && this._funcOk();
        };
        _proto.onBtnBackClick = function onBtnBackClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          this.onClose();
          this._funcCancel && this._funcCancel();
        };
        return uiPromptQuan;
      }(UIBase));
      uiPromptQuan.custom = {
        prefab: "prefab/view/uiPromptQuan",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onBtnBackClick"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding["btnCancel"] = {
          method: "onBtnCancel"
        }, _binding["btnOk"] = {
          method: "onBtnOk"
        }, _binding)
      };
      ModuleContext.attachModule(uiPromptQuan, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiPromptSaiJi.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './MonitorType.ts', './ModuleContext.ts', './Utils.ts', './UIBase.ts', './App.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, cclegacy, _decorator, Label, RichText, ModuleDef, MonitorType, ModuleContext, Utils, UIBase, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      RichText = module.RichText;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "edb0ekfZKxGxKW3EpD4okxp", "uiPromptSaiJi", undefined);
      var ccclass = _decorator.ccclass;
      var uiPromptSaiJi = exports('uiPromptSaiJi', (_dec = ccclass("uiPromptSaiJi"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiPromptSaiJi, _UIBase);
        //-----------------------------------------------------------------------------------------------------------
        function uiPromptSaiJi() {
          var _this;
          _this = _UIBase.call(this, uiPromptSaiJi.custom) || this;
          _this._data = void 0;
          _this._fOK = void 0;
          _this._fCancel = void 0;
          _this.lblTitle = void 0;
          _this.rtxDesc = void 0;
          _this.btnCancel = void 0;
          _this.btnOK = void 0;
          App.monitorMgr.addEventListener(MonitorType.web_activity_update, _this.recMsgData, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = uiPromptSaiJi.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.offTarget(this);
        };
        _proto.recMsgData = function recMsgData() {};
        _proto.onCreated = function onCreated(data) {
          this._initComp();
          this._registEvt();

          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIBase.prototype.onCreated.call(this);
          this.rtxDesc.string = "<b><outline color = black width = 2>" + data + "</>";
        };
        _proto.onClose = function onClose() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          _UIBase.prototype.onClose.call(this);
        }

        //-----------------------------------------------------------------------------------------------------------

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {
          this.lblTitle = Utils.findComp("lblTitle", Label, this.node);
          this.rtxDesc = Utils.findComp("rtxDesc", RichText, this.node);
          // this.btnCancel = Utils.findNode("btnCancel", this.node)
          // this.btnOK = Utils.findNode("btnOK", this.node)
        };

        _proto._registEvt = function _registEvt() {
          // this.btnCancel.on(Button.EventType.CLICK, () => {
          //     App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          //     if (this._fCancel) {
          //         this._fCancel()
          //     }
          //     this.onClose();
          // })
          // this.btnOK.on(Button.EventType.CLICK, () => {
          //     App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          //     if (this._fOK) {
          //         this._fOK()
          //     }
          //     this.onClose();
          // })
        };
        return uiPromptSaiJi;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/uiPromptSaiJi",
        binding: (_binding = {}, _binding["btnBack"] = {
          method: "onClose"
        }, _binding["imgBack"] = {
          method: "onClose"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(uiPromptSaiJi, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiToDyKefu.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleDef.ts', './MonitorType.ts', './ModuleContext.ts', './Utils.ts', './UIBase.ts', './UtilityPlatform.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, view, UITransform, Vec3, ModuleDef, MonitorType, ModuleContext, Utils, UIBase, UtilityPlatform, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      view = module.view;
      UITransform = module.UITransform;
      Vec3 = module.Vec3;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "f9ba0msQ01JyLgZugcGg1bo", "uiToDyKefu", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var uiToDyKefu = exports('uiToDyKefu', (_dec = ccclass("uiToDyKefu"), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiToDyKefu, _UIBase);
        // private lblTitle: Label;
        // private rtxDesc: RichText;
        // private togNomore: Toggle;
        // private lblNomore: Label;

        //-----------------------------------------------------------------------------------------------------------
        function uiToDyKefu() {
          var _this;
          _this = _UIBase.call(this, uiToDyKefu.custom) || this;
          _this._data = void 0;
          return _this;
        }
        var _proto = uiToDyKefu.prototype;
        _proto.onDispose = function onDispose() {
          App.monitorMgr.removeEventListener(MonitorType.dy_kefu_close_dyyy, this.onBtnBackClick, this);
        };
        _proto._registEvt = function _registEvt() {
          // this.togNomore.node.on(Toggle.EventType.TOGGLE, (evt: Toggle) => {
          //     App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton1);
          //     App.mixMgr.setTipMark(this._data.key, evt.isChecked);
          // });
          App.monitorMgr.addEventListener(MonitorType.dy_kefu_close_dyyy, this.onBtnBackClick, this);
        };
        _proto.onBtnSure = function onBtnSure() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
          // if (this._data.fSure) this._data.fSure();
          P8SDK.destoryCustomerButton();
          this.onClose();
        };
        _proto.onBtnUndoClick = function onBtnUndoClick() {
          P8SDK.destoryCustomerButton();
          this.onClose();
        };
        _proto.onBtnBackClick = function onBtnBackClick() {
          P8SDK.destoryCustomerButton();
          this.onClose();
        };
        _proto.onCreated = function onCreated(data) {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          this._data = data;
          this._initComp();
          this._registEvt();
          this._initData();
          this._updtView();

          //生成按钮 。。
          var btnSure = Utils.findNode("btnSure", this.node);
          // 1. 获取屏幕尺寸（兼容 3.8.3）
          var screenSize = view.getVisibleSize(); // 3.8.3 可用
          // 2. 获取 btnSure 的世界坐标（左下角为原点）
          var worldPos = btnSure.getComponent(UITransform).convertToWorldSpaceAR(new Vec3(0, 0, 0));

          // 3. 获取 btnSure 的尺寸
          var btnSize = btnSure.getComponent(UITransform).contentSize;

          // 4. 计算 top, left, height（P8SDK 的坐标系通常是左上角为原点）
          var gameButton = {
            left: worldPos.x,
            top: screenSize.height - worldPos.y - btnSize.height,
            // 转换为屏幕坐标系（Y轴向下）
            height: btnSize.height,
            "with": btnSize.width
          };
          console.log("btnSure position:", gameButton);
          UtilityPlatform.getInstance().dyaiService(gameButton);
        }

        //-----------------------------------------------------------------------------------------------------------

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto._initComp = function _initComp() {
          // this.lblTitle = Utils.findComp('lblTitle', Label, this.node);
          // this.rtxDesc = Utils.findComp('rtxDesc', RichText, this.node);
          // this.togNomore = Utils.findComp('togNomore', Toggle, this.node);
          // this.lblNomore = Utils.findComp("lblNomore", Label, this.node)
        };
        _proto._initData = function _initData() {};
        _proto._updtView = function _updtView() {
          // let data = this._data;
          // this.lblTitle.string = data.title;
          // this.rtxDesc.string = `<outline color = black width = 0 b>${data.desc}</b>`;
        };
        return uiToDyKefu;
      }(UIBase), _class2.custom = {
        prefab: "prefab/view/uiToDyKefu",
        binding: (_binding = {}, _binding["imgBack"] = {
          method: "onBtnUndoClick"
        }, _binding["btnBack"] = {
          method: "onBtnBackClick"
        }, _binding["btnUndo"] = {
          method: "onBtnUndoClick"
        }, _binding["btnSure"] = {
          method: "onBtnSure"
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(uiToDyKefu, ModuleDef.BASE_COMMON);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UIUtil.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilGame.ts', './ModuleDef.ts', './App.ts', './Item_prop.ts', './Prompt.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, isValid, instantiate, Material, builtinResMgr, UIRenderer, Button, Mask, UtilGame, ModuleDef, App, Item_prop, Prompt;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      isValid = module.isValid;
      instantiate = module.instantiate;
      Material = module.Material;
      builtinResMgr = module.builtinResMgr;
      UIRenderer = module.UIRenderer;
      Button = module.Button;
      Mask = module.Mask;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      Item_prop = module.Item_prop;
    }, function (module) {
      Prompt = module.Prompt;
    }],
    execute: function () {
      cclegacy._RF.push({}, "e7d55Q32ahKfauTETq/Xvdr", "UIUtil", undefined);

      /**
       * UI工具类
       */
      var UIUtil = exports('UIUtil', /*#__PURE__*/function () {
        function UIUtil() {}
        /**
         * 更新一个容器。
         * 根据数据动态创建模板UI对象并进行更新
         * @param dataList 数据列表
         * @param container 容器UI对象
         * @param temp 模板UI对象
         * @param onUpdateHandler 更新函数
         */
        UIUtil.updateContainer = function updateContainer(dataList, container, temp, onUpdateHandler) {
          if (!Array.isArray(dataList)) return;
          if (!(isValid(container) && isValid(temp))) return;
          for (var _iterator = _createForOfIteratorHelperLoose(container.children), _step; !(_step = _iterator()).done;) {
            var it = _step.value;
            it.active = false;
          }
          for (var i = 0; i < dataList.length; i++) {
            var _data = dataList[i];
            var _node = container.children[i];
            if (!_node) {
              _node = instantiate(temp);
              container.addChild(_node);
            }
            _node.active = true;
            onUpdateHandler == null || onUpdateHandler(_data, _node, i);
          }
        }

        /**
         * 更新一个容器。
         * 根据数量动态创建模板UI对象并进行更新
         * @param num 数量
         * @param container 容器UI对象
         * @param temp 模板UI对象
         * @param onUpdateHandler 更新函数
         */;
        UIUtil.updateContainerByNum = function updateContainerByNum(num, container, temp, onUpdateHandler) {
          if (!Number.isInteger(num)) return;
          if (!(isValid(container) && isValid(temp))) return;
          for (var _iterator2 = _createForOfIteratorHelperLoose(container.children), _step2; !(_step2 = _iterator2()).done;) {
            var it = _step2.value;
            it.active = false;
          }
          for (var i = 0; i < num; i++) {
            var _node2 = container.children[i];
            if (!_node2) {
              _node2 = instantiate(temp);
              container.addChild(_node2);
            }
            _node2.active = true;
            onUpdateHandler == null || onUpdateHandler(_node2, i);
          }
        }

        /**
         * 设置节点置灰
         * @param node 目标节点
         * @param isGray 是否置灰
         * @param isAll 是否包括所有子节点，默认为true
         */;
        UIUtil.setGrayByNode = function setGrayByNode(node, isGray, isAll) {
          if (isAll === void 0) {
            isAll = true;
          }
          if (!isValid(node)) return;
          // 过滤掉显示有问题的组件，待有解决方案后去除
          var checkNeedIgnoreFn = function checkNeedIgnoreFn(node) {
            if (node.getComponent(Mask)) return true;
            return false;
          };
          var mat = null;
          if (isGray) {
            mat = new Material();
            mat.copy(builtinResMgr.get("ui-sprite-gray-material"));
          }
          if (!!isAll) {
            var uirRenderers = node.getComponentsInChildren(UIRenderer);
            for (var _iterator3 = _createForOfIteratorHelperLoose(uirRenderers), _step3; !(_step3 = _iterator3()).done;) {
              var uiRenderer = _step3.value;
              if (checkNeedIgnoreFn(uiRenderer.node)) continue;
              uiRenderer.customMaterial = mat;
            }
          } else {
            var _uiRenderer = node.getComponent(UIRenderer);
            if (_uiRenderer && !checkNeedIgnoreFn(_uiRenderer.node)) _uiRenderer.customMaterial = mat;
          }
        }

        /**
         * 设置按钮是否启用功能
         * @param button 目标按钮
         * @param enable 是否启用功能
         * @param enableGray 禁用时是否同时置灰，默认置灰
         * @returns
         */;
        UIUtil.setButtonEnable = function setButtonEnable(button, enable, enableGray) {
          if (enableGray === void 0) {
            enableGray = true;
          }
          if (!(button instanceof Button)) return;
          if (!isValid(button.node)) return;
          button.interactable = enable;
          if (enableGray) UIUtil.setGrayByNode(button.node, !enable);
        }

        /**
         * 设置倒计时
         * @param lb 目标Label
         * @param end_time 结束时间
         * @param str 格式化字符串
         * @param callFunc 回调函数
         */;
        UIUtil.setCountdown = function setCountdown(lb, end_time, str, callFunc) {
          if (!isValid(lb)) {
            return;
          }
          var svrTime = Math.floor(App.loginMgr.getServerTimeExact() / 1000);
          if (end_time <= svrTime) {
            if (str) {
              lb.string = "活动准备开始";
            } else {
              lb.string = "活动已结束";
            }
            callFunc == null || callFunc();
            return;
          }
          var vTime = UtilGame.formateTime(end_time - svrTime);
          var text = "";
          if (str && str === "jingjichang") {
            lb.string = vTime[2] + ":" + vTime[1] + ":" + vTime[0];
          } else {
            if (str) {
              text = str;
            } else {
              text = App.languageMgr.getTextById(2660);
            }
            lb.string = UtilGame.formateStr(text, vTime[3], vTime[2] + ":" + vTime[1] + ":" + vTime[0]);
          }
          setTimeout(function () {
            UIUtil.setCountdown(lb, end_time, str, callFunc);
          }, 1000);
        };
        /**
         * 设置倒计时(mm:ss格式)
         * @param lb 目标Label
         * @param end_time 结束时间
         */
        UIUtil.setCountdownMS = function setCountdownMS(lb, end_time, cb) {
          if (!isValid(lb)) return;
          var svrTime = Math.floor(App.loginMgr.getServerTimeExact() / 1000);
          if (end_time <= svrTime) {
            lb.string = "活动已结束";
            cb == null || cb();
            return;
          }
          var vTime = UtilGame.formateTime(end_time - svrTime);
          // let text = App.languageMgr.getTextById(3306);
          if (vTime[2] === "00") {
            lb.string = UtilGame.formateStr("${}", vTime[1] + ":" + vTime[0]);
          } else {
            lb.string = UtilGame.formateStr("${}", vTime[2] + ":" + vTime[1] + ":" + vTime[0]);
          }

          // UIUtil.countdownTimerId = setTimeout(() => {
          //     UIUtil.setCountdownMS(lb, end_time, cb);
          // }, 1000);
        };

        UIUtil.setCountdownMSStop = function setCountdownMSStop() {
          if (UIUtil.countdownTimerId) {
            clearTimeout(UIUtil.countdownTimerId);
            UIUtil.countdownTimerId = 0;
          }
        }

        /**
         * @param node 目标节点
         * @param data 数据
         * @param cls 目标类
         * @param clickFunc 点击回调函数
         * @returns
         */;
        UIUtil.addItemProps = function addItemProps(node, data, cls, clickFunc) {
          if (!isValid(node)) return;
          var name = cls.constructor.name;
          if (!UIUtil.itemPropMap[name]) {
            UIUtil.itemPropMap[name] = [];
          }
          for (var i = 0; i < data.length; i++) {
            var item = App.nodePoolMgr.getNodeByPath(ModuleDef.BASE_COMMON, "prefab/item/itemProp");
            item.setPosition(0, 0);
            item.setScale(1, 1);
            item.parent = node;
            var comp = item.getComponent(Item_prop);
            var _data$i = data[i],
              itemid = _data$i[0],
              num = _data$i[1];
            var itemData = {
              itemid: itemid,
              num: num
            };
            comp.updateItem(itemData);
            if (clickFunc) {
              comp.setClickFunc(clickFunc);
            }
            UIUtil.itemPropMap[name].push(item);
          }
        }
        /**
         * @param cls 目标类
         */;
        UIUtil.removeItemProps = function removeItemProps(cls) {
          var name = cls.constructor.name;
          if (UIUtil.itemPropMap[name]) {
            for (var i = UIUtil.itemPropMap[name].length; i--;) {
              App.nodePoolMgr.putNodeByPath(ModuleDef.BASE_COMMON, "prefab/item/itemProp", this.itemPropMap[name][i]);
            }
          }
          UIUtil.itemPropMap = [];
        }

        /**
         * 显示提示
         * @param str 提示内容
         */;
        UIUtil.showTip = function showTip(str) {
          Prompt.popTip(str);
        };
        return UIUtil;
      }());
      UIUtil.itemPropMap = {};
      UIUtil.countdownTimerId = 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiWxInvite.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ModuleContext.ts', './ModuleDef.ts', './SoundDef.ts', './Utils.ts', './MonitorType.ts', './UIListBase.ts', './DBRecord.ts', './App.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, Label, RichText, Button, ModuleContext, ModuleDef, SoundDef, Utils, MonitorType, UIListBase, DBRecord, App;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      Label = module.Label;
      RichText = module.RichText;
      Button = module.Button;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      SoundDef = module.SoundDef;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UIListBase = module.UIListBase;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "7b25dP0tnVH4o25pmUvWk0G", "uiWxInvite", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var uiWxInvite = exports('uiWxInvite', (_dec = ccclass('uiWxInvite'), _dec(_class = (_class2 = /*#__PURE__*/function (_UIListBase) {
        _inheritsLoose(uiWxInvite, _UIListBase);
        function uiWxInvite() {
          var _this;
          _this = _UIListBase.call(this, uiWxInvite.custom) || this;
          _this.toggleBtns = [];
          /**当前选择的标签类型*/
          _this.curTabType = 0;
          /**布局数据*/
          _this.layoutObj = null;
          /**邀请奖励列表*/
          _this.nodeInvite = void 0;
          /**刷新按钮*/
          _this.btnRefresh = void 0;
          /**规则说明 */
          _this.rtxDesc = void 0;
          /**标题 */
          _this.lbTitle = void 0;
          return _this;
        }
        var _proto = uiWxInvite.prototype;
        _proto.onDispose = function onDispose() {
          _UIListBase.prototype.onDispose.call(this);
          this.removeEventListener();
          this.release();
        };
        _proto.onCreated = function onCreated(tabIndex) {
          App.gameShareMgr.reqWxShareInviteList();
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIListBase.prototype.onCreated.call(this);
          this.initList();
          this.initNode();
          this.addEventListener();
          //this.toggleBtns[tabIndex].isChecked = true;
          // this.updateRedPoint();

          if (tabIndex) {
            this.toggleBtns[tabIndex].isChecked = true;
          } else {
            this.toggleBtns[0].isChecked = true;
          }
        };
        _proto.initNode = function initNode() {
          var _this2 = this;
          this.layoutObj = this.layout;
          this.layoutObj.togglesParent.children.forEach(function (node) {
            _this2.toggleBtns.push(node.getComponent(Toggle));
          });
          this.nodeInvite = Utils.findNode('nodeInvite', this.node);
          this.btnRefresh = Utils.findNode('btnRefresh', this.node);
          this.lbTitle = Utils.findComp('lbTitle', Label, this.node);
          this.rtxDesc = Utils.findComp('rtxDesc', RichText, this.node);
          var config = DBRecord.fetchId('ShuoMingGuiZe', 13);
          if (config) {
            this.rtxDesc.string = config.descrip;
          }
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          var _this3 = this;
          this._doRegistMsg();
          var _loop = function _loop(dx0) {
            _this3.toggleBtns[dx0].node.on(Toggle.EventType.TOGGLE, function (msg) {
              if (!msg.isChecked) return;
              App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
              _this3.openTab(dx0);
            });
          };
          for (var dx0 = 0; dx0 < this.toggleBtns.length; dx0++) {
            _loop(dx0);
          }
          this.btnRefresh.on(Button.EventType.CLICK, this.onBtnRefreshClick, this);
        }

        /**
         * 移除事件监听
         */;
        _proto.removeEventListener = function removeEventListener() {
          this._unRegistMsg();
          for (var dx0 = 0; dx0 < this.toggleBtns.length; dx0++) this.toggleBtns[dx0].node.off(Toggle.EventType.TOGGLE);
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.showView = function showView() {
          this.node.active = true;
          this._doRegistMsg();
        };
        _proto.hideView = function hideView() {
          this.node.active = false;
          this._unRegistMsg();
        };
        _proto._doRegistMsg = function _doRegistMsg() {
          App.monitorMgr.addEventListener(MonitorType.web_wx_share_invite_list, this.handleInviteListUpdate, this);
        };
        _proto._unRegistMsg = function _unRegistMsg() {
          App.monitorMgr.offTarget(this);
        };
        _proto.openTab = function openTab(tabIndex) {
          this.curTabType = tabIndex;
          for (var index = 0; index < this.layoutObj.pages.length; index++) {
            this.layoutObj.pages[index].active = index == tabIndex;
          }
          this.lbTitle.string = tabIndex == 0 ? '邀请列表' : '规则说明';
        }

        /**
         * 邀请玩家列表
         */;
        _proto.handleInviteListUpdate = function handleInviteListUpdate(msg) {
          console.log('WX_SHARE handleInviteListUpdate', msg);
          var roleList = msg.list;
          this.scrollList.array = roleList;
        }

        /**
         * 返回按钮点击
         */;
        _proto.onBtnBackClick = function onBtnBackClick() {
          App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          this.onClose();
        };
        _proto.onBtnRefreshClick = function onBtnRefreshClick() {
          App.gameShareMgr.reqWxShareInviteList();
        }

        /**
         * 页签红点
         */;
        _proto.updateRedPoint = function updateRedPoint() {
          // this.toggleBtns.forEach((toggle) => {
          //     toggle.node.getChildByName("SpriteRedPoint").active
          //         = App.activityManager.checkSpecialGiftRedPoint(toggle.node.getSiblingIndex() + 1);
          // });
        };
        return uiWxInvite;
      }(UIListBase), _class2.custom = {
        prefab: 'prefab/uiWxInvite',
        binding: (_binding = {}, _binding['btnBack'] = {
          method: 'onBtnBackClick'
        }, _binding['imgBack'] = {
          method: 'onBtnBackClick'
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(uiWxInvite, ModuleDef.GAME_MAIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/uiWxShareActivity.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UIBase.ts', './ModuleContext.ts', './ModuleDef.ts', './Utils.ts', './DBRecord.ts', './itemWxShareActivity.ts', './MonitorType.ts', './UIMgr.ts', './uiWxInvite.ts', './Layout_uiWxInvite.ts', './Prompt.ts', './App.ts', './GameShareMgr.ts'], function (exports) {
  var _inheritsLoose, cclegacy, _decorator, Toggle, Label, RichText, Button, Sprite, UIBase, ModuleContext, ModuleDef, Utils, DBRecord, itemWxShareActivity, MonitorType, UIMgr, LayerType, uiWxInvite, Layout_uiWxInvite, Prompt, App, GameShareLogPoint;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      Label = module.Label;
      RichText = module.RichText;
      Button = module.Button;
      Sprite = module.Sprite;
    }, function (module) {
      UIBase = module.UIBase;
    }, function (module) {
      ModuleContext = module.ModuleContext;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      itemWxShareActivity = module.itemWxShareActivity;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      UIMgr = module.UIMgr;
      LayerType = module.LayerType;
    }, function (module) {
      uiWxInvite = module.uiWxInvite;
    }, function (module) {
      Layout_uiWxInvite = module.Layout_uiWxInvite;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameShareLogPoint = module.GameShareLogPoint;
    }],
    execute: function () {
      var _dec, _class, _class2, _binding;
      cclegacy._RF.push({}, "70a84IwUYlJdI77KD6QgJpa", "uiWxShareActivity", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 微信分享操作的类型
       */
      var WxShareActivityType = exports('WxShareActivityType', /*#__PURE__*/function (WxShareActivityType) {
        WxShareActivityType[WxShareActivityType["Invite"] = 1] = "Invite";
        WxShareActivityType[WxShareActivityType["ShareDaily"] = 2] = "ShareDaily";
        return WxShareActivityType;
      }({}));

      /**
       * 微信每日分享状态
       */
      var WxShareActivityDailyStatus = exports('WxShareActivityDailyStatus', /*#__PURE__*/function (WxShareActivityDailyStatus) {
        WxShareActivityDailyStatus[WxShareActivityDailyStatus["NotShare"] = 0] = "NotShare";
        WxShareActivityDailyStatus[WxShareActivityDailyStatus["Shared"] = 1] = "Shared";
        WxShareActivityDailyStatus[WxShareActivityDailyStatus["Received"] = 2] = "Received";
        return WxShareActivityDailyStatus;
      }({}));
      var uiWxShareActivity = exports('uiWxShareActivity', (_dec = ccclass('uiWxShareActivity'), _dec(_class = (_class2 = /*#__PURE__*/function (_UIBase) {
        _inheritsLoose(uiWxShareActivity, _UIBase);
        function uiWxShareActivity() {
          var _this;
          _this = _UIBase.call(this, uiWxShareActivity.custom) || this;
          _this.toggleBtns = [];
          /**当前选择的标签类型*/
          _this.curTabType = 0;
          /**布局数据*/
          _this.layoutObj = null;
          /**邀请奖励列表*/
          _this.nodeInvite = void 0;
          /**邀请按钮*/
          _this.btnInvite = void 0;
          /**每日分享按钮*/
          _this.btnShareDaily = void 0;
          /**每日分享奖励数量*/
          _this.lblDailyRewardNum = void 0;
          /**每日分享剩余次数*/
          _this.rtxDailyDesc = void 0;
          /**已邀请人数 */
          _this.rtxInviteDesc = void 0;
          /**已邀请人数 */
          _this.nodeInviteNum = void 0;
          /**规则按钮 */
          _this.ruleBtn = void 0;
          /**当前分享操作的类型 */
          _this.curShareType = WxShareActivityType.Invite;
          /**每日分享奖励图标 */
          _this.imgIconDaily = void 0;
          return _this;
        }
        var _proto = uiWxShareActivity.prototype;
        _proto.onDispose = function onDispose() {
          _UIBase.prototype.onDispose.call(this);
          this.removeEventListener();
          this.release();
        };
        _proto.onCreated = function onCreated(params) {
          App.gameShareMgr.reqWxShareDailyStatus();
          App.gameShareMgr.reqWxShareInviteInfo();
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonPage1);
          _UIBase.prototype.onCreated.call(this);
          this.initNode();
          this.addEventListener();
          this.toggleBtns[0].isChecked = true;
          // this.updateRedPoint();
          this.openTab(0);
        };
        _proto.initNode = function initNode() {
          var _this2 = this;
          this.layoutObj = this.layout;
          this.layoutObj.togglesParent.children.forEach(function (node) {
            _this2.toggleBtns.push(node.getComponent(Toggle));
          });
          this.nodeInvite = Utils.findNode('nodeInvite', this.node);
          this.btnInvite = Utils.findNode('btnInvite', this.node);
          this.btnShareDaily = Utils.findNode('btnShareDaily', this.node);
          this.lblDailyRewardNum = Utils.findComp('lblDailyRewardNum', Label, this.node);
          this.rtxDailyDesc = Utils.findComp('rtxDailyDesc', RichText, this.node);
          this.rtxInviteDesc = Utils.findComp('rtxInviteDesc', RichText, this.node);
          this.nodeInviteNum = Utils.findNode('nodeInviteNum', this.node);
          this.ruleBtn = Utils.findNode('ruleBtn', this.node);
          this.imgIconDaily = Utils.findNode('imgIconDaily', this.node);
        }

        /**
         * 添加事件监听
         */;
        _proto.addEventListener = function addEventListener() {
          var _this3 = this;
          this._doRegistMsg();
          var _loop = function _loop(dx0) {
            _this3.toggleBtns[dx0].node.on(Toggle.EventType.TOGGLE, function (msg) {
              if (!msg.isChecked) return;
              // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_CommonButton2);
              _this3.openTab(dx0);
            });
          };
          for (var dx0 = 0; dx0 < this.toggleBtns.length; dx0++) {
            _loop(dx0);
          }
          this.btnShareDaily.on(Button.EventType.CLICK, this.onBtnShareDailyClick, this);
          this.btnInvite.on(Button.EventType.CLICK, this.onBtnInviteClick, this);
          this.nodeInviteNum.on(Button.EventType.CLICK, this.onBtnInviteNumClick, this);
          this.ruleBtn.on(Button.EventType.CLICK, this.onBtnRuleClick, this);
        }

        /**
         * 移除事件监听
         */;
        _proto.removeEventListener = function removeEventListener() {
          this._unRegistMsg();
          for (var dx0 = 0; dx0 < this.toggleBtns.length; dx0++) this.toggleBtns[dx0].node.off(Toggle.EventType.TOGGLE);
        }

        //-----------------------------------------------------------------------------------------------------------
        ;

        _proto.showView = function showView() {
          this.node.active = true;
          this._doRegistMsg();
        };
        _proto.hideView = function hideView() {
          this.node.active = false;
          this._unRegistMsg();
        };
        _proto._doRegistMsg = function _doRegistMsg() {
          App.monitorMgr.addEventListener(MonitorType.wx_share_daily_status_update, this.handleShareDailyStatus, this);
          App.monitorMgr.addEventListener(MonitorType.wx_share_daily_success_update, this.handleShareDailySuccess, this);
          App.monitorMgr.addEventListener(MonitorType.wx_share_invite_info_update, this.handleShareInviteInfo, this);
          App.monitorMgr.addEventListener(MonitorType.wx_share_complete, this.handleShareComplete, this);
        };
        _proto._unRegistMsg = function _unRegistMsg() {
          App.monitorMgr.offTarget(this);
        };
        _proto.openTab = function openTab(tabIndex) {
          this.curTabType = tabIndex;
          for (var index = 0; index < this.layoutObj.pages.length; index++) {
            this.layoutObj.pages[index].active = index == tabIndex;
          }
        };
        _proto.refreshUI = function refreshUI(type) {
          // this.updateRedPoint();
          // if (type != this.curTabType) {
          //     return;
          // }
          // this.updateInfo();
        }

        /**
         * 微信每日分享状态更新
         */;
        _proto.handleShareDailyStatus = function handleShareDailyStatus() {
          console.log('WX_SHARE handleShareDailyStatus');
          this.updateDailyUI();
        }

        /**
         * 微信每日分享成功更新
         */;
        _proto.handleShareDailySuccess = function handleShareDailySuccess() {
          console.log('WX_SHARE handleShareDailySuccess');
          this.updateDailyUI();
          App.gameShareMgr.reqWxShareDailyReward();
        }

        /**
         * 微信邀请状态更新
         */;
        _proto.handleShareInviteInfo = function handleShareInviteInfo() {
          console.log('WX_SHARE handleShareInviteInfo');
          this.updateInviteUI();
        }

        /**
         * 微信邀请完成，回到游戏
         */;
        _proto.handleShareComplete = function handleShareComplete(isSuccess) {
          console.warn('WX_SHARE handleShareComplete', isSuccess, this.curShareType);
          if (this.curShareType == WxShareActivityType.ShareDaily) {
            if (isSuccess) {
              App.gameShareMgr.reqWxShareDailySuccess();
            } else {
              Prompt.popTip('分享失败');
            }
          }
        }

        /**
         * 更新每日分享UI
         */;
        _proto.updateDailyUI = function updateDailyUI() {
          var remainNum = App.gameShareMgr.shareDaiLyInof.state == WxShareActivityDailyStatus.NotShare ? 1 : 0;
          var curState = App.gameShareMgr.shareDaiLyInof.state;
          this.rtxDailyDesc.string = "<b><outline color = black width = 2> \u4ECA\u65E5\u5269\u4F59\u9886\u53D6\u6B21\u6570\uFF1A<color=#6af774>" + remainNum + "</color></b>";
          var cfgs = DBRecord.fetchAll('FenXiangJiangLi').filter(function (item) {
            return item.type == WxShareActivityType.ShareDaily;
          });
          if (cfgs.length > 0) {
            this.lblDailyRewardNum.string = "" + cfgs[0].reward[0][1];
          }
          this.btnShareDaily.getComponent(Sprite).grayscale = curState == WxShareActivityDailyStatus.Received ? true : false;
          this.btnShareDaily.getChildByName('Label').getComponent(Label).string = curState == WxShareActivityDailyStatus.NotShare ? '分享' : curState == WxShareActivityDailyStatus.Received ? '已领取' : '领取';
          this.imgIconDaily.getComponent(Sprite).grayscale = curState == WxShareActivityDailyStatus.Received ? true : false;
          var hasRed = App.gameShareMgr.checkShareDailyRedPoint();
          this.btnShareDaily.getChildByName('SpriteRedPoint').active = hasRed;
          this.toggleBtns[1].node.getChildByName('SpriteRedPoint').active = hasRed;
        }

        /**
         * 更新邀请UI
         */;
        _proto.updateInviteUI = function updateInviteUI() {
          var cfgs = DBRecord.fetchAll('FenXiangJiangLi').filter(function (item) {
            return item.type == WxShareActivityType.Invite;
          });
          var invateItem = this.nodeInvite.children;
          for (var index = 0; index < invateItem.length; index++) {
            var element = invateItem[index];
            element.active = true;
            var item = element.getComponent(itemWxShareActivity);
            item.setData(cfgs[index], {
              isFinish: false
            });
          }
          var inviteNum = App.gameShareMgr.shareInviteInfo.count;
          this.rtxInviteDesc.string = "<b><outline color = black width = 2> \u5DF2\u9080\u8BF7\u597D\u53CB\uFF1A<color=#6af774>" + inviteNum + "</>\u540D</>";
          var hasRed = App.gameShareMgr.checkInviteRedPoint();
          this.toggleBtns[0].node.getChildByName('SpriteRedPoint').active = hasRed;
        }

        /**
         * 点击每日分享按钮,分享或领奖
         */;
        _proto.onBtnShareDailyClick = function onBtnShareDailyClick() {
          if (App.gameShareMgr.checkCanShareDaily()) {
            this.curShareType = WxShareActivityType.ShareDaily;
            App.gameShareMgr.shareGame(GameShareLogPoint.Daily);
          } else if (App.gameShareMgr.checkCanGetRewardDaily()) {
            App.gameShareMgr.reqWxShareDailyReward();
          }
        }

        /**
         * 点击邀请按钮
         */;
        _proto.onBtnInviteClick = function onBtnInviteClick() {
          this.curShareType = WxShareActivityType.Invite;
          App.gameShareMgr.shareGame(GameShareLogPoint.Invite);
        }

        /**
         * 点击显示邀请列表按钮
         */;
        _proto.onBtnInviteNumClick = function onBtnInviteNumClick() {
          UIMgr.inst.asyncOpen(uiWxInvite, LayerType.panel, Layout_uiWxInvite, [0]);
        }

        /**
         * 点击规则按钮
         */;
        _proto.onBtnRuleClick = function onBtnRuleClick() {
          UIMgr.inst.asyncOpen(uiWxInvite, LayerType.panel, Layout_uiWxInvite, [1]);
        }

        /**
         * 返回按钮点击
         */;
        _proto.onBtnBackClick = function onBtnBackClick() {
          // App.soundMgr.playUIEffect(SoundDef.Sound_Audio_ClosePage1);
          this.onClose();
        }

        /**
         * 页签红点
         */;
        _proto.updateRedPoint = function updateRedPoint() {
          // this.toggleBtns.forEach((toggle) => {
          //     toggle.node.getChildByName("SpriteRedPoint").active
          //         = App.activityManager.checkSpecialGiftRedPoint(toggle.node.getSiblingIndex() + 1);
          // });
        };
        return uiWxShareActivity;
      }(UIBase), _class2.custom = {
        prefab: 'prefab/uiWxShareActivity',
        binding: (_binding = {}, _binding['btnBack'] = {
          method: 'onBtnBackClick'
        }, _binding['imgBack'] = {
          method: 'onBtnBackClick'
        }, _binding)
      }, _class2)) || _class));
      ModuleContext.attachModule(uiWxShareActivity, ModuleDef.GAME_MAIN);
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UpAttrTipsItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Node, Label, isValid, Vec3, instantiate, UIOpacity, tween, Component, Sprite;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      Label = module.Label;
      isValid = module.isValid;
      Vec3 = module.Vec3;
      instantiate = module.instantiate;
      UIOpacity = module.UIOpacity;
      tween = module.tween;
      Component = module.Component;
      Sprite = module.Sprite;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
      cclegacy._RF.push({}, "c2be5YkXoFDQ69vM5E5O5U1", "UpAttrTipsItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var UpAttrTipsItem = exports('UpAttrTipsItem', (_dec = ccclass("UpAttrTipsItem"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Label
      }), _dec4 = property({
        type: Node
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(UpAttrTipsItem, _Component);
        function UpAttrTipsItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          /** Tips预制体模板（不包含组件自身） */
          _initializerDefineProperty(_this, "tipsTemplate", _descriptor, _assertThisInitialized(_this));
          /** 提示文本Label组件（用于获取组件类型参考） */
          _initializerDefineProperty(_this, "tipsLabelRef", _descriptor2, _assertThisInitialized(_this));
          /** 父节点容器（tips将添加到这里） */
          _initializerDefineProperty(_this, "tipsContainer", _descriptor3, _assertThisInitialized(_this));
          // 常量配置
          _this.TIPS_HEIGHT = 0;
          _this.FLOAT_DISTANCE = 100;
          _this.FADE_IN_DURATION = 0.3;
          _this.FADE_OUT_DURATION = 0.4;
          _this.DISPLAY_DELAY = 0.4;
          // 当前正在运行的动画tips列表
          _this.runningTips = new Set();
          return _this;
        }
        var _proto = UpAttrTipsItem.prototype;
        /**
         * 创建并播放单个属性tip动画
         * @param attrName 属性名称
         * @param addValue 增加值
         * @param localPosition 本地位置（相对于tipsContainer）
         * @returns 创建的tip节点
         */
        _proto.showTip = function showTip(attrName, addValue, localPosition) {
          if (!this.tipsTemplate || !this.tipsContainer) {
            console.warn("Tips模板或容器未设置");
            return null;
          }

          // 创建tip节点
          var tipNode = this.createTipNode(attrName, addValue);
          if (!tipNode) return null;

          // 设置位置
          if (localPosition) {
            tipNode.setPosition(localPosition);
          }

          // 播放动画
          this.playTipAnimation(tipNode);
          return tipNode;
        }

        /**
         * 批量显示tips
         * @param tipsData 数组，每个元素包含attrName和addValue
         * @param startY 起始Y坐标
         * @param spacing 间距
         */;
        _proto.showMultipleTips = function showMultipleTips(tipsData, startY, spacing) {
          var _this2 = this;
          if (startY === void 0) {
            startY = 0;
          }
          if (spacing === void 0) {
            spacing = this.TIPS_HEIGHT;
          }
          if (!tipsData || tipsData.length === 0) return;

          // 使用requestAnimationFrame分批创建，避免卡顿
          tipsData.forEach(function (data, index) {
            setTimeout(function () {
              if (!isValid(_this2)) return;
              var position = new Vec3(0, startY - index * spacing, 0);
              _this2.showTip(data.attrName, data.addValue, position);
            }, index * 700); // 500ms间隔
          });
        }

        /**
         * 创建tip节点
         */;
        _proto.createTipNode = function createTipNode(attrName, addValue) {
          // 克隆模板节点
          var tipNode = instantiate(this.tipsTemplate);
          if (!tipNode) {
            console.error("克隆节点失败");
            return null;
          }

          // 设置父节点
          tipNode.parent = this.tipsContainer;
          tipNode.active = true;

          // 设置文本
          var labelNode = tipNode.getChildByName("tipsLabel");
          if (!labelNode) {
            console.warn("找不到tipsLabel子节点");
            tipNode.destroy();
            return null;
          }
          var label = labelNode.getComponent(Label);
          if (!label) {
            console.warn("Label组件不存在");
            tipNode.destroy();
            return null;
          }

          // 设置文本内容
          label.string = attrName + " +" + addValue;

          // 设置初始状态
          this.setTipInitialState(tipNode);

          // 添加到运行列表
          this.runningTips.add(tipNode);
          return tipNode;
        }

        /**
         * 设置tip初始状态
         */;
        _proto.setTipInitialState = function setTipInitialState(tipNode) {
          tipNode.scale = new Vec3(0.5, 0.5, 1);

          // 设置透明度
          var uiOpacity = tipNode.getComponent(UIOpacity);
          if (uiOpacity) {
            uiOpacity.opacity = 0;
          } else {
            // 如果没有UIOpacity组件，通过Label或Sprite设置
            this.setChildrenOpacity(tipNode, 0);
          }
        }

        /**
         * 设置子节点的透明度
         */;
        _proto.setChildrenOpacity = function setChildrenOpacity(node, opacity) {
          // 递归设置所有子节点的透明度
          var setNodeColorOpacity = function setNodeColorOpacity(targetNode, alpha) {
            // 设置Label的透明度
            var label = targetNode.getComponent(Label);
            if (label) {
              var color = label.color.clone();
              color.a = alpha;
              label.color = color;
            }

            // 设置Sprite的透明度
            var sprite = targetNode.getComponent(Sprite);
            if (sprite) {
              var _color = sprite.color.clone();
              _color.a = alpha;
              sprite.color = _color;
            }

            // 递归处理子节点
            targetNode.children.forEach(function (child) {
              setNodeColorOpacity(child, alpha);
            });
          };
          setNodeColorOpacity(node, opacity);
        }

        /**
         * 播放tip动画
         */;
        _proto.playTipAnimation = function playTipAnimation(tipNode) {
          var _this3 = this;
          var startPos = tipNode.position.clone();
          var midPos = new Vec3(startPos.x, startPos.y + this.FLOAT_DISTANCE, startPos.z);
          var endPos = new Vec3(startPos.x, startPos.y + this.FLOAT_DISTANCE * 2, startPos.z);
          var uiOpacity = tipNode.getComponent(UIOpacity);
          // 重置透明度为0
          uiOpacity.opacity = 0;

          // 创建一个包含所有动画属性的对象
          var animationTarget = {
            node: tipNode,
            uiOpacity: uiOpacity,
            scale: tipNode.scale.clone(),
            position: tipNode.position.clone(),
            opacity: uiOpacity.opacity
          };
          tween(animationTarget)
          // 淡入阶段
          .to(this.FADE_IN_DURATION, {
            scale: Vec3.ONE,
            position: midPos,
            opacity: 255
          }, {
            easing: "sineOut",
            onUpdate: function onUpdate(target) {
              target.node.scale = target.scale;
              target.node.position = target.position;
              target.uiOpacity.opacity = target.opacity;
            }
          }).delay(this.DISPLAY_DELAY)
          // 淡出阶段
          .to(this.FADE_OUT_DURATION, {
            scale: new Vec3(0.5, 0.5, 1),
            position: endPos,
            opacity: 0
          }, {
            easing: "cubicIn",
            onUpdate: function onUpdate(target) {
              target.node.scale = target.scale;
              target.node.position = target.position;
              target.uiOpacity.opacity = target.opacity;
            },
            onComplete: function onComplete() {
              _this3.removeTipNode(tipNode);
            }
          }).start();
        }

        /**
         * 设置节点透明度
         */;
        _proto.setNodeOpacity = function setNodeOpacity(node, opacity) {
          // 方法1：使用UIOpacity组件（最高优先级）
          var uiOpacity = node.getComponent(UIOpacity);
          if (uiOpacity) {
            uiOpacity.opacity = opacity;
            return;
          }

          // 方法2：通过子节点的渲染组件设置透明度
          this.setChildrenOpacity(node, opacity);
        }

        /**
         * 移除tip节点
         */;
        _proto.removeTipNode = function removeTipNode(tipNode) {
          if (!isValid(tipNode)) return;

          // 从运行列表中移除
          this.runningTips["delete"](tipNode);

          // 移除节点
          tipNode.removeFromParent();
          tipNode.destroy();
        }

        /**
         * 停止所有正在运行的tips动画
         */;
        _proto.stopAllTips = function stopAllTips() {
          this.runningTips.forEach(function (tipNode) {
            if (isValid(tipNode)) {
              // 停止该节点的所有tween动画
              tween(tipNode).stop();
              tipNode.destroy();
            }
          });
          this.runningTips.clear();
        }

        /**
         * 立即完成所有动画并移除tips
         */;
        _proto.finishAllTips = function finishAllTips() {
          var _this4 = this;
          this.runningTips.forEach(function (tipNode) {
            if (isValid(tipNode)) {
              // 直接设置最终状态
              _this4.setNodeOpacity(tipNode, 0);
              tipNode.destroy();
            }
          });
          this.runningTips.clear();
        }

        /**
         * 清理资源
         */;
        _proto.onDestroy = function onDestroy() {
          this.stopAllTips();
        };
        return UpAttrTipsItem;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "tipsTemplate", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "tipsLabelRef", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "tipsContainer", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilGame.ts", ['cc', './DBRecord.ts', './ModuleDef.ts', './App.ts', './UIMgr.ts', './UIPageDef.ts', './UI_GetRewardView.ts', './Layout_UI_GetRewardView.ts', './PlaceConfigMgr.ts', './TeamMgr.ts', './PlaceGameEnum.ts'], function (exports) {
  var cclegacy, isValid, Vec3, DBRecord, ModuleDef, App, LayerType, UIMgr, UIPageDef, UI_GetRewardView, Layout_UI_GetRewardView, PlaceConfigMgr, TeamMgr, SoldierType;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
      isValid = module.isValid;
      Vec3 = module.Vec3;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      LayerType = module.LayerType;
      UIMgr = module.UIMgr;
    }, function (module) {
      UIPageDef = module.UIPageDef;
    }, function (module) {
      UI_GetRewardView = module.UI_GetRewardView;
    }, function (module) {
      Layout_UI_GetRewardView = module.Layout_UI_GetRewardView;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      TeamMgr = module.TeamMgr;
    }, function (module) {
      SoldierType = module.SoldierType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "5cb05vPsptDBq0TwYj36/U2", "UtilGame", undefined);
      var UtilGame = exports('UtilGame', /*#__PURE__*/function () {
        function UtilGame() {}
        /**
         * 获取配置杂项某个配置
         * @param keyName 配置名称
         * @returns
         */
        UtilGame.getZaXiangConfig = function getZaXiangConfig(keyName) {
          var cfg = DBRecord.fetchId("Zaxiang", keyName);
          if (cfg) {
            return cfg.parameter;
          }
          return 0;
        }

        /**
         * 获取服务器时间戳 毫秒
         * @returns
         */;
        UtilGame.getExaTime = function getExaTime() {
          return App.loginMgr.getServerTimeExact();
        }

        /**
         * 获取服务器时间
         * @returns
         */;
        UtilGame.getSvrTime = function getSvrTime() {
          return Math.floor(App.loginMgr.getServerTimeExact() / 1000);
        }

        /**
         * 品质颜色
         * 绿、蓝、紫、橙、红、金
         */;
        //Gem----------------------------------------------------------------------------------------------------------
        UtilGame.cloneS = function cloneS(obj0) {
          var obj1 = {};
          for (var key in obj0) {
            obj1[key] = obj0[key];
          }
          return obj1;
        };
        UtilGame.copyObj = function copyObj(obj) {
          return JSON.parse(JSON.stringify(obj));
        };
        UtilGame.getGemFight = function getGemFight(id) {
          var BaoShiShuXing = DBRecord.fetchId("BaoShiShuXing", id);
          if (!BaoShiShuXing) return 0;
          var nVal = 0;
          var vVit = BaoShiShuXing.attr || [];
          for (var dx0 = 0; dx0 < vVit.length; dx0++) {
            var oVit = vVit[dx0];
            var ShuXing = DBRecord.fetchId("ShuXing", oVit[0]);
            if (!ShuXing) continue;
            nVal += oVit[1] * ShuXing.coefficient;
          }
          nVal += BaoShiShuXing.score;
          return nVal;
        }

        //String----------------------------------------------------------------------------------------------------------
        ;

        UtilGame.formateStr = function formateStr() {
          for (var _len = arguments.length, _any = new Array(_len), _key = 0; _key < _len; _key++) {
            _any[_key] = arguments[_key];
          }
          if (!arguments[0]) {
            return "";
          }
          var sStr = "";
          var vStr = arguments[0].split("${}");
          for (var dx0 = 0; dx0 < vStr.length - 1; dx0++) {
            sStr += vStr[dx0] + arguments[dx0 + 1];
          }
          sStr += vStr[vStr.length - 1] || "";
          return sStr;
        };
        UtilGame.formateRtx = function formateRtx(str, color, outline, bold) {
          if (color) {
            str = "<color=" + color + ">" + str + "</color>";
          }
          if (outline) {
            str = "<outline color=" + outline + " width=2>" + str + "</outline>";
          }
          if (bold) {
            str = "<b>" + str + "</>";
          }
          return str;
        }

        //time0-要显示的时间；time1-前移time1到当前0点
        ;

        UtilGame.formateTime = function formateTime(time0, time1) {
          if (time0 === void 0) {
            time0 = 0;
          }
          if (time1 === void 0) {
            time1 = 0;
          }
          if (time0 < 0) {
            time0 = 0;
          }
          if (time1) {
            var secDate = new Date(time1);
            time0 -= secDate.getHours() * 3600;
            time0 -= secDate.getMinutes() * 60;
            time0 -= secDate.getSeconds();
          }
          var vTime = [];
          vTime.push(time0 % 60); //秒
          time0 = Math.floor(time0 / 60);
          vTime.push(time0 % 60); //分
          time0 = Math.floor(time0 / 60);
          vTime.push(time0 % 24); //时
          time0 = Math.floor(time0 / 24);
          vTime.push(time0); //天

          for (var dx0 = 0; dx0 < 3; dx0++) {
            vTime[dx0] = (vTime[dx0] >= 10 ? "" : "0") + vTime[dx0];
          }
          return vTime;
        };
        UtilGame.getTimeDesc = function getTimeDesc(valTime) {
          if (valTime === void 0) {
            valTime = 0;
          }
          var vTime = UtilGame.formateTime(valTime);
          return (vTime[3] > 0 ? "" + vTime[3] + UtilGame.getGlobalTxt(7051) : "") + (vTime[2] + ":" + vTime[1] + ":" + vTime[0]);
        };
        UtilGame.getTimeDate = function getTimeDate(valTime) {
          if (valTime === void 0) {
            valTime = 0;
          }
          var date = new Date(valTime * 1000);
          var desc_ = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
          desc_ += " " + this.forateNum(date.getHours(), 2) + ":" + this.forateNum(date.getMinutes(), 2) + ":" + this.forateNum(date.getSeconds(), 2);
          return desc_;
        };
        UtilGame.forateNum = function forateNum(num, len) {
          if (len === void 0) {
            len = 2;
          }
          var str_ = "";
          var max = 1;
          for (var dx0 = 1; dx0 < len; dx0++) {
            max *= 10;
            if (num < max) {
              str_ += "0";
            }
          }
          return str_ + num.toString();
        };
        UtilGame.setCountdown = function setCountdown(lblTime, valTime, strDesc, callFunc) {
          if (strDesc === void 0) {
            strDesc = "${}";
          }
          if (!isValid(lblTime) || !lblTime.node || !lblTime.node.active) {
            return;
          }
          if (valTime < 0) {
            if (callFunc) {
              callFunc();
            }
            return;
          }
          var vTime = UtilGame.formateTime(valTime);
          var sTime = (vTime[3] > 0 ? "" + vTime[3] + UtilGame.getGlobalTxt(7051) : "") + (vTime[2] + ":" + vTime[1] + ":" + vTime[0]);
          lblTime.string = UtilGame.formateStr(strDesc, sTime);
          setTimeout(function () {
            UtilGame.setCountdown(lblTime, valTime - 1, strDesc, callFunc);
          }, 1000);
        };
        UtilGame.adsorbVec = function adsorbVec(vec0, vec1, valX, valY) {
          if (vec1.x - vec0.x < valX && vec1.x + vec0.x < valX) vec0.x = vec1.x;
          if (vec1.y - vec0.y < valY && vec1.y + vec0.y < valY) vec0.y = vec1.y;
        };
        UtilGame.getMoveVec = function getMoveVec(pos0, pos1) {
          var vel = new Vec3(pos1.x, pos1.y, 0).subtract(pos0);
          UtilGame.adsorbVec(vel, Vec3.ZERO, 10, 10);
          this.limitVec(vel, -1, 1, -1, 1);
          return vel;
        };
        UtilGame.limitVec = function limitVec(vec, x0, x1, y0, y1) {
          vec.x = this.limitVal(vec.x, x0, x1);
          vec.y = this.limitVal(vec.y, y0, y1);
          return vec;
        };
        UtilGame.chkInRect = function chkInRect(vec0, vec1, lenX, lenY) {
          if (Math.abs(vec1.x - vec0.x) <= lenX / 2) return true;
          if (Math.abs(vec1.y - vec0.y) <= lenY / 2) return true;
          return false;
        }

        //Val----------------------------------------------------------------------------------------------------------
        ;

        UtilGame.limitVal = function limitVal(val, min, max) {
          if (min === void 0) {
            min = 0;
          }
          if (max === void 0) {
            max = 1;
          }
          if (val < min) return min;
          if (val > max) return max;
          return val;
        }

        //Item----------------------------------------------------------------------------------------------------------
        ;

        UtilGame.arrItem = function arrItem(mItem, bSort) {
          if (bSort === void 0) {
            bSort = true;
          }
          var vItem = [];
          for (var key in mItem) {
            vItem.push(mItem[key]);
          }
          if (bSort) {
            vItem.sort(function (itemA, itemB) {
              var configA = App.bagMgr.getItemConfig(itemA.itemid);
              var configB = App.bagMgr.getItemConfig(itemB.itemid);
              if (configA.color !== configB.color) {
                return configB.color - configA.color;
              }
              return configA.id - configB.id;
            });
          }
          return vItem;
        }

        //Config-----------------------------------------------------------------------------------------------
        ;

        UtilGame.getGlobalVal = function getGlobalVal(id) {
          return (DBRecord.fetchId("ShuoMingQuanJu", id) || {}).value;
        };
        UtilGame.getGlobalTxt = function getGlobalTxt(id, args) {
          var sTxt = App.languageMgr.getTextById(id);
          if (args) {
            sTxt = UtilGame.formateStr(sTxt, args);
          }
          return sTxt;
        };
        UtilGame.getComConfig = function getComConfig(itemId, color) {
          var Config = {};
          Config.id = itemId;
          Config.color = 0;
          {
            var itemConfig = App.bagMgr.getItemConfig(itemId);
            if (itemConfig) {
              Config.icon = itemConfig.icon;
              Config.name = itemConfig.name;
              Config.color = color || itemConfig.color;
              Config.scale = 0.6;
              Config.fall = itemConfig.icon;
            }
          }
          {
            var ZhuangBei = DBRecord.fetchId("ZhuangBei", itemId);
            if (ZhuangBei) {
              Config.icon = ZhuangBei.icon;
              Config.name = ZhuangBei.name;
              Config.color = color || ZhuangBei.min_color[0];
              Config.scale = 1;
              Config.fall = ["", "falling_object_helmet", "falling_object_cuirass", "falling_object_wand", "falling_object_grimoire", "falling_object_pauldron", "falling_object_pants", "falling_object_shoes", "falling_object_glove", "falling_object_necklace", "falling_object_ring"][ZhuangBei.type];
            }
          }
          return Config;
        }

        //Text-----------------------------------------------------------------------------------------------
        /**
         * 计算装备基础属性
         * @param itemId 装备ID
         * @param levelRate 等级系数
         * @param color 品质
         * @returns 基础属性数组
         */;
        UtilGame.calcBaseAttr = function calcBaseAttr(itemId, color) {
          var _DBRecord$fetchId;
          var levelRate = UtilGame.getLevelRate(itemId, color);
          var baseAttrs = [];
          // 获取装备配置
          var cfgEquip = DBRecord.fetchId("ZhuangBei", itemId);
          if (!cfgEquip) {
            return baseAttrs;
          }

          // 获取基础属性
          var basicAttributes = cfgEquip.basic_attributes || {};
          var attrVal = basicAttributes[1] || 0;

          // 获取全局系数
          var factor1 = ((_DBRecord$fetchId = DBRecord.fetchId("ShuoMingQuanJu", 17)) == null ? void 0 : _DBRecord$fetchId.value) || 1.35;
          var ratioList = DBRecord.fetchId("ShuoMingQuanJu", 27).value || {};
          var colorRatio = ratioList[color] || 1;

          // 计算最小值和最大值
          var minVal = Math.ceil(attrVal * levelRate * colorRatio);
          var maxVal = Math.ceil(attrVal * levelRate * colorRatio * factor1);
          return [minVal, maxVal];
        }

        /**
         * 获取等级系数
         * @param itemId 装备ID
         * @returns 等级系数
         */;
        UtilGame.getLevelRate = function getLevelRate(itemId, color) {
          var cfgEquip = DBRecord.fetchId("ZhuangBei", itemId);
          if (!cfgEquip) {
            return 0;
          }
          var maxLvList = DBRecord.fetchId("ShuoMingQuanJu", 47).value || {};
          var booleanLv = cfgEquip.boolean_lv || 0;
          var maxLv = maxLvList[color - 1];
          var roleLevel = App.roleMgr.getRoleLv() || 1;
          var level;
          if (booleanLv === 0) {
            level = Math.min(roleLevel, maxLv);
          } else {
            level = booleanLv;
          }

          // 计算等级系数
          return level / maxLv;
        }

        /**跳转界面时需要关闭的弹窗 */;
        /**
         * 是否可以跳转到特定UI，必须功能解锁，如果是跳转到活动页面则必须活动开启
         * @param lockId 功能id
         * @param _strView 界面名称
         * @returns
         */
        UtilGame.checkCanJump = function checkCanJump(lockId, _strView) {
          if (App.battleMgr.isInBattle()) {
            return false;
          }
          return App.lockMgr.checkFuncLock(lockId);
        }

        /**
         * 页面跳转
         * @param jumpId 跳转ID
         * @param args 打开参数
         * @param isOnce 是否单例打开
         */;
        UtilGame.jumpView = function jumpView(jumpId, args, isOnce) {
          if (args === void 0) {
            args = [];
          }
          if (isOnce === void 0) {
            isOnce = false;
          }
          var uiCls = undefined;
          var layerType = LayerType.panel;
          var layoutCls = undefined;
          var pageConfig = UIPageDef[jumpId];
          if (pageConfig && pageConfig.uiClass && pageConfig.layoutClass) {
            uiCls = pageConfig.uiClass;
            layoutCls = pageConfig.layoutClass;
          } else {
            console.warn("\u672A\u627E\u5230\u9875\u9762\u914D\u7F6E\u6216\u914D\u7F6E\u672A\u5B8C\u6210: jumpId=" + jumpId);
            return;
          }
          if (!uiCls) {
            return;
          }
          UIMgr.inst.closePanelList(this.JUMP_CLOSE_UI);
          if (isOnce) {
            UIMgr.inst.openOnce(uiCls, layerType, layoutCls, args);
          } else {
            UIMgr.inst.open(uiCls, layerType, layoutCls, args);
          }
        }

        /**
         * 获取道具图标路径
         * @param itemid 道具ID
         * @returns 图标路径
         */;
        UtilGame.getItemPath = function getItemPath(itemid) {
          var itemConfig = DBRecord.fetchId("Item", itemid);
          if (!itemConfig) {
            return "";
          }
          return "/item_icon/" + itemConfig.icon;
        }

        /**
         * 加载道具图标
         * @param node Sprite节点
         * @param itemid 道具ID
         */;
        UtilGame.loadItemIcon = function loadItemIcon(sprite, itemid) {
          App.resMgr.loadImage(sprite, ModuleDef.GAME_ICON, UtilGame.getItemPath(Number(itemid)));
        }

        /**
         * 加载道具背景
         * @param node Sprite节点
         * @param color 道具品质
         */;
        UtilGame.loadItemBg = function loadItemBg(sprite, color) {
          App.resMgr.loadImage(sprite, ModuleDef.BASE_COMMON, "/texture/new_common/com_iconbg_0" + color);
        }

        /**
         * 加载资源道具图标
         * @param imgIcon
         * @param moneyId
         */;
        UtilGame.loadAssetIcon = function loadAssetIcon(imgIcon, moneyId) {
          App.resMgr.loadImage(imgIcon, ModuleDef.GAME_ICON, "/item_icon/littleicon/" + moneyId);
        }

        /**
         * 加载建筑图标
         * @param node Sprite节点
         * @param icon 建筑图标
         */;
        UtilGame.loadBuildIcon = function loadBuildIcon(sprite, icon) {
          App.resMgr.loadImage(sprite, ModuleDef.GAME_ICON, "/build_icon/" + icon);
        }

        /**
         * 加载设备图标
         * @param node
         * @param icon
         */;
        UtilGame.loadSheBeiIcon = function loadSheBeiIcon(sprite, sbId) {
          var config = PlaceConfigMgr.inst.getSheBeiConfig(sbId);
          if (config && config.icon) {
            App.resMgr.loadImage(sprite, ModuleDef.GAME_ICON, "/build_icon/" + config.icon);
          }
        }

        /**
         * 加载英雄头像图标
         * @param node
         * @param hero_id
         * @param type _head小头像 _list英雄列表大头像
         */;
        UtilGame.loadHeroHeadIcon = function loadHeroHeadIcon(sprite, hero_id, type) {
          if (type === void 0) {
            type = "_head";
          }
          var heroCfg = TeamMgr.inst.getHeroIdCfg(hero_id);
          if (heroCfg) {
            App.resMgr.loadImage(sprite, ModuleDef.GAME_ICON, "/head_icon/" + heroCfg.icon + type);
          }
        }
        /**
         * 加载英雄头像品质背景框
         * @param node Sprite节点
         * @param color 品质
         */;
        UtilGame.loadHeroHeadBg = function loadHeroHeadBg(sprite, color, type) {
          if (type === void 0) {
            type = "big";
          }
          if (type === "big") {
            App.resMgr.loadImage(sprite, ModuleDef.BASE_COMMON, "/texture/new_common/com_hero_pinzhibg0" + color);
          } else if (type === "min") {
            App.resMgr.loadImage(sprite, ModuleDef.BASE_COMMON, "/texture/new_common/com_iconbg_0" + color);
          }
        }
        /**
         * 加载士兵头像图标
         * @param node
         * @param soldier_id
         * @param type _head小头像 _list列表大头像
         */;
        UtilGame.loadSoldierHeadIcon = function loadSoldierHeadIcon(sprite, soldier_id, type) {
          if (type === void 0) {
            type = "_head";
          }
          var soldierCfg = TeamMgr.inst.getSoldierIdCfg(soldier_id);
          if (soldierCfg) {
            App.resMgr.loadImage(sprite, ModuleDef.GAME_ICON, "/head_icon/" + soldierCfg.icon + type);
          }
        }

        /**
         * 加载兵力图标
         * @param node Sprite节点
         * @param soldierType 兵种类型
         */;
        UtilGame.loadSoldierIcon = function loadSoldierIcon(node, soldierType) {
          var _iconArr;
          var iconArr = (_iconArr = {}, _iconArr[SoldierType.BuBing] = "com_littleicon_bzbubing", _iconArr[SoldierType.GongBing] = "com_littleicon_bzgongbing", _iconArr[SoldierType.QiBing] = "com_littleicon_bzqibing", _iconArr);
          App.resMgr.loadImage(node, ModuleDef.BASE_COMMON, "/texture/new_common/" + iconArr[soldierType]);
        }
        /**
         * 加载技能图标
         * @param node Sprite节点
         * @param skill_id 技能ID
         */;
        UtilGame.loadSkillIcon = function loadSkillIcon(node, skill_id) {
          var skillCfg = DBRecord.fetchId("Skill", skill_id);
          App.resMgr.loadImage(node, ModuleDef.GAME_ICON, "/skill_icon/" + skillCfg.icon);
        }
        /**
         * 获取技能类型文本
         * @param type 技能类型
         */;
        UtilGame.loadSkillTypeIcon = function loadSkillTypeIcon(node, type) {
          // 根据实际的技能类型定义返回对应文本
          var str = "";
          switch (type) {
            case 1:
              str = "com_sklii_pu";
              break;
            case 2:
            case 3:
              str = "com_sklii_bei";
              break;
            case 4:
              str = "com_sklii_nu";
              break;
            default:
              str = "2";
              break;
          }
          App.resMgr.loadImage(node, ModuleDef.BASE_COMMON, "/texture/new_common/" + str);
        }

        /**
         * 显示消息奖励
         * @param msg 消息
         * @param opsrc 操作来源
         */;
        UtilGame.showCommonAward = function showCommonAward(item_list, callFunc) {
          if (!item_list.length) {
            return;
          }
          UIMgr.inst.open(UI_GetRewardView, LayerType.panel, Layout_UI_GetRewardView, [item_list, callFunc]);
        };
        return UtilGame;
      }());
      UtilGame.qualityColorArr = ["93e777", "4bd5ff", "e27bff", "ffd161", "ff6151", "ffec4f"];
      UtilGame.JUMP_CLOSE_UI = ["uiHeroPropInfo"];
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilityAndroid.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilityPlatform.ts', './Prompt.ts', './GameBoot.ts', './App.ts', './EventType.ts', './GameDef.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, native, game, UtilityPlatform, Prompt, GameBoot, App, EventType, GameDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      native = module.native;
      game = module.game;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      GameBoot = module.GameBoot;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b55659pcLhLeYzRi7f0IHo9", "UtilityAndroid", undefined);
      var UtilityAndroid = exports('default', /*#__PURE__*/function (_UtilityPlatform) {
        _inheritsLoose(UtilityAndroid, _UtilityPlatform);
        function UtilityAndroid() {
          var _this;
          _this = _UtilityPlatform.call(this) || this;
          _this._notice_cb_funtion = void 0;
          return _this;
        }
        var _proto = UtilityAndroid.prototype;
        _proto.init = function init(cb) {
          var _this2 = this;
          console.log("我是android平台的init");
          native.bridge.sendToNative("init", "我是cocos js 调用  init"); //发送
          native.bridge.onNative = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(arg0, arg1) {
            var json, data, _data;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  if (!(arg0 == "java2js_initSdk")) {
                    _context.next = 7;
                    break;
                  }
                  // java返回了。 直接关闭loading遮罩。
                  App.monitorMgr.dispatchEvent(EventType.loading_auto_close);
                  json = {
                    id: 1,
                    appName: GameDef.appName,
                    appId: GameDef.appId,
                    rewardVideo_CodeId: GameDef.rewardVideo_CodeId
                  };
                  native.bridge.sendToNative("Js2Java_loaded", JSON.stringify(json));
                  console.log("  sendToNative    Js2Java_loaded");
                  _context.next = 21;
                  break;
                case 7:
                  if (!(arg0 == "Java2Js_EnterGameOk")) {
                    _context.next = 20;
                    break;
                  }
                  data = JSON.parse(arg1);
                  _this2.uid = data.uid;
                  _this2._sessionid = data.session_id;
                  _this2._site = data.site; //sdk 没返回，暂时写死
                  console.log("  android sdk uid  sessionId===>>==", _this2.uid, _this2._sessionid, _this2._site);
                  _context.next = 15;
                  return _this2.initConfig();
                case 15:
                  //加载线上配置。
                  _this2.initSerList();
                  cb && cb();
                  GameBoot.Instance.sdkInitFinish(); // sdk初始化完毕。 执行游戏加载流程（加载完毕进入main）
                  _context.next = 21;
                  break;
                case 20:
                  if (arg0 == "Java2Js_GetNoticeBack") {
                    _data = JSON.parse(arg1);
                    console.log("后台配置公告：", _data);
                    _this2._notice_cb_funtion && _this2._notice_cb_funtion(_data.isShow == 1 ? _data.data : "");
                  } else if (arg0 == "Java2Js_restart") {
                    console.warn("登出游戏， sdk重新初始化登录。 Java2Js_restart");
                    setTimeout(function () {
                      game.restart();
                    }, 500);
                  }
                case 21:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          }));
        };
        _proto.sdkLogin = function sdkLogin() {
          console.log("我是android平台的sdkLogin");
        };
        _proto.login = function login(sdkData) {
          console.log("我是android平台的login");
          // 上报请求
          // P8LogSDK.pushLoginData(sdkData).then((data) => {
          //   console.log("登录上报数据=", data)
          // })
          native.bridge.sendToNative("Js2Java_EnterGame", JSON.stringify(sdkData));
        };
        _proto.creator = function creator(sdkData) {
          console.log("我是android平台的creator");
          // P8LogSDK.signLog(sdkData).then((data) => {
          //   console.log("创角上报数据=", data)
          // })
          native.bridge.sendToNative("Js2Java_CreateRole", JSON.stringify(sdkData));
        };
        _proto.upLv = function upLv(sdkData) {
          console.log("我是android平台的upLv");
          // P8LogSDK.upGradeRecord(sdkData).then((data) => {
          //   console.log("升级上报数据=", data)
          // })
          native.bridge.sendToNative("Js2Java_upLV", JSON.stringify(sdkData));
        };
        _proto.finishGuide = function finishGuide() {
          console.log("我是android平台的finishGuide");
        };
        _proto.checkText = function checkText(content, cb) {
          console.log("我是android平台的checkText");
          cb();
        };
        _proto.pay = function pay(submitInfo) {
          console.log("我是android平台的pay");
          native.bridge.sendToNative("Js2Java_pay", JSON.stringify(submitInfo));
        };
        _proto.toJavaShowDialog = function toJavaShowDialog() {
          native.bridge.sendToNative("Js2Java_showDialog");
        };
        _proto.aiService = function aiService() {
          console.log("我是android平台的 aiService");
        };
        _proto.setClipboardData = function setClipboardData(text) {
          console.log("我是android平台的 setClipboardData");
          native.bridge.sendToNative("Js2Java_clipboard", text);
          Prompt.popTip("复制成功");
        };
        _proto.SOPInfo = function SOPInfo(action_id) {
          console.log("我是android平台的 SOPInfo");
        };
        _proto.createPageManager = function createPageManager() {
          console.log("我是android平台的 createPageManager");
        };
        _proto.getGameClubData = function getGameClubData() {
          console.log("我是android平台的 getGameClubData");
        };
        _proto.openMiniProgram = function openMiniProgram(link, data) {
          console.log("我是android平台的 openMiniProgram");
        };
        return UtilityAndroid;
      }(UtilityPlatform));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilityH5Sdk.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilityPlatform.ts', './Prompt.ts', './index.js', './LoginDaDian.ts', './Http.ts', './App.ts', './GameDef.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, UtilityPlatform, Prompt, cryptoJS, LoginDaDian, LoginDaDianType, Http, App, GameDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      cryptoJS = module.default;
    }, function (module) {
      LoginDaDian = module.LoginDaDian;
      LoginDaDianType = module.LoginDaDianType;
    }, function (module) {
      Http = module.Http;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "b1467zUcr1FTpMvXdqV3OKz", "UtilityH5Sdk", undefined);
      var UtilityH5Sdk = exports('default', /*#__PURE__*/function (_UtilityPlatform) {
        _inheritsLoose(UtilityH5Sdk, _UtilityPlatform);
        function UtilityH5Sdk() {
          var _this;
          _this = _UtilityPlatform.call(this) || this;
          _this.queryData = void 0;
          return _this;
        }
        var _proto = UtilityH5Sdk.prototype;
        _proto.init = function init(cb) {
          var _this2 = this;
          console.warn('我是h5sdk平台的init eeee', P8MINISDK);
          LoginDaDian.daDian(LoginDaDianType.initSdk, 'wxSDKinit', '', 0);
          console.warn('P8MINISDK.initData()接口开始请求');
          P8MINISDK.initData().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  console.log('P8MINISDK.initData:', res);
                  if (!(res.result == 0)) {
                    _context.next = 18;
                    break;
                  }
                  _this2.queryData = _this2.queryURLParams(window.location.href);
                  console.warn('window.location.href==', window.location.href);
                  console.warn('this.queryData==', _this2.queryData);
                  console.warn('gameId==', _this2.queryData["gameId"]);
                  //let cfg: dbr.H5Sdk = DBRecord.fetchId("H5Sdk", this.queryData[`gameId`]);
                  // console.warn("===cfg==", cfg);
                  _this2.uid = _this2.queryData["uid"];
                  _this2._sessionid = _this2.queryData["sessionid"];
                  _this2._site = _this2.queryData["siteTy"]; //cfg.site_android;
                  LoginDaDian.daDian(LoginDaDianType.sdkBack, 'wxSDKback', _this2.uid, 0);
                  // this._site = 'dhb_test'
                  console.warn('sdk初始化数据   this.uid =', _this2.queryData, _this2.uid, _this2._site);
                  // "result": 0 表示登录成功、获取 openid 成功、上报成功
                  _context.next = 13;
                  return _this2.initConfig();
                case 13:
                  //加载线上配置。
                  _this2.initSerList();
                  cb && cb();
                  setTimeout(function () {
                    _this2.__p8_h5_Active();
                  }, 100);
                  _context.next = 19;
                  break;
                case 18:
                  Prompt.popTip('配置异常!!');
                case 19:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          })));
        };
        _proto.queryURLParams = function queryURLParams(url) {
          var pattern = /(\w+)=(\w+)/gi;
          var parames = {};
          url.replace(pattern, function ($, $1, $2) {
            parames[$1] = $2;
          });
          return parames;
        };
        _proto.sdkLogin = function sdkLogin() {
          console.log('我是h5sdk平台的sdkLogin');
        };
        _proto.login = function login(sdkData) {
          console.log('我是h5sdk平台的login', sdkData);
          sdkData.device = this.queryData["openid"];
          sdkData.uid = UtilityPlatform.getInstance().uid;
          sdkData.gameversion = '1.0.0';
          sdkData.vip = '1';
          // 上报请求
          P8LogSDK.pushLoginData(sdkData).then(function (data) {
            console.log('登录上报数据=', data);
          });
        };
        _proto.creator = function creator(sdkData) {
          console.log('我是h5sdk平台的creator');
          LoginDaDian.daDian(LoginDaDianType.sdkSendCreator, 'creator', UtilityPlatform.getInstance().uid, App.loginMgr.selServer.sid);
          sdkData.device = this.queryData["openid"];
          sdkData.uid = UtilityPlatform.getInstance().uid;
          sdkData.gameversion = '1.0.0';
          sdkData.vip = '1';
          P8LogSDK.signLog(sdkData).then(function (data) {
            console.log('创角返回=', data);
          });
        };
        _proto.upLv = function upLv(sdkData) {
          console.log('我是h5sdk平台的upLv');
          sdkData.device = this.queryData["openid"];
          sdkData.uid = UtilityPlatform.getInstance().uid;
          P8LogSDK.upGradeRecord(sdkData).then(function (data) {
            console.log('升级上报数据=', data);
          });
        }
        //SOP信息上报
        ;

        _proto.SOPInfo = function SOPInfo(action_id) {
          console.warn('我是h5sdk平台的SOPInfo', this._sdkData);
          var sdkData = App.mixMgr.newSdkData();
          var data = {
            aid: '',
            //this._data.aid, //渠道id
            uid: this.uid,
            //Play800 sdk用户id
            sid: sdkData.sid,
            //服务器id
            roleid: sdkData.roleid,
            //角色id
            rolename: sdkData.rolename,
            //角色名
            level: sdkData.level,
            //角色等级
            device: '',
            //设备唯一标识: 安卓设备为IMEI码，苹果设备为IDFA码
            modeltype: '',
            //设备类型: 安卓为android，苹果为iOS
            action_id: action_id,
            //行为id
            ip: '',
            //ip地址
            site: this._site,
            //游戏标识（接入时获取参数）
            time: this.getTimestamp()
          };
          var params = this.formatParams(data);
          var sign = this.getSign(params); //签名方式：防篡改
          data['sign'] = sign;
          console.warn('SOPInfo:', data);
          Http.Post("https://data.play800.cn/log/cpUserAction", data, function (result) {
            console.warn('我是h5sdk平台的SOPInfo回调', result);
          });
        };
        _proto.getTimestamp = function getTimestamp() {
          return Math.floor(Date.now() / 1000).toString();
        };
        _proto.formatParams = function formatParams(params) {
          var sortedKeys = Object.keys(params).sort();
          var str = sortedKeys.map(function (key) {
            return "&" + key + "=" + params[key];
          }).join('');
          //删除第一个&符号
          str = str.slice(1);
          return str;
        };
        _proto.getSign = function getSign(params) {
          var str = "" + this._site + params + GameDef.KeyOfSite[this._site];
          var md5Hash = cryptoJS.MD5(str).toString();
          return md5Hash;
        };
        _proto.finishGuide = function finishGuide(sdkData) {
          console.log('我是h5sdk平台的finishGuide');
          P8LogSDK.tutorialFinish(sdkData);
        };
        _proto.checkText = function checkText(content, cb) {
          cb();
        };
        _proto.pay = function pay(sdkData) {
          console.warn('我是h5sdk平台的pay = ', sdkData.test);
          // 下单支付请求参数
          var cp_order = {
            roleid: sdkData.roleid,
            // 角色ID
            rolename: sdkData.rolename,
            // 角色名
            cp_order_id: sdkData.cd_order_id,
            // 订单号 后期对账使用 每笔订单号唯一
            serverid: sdkData.sid,
            // 服务器ID
            productid: sdkData.productid,
            product_name: sdkData.product_name,
            // 商品名
            ext: sdkData.ext,
            // 透传字段，由CP定义的字段
            mdsVersion: '2.0',
            // 米大师版本 默认2.0  1.0版本需要传入这个值
            env: 0,
            // 正式环境：0,沙盒环境 ：1
            money: sdkData.money,
            // 付款金额，单位：CNY
            level: sdkData.level,
            //玩家等级
            test: sdkData.test //1为测试订单(测试回调地址), 0为正式订单(正式回调地址), 不传默认为0
          };

          P8MINISDK.pay(cp_order).then(function (res) {
            // 回调将采用支付发货方式，此处不会有返回。
          });
        };
        _proto.__payLog = function __payLog(cp_order) {
          // 请求参数
          var income_order = {
            username: this.uid,
            // 用户账号
            sid: App.loginMgr.selServer.sid + '',
            // 服务器id
            roleid: App.roleMgr.getRoleUd(),
            // 角色id
            rolename: App.roleMgr.getRoleName(),
            //角色名
            level: '1',
            order_id: cp_order.cp_order_id,
            // 订单 ID
            income_channel: 'wx',
            // 充值渠道 华为快游戏是：huawei_240
            income_currency: 'rmb',
            // 充值币种
            income_money: cp_order.money // 充值金额,单位元
          };

          // 上报请求
          P8LogSDK.incomeLog(income_order).then(function (data) {
            console.log(data);
            console.warn('充值上报结果x=', data.result);
          });
        };
        _proto.toJavaShowDialog = function toJavaShowDialog() {}

        //登录界面客服按钮处理
        ;

        _proto.aiService = function aiService() {}
        //复制到剪贴板
        ;

        _proto.setClipboardData = function setClipboardData(copyStr) {
          console.log('我是web平台的 setClipboardData');
          var el = document.createElement('textarea');
          el.value = copyStr;
          el.setAttribute('readonly', '');
          el.style.position = 'absolute';
          el.style.left = '-9999px';
          el.style.fontSize = '12pt';
          var selection = getSelection();
          var originalRange;
          if (selection.rangeCount > 0) {
            originalRange = selection.getRangeAt(0);
          }
          document.body.appendChild(el);
          el.select();
          el.selectionStart = 0;
          el.selectionEnd = copyStr.length;
          var success = false;
          try {
            success = document.execCommand('copy');
            Prompt.popTip('复制成功');
          } catch (err) {}
          document.body.removeChild(el);
          if (originalRange) {
            selection.removeAllRanges();
            selection.addRange(originalRange);
          }
        }

        // public getNotice(cb: Function) {
        //   P8SDK.getNotice().then((res) => {
        //     console.log('后台配置公告：', res);
        //     let data = res.data?.data;
        //     /**
        //         {
        //             data: "test test test"
        //             isShow: "1"
        //             time: "5"
        //             url: ""
        //         }
        //     */
        //     cb && cb(data && data.isShow == 1 ? data.data : '')
        //   })
        // }

        //游戏圈子
        ;

        _proto.createPageManager = function createPageManager(openlink) {};
        _proto.getGameClubData = function getGameClubData(vType) {};
        _proto.__p8_h5_Active = function __p8_h5_Active() {
          console.log('激活 行为去掉---');
          // let params = {
          //     // 必填
          //     device: this.queryData[`openid`],//小程序嵌套h5传openId， 微信小游戏不用传。 设备唯一标识
          //     gameversion: '1.0',//游戏版本号:1.3.1
          //     oaid: 'aa',//    oaid, 安卓必须传,获取不了传空, ios不传
          // }

          // console.log("激活上报 oppo新增", JSON.stringify(params));
          // P8LogSDK.onActiveFunc(params).then((data) => {
          //     console.log("onActiveFunc:" + data)
          // })
        };

        _proto.openMiniProgram = function openMiniProgram(link, data) {
          console.log('我是h5sdk平台的 openMiniProgram');
        };
        return UtilityH5Sdk;
      }(UtilityPlatform));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilityPlatform.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Http.ts', './Item_server.ts', './env', './index.js', './App.ts', './GameDef.ts'], function (exports) {
  var _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, sys, Http, AuditState, PrivacyState, HTML5, cryptoJS, App, GameDef;
  return {
    setters: [function (module) {
      _createClass = module.createClass;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      sys = module.sys;
    }, function (module) {
      Http = module.Http;
    }, function (module) {
      AuditState = module.AuditState;
      PrivacyState = module.PrivacyState;
    }, function (module) {
      HTML5 = module.HTML5;
    }, function (module) {
      cryptoJS = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "df6ccFeFWRNI7mOahjMjkWu", "UtilityPlatform", undefined);
      var UtilityPlatform = exports('default', /*#__PURE__*/function () {
        function UtilityPlatform() {
          this._sdkData = void 0;
          //返回sdk数据
          this._uid = "";
          this._sessionid = void 0;
          this._site = "dhb_android";
          this._testSite = "dhb_test";
          // protected _useURLUid=false;
          /** 是否使用URL传入的uid */
          // public get useURLUid() {
          //     return this._useURLUid;
          // }
          this._URLToken = "";
          /**登录界面信息 */
          this._loginPageConfig = void 0;
          /**是否私域玩家 */
          this._isSiYuUser = void 0;
          /**角色已注册时间(小时) */
          this._roleidTime = void 0;
          /** 除了后台一键登录包 ,其他包不要设置为true*/
          this.isYiJianDengLu = false;
        }
        UtilityPlatform.initInstace = function initInstace() {
          if (!UtilityPlatform._ins) {
            UtilityPlatform._ins = new this();
          }
          return UtilityPlatform._ins;
        };
        UtilityPlatform.getInstance = function getInstance() {
          return UtilityPlatform._ins;
        }

        //初始化服务器列表
        ;

        var _proto = UtilityPlatform.prototype;
        _proto.initSerList = function initSerList() {
          App.loginMgr.setActId(this._uid);
          console.warn("UtilityPlatform.initSerList() 当前的账号ID:" + this._uid);
          App.loginMgr.initSerList();
        }

        //加载线上配置
        ;

        _proto.initConfig = /*#__PURE__*/
        function () {
          var _initConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
            var _this = this;
            var site, url, json;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  // 是否需要更改启动图。
                  site = UtilityPlatform.getInstance().site;
                  url = GameDef.newServerStateInfoDebug;
                  url += "?site=" + site + "&version=" + GameDef.version;
                  /** 一键登录包使用另外的接口，需要校验token */
                  if (this.checkYiJianDengLu()) {
                    url = GameDef.newServerStateInfoCheckToken + "?site=" + site + "&version=" + GameDef.version + "&uid=" + this._uid + "&token=" + this._URLToken;
                  }
                  //暂时屏蔽后台获取配置
                  if (!url) {
                    _context.next = 6;
                    break;
                  }
                  return _context.abrupt("return");
                case 6:
                  _context.next = 8;
                  return new Promise(function (resolve, _reject) {
                    var getFunc = function getFunc() {
                      Http.Get_pro(url, function (result) {
                        console.warn("UtilityPlatform initConfig result:", result);
                        App.scheduleMgr.unschedule(timerTaskId);
                        resolve(result);
                      }, function (msg) {
                        console.error("UtilityPlatform 线上配置 error:", msg);
                      });
                    };
                    var timerTaskId = App.scheduleMgr.schedule(function () {
                      getFunc();
                    }, _this, 2, 0, 1000);
                    getFunc();
                  });
                case 8:
                  json = _context.sent;
                  console.warn("UtilityPlatform initConfig", json);
                  GameDef.baseServerUrl = json.url;
                  GameDef.newServerListInfo = json.url + "/base/getServerList";
                  GameDef.newServerRoleInfo = json.url + "/base/getUserInfo";
                  GameDef.getShareConfig = json.url + "/base/shareConfig";
                  GameDef.shareLog = json.url + "/base/shareLog";
                  GameDef.getQuestionnaireAddr = json.url + "/base/getSurveyConfig";
                  GameDef.noticelink = json.url + "/base/getNoticeBySite?site=";
                  GameDef.getSwitchConfig = json.url + "/base/getSwitchConfig";
                  GameDef.getSeasonSubscribeConfig = json.url + "/base/getSubscribeTime";
                  GameDef.shenHeZhong = json.status !== AuditState.ZhengShi;
                  if (GameDef.SERVER_URL === GameDef.SERVER_URL_SHENHE) {
                    GameDef.shenHeZhong = false;
                  }
                  GameDef.privacyOpen = json.privacyAgreement === PrivacyState.Open;

                  // await new Promise<JsonAsset>((resolve, reject) => {
                  //     console.warn('UtilityPlatform initConfig getSwitchConfig,send:', GameDef.getSwitchConfig + '?site=' + site);
                  //     Http.Get_pro(
                  //         GameDef.getSwitchConfig + '?site=' + site,
                  //         (result) => {
                  //             console.warn('UtilityPlatform initConfig getSwitchConfig result:', result);
                  //             GameDef.switchConfig = result.data;
                  //             App.mixMgr.setRPKActiDb(result.data.list);
                  //             resolve(result);
                  //         },
                  //         (msg) => {
                  //             console.error('UtilityPlatform initConfig getSwitchConfig error:', msg);
                  //         }
                  //     );
                  // });
                  _context.next = 24;
                  return this.askRpkSwitch();
                case 24:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function initConfig() {
            return _initConfig.apply(this, arguments);
          }
          return initConfig;
        }();
        _proto.askRpkSwitch = /*#__PURE__*/function () {
          var _askRpkSwitch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(uid, roleId) {
            var site;
            return _regeneratorRuntime().wrap(function _callee2$(_context2) {
              while (1) switch (_context2.prev = _context2.next) {
                case 0:
                  if (uid === void 0) {
                    uid = null;
                  }
                  if (roleId === void 0) {
                    roleId = null;
                  }
                  site = UtilityPlatform.getInstance().site;
                  _context2.next = 5;
                  return new Promise(function (resolve, _reject) {
                    var url_switch = GameDef.getSwitchConfig + "?site=" + site;
                    if (uid && roleId) {
                      url_switch += "&uid=" + uid + "&roleId=" + roleId;
                    }
                    console.warn("url_switch:", url_switch);
                    Http.Get_pro(url_switch, function (result) {
                      console.warn("UtilityPlatform initConfig getSwitchConfig result00:", JSON.stringify(result));
                      GameDef.switchConfig = result.data;
                      // App.mixMgr.setRPKActiDb((result.data || {}).list);
                      // App.monitorMgr.dispatchEvent(MonitorType.rpk_activity);
                      resolve(result);
                    }, function (msg) {
                      console.error("UtilityPlatform initConfig getSwitchConfig error:", msg);
                      // App.monitorMgr.dispatchEvent(MonitorType.rpk_activity);
                    });
                  });

                case 5:
                case "end":
                  return _context2.stop();
              }
            }, _callee2);
          }));
          function askRpkSwitch(_x, _x2) {
            return _askRpkSwitch.apply(this, arguments);
          }
          return askRpkSwitch;
        }() //sdk相关
        ;
        //打开小程序
        //抖音。
        _proto.dyaiService = function dyaiService(_gameButton) {}

        /**获取公告 */;
        _proto.getNotice = function getNotice(_cb) {
          // App.resMgr.loadRemoteData(`${GameDef.noticelink}1` + `&t=${Date.now()}`, (data: JsonAsset) => {
          //     console.log('后台配置公告：', data);
          //     cb && cb(data && data.json.type == 1 ? data.json.content : '');
          // });

          // const test = `http://183.6.50.253:8099/base/getNoticeBySite?site=dhb_test`
          var url = "" + GameDef.noticelink + UtilityPlatform.getInstance().site;
          Http.Get_pro(url, function (result) {
            // App.mixMgr.setNoticeData(result.data);
            if (_cb && result) {
              _cb(result.data);
            }
            // cb && cb(result && result.json.type == 1 ? result.json.content : '');
          }, function (msg) {
            console.error("ServerListNew 线上配置 error:", msg);
            //reject(msg);
          });
        }

        /**
         * 获取新的公告id
         * @param noticeList 公告列表
         * @returns 新的公告id
         */;
        _proto.getNewNoticeId = function getNewNoticeId(noticeList) {
          if (!noticeList || noticeList.length === 0) {
            return 0;
          }
          var lastId = App.saveDataMgr.get("local_notice_id") || 0;
          for (var dx0 = 0; dx0 < noticeList.length; dx0++) {
            var oData = noticeList[dx0];
            if (oData.id > lastId) {
              return oData.id;
            }
          }
          return 0;
        };
        /**是否走一键登录流程 */
        _proto.checkYiJianDengLu = function checkYiJianDengLu() {
          return this.isYiJianDengLu && HTML5 && sys.os === sys.OS.WINDOWS && sys.platform === sys.Platform.DESKTOP_BROWSER;
        }

        /**
         * 主动拉起转发,分享游戏
         */;
        _proto.shareGame = function shareGame(_shareConfig) {}

        /**
         * 获取小程序启动参数
         * @returns
         */;
        _proto.getLaunchOptionsSync = function getLaunchOptionsSync() {
          return {};
        }

        /**
         * 初始化微信分享菜单
         */;
        _proto.initShareMenu = function initShareMenu() {}

        /**获取登录启动图和资质信息配置 */;
        _proto.getLoginlnfoConfigByHttp = /*#__PURE__*/
        function () {
          var _getLoginlnfoConfigByHttp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
            return _regeneratorRuntime().wrap(function _callee3$(_context3) {
              while (1) switch (_context3.prev = _context3.next) {
                case 0:
                  return _context3.abrupt("return", new Promise(function (resolve, _reject) {
                    var confUrl = GameDef.loginConfigUrl; // 此处应该放在配置文件中读取
                    var site = UtilityPlatform.getInstance().site;
                    // site = 'wjyzcswxxyx_android';
                    var reqUrl = confUrl + site + "&t=" + Date.now();
                    console.error("启动图reqUrl:", reqUrl);
                    Http.Get_pro(reqUrl, function (result) {
                      console.log("result==", result);
                      resolve(result);
                    }, function (statusText) {
                      resolve(statusText);
                    });
                  }));
                case 1:
                case "end":
                  return _context3.stop();
              }
            }, _callee3);
          }));
          function getLoginlnfoConfigByHttp() {
            return _getLoginlnfoConfigByHttp.apply(this, arguments);
          }
          return getLoginlnfoConfigByHttp;
        }() /**获取微信订阅状态 */;
        _proto.getDingYueState = function getDingYueState(_callBack, _isSync) {
          console.warn("UtilityPlatform getDingYueState DingYue");
          //callBack && callBack(false);
        }

        /**微信订阅 */;
        _proto.dingYue = function dingYue(_tempId, _callBack, _needGetState) {
          console.warn("UtilityPlatform dingYue DingYue");
          //callBack && callBack();
        }

        /**微信自动订阅，已经订阅过的消息，进入城镇自动订阅一次 */;
        _proto.autoDingYue = function autoDingYue(_needGetState) {}

        /**判断用户是否为私域用户 */;
        _proto.getUserIsSyByHttp = /*#__PURE__*/
        function () {
          var _getUserIsSyByHttp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
            var _this2 = this;
            return _regeneratorRuntime().wrap(function _callee4$(_context4) {
              while (1) switch (_context4.prev = _context4.next) {
                case 0:
                  return _context4.abrupt("return", new Promise(function (resolve, _reject) {
                    var reqUrl = GameDef.isSyUser; // 此处应该放在配置文件中读取
                    var site = UtilityPlatform.getInstance().site;
                    site = "wjyzcswxxyx_android";
                    console.error("此处为测试强制赋值了 上线需要去掉");
                    var uid = UtilityPlatform.getInstance().uid;
                    var roleid = App.roleMgr.getRoleUd(); // 角色id
                    var time = _this2.getTimestamp_800sdk();
                    var reqData = {
                      site: site,
                      uid: uid,
                      roleid: roleid,
                      time: time
                    };
                    var params = _this2.formatParams_800sdk(reqData);
                    var sign = _this2.getSign_800sdk(params, site); //签名方式：防篡改
                    reqData["sign"] = sign;
                    Http.Post(reqUrl, reqData, function (result) {
                      console.log("私域result==", result);
                      resolve(result);
                    });
                  }));
                case 1:
                case "end":
                  return _context4.stop();
              }
            }, _callee4);
          }));
          function getUserIsSyByHttp() {
            return _getUserIsSyByHttp.apply(this, arguments);
          }
          return getUserIsSyByHttp;
        }();
        _proto.getSign_800sdk = function getSign_800sdk(params, site) {
          var str = "" + site + params + GameDef.KeyOfSite[site];
          var md5Hash = cryptoJS.MD5(str).toString();
          return md5Hash;
        };
        _proto.getTimestamp_800sdk = function getTimestamp_800sdk() {
          return Math.floor(Date.now() / 1000).toString();
        };
        _proto.formatParams_800sdk = function formatParams_800sdk(params) {
          var sortedKeys = Object.keys(params).sort();
          var str = sortedKeys.map(function (key) {
            return "&" + key + "=" + params[key];
          }).join("");
          //删除第一个&符号
          str = str.slice(1);
          return str;
        };
        _createClass(UtilityPlatform, [{
          key: "uid",
          get: function get() {
            return this._uid;
          },
          set: function set(uid) {
            this._uid = uid;
          }
        }, {
          key: "SdkData",
          get: function get() {
            return this._sdkData;
          }
        }, {
          key: "sessionid",
          get: function get() {
            return this._sessionid;
          }
        }, {
          key: "site",
          get: function get() {
            {
              //头条不走这里 && !BYTEDANCE
              return "dhb_test";
            }
          }
        }, {
          key: "testSite",
          get: function get() {
            return this._testSite;
          }
        }, {
          key: "URLToken",
          get: /** URL传入的token */
          function get() {
            return this._URLToken;
          }
        }, {
          key: "loginPageConfig",
          get: function get() {
            return this._loginPageConfig;
          },
          set: function set(obj) {
            this._loginPageConfig = obj;
          }
        }, {
          key: "isSiYuUser",
          get: function get() {
            return this._isSiYuUser;
          },
          set: function set(bool) {
            this._isSiYuUser = bool;
          }
        }, {
          key: "roleidTime",
          get: function get() {
            return this._roleidTime;
          },
          set: function set(time) {
            this._roleidTime = time;
          }
        }]);
        return UtilityPlatform;
      }());
      UtilityPlatform.deviceID = "unknown";
      UtilityPlatform._ins = void 0;
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilityTT.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilityPlatform.ts', './MonitorType.ts', './App.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, UtilityPlatform, MonitorType, App, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "0076aDeZ4lAt55hS0+50Vi2", "UtilityTT", undefined);
      var UtilityTT = exports('default', /*#__PURE__*/function (_UtilityPlatform) {
        _inheritsLoose(UtilityTT, _UtilityPlatform);
        function UtilityTT() {
          return _UtilityPlatform.call(this) || this;
        }
        var _proto = UtilityTT.prototype;
        _proto.init = function init(cb) {
          var _this = this;
          console.warn('我是tt平台的init00');
          // LoginDaDian.daDian(LoginDaDianType.initSdk, 'wxSDKinit', '', 0);
          P8SDK.login().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _this._sdkData = data.data;
                  _this.uid = _this._sdkData.uid;
                  _this._sessionid = _this._sdkData.sessionid;
                  _this._site = _this._sdkData.site;
                  // LoginDaDian.daDian(LoginDaDianType.sdkBack, 'wxSDKback', this.uid, 0);
                  // this._site = 'dhb_test'
                  console.warn('sdk初始化数据   this.uid =', _this.uid, data);
                  // "result": 0 表示登录成功、获取 openid 成功、上报成功
                  _context.next = 7;
                  return _this.initConfig();
                case 7:
                  //加载线上配置。
                  cb && cb();
                  _this.initSerList();
                case 9:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          })));

          // wx.onAudioInterruptionEnd(function () {
          //     console.log('微信监听音频中断后继续播放');
          //     App.soundMgr.resumeAll();
          // });

          // wx.onMemoryWarning(function () {
          //     wx.triggerGC();
          // });

          // P8SDK.wxshowShareMenu(GameDef.appName, 'https://mmocgame.qpic.cn/wechatgame/HlibDibW5V9zIplcjewsZOTHEZD9Hp3H71bOiacoWwY3urVVhHCNB2elyfriaib13v7Tf/0', '');
        };

        _proto.sdkLogin = function sdkLogin() {
          console.log('我是tt平台的sdkLogin');
        };
        _proto.login = function login(sdkData) {
          console.log('我是tt平台的login', sdkData);
          // 上报请求
          P8LogSDK.pushLoginData(sdkData).then(function (data) {
            console.log('登录上报数据=', data);
          });
        };
        _proto.creator = function creator(sdkData) {
          console.log('我是tt平台的creator');
          P8LogSDK.signLog(sdkData).then(function (data) {
            console.log('创角上报数据=', data);
          });
        };
        _proto.upLv = function upLv(sdkData) {
          console.log('我是tt平台的upLv');
          P8LogSDK.upGradeRecord(sdkData).then(function (data) {
            console.log('升级上报数据=', data);
          });
        }
        //SOP信息上报
        ;

        _proto.SOPInfo = function SOPInfo(action_id) {};
        _proto.finishGuide = function finishGuide(sdkData) {
          console.log('我是tt平台的finishGuide');
          P8LogSDK.tutorialFinish(sdkData);
        };
        _proto.checkText = function checkText(content, cb) {
          cb();
          // let msgObj = {
          //     content,
          //     cb
          // };
          // P8SDK.msgSecCheck(msgObj).then((res) => {
          //     console.warn('内容安全返回', res);
          //     // {result: 0, isSafe: true, label: 100, msg: "正常"}
          //     if (res.result == 0) {
          //         // 正常返回
          //         if (res.isSafe) {
          //             console.warn('文本合法');
          //             cb();
          //         } else {
          //             Prompt.popTip('文本不合法');
          //         }
          //     } else {
          //         // 接口 请求异常
          //         console.error('文本检测请求异常');
          //     }
          // });

          // wx.onKeyboardComplete((data) => {
          //     console.log('键盘输入的当前值', data.value);
          // })
        };

        _proto.pay = function pay(sdkData) {
          console.warn('我是tt平台的pay = ', sdkData.test);
          // Boot.loadingIns.run(1, 5000);
          // 下单支付请求参数
          var cp_order = {
            roleid: sdkData.roleid,
            // 角色ID
            rolename: sdkData.rolename,
            // 角色名
            cp_order_id: sdkData.cd_order_id,
            // 订单号 后期对账使用 每笔订单号唯一
            serverid: sdkData.sid,
            // 服务器ID
            productid: sdkData.productid,
            product_name: sdkData.product_name,
            // 商品名
            ext: sdkData.ext,
            // 透传字段，由CP定义的字段
            mdsVersion: '2.0',
            // 米大师版本 默认2.0  1.0版本需要传入这个值
            env: 0,
            // 正式环境：0,沙盒环境 ：1
            money: sdkData.money,
            // 付款金额，单位：CNY
            level: sdkData.level,
            //玩家等级
            test: sdkData.test //1为测试订单(测试回调地址), 0为正式订单(正式回调地址), 不传默认为0
          };

          P8SDK.pay(cp_order).then(function (data) {
            // 如果 paytype == 5，拉起客服会话  ios手机只支持公众号支付
            if (data.data.paytype && data.data.paytype == 5) {
              var params = {
                showMessageCard: true,
                sendMessageTitle: '卡片标题',
                sendMessageImg: '',
                // 消息卡片图标地址，自定义或与我方运营联系获取游戏素材
                sendMessagePath: data.data.url,
                // 下单成功后，我方收银台地址
                success: function success(data) {
                  // 此处的回调是拉起客服会话的回调 支付信息没有前端的回调
                  console.log('success =', data);
                  // this.__payLog(cp_order);
                },

                fail: function fail(data) {
                  console.log('fail =', data);
                },
                complete: function complete(data) {
                  console.log('complete =', data);
                }
              };
              //  ** cp主动拉起 **// 拉起客服，传入卡片信息
              // wx.openCustomerServiceConversation(params);
            }

            App.monitorMgr.dispatchEvent(EventType.loading_auto_close); //关闭。
            console.log('tt支付数据', data);
            console.error('tt支付数据', data.result);
            if (data.result == 0) ;
          });
        };
        _proto.__payLog = function __payLog(cp_order) {
          // 请求参数
          var income_order = {
            username: this.uid,
            // 用户账号
            sid: App.loginMgr.selServer.sid + '',
            // 服务器id
            roleid: App.roleMgr.getRoleUd(),
            // 角色id
            rolename: App.roleMgr.getRoleName(),
            //角色名
            level: '1',
            order_id: cp_order.cp_order_id,
            // 订单 ID
            income_channel: 'wx',
            // 充值渠道 华为快游戏是：huawei_240
            income_currency: 'rmb',
            // 充值币种
            income_money: cp_order.money // 充值金额,单位元
          };

          // 上报请求
          P8LogSDK.incomeLog(income_order).then(function (data) {
            console.log(data);
            console.warn('充值上报结果x=', data.result);
          });
        };
        _proto.toJavaShowDialog = function toJavaShowDialog() {}

        //登录界面客服按钮处理
        ;

        _proto.aiService = function aiService() {
          // 跳转客服
          // UIMgr.inst.open(uiToDyKefu, LayerType.panel, null);

          P8SDK.ttOpenCustomerServiceConversation(3); // （基础库 3.41.0 开始支持）
        };

        _proto.dyaiService = function dyaiService(gameButton) {
          _UtilityPlatform.prototype.dyaiService.call(this, gameButton);
          //   const gameButton = {
          //         left: worldPos.x,
          //         top: screenSize.height - worldPos.y - btnSize.height, // 转换为屏幕坐标系（Y轴向下）
          //         height: btnSize.height,
          //         with: btnSize.width,
          //     };

          // 跳转客服
          var type_Contact = {
            type: 'image',
            // type: "text", text: '跳转客服',
            image: './icon_kefu.png',
            // 头条只支持本地图片路径
            style: {
              // left: gameButton.left,
              // top: gameButton.top + gameButton.height + 10, // 在 btnSure 下方 10px
              // width: gameButton.with,
              // height: gameButton.height,
              left: 210,
              top: 200,
              width: 150,
              height: 400,
              lineHeight: 50,
              backgroundColor: '#ffffff',
              textAlign: 'center',
              fontSize: 16,
              borderRadius: 4,
              borderColor: '#ffffff',
              borderWidth: 0,
              textColor: '#000000'
            },
            success: function success(res) {
              console.log('跳转客服 create success', res);
            },
            fail: function fail(err) {
              console.log('跳转客服 create fail', err);
            },
            complete: function complete() {
              console.log('跳转客服 create complete');
            }
          };
          var handleClick = function handleClick(res) {
            // P8SDK.destoryCustomerButton();
            App.monitorMgr.dispatchEvent(MonitorType.dy_kefu_close_dyyy);
            console.log('跳转客服按钮点击', res);
          };
          var handleError = function handleError(err) {
            console.log('跳转客服按钮异常', err);
          };
          P8SDK.gotoCustomerServiceConversation(type_Contact, handleClick, handleError);
          // 关闭客服按钮
        }

        //复制到剪贴板
        ;

        _proto.setClipboardData = function setClipboardData(text) {
          wx.setClipboardData({
            data: text,
            success: function success(res) {
              // console.log('复制成功');
            },
            fail: function fail(res) {
              // console.log('复制失败');
            }
          });
        }

        // public getNotice(cb: Function) {
        //   P8SDK.getNotice().then((res) => {
        //     console.log('后台配置公告：', res);
        //     let data = res.data?.data;
        //     /**
        //         {
        //             data: "test test test"
        //             isShow: "1"
        //             time: "5"
        //             url: ""
        //         }
        //     */
        //     cb && cb(data && data.isShow == 1 ? data.data : '')
        //   })
        // }

        //游戏圈子
        ;

        _proto.createPageManager = function createPageManager(openlink) {
          // const pageManager = wx.createPageManager();
          // pageManager
          //     .load({
          //         openlink: openlink
          //     })
          //     .then((res) => {
          //         pageManager.show();
          //         App.mixMgr.setRPKClubDb(99, 3); //进入游戏圈视为已浏览3条贴子
          //         App.monitorMgr.dispatchEvent(MonitorType.rpk_update);
          //     })
          //     .catch((err) => {
          //         console.error(err);
          //     });
        };
        _proto.getGameClubData = function getGameClubData(vType) {
          // if (!wx.getGameClubData) {
          //     Prompt.popTip('无法使用游戏圈功能，需要先升级微信版本');
          //     return;
          // }
          // wx.getGameClubData({
          //     dataTypeList: vType,
          //     success: (res) => {
          //         let end0 = cryptoJS.AES.decrypt(res.encryptedData, cryptoJS.enc.Base64.parse(this._sdkData.session_key), {
          //             iv: cryptoJS.enc.Base64.parse(res.iv),
          //             mode: cryptoJS.mode.CBC, // 指定 CBC 模式
          //             padding: cryptoJS.pad.Pkcs7 // 指定 PKCS#7 填充
          //         }).toString(cryptoJS.enc.Utf8);
          //         let data = JSON.parse(end0);
          //         if (!data) {
          //             return;
          //         }
          //         for (let dx0 = 0; dx0 < data.dataList.length; dx0++) {
          //             let oData = data.dataList[dx0];
          //             if (!oData || !oData.dataType) {
          //                 continue;
          //             }
          //             App.mixMgr.setRPKClubDb(oData.dataType.type, oData.value);
          //         }
          //         App.monitorMgr.dispatchEvent(MonitorType.rpk_update);
          //     },
          //     fail: (err) => {
          //         App.monitorMgr.dispatchEvent(MonitorType.rpk_update);
          //     }
          // });
        };
        _proto.openMiniProgram = function openMiniProgram(link, data) {
          console.log('我是tt平台的 openMiniProgram');
        };
        return UtilityTT;
      }(UtilityPlatform));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilityWeb.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilityPlatform.ts', './Utils.ts', './Prompt.ts', './App.ts', './EventType.ts'], function (exports) {
  var _inheritsLoose, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, sys, UtilityPlatform, Utils, Prompt, App, EventType;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _assertThisInitialized = module.assertThisInitialized;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
      sys = module.sys;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a0accr1uQ5ESbbXLrbeckC4", "UtilityWeb", undefined);

      // let P8SDK = window['P8SDK'];
      var UtilityIWeb = exports('default', /*#__PURE__*/function (_UtilityPlatform) {
        _inheritsLoose(UtilityIWeb, _UtilityPlatform);
        function UtilityIWeb() {
          var _this;
          _this = _UtilityPlatform.call(this) || this;
          App.monitorMgr.addEventListener(EventType.Android2TS, _this.recviveAndroidMessage, _assertThisInitialized(_this));
          _this.sdkLogin();
          return _this;
        }
        var _proto = UtilityIWeb.prototype;
        _proto.sdkLogin = function sdkLogin() {
          return;
        };
        _proto.init = /*#__PURE__*/function () {
          var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cb) {
            var uid;
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  {
                    uid = App.saveDataMgr.get("local_uid");
                    if (!uid) {
                      uid = Utils.GetRandomNum(100000, 9999999999) + "";
                      App.saveDataMgr.set("local_uid", uid);
                    }
                    this.uid = uid;
                    console.log("登录的sdk：", UtilityPlatform.getInstance().SdkData);
                    if (UtilityPlatform.getInstance().SdkData) {
                      this.uid = UtilityPlatform.getInstance().SdkData.uid;
                    }
                  }
                  this.initByURLParam();
                  _context.next = 4;
                  return this.initConfig();
                case 4:
                  //加载线上配置。
                  cb && cb();
                  this.initSerList();
                case 6:
                case "end":
                  return _context.stop();
              }
            }, _callee, this);
          }));
          function init(_x) {
            return _init.apply(this, arguments);
          }
          return init;
        }();
        _proto.login = function login(sdkData) {
          return;
        };
        _proto.creator = function creator(sdkData) {
          return;
        };
        _proto.upLv = function upLv(sdkData) {
          return;
        };
        _proto.updatePlayerData = function updatePlayerData(sdkData, eventType) {
          return;
        };
        _proto.finishGuide = function finishGuide() {
          console.log("我是web平台的finishGuide");
        };
        _proto.checkText = function checkText(text, cb) {
          console.log("我是web平台的checkText");
          cb();
        };
        _proto.pay = function pay(sdkData) {
          return;
        };
        _proto.toJavaShowDialog = function toJavaShowDialog() {};
        _proto.aiService = function aiService() {
          console.log("我是web平台的 aiService");
        };
        _proto.setClipboardData = function setClipboardData(copyStr) {
          console.log("我是web平台的 setClipboardData");
          var el = document.createElement("textarea");
          el.value = copyStr;
          el.setAttribute("readonly", "");
          el.style.position = "absolute";
          el.style.left = "-9999px";
          el.style.fontSize = "12pt";
          var selection = getSelection();
          var originalRange;
          if (selection.rangeCount > 0) {
            originalRange = selection.getRangeAt(0);
          }
          document.body.appendChild(el);
          el.select();
          el.selectionStart = 0;
          el.selectionEnd = copyStr.length;
          var success = false;
          try {
            success = document.execCommand("copy");
            Prompt.popTip("复制成功");
          } catch (err) {}
          document.body.removeChild(el);
          if (originalRange) {
            selection.removeAllRanges();
            selection.addRange(originalRange);
          }
        };
        _proto.SOPInfo = function SOPInfo(action_id) {};
        _proto.createPageManager = function createPageManager() {
          console.log("我是web平台的createPageManager");
        };
        _proto.getGameClubData = function getGameClubData() {
          console.log("我是web平台的getGameClubData");
        };
        _proto.getTimestamp = function getTimestamp() {
          return Math.floor(Date.now() / 1000).toString();
        };
        _proto.loadAdIframe = function loadAdIframe() {
          // 检查是否已经存在iframeAdContainer元素
          var container = document.getElementsByTagName("iframeAdContainer")[0];

          // 如果不存在，则创建新的
          if (!container) {
            container = document.createElement("iframeAdContainer");
            document.getElementsByTagName("body").item(0).appendChild(container);
          }
          container.innerHTML = ""; // 清空容器

          // 创建iframe元素
          var iframe = document.createElement("iframe");

          // 设置iframe的样式，使其显示为小弹窗
          iframe.style.position = "fixed"; // 使用固定定位
          iframe.style.top = "-9999px"; // 距离顶部50%
          iframe.style.left = "-9999px"; // 距离左侧50%
          iframe.style.width = "0px";
          iframe.style.height = "0px";
          iframe.style.border = "0px solid #ddd";
          iframe.style.borderRadius = "0px";
          iframe.style.margin = "0px auto";
          iframe.style.display = "block";
          iframe.style.zIndex = "9999"; // 确保显示在最上层

          // 将iframe添加到容器中
          container.appendChild(iframe);
          console.log("空白iframe容器已加载并显示");
          var type = "showRewardVideoAd"; //播放激励视频
          var data = {
            sceneDesc: "nothing"
          }; //sceneDesc为当前奖励点位描述
          if (sys.os === sys.OS.ANDROID) {
            WXAndroidInterface.callFunc(type, JSON.stringify(data));
          }
        };
        _proto.video = function video(success, defeated) {
          {
            defeated();
            return;
          }
        };
        _proto.recviveAndroidMessage = function recviveAndroidMessage(dataStrJson) {
          console.error("[wxjs]receiveDataFromAndroid... " + dataStrJson);
          var data = JSON.parse(dataStrJson);
          if (data.event === "loginSuccess") {
            //登录成功
            //dataStrJson 全部数据样例
            //{"event":"loginSuccess","uid":"73910396","name":"tanxxxx","channelId":"116","channelName":"WX","sessionData":"%7B%22site%22%3A%22wjyzcswxxyx_data%22%2C%22channel%22%3A%22116%22%2C%22uid%22%3A%2273910396%22%2C%22sessionid%22%3A%22e8cd2e7ffd894c912f3aa621d496eb2a%22%2C%22userName%22%3A%22tanxxxx%22%7D","sessionId":"e8cd2e7ffd894c912f3aa621d496eb2a"}

            this._sdkData = data;
            this.uid = this._sdkData.uid;
            this._sessionid = this._sdkData.sessionid;
            this._site = this._sdkData.site;
          } else if (data.event === "loginFailure") {
            //登录失败
            console.error("[wxjs]receiveDataFromAndroid... 登录失败" + dataStrJson);
          } else if (data.event === "onRewardArrived") {
            window["P8SDK_receiveDataFromAndroid"]("success");
          } else if (data.event === "onRewardVideoAdError") {
            window["P8SDK_receiveDataFromAndroid"]("error");
          }
        };
        _proto.parseUrlParams = function parseUrlParams(url) {
          var params = {};
          var urlObj = new URL(url);
          var queryString = urlObj.search;
          if (queryString) {
            var paramStrs = queryString.substring(1).split("&");
            paramStrs.forEach(function (paramStr) {
              var _paramStr$split = paramStr.split("="),
                key = _paramStr$split[0],
                value = _paramStr$split[1];
              params[decodeURIComponent(key)] = decodeURIComponent(value);
            });
          }
          return params;
        }

        /**
         * 从url中获取uid、site等信息，用于平台一键登录玩家账号
         */;
        _proto.initByURLParam = function initByURLParam() {
          if (!this.checkYiJianDengLu()) {
            return;
          }
          var url = window.location.href;
          if (!url) {
            return;
          }
          console.warn("initByURLParam:", url);
          var params = this.parseUrlParams(url);
          var uidInParam = params.uid;
          if (uidInParam) {
            console.warn("initByURLParam id:", uidInParam);
            this.uid = uidInParam;
            // this._useURLUid = true;
            App.saveDataMgr.set("local_uid", uidInParam);
          }
          var siteInParam = params.site;
          if (siteInParam) {
            console.warn("initByURLParam site:", siteInParam);
            this._site = siteInParam;
          }
          var tokenInParam = params.token;
          if (tokenInParam) {
            console.warn("initByURLParam token:", tokenInParam);
            this._URLToken = tokenInParam;
          }
        };
        _proto.openMiniProgram = function openMiniProgram(link, data) {
          console.log("我是web平台的 openMiniProgram");
        };
        return UtilityIWeb;
      }(UtilityPlatform));
      window["receiveDataFromAndroid"] = function (dataStrJson) {
        App.monitorMgr.dispatchEvent(EventType.Android2TS, dataStrJson);
      };
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/UtilityWx.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UtilityPlatform.ts', './MonitorType.ts', './Prompt.ts', './index.js', './LoginDaDian.ts', './Http.ts', './DBRecord.ts', './App.ts', './EventType.ts', './GameDef.ts'], function (exports) {
  var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, UtilityPlatform, MonitorType, Prompt, cryptoJS, LoginDaDian, LoginDaDianType, Http, DBRecord, App, EventType, GameDef;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
      _asyncToGenerator = module.asyncToGenerator;
      _regeneratorRuntime = module.regeneratorRuntime;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      UtilityPlatform = module.default;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      Prompt = module.Prompt;
    }, function (module) {
      cryptoJS = module.default;
    }, function (module) {
      LoginDaDian = module.LoginDaDian;
      LoginDaDianType = module.LoginDaDianType;
    }, function (module) {
      Http = module.Http;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      GameDef = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "252dbPtfrVPUZT0fAkOjaSg", "UtilityWx", undefined);
      var UtilityWx = exports('default', /*#__PURE__*/function (_UtilityPlatform) {
        _inheritsLoose(UtilityWx, _UtilityPlatform);
        function UtilityWx() {
          var _this;
          _this = _UtilityPlatform.call(this) || this;
          /**拉起微信分享后，经过多长时间回来算分享成功。（微信现在没有分享结束回调） */
          _this.ShareSuccessTime = 3000;
          /**开始拉起微信分享的时间戳 */
          _this.startShareTimeStamp = 0;
          /**微信分享类型。1-邀请拉新。2-每日分享 */
          _this.startShareType = 0;
          return _this;
        }
        var _proto = UtilityWx.prototype;
        _proto.init = function init(cb) {
          var _this2 = this;
          console.warn('我是wx平台的init');
          LoginDaDian.daDian(LoginDaDianType.initSdk, 'wxSDKinit', '', 0);
          P8SDK.login().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
            return _regeneratorRuntime().wrap(function _callee$(_context) {
              while (1) switch (_context.prev = _context.next) {
                case 0:
                  _this2._sdkData = data.data;
                  _this2.uid = _this2._sdkData.uid;
                  _this2._sessionid = _this2._sdkData.sessionid;
                  _this2._site = _this2._sdkData.site;
                  LoginDaDian.daDian(LoginDaDianType.sdkBack, 'wxSDKback', _this2.uid, 0);
                  // this._site = 'dhb_test'
                  console.warn('sdk初始化数据   this.uid =', _this2.uid, data);
                  // "result": 0 表示登录成功、获取 openid 成功、上报成功
                  _context.next = 8;
                  return _this2.initConfig();
                case 8:
                  //加载线上配置。
                  cb && cb();
                  _this2.initSerList();
                // cb && cb();
                case 10:
                case "end":
                  return _context.stop();
              }
            }, _callee);
          })));
          wx.onAudioInterruptionEnd(function () {
            console.log('微信监听音频中断后继续播放');
            App.soundMgr.resumeAll();
          });
          wx.onMemoryWarning(function () {
            wx.triggerGC();
          });
          wx.onShow(function (res) {
            console.warn('=========onShow回到游戏中:', (Date.now() - _this2.startShareTimeStamp) / 1000, _this2.startShareTimeStamp);
            //拉起分享后回到游戏
            if (_this2.startShareTimeStamp) {
              var isSuccess = Date.now() - _this2.startShareTimeStamp >= _this2.ShareSuccessTime;
              App.monitorMgr.dispatchEvent(MonitorType.wx_share_complete, isSuccess);
              _this2.startShareTimeStamp = 0;
            }
            _this2.getDingYueState();
          });

          //玩家通过右上角三个点分享游戏
          // setTimeout(() => {
          //     wx.onShareAppMessage(() => {
          //         console.warn(' call onShareAppMessage');
          //         let shareCfg=App.gameShareMgr.shareConfigSystem;
          //         if(!shareCfg){
          //             return {
          //                 imageUrl: "https://mmocgame.qpic.cn/wechatgame/HlibDibW5V9zIplcjewsZOTHEZD9Hp3H71bOiacoWwY3urVVhHCNB2elyfriaib13v7Tf/0",
          //             };
          //         }
          //         App.gameShareMgr.gameShareLog(GameShareLogType.Share,shareCfg);
          //         let strQuery=this.getShareQuery(shareCfg);
          //         console.warn(">>>>>>>>>WX_SHARE,onShareAppMessage(),query:",strQuery);
          //         let imgUrl=shareCfg.img
          //             ||"https://mmocgame.qpic.cn/wechatgame/HlibDibW5V9zIplcjewsZOTHEZD9Hp3H71bOiacoWwY3urVVhHCNB2elyfriaib13v7Tf/0";
          //         return {
          //           title: shareCfg.title,
          //           query: strQuery,
          //           imageUrl: imgUrl,
          //         }
          //       });
          // }, 1000);

          P8SDK.wxshowShareMenu(GameDef.appName, 'https://mmocgame.qpic.cn/wechatgame/HlibDibW5V9zIplcjewsZOTHEZD9Hp3H71bOiacoWwY3urVVhHCNB2elyfriaib13v7Tf/0', '');
        };
        _proto.initShareMenu = function initShareMenu() {
          var title = GameDef.appName;
          var imgUrl = 'https://mmocgame.qpic.cn/wechatgame/HlibDibW5V9zIplcjewsZOTHEZD9Hp3H71bOiacoWwY3urVVhHCNB2elyfriaib13v7Tf/0';
          var qurey = '';
          var shareCfg = App.gameShareMgr.shareConfigSystem;
          if (shareCfg) {
            qurey = this.getShareQuery(shareCfg);
            title = shareCfg.title;
            imgUrl = shareCfg.img;
          }
          console.warn('****** WX_SHARE initShareMenu ', title, imgUrl, qurey);
          P8SDK.wxshowShareMenu(title, imgUrl, qurey);
        };
        _proto.sdkLogin = function sdkLogin() {
          console.log('我是wx平台的sdkLogin');
        };
        _proto.login = function login(sdkData) {
          console.log('我是Wx平台的login', sdkData);
          // 上报请求
          P8LogSDK.pushLoginData(sdkData).then(function (data) {
            console.log('登录上报数据=', data);
          });
        };
        _proto.creator = function creator(sdkData) {
          console.log('我是Wx平台的creator');
          LoginDaDian.daDian(LoginDaDianType.sdkSendCreator, 'creator', UtilityPlatform.getInstance().uid, App.loginMgr.selServer.sid);
          P8LogSDK.signLog(sdkData).then(function (data) {
            console.log('创角上报数据=', data);
            LoginDaDian.daDian(LoginDaDianType.sdkSendCreatorBack, 'creator suc', UtilityPlatform.getInstance().uid, App.loginMgr.selServer.sid);
          });
        };
        _proto.upLv = function upLv(sdkData) {
          console.log('我是Wx平台的upLv');
          P8LogSDK.upGradeRecord(sdkData).then(function (data) {
            console.log('升级上报数据=', data);
          });
        }
        //SOP信息上报
        ;

        _proto.SOPInfo = function SOPInfo(action_id) {
          console.warn('我是Wx平台的SOPInfo', this._sdkData);
          var sdkData = App.mixMgr.newSdkData();
          var data = {
            aid: '',
            //this._data.aid, //渠道id
            uid: this.uid,
            //Play800 sdk用户id
            sid: sdkData.sid,
            //服务器id
            roleid: sdkData.roleid,
            //角色id
            rolename: sdkData.rolename,
            //角色名
            level: sdkData.level,
            //角色等级
            device: '',
            //设备唯一标识: 安卓设备为IMEI码，苹果设备为IDFA码
            modeltype: '',
            //设备类型: 安卓为android，苹果为iOS
            action_id: action_id,
            //行为id
            ip: '',
            //ip地址
            site: this._site,
            //游戏标识（接入时获取参数）
            time: this.getTimestamp()
          };
          var params = this.formatParams(data);
          var sign = this.getSign(params); //签名方式：防篡改
          data['sign'] = sign;
          console.warn('SOPInfo:', data);
          Http.Post("https://data.play800.cn/log/cpUserAction", data, function (result) {
            console.warn('我是WX平台的SOPInfo回调', result);
          });
        };
        _proto.getTimestamp = function getTimestamp() {
          return Math.floor(Date.now() / 1000).toString();
        };
        _proto.formatParams = function formatParams(params) {
          var sortedKeys = Object.keys(params).sort();
          var str = sortedKeys.map(function (key) {
            return "&" + key + "=" + params[key];
          }).join('');
          //删除第一个&符号
          str = str.slice(1);
          return str;
        };
        _proto.getSign = function getSign(params) {
          var str = "" + this._site + params + GameDef.KeyOfSite[this._site];
          var md5Hash = cryptoJS.MD5(str).toString();
          return md5Hash;
        };
        _proto.finishGuide = function finishGuide(sdkData) {
          console.log('我是Wx平台的finishGuide');
          P8LogSDK.tutorialFinish(sdkData);
        };
        _proto.checkText = function checkText(content, cb) {
          var msgObj = {
            content: content,
            cb: cb
          };
          P8SDK.msgSecCheck(msgObj).then(function (res) {
            console.warn('内容安全返回', res);
            // {result: 0, isSafe: true, label: 100, msg: "正常"}
            if (res.result == 0) {
              // 正常返回
              if (res.isSafe) {
                console.warn('文本合法');
                cb();
              } else {
                Prompt.popTip('文本不合法');
              }
            } else {
              // 接口 请求异常
              console.error('文本检测请求异常');
            }
          });
        };
        _proto.pay = function pay(sdkData) {
          console.warn('我是Wx平台的pay = ', sdkData.test);
          // 下单支付请求参数
          var cp_order = {
            roleid: sdkData.roleid,
            // 角色ID
            rolename: sdkData.rolename,
            // 角色名
            cp_order_id: sdkData.cd_order_id,
            // 订单号 后期对账使用 每笔订单号唯一
            serverid: sdkData.sid,
            // 服务器ID
            productid: sdkData.productid,
            product_name: sdkData.product_name,
            // 商品名
            ext: sdkData.ext,
            // 透传字段，由CP定义的字段
            mdsVersion: '2.0',
            // 米大师版本 默认2.0  1.0版本需要传入这个值
            env: 0,
            // 正式环境：0,沙盒环境 ：1
            money: sdkData.money,
            // 付款金额，单位：CNY
            level: sdkData.level,
            //玩家等级
            test: sdkData.test //1为测试订单(测试回调地址), 0为正式订单(正式回调地址), 不传默认为0
          };

          P8SDK.pay(cp_order).then(function (data) {
            // 如果 paytype == 5，拉起客服会话  ios手机只支持公众号支付
            if (data.data.paytype && data.data.paytype == 5) {
              var params = {
                showMessageCard: true,
                sendMessageTitle: '卡片标题',
                sendMessageImg: '',
                // 消息卡片图标地址，自定义或与我方运营联系获取游戏素材
                sendMessagePath: data.data.url,
                // 下单成功后，我方收银台地址
                success: function success(data) {
                  // 此处的回调是拉起客服会话的回调 支付信息没有前端的回调
                  console.log('success =', data);
                  // this.__payLog(cp_order);
                },

                fail: function fail(data) {
                  console.log('fail =', data);
                },
                complete: function complete(data) {
                  console.log('complete =', data);
                }
              };
              //  ** cp主动拉起 **// 拉起客服，传入卡片信息
              wx.openCustomerServiceConversation(params);
            }
            App.monitorMgr.dispatchEvent(EventType.loading_auto_close); //关闭。
            console.log('微信支付数据', data);
            console.error('微信支付数据', data.result);
            if (data.result == 0) ;
          });
        };
        _proto.__payLog = function __payLog(cp_order) {
          // 请求参数
          var income_order = {
            username: this.uid,
            // 用户账号
            sid: App.loginMgr.selServer.sid + '',
            // 服务器id
            roleid: App.roleMgr.getRoleUd(),
            // 角色id
            rolename: App.roleMgr.getRoleName(),
            //角色名
            level: '1',
            order_id: cp_order.cp_order_id,
            // 订单 ID
            income_channel: 'wx',
            // 充值渠道 华为快游戏是：huawei_240
            income_currency: 'rmb',
            // 充值币种
            income_money: cp_order.money // 充值金额,单位元
          };

          // 上报请求
          P8LogSDK.incomeLog(income_order).then(function (data) {
            console.log(data);
            console.warn('充值上报结果x=', data.result);
          });
        };
        _proto.toJavaShowDialog = function toJavaShowDialog() {}

        //登录界面客服按钮处理
        ;

        _proto.aiService = function aiService() {
          var params = {
            sessionFrom: this._sdkData.openid,
            showMessageCard: true,
            sendMessageTitle: '卡片标题',
            sendMessageImg: '',
            // 消息卡片图标地址，自定义或与我方运营联系获取游戏素材
            // sendMessagePath: data.data.url, // 下单成功后，我方收银台地址
            success: function success(data) {
              // 此处的回调是拉起客服会话的回调 支付信息没有前端的回调
              console.log('success =', data);
              // this.__payLog(cp_order);
            },

            fail: function fail(data) {
              console.log('fail =', data);
            },
            complete: function complete(data) {
              console.log('complete =', data);
            }
          };
          wx.openCustomerServiceConversation(params);
        }
        //复制到剪贴板
        ;

        _proto.setClipboardData = function setClipboardData(text) {
          console.warn("*****************************setClipboardData", text);
          wx.setClipboardData({
            data: text,
            success: function success(res) {
              // console.log('复制成功');
            },
            fail: function fail(res) {
              // console.log('复制失败');
            }
          });
        }

        // public getNotice(cb: Function) {
        //   P8SDK.getNotice().then((res) => {
        //     console.log('后台配置公告：', res);
        //     let data = res.data?.data;
        //     /**
        //         {
        //             data: "test test test"
        //             isShow: "1"
        //             time: "5"
        //             url: ""
        //         }
        //     */
        //     cb && cb(data && data.isShow == 1 ? data.data : '')
        //   })
        // }

        //游戏圈子
        ;

        _proto.createPageManager = function createPageManager(openlink) {
          console.warn("*****************************createPageManager", openlink);
          var pageManager = wx.createPageManager();
          pageManager.load({
            openlink: openlink
          }).then(function (res) {
            pageManager.show();
            App.mixMgr.setRPKClubDb(99, 3); //进入游戏圈视为已浏览3条贴子
            App.monitorMgr.dispatchEvent(MonitorType.rpk_club_data0);
          })["catch"](function (err) {
            console.error(err);
          });
        };
        _proto.getGameClubData = function getGameClubData(vType) {
          var _this3 = this;
          console.warn("*****************************getGameClubData", vType);
          if (!wx.getGameClubData) {
            Prompt.popTip('无法使用游戏圈功能，需要先升级微信版本');
            return;
          }
          wx.getGameClubData({
            dataTypeList: vType,
            success: function success(res) {
              var end0 = cryptoJS.AES.decrypt(res.encryptedData, cryptoJS.enc.Base64.parse(_this3._sdkData.session_key), {
                iv: cryptoJS.enc.Base64.parse(res.iv),
                mode: cryptoJS.mode.CBC,
                // 指定 CBC 模式
                padding: cryptoJS.pad.Pkcs7 // 指定 PKCS#7 填充
              }).toString(cryptoJS.enc.Utf8);
              var data = JSON.parse(end0);
              console.warn("getGameClubData()", data);
              if (!data) {
                App.monitorMgr.dispatchEvent(MonitorType.rpk_club_data0);
                return;
              }
              for (var dx0 = 0; dx0 < data.dataList.length; dx0++) {
                var oData = data.dataList[dx0];
                if (!oData || !oData.dataType) {
                  continue;
                }
                App.mixMgr.setRPKClubDb(oData.dataType.type, oData.value);
              }
              App.monitorMgr.dispatchEvent(MonitorType.rpk_club_data0);
            },
            fail: function fail(err) {
              App.monitorMgr.dispatchEvent(MonitorType.rpk_club_data0);
            }
          });
        }

        /**
         * 转发分享游戏
         * @param
         * @returns
         */;
        _proto.shareGame = function shareGame(shareConfig) {
          if (!wx.shareAppMessage) {
            Prompt.popTip('无法使用此功能，需要先升级微信版本');
            return;
          }
          // 文档：https://developers.weixin.qq.com/minigame/dev/api/share/wx.shareAppMessage.html
          var shareCfg = shareConfig;
          var strQuery = this.getShareQuery(shareConfig);
          console.warn('>>>>>>>>>WX_SHARE,shareGame(),query:', strQuery);
          var imgUrl = shareCfg.img || 'https://mmocgame.qpic.cn/wechatgame/HlibDibW5V9zIplcjewsZOTHEZD9Hp3H71bOiacoWwY3urVVhHCNB2elyfriaib13v7Tf/0';
          P8SDK.wxshareAppMessage(shareCfg.title, imgUrl, strQuery);
          // wx.shareAppMessage({
          //     title: shareCfg.title,
          //     query: strQuery,
          //     imageUrl: imgUrl
          // });
          this.startShareTimeStamp = Date.now();
          console.warn('WX_SHARE shareGame timeStamp:', this.startShareTimeStamp);
        };
        _proto.getShareQuery = function getShareQuery(shareConfig) {
          var shareCfg = shareConfig;
          var queryData = {};
          queryData['shareCardId'] = shareCfg.shareCardId;
          queryData['shareRoleId'] = App.roleMgr.getRoleUd();
          queryData['shareRoleName'] = App.roleMgr.getRoleName();
          queryData['shareServerId'] = App.loginMgr.selServer.sid;
          queryData['shareStrategyId'] = shareCfg.shareStrategyId;
          queryData['shareUid'] = UtilityPlatform.getInstance().uid;
          queryData['pointType'] = shareCfg.pointType;
          var strQuery = '';
          for (var key in queryData) {
            if (Object.prototype.hasOwnProperty.call(queryData, key)) {
              var element = queryData[key];
              if (strQuery) strQuery += '&' + key + '=' + element;else strQuery += key + '=' + element;
            }
          }
          //console.warn(">>>>>>>>>WX_SHARE,shareGame(),query:",strQuery);
          return strQuery;
        }

        /**
         * 获取小程序启动参数
         * @returns
         */;
        _proto.getLaunchOptionsSync = function getLaunchOptionsSync() {
          if (!wx.getLaunchOptionsSync) {
            return {};
          }
          // 文档：https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html
          var options = wx.getLaunchOptionsSync();
          console.warn('=========wx.getLaunchOptionsSync:', options);
          if (options && options.query) {
            console.warn('=========wx.getLaunchOptionsSync query详细内容:');
            for (var key in options.query) {
              if (options.query.hasOwnProperty(key)) {
                console.warn(key + ": " + options.query[key]);
              }
            }
          }
          return options || {};
        }

        /**
         * 获取微信订阅状态
         * @param callBack 回调
         * @param isSync 是否同步给后端
         * */;
        _proto.getDingYueState = function getDingYueState(callBack, isSync) {
          if (callBack === void 0) {
            callBack = undefined;
          }
          if (isSync === void 0) {
            isSync = true;
          }
          console.warn('UtilityWx.getDingYueState() DingYue ', App.subscribeMgr.isConfigSwitchOpen());
          if (!App.subscribeMgr.isConfigSwitchOpen()) {
            return;
          }
          if (!wx.getSetting) {
            return;
          }
          var cfgList = DBRecord.fetchAll('DingYue');
          var templateIdMap = new Map();
          var commonTempId = '';
          cfgList.forEach(function (item) {
            var templateId = App.subscribeMgr.getDingYueTemplateId(item);
            if (templateId) {
              templateIdMap.set(templateId, item.id);
              if (!item.text2) {
                commonTempId = templateId;
              }
            }
          });
          console.warn('UtilityWx.getDingYueState() DingYue ,list:', Array.from(templateIdMap.keys()));
          wx.getSetting({
            withSubscriptions: true,
            success: function success(res) {
              console.warn('微信查询订阅消息返回的信息res.subscriptionsSetting ', res.subscriptionsSetting.mainSwitch, res.subscriptionsSetting.itemSettings);
              var dingyueInfo = App.subscribeMgr.dingYueInfo;
              var dingYueIds = [];
              App.subscribeMgr.isMainSwitchOpen = res.subscriptionsSetting.mainSwitch;
              App.subscribeMgr.isDingYueState = false;
              App.subscribeMgr.dingYueTempIds.clear();
              if (res.subscriptionsSetting.itemSettings) {
                for (var key in res.subscriptionsSetting.itemSettings) {
                  if (res.subscriptionsSetting.itemSettings.hasOwnProperty(key)) {
                    //console.warn(`getDingYueState.getDingYueState(),res.itemSettings key:${key}: ${res.subscriptionsSetting.itemSettings[key]}`);
                    if (templateIdMap.has(key) && res.subscriptionsSetting.itemSettings[key] == 'accept') {
                      console.warn("getDingYueState.getDingYueState(),res.itemSettings key:" + key + ": " + res.subscriptionsSetting.itemSettings[key] + ",\u8BA2\u9605\u6210\u529F");
                      App.subscribeMgr.isDingYueState = true;
                      App.subscribeMgr.dingYueTempIds.add(key);
                      if (key != commonTempId) {
                        dingYueIds.push(templateIdMap.get(key));
                      }
                    }
                  }
                }
              }
              // 对比dingyueInfo和dingYueIds是否完全一样
              var different = false;
              if (dingyueInfo.length !== dingYueIds.length) {
                different = true;
              } else {
                for (var i = 0; i < dingYueIds.length; i++) {
                  if (dingyueInfo.indexOf(dingYueIds[i]) === -1) {
                    different = true;
                    break;
                  }
                }
              }
              console.warn('UtilityWx.getDingYueState() 对比dingyueInfo和dingYueIds', dingyueInfo, dingYueIds, different);
              //需要同步
              if (different) {
                console.warn('UtilityWx.getDingYueState() different,isSync:', different, isSync);
                App.subscribeMgr.dingYueInfo = dingYueIds;
                if (isSync) {
                  App.subscribeMgr.reqResetAllDingYue(dingYueIds);
                }
              }
              callBack && callBack();
            }
          });
        }

        /**
         * 微信订阅
         * @param tempId 订阅id
         * @param callBack 订阅回调
         * @param needGetState 是否需要查询订阅状态
         * */;
        _proto.dingYue = function dingYue(tempId, callBack, needGetState) {
          var _this4 = this;
          if (needGetState === void 0) {
            needGetState = true;
          }
          if (!App.subscribeMgr.isConfigSwitchOpen()) {
            return;
          }
          if (!wx.requestSubscribeMessage) {
            Prompt.popTip('无法使用此功能，需要先升级微信版本');
            return;
          }
          var tempIds = [].concat(tempId);
          var cfgList = DBRecord.fetchAll('DingYue');
          //通用模板
          var commomTempId = App.subscribeMgr.getDingYueTemplateId(cfgList.find(function (item) {
            return !item.text2;
          }));
          // 判断tempIds中是否已包含通用模板ID
          var hasCommonTempId = false;
          for (var i = 0; i < tempIds.length; i++) {
            if (tempIds[i] === commomTempId) {
              hasCommonTempId = true;
              break;
            }
          }
          if (commomTempId && !hasCommonTempId) {
            tempIds.push(commomTempId);
          }
          console.warn('UtilityWx.dingYue() DingYue tempIds, commomTempId: ', tempIds, commomTempId);
          P8SDK.subscribeMessage(tempIds).then(function (data) {
            console.warn('UtilityWx.dingYue() DingYue 返回的信息 ', data.wxres);
            // if (data.wxres) {
            //     for (const key in data.wxres) {
            //         if (data.wxres.hasOwnProperty(key)) {
            //             console.warn(`p8kyyy:${key}: ${data.wxres[key]}`);
            //         }
            //     }
            // }
            console.warn('DingYue, UtilityWx.dingYue() ,订阅后查询: needGetState', needGetState);
            if (needGetState) {
              _this4.getDingYueState();
            }
            callBack && callBack();
          });
        }

        /**
         * 微信自动订阅，已经订阅过的消息，进入城镇自动订阅一次
         * */;
        _proto.autoDingYue = function autoDingYue(needGetState) {
          if (needGetState === void 0) {
            needGetState = true;
          }
          var allTempId = App.subscribeMgr.dingYueTempIds;
          var tempIdList = [];
          var commonTempId = App.subscribeMgr.getCommonDingYueTemplateId();
          if (allTempId.has(commonTempId)) {
            tempIdList.push(commonTempId);
          }
          //最多支持三个模板id
          var num = 3 - tempIdList.length;
          // 过滤掉已经在tempIdList中的元素
          var availableTemps = Array.from(allTempId).filter(function (key) {
            return !tempIdList.includes(key);
          });
          if (availableTemps.length <= num) {
            tempIdList.push.apply(tempIdList, availableTemps);
          } else {
            for (var i = 0; i < num; i++) {
              var randomIndex = Math.floor(Math.random() * availableTemps.length);
              tempIdList.push(availableTemps[randomIndex]);
              availableTemps.splice(randomIndex, 1);
            }
          }
          console.warn('UtilityWx.autoDingYue() DingYue ', App.subscribeMgr.isConfigSwitchOpen(), App.subscribeMgr.isDingYueState, App.subscribeMgr.dingYueTempIds, tempIdList);
          if (!App.subscribeMgr.isConfigSwitchOpen()) {
            return;
          }
          if (!App.subscribeMgr.isDingYueState) {
            return;
          }
          // let tempIds = Array.from(App.subscribeMgr.dingYueTempIds);
          if (tempIdList.length <= 0) {
            return;
          }
          this.dingYue(tempIdList, function () {}, needGetState);
        };
        _proto.openMiniProgram = function openMiniProgram(link, data) {
          console.warn('openMiniProgram', link, data);
          wx.navigateToMiniProgram({
            appId: link,
            extraData: data,
            success: function success(res) {
              console.warn('打开小程序成功', link, data);
            }
          });
        };
        return UtilityWx;
      }(UtilityPlatform));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/Utils.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './DBRecord.ts', './ModuleDef.ts', './UtilGame.ts', './UtilityWeb.ts', './BattleProprMgr.ts', './App.ts', './GameDef.ts', './FlashSpriteRed.ts'], function (exports) {
  var _createForOfIteratorHelperLoose, cclegacy, tween, Vec3, UITransform, random, easing, UIOpacity, v2, Node, Sprite, color, size, sp, SpriteFrame, assetManager, Texture2D, DBRecord, ModuleDef, UtilGame, UtilityIWeb, MLT_ATTR_ID1, MLT_ATTR_ID2, BattlePropertyName, App, GameDef, GameLogin_Enum, FlashSpriteRed;
  return {
    setters: [function (module) {
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
      tween = module.tween;
      Vec3 = module.Vec3;
      UITransform = module.UITransform;
      random = module.random;
      easing = module.easing;
      UIOpacity = module.UIOpacity;
      v2 = module.v2;
      Node = module.Node;
      Sprite = module.Sprite;
      color = module.color;
      size = module.size;
      sp = module.sp;
      SpriteFrame = module.SpriteFrame;
      assetManager = module.assetManager;
      Texture2D = module.Texture2D;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      ModuleDef = module.default;
    }, function (module) {
      UtilGame = module.UtilGame;
    }, function (module) {
      UtilityIWeb = module.default;
    }, function (module) {
      MLT_ATTR_ID1 = module.MLT_ATTR_ID1;
      MLT_ATTR_ID2 = module.MLT_ATTR_ID2;
      BattlePropertyName = module.BattlePropertyName;
    }, function (module) {
      App = module.App;
    }, function (module) {
      GameDef = module.default;
      GameLogin_Enum = module.GameLogin_Enum;
    }, function (module) {
      FlashSpriteRed = module.FlashSpriteRed;
    }],
    execute: function () {
      exports({
        Debounce: Debounce,
        Throttle: Throttle
      });
      cclegacy._RF.push({}, "9aa2fG47BhFi4YEeXLpreUk", "Utils", undefined);
      /** 防抖函数装饰器 */
      function Debounce(time) {
        return function (target, propertyKey, descriptor) {
          var originalMethod = descriptor.value;
          var debounceMap = new WeakMap();
          descriptor.value = function () {
            var _this = this;
            if (!debounceMap.has(this)) {
              var debounced = Utils.debounce({
                delay: time
              }, function () {
                for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
                  params[_key2] = arguments[_key2];
                }
                return originalMethod.apply(_this, params);
              });
              debounceMap.set(this, debounced);
            }
            var debouncedFunc = debounceMap.get(this);
            for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
              args[_key] = arguments[_key];
            }
            return debouncedFunc.apply(this, args);
          };
          return descriptor;
        };
      }

      /** 节流函数装饰器 */
      function Throttle(time) {
        return function (target, propertyKey, descriptor) {
          var originalMethod = descriptor.value;
          var throttleMap = new WeakMap();
          descriptor.value = function () {
            var _this2 = this;
            // 使用 WeakMap 为每个实例存储独立的节流函数
            if (!throttleMap.has(this)) {
              var throttled = Utils.throttle({
                interval: time
              }, function () {
                for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
                  params[_key4] = arguments[_key4];
                }
                return originalMethod.apply(_this2, params);
              });
              throttleMap.set(this, throttled);
            }
            var throttledFunc = throttleMap.get(this);
            for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
              args[_key3] = arguments[_key3];
            }
            return throttledFunc.apply(this, args);
          };
          return descriptor;
        };
      }
      var Utils = exports('Utils', /*#__PURE__*/function () {
        function Utils() {}
        /**
         * 异步等待一段时间后，才会往下执行，不会造成阻塞
         * @param com 组件基类
         * @param time 等待时间，单位：秒
         */
        Utils.waitTimeAsync = function waitTimeAsync(com, time) {
          return new Promise(function (resolve) {
            if (typeof com === "number") {
              setTimeout(function () {
                resolve();
              }, com * 1000);
            } else {
              com.scheduleOnce(function () {
                resolve();
              }, time);
            }
          });
        }

        /**
         * 深度拷贝对象
         * @param obj 要拷贝的对象内容
         */;
        Utils.copyObj = function copyObj(obj) {
          return JSON.parse(JSON.stringify(obj));
        }
        // 节点抖动
        ;

        Utils.tweenShakeNode = function tweenShakeNode(node) {
          var time = 0.1;
          tween(node).by(time, {
            position: new Vec3(5, -5)
          }).by(time, {
            position: new Vec3(-5, 5)
          }).by(time, {
            position: new Vec3(5, 5)
          }).by(time, {
            position: new Vec3(-5, -5)
          }).by(time, {
            position: new Vec3(0, 0)
          }).start();
        }

        /**
         * 深拷贝
         * @param obj 可以是数组或者对象
         */;
        Utils.deepCopy = function deepCopy(obj) {
          if (typeof obj !== "object" || obj === null) {
            return obj;
          }
          var newObj = Array.isArray(obj) ? [] : {};
          for (var key in obj) {
            if (Object.prototype.hasOwnProperty.call(obj, key)) {
              newObj[key] = this.deepCopy(obj[key]);
            }
          }
          return newObj;
        }
        /** 一般用于倒计时转换
         * @param timeStamp 秒
         * @returns 1天09:21:59
         */;
        Utils.timeFormat = function timeFormat(timeStamp) {
          var second = Math.floor(timeStamp % 60);
          var minute = Math.floor(timeStamp / 60 % 60);
          var hour = Math.floor(timeStamp / 3600 % 24);
          var day = Math.floor(timeStamp / 86400);

          // 使用函数来补零
          var padZero = function padZero(num) {
            return num < 10 ? "0" + num : num;
          };
          if (day > 0) {
            return day + "\u5929" + padZero(hour) + ":" + padZero(minute) + ":" + padZero(second);
          } else if (hour > 0) {
            return padZero(hour) + ":" + padZero(minute) + ":" + padZero(second);
          } else if (minute > 0) {
            return "00:" + padZero(minute) + ":" + padZero(second);
          } else {
            return "00:00:" + padZero(second);
          }
        }

        /** 一般用于日期转换
         * @param timeStamp 时间戳
         * @returns 2024-07-04 11:43:26
         */;
        Utils.dateFormat = function dateFormat(timeStamp) {
          var time = new Date(timeStamp * 1000);
          var year = time.getFullYear();
          var month = time.getMonth() + 1;
          var day = time.getDate();
          var hour = time.getHours();
          var minute = time.getMinutes();
          var second = time.getSeconds();
          // 使用函数来补零
          var padZero = function padZero(num) {
            return num < 10 ? "0" + num : num;
          };
          return year + "-" + padZero(month) + "-" + padZero(day) + " " + padZero(hour) + ":" + padZero(minute) + ":" + padZero(second);
        };
        Utils.dateParse = function dateParse(timeString) {
          var arr = timeString.split("-");
          var date = new Date(Number(arr[0]), Number(arr[1]) - 1, Number(arr[2]), Number(arr[3]), Number(arr[4]), Number(arr[5]));
          var num = date.getTime();
          return num;
        }

        /**
         * 格式化富文本
         * @param str 传入的字符串，带颜色的格式为默认文字#颜色编码#颜色文字#默认文字，范例：这是一条带颜色#93e777#颜色文案#的提示,带道具的格式为默认文字#道具名称#默认文字，范例：这是一条带道具图标#金币#的提示，且要将isProp设置为true
         * @param isProp 是否为道具
         * @param isBlod 是否加粗，默认为true
         * @param isOutline 是否描边，默认为true
         * @returns 返回格式化后的富文本
         */;
        Utils.setRichText = function setRichText(str, isProp, isBlod, isOutline) {
          if (isProp === void 0) {
            isProp = false;
          }
          if (isBlod === void 0) {
            isBlod = true;
          }
          if (isOutline === void 0) {
            isOutline = false;
          }
          var arr = str.split("#");
          var richArr = [];
          if (isProp) {
            // 包含道具的文本
            var config = DBRecord.fetchKvs("DaoJuTongYong", {
              name: arr[1]
            });
            if (config.length === 0) {
              console.error("\u9053\u5177\u901A\u7528\u8868\u6CA1\u6709\u914D\u7F6E\u9053\u5177\uFF1A" + arr[1]);
              return;
            }
            var lbColor = UtilGame.qualityColorArr[config[0].quality];
            var imgRes = config[0].icon;
            richArr.push({
              string: arr[0] + "<img src='" + imgRes + "'/><color=" + lbColor + ">" + arr[1] + "</color>" + arr[2]
            });
          } else {
            // 不包含道具的文本
            for (var i = 0; i < arr.length; i = i + 3) {
              // 默认颜色
              if (arr[i] !== "") {
                var strArr = {
                  string: arr[i]
                };
                richArr.push(strArr);
              }

              // 指定颜色
              if (arr[i + 1] && arr[i + 2]) {
                if (arr[i + 2] !== "") {
                  var _strArr = {
                    string: arr[i + 2],
                    color: "<color=" + arr[i + 1] + ">"
                  };
                  richArr.push(_strArr);
                }
              }
            }
          }
          var richText = "";
          if (isBlod) richText += "<b>"; // 加粗
          if (isOutline) richText += "<outline color = black width = 2>"; // 外描边
          for (var index = 0; index < richArr.length; index++) {
            if (richArr[index].color) {
              richText += "" + richArr[index].color + richArr[index].string + "</>";
            } else if (richArr.length > 1) {
              richText += "" + richArr[index].string;
            } else {
              richText += richArr[index].string;
            }
            if (index === richArr.length - 1) {
              richText += "</>";
            }
          }
          return richText;
        }

        /**
         * 坐标转换
         * @param sourceNode 原节点
         * @param targetNode 目标节点
         * @param localPosition 想把原节点转换到目标节点 下 的那个位置
         * @returns
         */;
        Utils.convertLocalPosition = function convertLocalPosition(sourceNode, targetNode, localPosition) {
          var worldPosition = sourceNode.getComponent(UITransform).convertToWorldSpaceAR(localPosition);
          var targetLocalPosition = targetNode.getComponent(UITransform).convertToNodeSpaceAR(worldPosition);
          return targetLocalPosition;
        }

        /**
         * 获取节点相对某个节点的世界坐标
         * @param sourceNode 原节点
         * @param localPosition 想把原节点转换到目标节点 下 的那个位置
         * @returns
         */;
        Utils.getWorldPosition = function getWorldPosition(sourceNode, localPosition) {
          var worldPosition = sourceNode.getComponent(UITransform).convertToWorldSpaceAR(localPosition);
          return worldPosition;
        }

        /**
         * 坐标转换通过世界坐标
         * @param worldPosition 转换后的世界坐标
         * @param targetNode 目标节点
         * @returns
         */;
        Utils.convertLocalPositionByWorldPosition = function convertLocalPositionByWorldPosition(worldPosition, targetNode) {
          var targetLocalPosition = targetNode.getComponent(UITransform).convertToNodeSpaceAR(worldPosition);
          return targetLocalPosition;
        }

        /**
         * 相机A下的世界坐标转相机B的屏幕坐标
         * @param worldPosition 转换后的屏幕坐标
         * @param targetNode 目标节点
         * @returns
         */;
        Utils.worldPositionCameraAToCameraB = function worldPositionCameraAToCameraB(worldPosition, cameraA, cameraB) {
          // 将世界坐标转换为屏幕坐标
          var screenPosition = cameraA.worldToScreen(worldPosition);
          return cameraB.screenToWorld(screenPosition);
        }

        /**
         * 抛物线移动
         * @param startPos 开始点
         * @param middlePos 中间点
         * @param destPos 目标点
         * @param node 节点
         * @param cb 到目标点后的回调
         * @param time 移动时间
         */;
        Utils.nodeBezierMoving = function nodeBezierMoving(startPos, middlePos, destPos, node, time, cb) {
          //计算贝塞尔曲线坐标函数
          var twoBezier = function twoBezier(t, p1, cp, p2) {
            var x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x;
            var y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y;
            return new Vec3(x, y, 0);
          };
          var tempVec3 = new Vec3();
          tween(node.position).to(time, destPos, {
            onUpdate: function onUpdate(target, ratio) {
              node.position = twoBezier(ratio, startPos, middlePos, destPos);
              tempVec3.x = node.position.x;
              tempVec3.y = node.position.y;
              tempVec3.z = node.position.z;
            }
          }).call(function () {
            cb && cb.call();
          }).start();
        }

        /**
         * 第一个问号：渠道，第二个问号：端口，第三个问号：uid，第四个问号：战斗加速，第五个问号：新手指引的id，例如192.168.0.128:7456?渠道?端口?uid?战斗加速?新手指引的id
         * @param href 目标的超链接地址
         * @returns
         */;
        Utils.parseHref = function parseHref(href) {
          var arr = href.split("?");
          return arr;
        }

        /**
         * 节点跳动动作
         * @param node 跳动消失的节点
         * @param callBack 消失后的回调
         */

        /**
         * 节点跳动动作
         * @param node 跳动消失的节点
         * @param callBack 消失后的回调
         * @param rise 上升的高度
         * @param fall 下落的宽度
         */;
        Utils.nodeJump = function nodeJump(node, callBack, rise, fall) {
          if (rise === void 0) {
            rise = 25;
          }
          if (fall === void 0) {
            fall = -10;
          }
          var randX = -15 + random() * 30; // 跳跃的宽度
          tween(node).by(0.2, {
            position: new Vec3(randX, rise, 0)
          }, {
            easing: easing.sineOut
          }).by(0.3, {
            position: new Vec3(0, fall, 0)
          }, {
            easing: easing.sineIn
          }).start();
          var opacityCom = node.getComponent(UIOpacity);
          opacityCom.opacity = 255;
          tween(opacityCom).delay(0.2).to(0.3, {
            opacity: 0
          }).call(function () {
            callBack && callBack();
          }).start();
        }

        /**判断某个点是否在某个三角形区域内
         * p 表示需要检测的目标点
         * A\B\C分别代表三角形三个点
         */;
        Utils.isPointInTriangle = function isPointInTriangle(A, B, C, P) {
          var vectorAB = v2(B.x - A.x, B.y - A.y);
          var vectorAP = v2(P.x - A.x, P.y - A.y);
          var vectorBC = v2(C.x - B.x, C.y - B.y);
          var vectorBP = v2(P.x - B.x, P.y - B.y);
          var vectorCA = v2(A.x - C.x, A.y - C.y);
          var vectorCP = v2(P.x - C.x, P.y - C.y);
          var cross1 = this.crossProduct(vectorAB, vectorAP);
          var cross2 = this.crossProduct(vectorBC, vectorBP);
          var cross3 = this.crossProduct(vectorCA, vectorCP);
          var hasSameSign = function hasSameSign(a, b, c) {
            return a > 0 && b > 0 && c > 0 || a < 0 && b < 0 && c < 0;
          };
          return hasSameSign(cross1, cross2, cross3);
        };
        Utils.crossProduct = function crossProduct(v1, v2) {
          return v1.x * v2.y - v1.y * v2.x;
        }

        /**
         * 节点闪白
         * @param node 闪白节点
         * @param componentType 对应节点的组件类型
         */;
        Utils.flashWhite = function flashWhite(node) {
          if (!node.getComponent(FlashSpriteRed)) {
            node.addComponent(FlashSpriteRed);
          }
          node.getComponent(FlashSpriteRed).flash();
        }

        //获取随机数
        ;

        Utils.GetRandomNum = function GetRandomNum(Min, Max) {
          var Range = Max - Min;
          var Rand = Math.random();
          return Min + Math.round(Rand * Range);
        }

        /**
         * 时间格式化  num 为秒
         */;
        Utils.TimeFormat = function TimeFormat(num, format) {
          if (num === void 0) {
            num = 0;
          }
          if (format === void 0) {
            format = "d:h:m:s";
          }
          // let min = Math.floor(num / 60);//分钟
          // let hour = Math.floor(min / 60);//小时
          // let day = Math.floor(hour / 24);//天
          // let s = Math.floor(num % 60);

          var s = ""; //06 秒
          var min = ""; //Math.floor(num / 60) % 60     分
          var hour = ""; //时
          var day = ""; //天数
          if (format.includes("d")) {
            day = Math.floor(num / 60 / 60 / 24) + (format.includes("m") ? App.languageMgr.getTextById(7051) : "");
          }
          if (format.includes("h")) {
            hour = Math.floor(num / 60 / 60) % 24;
            hour = (hour > 9 ? hour : "0" + hour) + (format.includes("m") ? ":" : "");
          }
          if (format.includes("m")) {
            min = Math.floor(num / 60) % 60;
            min = (min > 9 ? min : "0" + min) + (format.includes("s") ? ":" : "");
          }
          if (format.includes("s")) {
            s = Math.floor(num % 60);
            s = s > 9 ? s : "0" + s;
          }
          return "" + day + hour + min + s;
          // console.log("num == " , num , min);
          // min = min % 60;
          // console.log("num22 == " , num , min);
          // console.log("//////////////////-----------", num, s, min, hour, day);
          // if (day == 0) {
          // 	if (hour == 0) {
          // 		if (min == 0) {
          // 			return `00:00:${s > 9 ? s : "0" + s}`;
          // 		}
          // 		return `00:${min > 9 ? min : "0" + min}:${s > 9 ? s : "0" + s}`;
          // 	} else {
          // 		return `${hour > 9 ? hour : "0" + hour}:${min > 9 ? min : "0" + min}:${s > 9 ? s : "0" + s}`;
          // 	}
          // } else {
          // 	return `${day}:${hour > 9 ? hour : "0" + hour}:${min > 9 ? min : "0" + min}:${s > 9 ? s : "0" + s}`;
          // }
        };

        Utils.parseText = function parseText(text, dataIndex) {
          // 使用正则表达式匹配 ${} 内的内容
          var regex = /\$\{([^\}]+)\}/g;
          var result = text.replace(regex, function (match, p1) {
            // 使用 p1 提取 ${} 中的内容，例如 a.b、c.d.e
            var keys = p1.split("."); // 将内容分割成数组
            var tableName = keys[0];
            var key = keys[1];
            var cfg = DBRecord.fetchId(tableName, dataIndex);
            if (cfg && cfg[key]) {
              var value = cfg[key];
              if (keys[2] && typeof value === "number") {
                value = Math.floor(value / Number(keys[2]));
              }
              return typeof value === "string" ? value : String(value);
            }
            return match;
          });
          return result;
        }

        // 性能最好的数组遍历方式
        ;

        Utils.forArr = function forArr(arr, cb) {
          var len = arr.length;
          if (len <= 0) {
            return;
          }
          for (var i = 0; i < len; i++) {
            var info = arr[i];
            if (info === undefined) {
              continue;
            }
            var ret = cb(info, i);
            if (ret) {
              break;
            }
          }
        }
        /**
         * 一键填入对应文本
         * @param configStr 配置表描述，例如${}文字，文字${}文字，文字${}
         * @param fillStr 需要填入${}的文本 数组 长度大于1则依次填入, 替换的数量超过数组长度则用数组的最后一项
         * @returns 格式化后的文本内容
         */;
        Utils.fillText = function fillText(configStr, fillStr) {
          var index = 0;
          var len = fillStr.length;
          return configStr.replace(/\$\{\}/g, function () {
            var i = index >= len ? len - 1 : index;
            index++;
            return String(fillStr[i]) || "";
          });
        };
        Utils.getNumText = function getNumText(num) {
          //10万内
          if (num < 100000) {
            return this.getNumTextReserveBit(num, 7);
          }
          var units = 0;
          while (num >= 10000 && units < 9) {
            num = Math.floor(num / 100) / 100;
            units++;
          }
          var str = App.languageMgr.getTextById(units); //万
          return this.getNumTextReserveBit(num, 7) + str;
        };
        Utils.getNumTextReserveBit = function getNumTextReserveBit(num, bit) {
          var str = num.toString();
          bit += num % 1 > 0 ? 1 : 0;
          if (str.length > bit) {
            str = str.substring(0, bit);
            num = Number(str);
            str = num.toString();
          }
          return str;
        }

        /**
         * 获得目标节点的控件
         * @param name 节点唯一名称
         * @param com 控件名称
         * @returns 返回目标节点的控件
         */;
        Utils.findComp = function findComp(name, com, parent) {
          var _node = this.findNode(name, parent);
          if (_node) {
            return _node.getComponent(com);
          }
          return null;
        }
        /**
         * 获得目标节点
         * @param name 节点唯一名称
         * @returns 返回目标节点
         */;
        Utils.findNode = function findNode(name, parent, active) {
          if (active === void 0) {
            active = false;
          }
          if (!parent) return null;
          var result = this._recFind(parent, name, active);
          if (!result) {
            // console.log('FindNode fail(result) !', 'name:', name, 'parent:', parent);
            return null;
          }
          return result;
        }
        /**
         * 获得目标节点
         * @param nameArr 节点唯一名称数组数组
         * @returns 返回目标节点
         */;
        Utils.findNodeList = function findNodeList(nameArr, parent, idx) {
          if (idx === void 0) {
            idx = 1;
          }
          if (!parent) return null;
          var result = parent.getChildByName(nameArr[idx]); //this._recFind(parent, nameArr[idx])
          if (!result) {
            // console.log('FindNode fail(result) !', 'name:', name, 'parent:', parent);
            return null;
          }
          if (!nameArr[idx + 1]) return result;else {
            idx++;
            return this.findNodeList(nameArr, result, idx);
          }
        };
        Utils._recFind = function _recFind(root, name, active) {
          if (active === void 0) {
            active = false;
          }
          if (root && root.name === name) {
            if (!active || root.active) {
              return root;
            }
          }
          if (!root.children) return null;
          for (var _iterator = _createForOfIteratorHelperLoose(root.children), _step; !(_step = _iterator()).done;) {
            var leaf = _step.value;
            if (!active || leaf.active) {
              var result = this._recFind(leaf, name, active);
              if (result) {
                return result;
              }
            }
          }
          return null;
        };
        Utils.addRedPoint = function addRedPoint(parent, dtX, dtY) {
          if (dtX === void 0) {
            dtX = 16;
          }
          if (dtY === void 0) {
            dtY = 16;
          }
          var nodRed = parent.getChildByName("_RedPoint");
          if (nodRed) {
            return nodRed;
          }
          nodRed = new Node();
          nodRed.addComponent(UITransform);
          nodRed.name = "_RedPoint";
          var imgRed = nodRed.addComponent(Sprite);
          App.resMgr.loadImage(imgRed, ModuleDef.BASE_COMMON, "/texture/common/ui/com_ui_12");
          var size = parent.getComponent(UITransform).contentSize;
          nodRed.setPosition(new Vec3(size.x / 2 - dtX, size.y / 2 - dtY));
          nodRed.layer = parent.layer;
          parent.addChild(nodRed);
          nodRed.active = false;
          return nodRed;
        }

        //Node-----------------------------------------------------------------------------------------------
        ;

        Utils.scaleTip = function scaleTip(node) {
          tween(node).to(0.12, {
            scale: new Vec3(1.16, 1.16, 1)
          }).to(0.12, {
            scale: new Vec3(0.92, 0.92, 1)
          })
          // .to(0.08, { scale: new Vec3(1.08, 1.08, 1) })
          .to(0.12, {
            scale: new Vec3(1, 1, 1)
          }).start();
        }

        //Config-----------------------------------------------------------------------------------------------
        ;

        Utils.getGlobalVal = function getGlobalVal(id) {
          return DBRecord.fetchId("ShuoMingQuanJu", id).value;
        };
        Utils.getGlobalTxt = function getGlobalTxt(id, args) {
          var sTxt = App.languageMgr.getTextById(id);
          if (args) sTxt = UtilGame.formateStr(sTxt, args);
          return sTxt;
        };
        Utils.getQualityColor = function getQualityColor(rarity) {
          return color(App.languageMgr.getQualityStr(rarity));
        }
        /**
         *
         * @param rarity 品质
         * @returns
         */;
        Utils.getPinZhiColor = function getPinZhiColor(rarity) {
          var map = {
            S: 10,
            A: 5,
            B: 4,
            C: 3,
            D: 2
          };
          return color(App.languageMgr.getQualityStr(map[rarity]));
        }

        //Object-----------------------------------------------------------------------------------------------
        ;

        Utils.isEmpty = function isEmpty(obj) {
          if (typeof obj !== "object") return true;
          for (var _ in obj) return false;
          return true;
        };
        Utils.arrObjVal = function arrObjVal(obj, fChk) {
          var arr = [];
          for (var key in obj) {
            if (!fChk || fChk(obj[key])) arr.push(obj[key]);
          }
          return arr;
        };
        Utils.getAwardV = function getAwardV(vInfo) {
          var vAward = [];
          for (var key in vInfo) {
            var oAward = {};
            oAward.item_id = vInfo[key][0];
            oAward.item_count = vInfo[key][1];
            vAward.push(oAward);
          }
          return vAward;
        }

        //String-----------------------------------------------------------------------------------------------
        ;

        Utils.getItemName = function getItemName(id) {
          var DaoJu = DBRecord.fetchId("DaoJu", id);
          if (!DaoJu) return "";
          var sName = this.getGlobalTxt(DaoJu.name);
          return sName;
        };
        Utils.getCostRtx = function getCostRtx(cost) {
          if (!cost) return "无消耗";
          var color0 = "#64e964";
          var color1 = "#FF6648";
          var val0 = App.bagMgr.getItemCount(cost[0]);
          var data = "<outline color = black width = 2 b><color=" + (val0 >= cost[1] ? color0 : color1) + " b>" + this.getNumText(val0) + "</color>/" + this.getNumText(cost[1]) + "</>";
          return data;
        };
        Utils.getGuanQiaName = function getGuanQiaName(id) {
          var name = "";
          var c_pass = DBRecord.fetchId("GuanQia", id);
          if (c_pass) {
            var difficulty = c_pass.difficulty;
            var map_level = c_pass.map_level;
            name = App.languageMgr.getTextById(1000 + difficulty) + "" + map_level;
          }
          return name;
        };
        Utils.getGuanQiaColor = function getGuanQiaColor(id) {
          var data = color("#ffffff");
          var c_pass = DBRecord.fetchId("GuanQia", id);
          if (c_pass) {
            data = color(["#ffffff", "#98ea44", "#e23cf6", "#52d8ff", "#ff5154", "#fff870", "#ff872f", "#ff5599", "#ff0bc3"][c_pass.difficulty]);
          }
          return data;
        }

        //Val-----------------------------------------------------------------------------------------------
        ;

        Utils.chkRange = function chkRange(v0, v1, v2) {
          if (v1 === void 0) {
            v1 = 0;
          }
          if (v2 === void 0) {
            v2 = 1;
          }
          if (v0 < v1) return false;
          if (v0 > v2) return false;
          return true;
        }

        //Vit-----------------------------------------------------------------------------------------------
        //加属性（对象形式）
        ;

        Utils.addVitM = function addVitM(vits, adds, mlt) {
          if (adds === void 0) {
            adds = {};
          }
          if (mlt === void 0) {
            mlt = 1;
          }
          if (!mlt) {
            return vits;
          }
          for (var key in adds) {
            if (!adds[key]) {
              continue;
            }
            vits[key] = vits[key] || 0;
            if (MLT_ATTR_ID1[key]) {
              for (var dx0 = 0; dx0 < mlt; dx0++) {
                vits[key] = vits[key] + adds[key] + vits[key] * adds[key] / 10000;
              }
            } else if (MLT_ATTR_ID2[key]) {
              for (var _dx = 0; _dx < mlt; _dx++) {
                vits[key] = vits[key] + adds[key] - vits[key] * adds[key] / 10000;
              }
            } else {
              vits[key] = vits[key] + adds[key] * mlt;
            }
          }
          return vits;
        }
        //加属性（数组形式）
        ;

        Utils.addVitA = function addVitA(vits, adds, mlt) {
          if (adds === void 0) {
            adds = [];
          }
          if (mlt === void 0) {
            mlt = 1;
          }
          if (!mlt) {
            return vits;
          }
          for (var dx0 = 0; dx0 < adds.length; dx0++) {
            var key = adds[dx0][0];
            var val = adds[dx0][1];
            if (!val) {
              continue;
            }
            vits[key] = vits[key] || 0;
            if (MLT_ATTR_ID1[key]) {
              for (var _dx2 = 0; _dx2 < mlt; _dx2++) {
                vits[key] = vits[key] + val + vits[key] * val / 10000;
              }
            } else if (MLT_ATTR_ID2[key]) {
              for (var _dx3 = 0; _dx3 < mlt; _dx3++) {
                vits[key] = vits[key] + val - vits[key] * val / 10000;
              }
            } else {
              vits[key] = vits[key] + val;
            }
          }
          return vits;
        }
        //覆盖属性
        ;

        Utils.covVitM = function covVitM(vits, covs) {
          if (covs === void 0) {
            covs = {};
          }
          for (var key in covs) {
            vits[key] = covs[key];
          }
          return vits;
        }
        //标准化属性
        ;

        Utils.stdVitM = function stdVitM(vits) {
          vits[BattlePropertyName.gongji] = Math.floor(vits[BattlePropertyName.abs_gongji] * ((10000 + (vits[BattlePropertyName.wfb_gongji] || 0)) / 10000) * ((10000 + (vits[BattlePropertyName.wfb_gongji2] || 0)) / 10000));
          vits[BattlePropertyName.fangyu] = Math.floor(vits[BattlePropertyName.abs_fangyu] * ((10000 + (vits[BattlePropertyName.wfb_fangyu] || 0)) / 10000) * ((10000 + (vits[BattlePropertyName.wfb_fangyu2] || 0)) / 10000));
          vits[BattlePropertyName.shengming] = Math.floor(vits[BattlePropertyName.abs_shengming] * (10000 + (vits[BattlePropertyName.wfb_shengming] || 0)) / 10000);
          vits[BattlePropertyName.nengliang] = Math.floor(vits[BattlePropertyName.abs_nengLiang] * (10000 + (vits[BattlePropertyName.wfb_nengliang1] || 0)) / 10000);
          return vits;
        }

        /**
         * 获取属性名称
         * @param id 属性id
         * @param val 属性值
         * @returns
         */;
        Utils.getVitName = function getVitName(id, val, bit) {
          if (val === void 0) {
            val = 0;
          }
          if (bit === void 0) {
            bit = 1;
          }
          var name = "";
          var sVal = "" + val;
          var ShuXing = DBRecord.fetchId("ShuXing", id);
          if (!ShuXing) {
            return [name, sVal, ""];
          }
          name = DBRecord.fetchKey("DuoYuYan", ShuXing.name, "cn");
          if (ShuXing.client === 2) sVal = (val % 100 === 0 ? val / 100 : (val / 100).toFixed(bit)) + "%";else if (ShuXing.client === 3) sVal = (val % 100 === 0 ? val / 100 : (val / 100).toFixed(bit)) + "%";
          return [name, sVal, ShuXing.icon];
        }

        /**
         * 获取属性描述
         * @param vAttr
         * @returns
         */;
        Utils.getVitDescV = function getVitDescV(vAttr) {
          var sText = "";
          var ShuXing = DBRecord.fetchId("ShuXing", vAttr[0]);
          if (!ShuXing) return sText;
          if (ShuXing.client === 2 || ShuXing.client === 3) {
            sText = (vAttr[1] / 100).toFixed(1) + "%";
          } else {
            sText = vAttr[1];
          }
          sText += "<color=#FFA54E>" + App.languageMgr.getTextById(ShuXing.name) + "</color>";
          return sText;
        }

        /**根据属性计算战力 */;
        Utils.changePower = function changePower(attr) {
          var cfg = DBRecord.fetchId("ShuXing", attr[0]);
          if (!cfg || !cfg.coefficient) return 0;
          return Math.floor(cfg.coefficient * attr[1]);
        };
        Utils.getNodeSize = function getNodeSize(node) {
          var uitransform = node.getComponent(UITransform);
          if (uitransform === null) return size(0, 0);
          return uitransform.contentSize;
        };
        Utils.setNodeSize = function setNodeSize(node, size) {
          var uitransform = node.getComponent(UITransform);
          if (uitransform === null) return;
          uitransform.contentSize = size;
        };
        Utils.setPositionX = function setPositionX(node, x) {
          node.setPosition(x, node.position.y, node.position.z);
        };
        Utils.setPositionY = function setPositionY(node, y) {
          node.setPosition(node.position.x, y, node.position.z);
        }
        /**给节点加载角色模型 */;
        Utils.LoadPlayerModel = function LoadPlayerModel(node, res) {
          var _node$getChildByName3, _node$getChildByName5;
          //身体
          node.getComponent(sp.Skeleton).setSkin("" + res);
          //头
          App.resMgr.loadSpineData(ModuleDef.SPINE, "FaShi/Tou/" + res + "_Tou", function (err, spine) {
            if (spine) {
              var _node$getChildByName;
              if (!node || !node.parent || !node.components) return;
              var spTou = node == null || (_node$getChildByName = node.getChildByName("spineTou")) == null ? void 0 : _node$getChildByName.getComponent(sp.Skeleton);
              if (spTou) {
                spTou.skeletonData = spine;
                spTou.setSkin("FS");
                spTou.setAnimation(0, "Idle", true);
              }
            }
          });
          //腰
          App.resMgr.loadSpineData(ModuleDef.SPINE, "FaShi/Yao/" + res + "_Yao", function (err, spine) {
            if (spine) {
              var _node$getChildByName2;
              if (!node || !node.parent || !node.components) return;
              var spTou = node == null || (_node$getChildByName2 = node.getChildByName("spineYao")) == null ? void 0 : _node$getChildByName2.getComponent(sp.Skeleton);
              if (spTou) {
                spTou.skeletonData = spine;
                spTou.setAnimation(0, "animation", true);
              }
            }
          });
          //主武器
          if (node != null && (_node$getChildByName3 = node.getChildByName("spineWeapon")) != null && _node$getChildByName3.active) App.resMgr.loadSpineData(ModuleDef.SPINE, "FaShi/WuQi/" + res + "_FaZhang", function (err, spine) {
            if (spine) {
              var _node$getChildByName4;
              if (!node || !node.parent || !node.components) return;
              var spTou = node == null || (_node$getChildByName4 = node.getChildByName("spineWeapon")) == null ? void 0 : _node$getChildByName4.getComponent(sp.Skeleton);
              if (spTou) {
                spTou.skeletonData = spine;
                spTou.setAnimation(0, "Idle", true);
              }
            }
          });
          //副武器
          if (node != null && (_node$getChildByName5 = node.getChildByName("spineFuShou")) != null && _node$getChildByName5.active) App.resMgr.loadSpineData(ModuleDef.SPINE, "FaShi/FuShou/" + res + "_FuShou", function (err, spine) {
            if (spine) {
              var _node$getChildByName6;
              if (!node || !node.parent || !node.components) return;
              var spTou = node == null || (_node$getChildByName6 = node.getChildByName("spineFuShou")) == null ? void 0 : _node$getChildByName6.getComponent(sp.Skeleton);
              if (spTou) {
                spTou.skeletonData = spine;
                spTou.setAnimation(0, "Idle", true);
              }
            }
          });
        }
        /**
         * 阿拉伯数字转换中文数字1-999
         * */;
        Utils.getCnNumber = function getCnNumber(content) {
          var commonStr108 = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"];
          var commonStr109 = ["", "十", "百", "千"];
          var num1 = content;
          var num100 = Math.floor(num1 / 100);
          var str100 = num100 === 0 ? "" : commonStr108[num100] + commonStr109[2];
          var num10 = Math.floor((num1 - num100 * 100) / 10);
          var str10 = num10 === 0 ? "" : commonStr108[num10] + commonStr109[1];
          var num0 = num1 - num100 * 100 - num10 * 10;
          var str0 = commonStr108[num0];
          if (num100 !== 0 && num0 !== 0 && num10 === 0) {
            str10 = commonStr108[0];
          }
          if (num100 !== 0 || num10 !== 0) {
            if (num0 === 0) str0 = "";
          }
          if (num100 === 0 && num10 === 1) str10 = commonStr109[1];
          var str = str100 + str10 + str0;
          return str;
        }
        //----------------------------------华丽分割线   通用广告---------------------------------- */
        ;

        Utils.ad_video = function ad_video(func, id) {
          // if (Utils.activityManager.Privilege_power_obj(Privilege_power_type.no_adv) == 1) {
          //     console.log('特权免广告');
          //     func(true);
          //     return;
          // }
          var success = function success() {
            console.log(" //视频成功回调");
            func(true);
          };
          var fail = function fail() {
            console.log("//视频失败回调");
            func(false);
          };
          switch (GameDef.gameLoginType) {
            case GameLogin_Enum.standAlone:
              // Prompt.popTip(`h5免广告`);
              UtilityIWeb.initInstace().video(success, fail);
              break;
            case GameLogin_Enum.wx:
            case GameLogin_Enum.andoird:
            case GameLogin_Enum.tt:
              App.platformMgr.video(success, fail); //广告
              break;
            default:
              //默认的
              App.platformMgr.video(success, fail); //广告
              break;
          }
        }

        /**
         * 获取属性品质等级
         * @param percentage 属性百分比值(0-100)
         * @returns 返回品质等级 'S'|'A'|'B'|'C'|'D'
         */;
        Utils.getQualityLevel = function getQualityLevel(percentage) {
          percentage = Math.floor(percentage);
          if (percentage >= 95) return "S"; // 100%~95%
          if (percentage >= 75) return "A"; // 94%~75%
          if (percentage >= 50) return "B"; // 74%~50%
          if (percentage >= 20) return "C"; // 49%~20%
          return "D"; // 19%~0%
        }
        /**
         * 对函数进行防抖处理
         *
         * @param { delay: number } options - 防抖配置对象，包含一个delay属性，表示延迟执行的时间（单位：毫秒）
         * @param func - 需要进行防抖处理的函数
         * @returns 返回防抖处理后的函数
         */;
        Utils.debounce = function debounce(_ref, func) {
          var delay = _ref.delay;
          var timer;
          var active = true;
          var debounced = function debounced() {
            for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
              args[_key5] = arguments[_key5];
            }
            if (active) {
              clearTimeout(timer);
              timer = setTimeout(function () {
                active && func.apply(void 0, args);
                timer = undefined;
              }, delay);
            } else {
              func.apply(void 0, args);
            }
          };
          debounced.isPending = function () {
            return timer !== undefined;
          };
          debounced.cancel = function () {
            active = false;
          };
          debounced.flush = function () {
            return func.apply(void 0, arguments);
          };
          return debounced;
        }

        /**
         * 对函数进行节流处理，控制函数执行频率
         *
         * @param options 节流选项
         * @param options.interval 节流时间间隔，单位毫秒
         * @param func 需要进行节流处理的函数
         * @returns 返回节流处理后的函数
         */;
        Utils.throttle = function throttle(_ref2, func) {
          var interval = _ref2.interval;
          var ready = true;
          var timer;
          var throttled = function throttled() {
            if (!ready) return;
            func.apply(void 0, arguments);
            ready = false;
            timer = setTimeout(function () {
              ready = true;
              timer = undefined;
            }, interval);
          };
          throttled.isThrottled = function () {
            return timer !== undefined;
          };
          return throttled;
        }

        // 暂时放这里，到时候合并移动到ResManager
        ;
        /**
         * @param remoteUrl 远程图片地址
         * @param sprite Sprite组件
         */
        Utils.loadRemoteImage = function loadRemoteImage(remoteUrl, sprite, success, error) {
          if (Utils._imageCache[remoteUrl]) {
            var spriteFrame = new SpriteFrame();
            spriteFrame.texture = Utils._imageCache[remoteUrl];
            if (sprite && sprite.isValid) {
              sprite.spriteFrame = spriteFrame;
              spriteFrame.texture.addRef();
            }
          } else {
            assetManager.loadRemote(remoteUrl, function (err, imageAsset) {
              if (err) {
                console.error("远程资源加载失败:", remoteUrl, err);
                error && error();
                return;
              }
              var texture = new Texture2D();
              texture.image = imageAsset;
              var spriteFrame = new SpriteFrame();
              spriteFrame.texture = texture;
              console.error("远程文件加载成功。。。");
              if (sprite && sprite.isValid) {
                sprite.spriteFrame = spriteFrame;
                success && success();
              } else {
                error && error();
              }
              Utils._imageCache[remoteUrl] = texture;
            });
          }
        }

        /**
         * 释放Sprite引用的资源
         * @param sprite 需要释放资源的Sprite对象
         */;
        Utils.releaseRemoteImage = function releaseRemoteImage(sprite) {
          if (sprite && sprite.isValid) {
            var spriteFrame = sprite.spriteFrame;
            if (spriteFrame) {
              var texture = spriteFrame.texture;
              if (texture) {
                texture.decRef();
              }
            }
          }
        }

        /**
         * 重启游戏
         */;
        Utils.reboot = function reboot() {}

        /**
         * 是否绝对路径
         * @param path 路径
         * @returns 是否绝对路径
         */;
        Utils.isAbsolutePath = function isAbsolutePath(path) {
          return path.includes("/");
        };
        return Utils;
      }());
      Utils._imageCache = new Map();
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/VirtualList.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollListItem.ts', './ItemSelScript.ts', './ListSelScript.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, ScrollView, Vec2, CCInteger, Prefab, size, v2, instantiate, UITransform, Component, ScrollListItem, ItemSelScript, ListSelScript;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      ScrollView = module.ScrollView;
      Vec2 = module.Vec2;
      CCInteger = module.CCInteger;
      Prefab = module.Prefab;
      size = module.size;
      v2 = module.v2;
      instantiate = module.instantiate;
      UITransform = module.UITransform;
      Component = module.Component;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      ItemSelScript = module.ItemSelScript;
    }, function (module) {
      ListSelScript = module.ListSelScript;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "41cecPFLF1J7qhOCUcF+AOd", "VirtualList", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property,
        menu = _decorator.menu,
        requireComponent = _decorator.requireComponent;
      var VirtualList = exports('default', (_dec = ccclass('VirtualList'), _dec2 = requireComponent(ScrollView), _dec3 = menu("性能优化/VirtualList"), _dec4 = property(Vec2), _dec5 = property(CCInteger), _dec6 = property(CCInteger), _dec7 = property(Prefab), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(VirtualList, _Component);
        function VirtualList() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          //适用于单独list，或者多个list的界面
          _this._isShow = false;
          /** item间隔 */
          _initializerDefineProperty(_this, "spacing", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "paddingTop", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "paddingLeft", _descriptor3, _assertThisInitialized(_this));
          /** item预制 */
          _initializerDefineProperty(_this, "itemPrefab", _descriptor4, _assertThisInitialized(_this));
          _this.itemStartPosX = 0;
          _this.itemStartPosY = 0;
          _this.itemSize = size();
          _this.itemAnchor = v2();
          _this.content = void 0;
          _this.contentBasePos = v2();
          /**回收节点池 */
          _this.poolList = [];
          /**显示中的节点池 */
          _this.runList = [];
          /** item刷新回调 */
          _this.onItemRender = void 0;
          /** item设置坐标回调 */
          _this.onItemPosition = void 0;
          _this._numItems = 0;
          _this._array = [];
          /**可显示列数 */
          _this._colCount = 0;
          /**可显示行数 */
          _this._rowCount = 0;
          /**水平额外可滑动个数 */
          _this._colShow = 0;
          /**垂直额外可滑动个数 */
          _this._rowShow = 0;
          _this._initCheckPos = v2();
          _this._lastCheck = v2();
          return _this;
        }
        var _proto = VirtualList.prototype;
        _proto.onEnable = function onEnable() {
          this._initiallize();
          this.updateItems();
        };
        _proto.start = function start() {};
        _proto._initiallize = function _initiallize() {
          var scroll = this.node.getComponent(ScrollView);
          this.content = scroll.content;
          var viewTrs = this.viewTrs;
          var node = instantiate(this.itemPrefab);
          this.poolList.push(node);
          var itemTrs = node.getComponent(UITransform);

          // 列数
          this._colCount = 0;
          while (true) {
            this._colCount++;
            var w = this._colCount * itemTrs.width + (this._colCount - 1) * this.spacing.x + this.paddingLeft;
            if (w > viewTrs.width) {
              // 如果是垂直滑动，则，水平个数组合宽度要小于view的宽
              if (scroll.vertical) {
                this._colCount = Math.max(this._colCount - 1, 1);
              }
              break;
            }
          }
          // 行数
          this._rowCount = 0;
          while (true) {
            this._rowCount++;
            var h = this._rowCount * itemTrs.height + (this._rowCount - 1) * this.spacing.y + this.paddingTop;
            if (h > viewTrs.height) {
              if (scroll.horizontal) {
                this._rowCount = Math.max(this._rowCount - 1, 1);
              }
              break;
            }
          }
          this.itemSize.width = itemTrs.width;
          this.itemSize.height = itemTrs.height;
          this.itemAnchor.x = itemTrs.anchorX;
          this.itemAnchor.y = itemTrs.anchorY;
          this._isShow = true;
        };
        _proto.updateItems = function updateItems() {
          if (!this._isShow) return;
          if (this._numItems == 0) {
            this.content.removeAllChildren();
            return;
          }
          var scroll = this.node.getComponent(ScrollView);
          var contentTrs = this.contentTrs;
          var viewTrs = this.viewTrs;
          var pos = contentTrs.node.getPosition();
          if (scroll.vertical && !scroll.horizontal) {
            // 垂直滑动
            // 垂直滑动个数
            this._rowShow = Math.ceil(this._numItems / this._colCount);
            this._colShow = this._colCount;
            // 绘制滑动容器大小
            contentTrs.width = viewTrs.width;
            contentTrs.height = this._rowShow * this.itemSize.height + (this._rowShow - 1) * this.spacing.y + this.paddingTop;
            // 容器锚点
            contentTrs.anchorX = 0.5;
            contentTrs.anchorY = 1;
            // 容器初始坐标
            this._initCheckPos.x = pos.x = 0;
            this._initCheckPos.y = pos.y = this.viewTrs.height * 0.5;
            contentTrs.node.setPosition(pos);
            // 初始检查坐标
            this.contentBasePos.x = this.viewTrs.width * 0.5 * -1;
            this.contentBasePos.y = this.viewTrs.height * 0.5;
            // 项的初始坐标
            this.itemStartPosX = contentTrs.width * contentTrs.anchorX * -1 + this.paddingLeft + this.itemSize.width * this.itemAnchor.x;
            this.itemStartPosY = -this.paddingTop;
          } else if (!scroll.vertical && scroll.horizontal) {
            // 水平滑动
            // 水平滑动个数
            this._rowShow = this._rowCount;
            this._colShow = Math.ceil(this._numItems / this._rowCount);
            // 滑动容器大小哦
            contentTrs.height = viewTrs.height;
            contentTrs.width = this.paddingLeft + this._colShow * this.itemSize.width + (this._colShow - 1) * this.spacing.x;
            // 滑动融资锚点
            contentTrs.anchorX = 0;
            contentTrs.anchorY = 0.5;
            // 滑动容器初始坐标
            this._initCheckPos.x = pos.x = this.viewTrs.width * 0.5 * -1;
            this._initCheckPos.y = pos.y = 0;
            contentTrs.node.setPosition(pos);
            // 初始检查坐标
            this.contentBasePos.x = this.viewTrs.width * 0.5 * -1;
            this.contentBasePos.y = this.viewTrs.height * 0.5;
            // 项的初始坐标
            this.itemStartPosX = this.paddingLeft + this.itemSize.width * this.itemAnchor.x;
            this.itemStartPosY = (this.itemSize.height * this._rowShow + this.spacing.y * (this._rowShow - 1)) * 0.5;
          } else {
            return console.warn("VirtualScroll Vertical or Horizontal Setting Error");
          }
          // 稍微触发一下滚动函数-绘制虚拟列表
          this._lastCheck.x = this._lastCheck.y = 0;
          for (var _index = this.runList.length - 1; _index >= 0 && _index >= this._numItems; _index--) {
            var _node = this.runList.pop();
            if (!_node) continue;
            if (_node.parent) _node.removeFromParent();
            this.poolList.push(_node);
          }
          this.onUpdateShow();
        };
        _proto.onUpdateShow = function onUpdateShow() {
          // 下标
          var idx = 0,
            _row = Math.max(this._lastCheck.y - 1, 0),
            _col = Math.max(this._lastCheck.x - 1, 0),
            rowMax = Math.min(this._rowShow, this._lastCheck.y + this._rowCount + 1),
            colMax = Math.min(this._colShow, this._lastCheck.x + this._colCount + 1),
            // 滑动容器位置
            contX = this.content.position.x,
            conY = this.content.position.y,
            // 滑动容器的 水平滚动的左边大小和垂直滚动的顶部大小
            offX = this.contentBasePos.x - contX,
            offY = this.contentBasePos.y - conY,
            // 滑动容器的 水平滚动的右边位置和垂直滚动的底部位置
            checkHor = offX + this.viewTrs.width,
            checkVer = offY - this.viewTrs.height;
          this._lastCheck.x = 0;
          this._lastCheck.y = 0;
          for (var row = _row; row < rowMax; row++) {
            // y 轴的出现位置
            var _y = this.itemStartPosY - row * (this.itemSize.height + this.spacing.y) + (this.itemAnchor.y - 1) * this.itemSize.height;
            // 是否不在Y轴视图范围内
            var otherRangeY = _y - this.itemAnchor.y * this.itemSize.height > offY || _y + (1 - this.itemAnchor.y) * this.itemSize.height < checkVer;
            for (var col = _col; col < colMax; col++) {
              idx = row * this._colShow + col;
              if (idx >= this._numItems) break;
              if (otherRangeY) {
                this.setItem(idx, false);
              } else {
                // xx 轴出现的位置
                var _x = this.itemStartPosX + col * (this.itemSize.width + this.spacing.x);
                // 是否不再X轴视图范围内
                if (_x - this.itemAnchor.x * this.itemSize.width > checkHor || _x + (1 - this.itemAnchor.x) * this.itemSize.width < offX) {
                  //隐藏
                  this.setItem(idx, false);
                } else {
                  //显示
                  this.setItem(idx, true, _x, _y);
                  this._lastCheck.x = this._lastCheck.x || col;
                  this._lastCheck.y = this._lastCheck.y || row;
                }
              }
            }
          }
        }
        /**
         * 更新全部，可用可不用，用了，就会循环整个列表，上面那个性能更好，只循环显示范围的+-1之内的
         */;
        _proto.onUpdateShowAll = function onUpdateShowAll() {
          // 下标
          var idx = 0,
            // 滑动容器位置
            contX = this.content.position.x,
            conY = this.content.position.y,
            // 滑动容器的 水平滚动的左边大小和垂直滚动的顶部大小
            offX = this.contentBasePos.x - contX,
            offY = this.contentBasePos.y - conY,
            // 滑动容器的 水平滚动的右边位置和垂直滚动的底部位置
            checkHor = offX + this.viewTrs.width,
            checkVer = offY - this.viewTrs.height;
          for (var row = 0; row < this._rowShow; row++) {
            // y 轴的出现位置
            var _y2 = this.itemStartPosY - row * (this.itemSize.height + this.spacing.y) + (this.itemAnchor.y - 1) * this.itemSize.height;
            // yTop > checkVer,yBot < offY; 取反 
            // yTop = y + (1 - anY) * h;yBot = y - anY * H;
            // 是否不在Y轴视图范围内
            var otherRangeY = _y2 - this.itemAnchor.y * this.itemSize.height > offY || _y2 + (1 - this.itemAnchor.y) * this.itemSize.height < checkVer;
            for (var col = 0; col < this._colShow; col++) {
              if (otherRangeY) {
                this.setItem(idx, false);
              } else {
                // xx 轴出现的位置
                var _x2 = this.itemStartPosX + col * (this.itemSize.width + this.spacing.x);
                // 是否不再X轴视图范围内
                if (_x2 - this.itemAnchor.x * this.itemSize.width > checkHor || _x2 + (1 - this.itemAnchor.x) * this.itemSize.width < offX) {
                  //隐藏
                  this.setItem(idx, false);
                } else {
                  //显示
                  this.setItem(idx, true, _x2, _y2);
                }
              }
              idx++;
              if (idx >= this._numItems) break;
            }
            if (idx >= this._numItems) break;
          }
        };
        _proto.update = function update(dt) {
          if (Math.abs(this.content.position.x - this._initCheckPos.x) < 10 && Math.abs(this.content.position.y - this._initCheckPos.y) < 10) return;
          this._initCheckPos.y = Math.floor(this.content.position.y);
          this._initCheckPos.x = Math.floor(this.content.position.x);
          this.onUpdateShow();
        };
        _proto.setItem = function setItem(index, isShow, x, y) {
          if (x === void 0) {
            x = 0;
          }
          if (y === void 0) {
            y = 0;
          }
          if (isShow) {
            var _node2 = this.runList[index];
            if (_node2) {
              var item = _node2.getComponent(ScrollListItem);
              if (item) {
                //没有全局，使用继承的item
                item.onItemRender(this._array[index]);
                item.index = index;
              }
              //设置有全局得刷新事件
              this.onItemRender && this.onItemRender(_node2, index);
            } else {
              _node2 = this.poolList.pop();
              if (!_node2) {
                _node2 = instantiate(this.itemPrefab);
              }
              var _item = _node2.getComponent(ScrollListItem);
              if (_item) {
                //没有全局，使用继承的item
                _item.onItemRender(this._array[index]);
                _item.index = index;
              }
              this.onItemRender && this.onItemRender(_node2, index);
              this.runList[index] = _node2;
            }
            _node2.parent = this.content;
            var pos = _node2.getPosition();
            pos.x = x;
            pos.y = y;
            if (this.onItemPosition) {
              var posTmp = this.onItemPosition(_node2, index, x, y);
              pos.x = posTmp.x;
              pos.y = posTmp.y;
            }
            _node2.setPosition(pos);
            //选中list操作
            var selSp = _node2.getComponent(ItemSelScript);
            if (selSp) {
              //有设置选中脚本的
              var ListSelSp = this.node.getComponent(ListSelScript);
              if (ListSelSp) {
                var isSel = ListSelSp.selIdxArr.indexOf(index) != -1;
                selSp.setSel(isSel);
              }
            }
          } else {
            var _node3 = this.runList[index];
            if (_node3) {
              _node3.removeFromParent();
              this.poolList.push(_node3);
            }
            this.runList[index] = null;
          }
        }

        /**滚动到指定下标*/;
        _proto.scrollToIndex = function scrollToIndex(index) {
          var scroll = this.node.getComponent(ScrollView);
          if (!scroll) return;
          scroll.stopAutoScroll();
          //太靠近结束点，需要回退屏幕显示数量
          var showNum = this._rowCount;
          var showNumH = this._colCount;
          if (scroll.horizontal) {
            showNum = this._colCount;
            showNumH = 1;
          }
          if (index > this._array.length - (showNum - 2) * showNumH) {
            index = this._array.length - (showNum - 2) * showNumH;
          }
          if (index < 0) {
            index = 0;
          }
          /**设置滚动坐标*/
          var pos = this.countPosByIndex(index);
          var posX = pos.x - 1 / 2 * this.itemSize.width;
          var posY = pos.y - 1 / 2 * this.itemSize.height;
          var ve = new Vec2(0, posY);
          if (scroll.horizontal) {
            ve = new Vec2(posX, 0);
            this._lastCheck.x = Math.max(index - 1, 0);
          } else {
            var laskY = Math.max(Math.floor(index / showNumH) - 1, 0);
            this._lastCheck.y = laskY; ///Math.max(index - 1, 0);
          }

          scroll.scrollToOffset(ve); //滚动
        }

        /**根据下标计算坐标。 0 ~ length-1*/;
        _proto.countPosByIndex = function countPosByIndex(index) {
          var x = 0;
          var y = 0;
          var scroll = this.node.getComponent(ScrollView);
          if (!scroll) return;
          if (scroll.horizontal) {
            x += index * this.itemSize.width;
            x += this.itemStartPosX;
            x += this.spacing.x * index;
            y = this.itemStartPosY;
          } else {
            var x_idx = index % this._colCount;
            x += this.itemStartPosX;
            x += (1 / 2 + x_idx) * this.itemSize.width;
            x += this.spacing.x * x_idx;
            var y_idx = Math.floor(index / this._colCount);
            y = (1 / 2 + y_idx) * this.itemSize.height;
            y += this.itemStartPosY;
            y += this.spacing.y * y_idx;
          }
          return {
            x: x,
            y: y
          };
        };
        _proto.getItem = function getItem(idx) {
          var showIdx = idx % this.runList.length;
          var item = this.runList[showIdx];
          return item;
        };
        _proto.updateItem = function updateItem(index, data) {
          this._array[index] = data;
          var item = this.getItem(index);
          if (item) {
            var itemSp = item.getComponent(ScrollListItem);
            itemSp.onItemRender(data);
            itemSp.index = index;
            this.onItemRender && this.onItemRender(item, index);
          }
        };
        _proto.updateAllItem = function updateAllItem(data) {
          this._array = data;
          for (var i = 0; i < data.length; i++) {
            this.updateItem(i, data[i]);
          }
        }

        /**选中list处理 */;
        _proto.selItem = function selItem(idx, sel) {
          var item = this.runList[idx];
          if (item) {
            var selSp = item.getComponent(ItemSelScript);
            if (selSp) {
              selSp.setSel(sel);
            }
          }
        };
        _createClass(VirtualList, [{
          key: "numItems",
          get: function get() {
            return this._numItems;
          },
          set: function set(v) {
            this._numItems = v;
            this.updateItems();
          }
        }, {
          key: "array",
          get: function get() {
            return this._array;
          },
          set: function set(arr) {
            this._array = arr;
            this._numItems = arr.length;
            this.updateItems();
          }
        }, {
          key: "contentTrs",
          get: function get() {
            return this.node.getComponent(ScrollView).content.getComponent(UITransform);
          }
        }, {
          key: "viewTrs",
          get: function get() {
            return this.node.getComponent(ScrollView).content.parent.getComponent(UITransform);
          }
        }]);
        return VirtualList;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "spacing", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return v2();
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "paddingTop", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "paddingLeft", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "itemPrefab", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/WebSock.ts", ['cc', './Prompt.ts', './proto.mjs_cjs=&original=.js', './proto.js'], function (exports) {
  var cclegacy, Prompt, _cjsExports;
  return {
    setters: [function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      Prompt = module.Prompt;
    }, null, function (module) {
      _cjsExports = module.default;
    }],
    execute: function () {
      cclegacy._RF.push({}, "9d096UR2jZFL5b8nJe8GOEB", "WebSock", undefined);
      /**
       * WebSocket 封装
       * 1. 连接/断开相关接口
       * 2. 网络异常回调
       * 3. 数据发送与接收
       */
      var WebSock = exports('WebSock', /*#__PURE__*/function () {
        function WebSock() {
          this._ws = null;
          /** 网络连接成功事件 */
          this.onConnected = null;
          /** 接受到网络数据事件 */
          this.onMessage = null;
          /** 网络错误事件 */
          this.onError = null;
          /** 网络断开事件 */
          this.onClosed = null;
          this._id = 0;
        }
        var _proto = WebSock.prototype;
        /** 请求连接 */
        _proto.connect = function connect(options) {
          var _this = this;
          if (this._ws) {
            if (this._ws.readyState === WebSocket.CONNECTING) {
              Prompt.popTip("网络连接中...请稍后...");
              return false;
            }
          }
          var url = null;
          if (options.url) {
            url = options.url;
          } else {
            var ip = options.ip;
            var port = options.port;
            var protocol = options.protocol;
            url = protocol + "://" + ip + ":" + port;
          }
          this._ws = new WebSocket(url);
          this._id++;
          this._ws.binaryType = options.binaryType ? options.binaryType : "arraybuffer";
          this._ws.onmessage = function (event) {
            var onMessage = _this.onMessage;
            onMessage(event.data);
          };
          this._ws.onopen = this.onConnected;
          this._ws.onerror = this.onError;
          this._ws.onclose = this.onClosed;
          return true;
        }
        /**
         * 通用消息打包方法
         * 消息格式：[2字节Header长度] + [Header数据] + [Body数据]
         */;
        _proto.packMessage = function packMessage(header, body) {
          try {
            var HeaderType = _cjsExports.m_proto.Header;
            var headerBuffer = HeaderType.encode(HeaderType.create(header)).finish();
            var bodyBuffer = this.pack(header.mod, header.cmd, body);
            var headerLen = headerBuffer.length;
            var bodyLen = bodyBuffer.byteLength;
            var buffer = new ArrayBuffer(2 + headerLen + bodyLen);
            var view = new Uint8Array(buffer);
            view[0] = headerLen >> 8 & 0xff;
            view[1] = headerLen & 0xff;
            //写入Header和Body数据
            view.set(headerBuffer, 2);
            view.set(bodyBuffer, 2 + headerLen);
            return buffer;
          } catch (error) {
            console.error("[WebSock] 消息打包失败:", error);
            throw error;
          }
        }
        /**
         * 发送数据
         * @param buffer 网络数据
         */;
        _proto.send = function send(mod, cmd, obj) {
          if (obj === undefined) return -1;
          if (this._ws && this._ws.readyState === WebSocket.OPEN) {
            var binaryData = this.packMessage({
              mod: mod,
              cmd: cmd
            }, obj);
            this._ws.send(binaryData);
            return 1;
          } else {
            console.warn("协议发送失败...send");
          }
          return -1;
        }

        /**
         * 网络断开
         * @param code      关闭码
         * @param reason    关闭原因
         */;
        _proto.close = function close(code, reason) {
          console.error("test WebSock close ");
          if (this._ws) {
            this._ws.close(code, reason);
          }
        }
        /**
         * 打包消息体（Protobuf编码）
         * @param mod 模块类型
         * @param cmd 命令类型
         * @param obj 消息数据
         * @returns
         */;
        _proto.pack = function pack(mod, cmd, obj) {
          var protoName = _cjsExports.m_proto.CmdType[cmd];
          var actualProtoName = protoName.startsWith("CMD_") ? protoName.substring(4) : protoName;
          var ProtoType = _cjsExports.m_proto[actualProtoName];
          var message = ProtoType.create(obj);
          return ProtoType.encode(message).finish();
        };
        return WebSock;
      }());
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/widgetDingYueToggle.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './MonitorType.ts', './cc-button.ts', './DBRecord.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Toggle, Node, CCInteger, Component, MonitorType, ButtonLock, DBRecord, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Toggle = module.Toggle;
      Node = module.Node;
      CCInteger = module.CCInteger;
      Component = module.Component;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      ButtonLock = module.ButtonLock;
    }, function (module) {
      DBRecord = module.default;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "b79e8X8oS1BnrMFqdKyOAmk", "widgetDingYueToggle", undefined);
      var ccclass = _decorator.ccclass,
        menu = _decorator.menu,
        property = _decorator.property;

      /**
       * 微信订阅开关部件,各界面订阅开关需要绑定
       */
      var widgetDingYueToggle = exports('widgetDingYueToggle', (_dec = ccclass("widgetDingYueToggle"), _dec2 = menu("Item/widgetDingYueToggle"), _dec3 = property(Toggle), _dec4 = property(Toggle), _dec5 = property(Node), _dec6 = property(CCInteger), _dec7 = ButtonLock(1), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(widgetDingYueToggle, _Component);
        function widgetDingYueToggle() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "toggleClose", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "toggleOpen", _descriptor2, _assertThisInitialized(_this));
          /**父节点 */
          _initializerDefineProperty(_this, "parentPanel", _descriptor3, _assertThisInitialized(_this));
          /**订阅id */
          _initializerDefineProperty(_this, "dingYueId", _descriptor4, _assertThisInitialized(_this));
          return _this;
        }
        var _proto = widgetDingYueToggle.prototype;
        // public _data: dbr.DingYue;
        _proto.onLoad = function onLoad() {
          var _this2 = this;
          if (!this.dingYueId) {
            return;
          }
          // this.toggleClose.node.on(Toggle.EventType.TOGGLE, (msg: Toggle) => {
          //     if (!msg.isChecked) return;
          //     this.onSwitch(false);
          // });
          this.toggleOpen.node.on(Toggle.EventType.TOGGLE, function (msg) {
            if (!msg.isChecked) return;
            _this2.onSwitch(true);
          });
          App.monitorMgr.addEventListener(MonitorType.ding_yue_info_update, this.updateDingYue, this);
          App.subscribeMgr.getDingYueState(function () {
            console.warn("widgetDingYueToggle.onLoad() DingYue");
            App.subscribeMgr.reqDingYueInfo();
          });
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
        };
        _proto.updateDingYue = function updateDingYue() {
          if (!this.dingYueId) {
            return;
          }
          if (App.subscribeMgr.isDingYueState && App.subscribeMgr.isDingYueOpen(this.dingYueId)) {
            this.parentPanel.active = false;
            return;
          }
          this.parentPanel.active = true;
          this.updateToggleState();
        };
        _proto.updateToggleState = function updateToggleState() {
          var isOpen = App.subscribeMgr.isDingYueOpen(this.dingYueId);
          this.toggleOpen.isChecked = isOpen;
          this.toggleClose.isChecked = !isOpen;
          console.warn("widgetDingYueToggle.updateToggleState() DingYue", this.dingYueId, isOpen);
        };
        _proto.
        /**
         * 开关订阅
         * @param open 是否打开
         */
        onSwitch = function onSwitch(open) {
          if (!this.dingYueId) {
            return;
          }
          var isOpen = App.subscribeMgr.isDingYueOpen(this.dingYueId);
          if (isOpen == open) {
            return;
          }
          if (open) {
            var cfg = DBRecord.fetchId("DingYue", this.dingYueId);
            var templateId = App.subscribeMgr.getDingYueTemplateId(cfg);
            console.warn("widgetDingYueToggle.onSwitch() DingYue, this.dingYueId, templateId:", this.dingYueId, templateId);
            if (!templateId) {
              return;
            }
            App.subscribeMgr.dingYue([templateId], function (isDingYue) {
              // if (isDingYue) {
              //     App.subscribeMgr.reqDingYueSwitch(this.dingYueId, open);
              // } else {
              //     this.updateToggleState();
              // }
            });
          }
          // else {
          //     App.subscribeMgr.reqDingYueSwitch(this._data.id, open);
          // }
        };

        return widgetDingYueToggle;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "toggleClose", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "toggleOpen", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "parentPanel", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "dingYueId", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return 0;
        }
      }), _applyDecoratedDescriptor(_class2.prototype, "onSwitch", [_dec7], Object.getOwnPropertyDescriptor(_class2.prototype, "onSwitch"), _class2.prototype)), _class2)) || _class) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ZhiHuiBu.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './BuildingBase.ts', './PlaceGameMgr.ts', './App.ts', './PlaceGameEnum.ts', './ZhiHuiBuModel.ts', './MonitorType.ts', './EventType.ts', './PlaceConfigMgr.ts', './Utils.ts', './MovingSoldierNPC.ts', './ActionFramesItem.ts', './ModuleDef.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _createClass, cclegacy, _decorator, Node, ProgressBar, Label, Prefab, Vec3, BuildingBase, PlaceGameMgr, App, SoldierType, BuildingStatus, BuildingType, ZhiHuiBuModel, MonitorType, EventType, PlaceConfigMgr, Utils, MovingSoldierNPC, ActionFramesItem, ModuleDef;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
      _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
      _createClass = module.createClass;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Node = module.Node;
      ProgressBar = module.ProgressBar;
      Label = module.Label;
      Prefab = module.Prefab;
      Vec3 = module.Vec3;
    }, function (module) {
      BuildingBase = module.BuildingBase;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }, function (module) {
      App = module.App;
    }, function (module) {
      SoldierType = module.SoldierType;
      BuildingStatus = module.BuildingStatus;
      BuildingType = module.BuildingType;
    }, function (module) {
      ZhiHuiBuModel = module.ZhiHuiBuModel;
    }, function (module) {
      MonitorType = module.MonitorType;
    }, function (module) {
      EventType = module.EventType;
    }, function (module) {
      PlaceConfigMgr = module.PlaceConfigMgr;
    }, function (module) {
      Utils = module.Utils;
    }, function (module) {
      MovingSoldierNPC = module.MovingSoldierNPC;
    }, function (module) {
      ActionFramesItem = module.ActionFramesItem;
    }, function (module) {
      ModuleDef = module.default;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
      cclegacy._RF.push({}, "27577g59fxOJYYsEOTBa+ec", "ZhiHuiBu", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var ZhiHuiBu = exports('ZhiHuiBu', (_dec = ccclass("ZhiHuiBu"), _dec2 = property(Node), _dec3 = property(Node), _dec4 = property({
        type: ProgressBar,
        displayName: "升级进度条",
        tooltip: "升级进度条"
      }), _dec5 = property({
        type: Label,
        displayName: "升级时间",
        tooltip: "升级时间"
      }), _dec6 = property({
        type: Node,
        displayName: "任务节点",
        tooltip: "有任务时显示任务节点"
      }), _dec7 = property({
        type: ProgressBar,
        displayName: "步兵服役进度条",
        tooltip: "步兵服役进度"
      }), _dec8 = property({
        type: Label,
        displayName: "步兵文本数量",
        tooltip: "步兵文本数量"
      }), _dec9 = property({
        type: ProgressBar,
        displayName: "弓兵服役进度条",
        tooltip: "弓兵服役进度条"
      }), _dec10 = property({
        type: Label,
        displayName: "弓兵文本数量",
        tooltip: "弓兵文本数量"
      }), _dec11 = property({
        type: ProgressBar,
        displayName: "弓兵服役进度条",
        tooltip: "弓兵服役进度条"
      }), _dec12 = property({
        type: Label,
        displayName: "骑兵文本数量",
        tooltip: "骑兵文本数量"
      }), _dec13 = property({
        type: Label,
        displayName: "任务倒计时时间",
        tooltip: "任务倒计时时间"
      }), _dec14 = property({
        type: Node,
        displayName: "出门路线",
        tooltip: "NPC离开步兵营到指挥部路线规划"
      }), _dec15 = property({
        type: Prefab,
        displayName: "任务模型预制体",
        tooltip: "领取任务时显示的移动模型"
      }), _dec16 = property({
        type: Node,
        displayName: "可升级图标",
        tooltip: "显示是否可升级的图标"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_BuildingBase) {
        _inheritsLoose(ZhiHuiBu, _BuildingBase);
        function ZhiHuiBu() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _BuildingBase.call.apply(_BuildingBase, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lockNode", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "unLockNode", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "upgradeProgressBar", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "timeLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "taskNode", _descriptor5, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buBingProgress", _descriptor6, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "bubingNum", _descriptor7, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "gongbingProgress", _descriptor8, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "gongbingNum", _descriptor9, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "qiBingProgress", _descriptor10, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "qiBingNum", _descriptor11, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "taskTimeLab", _descriptor12, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "outLine", _descriptor13, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "taskModelPrefab", _descriptor14, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lvUpImg", _descriptor15, _assertThisInitialized(_this));
          /**
           * 移动速度
           */
          _this.moveSpeed = 100;
          /**
           * 当前移动中的任务模型列表
           */
          _this._movingTaskModels = [];
          /**
           * 出门路线朝向映射表
           */
          _this._outFaceMap = new Map([[1, 2], [2, 2], [3, 2]]);
          /**
           * 指挥部数据模型
           */
          _this._dataModel = null;
          /**
           * 升级定时器
           */
          _this._upgradeTimer = null;
          /**
           * 任务倒计时定时器
           */
          _this._taskTimer = null;
          /**
           * 任务剩余时间（秒）
           */
          _this._taskRemainTime = 0;
          /**
           * 任务结束时间戳（毫秒）
           */
          _this._taskEndTime = 0;
          _this.poolName = "MovingSoldierNPC_ZHB";
          return _this;
        }
        var _proto = ZhiHuiBu.prototype;
        /**
         * 组件激活时调用
         */
        _proto.onLoad = function onLoad() {
          this.init();
          this.addEventListener();

          // 初始化对象池
          if (this.taskModelPrefab) {
            App.nodePoolMgr.createPool(this.poolName, this.taskModelPrefab, {
              preloadCount: 10,
              maxSize: 50,
              autoExpand: true
            });
          }
        };
        _proto.addEventListener = function addEventListener() {
          App.monitorMgr.addEventListener(MonitorType.CMD_ResUpgradeBuilding, this.resUpgradeBuilding, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResBuildingUpgradeFinish, this.resBuildingUpgradeFinish, this);
          App.monitorMgr.addEventListener(EventType.BuildingUpdated, this.onBuildingUpdated, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResDiamondUpgrade, this.resDiamondUpgrade, this);
          App.monitorMgr.addEventListener(MonitorType.CMD_ResAcceptTask, this.resAcceptTask, this);
          App.monitorMgr.addEventListener(EventType.bag_update_list, this.updateLevUpImg, this);
        };
        _proto.onDestroy = function onDestroy() {
          App.monitorMgr.offTarget(this);
          this.stopUpgradeTimer();
          this.stopTaskTimer();
          this.stopMovingTaskModels();
          this.unscheduleAllCallbacks();
        }

        /**
         * 停止所有移动中的任务模型
         */;
        _proto.stopMovingTaskModels = function stopMovingTaskModels() {
          for (var _iterator = _createForOfIteratorHelperLoose(this._movingTaskModels), _step; !(_step = _iterator()).done;) {
            var taskModel = _step.value;
            if (taskModel) {
              var movingNPC = taskModel.getComponent(MovingSoldierNPC);
              if (movingNPC) {
                movingNPC.stopAndDestroy(this.poolName);
              } else {
                taskModel.destroy();
              }
            }
          }
          this._movingTaskModels = [];
        }

        /**
         * 升级协议监听
         */;
        _proto.resUpgradeBuilding = function resUpgradeBuilding(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) return;
          this.updateView();
        }

        /**
         * 协议升级完成监听
         */;
        _proto.resBuildingUpgradeFinish = function resBuildingUpgradeFinish(msg) {
          if (msg.building_uid !== this._dataModel.buildingUid) return;
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 钻石升级监听
         */;
        _proto.resDiamondUpgrade = function resDiamondUpgrade(msg) {
          if (msg.code !== 200) {
            return;
          }
          if (msg.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.stopUpgradeTimer();
          this.onLevelChanged();
          this.updateView();
        }

        /**
         * 创建任务模型并开始沿路径移动
         */;
        _proto.createTaskModels = function createTaskModels(soldiers) {
          var _this2 = this;
          var pathPoints = this.getPathPoints(this.outLine);
          if (pathPoints.length === 0) {
            App.log.logError("路径为空");
            return;
          }
          if (!soldiers || soldiers.length === 0) {
            App.log.logError("士兵数组为空");
            return;
          }
          var _loop = function _loop() {
            var soldierItem = soldiers[i];
            var soldierType = soldierItem.itemid;
            var count = soldierItem.num;
            var batchDelay = i * 1.0;
            var _loop2 = function _loop2(j) {
              var delay = batchDelay + j * 0.7;
              _this2.scheduleOnce(function () {
                _this2.createSingleTaskModel(soldierType, j);
              }, delay);
            };
            for (var j = 0; j < count; j++) {
              _loop2(j);
            }
          };
          for (var i = 0; i < soldiers.length; i++) {
            _loop();
          }
        }

        /**
         * 创建单个任务模型
         * @param soldierType 士兵类型
         * @param npcLayer NPC容器节点
         * @param pathPoints 路径点数组
         */;
        _proto.createSingleTaskModel = function createSingleTaskModel(soldierType, index) {
          if (!this.taskModelPrefab) {
            return;
          }

          // 使用对象池获取任务模型节点
          var taskModel = App.nodePoolMgr.getNode(this.poolName);
          if (!taskModel) {
            return;
          }
          var startPos = this.outLine.children[0].worldPosition.clone();
          var npcLayer = PlaceGameMgr.inst.getRoleLayer();
          if (!npcLayer) {
            App.log.logError("获取不到NPC容器");
            taskModel.destroy();
            return;
          }
          var localStartPos = npcLayer.inverseTransformPoint(new Vec3(), startPos);
          taskModel.setPosition(localStartPos);
          npcLayer.addChild(taskModel);
          var movingNPC = taskModel.getComponent(MovingSoldierNPC);
          if (!movingNPC) {
            App.nodePoolMgr.putNode(this.poolName, taskModel);
            return;
          }
          var actionFrames = taskModel.getChildByName("ActionFramesItem").getComponent(ActionFramesItem);
          if (!actionFrames) {
            App.nodePoolMgr.putNode(this.poolName, taskModel);
            return;
          }
          var resourceName = "daodunbing";
          switch (soldierType) {
            case SoldierType.BuBing:
              resourceName = "daodunbing";
              break;
            case SoldierType.GongBing:
              resourceName = "gongjianbing";
              break;
            case SoldierType.QiBing:
              resourceName = "qingqibing";
              break;
          }
          actionFrames.playWithResource(ModuleDef.SOLDIER, resourceName, "Move");
          var pathPoints = this.getPathPoints(this.outLine);
          if (pathPoints.length === 0) {
            // 放回对象池而不是销毁
            App.nodePoolMgr.putNode(this.poolName, taskModel);
            return;
          }
          var localPathPoints = [];
          for (var _iterator2 = _createForOfIteratorHelperLoose(pathPoints), _step2; !(_step2 = _iterator2()).done;) {
            var worldPos = _step2.value;
            var localPos = npcLayer.inverseTransformPoint(new Vec3(), worldPos);
            localPathPoints.push(localPos);
          }
          var faceDirection = this._outFaceMap.get(1) || 1;
          movingNPC.setFaceDirection(faceDirection);
          var resourceConfig = {
            module: ModuleDef.SOLDIER,
            name: resourceName,
            action: "Move"
          };
          movingNPC.startMoveAlongPath(localPathPoints, this.onTaskModelArrived.bind(this), index, this._outFaceMap, resourceConfig);
          this._movingTaskModels.push(movingNPC);
        }

        /**
         * 从路径节点中获取路径点数组
         * @param pathNode 路径节点，包含多个point子节点
         * @returns 路径点数组（世界坐标）
         */;
        _proto.getPathPoints = function getPathPoints(pathNode) {
          var pathPoints = [];
          if (!pathNode) {
            return pathPoints;
          }
          var pointNodes = pathNode.children.sort(function (a, b) {
            var aNum = parseInt(a.name.replace("point", "")) || 0;
            var bNum = parseInt(b.name.replace("point", "")) || 0;
            return aNum - bNum;
          });
          for (var _iterator3 = _createForOfIteratorHelperLoose(pointNodes), _step3; !(_step3 = _iterator3()).done;) {
            var pointNode = _step3.value;
            var worldPos = pointNode.worldPosition.clone();
            pathPoints.push(worldPos);
          }
          return pathPoints;
        }

        /**
         * 任务模型到达目的地回调
         * @param modelId 模型ID
         * @param model 模型组件
         */;
        _proto.onTaskModelArrived = function onTaskModelArrived(modelId, model) {
          console.log("\u6307\u6325\u90E8\u4EFB\u52A1\u6A21\u578B " + modelId + " \u5230\u8FBE\u76EE\u7684\u5730");
          var index = this._movingTaskModels.findIndex(function (npc) {
            return npc === model;
          });
          if (index !== -1) {
            var taskModel = this._movingTaskModels[index];
            this._movingTaskModels.splice(index, 1);
            taskModel.stopAndDestroy(this.poolName);
          }
        }

        /**
         * 接受任务响应处理
         */;
        _proto.resAcceptTask = function resAcceptTask(msg) {
          if (msg.code !== 200) {
            return;
          }
          this.createTaskModels(msg.soldiers);
        }

        /**
         * 启动升级倒计时
         */;
        _proto.startUpgradeTimer = function startUpgradeTimer() {
          var _this3 = this;
          if (!this._dataModel.isUpgrading) {
            this.upgradeProgressBar.node.active = false;
            return;
          }
          var nextLevel = this._dataModel.level + 1;
          if (nextLevel > PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.buildType)) {
            App.log.logError("指挥部已经达到最高级");
            return;
          }
          this.stopUpgradeTimer();
          var remainTime = this.dataModel.serverData.upgrade_duration / 1000 || 0;
          var totalTime = PlaceConfigMgr.inst.getBuildingUpgradeTime(this.dataModel.buildType, this.dataModel.level + 1);
          this._dataModel.startBuildingUpgrade(remainTime, totalTime);
          this.upgradeProgressBar.node.active = true;
          this.onUpgradeTimerUpdate();
          this._upgradeTimer = setInterval(function () {
            _this3.onUpgradeTimerUpdate();
          }, 1000);
        };
        _proto.stopUpgradeTimer = function stopUpgradeTimer() {
          this._dataModel.completeBuilding();
          if (this.upgradeProgressBar.node) {
            this.upgradeProgressBar.node.active = false;
          }
          if (this._upgradeTimer) {
            clearInterval(this._upgradeTimer);
            this._upgradeTimer = null;
          }
        }

        /**
         * 升级计时器更新回调
         */;
        _proto.onUpgradeTimerUpdate = function onUpgradeTimerUpdate() {
          if (!this.node.isValid) return;
          if (this._dataModel.getRemainBuildTime() > 0) {
            this._dataModel.decreaseBuildTime(1);
            if (this.upgradeProgressBar) {
              this.upgradeProgressBar.progress = this._dataModel.getBuildProgress();
            }
            this.timeLab.string = Utils.timeFormat(this._dataModel.getRemainBuildTime());
          } else {
            this.stopUpgradeTimer();
            this.updateView();
          }
        }

        /**
         * 更新视图显示
         */;
        _proto.updateView = function updateView() {
          if (!this._dataModel) return;
          if (this.dataModel.status === BuildingStatus.LOCK || this.dataModel.status === BuildingStatus.BUILDING) {
            this.lockNode.active = true;
            this.unLockNode.active = false;
            return;
          } else {
            this.lockNode.active = false;
            this.unLockNode.active = true;
          }
          this.updateBuildImg();
          this.updateServiceNums();
          this.updateTaskNode();
          this.updateLevUpImg();
          if (this.dataModel.isUpgrading) {
            this.startUpgradeTimer();
          } else {
            this.upgradeProgressBar.node.active = false;
          }
        };
        _proto.updateTaskNode = function updateTaskNode() {
          if (!this.taskNode) return;
          var newTaskNode = this.taskNode.getChildByName("newTask");
          var inTaskNode = this.taskNode.getChildByName("inTask");
          var endTaskNode = this.taskNode.getChildByName("endTask");
          var tasks = this.dataModel.serverData.tasks;
          var hasInProgressTask = tasks.some(function (task) {
            return task.state === 1;
          });
          var hasCompletedTask = tasks.some(function (task) {
            return task.state === 2;
          });
          newTaskNode.active = !hasInProgressTask && !hasCompletedTask;
          inTaskNode.active = hasInProgressTask;
          endTaskNode.active = hasCompletedTask;
          if (hasInProgressTask) {
            var inProgressTask = tasks.find(function (task) {
              return task.state === 1;
            });
            if (inProgressTask && this.taskTimeLab) {
              this.startTaskTimer(inProgressTask);
            }
          } else {
            this.stopTaskTimer();
          }
        }

        /**
         * 更新士兵服役信息显示
         */;
        _proto.updateServiceNums = function updateServiceNums() {
          var _maxSoldiersCfg$, _maxSoldiersCfg$2, _maxSoldiersCfg$3;
          if (!this._dataModel || !this._dataModel.serverData) return;
          var maxSoldiersCfg = PlaceConfigMgr.inst.getZhiHuiBuSoldierMax(this._dataModel.level);
          var services = this._dataModel.serverData.services || [];
          this.updateSoldierDisplay(1, this.buBingProgress, this.bubingNum, ((_maxSoldiersCfg$ = maxSoldiersCfg[0]) == null ? void 0 : _maxSoldiersCfg$[1]) || 0, services);
          this.updateSoldierDisplay(2, this.gongbingProgress, this.gongbingNum, ((_maxSoldiersCfg$2 = maxSoldiersCfg[1]) == null ? void 0 : _maxSoldiersCfg$2[1]) || 0, services);
          this.updateSoldierDisplay(3, this.qiBingProgress, this.qiBingNum, ((_maxSoldiersCfg$3 = maxSoldiersCfg[2]) == null ? void 0 : _maxSoldiersCfg$3[1]) || 0, services);
        };
        _proto.updateSoldierDisplay = function updateSoldierDisplay(soldierType, progressBar, label, maxSoldiers, services) {
          if (!progressBar || !label) return;
          var service = services.find(function (s) {
            return s.soldiertype === soldierType;
          });
          var currentCount = service ? service.count || 0 : 0;
          if (maxSoldiers > 0) {
            progressBar.progress = currentCount / maxSoldiers;
          } else {
            progressBar.progress = 0;
          }
          label.string = currentCount + "/" + maxSoldiers;
        }

        /**
         * 启动任务倒计时定时器
         * @param task 进行中的任务数据
         */;
        _proto.startTaskTimer = function startTaskTimer(task) {
          var _this4 = this;
          if (this._taskTimer) {
            return;
          }
          if (!this.taskTimeLab) {
            return;
          }
          this._taskEndTime = task.task_duration || 0;
          this.initTaskCountdown();
          this._taskTimer = setInterval(function () {
            _this4.onTaskTimerUpdate();
          }, 1000);
        }

        /**
         * 停止任务倒计时定时器
         */;
        _proto.stopTaskTimer = function stopTaskTimer() {
          if (this._taskTimer) {
            clearInterval(this._taskTimer);
            this._taskTimer = null;
          }
          this._taskRemainTime = 0;
          this._taskEndTime = 0;
        }

        /**
         * 从结束时间戳初始化倒计时
         */;
        _proto.initTaskCountdown = function initTaskCountdown() {
          if (!this.taskTimeLab) {
            return;
          }
          var currentTime = App.loginMgr.getServerTimeExact();
          this._taskRemainTime = Math.max(0, Math.floor((this._taskEndTime - currentTime) / 1000));
          this.taskTimeLab.string = Utils.timeFormat(this._taskRemainTime);
        }

        /**
         * 任务倒计时更新回调
         */;
        _proto.onTaskTimerUpdate = function onTaskTimerUpdate() {
          if (this._taskRemainTime > 0) {
            this._taskRemainTime--;
            if (this.taskTimeLab) {
              this.taskTimeLab.string = Utils.timeFormat(this._taskRemainTime);
            }
          } else {
            this.stopTaskTimer();
            this.updateView();
          }
        }

        /**
         * 当建筑数据更新时调用
         */;
        _proto.onBuildingUpdated = function onBuildingUpdated(data) {
          if (data.building_uid !== this._dataModel.buildingUid) {
            return;
          }
          this.updateView();
        }

        /**
         * 建筑点击后的处理逻辑
         */;
        _proto.onBuildingClick = function onBuildingClick() {
          App.log.logBusiness("\u6307\u6325\u90E8\u88AB\u70B9\u51FB - \u5E8F\u5217\u53F7: " + this.buildIndex);
          if (this.dataModel.status === BuildingStatus.LOCK) {
            PlaceGameMgr.inst.showUnLockView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.status === BuildingStatus.BUILDING) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else if (this.dataModel.isUpgrading) {
            PlaceGameMgr.inst.showSpeedUpView(this.dataModel.buildType, this.dataModel.buildIndex);
          } else {
            PlaceGameMgr.inst.showSheBeiUpgradeView(this.dataModel.buildingUid, BuildingType.ZhiHuiBu, this.dataModel.buildIndex);
          }
        }

        /**
         * 任务点击
         */;
        _proto.onBtnTaskClick = function onBtnTaskClick() {
          var tasks = this.dataModel.serverData.tasks;
          var hasCompletedTask = tasks.some(function (task) {
            return task.state === 2;
          });
          if (hasCompletedTask) {
            PlaceGameMgr.inst.showTaskRewwardView(tasks);
          } else {
            PlaceGameMgr.inst.showTaskView(tasks);
          }
        }

        /**
         * 更新可升级图片显示
         */;
        _proto.updateLevUpImg = function updateLevUpImg() {
          if (!this.lvUpImg || !this._dataModel) return;
          var curLevel = this._dataModel.level;
          var targetLevel = curLevel + 1;
          var maxLevel = PlaceConfigMgr.inst.getMaxLevelByType(this._dataModel.getBuildType());
          if (curLevel >= maxLevel) {
            targetLevel = maxLevel;
          } else {
            targetLevel = curLevel + 1;
          }
          var flag = PlaceGameMgr.inst.checkBuildCondition(this._dataModel.getBuildType(), targetLevel);
          this.lvUpImg.active = flag;
        }

        //======================子类虚函数=====================================
        /**
         * 初始化数据模型
         */;
        _proto.initDataModel = function initDataModel(data) {
          App.log.logBusiness("\u6307\u6325\u90E8: \u521D\u59CB\u5316\u6570\u636E\u6A21\u578B - \u5E8F\u5217\u53F7: " + this.buildIndex);
          var buildingUid = data ? data.building_uid || 0 : 0;
          var buildingType = BuildingType.ZhiHuiBu;
          var buildingIndex = this.buildIndex;
          var buildingLevel = data ? data.building_level || 0 : 0;
          this._dataModel = new ZhiHuiBuModel(buildingUid, buildingType, buildingIndex, buildingLevel, this);
          this._dataModel.position = this.node.getPosition();
          this.updateDataModel(data);
          this.updateView();
        }

        /**
         * 更新数据模型
         * @param data 服务器返回的建筑数据
         */;
        _proto.updateDataModel = function updateDataModel(data) {
          if (!data) {
            this._dataModel.status = BuildingStatus.LOCK;
            return;
          }
          var oldLevel = this._dataModel.level;
          this._dataModel.setServerData(data);
          if (data.building_level !== oldLevel) {
            this._dataModel.level = data.building_level;
          }

          // 判断建筑状态
          if (data.building_level <= 0 && data.upgrade_duration > 0) {
            this._dataModel.status = BuildingStatus.BUILDING;
            this._dataModel.isUpgrading = false;
          } else if (data.building_level > 0 && data.upgrade_duration > 0) {
            this._dataModel.isUpgrading = true;
            this._dataModel.status = BuildingStatus.WORKING;
          } else if (data.building_level > 0) {
            this._dataModel.isUpgrading = false;
            var inProgressTaskCount = this._dataModel.getInProgressTaskCount();
            this._dataModel.status = inProgressTaskCount > 0 ? BuildingStatus.WORKING : BuildingStatus.IDLE;
          } else {
            this._dataModel.status = BuildingStatus.LOCK;
            this.dataModel.isUpgrading = false;
            this.dataModel.completeBuilding();
          }
        }

        /**
         * 等级改变时的回调
         */;
        _proto.onLevelChanged = function onLevelChanged() {
          this.playUpLevelAni();
        };
        _proto.playUpLevelAni = function playUpLevelAni() {
          App.log.logBusiness("\u6307\u6325\u90E8\u5347\u7EA7\u5B8C\u6210 - \u65B0\u7B49\u7EA7: " + this._dataModel.level);
          // TODO: 播放升级动画
        }
        //======================子类虚函数=====================================
        ;

        _createClass(ZhiHuiBu, [{
          key: "dataModel",
          get:
          /**
           * 获取数据模型
           */
          function get() {
            return this._dataModel;
          }
        }]);
        return ZhiHuiBu;
      }(BuildingBase), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lockNode", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "unLockNode", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "upgradeProgressBar", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "timeLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "taskNode", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "buBingProgress", [_dec7], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "bubingNum", [_dec8], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "gongbingProgress", [_dec9], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "gongbingNum", [_dec10], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "qiBingProgress", [_dec11], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "qiBingNum", [_dec12], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "taskTimeLab", [_dec13], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "outLine", [_dec14], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "taskModelPrefab", [_dec15], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "lvUpImg", [_dec16], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ZhiHuiBuModel.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './App.ts', './BuildingModel.ts'], function (exports) {
  var _inheritsLoose, cclegacy, App, BuildingModel;
  return {
    setters: [function (module) {
      _inheritsLoose = module.inheritsLoose;
    }, function (module) {
      cclegacy = module.cclegacy;
    }, function (module) {
      App = module.App;
    }, function (module) {
      BuildingModel = module.BuildingModel;
    }],
    execute: function () {
      cclegacy._RF.push({}, "a432fa/HlRP7q59CrXUhuyC", "ZhiHuiBuModel", undefined);
      /**
       * 任务执行状态
       */
      var TaskStatus = exports('TaskStatus', /*#__PURE__*/function (TaskStatus) {
        TaskStatus[TaskStatus["NOT_STARTED"] = 0] = "NOT_STARTED";
        TaskStatus[TaskStatus["IN_PROGRESS"] = 1] = "IN_PROGRESS";
        TaskStatus[TaskStatus["COMPLETED"] = 2] = "COMPLETED";
        TaskStatus[TaskStatus["REWARDED"] = 3] = "REWARDED";
        return TaskStatus;
      }({}));

      /**
       * 任务执行数据
       */

      /**
       * 指挥部数据模型
       */
      var ZhiHuiBuModel = exports('ZhiHuiBuModel', /*#__PURE__*/function (_BuildingModel) {
        _inheritsLoose(ZhiHuiBuModel, _BuildingModel);
        /**
         * 构造函数
         */
        function ZhiHuiBuModel(buildingUid, buildType, buildIndex, level, owner) {
          var _this;
          if (level === void 0) {
            level = 0;
          }
          _this = _BuildingModel.call(this, buildIndex, buildType, buildingUid, level, owner) || this;
          /**
           * 剩余建造时间（毫秒）
           */
          _this._remainingBuildTime = 0;
          /**
           * 总建造时间（毫秒）
           */
          _this._totalBuildTime = 0;
          /**
           * 当前执行的任务列表
           */
          _this._currentTasks = [];
          return _this;
        }
        var _proto = ZhiHuiBuModel.prototype;
        _proto.getRemainBuildTime = function getRemainBuildTime() {
          return this._remainingBuildTime;
        };
        _proto.getToTalBuildTime = function getToTalBuildTime() {
          return this._totalBuildTime;
        }

        /**
         * 开始建造升级
         * @param buildTime 剩余建造时间（毫秒）
         * @param totalTime 总建造时间（毫秒）
         */;
        _proto.startBuildingUpgrade = function startBuildingUpgrade(buildTime, totalTime) {
          this._remainingBuildTime = buildTime;
          this._totalBuildTime = totalTime;
          App.log.logBusiness("\u6307\u6325\u90E8\u5F00\u59CB\u5347\u7EA7\u5EFA\u9020 - \u8017\u65F6: " + buildTime + "\u79D2 totalTime: " + totalTime);
        }

        /**
         * 减少剩余建造时间
         * @param milliseconds 减少的毫秒数
         * @returns 剩余建造时间
         */;
        _proto.decreaseBuildTime = function decreaseBuildTime(milliseconds) {
          this._remainingBuildTime = Math.max(0, this._remainingBuildTime - milliseconds);
          return this._remainingBuildTime;
        }

        /**
         * 获取建造进度
         * @returns 进度值 (0-1)
         */;
        _proto.getBuildProgress = function getBuildProgress() {
          if (this._totalBuildTime <= 0) return 0;
          return Math.max(0, (this._totalBuildTime - this._remainingBuildTime) / this._totalBuildTime);
        }

        /**
         * 完成建造
         */;
        _proto.completeBuilding = function completeBuilding() {
          this._remainingBuildTime = 0;
          this._totalBuildTime = 0;
        }

        /**
         * 添加任务执行数据
         * @param taskData 任务数据
         */;
        _proto.addTask = function addTask(taskData) {
          this._currentTasks.push(taskData);
          App.log.logBusiness("\u6307\u6325\u90E8\u6DFB\u52A0\u4EFB\u52A1 - \u4EFB\u52A1ID: " + taskData.taskId + ", \u5E93ID: " + taskData.taskKuId);
        }

        /**
         * 更新任务状态
         * @param taskId 任务执行ID
         * @param status 新状态
         */;
        _proto.updateTaskStatus = function updateTaskStatus(taskId, status) {
          var task = this._currentTasks.find(function (t) {
            return t.taskId === taskId;
          });
          if (task) {
            task.status = status;
            App.log.logBusiness("\u6307\u6325\u90E8\u66F4\u65B0\u4EFB\u52A1\u72B6\u6001 - \u4EFB\u52A1ID: " + taskId + ", \u72B6\u6001: " + status);
          }
        }

        /**
         * 移除任务
         * @param taskId 任务执行ID
         */;
        _proto.removeTask = function removeTask(taskId) {
          var index = this._currentTasks.findIndex(function (t) {
            return t.taskId === taskId;
          });
          if (index >= 0) {
            this._currentTasks.splice(index, 1);
            App.log.logBusiness("\u6307\u6325\u90E8\u79FB\u9664\u4EFB\u52A1 - \u4EFB\u52A1ID: " + taskId);
          }
        }

        /**
         * 获取当前任务列表
         */;
        _proto.getCurrentTasks = function getCurrentTasks() {
          return [].concat(this._currentTasks);
        }

        /**
         * 更新任务进度（检查是否有任务完成）
         */;
        _proto.updateTasksProgress = function updateTasksProgress() {
          var now = Date.now();
          this._currentTasks.forEach(function (task) {
            if (task.status === TaskStatus.IN_PROGRESS && now >= task.endTime) {
              task.status = TaskStatus.COMPLETED;
              App.log.logBusiness("\u4EFB\u52A1\u5B8C\u6210 - \u4EFB\u52A1ID: " + task.taskId);
            }
          });
        }

        /**
         * 获取正在进行中的任务数量
         */;
        _proto.getInProgressTaskCount = function getInProgressTaskCount() {
          return this._currentTasks.filter(function (t) {
            return t.status === TaskStatus.IN_PROGRESS;
          }).length;
        }

        /**
         * 获取已完成待领取的任务数量
         */;
        _proto.getCompletedTaskCount = function getCompletedTaskCount() {
          return this._currentTasks.filter(function (t) {
            return t.status === TaskStatus.COMPLETED;
          }).length;
        };
        return ZhiHuiBuModel;
      }(BuildingModel));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ZipHotUpdateView.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './HotUpdateConfig.ts', './GlobalData.ts', './GameDef.ts', './App.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Asset, ProgressBar, director, sys, native, game, Component, HotUpdateEvent, HotUpdateState, HotUpdateConfig, GlobalData, GameDef, GamePlatform_Enum, App;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Asset = module.Asset;
      ProgressBar = module.ProgressBar;
      director = module.director;
      sys = module.sys;
      native = module.native;
      game = module.game;
      Component = module.Component;
    }, function (module) {
      HotUpdateEvent = module.HotUpdateEvent;
      HotUpdateState = module.HotUpdateState;
      HotUpdateConfig = module.default;
    }, function (module) {
      GlobalData = module.default;
    }, function (module) {
      GameDef = module.default;
      GamePlatform_Enum = module.GamePlatform_Enum;
    }, function (module) {
      App = module.App;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
      cclegacy._RF.push({}, "e7d41WjAqNAyr8IxGK9FV4F", "ZipHotUpdateView", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;
      var SERVER_URL = " ";
      var ZipHotUpdateView = exports('default', (_dec = ccclass("ZipHotUpdateView"), _dec2 = property(Label), _dec3 = property({
        type: Asset
      }), _dec4 = property(Label), _dec5 = property({
        type: ProgressBar
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
        _inheritsLoose(ZipHotUpdateView, _Component);
        function ZipHotUpdateView() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _Component.call.apply(_Component, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "lblHint", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "manifestUrl", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "lblVer", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "pb", _descriptor4, _assertThisInitialized(_this));
          _this.curDownloadPer = 0;
          _this.downloadSpeed = 1;
          return _this;
        }
        var _proto = ZipHotUpdateView.prototype;
        _proto.onLoad = function onLoad() {
          this.node.active = false;
          switch (GameDef.platId //TODO 后续改配置表。 原生才有。
          ) {
            case GamePlatform_Enum.YONGYE_tt_andoird:
              SERVER_URL = "https://dhboss.jvplay.cn/release/yongye/android/";
              GlobalData.mainVersion = "1.6";
              break;
            case GamePlatform_Enum.TANXIAN_tt_android:
              SERVER_URL = "https://dhboss.jvplay.cn/release/tanxian/android/002_ttnative_wjtxd/";
              GlobalData.mainVersion = "2.0";
              break;
            case GamePlatform_Enum.Mother_bag_android:
              SERVER_URL = "https://dhboss.jvplay.cn/release/tanxian/android/003_qdmb_wjtxd/";
              GlobalData.mainVersion = "3.1";
              break;
            default:
              //其他的。默认 勇者传说
              SERVER_URL = "https://dhboss.jvplay.cn/release/yongye/android/";
              break;
          }
          console.log("热更新目录。platId，=", GameDef.platId, "+" + SERVER_URL);
          this.initVersion(); //获取本地存储的版本。

          console.log("我在这里。。。。。。。。。。ZipHotUpdateView");
        }

        /**
         * @desc 请求url连接
         * @param url url连接
         * @param data 数据，一个表
         * @param method GET POST
         * @param callback 回调函数
         */;
        _proto.requestHttpByUrl = function requestHttpByUrl(url, data, method, callback) {
          var _this2 = this;
          var xhr = new XMLHttpRequest();
          if (method === undefined) {
            method = "GET";
          }
          xhr.onreadystatechange = function () {
            if (xhr.readyState === 4) {
              // console.log("receive data from requestHttpByUrl：" + xhr.status + ", :" + xhr.responseText)
              if (xhr.status >= 200 && xhr.status <= 207) {
                var response = xhr.responseText;
                // console.log("requestHttpByUrl:receive data from requestHttpByUrl", response)
                console.log("response:" + response);
                App.log.logBusiness("requestHttpByUrl:receive data from requestHttpByUrl", "请求", url, xhr);
                if (response !== null && response.length > 0) {
                  if (callback) {
                    callback.call(_this2, response, true, xhr.status);
                  }
                } else {
                  if (callback) {
                    callback.call(_this2, null, false, xhr.status);
                  }
                  console.log("requestHttpByUrl:返回数据不存在, url:" + url);
                }
              } else {
                if (xhr.status === 500) {
                  console.log("requestHttpByUrl:服务器报错了500:" + xhr.responseText);
                } else {
                  console.log("requestHttpByUrl:其他错误:" + xhr.responseText);
                }
                if (callback) {
                  callback.call(_this2, null, false, xhr.status);
                }
              }
            }
          };
          data = data ? data : {};
          if (method === "GET") {
            var count = 1;
            for (var item in data) {
              if (count === 1) {
                url += "?";
              }
              count++;
              url += item + "=" + data[item] + "&";
            }
            xhr.open(method, url, true);
            console.log("requestHttpByUrl:HTTP GET:", url);
            xhr.send();
          } else {
            xhr.open(method, url);
            // xhr.withCredentials = true;
            xhr.setRequestHeader("Content-Type", "application/json");
            var temData = JSON.stringify(data);
            console.log("requestHttpByUrl:HTTP POST:", url, data, method, temData);
            xhr.send(temData);
          }
        }

        //请求版本信息
        ;

        _proto.requestVersionInfo = function requestVersionInfo() {
          var _this3 = this;
          var url = SERVER_URL + "/" + GlobalData.mainVersion + "/version.txt?" + Math.random(); //版本文件
          App.log.logBusiness("requestVersionInfoUpdateInfo url:", url);
          this.requestHttpByUrl(url, null, null, function (res, success, status) {
            if (success) {
              var jsonData = null;
              try {
                jsonData = JSON.parse(res);
              } catch (_unused) {
                console.error("can't parse version file");
              }
              if (jsonData) {
                //拉到文件
                App.log.logBusiness(jsonData, "requestVersionInfoUpdateInfo");
                var mainVersion = jsonData.MainVersion;
                var subVersion = jsonData.SubVersion;
                console.log("热更:  线上 mianVersion , subVersion :", mainVersion, subVersion);
                console.log("热更:  包里配置 mianVersion , subVersion :", GlobalData.mainVersion, GlobalData.subVersion);
                if (mainVersion === GlobalData.mainVersion && subVersion > GlobalData.subVersion) {
                  //存在热更
                  var temData = {
                    MainVersion: mainVersion,
                    SubVersion: subVersion
                  };
                  _this3.handleHotUpdate(temData);
                  director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.SUCCESS, "sucess");
                } else {
                  //无需热更,最新版本
                  console.log("无需热更,最新版本");
                  director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.NEWEST, "newest");
                }
              } else {
                console.error("DataMgr, requestVersionInfoUpdateInfo jsonData is null:");
                director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.ERROR, "jsonData is null");
              }
            } else {
              console.error("requestVersionInfoUpdateInfo error:", status);
              director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.ERROR, "can't request version file");
            }
          });
        }

        //更新信息返回
        ;

        _proto.updateInfoBroadcast = function updateInfoBroadcast() {
          console.log("updateInfoBroadcast");
          if (!sys.isNative) return;
          var updateInfo = {};
          updateInfo.MainVersion = "1.0";
          updateInfo.SubVersion = 0;
          updateInfo.Url = SERVER_URL;
          if (Number(GlobalData.mainVersion) < Number(updateInfo.MainVersion)) {
            //大版本更新
            this.handleUpdate();
          } else if (Number(GlobalData.mainVersion) === Number(updateInfo.MainVersion)) {
            //小版本更新
            App.log.logBusiness("当前版本号：", GlobalData.showVersion);
            this.handleHotUpdate(updateInfo);
          }
        }

        //进行更新提示
        ;

        _proto.handleUpdate = function handleUpdate() {}

        //进行热更新
        ;

        _proto.handleHotUpdate = function handleHotUpdate(data) {
          var _this4 = this;
          console.log("===handleHotUpdate:" + data);
          this.node.active = true;
          var osFlag = "";
          if (sys.os === sys.OS.ANDROID) {
            osFlag = "android";
          } else if (sys.os === sys.OS.IOS) {
            osFlag = "ios";
          }
          var fileName = osFlag + "_" + data.MainVersion + "_" + data.SubVersion + "_" + GlobalData.subVersion + ".zip"; //补丁包文件名：
          var hotupdateZipUrl = SERVER_URL + "/" + data.MainVersion + "/" + fileName; //补丁包绝对路径
          var versionInfoPath = HotUpdateConfig.getHotUpdateDir(); //补丁包存放地址
          var dstFullPath = versionInfoPath + "/" + fileName;
          App.log.logBusiness("handleVersionInfoUpdate, hotupdateZipUrl:" + hotupdateZipUrl + ", dstFullPath:" + dstFullPath);
          App.log.logBusiness("handleVersionInfoUpdate, fileName:", fileName);
          App.log.logBusiness("handleVersionInfoUpdate, versionInfoPath:", versionInfoPath);
          var downloader = new native.Downloader();
          var startDownloadTime = sys.now();
          console.log("热更:  拉取的文件 fileName:", fileName);
          console.log("热更:  拉取的文件 versionInfoPath:", versionInfoPath);
          downloader.onSuccess = function (task) {
            App.log.logBusiness("task download success, storagePath:" + task.storagePath);
            App.log.logBusiness("task download success, dstFullPath:" + dstFullPath);
            _this4.lblHint.string = "\u89E3\u538B\u4E2D......";
            //解压
            var jszip = new JSZip();
            var startJSUnZipTime = sys.now();
            var zipData = native.fileUtils.getDataFromFile(task.storagePath);
            jszip.loadAsync(zipData).then(function (zip) {
              var fileList = zip.files;
              //计算总个数
              var totalCount = 0;
              for (var filePath in fileList) {
                var lastChar = filePath.charAt(filePath.length - 1);
                if (lastChar !== "/") {
                  //文件夹忽略
                  totalCount++;
                }
              }
              var curCount = 0;
              var _loop = function _loop(_filePath) {
                var lastChar = _filePath.charAt(_filePath.length - 1);
                if (lastChar !== "/") {
                  //文件夹忽略，文件进行解压
                  zip.file(_filePath).async("arraybuffer").then(function (buffer) {
                    var fileArr = _filePath.split("/");
                    var fileName = fileArr[fileArr.length - 1];
                    var fileDirPath = "" + versionInfoPath;
                    for (var k = 0; k < fileArr.length - 1; k++) {
                      fileDirPath = fileDirPath + "/" + fileArr[k];
                      // LogUtil.superLog("handleVersionInfoUpdate create dir, dir:" + fileDirPath)
                      if (!native.fileUtils.isDirectoryExist(fileDirPath)) {
                        var isCreateSuccess = native.fileUtils.createDirectory(fileDirPath);
                        // LogUtil.superLog("handleVersionInfoUpdate create dir, is success:" + isCreateSuccess + ", dir:" + fileDirPath)
                      }
                    }

                    var fullFilePath = fileDirPath + "/" + fileName;
                    //如果文件存在，则删除目标文件
                    if (native.fileUtils.isFileExist(fullFilePath)) {
                      var _flag = native.fileUtils.removeFile(fullFilePath);
                      App.log.logBusiness("remove file:" + fullFilePath + ", flag:" + _flag);
                    }
                    var flag = native.fileUtils.writeDataToFile(buffer, fullFilePath);
                    App.log.logBusiness("write file:" + fullFilePath + ", flag:" + flag);
                    curCount++;
                    if (curCount === totalCount) {
                      //最后一个文件写入成功，则解压完成
                      App.log.logBusiness("handleVersionInfoUpdate, complete unzip need time:" + (sys.now() - startJSUnZipTime));
                      //删除压缩文件
                      native.fileUtils.removeFile(task.storagePath);
                      //热更成功
                      _this4.handleUpdateSuccess(data.MainVersion, data.SubVersion);
                    }
                  })["catch"](function (err) {
                    App.log.logError("unzip error:" + err);
                    director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.ERROR, "unzip error:" + err);
                  });
                }
              };
              for (var _filePath in fileList) {
                _loop(_filePath);
              }
            })["catch"](function (err) {
              App.log.logError("unzip error:" + err);
              director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.ERROR, "unzip error:" + err);
            });
          };
          downloader.onError = function (task, errorCode, errorCodeInternal, errorStr) {
            App.log.logBusiness("task download error, errorCode:" + errorCode + ", errorCodeInternal:" + errorCodeInternal + ", errorStr:" + errorStr);
            //热更失败，直接进入游戏
            director.emit(HotUpdateEvent.HOTUPDATE_FINISH, HotUpdateState.ERROR, "downloader error:" + errorStr);
          };
          downloader.onProgress = function (task, bytesReceived, totalBytesReceived, totalBytesExpected) {
            _this4.curDownloadPer = totalBytesReceived / totalBytesExpected;
          };
          downloader.createDownloadTask(hotupdateZipUrl, dstFullPath);
        };
        _proto.handleUpdateSuccess = function handleUpdateSuccess(mainVersion, subVersion) {
          //更新成功。 subversion版本号写入本地
          App.log.logBusiness("handleUpdateSuccess");
          App.log.logBusiness("handleUpdateSuccess, mainVersion:" + mainVersion + ", subVersion:" + subVersion);
          this.lblHint.string = "更新完成。";

          //写入version文件
          var storagePath = HotUpdateConfig.getHotUpdateDir();
          var versionInfoFilePath = storagePath + "/version.txt";
          if (native.fileUtils.isFileExist(versionInfoFilePath)) {
            native.fileUtils.removeFile(versionInfoFilePath);
          }
          var allVersion = mainVersion + "." + subVersion;
          var versionInfo = {
            mainVersion: mainVersion,
            subVersion: subVersion,
            version: allVersion
          };
          var versionStr = JSON.stringify(versionInfo);
          var flag = native.fileUtils.writeStringToFile(versionStr, versionInfoFilePath);
          App.log.logBusiness("write versionInfoFilePath:" + versionInfoFilePath + ", flag:" + flag + ", versionStr:" + versionStr);
          App.log.logBusiness("handleUpdateSuccess, write versionInfoFilePath success");

          //更新存储的值
          sys.localStorage.setItem(HotUpdateConfig.DISK_HOTUPDATE_VERSION, versionStr);
          //加入资源搜索路径
          native.fileUtils.addSearchPath(storagePath, true);
          sys.localStorage.setItem(HotUpdateConfig.DISK_HOTUPDATE_PATH, storagePath);

          //重启游戏
          this.restartGame();
        };
        _proto.initVersion = function initVersion() {
          App.log.logBusiness("ZipHotUpdateView initHotUpdateCtr");
          App.log.logBusiness("initVersion");
          console.log("热更:  aaaaaaaaaaaaaaaaaaaaaaaaaaa");
          var storagePath = HotUpdateConfig.getHotUpdateDir();
          var versionInfoFile = storagePath + "/version.txt";
          if (native.fileUtils.isFileExist(versionInfoFile)) {
            console.log("热更:  bbbbbbbbbbbbbbbbbbbbbbbbbb");
            var content = native.fileUtils.getStringFromFile(versionInfoFile);
            var jsonData = JSON.parse(content);
            var mainVersion = jsonData.mainVersion;
            var subVersion = jsonData.subVersion;
            GlobalData.mainVersion = mainVersion;
            GlobalData.subVersion = subVersion;
            GlobalData.showVersion = mainVersion + "." + subVersion;
            console.log("热更:  拉取存在的文件  GlobalData.mainVersion ， GlobalData.subVersion :", GlobalData.mainVersion, GlobalData.subVersion);
          } else {
            console.log("热更:  ccccccccccccccccccccccccccccccccc");
            console.log("热更:  ccccccccccccccccccccccccccccccccc", this.manifestUrl);
            console.log("热更:  ccccccccccccccccccccccccccccccccc", this.manifestUrl.nativeUrl);
            var assetMgr = new native.AssetsManager(this.manifestUrl.nativeUrl, storagePath);
            var version = assetMgr.getLocalManifest().getVersion();
            var ver = this.parseVersion(version);
            GlobalData.mainVersion = ver.mainVersion;
            GlobalData.subVersion = Number(ver.subVersion);
            GlobalData.showVersion = ver.mainVersion + "." + ver.subVersion;
            console.log("热更:  拉起不存在的  GlobalData.mainVersion ， GlobalData.subVersion :", GlobalData.mainVersion, GlobalData.subVersion);
          }
          // this.lblVer.string = GlobalData.showVersion
        }

        /**
         *
         * @param version 版本号
         */;
        _proto.parseVersion = function parseVersion(version) {
          var ver = {};
          var versions = version.split(".");
          var mainVersion = "";
          var subVersion = "";
          for (var i = 0; i < versions.length; i++) {
            if (i === versions.length - 1) {
              subVersion = versions[i];
            } else {
              mainVersion += versions[i];
              if (i !== versions.length - 2) {
                mainVersion += ".";
              }
            }
          }
          ver.mainVersion = mainVersion;
          ver.subVersion = subVersion;
          return ver;
        }

        //重启游戏
        ;

        _proto.restartGame = function restartGame() {
          this.scheduleOnce(function () {
            //延迟0.5秒重新启动游戏
            game.restart();
          }, 0.5);
        };
        _proto.start = function start() {};
        _proto.update = function update(dt) {
          var delta = dt * this.downloadSpeed;
          var nextPer = this.pb.progress + delta;
          if (nextPer >= 1) {
            this.pb.progress = 1;
          } else if (nextPer < this.curDownloadPer) {
            this.pb.progress = this.pb.progress + delta;
          }
        };
        _proto.onDestroy = function onDestroy() {};
        return ZipHotUpdateView;
      }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lblHint", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "manifestUrl", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "lblVer", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "pb", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: null
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

System.register("chunks:///_virtual/ZiYuanCellItem.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ScrollListItem.ts', './UIUtil.ts', './BuildItem.ts', './CostItem.ts', './App.ts', './PlaceGameMgr.ts'], function (exports) {
  var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Label, Button, ScrollListItem, UIUtil, BuildItem, CostItem, App, PlaceGameMgr;
  return {
    setters: [function (module) {
      _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
      _inheritsLoose = module.inheritsLoose;
      _initializerDefineProperty = module.initializerDefineProperty;
      _assertThisInitialized = module.assertThisInitialized;
    }, function (module) {
      cclegacy = module.cclegacy;
      _decorator = module._decorator;
      Label = module.Label;
      Button = module.Button;
    }, function (module) {
      ScrollListItem = module.ScrollListItem;
    }, function (module) {
      UIUtil = module.UIUtil;
    }, function (module) {
      BuildItem = module.BuildItem;
    }, function (module) {
      CostItem = module.CostItem;
    }, function (module) {
      App = module.App;
    }, function (module) {
      PlaceGameMgr = module.PlaceGameMgr;
    }],
    execute: function () {
      var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
      cclegacy._RF.push({}, "7ffafxijZRH6I/9yzDlfxJ2", "ZiYuanCellItem", undefined);
      var ccclass = _decorator.ccclass,
        property = _decorator.property;

      /**
       * 资源产出数据接口
       */

      var ZiYuanCellItem = exports('ZiYuanCellItem', (_dec = ccclass("ZiYuanCellItem"), _dec2 = property({
        type: BuildItem,
        tooltip: "建筑节点组件"
      }), _dec3 = property({
        type: Label,
        tooltip: "建筑名称"
      }), _dec4 = property({
        type: CostItem,
        tooltip: "资源1"
      }), _dec5 = property({
        type: Label,
        tooltip: "累计多少个兵营"
      }), _dec6 = property({
        type: Button,
        tooltip: "领取按钮"
      }), _dec(_class = (_class2 = /*#__PURE__*/function (_ScrollListItem) {
        _inheritsLoose(ZiYuanCellItem, _ScrollListItem);
        function ZiYuanCellItem() {
          var _this;
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          _this = _ScrollListItem.call.apply(_ScrollListItem, [this].concat(args)) || this;
          _initializerDefineProperty(_this, "buildItem", _descriptor, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "buildingNameLab", _descriptor2, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "cellCost1", _descriptor3, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "solderNumLab", _descriptor4, _assertThisInitialized(_this));
          _initializerDefineProperty(_this, "btnCollect", _descriptor5, _assertThisInitialized(_this));
          _this._data = null;
          _this._clickCallback = null;
          return _this;
        }
        var _proto = ZiYuanCellItem.prototype;
        /**
         * 显示资源数据
         * @param data 资源数据
         * @param index 索引
         */
        _proto.show = function show(data, index) {
          if (!data) return;
          this._data = data;
          if (this.buildingNameLab) {
            this.buildingNameLab.string = data.buildingName || "";
          }
          if (this.buildItem) {
            this.buildItem.show(data.buildingId, false);
          }
          this.updateCostItems(data.item);
          if (this.solderNumLab) {
            this.solderNumLab.node.active = true;
            this.solderNumLab.string = "X" + data.solderNum.toString();
          }
          if (this.btnCollect) {
            var hasItems = data.item && data.item.num > 0;
            var totalCount = data.item.num;
            if (hasItems && totalCount > 0 && data.canCollect) {
              UIUtil.setButtonEnable(this.btnCollect, true, false);
            } else {
              UIUtil.setButtonEnable(this.btnCollect, false, true);
            }
          }
        }

        /**
         * 更新资源显示
         * @param items 资源列表
         */;
        _proto.updateCostItems = function updateCostItems(item) {
          if (!item) {
            return;
          }
          if (this.cellCost1) {
            this.cellCost1.node.active = true;
            this.cellCost1.setData([item.itemid, item.num], true);
          }
        }

        /**
         * 设置点击回调
         * @param callback 回调函数
         */;
        _proto.setClickCallback = function setClickCallback(callback) {
          this._clickCallback = callback;
        }

        /**
         * 领取按钮点击事件
         */;
        _proto.onBtnCollectClick = function onBtnCollectClick() {
          if (!this._data || !this._data.canCollect) {
            return;
          }
          App.log.logBusiness("\u9886\u53D6\u8D44\u6E90 - \u5EFA\u7B51UID: " + this._data.buildingUid + ", \u5EFA\u7B51ID: " + this._data.buildingId);
          // PlaceGameMgr.inst.reqGetZiYuan(this._data.buildingUid, this._data.buildingId);
          PlaceGameMgr.inst.reqGetReserve(this._data.buildingUid, this._data.buildingId);
        }

        /**
         * 获取数据
         */;
        _proto.getData = function getData() {
          return this._data;
        };
        return ZiYuanCellItem;
      }(ScrollListItem), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "buildItem", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "buildingNameLab", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "cellCost1", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "solderNumLab", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "btnCollect", [_dec6], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));
      cclegacy._RF.pop();
    }
  };
});

(function(r) {
  r('virtual:///prerequisite-imports/main', 'chunks:///_virtual/main'); 
})(function(mid, cid) {
    System.register(mid, [cid], function (_export, _context) {
    return {
        setters: [function(_m) {
            var _exportObj = {};

            for (var _key in _m) {
              if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
            }
      
            _export(_exportObj);
        }],
        execute: function () { }
    };
    });
});