{"version":3,"file":"ProjectVideo.CvVMfwiu.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/dMTckp4JL8CqEeViKa6t/StgRxuIIhVf5wCuHmsfs/ProjectVideo.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";const SLUG_TO_VIMEO={\"onside\":\"1177845725\",\"mvmt-raptor\":\"1172736560\",\"kosas-sport-science\":\"1174180154\",\"mvmt-sunnies\":\"1172737303\",\"jaxxon\":\"1172769560\",\"movado-bold\":\"1172737665\",\"olivia-burton\":\"1172738472\",\"mvmt-ceramic\":\"1172738669\",\"supergoop\":\"1172738948\",\"kosas-holiday\":\"1174180051\",\"mvmt-raptor-auto\":\"1172739147\",\"mvmt-ocean\":\"1172739309\",\"kosas-sport-copy\":\"1172739476\",\"mvmt-crystal\":\"1172773663\",\"kosas-chemistry\":\"1174180087\",\"mvmt-ppa-tour\":\"1172739687\",\"mvmt-sport\":\"1172740016\",\"rodan-fields\":\"1172768760\",\"mvmt-party-favor-glasses\":\"1172741572\",\"mvmt-call-of-duty\":\"1172741727\",\"movado-bold-quest\":\"1172738154\",\"mvmt-cali-diver\":\"1172741878\",\"marriott-bonvoy\":\"\",\"specs\":\"1204350503\",\"lensfest\":\"1204348890\"};function getIdFromSlug(){try{const parts=window.location.pathname.split(\"/\");const slug=parts[parts.length-1]||\"\";if(slug&&SLUG_TO_VIMEO[slug]!==undefined){return SLUG_TO_VIMEO[slug];}}catch(e){}return\"\";}export default function ProjectVideo({fallbackId}){const[vimeoId,setVimeoId]=useState(()=>{const fromSlug=getIdFromSlug();return fromSlug||fallbackId||\"\";});useEffect(()=>{const id=getIdFromSlug();if(id){setVimeoId(id);}else if(fallbackId){setVimeoId(fallbackId);}},[fallbackId]);if(!vimeoId)return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:\"16/9\",backgroundColor:\"#111\"}});return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:\"16/9\",backgroundColor:\"#000\",overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"iframe\",{src:`https://player.vimeo.com/video/${vimeoId}?autoplay=1&muted=1&loop=1&background=1&quality=1080p`,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",border:\"none\"},allow:\"autoplay; fullscreen; picture-in-picture\",allowFullScreen:true})});}addPropertyControls(ProjectVideo,{fallbackId:{type:ControlType.String,title:\"Fallback Vimeo ID\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectVideo.map"],"mappings":"0LAA81B,SAAS,GAAe,CAAC,GAAG,CAAC,IAAM,EAAM,EAAO,SAAS,SAAS,MAAM,IAAI,CAAO,EAAK,EAAM,EAAM,OAAO,IAAI,GAAG,GAAG,GAAM,EAAc,KAAQ,IAAA,GAAW,OAAO,EAAc,QAAgB,EAAE,MAAM,GAAI,SAAwB,EAAa,CAAC,cAAY,CAAC,GAAK,CAAC,EAAQ,GAAYA,MAA6B,GAAe,EAAkB,GAAY,GAAK,CAAyO,OAAxO,MAAc,CAAC,IAAM,EAAG,GAAe,CAAI,EAAI,EAAW,EAAG,CAAU,GAAY,EAAW,EAAW,EAAI,CAAC,EAAW,CAAC,CAAK,EAA6H,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,YAAY,OAAO,gBAAgB,OAAO,SAAS,SAAS,SAAS,WAAW,CAAC,SAAsB,EAAK,SAAS,CAAC,IAAI,kCAAkC,EAAQ,uDAAuD,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,OAAO,OAAO,CAAC,MAAM,2CAA2C,gBAAgB,GAAK,CAAC,CAAC,CAAC,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