{"version":3,"file":"shared.CLiADtQL.mjs","names":["fonts","css","className","React.useState","prev"],"sources":["https:/framerusercontent.com/modules/Ya2WU5ezJvUEJxd4HbZK/0sZ4uU08lsN5eo40s2jV/QehPJxFYg.js","https:/framerusercontent.com/modules/f2xh49ZycE7ha5P42bsg/MQBz6UgmBvUtJs1afge0/TukSLRmq2.js","https:/framerusercontent.com/modules/6KBt4duxBvVDnr5g82lR/YKqOufOOqv6KBnP8aRC3/Gallary.js","https:/framerusercontent.com/modules/e50exgZMLUtY60EPYFQO/6j8o4kkr61J6B5DZNEms/siteMetadata.js"],"sourcesContent":["// Generated by Framer (4255370)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Cormorant Garamond-700\",\"GF;Cormorant Garamond-700italic\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Cormorant Garamond\",source:\"google\",style:\"normal\",uiFamilyName:\"Cormorant Garamond\",url:\"https://fonts.gstatic.com/s/cormorantgaramond/v21/co3umX5slCNuHLi8bLeY9MK7whWMhyjypVO7abI26QOD_hg9GnbEi_s4Mfs.woff2\",weight:\"700\"},{cssFamilyName:\"Cormorant Garamond\",source:\"google\",style:\"italic\",uiFamilyName:\"Cormorant Garamond\",url:\"https://fonts.gstatic.com/s/cormorantgaramond/v21/co3smX5slCNuHLi8bLeY9MK7whWMhyjYrGFEsdtdc62E6zd5FTfOitk9Ifu5UQ.woff2\",weight:\"700\"}]}];export const css=['.framer-pRy70 .framer-styles-preset-d3msc6:not(.rich-text-wrapper), .framer-pRy70 .framer-styles-preset-d3msc6.rich-text-wrapper p { --framer-font-family: \"Cormorant Garamond\", \"Cormorant Garamond Placeholder\", serif; --framer-font-family-italic: \"Cormorant Garamond\", \"Cormorant Garamond Placeholder\", serif; --framer-font-open-type-features: normal; --framer-font-size: 15px; --framer-font-style: normal; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 700; --framer-font-weight-italic: 700; --framer-letter-spacing: 0em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: #4d4d4d; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-pRy70\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (8e1ebfe)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Cormorant Garamond-italic\",\"GF;Cormorant Garamond-italic\",\"GF;Cormorant Garamond-700italic\",\"GF;Cormorant Garamond-italic\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Cormorant Garamond\",source:\"google\",style:\"italic\",uiFamilyName:\"Cormorant Garamond\",url:\"https://fonts.gstatic.com/s/cormorantgaramond/v21/co3smX5slCNuHLi8bLeY9MK7whWMhyjYrGFEsdtdc62E6zd58jDOitk9Ifu5UQ.woff2\",weight:\"400\"},{cssFamilyName:\"Cormorant Garamond\",source:\"google\",style:\"italic\",uiFamilyName:\"Cormorant Garamond\",url:\"https://fonts.gstatic.com/s/cormorantgaramond/v21/co3smX5slCNuHLi8bLeY9MK7whWMhyjYrGFEsdtdc62E6zd5FTfOitk9Ifu5UQ.woff2\",weight:\"700\"}]}];export const css=['.framer-idBth .framer-styles-preset-l8gicn:not(.rich-text-wrapper), .framer-idBth .framer-styles-preset-l8gicn.rich-text-wrapper h6 { --framer-font-family: \"Cormorant Garamond\", \"Cormorant Garamond Placeholder\", serif; --framer-font-family-bold: \"Cormorant Garamond\", \"Cormorant Garamond Placeholder\", serif; --framer-font-family-bold-italic: \"Cormorant Garamond\", \"Cormorant Garamond Placeholder\", serif; --framer-font-family-italic: \"Cormorant Garamond\", \"Cormorant Garamond Placeholder\", serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: italic; --framer-font-style-bold: italic; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 400; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #4d4d4d; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-idBth\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const cache=new Map;function preloadAndDecode(src){if(!src)return Promise.resolve();const existing=cache.get(src);if(existing)return existing.promise;const img=new Image;// Hint: eager is relevant on <img>, but preloading via Image() is inherently eager.\nimg.decoding=\"async\";const promise=new Promise((resolve,reject)=>{img.onload=async()=>{try{// decode() prevents the \"loaded but not yet painted\" jank where the layout jumps/flash happens\nif(\"decode\"in img){await img.decode();}resolve();}catch{// If decode fails (Safari edge cases), still resolve to avoid blocking\nresolve();}};img.onerror=()=>reject(new Error(`Failed to load: ${src}`));});cache.set(src,{status:\"pending\",promise});img.src=src;promise.then(()=>{const entry=cache.get(src);if(entry)entry.status=\"ready\";}).catch(()=>{const entry=cache.get(src);if(entry)entry.status=\"error\";});return promise;}function isReady(src){const entry=cache.get(src);return entry?.status===\"ready\";}export default function ClickGallery(props){const images=props.images||[];const hasImages=images.length>0;const[targetIndex,setTargetIndex]=React.useState(0);const[displayIndex,setDisplayIndex]=React.useState(0);const[hoverSide,setHoverSide]=React.useState(null);const[mouse,setMouse]=React.useState({x:0,y:0});// Preload all images whenever the list changes\nReact.useEffect(()=>{if(!hasImages)return;// Reset indices safely if the list changes\nsetTargetIndex(0);setDisplayIndex(0);const tasks=images.map(it=>it?.image).filter(Boolean).map(src=>preloadAndDecode(src));// Fire and forget; we do not block UI\nPromise.allSettled(tasks).catch(()=>{});},[hasImages,images]);// When targetIndex changes, only swap displayIndex once that image is ready+decoded\nReact.useEffect(()=>{if(!hasImages)return;const src=images[targetIndex]?.image;if(!src)return;let cancelled=false;// If already ready, swap immediately (no fade)\nif(isReady(src)){setDisplayIndex(targetIndex);return;}// Otherwise wait until it’s loaded+decoded, then swap\npreloadAndDecode(src).then(()=>{if(!cancelled)setDisplayIndex(targetIndex);}).catch(()=>{// If load fails, do nothing (keep current displayIndex)\n});return()=>{cancelled=true;};},[hasImages,targetIndex,images]);const next=()=>{if(!hasImages)return;setTargetIndex(prev=>(prev+1)%images.length);};const prev=()=>{if(!hasImages)return;setTargetIndex(prev=>(prev-1+images.length)%images.length);};if(!hasImages){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#f2f2f2\",color:\"#999\",fontSize:14},children:\"Add images in the properties panel\"});}const current=images[displayIndex];const fit=current.fit||\"cover\";const handleMouseMove=e=>{const rect=e.currentTarget.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;setMouse({x,y});setHoverSide(x<rect.width/2?\"left\":\"right\");};return /*#__PURE__*/_jsxs(\"div\",{onMouseMove:handleMouseMove,onMouseLeave:()=>setHoverSide(null),style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",cursor:\"none\",background:\"transparent\"},children:[/*#__PURE__*/_jsx(\"img\",{src:current.image,alt:\"Gallery\",loading:\"eager\",decoding:\"async\",style:{width:\"100%\",height:\"100%\",objectFit:fit,display:\"block\",userSelect:\"none\",pointerEvents:\"none\",background:\"transparent\"}}),/*#__PURE__*/_jsx(\"div\",{onClick:prev,style:{position:\"absolute\",left:0,top:0,width:\"50%\",height:\"100%\"}}),/*#__PURE__*/_jsx(\"div\",{onClick:next,style:{position:\"absolute\",right:0,top:0,width:\"50%\",height:\"100%\"}}),hoverSide&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:mouse.x,top:mouse.y,transform:\"translate(-50%, -50%)\",pointerEvents:\"none\",fontSize:32,color:\"#808080\",fontWeight:500,userSelect:\"none\"},children:hoverSide===\"left\"?\"←\":\"→\"})]});}addPropertyControls(ClickGallery,{images:{type:ControlType.Array,title:\"Images\",control:{type:ControlType.Object,controls:{image:{type:ControlType.Image,title:\"Image\"},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\"],optionTitles:[\"Fill\",\"Fit\"],defaultValue:\"cover\"}}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ClickGallery\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gallary.map","// Generated by Framer (cc3b8f8)\nexport default function metadata(params,activeLocale){return{description:\"Stefan Sappert is an internationally working photographer and artist. His work focuses on portraiture, cultural narratives and author-driven projects, ranging from commissioned work to independent, limited works.\",favicon:\"https://framerusercontent.com/assets/QcwBhWmjxq22Cgy8kXqsptIFWE.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/lqqRjbI8aIYov3JdSef3wuiPFbQ.jpg\",title:\"STEFAN SAPPERT\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"iNAC8B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