text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).egfCore={})}(this,(function(t){"use strict";
  /*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved.
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0
  
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
      MERCHANTABLITY OR NON-INFRINGEMENT.
  
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** */function e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var n=function(){function t(){this._state=0,this._moduleMap={}}return Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"moduleMap",{get:function(){return this._moduleMap},enumerable:!1,configurable:!0}),t.prototype.bootstrap=function(n){return o=this,r=void 0,a=function(){var o,r,i,a,s=this;return e(this,(function(e){switch(e.label){case 0:if(this.setState(t.BOOTING),!n||n.length<=0)return this.setState(t.BOOTEND),[2,!0];if(!(n&&n.length>0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i<n.length;i++)r(i);e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return e.sent(),this.setState(t.BOOTEND),[2,!0];case 3:return a=e.sent(),console.error(a),this.setState(t.BOOTEND),[2,!1];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){e.done?t(e.value):new i((function(t){t(e.value)})).then(n,s)}u((a=a.apply(o,r||[])).next())}));var o,r,i,a},t.prototype.init=function(){var e,n=this._moduleMap;if(this.state!==t.RUNING){for(var o in n)(e=n[o]).onInit&&e.onInit(this);for(var o in n)(e=n[o]).onAfterInit&&e.onAfterInit(this);this.setState(t.RUNING)}},t.prototype.loadModule=function(e,n){if(this._state===t.STOP)return!1;var o=!1;return n||(n=e.key),n&&"string"==typeof n?e?this._moduleMap[n]?this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5df2\u7ecf\u5b58\u5728,\u4e0d\u91cd\u590d\u52a0\u8f7d"):(this._moduleMap[n]=e,o=!0,this._state===t.RUNING&&(e.onInit&&e.onInit(this),e.onAfterInit&&e.onAfterInit())):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757:"+n+"\u5b9e\u4f8b\u4e3a\u7a7a"):this._log("\u52a0\u8f7d\u6a21\u5757:\u6a21\u5757key\u4e3a\u7a7a"),o},t.prototype.hasModule=function(t){return!!this._moduleMap[t]},t.prototype.stop=function(){var e,n=this._moduleMap;for(var o in this.setState(t.STOP),n)(e=n[o]).onStop&&e.onStop()},t.prototype.getModule=function(t){return this._moduleMap[t]},t.prototype.setState=function(t){!isNaN(this._state)&&this._state>=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}();t.App=n,Object.defineProperty(t,"__esModule",{value:!0})}));var globalTarget=window||global;globalTarget.egfCore?Object.assign({},globalTarget.egfCore):globalTarget.egfCore=egfCore;
  