{"version":3,"file":"VimeoBlogEmbed.CrojTy8L.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","window","ce","c","init_jsx_runtime","de","init_ssg_sandbox_shims","init_framer_CaDWdxiz","addPropertyControls","ControlType","VimeoBlogEmbed","props","iframeRef","src","vimeoId","controls","autoplay","loop","showTitle","iframe","target","setVolume","volume","onMessage","event","style","radius","videoTitle","__FramerMetadata__","init_VimeoBlogEmbed","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerSupportedLayoutWidth\"","\"framerSupportedLayoutHeight\"","\"framerContractVersion\"","\"framerIntrinsicWidth\"","\"framerIntrinsicHeight\"","\"__FramerMetadata__\""],"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\":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