import{_ as a,o as r,c as s,d,s as u,a as m,Q as p}from"./D6ipka4G.js";const _={props:{embedCode:{type:String,required:!1},url:{type:String,required:!1},mode:{type:String}},computed:{videoUrl(){if(this.url){this.url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(&\S+)?/);let o="";const l=this.url.split("?");l.length>1&&(o="?"+l[1].split("&").map(n=>{const e=n.split("=");return e[0]==="t"?`start=${e[1]}`:`${e[0]}=${e[1]}`}).join("&"));const t=RegExp.$6;return RegExp.$3.includes("youtu")?`https://www.youtube.com/embed/${t}${o}`:RegExp.$3.includes("vimeo")?`https://player.vimeo.com/video/${t}${o}`:null}else return null}}},h={class:"ebm-video"},y=["innerHTML"],v={key:1,class:"embed"},f=["src"],b=["src"];function w(o,l,t,c,n,e){const i=p;return r(),s("div",h,[d(i,null,{default:u(()=>[t.mode==="auto"?(r(),s("div",{key:0,class:"embed",innerHTML:t.embedCode.replace("/watch?v=","/embed/")},null,8,y)):e.videoUrl?(r(),s("div",v,[m("iframe",{width:"100%",src:e.videoUrl,title:"video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,8,f)])):(r(),s("video",{key:2,width:"100%",controls:"",src:t.url},null,8,b))]),_:1})])}const x=a(_,[["render",w]]);export{x as default};