{"version":3,"file":"Embed3.BxeI-RBE.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/W0HDkPA3NuO7pd4MT9gF/c63ECLsZyO8WVVAg9Udq/Embed3.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth fill\n * @framerSupportedLayoutHeight fill\n */export default function Embed(props){const containerRef=useRef(null);useEffect(()=>{if(containerRef.current){// Clear any previous content\ncontainerRef.current.innerHTML=\"\";const isContactPage=window.location.href.includes(\"/contact-us\")||document.body.classList.contains(\"contact-page\")||document.querySelector(\"h1\")?.textContent.includes(\"Contact\");// Build the base form URL\nlet formUrl=\"https://form.jotform.com/251391353870054\";// Only add course parameter if NOT on contact page\nif(!isContactPage){const courseTitle=getCourseTitle(props);if(courseTitle&&courseTitle!==\"Let's get in touch!\"){formUrl+=`?course=${encodeURIComponent(courseTitle)}`;}}const iframe=document.createElement(\"iframe\");// Set the iframe styles to ensure it fits the container\niframe.src=formUrl;iframe.style.width=\"100%\";iframe.style.height=\"100%\";iframe.style.border=\"none\";iframe.style.flex=\"1\";// Append the iframe to the container div\ncontainerRef.current.appendChild(iframe);}},[props.document?.title,props.content?.title])// Watch for title changes\n;return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:containerStyle});}// Helper function to get the course title\nfunction getCourseTitle(props){// Method 1: From direct CMS props\nif(props.document?.title)return props.document.title;if(props.content?.title)return props.content.title;// Method 2: From specific page elements\nconst courseTitleElement=document.querySelector(\"[data-course-title]\")||document.querySelector(\".course-title\")||document.querySelector(\"h1:not(nav h1)\");return courseTitleElement?.innerText||\"Course Registration\";}// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\",backgroundColor:\"#ffffff\",position:\"relative\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Embed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fill\",\"framerSupportedLayoutHeight\":\"fill\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Embed3.map"],"mappings":"kIAQG,SAAwB,EAAM,EAAM,CAAC,IAAM,EAAaA,EAAO,KAAK,CAMtE,OANuE,MAAc,CAAC,GAAG,EAAa,QAAQ,CAC/G,EAAa,QAAQ,UAAU,GAAG,IAAM,EAAc,EAAO,SAAS,KAAK,SAAS,cAAc,EAAE,SAAS,KAAK,UAAU,SAAS,eAAe,EAAE,SAAS,cAAc,KAAK,EAAE,YAAY,SAAS,UAAU,CAC/M,EAAQ,2CACZ,GAAG,CAAC,EAAc,CAAC,IAAM,EAAY,EAAe,EAAM,CAAI,GAAa,IAAc,wBAAuB,GAAS,WAAW,mBAAmB,EAAY,IAAK,IAAM,EAAO,SAAS,cAAc,SAAS,CACrN,EAAO,IAAI,EAAQ,EAAO,MAAM,MAAM,OAAO,EAAO,MAAM,OAAO,OAAO,EAAO,MAAM,OAAO,OAAO,EAAO,MAAM,KAAK,IACrH,EAAa,QAAQ,YAAY,EAAO,GAAI,CAAC,EAAM,UAAU,MAAM,EAAM,SAAS,MAAM,CAAC,CACpE,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,EAAe,CAAC,CACxE,SAAS,EAAe,EAAM,CAE4H,OADvJ,EAAM,UAAU,MAAa,EAAM,SAAS,MAAS,EAAM,SAAS,MAAa,EAAM,QAAQ,OACzE,SAAS,cAAc,sBAAsB,EAAE,SAAS,cAAc,gBAAgB,EAAE,SAAS,cAAc,iBAAiB,GAA4B,WAAW,6CAfrJ,IAAoC,CAiBzE,EAAe,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,SAAS,SAAS,gBAAgB,UAAU,SAAS,WAAW"}