/*! For license information please see dll.ROutput.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[111],{1252:function(t,n,e){"use strict";e.r(n);var r=e(39),a=e.n(r);n.default=function(t,n,e){var r=e.config.rshell;r&&r.libraries&&(t=t.concat(r.libraries));var o=function(t){return t.map((function(t){return"library("+t+");"})).join(" ")}(t);return r&&r.global&&(o+=r.global+"\n"),n=a()(n)?n.join("\n"):n,o+=n+="\n"}},909:function(t,n,e){"use strict";e.r(n);var r=e(14),a=e.n(r),o=e(12),u=e.n(o),s=e(10),i=e.n(s),l=e(15),c=e.n(l),p=e(16),f=e.n(p),d=e(8),g=e.n(d),m=e(7),h=e.n(m),y=e(0),v=e.n(y),R=e(1),b=e.n(R),E=e(2181),x=e.n(E),w=e(388),P=e(1252),T=e(36);function _(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=g()(t);if(n){var a=g()(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return f()(this,e)}}var k=function(t){c()(e,t);var n=_(e);function e(t){var r;return a()(this,e),r=n.call(this,t),h()(i()(r),"getResult",(function(t){var n;if((n=t?t.code:r.props.code)!==r.state.last){r.setState({last:r.props.code,running:!0});var e=r.context,a=Object(P.default)(r.props.libraries,r.props.prependCode,e)+n;e.executeRCode({code:a,onError:function(t){r.setState({result:t,running:!1}),r.props.onResult(t)},onPlots:r.props.onPlots,onResult:function(t,n,e){r.setState({result:e,running:!1}),r.props.onResult(t,e)}})}})),r.state={result:null,running:!1,last:""},r}return u()(e,[{key:"componentDidMount",value:function(){this.getResult(this.props)}},{key:"componentDidUpdate",value:function(){this.getResult(this.props)}},{key:"render",value:function(){return v.a.createElement("span",{className:"ROutput"},this.state.result?v.a.createElement("div",{style:{marginLeft:"auto",marginRight:"auto",marginTop:"10px",marginBottom:"10px"}},v.a.createElement(w.default,{width:128,height:64,style:{marginTop:"8px",marginBottom:"-12px"},running:this.state.running}),this.state.running?v.a.createElement("span",null):function(t){if(t){var n={__html:x.a.sanitize(t)};return v.a.createElement("pre",{id:"output"},v.a.createElement("span",{dangerouslySetInnerHTML:n}))}return v.a.createElement("span",null)}(this.state.result)):v.a.createElement("span",null))}}]),e}(y.Component);k.propTypes={code:b.a.string,libraries:b.a.array,prependCode:b.a.oneOfType([b.a.string,b.a.array]),onPlots:b.a.func,onResult:b.a.func},k.defaultProps={code:"",libraries:[],prependCode:"",onPlots:function(){},onResult:function(){}},k.contextType=T.default,n.default=k}}]);