{"version":3,"file":"renderFormattedText.Ci2KZChg.mjs","names":["_Fragment","Fragment"],"sources":["https:/framerusercontent.com/modules/AK66fAl0EN3dNOItWb1o/yReyciuPNfKfAJ6h1hkp/renderFormattedText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{Fragment}from\"react\";export default function renderFormattedText(text){if(text===undefined)return undefined;const textWithBold=input=>{// Replace custom hard space marker with actual non-breaking space\ninput=input.replace(/\\/space\\//g,\"\\xa0\");// This regex matches text enclosed by double asterisks (**)\nconst regex=/\\*\\*(.*?)\\*\\*/g;let lastIndex=0;const parts=[];let key=0;let match;// Loop through all matches\nwhile((match=regex.exec(input))!==null){const index=match.index;const content=match[1];// Push the text before the current match as a plain string\nif(index>lastIndex){parts.push(input.substring(lastIndex,index));}// Push the matched content wrapped in a <b> element\nparts.push(/*#__PURE__*/_jsx(\"b\",{children:content},key++));lastIndex=regex.lastIndex;}// Push any remaining text after the last match\nif(lastIndex<input.length){parts.push(input.substring(lastIndex));}return /*#__PURE__*/_jsx(_Fragment,{children:parts});};function render(){const lines=text.toString().split(\"\\n\");const renderedText=lines.map((line,index)=>/*#__PURE__*/_jsxs(Fragment,{children:[textWithBold(line),index<lines.length-1&&/*#__PURE__*/_jsx(\"br\",{})]},index));return renderedText;}return /*#__PURE__*/_jsx(_Fragment,{children:render()});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"renderFormattedText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./renderFormattedText.map"],"mappings":"gIAA2G,SAAwB,EAAoB,EAAK,CAAC,GAAG,IAAO,IAAA,GAAU,OAAiB,IAAM,EAAa,GAAO,CAC5N,EAAM,EAAM,QAAQ,aAAa,MAAM,EACvC,IAAM,EAAM,iBAAqB,EAAU,EAAQ,EAAM,CAAC,EAAM,EAAI,EAAM,EAC1E,MAAO,EAAM,EAAM,KAAK,CAAK,KAAK,MAAK,CAAC,IAAM,EAAM,EAAM,MAAY,EAAQ,EAAM,GACjF,EAAM,GAAW,EAAM,KAAK,EAAM,UAAU,EAAU,CAAK,CAAC,EAC/D,EAAM,KAAkB,EAAK,IAAI,CAAC,SAAS,CAAO,EAAE,GAAK,CAAC,EAAE,EAAU,EAAM,SAAU,CACnB,OAAhE,EAAU,EAAM,QAAQ,EAAM,KAAK,EAAM,UAAU,CAAS,CAAC,EAAuB,EAAKA,EAAU,CAAC,SAAS,CAAK,CAAC,CAAE,EAAE,SAAS,GAAQ,CAAC,IAAM,EAAM,EAAK,SAAS,CAAC,CAAC,MAAM;CAAI,EAAkK,OAA7I,EAAM,KAAK,EAAK,IAAqB,EAAMC,EAAS,CAAC,SAAS,CAAC,EAAa,CAAI,EAAE,EAAM,EAAM,OAAO,GAAgB,EAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAK,CAAqB,CAAE,CAAC,OAAoB,EAAKD,EAAU,CAAC,SAAS,EAAO,CAAC,CAAC,CAAE,iBANnV,IAA4B"}