{"version":3,"file":"IndustryCarouselOverrides.AmMvJ_db.mjs","names":["useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/A87m6nKxz9EjrQXvi5de/zL5qmyYhw3yx9Njychuq/IndustryCarouselOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useState}from\"react\";function getCarouselElement(){if(typeof document===\"undefined\")return null;return document.getElementById(\"industries-carousel\");}function getScrollAmount(container){const containerWidth=container.clientWidth||0;if(containerWidth<=0)return 220;const proportionalAmount=Math.round(containerWidth*.7);return Math.max(160,Math.min(260,proportionalAmount));}function getEdgeState(container){const maxScrollLeft=Math.max(0,container.scrollWidth-container.clientWidth);const epsilon=2;return{atStart:container.scrollLeft<=epsilon,atEnd:container.scrollLeft>=maxScrollLeft-epsilon};}function useCarouselEdgeState(){const[edgeState,setEdgeState]=useState({atStart:false,atEnd:false});const updateState=useCallback(()=>{const container=getCarouselElement();if(!container){startTransition(()=>setEdgeState({atStart:true,atEnd:true}));return;}const nextState=getEdgeState(container);startTransition(()=>setEdgeState(nextState));},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const container=getCarouselElement();if(!container){updateState();return;}updateState();container.addEventListener(\"scroll\",updateState,{passive:true});window.addEventListener(\"resize\",updateState);return()=>{container.removeEventListener(\"scroll\",updateState);window.removeEventListener(\"resize\",updateState);};},[updateState]);return edgeState;}function scrollCarousel(direction){const container=getCarouselElement();if(!container)return;const amount=getScrollAmount(container);const delta=direction===\"left\"?-amount:amount;container.scrollBy({left:delta,behavior:\"smooth\"});}export function IndustryCarouselPrevious(Component){return /*#__PURE__*/forwardRef(function IndustryCarouselPreviousOverride(props,ref){const{atStart}=useCarouselEdgeState();const isDisabled=useMemo(()=>atStart,[atStart]);const handleClick=useCallback(event=>{if(props&&typeof props.onClick===\"function\")props.onClick(event);if(!isDisabled)scrollCarousel(\"left\");},[props,isDisabled]);const handleTap=useCallback((...args)=>{if(props&&typeof props.onTap===\"function\")props.onTap(...args);if(!isDisabled)scrollCarousel(\"left\");},[props,isDisabled]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick,onTap:handleTap,style:{...props?.style,opacity:isDisabled?.4:props?.style?.opacity??1,pointerEvents:isDisabled?\"none\":props?.style?.pointerEvents},\"aria-disabled\":isDisabled});});}export function IndustryCarouselNext(Component){return /*#__PURE__*/forwardRef(function IndustryCarouselNextOverride(props,ref){const{atEnd}=useCarouselEdgeState();const isDisabled=useMemo(()=>atEnd,[atEnd]);const handleClick=useCallback(event=>{if(props&&typeof props.onClick===\"function\")props.onClick(event);if(!isDisabled)scrollCarousel(\"right\");},[props,isDisabled]);const handleTap=useCallback((...args)=>{if(props&&typeof props.onTap===\"function\")props.onTap(...args);if(!isDisabled)scrollCarousel(\"right\");},[props,isDisabled]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick,onTap:handleTap,style:{...props?.style,opacity:isDisabled?.4:props?.style?.opacity??1,pointerEvents:isDisabled?\"none\":props?.style?.pointerEvents},\"aria-disabled\":isDisabled});});}function getServicesCarouselElement(){if(typeof document===\"undefined\")return null;return document.getElementById(\"services-carousel\");}function useServicesCarouselEdgeState(){const[edgeState,setEdgeState]=useState({atStart:false,atEnd:false});const updateState=useCallback(()=>{const container=getServicesCarouselElement();if(!container){startTransition(()=>setEdgeState({atStart:true,atEnd:true}));return;}const nextState=getEdgeState(container);startTransition(()=>setEdgeState(nextState));},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const container=getServicesCarouselElement();if(!container){updateState();return;}updateState();container.addEventListener(\"scroll\",updateState,{passive:true});window.addEventListener(\"resize\",updateState);return()=>{container.removeEventListener(\"scroll\",updateState);window.removeEventListener(\"resize\",updateState);};},[updateState]);return edgeState;}function scrollServicesCarousel(direction){const container=getServicesCarouselElement();if(!container)return;const amount=getScrollAmount(container);const delta=direction===\"left\"?-amount:amount;container.scrollBy({left:delta,behavior:\"smooth\"});}export function ServicesCarouselPrevious(Component){return /*#__PURE__*/forwardRef(function ServicesCarouselPreviousOverride(props,ref){const{atStart}=useServicesCarouselEdgeState();const isDisabled=useMemo(()=>atStart,[atStart]);const handleClick=useCallback(event=>{if(props&&typeof props.onClick===\"function\")props.onClick(event);if(!isDisabled)scrollServicesCarousel(\"left\");},[props,isDisabled]);const handleTap=useCallback((...args)=>{if(props&&typeof props.onTap===\"function\")props.onTap(...args);if(!isDisabled)scrollServicesCarousel(\"left\");},[props,isDisabled]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick,onTap:handleTap,style:{...props?.style,opacity:isDisabled?.4:props?.style?.opacity??1,pointerEvents:isDisabled?\"none\":props?.style?.pointerEvents},\"aria-disabled\":isDisabled});});}export function ServicesCarouselNext(Component){return /*#__PURE__*/forwardRef(function ServicesCarouselNextOverride(props,ref){const{atEnd}=useServicesCarouselEdgeState();const isDisabled=useMemo(()=>atEnd,[atEnd]);const handleClick=useCallback(event=>{if(props&&typeof props.onClick===\"function\")props.onClick(event);if(!isDisabled)scrollServicesCarousel(\"right\");},[props,isDisabled]);const handleTap=useCallback((...args)=>{if(props&&typeof props.onTap===\"function\")props.onTap(...args);if(!isDisabled)scrollServicesCarousel(\"right\");},[props,isDisabled]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick,onTap:handleTap,style:{...props?.style,opacity:isDisabled?.4:props?.style?.opacity??1,pointerEvents:isDisabled?\"none\":props?.style?.pointerEvents},\"aria-disabled\":isDisabled});});}export function ServicesHeroArtworkFraming(Component){return /*#__PURE__*/forwardRef(function ServicesHeroArtworkFramingOverride(props,ref){const viewportWidth=useMemo(()=>{if(typeof window!==\"undefined\")return window.innerWidth;return 1200;},[]);const responsiveBackgroundStyle=useMemo(()=>{if(viewportWidth<=809)return{};if(viewportWidth<=1199){return{backgroundPosition:\"-20% center\",backgroundSize:\"80% auto\"};}return{backgroundPosition:\"left center\",backgroundSize:\"cover\"};},[viewportWidth]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props?.style,...responsiveBackgroundStyle}});});}export function ContainBackgroundImage(Component){return /*#__PURE__*/forwardRef(function ContainBackgroundImageOverride(props,ref){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props?.style,backgroundSize:\"contain\",backgroundPosition:\"center center\",backgroundRepeat:\"no-repeat\"}});});}export function NaturalEmailArtwork(Component){return /*#__PURE__*/forwardRef(function NaturalEmailArtworkOverride(props,ref){return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props?.style,backgroundSize:\"contain\",backgroundPosition:\"center center\",backgroundRepeat:\"no-repeat\",aspectRatio:\"1448 / 1086\",height:\"auto\",overflow:\"visible\",backgroundColor:\"transparent\",border:\"none\",boxShadow:\"none\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"IndustryCarouselNext\":{\"type\":\"reactHoc\",\"name\":\"IndustryCarouselNext\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ServicesHeroArtworkFraming\":{\"type\":\"reactHoc\",\"name\":\"ServicesHeroArtworkFraming\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"NaturalEmailArtwork\":{\"type\":\"reactHoc\",\"name\":\"NaturalEmailArtwork\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ServicesCarouselPrevious\":{\"type\":\"reactHoc\",\"name\":\"ServicesCarouselPrevious\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ServicesCarouselNext\":{\"type\":\"reactHoc\",\"name\":\"ServicesCarouselNext\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ContainBackgroundImage\":{\"type\":\"reactHoc\",\"name\":\"ContainBackgroundImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"IndustryCarouselPrevious\":{\"type\":\"reactHoc\",\"name\":\"IndustryCarouselPrevious\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IndustryCarouselOverrides.map"],"mappings":"mKAAgI,S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