(this.webpackJsonpstreamlit_vtkjs=this.webpackJsonpstreamlit_vtkjs||[]).push([[0],{236:function(e,t,r){e.exports=r(355)},264:function(e,t){},353:function(e,t,r){},355:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),c=r(56),i=r.n(c),l=r(149),s=r(37),o=r(21),u=r(167),d=r(170),f=r(225),p=r(360),h=(r(353),function(){var e,t,r=Object(n.useRef)(null),c=Object(n.useRef)(!0),i=Object(l.useStreamlit)(),h=a.a.useState({}),m=Object(o.a)(h,2),b=m[0],g=m[1],y=function(){r.current&&r.current.handleScreenshot("VTKJSStreamlit").then((function(){f.a.success({message:"Copied to Clipboard",placement:"topRight"})}))},v=a.a.useState(void 0),j=Object(o.a)(v,2),E=j[0],O=j[1];Object(n.useEffect)((function(){i&&void 0!==typeof i.args.clear&&(c.current=i.args.clear)}),[i]),Object(n.useEffect)((function(){i&&i.args.file&&O((function(e){return e&&(t=i.args.file,r=e,t.byteLength===r.byteLength&&t.every((function(e,t){return e===r[t]})))?e:i.args.file;var t,r}))}),[i]),Object(n.useEffect)((function(){if(E&&r.current&&r.current.loadFile){c.current&&r.current.dispatch({type:"remove-all",skipRender:!0});var e="undefined"!==typeof b.renderer.camera?b:void 0;r.current.loadFile(new Blob([E]),"vtkjs",e)}}),[E]);var S=Object(n.useMemo)((function(){return!i||"undefined"===typeof i.args.toolbar||i.args.toolbar}),[i]),x=Object(n.useMemo)((function(){return!i||"undefined"===typeof i.args.sider||i.args.sider}),[i]),w=Object(n.useMemo)((function(){return i&&"undefined"!==typeof i.args.style?(i.args.style.height&&i.args.style.height.includes("px")&&u.Streamlit.setFrameHeight(parseInt(i.args.style.height.replace("px",""))),i.args.style):{border:"1px solid #d0d7de",borderRadius:"2px"}}),[i]);return Object(n.useEffect)((function(){u.Streamlit.setComponentValue(b)}),[b]),null==i?null:a.a.createElement("div",{style:Object(s.a)(Object(s.a)({width:"100%",height:"100%",border:"1px solid #d0d7de",borderRadius:"2px"},w),{},{display:"flex"})},a.a.createElement(p.a,{style:{flexDirection:"row"}},x&&a.a.createElement(d.c,{dispatch:null===(e=r.current)||void 0===e?void 0:e.dispatch,viewerState:b,handleScreenshot:y}),a.a.createElement(p.a,null,S&&a.a.createElement(d.a,{dispatch:null===(t=r.current)||void 0===t?void 0:t.dispatch,viewerState:b,handleScreenshot:y}),a.a.createElement(p.a.Content,{style:{display:"flex",flexDirection:"column"}},a.a.createElement(d.b,{setViewerState:g,ref:r})))))});r(354);i.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(l.ErrorBoundary,null,a.a.createElement(h,null))),document.getElementById("root"))}},[[236,1,2]]]);
//# sourceMappingURL=main.91cb58ea.chunk.js.map