{"version":3,"file":"LoopMedia.DodN2zB9.mjs","names":["React.forwardRef","useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","J","init_jsx_runtime","ce","de","motion","addPropertyControls","cx","init_framer_DKgW_P28","withCSS","useIsStaticRenderer","ControlType","useSVGTemplate","mask","Base","MotionSVG","SVG","svg","getProps","Icon","init_gXjG4ReaI","props","rest","animated","width1","color","restProps","href","className","P_DcoRcrY","JEeZYcamG","style","LoopVideo","ref","isStatic","v","visible","shown","e","cs","play","lazy","p","io","entries","kick","retry","src","LoopMedia","natural","fit","box","radius","media","videoLink","video","imgSrc","image","urlOnly","init_LoopMedia"],"sources":["https:/framerusercontent.com/modules/4G0pHPXdxDC0q34eFfFr/oq0PkaqnOfre09AZeL9M/gXjG4ReaI.js","https:/framerusercontent.com/modules/9q5bAdK50eeygq84m3pZ/uD2ELpzsYiQDHgw0UwfQ/LoopMedia.js"],"sourcesContent":["// Generated by Framer (85eaff3)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 0 L 14 0\" fill=\"transparent\" height=\"1px\" id=\"h3fQSrHEV\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(5 12)\" width=\"14px\"/><path d=\"M 0 0 L 7 7 L 0 14\" fill=\"transparent\" height=\"14px\" id=\"DAe82Eor1\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(12 5)\" width=\"7px\"/></svg>';const getProps=({color,height,id,width,width1,...props})=>{return{...props,JEeZYcamG:width1??props.JEeZYcamG??2,P_DcoRcrY:color??props.P_DcoRcrY??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,P_DcoRcrY,JEeZYcamG,...restProps}=getProps(props);const href=useSVGTemplate(\"1175957644\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-SYorz\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m973uw\":P_DcoRcrY,\"--js9iwy\":JEeZYcamG,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-SYorz { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"P_DcoRcrY\":\"color\",\"JEeZYcamG\":\"width1\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Arrow Right\",\"color\":{\"type\":\"variable\",\"value\":\"1m973uw\"},\"set\":{\"localId\":\"vectorSet/ZsiCCGPvG\",\"id\":\"ZsiCCGPvG\",\"moduleId\":\"Y7SpbVH16cWqMhj75z1M\"}}\n */const Icon=withCSS(Component,css,\"framer-SYorz\");Icon.displayName=\"Arrow Right\";export default Icon;addPropertyControls(Icon,{P_DcoRcrY:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},JEeZYcamG:{defaultValue:2,displayStepper:true,hidden:false,max:16,min:1,title:\"Width\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Arrow Right\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"1m973uw\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/ZsiCCGPvG\\\",\\\"id\\\":\\\"ZsiCCGPvG\\\",\\\"moduleId\\\":\\\"Y7SpbVH16cWqMhj75z1M\\\"}}\",\"framerVariables\":\"{\\\"P_DcoRcrY\\\":\\\"color\\\",\\\"JEeZYcamG\\\":\\\"width1\\\"}\",\"framerIntrinsicHeight\":\"24\",\"framerContractVersion\":\"1\",\"framerImmutableVariables\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * A looping, silent video that starts itself.\n *\n * The browser's own autoplay is not enough here: with preload=\"metadata\" it\n * fetches a few seconds, stops, and never reaches the \"enough data\" point it\n * waits for before autoplaying — so the video sits on frame one. Calling\n * play() ourselves does not wait for that. It plays while on screen and\n * pauses off screen; if the browser blocks it (iOS Low Power Mode does), the\n * first touch or click starts it.\n */function LoopVideo({src,style,lazy}){const ref=useRef(null);const isStatic=useIsStaticRenderer();useEffect(()=>{const v=ref.current;if(!v||isStatic||typeof window===\"undefined\")return;v.muted=true;let visible=false;// Hidden copies exist on purpose (the filter's data lists keep one of\n// every cover, at opacity 0, as a source of rows). They must not play\n// or download — only a video the visitor could actually see should.\nconst shown=()=>{for(let e=v;e&&e!==document.body;e=e.parentElement){const cs=getComputedStyle(e);if(cs.display===\"none\"||cs.visibility===\"hidden\"||cs.opacity===\"0\")return false;}return true;};const play=()=>{if(!visible||!v.paused||document.hidden||!shown())return;if(lazy&&v.preload!==\"metadata\")v.preload=\"metadata\";const p=v.play();if(p&&typeof p.catch===\"function\")p.catch(()=>{});};const io=new IntersectionObserver(entries=>{visible=entries[entries.length-1].isIntersecting;if(visible)play();else v.pause();},{rootMargin:\"120px\"});io.observe(v);const kick=()=>play();// A reveal animation can still hold the video at opacity 0 when it\n// first scrolls into range, so keep asking while it is due to play.\nconst retry=window.setInterval(()=>{if(visible&&v.paused)play();},500);v.addEventListener(\"loadedmetadata\",kick);v.addEventListener(\"canplay\",kick);v.addEventListener(\"loadeddata\",kick);document.addEventListener(\"visibilitychange\",kick);window.addEventListener(\"touchstart\",kick,{passive:true});window.addEventListener(\"pointerdown\",kick,{passive:true});return()=>{io.disconnect();window.clearInterval(retry);v.removeEventListener(\"loadedmetadata\",kick);v.removeEventListener(\"canplay\",kick);v.removeEventListener(\"loadeddata\",kick);document.removeEventListener(\"visibilitychange\",kick);window.removeEventListener(\"touchstart\",kick);window.removeEventListener(\"pointerdown\",kick);};},[src,isStatic,lazy]);return /*#__PURE__*/_jsx(\"video\",{ref:ref,src:src,style:style,// muted + playsInline are what let iOS play inline at all.\nmuted:true,playsInline:true,loop:true,// No autoplay attribute: a browser honours it for a video the\n// visitor can never see too, and buffers the whole file. Playing\n// is done by the effect above, only while the video is on screen.\n// A frame with a fixed size can wait: nothing is fetched until the\n// effect above finds the video on screen, so the hidden copies\n// (the filter's data lists keep one of every cover) cost no\n// bandwidth. A \"natural\" frame takes its height from the file, so\n// it needs the metadata up front.\npreload:lazy?\"none\":\"metadata\",controls:false,disablePictureInPicture:true,tabIndex:-1,\"aria-hidden\":true});}/**\n * Image or silently looping video, filling whatever frame it is placed in.\n * No controls, no scrub bar, no poster flash — a video here reads as a moving\n * still. A Video Link wins over an uploaded Video, which wins over Image; leaving\n * all empty renders nothing, so\n * the parent frame's own fill shows through untouched.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 240\n * @framerIntrinsicHeight 145\n */export default function LoopMedia(props){const{video,videoLink,image,fit,radius,urlOnly,style}=props;const isStatic=useIsStaticRenderer();// \"natural\" lets the file set the height, so an uploaded cover keeps its\n// own shape instead of being cropped into a fixed box.\nconst natural=fit===\"natural\";const box={position:\"relative\",width:\"100%\",height:natural?\"auto\":\"100%\",overflow:\"hidden\",borderRadius:radius?`${radius}px`:undefined,...style};const media={width:\"100%\",height:natural?\"auto\":\"100%\",objectFit:natural?undefined:fit,display:\"block\"};// A link wins over an upload, so a video can be hosted anywhere.\nconst link=typeof videoLink===\"string\"?videoLink.trim():\"\";const src=link||(typeof video===\"string\"?video:video?.src);const imgSrc=typeof image===\"string\"?image:image?.src;// A data row, not a picture: the page only reads the address from it\n// (the Next project link, the filter's lists). Nothing is fetched, so a\n// hidden copy costs no bandwidth at all.\nif(urlOnly){if(src)return /*#__PURE__*/_jsx(\"video\",{\"data-src\":src,hidden:true,preload:\"none\",muted:true,playsInline:true,\"aria-hidden\":true});if(imgSrc)return /*#__PURE__*/_jsx(\"img\",{\"data-src\":imgSrc,alt:\"\",hidden:true,\"aria-hidden\":true});return /*#__PURE__*/_jsx(\"div\",{style:box});}if(src){return /*#__PURE__*/_jsx(\"div\",{style:box,children:/*#__PURE__*/_jsx(LoopVideo,{src:src,style:media,lazy:!natural})});}if(imgSrc){return /*#__PURE__*/_jsx(\"div\",{style:box,children:/*#__PURE__*/_jsx(\"img\",{src:imgSrc,alt:image?.alt??\"\",style:media})});}return /*#__PURE__*/_jsx(\"div\",{style:box});}// Control keys are derived from the title, so each title matches its prop name.\naddPropertyControls(LoopMedia,{video:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\",\"m4v\"]},urlOnly:{type:ControlType.Boolean,title:\"URL only\",description:\"Hidden data row: expose the address, load nothing\",defaultValue:false},videoLink:{type:ControlType.String,title:\"Video Link\",placeholder:\"https://… .mp4\",description:\"Direct link to a video file hosted elsewhere (.mp4, .webm, .mov). Used instead of Video when filled.\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\",\"natural\"],optionTitles:[\"Cover\",\"Contain\",\"Natural\"],defaultValue:\"cover\",displaySegmentedControl:true},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:64,step:1,defaultValue:0,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoopMedia\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"145\",\"framerIntrinsicWidth\":\"240\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoopMedia.map"],"mappings":"A,2UACgM,EAAK,0BAAgC,EAAkB,gBAAW,SAAS,EAAM,EAAI,CAAC,MAAoB,gBAAK,MAAM,CAAC,GAAG2B,EAAU,MAAI,SAASA,EAAM,QAAQ,CAAC,CAAE,CAAC,EAAQ,EAAUhB,EAAO,OAAOS,CAAI,EAAQ,EAAiB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAGQ,GAAMD,EAAM,OAAOE,EAAsB,gBAAKR,EAAU,CAAC,GAAGO,EAAc,WAAa,MAAa,UAAQ,CAAC,EAAe,gBAAK,MAAM,CAAC,GAAGA,EAAS,MAAa,UAAQ,CAAC,CAAE,CAAC,EAAQ,EAAI,6lBAAmmB,GAAU,CAAC,QAAM,SAAO,KAAG,QAAM,SAAO,GAAGD,MAAgB,CAAC,GAAGA,EAAM,UAAUG,GAAQH,EAAM,WAAW,EAAE,UAAUI,GAAOJ,EAAM,WAAW,cAAc,GASz4C,EAAKZ,EATq6C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