{"version":3,"file":"PolicyRichText.CvAY3TyR.mjs","names":["_jsx","React.Fragment","_jsxs","__esmMin","init_npm_react_18_3_1","x","p","c","init_jsx_runtime","init_framer_ChujFWHC","addPropertyControls","ControlType","tokenize","input","tokens","pattern","last","match","renderInline","token","index","external","PolicyRichText","props","text","list","items","line","FONT_CSS","item","init_PolicyRichText"],"sources":["https:/framerusercontent.com/modules/VoPPFVKCG01qV07CSdCc/ZiDilWIkhPO7jaauhQkC/PolicyRichText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const FONT_CSS=`\n@font-face{font-family:\"Satoshi Policy\";font-weight:400;font-style:normal;font-display:swap;src:url(\"https://framerusercontent.com/third-party-assets/fontshare/wf/TTX2Z3BF3P6Y5BQT3IV2VNOK6FL22KUT/7QYRJOI3JIMYHGY6CH7SOIFRQLZOLNJ6/KFIAZD4RUMEZIYV6FQ3T3GP5PDBDB6JY.woff2\") format(\"woff2\");}\n@font-face{font-family:\"Satoshi Policy\";font-weight:700;font-style:normal;font-display:swap;src:url(\"https://framerusercontent.com/third-party-assets/fontshare/wf/LAFFD4SDUCDVQEXFPDC7C53EQ4ZELWQI/PXCT3G6LO6ICM5I3NTYENYPWJAECAWDD/GHM6WVH6MILNYOOCXHXB5GTSGNTMGXZR.woff2\") format(\"woff2\");}\n.policy-rich ul{margin:0;padding:0;list-style:none;}\n.policy-rich li{position:relative;display:list-item;list-style:none;margin:0;padding:0 0 0 21.856px;}\n.policy-rich li::before{content:\"\\\\2022\";position:absolute;left:0;top:0;}\n.policy-rich p{margin:0;padding:0;}\n.policy-rich p + p{margin-top:20px;}\n.policy-rich strong{font-weight:700;}\n.policy-rich a{color:inherit;text-decoration:underline;}\n`;function tokenize(input){const tokens=[];const pattern=/\\*\\*([^*]+)\\*\\*|\\[([^\\]]+)\\]\\(([^)\\s]+)\\)/g;let last=0;let match;while((match=pattern.exec(input))!==null){if(match.index>last){tokens.push({type:\"text\",value:input.slice(last,match.index)});}if(match[1]!==undefined){tokens.push({type:\"bold\",value:match[1]});}else{tokens.push({type:\"link\",value:match[2],href:match[3]});}last=pattern.lastIndex;}if(last<input.length){tokens.push({type:\"text\",value:input.slice(last)});}return tokens;}function renderInline(input){return tokenize(input).map((token,index)=>{if(token.type===\"bold\"){return /*#__PURE__*/_jsx(\"strong\",{children:token.value},index);}if(token.type===\"link\"){const external=/^https?:/i.test(token.href);return /*#__PURE__*/_jsx(\"a\",{href:token.href,target:external?\"_blank\":undefined,rel:external?\"noopener noreferrer\":undefined,children:token.value},index);}return /*#__PURE__*/_jsx(React.Fragment,{children:token.value},index);});}export default function PolicyRichText(props){const{text,list}=props;const items=String(text||\"\").split(/\\n+/).map(line=>line.trim()).filter(Boolean);return /*#__PURE__*/_jsxs(\"div\",{className:\"policy-rich\",style:{width:\"100%\",boxSizing:\"border-box\",textAlign:\"left\",color:\"rgb(117, 117, 117)\",fontFamily:'\"Satoshi Policy\", Satoshi, \"Satoshi Placeholder\", sans-serif',fontSize:16,fontWeight:400,lineHeight:\"1.6em\",letterSpacing:\"-0.02em\",...props.style},children:[/*#__PURE__*/_jsx(\"style\",{children:FONT_CSS}),list?/*#__PURE__*/_jsx(\"ul\",{children:items.map((item,index)=>/*#__PURE__*/_jsx(\"li\",{children:/*#__PURE__*/_jsx(\"p\",{children:renderInline(item)})},index))}):items.map((item,index)=>/*#__PURE__*/_jsx(\"p\",{children:renderInline(item)},index))]});}PolicyRichText.defaultProps={text:\"Item one\\nItem two\",list:true,width:1120,height:100};addPropertyControls(PolicyRichText,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true,defaultValue:\"Item one\\nItem two\",description:\"One bullet (or paragraph) per line. Use **bold** and [label](url).\"},list:{type:ControlType.Boolean,title:\"Bullet list\",defaultValue:true,enabledTitle:\"List\",disabledTitle:\"Paragraph\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":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