{"version":3,"file":"BlancLoopVideo.BvygxqfG.mjs","names":["useRef","useState","useEffect","_jsx","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","c","_e","de","addPropertyControls","init_framer_ChujFWHC","ControlType","useIsStaticRenderer","BlancLoopVideo","video","poster","focus","style","isStatic","ref","still","setStill","rm","update","v","io","e","fill","init_BlancLoopVideo"],"sources":["https:/framerusercontent.com/modules/lvt09my8X6ncfphE25Nc/OzD2QUjuF8pUP15J2TEG/BlancLoopVideo.js"],"sourcesContent":["// Blanc · quiet looping video (A-統籌 2026-11-20). Silent, loops, plays only while on screen.\n// Reduced motion or the Framer canvas = still poster only. Decorative: hidden from screen readers.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BlancLoopVideo({video,poster,focus,style}){const isStatic=useIsStaticRenderer();const ref=useRef(null);const[still,setStill]=useState(true);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const rm=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>setStill(rm.matches);update();rm.addEventListener?.(\"change\",update);return()=>rm.removeEventListener?.(\"change\",update);},[isStatic]);useEffect(()=>{const v=ref.current;if(!v||still)return;const io=new IntersectionObserver(([e])=>{if(e.isIntersecting)v.play().catch(()=>{});else v.pause();},{rootMargin:\"200px 0px\"});io.observe(v);return()=>io.disconnect();},[still]);const fill={width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:focus||\"50% 50%\",display:\"block\"};return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{...style,position:\"relative\",overflow:\"hidden\",backgroundColor:\"#EFE6D6\"},children:isStatic||still||!video?poster?/*#__PURE__*/_jsx(\"img\",{src:poster,alt:\"\",style:fill}):null:/*#__PURE__*/_jsx(\"video\",{ref:ref,src:video,poster:poster,muted:true,loop:true,playsInline:true,preload:\"none\",disablePictureInPicture:true,style:fill})});}addPropertyControls(BlancLoopVideo,{video:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\"]},poster:{type:ControlType.Image,title:\"Poster\"},focus:{type:ControlType.String,title:\"Focus\",defaultValue:\"50% 50%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlancLoopVideo\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlancLoopVideo.map"],"mappings":"A,8MAKG,SAAwBiB,EAAe,CAACC,QAAMC,SAAOC,QAAMC,SAAO,CAAC,IAAMC,EAASN,EAAoB,EAAQO,EAAIvB,EAAO,IAAI,EAAO,CAACwB,EAAMC,GAAUxB,EAAS,EAAI,EAAEC,MAAc,CAAC,GAAGoB,GAAiBjB,IAAS,OAAY,OAAO,IAAMqB,EAAGrB,EAAO,WAAW,kCAAkC,EAAQsB,MAAWF,EAASC,EAAG,OAAO,EAAkD,OAAhDC,EAAO,EAAED,EAAG,mBAAmB,SAASC,CAAM,MAAYD,EAAG,sBAAsB,SAASC,CAAM,CAAE,EAAE,CAACL,CAAQ,CAAC,EAAEpB,MAAc,CAAC,IAAM0B,EAAEL,EAAI,QAAQ,GAAG,CAACK,GAAGJ,EAAM,OAAO,IAAMK,EAAG,IAAI,sBAAsB,CAACC,KAAK,CAAIA,EAAE,eAAeF,EAAE,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,EAAOA,EAAE,MAAM,CAAE,EAAE,CAAC,WAAW,WAAW,CAAC,EAAgB,OAAdC,EAAG,QAAQD,CAAC,MAAYC,EAAG,WAAW,CAAE,EAAE,CAACL,CAAK,CAAC,EAAE,IAAMO,EAAK,CAAC,MAAM,OAAO,OAAO,OAAO,UA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