{"version":3,"file":"IframeEmbed.CTC06L2G.mjs","names":["useRef","useState","_Fragment","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","l","_e","p","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_DDfsYcI0","RenderTarget","ControlType","IframeEmbed","props","isCanvas","rootRef","iframeRef","focusAfterActivate","coarse","setCoarse","active","setActive","mq","update","gated","activation","locked","el","io","entry","entries","frame","activate","onKeyDown","bothTexts","custom","ariaLabel","context","LEGACY_ARIA_DEFAULT","title","style","radius","url","CSS","pillColor","overlayColor","pillTextColor","font","overlayTextDesktop","overlayText","init_IframeEmbed"],"sources":["https:/framerusercontent.com/modules/KBdKyFbF31mskoBg4BHF/maGb4JQ7G2mniqFDsZsW/IframeEmbed.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// Foco: o anel aparece em :focus (vale também para navegadores sem :focus-visible) e só é\n// removido em :focus:not(:focus-visible). Essas regras ficam separadas de propósito: um\n// navegador que não entende :focus-visible descarta apenas elas e mantém o anel.\n// O outline transparente só fica visível no modo de alto contraste (forced-colors).\n// Texto: os dois textos saem no HTML e o CSS mostra um deles conforme o ponteiro, sem troca\n// após a hidratação. Padrão = texto de clique (ponteiro fino ou sem ponteiro).\n// Valor padrão antigo do \"Rótulo acessível\": tratado como vazio (usa o título como contexto).\nconst LEGACY_ARIA_DEFAULT=\"Ativar conte\\xfado interativo\";const CSS=`\r\n.ifx-gate { -webkit-tap-highlight-color: transparent; }\r\n.ifx-gate:focus { outline: 2px solid transparent; outline-offset: -2px; box-shadow: inset 0 0 0 3px var(--ifx-ring), inset 0 0 0 5px #fff; }\r\n.ifx-gate:focus .ifx-pill { outline: 2px solid #fff; outline-offset: 2px; }\r\n.ifx-gate:focus:not(:focus-visible) { outline: none; box-shadow: none; }\r\n.ifx-gate:focus:not(:focus-visible) .ifx-pill { outline: none; }\r\n.ifx-txt-touch { display: none; }\r\n@media (pointer: coarse) { .ifx-txt-touch { display: inline; } .ifx-txt-click { display: none; } }\r\n.ifx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }\r\n.ifx-pill { transition: transform 0.15s ease-out; }\r\n@media (hover: hover) and (pointer: fine) { .ifx-gate:hover .ifx-pill { transform: translateY(-1px); } }\r\n@media (prefers-reduced-motion: reduce) { .ifx-pill { transition: none; } .ifx-gate:hover .ifx-pill { transform: none; } }\r\n`;/**\r\n * Iframe (mapa, tour 360°) com camada de ativação: evita que o iframe prenda a\r\n * rolagem da página no celular. Toque/clique/Enter libera; ao sair da tela, trava de novo.\r\n *\r\n * @framerSupportedLayoutWidth any-prefer-fixed\r\n * @framerSupportedLayoutHeight any-prefer-fixed\r\n */export default function IframeEmbed(props){const{url=\"\",title=\"Embed\",radius=16,activation=\"touch\",overlayText=\"Toque para interagir\",overlayTextDesktop=\"Clique para interagir\",ariaLabel=\"\",overlayColor=\"rgba(0,0,0,0.12)\",pillColor=\"rgba(20,20,20,0.86)\",pillTextColor=\"#FFFFFF\",font,style}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const rootRef=useRef(null);const iframeRef=useRef(null);const focusAfterActivate=useRef(false);const[coarse,setCoarse]=useState(false);const[active,setActive]=useState(false);// Detecta ponteiro \"grosso\" (toque) no cliente; no SSR assume ponteiro fino.\nuseEffect(()=>{if(typeof window===\"undefined\"||typeof window.matchMedia!==\"function\")return;const mq=window.matchMedia(\"(pointer: coarse)\");const update=()=>setCoarse(!!mq.matches);update();if(typeof mq.addEventListener===\"function\"){mq.addEventListener(\"change\",update);return()=>mq.removeEventListener(\"change\",update);}if(typeof mq.addListener===\"function\"){mq.addListener(update);return()=>mq.removeListener(update);}},[]);const gated=activation===\"always\"||activation===\"touch\"&&coarse;const locked=isCanvas?activation!==\"never\":gated&&!active;// Depois de ativado, volta a travar quando o embed sai totalmente da tela.\nuseEffect(()=>{if(isCanvas||!gated||!active)return;const el=rootRef.current;if(!el||typeof IntersectionObserver===\"undefined\")return;const io=new IntersectionObserver(entries=>{for(const entry of entries){if(!entry.isIntersecting)setActive(false);}},{threshold:0});io.observe(el);return()=>io.disconnect();},[isCanvas,gated,active]);// Passa o foco ao iframe logo após a ativação (a camada deixa de existir).\nuseEffect(()=>{if(!active||!focusAfterActivate.current)return;focusAfterActivate.current=false;const frame=iframeRef.current;if(!frame)return;try{frame.focus({preventScroll:true});}catch{frame.focus();}},[active]);const activate=()=>{if(isCanvas||active)return;focusAfterActivate.current=true;setActive(true);};const onKeyDown=e=>{if(e.key===\"Enter\"||e.key===\" \"||e.key===\"Spacebar\"){e.preventDefault();activate();}};// \"always\": os dois textos vão no HTML e o CSS escolhe (sem troca após a hidratação).\n// Nome acessível (WCAG 2.5.3, rótulo no nome): vem do próprio texto visível da pílula\n// (o texto oculto por display:none não entra no nome) + um complemento só para leitores\n// de tela, com o contexto (prop ariaLabel ou, na falta, o título do iframe).\nconst bothTexts=activation===\"always\";const custom=(ariaLabel||\"\").trim();const context=custom&&custom!==LEGACY_ARIA_DEFAULT?custom:(title||\"\").trim();return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:radius,overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"iframe\",{ref:iframeRef,src:url,title:title,loading:\"lazy\",allow:\"fullscreen; xr-spatial-tracking; gyroscope; accelerometer\",allowFullScreen:true,tabIndex:locked?-1:undefined,style:{width:\"100%\",height:\"100%\",border:0,borderRadius:radius,display:\"block\",pointerEvents:locked?\"none\":\"auto\"}}),locked&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:\"ifx-gate\",onClick:activate,onKeyDown:onKeyDown,style:{\"--ifx-ring\":pillColor,position:\"absolute\",inset:0,zIndex:1,width:\"100%\",height:\"100%\",margin:0,padding:16,border:0,borderRadius:radius,background:overlayColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",appearance:\"none\",WebkitAppearance:\"none\",touchAction:\"manipulation\",userSelect:\"none\",WebkitUserSelect:\"none\",WebkitTouchCallout:\"none\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"span\",{className:\"ifx-pill\",style:{display:\"inline-block\",maxWidth:\"100%\",padding:\"10px 18px\",borderRadius:999,background:pillColor,color:pillTextColor,// Contorno claro sutil + sombra: legível também sobre fundo preto (tour 360°).\nboxShadow:\"0 0 0 1px rgba(255,255,255,0.35), 0 6px 20px rgba(0,0,0,0.35)\",fontFamily:\"Inter, sans-serif\",fontSize:14,fontWeight:500,lineHeight:1.3,letterSpacing:\"0.01em\",textAlign:\"center\",whiteSpace:\"normal\",pointerEvents:\"none\",...font},children:bothTexts?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"span\",{className:\"ifx-txt-click\",children:overlayTextDesktop}),/*#__PURE__*/_jsx(\"span\",{className:\"ifx-txt-touch\",children:overlayText})]}):overlayText}),context?/*#__PURE__*/_jsx(\"span\",{className:\"ifx-sr\",children:` — ${context}`}):null]})]})]});}addPropertyControls(IframeEmbed,{url:{type:ControlType.String,title:\"URL\",defaultValue:\"\"},title:{type:ControlType.String,title:\"T\\xedtulo\",defaultValue:\"Embed\"},radius:{type:ControlType.Number,title:\"Raio\",min:0,max:40,defaultValue:16},activation:{type:ControlType.Enum,title:\"Ativa\\xe7\\xe3o\",options:[\"touch\",\"always\",\"never\"],optionTitles:[\"S\\xf3 toque\",\"Sempre\",\"Nunca\"],defaultValue:\"touch\",displaySegmentedControl:true,description:\"Camada que exige toque/clique antes de interagir, para n\\xe3o prender a rolagem.\"},overlayText:{type:ControlType.String,title:\"Texto toque\",defaultValue:\"Toque para interagir\",hidden:p=>p.activation===\"never\"},overlayTextDesktop:{type:ControlType.String,title:\"Texto clique\",defaultValue:\"Clique para interagir\",hidden:p=>p.activation!==\"always\"},ariaLabel:{type:ControlType.String,title:\"R\\xf3tulo acess\\xedvel\",defaultValue:\"\",description:\"Complemento lido por leitores de tela depois do texto vis\\xedvel (ex.: mapa de localiza\\xe7\\xe3o do Porto Batel). Vazio = usa o T\\xedtulo.\",hidden:p=>p.activation===\"never\"},overlayColor:{type:ControlType.Color,title:\"Fundo camada\",defaultValue:\"rgba(0,0,0,0.12)\",hidden:p=>p.activation===\"never\"},pillColor:{type:ControlType.Color,title:\"P\\xedlula\",defaultValue:\"rgba(20,20,20,0.86)\",hidden:p=>p.activation===\"never\"},pillTextColor:{type:ControlType.Color,title:\"Texto p\\xedlula\",defaultValue:\"#FFFFFF\",hidden:p=>p.activation===\"never\"},font:{type:ControlType.Font,title:\"Fonte\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:14,variant:\"Medium\",lineHeight:\"1.3em\",letterSpacing:\"0.01em\"},hidden:p=>p.activation===\"never\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IframeEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IframeEmbed.map"],"mappings":"A,4NAyBG,SAAwBkB,EAAY,EAAM,CAAC,GAAK,CAAC,MAAI,GAAG,QAAM,QAAQ,SAAO,GAAG,aAAW,QAAQ,cAAY,uBAAuB,qBAAmB,wBAAwB,YAAU,GAAG,eAAa,mBAAmB,YAAU,sBAAsB,gBAAc,UAAU,OAAK,SAAOC,EAAYC,EAASJ,EAAa,QAAQ,IAAIA,EAAa,OAAaK,EAAQrB,EAAO,IAAI,EAAQsB,EAAUtB,EAAO,IAAI,EAAQuB,EAAmBvB,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