{"version":3,"file":"Accessibility.CDffNoUB.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/LS2GjFIs0dBPHi38bCRL/LBVhSYqDco4vcE3p64J7/Accessibility.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";// ─── Visually hidden style (sr-only) ─────────────────────────────────────────\nconst srOnly={position:\"absolute\",width:\"1px\",height:\"1px\",padding:\"0\",margin:\"-1px\",overflow:\"hidden\",clip:\"rect(0,0,0,0)\",whiteSpace:\"nowrap\",border:\"0\"};// ─── hideFromADA ──────────────────────────────────────────────────────────────\n//\n// Use: purely decorative components (icons, Lottie animations, SVGs).\n//\n// display:contents makes the wrapper invisible to the layout engine — Framer\n// positioning and sizing are unaffected. aria-hidden on a parent element\n// propagates automatically to all descendants.\nexport function hideFromADA(Component){return props=>/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",role:\"presentation\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props,\"aria-hidden\":\"true\",role:\"presentation\"})});}// ─── withRoleImg ──────────────────────────────────────────────────────────────\n//\n// Use: visual diagram containers whose meaning is conveyed as a whole\n// (e.g. feedback loop, infographic) — where the individual child elements\n// are hidden via hideFromADA and the container carries the full description.\n//\n// A plain <div> ignores aria-label unless it has a role. role=\"img\" turns\n// the container into a labelled image region that screen readers announce.\n// Set the Aria Label in Framer's Accessibility panel — this override\n// ensures the label is actually picked up.\n//\n// display:contents — Framer layout and positioning are unaffected.\nexport function withRoleImg(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,role:\"img\"});}// ─── withAriaName / withAriaEmail / withAriaMessage ───────────────────────────\n//\n// Use: form fields that do not have a visible associated <label>.\nexport function withAriaName(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,\"aria-label\":\"Your Name\"});}export function withAriaEmail(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,\"aria-label\":\"Email Address\"});}export function withAriaMessage(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,\"aria-label\":\"Message\"});}export function withAriaPhone(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,\"aria-label\":\"Phone Number\"});}// ─── withAriaH1 ───────────────────────────────────────────────────────────────\n//\n// Use: pages where the visual heading is not a semantic <h1> in the DOM.\n// Renders the original component visually and injects a sr-only <h1>\n// for screen readers — no visual duplication.\nexport function withAriaH1(Component){return props=>/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(Component,{...props})}),/*#__PURE__*/_jsx(\"h1\",{style:srOnly,children:\"Wildfires are evolving. Our protection is too.\"})]});}// ─── withAriaDescription ──────────────────────────────────────────────────────\n//\n// Use: descriptive text blocks that need additional context\n// for screen readers without altering the visual layout.\nexport function withAriaDescription(Component){return props=>/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(Component,{...props})}),/*#__PURE__*/_jsx(\"span\",{style:srOnly,children:\"AF-31 stops fire before it starts. Without harming the planet. Built for sustainability and high performance, it protects homes, communities, and everything in between.\"})]});}// ─── withAriaYouTube1 ─────────────────────────────────────────────────────────\n//\n// Use: first YouTube embed on the Media page.\n// MutationObserver patches img alt, iframe title, and SVG roles after render.\n// display:contents on the wrapper ensures Framer layout is not affected.\nexport function withAriaYouTube1(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const ALT=\"M-Fire Technologies AF-31 fire suppression product demonstration\";const TITLE=\"M-Fire Technologies: AF-31 product video\";function applyA11y(){ref.current?.querySelectorAll('img[src*=\"ytimg.com\"]').forEach(img=>{if(!img.getAttribute(\"alt\")){img.setAttribute(\"alt\",ALT);}});ref.current?.querySelectorAll(\"iframe\").forEach(iframe=>{if(!iframe.title||iframe.title.toLowerCase()===\"youtube video\"){iframe.title=TITLE;}});ref.current?.querySelectorAll(\"svg\").forEach(svg=>{if(!svg.getAttribute(\"role\")){svg.setAttribute(\"role\",\"presentation\");svg.setAttribute(\"aria-hidden\",\"true\");svg.setAttribute(\"focusable\",\"false\");}});}applyA11y();const observer=new MutationObserver(applyA11y);observer.observe(ref.current,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}// ─── withAriaYouTube2 ─────────────────────────────────────────────────────────\n//\n// Use: second YouTube embed on the Media page.\n// Same strategy as withAriaYouTube1 — MutationObserver on the rendered DOM.\nexport function withAriaYouTube2(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const ALT=\"M-Fire Technologies wildfire property defense demonstration\";const TITLE=\"M-Fire Technologies: wildfire defense video\";function applyA11y(){ref.current?.querySelectorAll('img[src*=\"ytimg.com\"]').forEach(img=>{if(!img.getAttribute(\"alt\")){img.setAttribute(\"alt\",ALT);}});ref.current?.querySelectorAll(\"iframe\").forEach(iframe=>{if(!iframe.title||iframe.title.toLowerCase()===\"youtube video\"){iframe.title=TITLE;}});ref.current?.querySelectorAll(\"svg\").forEach(svg=>{if(!svg.getAttribute(\"role\")){svg.setAttribute(\"role\",\"presentation\");svg.setAttribute(\"aria-hidden\",\"true\");svg.setAttribute(\"focusable\",\"false\");}});}applyA11y();const observer=new MutationObserver(applyA11y);observer.observe(ref.current,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}// ─── withElfsightTitle ────────────────────────────────────────────────────────\n//\n// Use: Elfsight widget (Twitter/X feed) that injects iframes without an\n// accessible title. MutationObserver ensures async-loaded iframes also\n// receive the correct label.\nexport function withElfsightTitle(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const TITLE=\"M-Fire Technologies Twitter/X Feed\";function labelIframes(){ref.current?.querySelectorAll(\"iframe\").forEach(iframe=>{if(!iframe.title){iframe.title=TITLE;}if(!iframe.getAttribute(\"aria-label\")){iframe.setAttribute(\"aria-label\",TITLE);}});}labelIframes();const observer=new MutationObserver(labelIframes);observer.observe(ref.current,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,children:/*#__PURE__*/_jsx(Component,{...props})});};}// ─── withAriaDownload ─────────────────────────────────────────────────────────\n//\n// Use: each download row on the /media page (or applied on the link itself).\n//\n// Problem: all download links share the same visible text \"Download\" —\n// axe identical-links-same-purpose fires (WCAG 2.4.4 AA).\n//\n// Fix: MutationObserver finds the document title and sets aria-label.\n// Searches the override's own DOM first, then walks up the tree (max 5 levels).\n// display:contents — Framer layout unaffected.\nexport function withAriaDownload(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;function findTitle(container,link){const candidates=container.querySelectorAll(\"p, h1, h2, h3, h4, h5, span, div\");for(const el of Array.from(candidates)){const text=el.textContent?.trim()??\"\";const lower=text.toLowerCase();if(text.length>2&&text.length<200&&lower!==\"download\"&&lower!==\"download file\"&&!el.contains(link)&&el.children.length===0){return text;}}return\"\";}function patch(){if(!ref.current)return;const link=ref.current.querySelector(\"a[download]\");if(!link||link.getAttribute(\"aria-label\"))return;let title=findTitle(ref.current,link);if(!title){let parent=ref.current.parentElement;let depth=0;while(parent&&!title&&depth<5){title=findTitle(parent,link);parent=parent.parentElement;depth++;}}if(title){link.setAttribute(\"aria-label\",`Download ${title}`);}}patch();const observer=new MutationObserver(patch);observer.observe(document.body,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}// ─── withFormHoneypotFix ──────────────────────────────────────────────────────\n// Use: container externo do formulário em /contact-us (e qualquer form Framer).\n// Fix: Framer injeta honeypot inputs com aria-hidden=\"true\" mas sem tabindex=\"-1\",\n// tornando-os focáveis por AT. O observer corrige isso após o render.\nexport function withFormHoneypotFix(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current)return;function patchHoneypots(){ref.current?.querySelectorAll('input[aria-hidden=\"true\"]').forEach(input=>{input.setAttribute(\"tabindex\",\"-1\");});}patchHoneypots();const observer=new MutationObserver(patchHoneypots);observer.observe(ref.current,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}export function withInquireA11y(Component){return function InquireA11y(props){function handleKeyDown(e){// <a role=\"button\"> must respond to Space.\n// Native links only fire onClick on Enter — Space is ignored.\nif(e.key===\" \"){e.preventDefault();props.onClick?.(e);}props.onKeyDown?.(e);}return /*#__PURE__*/_jsx(Component,{...props,role:\"button\",\"aria-haspopup\":\"dialog\",onKeyDown:handleKeyDown});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withRoleImg\":{\"type\":\"reactHoc\",\"name\":\"withRoleImg\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaYouTube2\":{\"type\":\"reactHoc\",\"name\":\"withAriaYouTube2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaEmail\":{\"type\":\"reactHoc\",\"name\":\"withAriaEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInquireA11y\":{\"type\":\"reactHoc\",\"name\":\"withInquireA11y\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaMessage\":{\"type\":\"reactHoc\",\"name\":\"withAriaMessage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaDescription\":{\"type\":\"reactHoc\",\"name\":\"withAriaDescription\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaName\":{\"type\":\"reactHoc\",\"name\":\"withAriaName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFormHoneypotFix\":{\"type\":\"reactHoc\",\"name\":\"withFormHoneypotFix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideFromADA\":{\"type\":\"reactHoc\",\"name\":\"hideFromADA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaPhone\":{\"type\":\"reactHoc\",\"name\":\"withAriaPhone\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaH1\":{\"type\":\"reactHoc\",\"name\":\"withAriaH1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaDownload\":{\"type\":\"reactHoc\",\"name\":\"withAriaDownload\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withElfsightTitle\":{\"type\":\"reactHoc\",\"name\":\"withElfsightTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAriaYouTube1\":{\"type\":\"reactHoc\",\"name\":\"withAriaYouTube1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Accessibility.map"],"mappings":"yHAQA,SAAgB,EAAY,EAAU,CAAC,MAAO,IAAoB,EAAK,MAAM,CAAC,cAAc,OAAO,KAAK,eAAe,MAAM,CAAC,QAAQ,WAAW,CAAC,SAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,cAAc,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,CAY7O,SAAgB,EAAY,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,MAAM,CAAC,CAGvG,SAAgB,EAAa,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,YAAY,CAAC,CAAE,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,gBAAgB,CAAC,CAAE,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,aAAa,UAAU,CAAC,CAAE,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAA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