!function(n){n(window).on("elementor/frontend/init",()=>{class e extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{outerWrap:".pp-video",videoPlay:".pp-video-play"}}}getDefaultElements(){var e=this.getSettings("selectors");return{$outerWrap:this.$element.find(e.outerWrap),$videoPlay:this.$element.find(e.videoPlay)}}bindEvents(){this.initVideo()}initVideo(){const t=this.elements.$videoPlay.hasClass("pp-video-play-lightbox");let a=this;this.elements.$videoPlay.off("click").on("click",function(e){e.preventDefault();e=n(this).find(".pp-video-player");t||a.videoPlay(e,a.elements.$outerWrap)}),elementorFrontend.isEditMode()||"1"!=this.elements.$videoPlay.data("autoplay")||t||a.videoPlay(this.$element.find(".pp-video-player"),this.elements.$outerWrap)}videoPlay(e,t){var a,i=n("<iframe/>"),o=e.data("src");0===e.find("iframe").length&&((t.hasClass("pp-video-type-youtube")||t.hasClass("pp-video-type-vimeo")||t.hasClass("pp-video-type-dailymotion"))&&i.attr("src",o),i.attr("frameborder","0"),i.attr("allowfullscreen","1"),i.attr("allow","autoplay;encrypted-media;"),e.html(i),t.hasClass("pp-video-type-hosted"))&&(a=JSON.parse(t.data("hosted-html")),i.on("load",function(){i.contents().find("body").html(a),i.contents().find("video").css({width:"100%",height:"100%"}),i.contents().find("video").attr("autoplay","autoplay")}))}}elementorFrontend.elementsHandler.attachHandler("pp-video",e)})}(jQuery);