"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[665],{1491:function(e,t,i){i.r(t),i.d(t,{default:function(){return l}});var a=i(5391),n=i.n(a),o=i(9837),r=i.n(o),u=i(5993),l=function(){function e(e){var t,i=this;this.youtubeLoaded=!1,window.onYouTubeIframeAPIReady=function(){i.youtubeLoaded=!0},window.loadJS("https://www.youtube.com/iframe_api"),r()(t=e.querySelectorAll(".media-item__toggle, .media-item__poster")).call(t,(function(e){e.addEventListener("click",(function(e){return i.playVideo(e)}))}))}return e.prototype.playVideo=function(e){e.preventDefault();var t=e.currentTarget.closest(".media-item__wrap"),i=t.querySelector(".media-item__toggle"),a=t.querySelector("video"),o=t.querySelector("iframe"),r=t.querySelector("img");if(i.classList.add("is-hidden"),r&&r.classList.add("is-hidden"),a)a.play();else if(o){var l=o.getAttribute("src"),d=n()(l).call(l,"vimeo"),c=n()(l).call(l,"youtu");if(-1!=c&&-1===d)var s=new YT.Player(o,{events:{onReady:function(){s.playVideo()}}});-1===c&&-1!=d&&new u.Z(o).play()}},e}()}}]);