{"version":3,"file":"Video_Combined_Overrides.DPt7loqd.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/FVRzfkLOVwmdcOU9qFPX/SPAdvzXmmClAPc6F21y4/Video_Combined_Overrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";// ============================================================\n// Combined Hero overrides — one file, three exported functions.\n//\n// ELEMENT → OVERRIDE TO APPLY\n// ───────────────────────────────────────────────────────────\n// \"Hero\" section         → withHero\n// \"Hero Video\" frame     → withHeroVideo\n// \"Theme Video\" frame    → withThemeVideo\n// ============================================================\n// Shared constants\nconst RATIO=960/1138// height as a proportion of width\n;const MIN_HEIGHT=960;const MAX_HEIGHT=1100;const DESKTOP_MIN=1138;const PHONE_MAX=809;const PHONE_VH=78// % of viewport height on phone\n;const THEME_PHONE_SCALE=1.25// Theme Video width scale on phone (125%)\n;// ─── Shared helpers ──────────────────────────────────────────\nfunction calcDesktopHeight(vw){const ideal=Math.round(Math.min(vw,1500)*RATIO);return Math.min(MAX_HEIGHT,Math.max(MIN_HEIGHT,ideal));}// Use window.innerWidth for breakpoint detection (reliable across all sizes).\n// Use Math.max(elWidth, window.innerWidth) only for desktop height calc\n// — on phone/tablet the element can overflow, inflating getBoundingClientRect.\nfunction getBreakpoint(){return window.innerWidth;}function getDesktopVw(el){return Math.max(el.getBoundingClientRect().width,window.innerWidth);}function fixVideoPlayback(container){const video=container.querySelector(\"video\");if(!video)return;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.setProperty(\"object-fit\",\"cover\",\"important\");video.style.setProperty(\"object-position\",\"50% 50%\",\"important\");if(video.paused)video.play().catch(()=>{});}function forceContainerChainFill(container){container.querySelectorAll(\"div\").forEach(div=>{if(div.hasAttribute(\"data-framer-background-image-wrapper\"))return;if(div.style.display===\"contents\")return;div.style.setProperty(\"width\",\"100%\",\"important\");div.style.setProperty(\"height\",\"100%\",\"important\");div.style.setProperty(\"max-width\",\"none\",\"important\");div.style.setProperty(\"min-width\",\"0\",\"important\");div.style.setProperty(\"min-height\",\"0\",\"important\");div.style.setProperty(\"aspect-ratio\",\"unset\",\"important\");});}// ─── 1. withHero ─────────────────────────────────────────────\n// Apply to the \"Hero\" section.\n// Desktop: width-based height calculation.\n// Phone: 78vh so text content has room against the video background.\n// Tablet: no override — Framer's native settings handle it.\nexport function withHero(Component){return props=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;const update=()=>{const hero=el.querySelector(\"[data-framer-name='Hero']\")||el.querySelector(\"section[class*='framer-15tqni2']\")||el.firstElementChild;if(!hero)return;const bp=getBreakpoint();if(bp>=DESKTOP_MIN){hero.style.setProperty(\"height\",`${calcDesktopHeight(getDesktopVw(hero))}px`,\"important\");}else if(bp<=PHONE_MAX){// Phone: give the Hero section enough height for text over video\nhero.style.setProperty(\"height\",`${PHONE_VH}vh`,\"important\");hero.style.setProperty(\"overflow\",\"hidden\",\"important\");}};requestAnimationFrame(update);window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}// ─── 2. withHeroVideo ────────────────────────────────────────\n// Apply to the \"Hero Video\" frame.\n// Desktop: width-based height + container chain fill + Vimeo fix.\n// Phone/Tablet: no height override — Framer's native settings handle it\n//   (720px Fixed, Absolute, bottom: -520px on phone).\n// All breakpoints: chromeless muted autoplay video.\nexport function withHeroVideo(Component){return props=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;const fix=()=>{const target=el.querySelector(\"[data-framer-name='Hero Video']\")||el.querySelector(\"[class*='framer-hb6eay']\")||el.firstElementChild;if(!target)return;const bp=getBreakpoint();if(bp>=DESKTOP_MIN){target.style.setProperty(\"height\",`${calcDesktopHeight(getDesktopVw(target))}px`,\"important\");forceContainerChainFill(target);// Fix Vimeo iframe if present\nconst iframe=target.querySelector(\"iframe\");if(iframe&&iframe.src.includes(\"vimeo.com\")){iframe.style.setProperty(\"width\",\"100%\",\"important\");iframe.style.setProperty(\"height\",\"100%\",\"important\");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();}}}else if(bp<=PHONE_MAX){// Phone: contain the CaaVideoPlayer width without changing height\ntarget.style.setProperty(\"overflow\",\"hidden\",\"important\");}fixVideoPlayback(target);};requestAnimationFrame(fix);const observer=new MutationObserver(()=>fix());observer.observe(el,{childList:true,subtree:true});window.addEventListener(\"resize\",fix);return()=>{observer.disconnect();window.removeEventListener(\"resize\",fix);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}// ─── 3. withThemeVideo ───────────────────────────────────────\n// Apply to the \"Theme Video\" frame.\n// Desktop: width-based height + container chain fill.\n// Phone: 125% width centered crop with overflow hidden.\n// All breakpoints: chromeless muted autoplay video.\nexport function withThemeVideo(Component){return props=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;const fix=()=>{const target=el.querySelector(\"[data-framer-name='Theme Video']\")||el.querySelector(\"[class*='framer-1p4xwut']\")||el.firstElementChild;if(!target)return;const bp=getBreakpoint();if(bp>=DESKTOP_MIN){target.style.setProperty(\"height\",`${calcDesktopHeight(getDesktopVw(target))}px`,\"important\");forceContainerChainFill(target);}else if(bp<=PHONE_MAX){// Centered crop at 125% width\ntarget.style.setProperty(\"overflow\",\"hidden\",\"important\");const container=target.querySelector(\"[class*='-container']\");if(container){const scalePercent=THEME_PHONE_SCALE*100;const offsetPercent=(THEME_PHONE_SCALE-1)/2*100;container.style.setProperty(\"width\",`${scalePercent}%`,\"important\");container.style.setProperty(\"height\",\"100%\",\"important\");container.style.setProperty(\"max-width\",\"none\",\"important\");container.style.setProperty(\"margin-left\",`-${offsetPercent}%`,\"important\");}}fixVideoPlayback(target);};requestAnimationFrame(fix);const observer=new MutationObserver(()=>fix());observer.observe(el,{childList:true,subtree:true});window.addEventListener(\"resize\",fix);return()=>{observer.disconnect();window.removeEventListener(\"resize\",fix);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHeroVideo\":{\"type\":\"reactHoc\",\"name\":\"withHeroVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHero\":{\"type\":\"reactHoc\",\"name\":\"withHero\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withThemeVideo\":{\"type\":\"reactHoc\",\"name\":\"withThemeVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video_Combined_Overrides.map"],"mappings":"kIAcA,SAAS,EAAkB,EAAG,CAAC,IAAM,EAAM,KAAK,MAAM,KAAK,IAAI,EAAG,KAAK,CAAC,EAAM,CAAC,OAAO,KAAK,IAAI,EAAW,KAAK,IAAI,EAAW,EAAM,CAAC,CAGrI,SAAS,GAAe,CAAC,OAAO,EAAO,WAAY,SAAS,EAAa,EAAG,CAAC,OAAO,KAAK,IAAI,EAAG,uBAAuB,CAAC,MAAM,EAAO,WAAW,CAAE,SAAS,EAAiB,EAAU,CAAC,IAAM,EAAM,EAAU,cAAc,QAAQ,CAAK,IAAa,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,YAAY,aAAa,QAAQ,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