var t = require; var e = module; var i = exports; var s = (this && this.__awaiter) || function (t, n, r, l) { return new (r = r || Promise)(function (i, e) { function s(t) { try { a(l.next(t)); } catch (t) { e(t); } } function o(t) { try { a(l.throw(t)); } catch (t) { e(t); } } function a(t) { var e; t.done ? i(t.value) : ((e = t.value) instanceof r ? e : new r(function (t) { t(e); }) ).then(s, o); } a((l = l.apply(t, n || [])).next()); }); }; Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = class { constructor() { this._modules = {}; } clear() { this._modules = {}; } initAllModule() { return s(this, void 0, void 0, function* () { for (var t in this._modules) yield this._modules[t].initController(); }); } register(t, e) { this.isExists(t) || (this._modules[t] = new e()); } register1(t, e) { this.isExists(t) || (this._modules[t] = e); } clearAllModules(t = []) { for (const i in this._modules) { var e = parseInt(i); -1 == t.indexOf(e) && (this._modules[i].destroy(), delete this._modules[i]); } } unregister(t) { delete this._modules[t]; } isExists(t) { return null != this._modules[t]; } applyFunc(t, e, ...i) { var s = this._modules[t]; return s ? s.applyFunc(e, ...i) : (Log.warn("模块" + t + "不存在"), null); } applyFunc2(t, e, ...i) { var s = this._modules[t], e = s.eventKeyMap[e]; return s ? s.applyFunc(e, ...i) : (Log.trace("模块" + t + "不存在"), null); } getControllerModel(t) { t = this._modules[t]; return t ? t.getModel() : null; } });