{"version":3,"file":"InlineMath.opu8_X71.mjs","names":["katex"],"sources":["https:/framerusercontent.com/modules/BMdMoe1ygCulFp4Fn7Es/W1qNdyOY4CojxN9u4RkC/InlineMath.js"],"sourcesContent":["// Inline math for CMS rich text. Rich text cannot hold a component mid-sentence, so inline TeX is\n// written as inline code wrapped in dollars (`$\\rho^{l}$`). Place one instance in the article;\n// it renders every such inline code span on the page with KaTeX.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// @ts-ignore - Framer runtime supports URL imports; local type-checker has no declaration for this module specifier.\nimport katex from\"https://esm.sh/katex@0.16.22\";const KATEX_CSS_HREF=\"https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css\";const INLINE_TEX=/^\\s*\\$([^$]+)\\$\\s*$/;const SOURCE_ATTRIBUTE=\"data-inline-math\";function ensureKatexStylesheet(){if(typeof document===\"undefined\")return;if(document.querySelector(`link[rel=\"stylesheet\"][href=\"${KATEX_CSS_HREF}\"]`))return;const link=document.createElement(\"link\");link.rel=\"stylesheet\";link.href=KATEX_CSS_HREF;document.head.appendChild(link);}function renderCodeSpan(el,color){if(el.closest(\"pre\"))return;if(el.getAttribute(SOURCE_ATTRIBUTE)!==null&&el.querySelector(\".katex\"))return;const match=INLINE_TEX.exec(el.textContent??\"\");if(!match)return;let html=\"\";try{html=katex.renderToString(match[1],{displayMode:false,throwOnError:false,output:\"htmlAndMathml\"});}catch{return;}el.setAttribute(SOURCE_ATTRIBUTE,match[1]);el.innerHTML=html;// Drop the inline-code chip so the math reads as part of the sentence.\nconst reset={background:\"transparent\",\"background-color\":\"transparent\",padding:\"0\",\"border-radius\":\"0\",\"font-family\":\"inherit\",\"font-size\":\"inherit\",\"letter-spacing\":\"normal\",\"white-space\":\"nowrap\",color:color??\"inherit\"};for(const[property,value]of Object.entries(reset)){el.style.setProperty(property,value,\"important\");}}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerDisableUnlink\n */export default function InlineMath(props){const{color}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(isCanvas||typeof document===\"undefined\")return;// Never rewrite code spans inside Framer's own app, where they belong to its editors.\nif(/(^|\\.)framer\\.com$/i.test(window.location.hostname))return;ensureKatexStylesheet();let frame=0;const renderAll=()=>{frame=0;document.querySelectorAll(\"code\").forEach(el=>renderCodeSpan(el,color));};const schedule=()=>{if(!frame)frame=window.requestAnimationFrame(renderAll);};renderAll();// Catch content rendered later (margin notes, client-side navigation, re-renders).\nconst observer=new MutationObserver(schedule);observer.observe(document.body,{childList:true,subtree:true,characterData:true});return()=>{observer.disconnect();if(frame)window.cancelAnimationFrame(frame);};},[isCanvas,color]);if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", monospace',fontSize:12,opacity:.5,color:\"inherit\"},children:\"Inline math: inline code written as $…$ renders as TeX on the site\"});}return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:\"100%\",height:0}});}InlineMath.displayName=\"Inline Math\";addPropertyControls(InlineMath,{color:{type:ControlType.Color,title:\"Color\",optional:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InlineMath\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InlineMath.map"],"mappings":"+OAIsN,SAAS,GAAuB,CAAyC,GAArC,OAAO,SAAW,KAAsB,SAAS,cAAc,gCAAgC,EAAe,GAAG,EAAE,OAAO,IAAM,EAAK,SAAS,cAAc,MAAM,EAAE,EAAK,IAAI,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