{"version":3,"file":"BlogEmbed.C2T0M5S7.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/PDEqbySJzzAEHO8MJzZd/pYw7NsvDmSSqeZs3On0R/BlogEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Embeds an external Money Methods page (hosted on Vercel) as an\n * auto-resizing iframe. The resize listener is scoped to THIS component's\n * own iframe (via e.source) so multiple embeds on the same page don't\n * collide. Renders NOTHING when no URL is set — safe on a shared template.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function BlogEmbed(props){const{url=\"\"}=props;const[height,setHeight]=useState(800);const ref=useRef(null);useEffect(()=>{function onMessage(e){// Only respond to messages from our own iframe\nif(ref.current&&e.source!==ref.current.contentWindow)return;const h=(e?.data)?.mmHeight;if(typeof h===\"number\"&&h>0)setHeight(h);}window.addEventListener(\"message\",onMessage);return()=>window.removeEventListener(\"message\",onMessage);},[]);if(!url)return null;return /*#__PURE__*/_jsx(\"iframe\",{ref:ref,src:url,title:\"Money Methods\",scrolling:\"no\",style:{width:\"100%\",height,border:0,display:\"block\",colorScheme:\"normal\"}});}addPropertyControls(BlogEmbed,{url:{type:ControlType.String,title:\"URL\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogEmbed.map"],"mappings":"sMAQG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,MAAI,IAAI,EAAW,CAAC,EAAO,GAAWA,EAAS,IAAI,CAAO,EAAIC,EAAO,KAAK,CACuI,OADtI,MAAc,CAAC,SAAS,EAAU,EAAE,CACjK,GAAG,EAAI,SAAS,EAAE,SAAS,EAAI,QAAQ,cAAc,OAAO,IAAM,EAAG,GAAG,MAAO,SAAY,OAAO,GAAI,UAAU,EAAE,GAAE,EAAU,EAAE,CAA+C,OAA7C,EAAO,iBAAiB,UAAU,EAAU,KAAW,EAAO,oBAAoB,UAAU,EAAU,EAAG,EAAE,CAAC,CAAK,EAAoC,EAAK,SAAS,CAAK,MAAI,IAAI,EAAI,MAAM,gBAAgB,UAAU,KAAK,MAAM,CAAC,MAAM,OAAO,SAAO,OAAO,EAAE,QAAQ,QAAQ,YAAY,SAAS,CAAC,CAAC,CAAxK,0BATnN,IAA6C,IAAoD,CAS4R,EAAoB,EAAU,CAAC,IAAI,CAAC,KAAK,EAAY,OAAO,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC"}