{"version":3,"file":"LogCover.BKpcsEoo.mjs","names":["useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/BGvLZZnzj6DlNxPKafiG/wWtyTOdktlNblCHvYOM2/LogCover.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useRef,useEffect}from\"react\";/**\n * CMS-connected, inline LOG carousel. Preserves every image's natural ratio.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 640\n */export default function LogCover(props){const{image1,image2,image3,image4,image5,vimeoUrl=\"\",textColor=\"#E9F8FF\",placeholderRatio=\"4 / 5\",style}=props;const src=image=>typeof image===\"string\"?image:image?.src;const frames=[image1,image2,image3,image4,image5].filter(image=>src(image));const[index,setIndex]=useState(0);const touchX=useRef(null);useEffect(()=>{setIndex(0);},[src(image1)]);const vimeoMatch=String(vimeoUrl).trim().match(/^https:\\/\\/(?:www\\.)?vimeo\\.com\\/(\\d+)(?:[/?#]|$)/);const vimeoId=vimeoMatch?.[1];const active=Math.min(index,Math.max(0,frames.length-1));const frame=frames[active];const stop=event=>{event.preventDefault();event.stopPropagation();};const select=next=>setIndex(Math.max(0,Math.min(frames.length-1,next)));const buttonStyle={width:38,height:38,padding:0,border:\"1px solid rgba(233,248,255,.35)\",borderRadius:\"50%\",background:\"rgba(15,18,20,.76)\",color:textColor,display:\"grid\",placeItems:\"center\",cursor:\"pointer\",fontSize:22};return /*#__PURE__*/_jsxs(\"div\",{role:\"region\",\"aria-label\":vimeoId?\"LOG film\":\"LOG image gallery\",\"aria-roledescription\":vimeoId?undefined:\"carousel\",onClick:stop,onKeyDown:event=>{if(event.key===\"ArrowLeft\"||event.key===\"ArrowRight\"){stop(event);select(active+(event.key===\"ArrowRight\"?1:-1));}},tabIndex:0,style:{...style,width:\"100%\",height:\"auto\",maxWidth:680,position:\"relative\",color:textColor,fontFamily:\"'IBM Plex Mono', ui-monospace, monospace\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`[data-framer-name=\"Entries\"] [data-framer-name=\"Cover\"]:has(.bn-log-gallery){min-width:0!important;width:100%!important;height:auto!important;aspect-ratio:auto!important;transform:none!important;filter:none!important}[data-framer-name=\"Entries\"] [data-framer-name=\"Cover\"]:has(.bn-log-gallery)::after{display:none!important}[data-framer-name=\"Entries\"] [data-framer-name=\"Cover\"]:has(.bn-log-gallery)>*{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important}@media(min-width:810px){[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]{grid-template-columns:repeat(12,minmax(0,1fr))!important}[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]:nth-child(odd)>[data-framer-name=\"Entry Details\"]{grid-column:1/span 3!important;grid-row:1!important}[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]:nth-child(odd)>[data-framer-name=\"Cover\"]{grid-column:6/span 7!important;grid-row:1!important}[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]:nth-child(even)>[data-framer-name=\"Cover\"]{grid-column:1/span 7!important;grid-row:1!important}[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]:nth-child(even)>[data-framer-name=\"Entry Details\"]{grid-column:10/span 3!important;grid-row:1!important}}@media(max-width:809px){[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]{width:100%!important;min-width:0!important}[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%!important;min-width:0!important;gap:16px!important}[data-framer-name=\"Log Archive\"] [data-framer-name=\"Entries\"]>[data-framer-name=\"Log Entry\"]>*{width:100%!important;min-width:0!important;max-width:100%!important;grid-column:auto!important;position:relative!important;left:auto!important;right:auto!important}}.bn-log-gallery button:focus-visible{outline:2px solid #E9F8FF;outline-offset:3px}.bn-log-gallery button:hover:not(:disabled){filter:brightness(1.2)}`}),vimeoId?/*#__PURE__*/_jsxs(\"div\",{className:\"bn-log-gallery\",style:{width:\"100%\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:\"16 / 9\",position:\"relative\",background:\"#000\"},children:/*#__PURE__*/_jsx(\"iframe\",{src:`https://player.vimeo.com/video/${vimeoId}?v=1&autoplay=0&muted=0&playsinline=1&title=0&byline=0&portrait=0`,title:\"Short film — Vimeo player\",loading:\"lazy\",allow:\"autoplay; fullscreen; picture-in-picture; encrypted-media\",allowFullScreen:true,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:0}})}),/*#__PURE__*/_jsx(\"a\",{href:vimeoUrl,target:\"_blank\",rel:\"noopener noreferrer\",onClick:event=>event.stopPropagation(),style:{display:\"inline-block\",padding:\"12px 0\",color:textColor,fontSize:10,letterSpacing:\".06em\",textDecoration:\"none\"},children:\"WATCH ON VIMEO ↗\"})]}):/*#__PURE__*/_jsxs(\"div\",{className:\"bn-log-gallery\",style:{position:\"relative\",width:\"100%\"},onTouchStart:event=>{touchX.current=event.touches[0].clientX;},onTouchEnd:event=>{if(touchX.current!==null){const distance=event.changedTouches[0].clientX-touchX.current;if(Math.abs(distance)>45)select(active+(distance<0?1:-1));}touchX.current=null;},children:[frame?/*#__PURE__*/_jsx(\"img\",{src:src(frame),srcSet:frame?.srcSet,alt:frame?.alt||\"LOG — frame \"+(active+1),draggable:false,style:{display:\"block\",width:\"100%\",height:\"auto\",maxHeight:\"75svh\",objectFit:\"contain\"}}):/*#__PURE__*/_jsx(\"div\",{style:{aspectRatio:placeholderRatio,background:\"rgba(233,248,255,.04)\"}}),frames.length>1&&/*#__PURE__*/_jsxs(_Fragment,{children:[active>0&&/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Previous image\",onClick:event=>{stop(event);select(active-1);},style:{...buttonStyle,position:\"absolute\",left:12,top:\"calc(50% - 19px)\"},children:\"‹\"}),active<frames.length-1&&/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Next image\",onClick:event=>{stop(event);select(active+1);},style:{...buttonStyle,position:\"absolute\",right:12,top:\"calc(50% - 19px)\"},children:\"›\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:12,padding:\"12px 0\",minWidth:0},children:[/*#__PURE__*/_jsxs(\"span\",{\"aria-live\":\"polite\",\"aria-atomic\":\"true\",style:{fontSize:10,letterSpacing:\".06em\",whiteSpace:\"nowrap\",opacity:.8},children:[\"FRAME\",\" \",String(frames.length?active+1:0).padStart(2,\"0\"),\" \",\"/ \",String(frames.length).padStart(2,\"0\")]}),/*#__PURE__*/_jsx(\"div\",{\"aria-label\":\"Choose an image\",style:{display:\"flex\",gap:5,justifyContent:\"flex-end\",minWidth:0},children:frames.length>1&&frames.map((image,i)=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Show image \"+(i+1),\"aria-pressed\":i===active,onClick:event=>{stop(event);select(i);},style:{padding:2,width:\"clamp(28px, 6vw, 44px)\",height:42,flexShrink:1,border:i===active?\"1px solid \"+textColor:\"1px solid transparent\",background:\"transparent\",opacity:i===active?1:.42,cursor:\"pointer\",transition:\"opacity 180ms ease\"},children:/*#__PURE__*/_jsx(\"img\",{src:src(image),alt:\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"}})},i))})]})]})]});}LogCover.defaultProps={label:\"Frames\",textColor:\"#E9F8FF\",placeholderRatio:\"4 / 5\"};addPropertyControls(LogCover,{vimeoUrl:{type:ControlType.String,title:\"Vimeo URL\",defaultValue:\"\",placeholder:\"https://vimeo.com/123456789\"},image1:{type:ControlType.ResponsiveImage,title:\"Image 01\"},image2:{type:ControlType.ResponsiveImage,title:\"Image 02\"},image3:{type:ControlType.ResponsiveImage,title:\"Image 03\"},image4:{type:ControlType.ResponsiveImage,title:\"Image 04\"},image5:{type:ControlType.ResponsiveImage,title:\"Image 05\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Frames\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#E9F8FF\"},placeholderRatio:{type:ControlType.Enum,title:\"Empty ratio\",options:[\"4 / 5\",\"16 / 9\",\"1 / 1\",\"3 / 2\"],optionTitles:[\"4:5\",\"16:9\",\"1:1\",\"3:2\"],defaultValue:\"4 / 5\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LogCover\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"640\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LogCover.map"],"mappings":"sMAKG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,SAAO,SAAO,SAAO,SAAO,SAAO,WAAS,GAAG,YAAU,UAAU,mBAAiB,QAAQ,SAAO,EAAY,EAAI,GAAO,OAAO,GAAQ,SAAS,EAAM,GAAO,IAAU,EAAO,CAAC,EAAO,EAAO,EAAO,EAAO,CAAM,CAAC,CAAC,OAAO,GAAO,EAAI,CAAK,CAAC,EAAO,CAAC,EAAM,GAAUA,EAAS,CAAC,EAAQ,EAAOC,EAAO,IAAI,EAAE,MAAc,CAAC,EAAS,CAAC,CAAE,EAAE,CAAC,EAAI,CAAM,CAAC,CAAC,EAAsG,IAAM,EAAzF,OAAO,CAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,mDAA4E,CAAC,GAAG,GAAS,EAAO,KAAK,IAAI,EAAM,KAAK,IAAI,EAAE,EAAO,OAAO,CAAC,CAAC,EAAQ,EAAM,EAAO,GAAc,EAAK,GAAO,CAAC,EAAM,eAAe,EAAE,EAAM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