{"version":3,"file":"Lightbox.zoKchZSj.mjs","names":["useState","_Fragment","useRef"],"sources":["https:/framerusercontent.com/modules/B0JfxNKCxhQ6IXTCkmVI/Zl1lVCqyJq5Dprcp5AMw/Lightbox.js"],"sourcesContent":["/*\n * Lightbox for Framer (Modified)\n * ✅ White background\n * ✅ No hover overlay on gallery images\n * ✅ Keeps arrows and full functionality\n * ✅ Light grey icons with no circle background\n */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{createPortal}from\"react-dom\";const arrowSizeMobile=30;const arrowSizeDesktop=40;const arrowColor=\"#ccc\";const arrowHoverColor=\"#aaa\";const closeButtonSize=30;const closeColor=\"#ccc\";const closeHoverColor=\"#aaa\";const lightboxBackground=\"#ffffff\";const galleryStore={images:[],currentIndex:0,registerImage(image){if(!this.images.includes(image)){this.images.push(image);}},getCurrentImage(){return this.images[this.currentIndex];},goNext(){this.currentIndex=(this.currentIndex+1)%this.images.length;},goPrevious(){this.currentIndex=(this.currentIndex-1+this.images.length)%this.images.length;},reset(){this.images=[];this.currentIndex=0;}};const useScrollLock=()=>{const scrollYRef=useRef(0);const lockScroll=()=>{scrollYRef.current=window.scrollY;document.body.style.position=\"fixed\";document.body.style.top=`-${scrollYRef.current}px`;document.body.style.width=\"100%\";document.body.style.overflow=\"hidden\";};const unlockScroll=()=>{document.body.style.position=\"\";document.body.style.top=\"\";document.body.style.width=\"\";document.body.style.overflow=\"unset\";window.scrollTo(0,scrollYRef.current);};return{lockScroll,unlockScroll};};export function withGallery(Component){return props=>{const[hasMounted,setHasMounted]=useState(false);const[isMobile,setIsMobile]=useState(false);const[isOpen,setIsOpen]=useState(false);const[currentImage,setCurrentImage]=useState(null);const[swipeStartX,setSwipeStartX]=useState(0);const{lockScroll,unlockScroll}=useScrollLock();const dragConstraintsRef=useRef(null);const[isDragging,setIsDragging]=useState(false);const src=props.background?.src;if(src&&!galleryStore.images.includes(src)){galleryStore.registerImage(src);}const openGallery=event=>{event.stopPropagation();event.preventDefault();if(!src)return;lockScroll();setCurrentImage(src);galleryStore.currentIndex=galleryStore.images.indexOf(src);setIsOpen(true);};const closeGallery=()=>{setIsOpen(false);setCurrentImage(null);unlockScroll();};const showNextImage=()=>{galleryStore.goNext();setCurrentImage(galleryStore.getCurrentImage());};const showPreviousImage=()=>{galleryStore.goPrevious();setCurrentImage(galleryStore.getCurrentImage());};const handleKeyDown=event=>{if(!isOpen)return;if(event.key===\"ArrowRight\")showNextImage();if(event.key===\"ArrowLeft\")showPreviousImage();if(event.key===\"Escape\")closeGallery();};const handleTouchStart=e=>{setSwipeStartX(e.touches[0].clientX);};const handleTouchEnd=e=>{const swipeEndX=e.changedTouches[0].clientX;const deltaX=swipeStartX-swipeEndX;if(Math.abs(deltaX)>50){if(deltaX>0)showNextImage();else showPreviousImage();}};const handleDrag=(_,info)=>{if(!isMobile)return{y:0};return{y:Math.min(Math.max(info.offset.y,-100),100)};};useEffect(()=>{setHasMounted(true);return()=>galleryStore.reset();},[]);useEffect(()=>{const handleResize=()=>{const isMobile=window.matchMedia(\"(pointer: coarse)\").matches||window.innerWidth<=768;setIsMobile(isMobile);};handleResize();window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);},[]);useEffect(()=>{if(isOpen)window.addEventListener(\"keydown\",handleKeyDown);return()=>window.removeEventListener(\"keydown\",handleKeyDown);},[isOpen]);const portalTarget=hasMounted?document.body:null;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,onClick:openGallery,style:{...props.style,position:\"relative\",cursor:\"pointer\",userSelect:\"none\"}}),hasMounted&&portalTarget&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(AnimatePresence,{children:isOpen&&currentImage&&/*#__PURE__*/_jsxs(motion.div,{onClick:event=>{if(!isDragging&&event.target===event.currentTarget)closeGallery();},style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",background:lightboxBackground,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:1e5},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[/*#__PURE__*/_jsx(motion.img,{src:currentImage,loading:\"lazy\",style:{maxWidth:isMobile?\"95vw\":\"calc(90vw - 100px)\",maxHeight:\"85vh\",touchAction:\"none\",objectFit:\"contain\",borderRadius:\"0\",cursor:isMobile?\"grab\":\"auto\"},initial:{scale:.8},animate:{scale:1},drag:isMobile?\"y\":false,dragConstraints:{top:0,bottom:0},dragElastic:.2,whileTap:{cursor:\"grabbing\"},onDrag:handleDrag,onTouchStart:handleTouchStart,onTouchEnd:handleTouchEnd,onDragStart:()=>setIsDragging(true),onDragEnd:()=>setIsDragging(false)}),!isMobile&&galleryStore.images.length>1&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(motion.div,{onClick:e=>{e.stopPropagation();showPreviousImage();},style:{position:\"absolute\",top:\"50%\",left:\"30px\",transform:\"translateY(-50%)\",cursor:\"pointer\",zIndex:100001},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 6L9 12L15 18\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})}),/*#__PURE__*/_jsx(motion.div,{onClick:e=>{e.stopPropagation();showNextImage();},style:{position:\"absolute\",top:\"50%\",right:\"30px\",transform:\"translateY(-50%)\",cursor:\"pointer\",zIndex:100001},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 6L15 12L9 18\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),/*#__PURE__*/_jsx(motion.div,{onClick:closeGallery,style:{position:\"absolute\",top:\"20px\",right:\"20px\",cursor:\"pointer\",zIndex:100001},children:/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 6L18 18M6 18L18 6\",stroke:closeColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]})}),portalTarget)]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withGallery\":{\"type\":\"reactHoc\",\"name\":\"withGallery\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Lightbox.map"],"mappings":"6NAMmyC,SAAgB,EAAY,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAS,EAAK,EAAO,CAAC,EAAS,GAAaA,EAAS,EAAK,EAAO,CAAC,EAAO,GAAWA,EAAS,EAAK,EAAO,CAAC,EAAa,GAAiBA,EAAS,IAAI,EAAO,CAAC,EAAY,GAAgBA,EAAS,CAAC,EAAO,CAAC,aAAW,gBAAc,EAAc,EAA2B,EAAO,IAAI,EAAE,GAAK,CAAC,EAAW,GAAeA,EAAS,EAAK,EAAQ,EAAI,EAAM,YAAY,IAAO,GAAK,CAAC,EAAa,OAAO,SAAS,CAAG,GAAG,EAAa,cAAc,CAAG,EAAG,IAAM,EAAY,GAAO,CAAC,EAAM,gBAAgB,EAAE,EAAM,eAAe,EAAM,IAAW,EAAW,EAAE,EAAgB,CAAG,EAAE,EAAa,aAAa,EAAa,OAAO,QAAQ,CAAG,EAAE,EAAU,EAAI,EAAE,EAAQ,MAAiB,CAAC,EAAU,EAAK,EAAE,EAAgB,IAAI,EAAE,EAAa,CAAE,EAAQ,MAAkB,CAAC,EAAa,OAAO,EAAE,EAAgB,EAAa,gBAAgB,CAAC,CAA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