"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[87],{1087:function(e,n,l){l.r(n);var o=l(5893),r=l(7294),t=l(6852),u=l(3764);n.default=(0,t.ue)(e=>{let n,{args:l,theme:i}=e,s=(0,r.useRef)(null),a=e=>{t.ll.setComponentValue(e)},d=new ResizeObserver(e=>{let n=e[0].contentRect.height+15;t.ll.setFrameHeight(n)});return(0,o.jsx)("div",{ref:e=>{null!==e?d.observe(e):d.disconnect()},style:{width:"100%",height:l.height},children:(0,o.jsx)(u.ZP,{theme:l.theme,value:l.value,language:l.language,onMount:e=>{s.current=e,a(l.value)},beforeMount:e=>{e.editor.defineTheme("streamlit",{base:"vs",inherit:!0,rules:[],colors:{"editor.foreground":null==i?void 0:i.textColor,"editor.background":null==i?void 0:i.backgroundColor,"editorCursor.foreground":null==i?void 0:i.primaryColor}})},onChange:e=>{clearTimeout(n),n=setTimeout(()=>{a(null!=e?e:"")},200)},options:{lineNumbers:l.lineNumbers?"on":"off",minimap:{enabled:l.minimap}}})})})}}]);