"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[87],{1087:function(e,n,o){o.r(n);var r=o(5893),t=o(7294),l=o(6852),u=o(3764);n.default=(0,l.ue)(e=>{let n,{args:o,theme:i}=e,s=(0,t.useRef)(null),a=e=>{l.ll.setComponentValue(e)},d=new ResizeObserver(e=>{let n=e[0].contentRect.height+15;l.ll.setFrameHeight(n)});return(0,r.jsx)("div",{ref:e=>{null!==e?d.observe(e):d.disconnect()},style:{width:"100%",height:o.height},children:(0,r.jsx)(u.ZP,{theme:o.theme,value:o.value,language:o.language,onMount:e=>{s.current=e,a(o.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=>{e&&(clearTimeout(n),n=setTimeout(()=>{a(e)},200))},options:{lineNumbers:o.lineNumbers?"on":"off",minimap:{enabled:o.minimap}}})})})}}]);