1import{g as o}from"./index-D3jsOSc0.js";class a{constructor(e){if(this.element=e,this.youtubeURL=this.element.dataset.youtube,this.playButton=this.element.querySelector(".js-play"),!this.youtubeURL){console.warn("hero-embed: No YouTube URL found in data attribute.");return}if(!this.playButton){console.warn("hero-embed: No play button found with .js-play class in the element.");return}this.initialize()}initialize(){var e;this.playButton&&(this.playButton.addEventListener("click",this.embedYoutube.bind(this)),typeof Cookiebot<"u"&&((e=Cookiebot.consent)!=null&&e.marketing)&&o.fromTo(".js-cookie-notice",{autoAlpha:1},{autoAlpha:0,duration:.3}))}embedYoutube(){if(!this.youtubeURL)return;const e=new URL(this.youtubeURL);e.searchParams.set("autoplay","1");const t=document.createElement("iframe");t.src=e.toString(),t.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",t.allowFullscreen=!0,t.classList.add("w-full","h-full","rounded-t-2xl","aspect-video"),this.element.innerHTML="",this.element.appendChild(t)}}export{a as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.