import{j as o,r as t}from"./vendor-react-wBh_31cN.js";import{L as n}from"./LazyMarkdown-pD-5e6Jq.js";import{p as a}from"./purify.es-t2lEkcJL.js";const c=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,m=({content:r})=>{const e=document.documentElement.classList.contains("dark")?"dark":"light",s=r.replace(c,"");return o.jsx("div",{className:"w-full overflow-auto rounded-md border p-4",children:o.jsx(n,{source:s,wrapperElement:{"data-color-mode":e}})})},u=({content:r,className:e})=>{const s=t.useMemo(()=>a.sanitize(r,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","foreignObject"],FORBID_ATTR:["onload","onerror","onclick"]}),[r]);return o.jsx("div",{className:`w-full [&_svg]:mx-auto ${e??""}`,children:o.jsx("div",{dangerouslySetInnerHTML:{__html:s}})})};export{m as M,u as S};
