{"version":3,"file":"ebt_custom_button.BJDKXC2y.mjs","names":[],"sources":["https:/framerusercontent.com/modules/43ZlaL1EkJ2eN17gNg2x/jPIlvnhxWMqyMIrzbs5g/ebt_custom_button.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function enhanceRichText(Component){return props=>{useEffect(()=>{// Add the styles to the document if not already added\nif(!document.querySelector(\"#rte-button-styles\")){const styleEl=document.createElement(\"style\");styleEl.id=\"rte-button-styles\";styleEl.textContent=`\n        .rte-button {\n        display: inline-block;\n        align-items: center;\n        justify-content: center;\n        gap: 28px;\n        padding: 13px 20px 15px;\n        background: #2631d5;\n        color: #FFFFFF !important;\n        border-radius: 100000px;\n        text-decoration: none !important;\n        overflow: hidden;\n        position: relative;\n        will-change: transform;\n        transition: background 0.2s ease, transform 0.15s ease;\n        font-size: 18px;\n        text-align: center;\n        }\n        \n        .rte-button span {\n        font: 500 20px/1 \"Outfit\", sans-serif;\n        letter-spacing: 0.02em;\n        color: #fff;\n        }\n        \n        .rte-button:hover {\n        background: #141e94;\n        transform: scale(1.03);\n        }\n    `;document.head.appendChild(styleEl);}// Function to process all rich text links\nconst processRichTextLinks=()=>{// Target all rich text containers\ndocument.querySelectorAll('[data-framer-component-type=\"RichTextContainer\"]').forEach(container=>{// Process all links in the container\nconst links=container.querySelectorAll(\"a\");const urlsToMatch=[\"https://www.bennyapp.com/ebt/\"];links.forEach(a=>{if(urlsToMatch.some(u=>a.href.startsWith(u))){a.className=\"rte-button\";}});});};// Process links initially\nprocessRichTextLinks();// Set up a MutationObserver to handle dynamically loaded content\nconst observer=new MutationObserver(()=>{processRichTextLinks();});// Start observing the document with the configured parameters\nobserver.observe(document.body,{childList:true,subtree:true});// Clean up observer on component unmount\nreturn()=>{observer.disconnect();};},[]);// Return the original component with all its props\nreturn /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"enhanceRichText\":{\"type\":\"reactHoc\",\"name\":\"enhanceRichText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ebt_custom_button.map"],"mappings":"kHAAwE,SAAgB,EAAgB,EAAU,CAAC,MAAO,KAAQ,MAAc,CAChJ,GAAG,CAAC,SAAS,cAAc,qBAAqB,CAAC,CAAC,IAAM,EAAQ,SAAS,cAAc,QAAQ,CAAC,EAAQ,GAAG,oBAAoB,EAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6B7I,SAAS,KAAK,YAAY,EAAQ,CACxC,IAAM,MAAyB,CAC/B,SAAS,iBAAiB,mDAAmD,CAAC,QAAQ,GAAW,CACjG,IAAM,EAAM,EAAU,iBAAiB,IAAI,CAAO,EAAY,CAAC,gCAAgC,CAAC,EAAM,QAAQ,GAAG,CAAI,EAAY,KAAK,GAAG,EAAE,KAAK,WAAW,EAAE,CAAC,GAAE,EAAE,UAAU,eAAgB,EAAG,EAC/L,GAAsB,CACtB,IAAM,EAAS,IAAI,qBAAqB,CAAC,GAAsB,EAAG,CAElE,OADA,EAAS,QAAQ,SAAS,KAAK,CAAC,UAAU,GAAK,QAAQ,GAAK,CAAC,KACnD,CAAC,EAAS,YAAY,GAAK,EAAE,CAAC,CACpB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,mBAtCH,IAA6B"}