"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1612],{81612:(t,e,s)=>{s.r(e),s.d(e,{default:()=>r});var l=s(5057),n=s(76463),d=s(96266);const i=t=>n.Z.sanitize(t,{USE_PROFILES:{html:!0},FORCE_BODY:!0});function r(t){let{element:e,width:s}=t;const{body:n}=e,[r,u]=(0,l.useState)(i(n)),a=(0,l.useRef)(null);return(0,l.useEffect)((()=>{i(n)!==r&&u(i(n))}),[n]),(0,l.useEffect)((()=>{var t,e;0===(null===(t=a.current)||void 0===t?void 0:t.clientHeight)&&1===(null===(e=a.current.parentElement)||void 0===e?void 0:e.childElementCount)&&a.current.parentElement.classList.add("stHtml-empty")})),(0,d.jsx)(d.Fragment,{children:r&&(0,d.jsx)("div",{className:"stHtml","data-testid":"stHtml",ref:a,style:{width:s},dangerouslySetInnerHTML:{__html:r}})})}}}]);