{"version":3,"file":"BugDisclosur.D3FcbW7P.mjs","names":[],"sources":["https:/framerusercontent.com/modules/kSTXZjrp5Ggn2UlZW1hr/a0uux3llxZ4bNWvpm8aS/BugDisclosur.js"],"sourcesContent":["/**\n * For any website & code related support, contact Sam from wealthisteps.com at wealthistep@gmail.com\n * Linkedin - https://www.linkedin.com/in/samagramishra/\n * */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function BugDisclosure(props){const{content,symbols,mainFont,mainColor,from,to,prefix,symbolPosition,backgroundColor,padding,radius}=props;// Keep the original ScrollLink functionality\nconst handleClick=()=>{sessionStorage.setItem(\"scroll-return-to\",from);const target=document.getElementById(to);if(target){target.scrollIntoView({behavior:\"smooth\"});}};// Replace the placeholder (inverted commas) with the disclosure symbol\nconst renderContent=()=>{if(!content)return null;// Process the content to handle quotes\nconst processedContent=content;const elements=[];// Track the current placeholder index to assign the correct symbol\nlet placeholderIndex=0;// Add prefix if provided\nif(prefix){elements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor,whiteSpace:\"pre\",display:\"inline\"},children:prefix},\"prefix\"));}// Process text for quotes directly\nconst quoteRegex=/\"([^\"]*)\"|([^\"]+)/g;let quoteMatch;let lastQuoteIndex=0;while((quoteMatch=quoteRegex.exec(processedContent))!==null){// Add text before the quote if any\nif(quoteMatch.index>lastQuoteIndex){const beforeText=processedContent.substring(lastQuoteIndex,quoteMatch.index);elements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor},children:beforeText},`text-${lastQuoteIndex}`));}if(quoteMatch[1]!==undefined){// This is quoted text - add the symbol as superscript with onClick handler\n// Determine which symbol to use based on the placeholder index\nlet currentSymbol=\"*\"// Default symbol if none provided\n;// If symbols array exists and has items, use it\nif(symbols&&symbols.length>0){// Use modulo to cycle through available symbols if there are more placeholders than symbols\nconst symbolIndex=placeholderIndex%symbols.length;currentSymbol=symbols[symbolIndex];placeholderIndex++// Increment placeholder counter\n;}elements.push(/*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-block\",position:\"relative\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"-5px\",left:\"-10px\",right:\"-10px\",bottom:\"-5px\",cursor:\"pointer\",zIndex:1},onClick:handleClick}),/*#__PURE__*/_jsx(\"sup\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,color:mainColor,position:\"relative\",top:symbolPosition?`${symbolPosition}px`:\"-0.5em\",verticalAlign:\"top\",display:\"inline-block\",lineHeight:\"0\",marginRight:\"1px\"},children:currentSymbol},`symbol-${quoteMatch.index}`)]},`symbol-wrapper-${quoteMatch.index}`));}else if(quoteMatch[2]!==undefined){// This is regular text between quotes\nelements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor},children:quoteMatch[2]},`text-${quoteMatch.index}`));}lastQuoteIndex=quoteRegex.lastIndex;}// Add any remaining text after the last quote\nif(lastQuoteIndex<processedContent.length){elements.push(/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:mainFont?.fontFamily,fontSize:mainFont?.fontSize,lineHeight:mainFont?.lineHeight,letterSpacing:mainFont?.letterSpacing,color:mainColor},children:processedContent.substring(lastQuoteIndex)},`text-${lastQuoteIndex}`));}return elements;};return /*#__PURE__*/_jsxs(\"div\",{id:from,style:{display:\"inline-block\",width:\"100%\",textAlign:mainFont?.textAlign||\"center\",backgroundColor:backgroundColor,padding:`${padding}`,borderRadius:`${radius}`},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .btn-style {\n                    width: auto;\n                    height: auto;\n                }\n                `}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"inline\",whiteSpace:\"pre-wrap\",textAlign:mainFont?.textAlign||\"inherit\"},children:renderContent()})]});}addPropertyControls(BugDisclosure,{content:{type:ControlType.String,defaultValue:'This is sample text with \"disclosure\" placeholder.',displayTextArea:true},from:{type:ControlType.String},to:{type:ControlType.String},offset:{type:ControlType.Number,title:\"Offset (px)\",defaultValue:0},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},symbols:{type:ControlType.Array,propertyControl:{type:ControlType.String},defaultValue:[\"*\"],title:\"Symbols\",description:\"Symbols to use for placeholders in sequence\"},mainFont:{type:ControlType.Font,controls:\"extended\",title:\"Main Text Font\"},mainColor:{type:ControlType.Color,title:\"Main Text Color\",defaultValue:\"#1C1C1C\"},symbolPosition:{type:ControlType.Number,title:\"Symbol Position\",defaultValue:-5,description:\"Vertical position adjustment for symbols\",step:1},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFEFB2\"},padding:{type:ControlType.Padding,title:\"Padding (px)\"},radius:{type:ControlType.BorderRadius,title:\"Radius\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BugDisclosure\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BugDisclosur.map"],"mappings":"oKAMG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,UAAQ,UAAQ,WAAS,YAAU,OAAK,KAAG,SAAO,iBAAe,kBAAgB,UAAQ,UAAQ,EACjJ,MAAgB,CAAC,eAAe,QAAQ,mBAAmB,EAAK,CAAC,IAAM,EAAO,SAAS,eAAe,EAAG,CAAI,GAAQ,EAAO,eAAe,CAAC,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