{"version":3,"file":"LoopFeature.CqvY3TDR.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","de","init_framer_D6uXRwWs","addPropertyControls","ControlType","RenderTarget","useStore","useDeviceTier","init_useDeviceTier","font","init_tokens","monoLabel","init_store","color","LoopFeature","isEditor","paused","s","ref","vid","inView","setInView","play","video","tier","el","io","v","mediaSide","CSS","aspect","still","label","title","body","init_LoopFeature"],"sources":["https:/framerusercontent.com/modules/DYWefoLAKnzKbEpnAvkb/WUMsWDZM5XAGBf0OrVaP/LoopFeature.js"],"sourcesContent":["// A feature band: one short seamless loop beside a label, title and body.\n// Used for the product-story loops (Invisible by day, Warm to cool, Zones,\n// Light show, The pixel). Plays only while on screen; shows the still for\n// reduced motion, slow connections, the editor canvas and when motion is paused.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{color,font,monoLabel}from\"https://framerusercontent.com/modules/ggCb4QN5fwL1s8PXu4iM/eZj3RJz2yXEKTpqeMVsN/tokens.js\";import{useDeviceTier}from\"https://framerusercontent.com/modules/PRVKp4GKLFYsvI5AKhaB/BsGNwubzF72T9h1Cwjnn/useDeviceTier.js\";import{useStore}from\"https://framerusercontent.com/modules/AOp6PcYg37Qlhofrr8zb/2IVTPUBZQXp6z5ERfmQY/store.js\";const CSS=`\n.ie-loop{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:clamp(24px,5vw,72px);align-items:center;\n  color:${color.moonstone}}\n.ie-loop.is-left .ie-loop__media{order:0}.ie-loop.is-right .ie-loop__media{order:2}\n.ie-loop__media{position:relative;overflow:hidden;border-radius:6px;background:${color.blueHour};aspect-ratio:var(--ie-aspect)}\n.ie-loop__media video,.ie-loop__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n.ie-loop__copy{order:1;max-width:460px}\n.ie-loop__label{display:flex;align-items:center;gap:12px;margin:0 0 14px;color:${color.goldBright}}\n.ie-loop__label::before{content:\"\";width:28px;height:1px;background:${color.gold};box-shadow:0 0 8px ${color.gold}}\n.ie-loop__title{font-family:${font.display};font-weight:400;font-size:clamp(32px,3.6vw,52px);line-height:1.02;\n  margin:0 0 14px;color:#EEF1F4;text-wrap:balance}\n.ie-loop__body{font-family:${font.body};font-size:16px;line-height:1.65;margin:0}\n@media (max-width:809px){.ie-loop{grid-template-columns:minmax(0,1fr)}.ie-loop .ie-loop__media{order:0}.ie-loop__copy{order:1}}\n`;/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function LoopFeature({video,still,label,title,body,mediaSide,aspect,style}){const isEditor=RenderTarget.current()===RenderTarget.canvas;const{tier}=useDeviceTier();const paused=useStore(s=>s.motionPaused);const ref=useRef(null);const vid=useRef(null);const[inView,setInView]=useState(false);const play=!!video&&!isEditor&&!paused&&tier!==\"still\"&&tier!==\"low\";useEffect(()=>{const el=ref.current;if(!el)return;const io=new IntersectionObserver(([e])=>setInView(e.isIntersecting),{rootMargin:\"150px\"});io.observe(el);return()=>io.disconnect();},[]);useEffect(()=>{const v=vid.current;if(!v)return;if(inView)v.play().catch(()=>{});else v.pause();},[inView,play]);return /*#__PURE__*/_jsxs(\"section\",{className:`ie-loop is-${mediaSide}`,style:style,children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(\"div\",{ref:ref,className:\"ie-loop__media\",style:{[\"--ie-aspect\"]:aspect},\"data-lumen\":\"\",children:play&&inView?/*#__PURE__*/_jsx(\"video\",{ref:vid,src:video,poster:still?.src,muted:true,loop:true,playsInline:true,preload:\"metadata\",\"aria-hidden\":\"true\"}):still?.src?/*#__PURE__*/_jsx(\"img\",{src:still.src,srcSet:still.srcSet,alt:still.alt||\"\",loading:\"lazy\"}):null}),/*#__PURE__*/_jsxs(\"div\",{className:\"ie-loop__copy\",children:[/*#__PURE__*/_jsx(\"p\",{className:\"ie-loop__label\",style:{...monoLabel,color:color.goldBright},children:label}),/*#__PURE__*/_jsx(\"h2\",{className:\"ie-loop__title\",children:title}),/*#__PURE__*/_jsx(\"p\",{className:\"ie-loop__body\",children:body})]})]});}LoopFeature.defaultProps={video:\"\",label:\"Warm to cool\",title:\"Cozy at 7. Bright at midnight.\",body:\"Pick any white from candle-warm to crisp daylight. Schedule warm white for the evening and a brighter, cooler white after dark for security.\",mediaSide:\"left\",aspect:\"16 / 9\"};addPropertyControls(LoopFeature,{video:{type:ControlType.File,title:\"Loop\",allowedFileTypes:[\"mp4\",\"webm\"]},still:{type:ControlType.ResponsiveImage,title:\"Still\"},label:{type:ControlType.String,title:\"Label\"},title:{type:ControlType.String,title:\"Title\"},body:{type:ControlType.String,title:\"Body\",displayTextArea:true},mediaSide:{type:ControlType.Enum,title:\"Media\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"]},aspect:{type:ControlType.String,title:\"Aspect\",placeholder:\"16 / 9\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoopFeature\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,ySAoBG,SAAwBsB,EAAY,CAAC,QAAM,QAAM,QAAM,QAAM,OAAK,YAAU,SAAO,SAAO,CAAC,IAAMC,EAASV,EAAa,QAAQ,IAAIA,EAAa,OAAY,CAAC,QAAME,EAAc,EAAQS,EAAOV,EAAS,GAAGW,EAAE,YAAY,EAAQC,EAAI1B,EAAO,IAAI,EAAQ2B,EAAI3B,EAAO,IAAI,EAAO,CAAC4B,EAAOC,GAAW5B,EAAS,EAAK,EAAQ6B,EAAK,CAAC,CAACC,GAAO,CAACR,GAAU,CAACC,GAAQQ,IAAO,SAASA,IAAO,MAAmT,OAA7SxB,MAAc,CAAC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