{"version":3,"file":"TanzaniaForm.C1DAWhAz.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/YUEFJdAsRVMcWvFLhu0X/x566Y0zT7KRETZ0zT5rn/TanzaniaForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function LazyJotFormEmbed({formId,title,subtitle,immediateLoad=false}){const embedRef=useRef(null);const[showForm,setShowForm]=useState(false);const[scriptLoaded,setScriptLoaded]=useState(false);useEffect(()=>{const loadForm=()=>{if(scriptLoaded)return;const iframe=document.createElement(\"iframe\");iframe.src=`https://form.jotform.com/${formId}`;iframe.title=title;iframe.id=`JotFormIFrame-${formId}`;iframe.style.width=\"100%\";iframe.style.minHeight=\"100%\";iframe.style.height=\"100%\";iframe.style.border=\"none\";iframe.allow=\"geolocation; fullscreen\";iframe.scrolling=\"no\";let minimumDelayPassed=false;let iframeLoaded=false;const revealForm=()=>{if(iframeLoaded&&minimumDelayPassed)setShowForm(true);};// Ensure minimum placeholder visibility (400ms)\nsetTimeout(()=>{minimumDelayPassed=true;revealForm();},400);iframe.onload=()=>{iframeLoaded=true;revealForm();};embedRef.current?.appendChild(iframe);setScriptLoaded(true);};if(immediateLoad){loadForm();return;}const observer=new IntersectionObserver(([entry])=>{if(entry.isIntersecting){loadForm();observer.disconnect();}},{threshold:.2});if(embedRef.current)observer.observe(embedRef.current);return()=>observer.disconnect();},[formId,scriptLoaded,immediateLoad,title]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",backgroundColor:\"#000\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",background:\"linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.8))\",color:\"white\",textAlign:\"center\",opacity:showForm?0:1,transition:\"opacity 0.3s ease-out\",pointerEvents:\"none\",zIndex:2,padding:\"0 24px\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{maxWidth:\"420px\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{fontSize:\"clamp(20px, 4vw, 32px)\",margin:0},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"clamp(14px, 2.5vw, 18px)\",margin:\"8px 0 16px\"},children:subtitle}),/*#__PURE__*/_jsx(\"div\",{style:{border:\"4px solid rgba(255, 255, 255, 0.3)\",borderTop:\"4px solid white\",borderRadius:\"50%\",width:32,height:32,animation:\"spin 1s linear infinite\",margin:\"0 auto\"}}),/*#__PURE__*/_jsx(\"style\",{children:`@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }`})]})}),/*#__PURE__*/_jsx(\"div\",{ref:embedRef,className:\"jotform-container\",style:{opacity:showForm?1:0,transition:\"opacity 1.2s ease-in\",transitionDelay:showForm?\"0.3s\":\"0s\",width:\"100%\",height:\"600px\"}}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (max-width: 810px) {\n                    .jotform-container {\n                        height: 590px !important;\n                        min-height: 540px !important;\n                    }\n                }\n\n                .jotform-container iframe {\n                    height: 100% !important;\n                    min-height: 100% !important;\n                    width: 100% !important;\n                }\n                `})]});}// Framer Property Controls\naddPropertyControls(LazyJotFormEmbed,{formId:{type:ControlType.String,title:\"JotForm ID\",defaultValue:\"251421739516356\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Get 3 TANZANIA Safari Quotes\"},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"Best Companies, Best Prices, 10+ Years Experience\"},immediateLoad:{type:ControlType.Boolean,title:\"Load Immediately\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"LazyJotFormEmbed\":{\"type\":\"reactComponent\",\"name\":\"LazyJotFormEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\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