text: (window.webpackJsonp=window.webpackJsonp||[]).push([[8],{Xzuj:function(t,n,e){"use strict";e.r(n),function(t){e.d(n,"getAppPluginPageError",(function(){return w}));var o=e("q1tI"),r=e.n(o),a=e("0cfB"),i=e("/MKj"),u=e("ZGyg"),c=e("okuo"),l=e("Vw/f"),p=e("Obii"),s=e("kYMR"),f=e("lJbD"),b=e("HJRA");function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,n,e,o,r,a,i){try{var u=t[a](i),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(o,r)}function v(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,n){return!n||"object"!==y(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,n){return(m=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function w(t){return t?t.type!==p.PluginType.app?"Plugin must be an app":t.enabled?null:"Application Not Enabled":"Unknown Plugin"}var O=function(t){function n(t){var e;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(e=g(this,d(n).call(this,t))).onNavChanged=function(t){e.setState({nav:t})},e.state={loading:!0,nav:Object(s.getLoadingNav)()},e}var e,o,a,i,y;return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&m(t,n)}(n,t),e=n,(o=[{key:"componentDidMount",value:(i=regeneratorRuntime.mark((function t(){var n,e,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.props.pluginId,t.prev=1,t.next=4,Object(c.a)(n).then((function(t){var n=w(t);return n?(b.a.emit(p.AppEvents.alertError,[n]),o.setState({nav:Object(f.b)(n)}),null):Object(l.a)(t)}));case 4:e=t.sent,this.setState({plugin:e,loading:!1}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),this.setState({plugin:null,loading:!1,nav:Object(f.a)()});case 11:case"end":return t.stop()}}),t,this,[[1,8]])})),y=function(){var t=this,n=arguments;return new Promise((function(e,o){var r=i.apply(t,n);function a(t){h(r,e,o,a,u,"next",t)}function u(t){h(r,e,o,a,u,"throw",t)}a(void 0)}))},function(){return y.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,n=t.path,e=t.query,o=this.state,a=o.loading,i=o.plugin,c=o.nav;return i&&!i.root?r.a.createElement("div",null,"No Root App"):r.a.createElement(u.a,{navModel:c},r.a.createElement(u.a.Contents,{isLoading:a},!a&&i&&r.a.createElement(i.root,{meta:i.meta,query:e,path:n,onNavChanged:this.onNavChanged})))}}])&&v(e.prototype,o),a&&v(e,a),n}(o.Component);n.default=Object(a.hot)(t)(Object(i.connect)((function(t){return{pluginId:t.location.routeParams.pluginId,slug:t.location.routeParams.slug,query:t.location.query,path:t.location.path}}))(O))}.call(this,e("3UD+")(t))}}]);
  //# sourceMappingURL=AppRootPage.898fe9e20a782b4232fe.js.map