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