{"version":3,"file":"CaaVideoPlayer_Override.Ce5497xk.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/87FhZpiC0d86437fqcDn/TBdhi0fDJgOloCsZDWA8/CaaVideoPlayer_Override.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";// Apply this override to the \"Hero Video\" frame (parent of CaaVideoPlayer).\n// Works with both Mux and Vimeo sources.\n// - Forces the ENTIRE container chain to fill the parent (no gaps)\n// - For Mux (<video> tag): adds muted, removes controls, sets object-fit cover\n// - For Vimeo (iframe): adds background=1 for chromeless mode\nexport function withBackgroundVideo(Component){return props=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;const fix=()=>{// Force every div in the chain between Hero Video and\n// the video/iframe to fill 100% width and height.\n// This catches -container divs, display:contents wrappers,\n// and the CaaVideoPlayer's own sized container.\nconst allDivs=el.querySelectorAll(\"div\");allDivs.forEach(div=>{// Skip the background pattern overlay\nif(div.hasAttribute(\"data-framer-background-image-wrapper\"))return;const style=div.style;// Force all intermediate containers to fill\nif(style.display!==\"contents\"){style.width=\"100%\";style.height=\"100%\";}// Strip any hardcoded constraints from CaaVideoPlayer\nif(style.maxWidth)style.maxWidth=\"none\";if(style.minWidth)style.minWidth=\"0\";if(style.minHeight)style.minHeight=\"0\";if(style.aspectRatio)style.aspectRatio=\"unset\";});// Fix Mux <video> element\nconst video=el.querySelector(\"video\");if(video){video.muted=true;video.setAttribute(\"muted\",\"\");video.removeAttribute(\"controls\");video.controls=false;video.autoplay=true;video.loop=true;video.playsInline=true;video.setAttribute(\"playsinline\",\"\");video.style.objectFit=\"cover\";video.style.objectPosition=\"50% 50%\";video.style.width=\"100%\";video.style.height=\"100%\";if(video.paused){video.play().catch(()=>{});}}// Fix Vimeo iframe (if present instead of Mux)\nconst iframe=el.querySelector(\"iframe\");if(iframe&&iframe.src.includes(\"vimeo.com\")){// Force iframe container sizing\niframe.style.width=\"100%\";iframe.style.height=\"100%\";const url=new URL(iframe.src);if(!url.searchParams.has(\"background\")){url.searchParams.set(\"background\",\"1\");url.searchParams.set(\"controls\",\"0\");url.searchParams.set(\"title\",\"0\");url.searchParams.set(\"byline\",\"0\");url.searchParams.set(\"portrait\",\"0\");iframe.src=url.toString();}}};fix();const observer=new MutationObserver(()=>fix());observer.observe(el,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withBackgroundVideo\":{\"type\":\"reactHoc\",\"name\":\"withBackgroundVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CaaVideoPlayer_Override.map"],"mappings":"yHAKA,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAUyY,OAVxY,MAAc,CAAC,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,EAAG,OAAO,IAAM,MAAQ,CAIvI,EAAG,iBAAiB,MAAM,CAAS,QAAQ,GAAK,CAC9D,GAAG,EAAI,aAAa,uCAAuC,CAAC,OAAO,IAAM,EAAM,EAAI,MAChF,EAAM,UAAU,aAAY,EAAM,MAAM,OAAO,EAAM,OAAO,QAC/D,AAAkB,EAAM,WAAS,OAAO,AAAkB,EAAM,WAAS,IAAI,AAAmB,EAAM,YAAU,IAAI,AAAqB,EAAM,cAAY,SAAU,CACrK,IAAM,EAAM,EAAG,cAAc,QAAQ,CAAI,IAAO,EAAM,MAAM,GAAK,EAAM,aAAa,QAAQ,GAAG,CAAC,EAAM,gBAAgB,WAAW,CAAC,EAAM,SAAS,GAAM,EAAM,SAAS,GAAK,EAAM,KAAK,GAAK,EAAM,YAAY,GAAK,EAAM,aAAa,cAAc,GAAG,CAAC,EAAM,MAAM,UAAU,QAAQ,EAAM,MAAM,eAAe,UAAU,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