{"version":3,"file":"VimeoBlogEmbed.BDBeJlip.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/KvkbYEaBJNEpBNkPk7rg/JoN80Nj02VPlKLmiwj3d/VimeoBlogEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Vimeo Blog Embed\n *\n * A responsive 16:9 Vimeo player for blog content. Mirrors Vimeo's\n * standard embed snippet and uses the player postMessage API to set\n * the starting volume (something the plain embed cannot do).\n *\n * @framerIntrinsicWidth 640\n * @framerIntrinsicHeight 360\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function VimeoBlogEmbed(props){const{vimeoId,videoTitle,controls,autoplay,loop,showTitle,volume,radius,style}=props;const iframeRef=useRef(null);const src=\"https://player.vimeo.com/video/\"+encodeURIComponent(vimeoId.trim())+\"?badge=0&autopause=0&player_id=0&app_id=58479\"+(controls?\"\":\"&controls=0\")+(autoplay?\"&autoplay=1&muted=1\":\"\")+(loop?\"&loop=1\":\"\")+(showTitle?\"\":\"&title=0&byline=0&portrait=0\");useEffect(()=>{const iframe=iframeRef.current;if(!iframe)return;const target=\"https://player.vimeo.com\";const setVolume=()=>{iframe.contentWindow?.postMessage(JSON.stringify({method:\"setVolume\",value:String(Math.min(Math.max(volume,0),100)/100)}),target);};const onMessage=event=>{if(event.origin!==target)return;if(event.source!==iframe.contentWindow)return;try{const data=typeof event.data===\"string\"?JSON.parse(event.data):event.data;if(data?.event===\"ready\")setVolume();}catch{// ignore non-JSON messages\n}};window.addEventListener(\"message\",onMessage);// The player may already be ready before the listener attaches.\nsetVolume();return()=>window.removeEventListener(\"message\",onMessage);},[volume,vimeoId]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:\"100%\",paddingTop:\"56.25%\",borderRadius:radius,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"iframe\",{ref:iframeRef,src:src,title:videoTitle,frameBorder:\"0\",allow:\"autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share\",referrerPolicy:\"strict-origin-when-cross-origin\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",border:\"none\"}})});}addPropertyControls(VimeoBlogEmbed,{vimeoId:{type:ControlType.String,title:\"Vimeo ID\",defaultValue:\"1219547328\"},videoTitle:{type:ControlType.String,title:\"Title\",defaultValue:\"Avvoka Curate Founder Video\",description:\"Accessible title for the player iframe\"},controls:{type:ControlType.Boolean,title:\"Controls\",defaultValue:true},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:false,description:\"Autoplay requires the player to start muted\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false},showTitle:{type:ControlType.Boolean,title:\"Show Title\",defaultValue:false,description:\"Show the video title and byline overlay in the player\"},volume:{type:ControlType.Number,title:\"Volume\",defaultValue:50,min:0,max:100,step:1,unit:\"%\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:48,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VimeoBlogEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"640\",\"framerIntrinsicHeight\":\"360\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VimeoBlogEmbed.map"],"mappings":"gMAYG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,UAAQ,aAAW,WAAS,WAAS,OAAK,YAAU,SAAO,SAAO,SAAO,EAAY,EAAUA,EAAO,IAAI,EAAQ,EAAI,kCAAkC,mBAAmB,EAAQ,KAAK,CAAC,EAAE,iDAAiD,EAAS,GAAG,gBAAgB,EAAS,sBAAsB,KAAK,EAAK,UAAU,KAAK,EAAU,GAAG,gCAE1S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