{"version":3,"file":"BlogArticleLayout.ncjsLGzD.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","ce","window","init_ssg_sandbox_shims","p","c","init_jsx_runtime","de","cleanBrTagsInAllLists","ref","url","link","props","container","cleanBrsInLists","list","brTags","i","currentBr","consecutiveBrs","j","nextBr","node","isConsecutive","k","observer","Component","withArticleLayout","Article","tableStyles","init_BlogArticleLayout"],"sources":["https:/framerusercontent.com/modules/X8vQXAncgw0qWirZK4BO/rfNdb3P0D8IBhXaiM54a/BlogArticleLayout.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";/**\n * Framer Code Override: Clean Repetitive BR Tags\n *\n * Removes excessive <br> tags from lists while keeping ONE for proper spacing.\n * Pattern: <br><br><br> becomes <br> (keeps spacing, removes excess)\n *\n * Usage: Apply this override to your article container or\n * the RichTextContainer holding your blog content.\n */export function cleanBrTagsInAllLists(Component){return props=>{const ref=useRef(null);// Label conversion links in the CMS article rendered by this override.\n// Keep existing names, links and handlers; no document-wide selector.\nuseEffect(()=>{ref.current?.querySelectorAll(\"a[href]\").forEach(link=>{if(link.hasAttribute(\"data-ph-capture-attribute-cta\"))return;try{const url=new URL(link.getAttribute(\"href\")||\"\",window.location.href);const isSite=url.hostname===window.location.hostname||/^(www\\.)?goodspeed\\.studio$/.test(url.hostname);if(isSite&&url.pathname.replace(/\\/$/,\"\")===\"/contact\"||url.hostname===\"meetings.hubspot.com\"){link.setAttribute(\"data-ph-capture-attribute-cta\",\"blog-inline-book-a-call\");}}catch{}});},[props]);useEffect(()=>{if(!ref.current)return;const container=ref.current;const cleanBrsInLists=()=>{// Target both ol and ul elements\nconst lists=container.querySelectorAll(\"ol, ul\");lists.forEach(list=>{// Process each list item's paragraph\nconst paragraphs=list.querySelectorAll(\"li > p\");paragraphs.forEach(p=>{// Find all br tags in this paragraph\nconst brTags=Array.from(p.querySelectorAll(\"br\"));if(brTags.length<=1)return;// Nothing to clean\n// Group consecutive br tags\nlet i=0;while(i<brTags.length){const currentBr=brTags[i];const consecutiveBrs=[currentBr];// Find all consecutive br tags\nlet j=i+1;while(j<brTags.length){const nextBr=brTags[j];// Check if this br is consecutive (only whitespace between them)\nlet node=currentBr.nextSibling;let isConsecutive=false;while(node){if(node===nextBr){isConsecutive=true;break;}// If we hit non-whitespace text or non-br element, stop\nif(node.nodeType===Node.TEXT_NODE&&node.textContent?.trim()){break;}if(node.nodeType===Node.ELEMENT_NODE&&node.tagName.toLowerCase()!==\"br\"){break;}node=node.nextSibling;}if(isConsecutive){consecutiveBrs.push(nextBr);j++;}else{break;}}// If we have more than 1 consecutive br, remove extras (keep first one)\nif(consecutiveBrs.length>1){// Remove all but the first br\nfor(let k=1;k<consecutiveBrs.length;k++){consecutiveBrs[k].remove();}}i=j;}});});};// Small delay to ensure DOM is ready\nsetTimeout(cleanBrsInLists,10);// Observe for dynamic content changes\nconst observer=new MutationObserver(()=>{setTimeout(cleanBrsInLists,10);});observer.observe(container,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{display:\"contents\"},children:[/*#__PURE__*/_jsx(\"style\",{children:'\\n#article [data-framer-component-type=\"RichTextContainer\"] a { color:#374a3e !important; text-decoration:underline !important; text-underline-offset:3px; }\\n#article [data-framer-component-type=\"RichTextContainer\"] h2 { margin-top:50px !important; margin-bottom:20px !important; }\\n#article [data-framer-component-type=\"RichTextContainer\"] h3 { margin-top:36px !important; margin-bottom:16px !important; }\\n#article a:focus-visible {outline:2px solid #374a3e;outline-offset:4px;}\\n#article [data-framer-name=\"Article Sources\"] h3 {margin-top:0 !important;margin-bottom:12px !important;font-size:16px !important;line-height:24px !important;}\\n#article [data-framer-name=\"Article Sources\"] p,\\n#article [data-framer-name=\"Article Sources\"] li {font-size:14px !important;line-height:22px !important;}\\n'}),/*#__PURE__*/_jsx(\"style\",{children:'\\n#article [data-framer-name=\"Article Closing Note\"] a[href=\"/contact\"],\\n#article [data-framer-name=\"Article Closing Note\"] a[href=\"/product/migration\"] {\\n display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:12px 16px;\\n background:#374a3e !important; color:#fbfdfc !important; border-radius:8px; text-decoration:none !important;\\n}\\n#article [data-framer-name=\"Article Closing Note\"] a[href=\"/contact\"] *,\\n#article [data-framer-name=\"Article Closing Note\"] a[href=\"/product/migration\"] * {color:#fbfdfc !important;}\\n#article [data-framer-name=\"Article Closing Note\"] a[href=\"/contact\"]:hover,\\n#article [data-framer-name=\"Article Closing Note\"] a[href=\"/product/migration\"]:hover {background:#242f28 !important;}\\n'}),/*#__PURE__*/_jsx(Component,{...props})]});};}/**\n * Same as above but only for <ol> elements\n */export function cleanBrTagsInOlOnly(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const container=ref.current;const cleanBrsInOl=()=>{const lists=container.querySelectorAll(\"ol\");lists.forEach(list=>{const paragraphs=list.querySelectorAll(\"li > p\");paragraphs.forEach(p=>{const brTags=Array.from(p.querySelectorAll(\"br\"));if(brTags.length<=1)return;let i=0;while(i<brTags.length){const currentBr=brTags[i];const consecutiveBrs=[currentBr];let j=i+1;while(j<brTags.length){const nextBr=brTags[j];let node=currentBr.nextSibling;let isConsecutive=false;while(node){if(node===nextBr){isConsecutive=true;break;}if(node.nodeType===Node.TEXT_NODE&&node.textContent?.trim()){break;}if(node.nodeType===Node.ELEMENT_NODE&&node.tagName.toLowerCase()!==\"br\"){break;}node=node.nextSibling;}if(isConsecutive){consecutiveBrs.push(nextBr);j++;}else{break;}}if(consecutiveBrs.length>1){for(let k=1;k<consecutiveBrs.length;k++){consecutiveBrs[k].remove();}}i=j;}});});};setTimeout(cleanBrsInOl,10);const observer=new MutationObserver(()=>{setTimeout(cleanBrsInOl,10);});observer.observe(container,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}// Scoped layout variant: existing cleanup and CTA tracking above remain unchanged.\nconst tableStyles=`\n@media (max-width: 809px) {\n    [data-goodspeed-article-layout] #article table {\n        display: block !important;\n        width: 100% !important;\n        max-width: 100% !important;\n        overflow-x: auto !important;\n        overscroll-behavior-x: contain;\n    }\n    [data-goodspeed-article-layout] #article table > :is(thead, tbody, tfoot) {\n        display: table !important;\n        table-layout: fixed !important;\n        min-width: 640px !important;\n        width: 100% !important;\n    }\n    [data-goodspeed-article-layout] #article :is(th, td) {\n        word-break: normal !important;\n        overflow-wrap: break-word !important;\n    }\n}\n`;/** @framerDisableUnlink */export function withArticleLayout(Component){// Keep the existing content cleanup and CTA tracking behavior intact.\nconst Article=cleanBrTagsInAllLists(Component);return function ArticleLayout(props){return /*#__PURE__*/_jsxs(\"div\",{\"data-goodspeed-article-layout\":true,style:{display:\"contents\"},children:[/*#__PURE__*/_jsx(\"style\",{children:tableStyles}),/*#__PURE__*/_jsx(Article,{...props})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"cleanBrTagsInOlOnly\":{\"type\":\"reactHoc\",\"name\":\"cleanBrTagsInOlOnly\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withArticleLayout\":{\"type\":\"reactHoc\",\"name\":\"withArticleLayout\",\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"cleanBrTagsInAllLists\":{\"type\":\"reactHoc\",\"name\":\"cleanBrTagsInAllLists\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogArticleLayout.map"],"mappings":"A,8IAQG,SAAgBU,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMC,EAAIX,EAAO,IAAI,EAcmF,OAZ3KG,MAAc,CAACQ,EAAI,SAAS,iBAAiB,SAAS,CAAC,CAAC,QAAQ,GAAM,CAAC,GAAG,GAAK,aAAa,+BAA+B,EAAS,GAAG,CAAC,IAAMC,EAAI,IAAI,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