{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/EaBYjiJ5GrWja8KA2ZyM/jns8zcPG3Vdy1nq322bO/Lightbox_Gallery_1.js"],
  "sourcesContent": ["/**\n * Lightbox Component\n * Licensed under CC0-1.0 - Free for personal and commercial use with attribution\n * Made by Stefan (x.com/hyggemethat) at pixcodrops.com\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\";// Constants for customization\nconst arrowSizeMobile=30;const arrowSizeDesktop=40;const arrowBackground=\"#4D4D4D\";const arrowHoverBackground=\"#707070\";const closeButtonSize=30;const closeButtonBackground=\"#4D4D4D\";const closeButtonHoverBackground=\"#707070\";const lightboxBackground=\"rgba(03, 07, 11, 0.95)\";const imageHoverOverlay=\"rgba(03, 07, 11, 0.5)\"// Mant\u00E9m apenas o efeito de escurecimento no hover\n;// Store for managing the gallery\nconst 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;}};// Scroll management utilities\nconst useScrollLock=()=>{const scrollYRef=useRef(0);const lockScroll=()=>{if(typeof window===\"undefined\")return;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=()=>{if(typeof window===\"undefined\")return;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};};// Function starts here\nexport function withGallery(Component){return props=>{const[hasMounted,setHasMounted]=useState(false);const[isOpen,setIsOpen]=useState(false);const[currentImage,setCurrentImage]=useState(null);const{lockScroll,unlockScroll}=useScrollLock();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();};useEffect(()=>{setHasMounted(true);return()=>galleryStore.reset();},[]);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\"},children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:imageHoverOverlay,opacity:0},whileHover:{opacity:1,transition:{duration:.2}}})}),hasMounted&&portalTarget&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(AnimatePresence,{children:isOpen&&currentImage&&/*#__PURE__*/_jsxs(motion.div,{id:\"lightbox-background\",onClick: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,style:{maxWidth:\"90vw\",maxHeight:\"85vh\",objectFit:\"contain\",borderRadius:\"10px\"},initial:{scale:.8},animate:{scale:1}}),/*#__PURE__*/_jsx(motion.div,{onClick:closeGallery,style:{position:\"absolute\",top:\"20px\",right:\"20px\",width:closeButtonSize,height:closeButtonSize,cursor:\"pointer\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",background:closeButtonBackground,borderRadius:\"50%\",zIndex:100001},whileHover:{background:closeButtonHoverBackground},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:\"#fff\",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_Gallery_1.map"],
  "mappings": "4KAKwH,IAAMA,EAAgB,GAASC,EAAsB,UAAgBC,EAA2B,UAAgBC,EAAmB,yBAA+BC,EAAkB,wBAEtSC,EAAa,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,cAAcC,EAAM,CAAK,KAAK,OAAO,SAASA,CAAK,GAAG,KAAK,OAAO,KAAKA,CAAK,CAAG,EAAE,iBAAiB,CAAC,OAAO,KAAK,OAAO,KAAK,YAAY,CAAE,EAAE,QAAQ,CAAC,KAAK,cAAc,KAAK,aAAa,GAAG,KAAK,OAAO,MAAO,EAAE,YAAY,CAAC,KAAK,cAAc,KAAK,aAAa,EAAE,KAAK,OAAO,QAAQ,KAAK,OAAO,MAAO,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,EAAE,KAAK,aAAa,CAAE,CAAC,EACjYC,EAAc,IAAI,CAAC,IAAMC,EAAWC,EAAO,CAAC,EAAoe,MAAM,CAAC,WAAxd,I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AC,MAAM,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAee,EAAKC,EAAO,IAAI,CAAC,QAAQT,EAAa,MAAM,CAAC,SAAS,WAAW,IAAI,OAAO,MAAM,OAAO,MAAM1B,EAAgB,OAAOA,EAAgB,OAAO,UAAU,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,WAAWC,EAAsB,aAAa,MAAM,OAAO,MAAM,EAAE,WAAW,CAAC,WAAWC,CAA0B,EAAE,SAAsBgC,EAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,SAAsBA,EAAK,OAAO,CAAC,EAAE,uBAAuB,OAAO,OAAO,YAAY,IAAI,cAAc,QAAQ,eAAe,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEH,CAAY,CAAC,CAAC,CAAC,CAAE,CAAE",
  "names": ["closeButtonSize", "closeButtonBackground", "closeButtonHoverBackground", "lightboxBackground", "imageHoverOverlay", "galleryStore", "image", "useScrollLock", "scrollYRef", "pe", "window", "withGallery", "Component", "props", "hasMounted", "setHasMounted", "ye", "isOpen", "setIsOpen", "currentImage", "setCurrentImage", "lockScroll", "unlockScroll", "src", "openGallery", "event", "closeGallery", "showNextImage", "showPreviousImage", "handleKeyDown", "ue", "portalTarget", "u", "l", "p", "motion", "Ga", "AnimatePresence"]
}
