1!function(){"use strict";var t=window.podcastPlayerData||{},e={podcastPlayerData:jQuery.extend(!0,{},t),currentlyPlaying:!1,isStyleSupport:function(t,e){var s=window.ppmejsSettings.stSup||!1;return!(!s||!t)&&s[t].includes(e)},isInViewport:function(t){if(t&&t.length){var e=t.offset().top,s=t.offset().top+t.outerHeight(),i=jQuery(window).scrollTop()+jQuery(window).innerHeight(),a=jQuery(window).scrollTop();return i>e&&a<s}},stickyonScroll:function(){this.currentlyPlaying&&this.currentlyPlaying()}};function s(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var i=function(){function t(s){var i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(i="resizeTimeout")in this?Object.defineProperty(this,i,{value:null,enumerable:!0,configurable:!0,writable:!0}):this[i]=null,this.id=s,this.podcast=e[s].podcast,this.instance=e[s].instance,this.mainMenuItems(),this.menuToggle=this.podcast.find(".pod-items__menu-open"),this.infoToggle=this.podcast.find(".pod-launch__info"),this.events()}var i,a;return i=t,(a=[{key:"mainMenuItems",value:function(){var t=this.podcast.attr("data-main-items"),e=this.podcast.find(".pod-content__launcher"),s=this.podcast.find(".pod-items__navi-menu");if(t){var i=s.find("#podcast-menu-"+this.instance);if(i.length){var a=i.find(".menu-item > a").slice(0,t),n=a.clone();a.closest(".menu-item").hide(),jQuery.each(n,(function(t,e){var s=jQuery(e),i=s.find(".subscribe-item");s.addClass(i.attr("class")).addClass("pp-badge"),s.html(i.html())})),s.prepend(n),i.find(".menu-item").length<=t&&i.closest(".pod-items__menu").hide(),e.length&&e.prepend(s.clone())}}else e.length&&e.prepend(s.clone())}},{key:"events",value:function(){this.menuToggle.on("click",function(){this.menuToggle.closest(".pod-items__menu").toggleClass("toggled-window"),this.menuToggle.toggleClass("toggled-on").attr("aria-expanded",this.menuToggle.hasClass("toggled-on"))}.bind(this)),this.infoToggle.on("click",function(){this.podcast.toggleClass("header-toggle"),this.infoToggle.toggleClass("toggled-on").attr("aria-expanded",this.menuToggle.hasClass("toggled-on"))}.bind(this))}}])&&s(i.prototype,a),t}();function a(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var n=function(){function t(s){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=s,this.podcast=e[s].podcast,this.mediaObj=e[s].mediaObj,this.msgMediaObj=e[s].msgMediaObj,this.controls=jQuery(this.mediaObj.controls),this.msgControls=!!this.msgMediaObj&&jQuery(this.msgMediaObj.controls),this.layers=this.controls.prev(".ppjs__layers"),this.media=this.mediaObj.media,this.msgMedia=!!this.msgMediaObj&&this.msgMediaObj.media,this.modalObj=e[s].modal,this.settings=e[s].settings,this.transcript=e[s].episode,this.list=e[s].list,this.props=e[s],this.instance=e[s].instance,this.player=e[s].player,this.isPremium=this.settings.isPremium,this.isLargeScrn=e.isLrgScrn,this.data=e.podcastPlayerData,this.singleWrap=e[s].singleWrap,this.isInViewport=e.isInViewport,this.fetched=e[s].fetched,this.timeOut=!1,this.autostickytimer=!1,setTimeout((function(){i.timeOut=!0}),3e3),this.modControlMarkup(),this.modLayersMarkup(),this.plBtn=this.controls.find(".ppjs__playpause-button > button"),this.forBtn=this.controls.find(".ppjs__jump-forward-button > button"),this.bckBtn=this.controls.find(".ppjs__skip-backward-button > button"),this.ttBtn=this.controls.find(".ppjs__episode-excerpt"),this.ssBtn=this.controls.find(".ppjs__share-button > button"),this.pbrBtn=this.controls.find(".ppjs__play-rate-button > button"),this.rateLink=this.controls.find(".prl-item"),this.copylink=this.podcast.find(".ppsocial__copylink"),this.copyField=this.podcast.find("input.pp-copylink"),this.rlbtn=this.podcast.find(".pp-list-btn"),this.msgControls&&(this.msgplBtn=this.msgControls.find(".ppjs__playpause-button > button"),this.msgforBtn=this.msgControls.find(".ppjs__jump-forward-button > button"),this.msgbckBtn=this.msgControls.find(".ppjs__skip-backward-button > button")),this.events()}var s,i;return s=t,(i=[{key:"events",value:function(){var t=this,e=this;jQuery(document).on("click",(function(e){var s=jQuery(e.target),i=s.closest(".toggled-window");jQuery(".toggled-window").removeClass("toggled-window"),i.length&&i.addClass("toggled-window"),s.closest(".ppshare__social").length||(t.copylink.removeClass("pp-link-copied"),t.copyField.hide())})),jQuery(document).on("keyup",(function(t){"Escape"===t.key&&jQuery(".toggled-window").removeClass("toggled-window")})),this.media.addEventListener("loadedmetadata",this.condbtnPauseMedia.bind(this)),this.media.addEventListener("play",this.btnPlayMedia.bind(this)),this.media.addEventListener("playing",this.btnPlayMedia.bind(this)),this.media.addEventListener("pause",this.btnPauseMedia.bind(this)),this.forBtn.on("click",this.forwardMedia.bind(this)),this.bckBtn.on("click",this.skipbackMedia.bind(this)),this.ttBtn.on("click",this.showtranscript.bind(this)),this.ssBtn.on("click",this.showsocialshare.bind(this)),this.pbrBtn.on("click",this.mediaPlayToggle.bind(this)),this.rlbtn.on("click",this.revealList.bind(this)),this.rateLink.on("click",(function(t){t.preventDefault(),e.mediaPlayRate.call(e,this)})),this.podcast.find(".episode-single__close").on("click",this.hidetranscript.bind(this)),this.msgMedia&&(this.msgMedia.addEventListener("loadedmetadata",this.msgcondbtnPauseMedia.bind(this)),this.msgMedia.addEventListener("play",this.msgbtnPlayMedia.bind(this)),this.msgMedia.addEventListener("playing",this.msgbtnPlayMedia.bind(this)),this.msgMedia.addEventListener("pause",this.msgbtnPauseMedia.bind(this))),this.msgControls&&(this.msgplBtn.on("click",this.msgPlayPause.bind(this)),this.msgforBtn.on("click",this.msgForwardMedia.bind(this)),this.msgbckBtn.on("click",this.msgSkipbackMedia.bind(this)))}},{key:"forwardMedia",value:function(){var t,e;e=isNaN(this.media.duration)?30:this.media.duration,t=this.media.currentTime===1/0?0:this.media.currentTime,this.media.setCurrentTime(Math.min(t+30,e)),this.forBtn.blur()}},{key:"skipbackMedia",value:function(){var t;t=this.media.currentTime===1/0?0:this.media.currentTime,this.media.setCurrentTime(Math.max(t-10,0)),this.bckBtn.blur()}},{key:"msgPlayPause",value:function(){this.msgMediaObj.paused?this.msgMediaObj.play():this.msgMediaObj.pause()}},{key:"msgForwardMedia",value:function(){var t,e;e=isNaN(this.msgMedia.duration)?15:this.msgMedia.duration,t=this.msgMedia.currentTime===1/0?0:this.msgMedia.currentTime,this.msgMedia.setCurrentTime(Math.min(t+15,e)),this.msgforBtn.blur()}},{key:"msgSkipbackMedia",value:function(){var t;t=this.msgMedia.currentTime===1/0?0:this.msgMedia.currentTime,this.msgMedia.setCurrentTime(Math.max(t-15,0)),this.msgbckBtn.blur()}},{key:"mediaPlayToggle",value:function(){this.pbrBtn.parent().toggleClass("toggled-window")}},{key:"revealList",value:function(){this.list.slideToggle(400),this.rlbtn.toggleClass("toggled-on"),this.rlbtn.hasClass("toggled-on")||jQuery("html, body").animate({scrollTop:this.player.offset().top},400),this.rlbtn.blur()}},{key:"mediaPlayRate",value:function(t){var s=jQuery(t),i=parseFloat(s.text()),a=s.closest(".ppjs__button");e[this.id].playRate=i,a.length&&a.hasClass("toggled-window")&&(a.find(".pp-rate").text(i),this.media.playbackRate=i,a.removeClass("toggled-window"))}},{key:"btnPlayMedia",value:function(){this.podcast.hasClass("postview")?e.currentlyPlaying=!1:e.currentlyPlaying=this.autoSticky.bind(this),this.plBtn.hasClass("playing")||(this.plBtn.removeClass("pause"),this.bufferedPlay())}},{key:"bufferedPlay",value:function(){var t=this;this.plBtn.hasClass("pause")?this.plBtn.removeClass("buffering"):this.media.readyState>=0&&this.media.readyState<4?(this.plBtn.addClass("buffering"),setTimeout((function(){t.bufferedPlay()}),250)):(this.plBtn.removeClass("buffering"),this.plBtn.addClass("playing"))}},{key:"btnPauseMedia",value:function(){this.plBtn.removeClass("playing"),this.plBtn.addClass("pause")}},{key:"showtranscript",value:function(t){t.preventDefault(),this.transcript.slideToggle("fast")}},{key:"hidetranscript",value:function(){this.transcript.slideUp("fast")}},{key:"showsocialshare",value:function(){this.ssBtn.parent().toggleClass("toggled-window"),this.podcast.find(".ppsocial__copylink").removeClass("pp-link-copied")}},{key:"condbtnPauseMedia",value:function(){-1===this.media.rendererN
1ame.indexOf("flash")&&this.plBtn.removeClass("playing")}},{key:"msgbtnPlayMedia",value:function(){this.msgplBtn.addClass("playing")}},{key:"msgbtnPauseMedia",value:function(){this.msgplBtn.removeClass("playing")}},{key:"msgcondbtnPauseMedia",value:function(){-1===this.msgMedia.rendererName.indexOf("flash")&&this.msgplBtn.removeClass("playing")}},{key:"modControlMarkup",value:function(){var t,e,s,i,a,n,d,o,l="pp-podcast-".concat(this.instance),r="ppe-".concat(this.instance,"-1"),p=!!this.data[l]&&this.data[l].rdata,h=!!this.data[l]&&this.data[l].load_info;if(this.data[l]&&(i=(this.data[l][r]?this.data[l][r]:{}).featured),this.mediaObj.isVideo)this.controls.find(".ppjs__time, .ppjs__time-rail").wrapAll('<div class="ppjs__video-timer" />'),this.controls.prepend(this.settings.ppPlayPauseBtn),this.controls.find(".ppjs__fullscreen-button > button").html(this.settings.ppMaxiScrnBtn+this.settings.ppMiniScrnBtn),this.transcript.find(".ppjs__img-wrapper").hide(),i&&this.layers.find(".ppjs__poster").empty().append('<img src="'+i+'"/>').show();else{if(this.controls.find(".ppjs__time").wrapAll('<div class="ppjs__audio-timer" />'),this.controls.find(".ppjs__time-rail").wrap('<div class="ppjs__audio-time-rail" />'),t=jQuery("<div />",{class:"ppjs__audio-controls"}),a=this.transcript.find(".ppjs__img-wrapper").first(),t.html(this.settings.ppAudioControlBtns),this.controls.prepend(t),this.podcast.hasClass("modern")){var c=this.controls.find(".head-wrapper").wrap('<div class="ppjs__head-content" />'),m=this.controls.find(".ppjs__secondary-controls"),u=this.controls.find(".ppjs__time");c.after(m),this.controls.find(".ppjs__audio-timer").next(".ppjs__audio-time-rail").addBack().wrapAll('<div class="ppjs__atime-container" />'),this.controls.find(".ppjs__atime-container").append(u)}if(!this.podcast.is(".single-audio, .hide-content, .single-episode")&&this.isPremium&&this.controls.find(".ppjs__secondary-controls").append(this.settings.ppAdditionalControls),this.controls.find(".ppjs__head-container").prepend(a),(e=!!(e=this.transcript.find(".episode-single__title")).length&&e.html())&&this.controls.find(".ppjs__episode-title").html(e),this.podcast.hasClass("special-style"))this.controls.find(".ppjs__episode-excerpt").hide();else if(o=this.podcast.data("teaser"),n=(n=!!h&&h.args.elength)||this.podcast.data("elength"),d=this.podcast.data("eunit"),s=this.transcript.find(".episode-single__description"),"full"===o&&s.length){var f=jQuery("<div />",{class:"ppjs__episode-full-content"});this.controls.find(".ppjs__more").css("display","none"),this.controls.find(".ppjs__episode-excerpt").before(f),this.controls.find(".ppjs__head-container").css("align-items","flex-start"),this.controls.find(".ppjs__episode-full-content").html(s.html()),this.controls.find(".ppjs__episode-excerpt").hide()}else"none"===o?this.controls.find(".ppjs__episode-excerpt").hide():(s=!(!(s=!!s.length&&s.text().trim())||!s.length)&&s,n&&s?(d?s.length>n?(s=s.substr(0,n),this.controls.find(".ppjs__more").css("display","inline")):this.controls.find(".ppjs__more").css("display","none"):s.split(/\s+/).length>n?(s=s.split(/\s+/).splice(0,n).join(" "),this.controls.find(".ppjs__more").css("display","inline")):this.controls.find(".ppjs__more").css("display","none"),this.controls.find(".ppjs__excerpt-content").text(s),this.controls.find(".ppjs__episode-excerpt").show()):this.controls.find(".ppjs__episode-excerpt").hide());if(this.props.isWide)if(p&&void 0!==p.title&&p.title)this.controls.find(".ppjs__podcast-title").html(p.title);else{var y=this.podcast.find(".pod-items__title");(y=!!y.length&&y.html())&&this.controls.find(".ppjs__podcast-title").html(y)}else if(this.isLargeScrn&&(this.podcast.hasClass("narrow-player")||this.podcast.hasClass("wide-player"))){var g=a.find(".ppjs__img-btn");g.attr("sizes","(max-width: 640px) 100vw, 640px"),void 0!==g.attr("data-sizes")&&g.attr("data-sizes","(max-width: 640px) 100vw, 640px")}jQuery(this.media).find("audio.pp-podcast-episode.hide-audio").remove()}this.modMediaMarkup(),this.msgMediaObj&&(this.msgControls.find(".ppjs__time").wrapAll('<div class="ppjs__audio-timer" />'),this.msgControls.find(".ppjs__time-rail").wrap('<div class="ppjs__audio-time-rail" />'),(t=jQuery("<div />",{class:"ppjs__audio-controls"})).html(this.settings.ppAudioControlBtns),this.msgControls.prepend(t),p&&void 0!==p.msgtext&&this.msgControls.find(".ppjs__episode-title").text(p.msgtext))}},{key:"modMediaMarkup",value:function(){var t=this;if(!1!==e[this.id].fetched){var s,i="pp-podcast-".concat(this.instance),a="ppe-".concat(this.instance,"-1"),n=!!this.data[i]&&this.data[i].rdata;if(this.data[i]&&(s=this.data[i][a]?this.data[i][a]:{}).featured,s&&n){var d=encodeURIComponent(s.link),o=jQuery("<div>").html(s.src).html().replace(/&/g,"&"),l=this.controls.find(".ppshare__social"),r=encodeURIComponent(s.title);if(this.isPremium&&!1!==n&&"feedurl"===n.from){if(void 0!==s.key){var p={ppplayer:n.fprint,ppepisode:s.key},h=jQuery.param(p),c=n.permalink;d=c?c+(c.indexOf("?")<0?"?":"&")+h:d,d=encodeURIComponent(d)}}else if(this.isPremium){var m=jQuery.param({sharedby:"pplayer"});d=d+(d.indexOf("?")<0?"?":"&")+encodeURIComponent(m)}var u="https://www.facebook.com/sharer.php?u="+d,f="https://twitter.com/intent/tweet?url="+d+"&text="+r,y="https://www.linkedin.com/shareArticle?mini=true&url="+d,g="mailto:?subject="+r+"&body=Link:"+d;l.find(".ppsocial__facebook").attr("href",u),l.find(".ppsocial__twitter").attr("href",f),l.find(".ppsocial__linkedin").attr("href",y),l.find(".ppsocial__email").attr("href",g),l.find("input.pp-copylink").val(decodeURIComponent(d)),this.controls.find(".ppshare__download").attr("href",o),this.controls.find(".ppshare__download").attr("download",o)}}else!1===this.timeOut&&setTimeout((function(){t.modMediaMarkup()}),200)}},{key:"modLayersMarkup",value:function(){this.layers.find(".ppjs__overlay-play > .ppjs__overlay-button").html(this.settings.ppPlayCircle),this.layers.find(".ppjs__overlay > .ppjs__overlay-loading").html(this.settings.ppVidLoading)}},{key:"autoSticky",value:function(){var t=this;
1this.autostickytimer||this.modalObj&&(this.autostickytimer=!0,this.modalObj.modal&&this.modalObj.modal.hasClass("pp-modal-open")?this.isInViewport(this.podcast)&&this.modalObj.returnElem():this.plBtn.hasClass("playing")&&(this.isInViewport(this.podcast)||this.modalObj.create(this.singleWrap,this.mediaObj,this.msgMediaObj,!1,!1)),setTimeout((function(){t.autostickytimer=!1}),66))}}])&&a(s.prototype,i),t}();function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function o(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var r=function(){function t(s){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"listItem",void 0),l(this,"loadMore",void 0),this.id=s,this.podcast=e[s].podcast,this.list=e[s].list,this.episode=e[s].episode,this.player=e[s].player,this.mediaObj=e[s].mediaObj,this.instance=e[s].instance,this.modalObj=e[s].modal,this.single=e[s].single,this.singleWrap=e[s].singleWrap,this.data=e.podcastPlayerData,this.msgMediaObj=e[s].msgMediaObj,this.msgControls=!!this.msgMediaObj&&jQuery(this.msgMediaObj.controls),this.msgMedia=!!this.msgMediaObj&&this.msgMediaObj.media,this.msgFreqCounter=0,this.controls=jQuery(this.mediaObj.controls),this.plBtn=this.controls.find(".ppjs__playpause-button > button"),this.prevBtn=this.podcast.find(".pp-prev-btn").attr("disabled",!0),this.nxtBtn=this.podcast.find(".pp-next-btn"),this.copylink=this.podcast.find(".ppsocial__copylink"),this.copyField=this.podcast.find("input.pp-copylink"),this.playingAmsg=!1,this.playAmsg=!1,this.played=!1,this.settings=e[s].settings,this.isPremium=this.settings.isPremium,this.timeOut=!1,setTimeout((function(){i.timeOut=!0}),3e3),this.events()}var s,i;return s=t,i=[{key:"events",value:function(){var t=this,e=!!t.modalObj&&t.modalObj.modal;if(t.podcast.hasClass("modern")?(t.list.on("click",".pod-entry__mplay, .pod-entry__title",(function(e){e.preventDefault(),t.listItem=jQuery(this).closest(".episode-list__entry, .episode-list__search-entry"),t.modPrevBtn(),t.modNextBtn(),t.play(),t.podcast.hasClass("search-opened")&&(t.prevBtn.attr("disabled",!0),t.nxtBtn.attr("disabled",!0))})),t.list.on("click",".pod-entry__mscript",(function(e){var s=jQuery(this);if(!s.hasClass("pp-entry__mpost")){var i=s.closest(".episode-list__entry, .episode-list__search-entry");e.preventDefault(),t.showModernEpisodeContent(i)}}))):t.podcast.hasClass("postview")?(t.list.on("click",".pod-entry__title a, .pod-entry__featured",(function(s){var i=jQuery(this);if(!i.hasClass("fetch-post-title")){var a="pp-podcast-".concat(t.instance),n=t.data[a].load_info,d=!!n&&!!n.args&&n.args.hddesc;d=d||!1;var o=!i.hasClass("pod-entry__featured")&&!d||t.mediaObj.isVideo;s.preventDefault(),t.listItem=i.closest(".pod-entry"),t.modPrevBtn(),t.modNextBtn(),t.playModal(o),o&&e&&setTimeout((function(){e.find(".ppjs__audio-controls button").first().focus()}),200),t.podcast.hasClass("search-opened")&&(t.prevBtn.attr("disabled",!0),t.nxtBtn.attr("disabled",!0))}})),t.list.on("click",".pod-entry__excerpt a",(function(e){var s=jQuery(this);s.hasClass("fetch-post-title")||(e.preventDefault(),t.showEpisodeContent(s))}))):t.list.on("click",".episode-list__entry, .episode-list__search-entry",(function(e){e.preventDefault(),t.listItem=jQuery(this),t.modPrevBtn(),t.modNextBtn(),t.play(),t.podcast.hasClass("search-opened")&&(t.prevBtn.attr("disabled",!0),t.nxtBtn.attr("disabled",!0))})),e){var s=e.find(".pp-modal-tabs-list");s.length&&s.on("click",".pod-entry__mplay,.pod-entry__title a, .pod-entry__featured",(function(s){var i=jQuery(this).closest(".pod-entry");e.find(".modal-"+t.instance).length&&(s.preventDefault(),t.listItem=i,t.modPrevBtn(),t.modNextBtn(),t.playModal(!1))}))}this.prevBtn.on("click",this.playPreviousEpisode.bind(this)),this.nxtBtn.on("click",this.playNextEpisode.bind(this)),this.msgMedia&&this.msgMedia.addEventListener("ended",this.msgMediaEnded.bind(this)),this.mediaObj.media.addEventListener("ended",this.mediaEnded.bind(this)),this.plBtn.on("click",this.playPauseBtn.bind(this)),this.copylink.on("click",(function(e){e.preventDefault(),t.copyLink()})),jQuery(window).on("load",(function(){t.podcast.parent().hasClass("pp-sticky-player")&&(t.listItem=t.podcast.find(".pod-entry").first(),t.modPrevBtn(),t.modNextBtn(),t.showStickyPlayer())}))}},{key:"playPreviousEpisode",value:function(){if(this.prevBtn.attr("disabled",!0),this.listItem&&!this.listItem.hasClass("episode-list__search-entry")){var t=this.listItem.prev(".episode-list__entry");if(t.length)return this.listItem=t,this.modNextBtn(),this.prevBtn.parents("#pp-modal-window").length?this.playModal(this.modalObj.modal&&this.modalObj.modal.hasClass("modal-view")):this.play(),void(this.listItem.prev(".episode-list__entry").length&&this.prevBtn.attr("disabled",!1))}this.prevBtn.blur()}},{key:"modPrevBtn",value:function(){this.prevBtn.attr("disabled",!0),this.listItem&&!this.listItem.hasClass("episode-list__search-entry")&&this.listItem.prev(".episode-list__entry").length&&this.prevBtn.attr("disabled",!1)}},{key:"playNextEpisode",value:function(){if(this.listItem&&!this.listItem.hasClass("episode-list__search-entry")){var t=this.listItem.next(".episode-list__entry");t.length?(this.listItem=t,this.modPrevBtn(),this.nxtBtn.parents("#pp-modal-window").length?this.playModal(this.modalObj.modal&&this.modalObj.modal.hasClass("modal-view")):this.play(),this.listItem.next(".episode-list__entry").length||this.checkforNextEpisode(!1)):this.checkforNextEpisode(!0)}else{var e=this.list.find(".episode-list__entry").first();e.length&&(this.listItem=e,this.podcast.hasClass("postview")?this.playModal(this.modalObj.modal&&this.modalObj.modal.hasClass("modal-view")):this.play())}this.nxtBtn.blur()}},{key:"checkforNextEpisode",value:function(t){if(this.podcast.hasClass("single-audio"))this.nxtBtn.attr("disabled",!0);else if(this.loadMore||(this.loadMore=e[this.id].loadMore),this.loadMore){var s=!!this.listItem.attr("data-pid");this.loadMore.loadEpisodes(s);var i=this.listItem.next(".episode-list__entry");i.length?t&&(this.listItem=i,this.modPrevBtn(),this.play()):this.nxtBtn.attr("disabled",!0)}}},{key:"modNextBtn",value:function(){this.nxtBtn.is(":disabled")&&this.listItem&&!this.listItem.hasClass("episode-list__search-entry")&&this.listItem.next(".episode-list__entry").length&&this.nxtBtn.attr("disabled",!1),this.listItem&&!this.listItem.hasClass("episode-list__search-entry")&&(this.listItem.next(".episode-list__entry").length||this.checkforNextEpisode())}},{key:"showEpisodeContent",value:function(t){var e,s=t.closest(".pod-entry"),i="pp-podcast-".concat(this.instance),a=s.attr("id"),n=s.find(".pod-entry__excerpt");e=s.hasClass("episode-list__search-entry")?this.data.search[a]:this.data[i][a],n.html(e.description).addClass("expanded")}},{key:"showModernEpisodeContent",value:function(t){var e,s="pp-podcast-".concat(this.instance),i=t.attr("id");e=t.hasClass("episode-list__search-entry")?this.data.search[i]:this.data[s][i],this.single.find(".episode-single__title").html(e.title),this.single.find(".episode-single__author").html(e.author),this.single.find(".episode-single__description").html(e.description),this.episode.slideDown("fast")}}
1,{key:"common",value:function(){var t,s,i,a,n,d,o,l,r,p="pp-podcast-".concat(this.instance),h=!!this.data[p]&&this.data[p].rdata,c=!!this.data[p]&&this.data[p].load_info,m=(!!c&&c.args,this.listItem.attr("id")||this.listItem.attr("data-pid")),u=!!this.modalObj&&this.modalObj.modal,f=e[this.id].playRate||1,y=this.controls.find(".ppshare__social");if(0<(t=this.list.find(".activeEpisode")).length&&t.removeClass("activeEpisode media-playing"),u){var g=u.find(".pp-modal-tabs-list");g.length&&g.find(".activeEpisode").removeClass("activeEpisode media-playing")}if(this.msgMediaObj&&(this.msgMediaObj.paused||this.msgMediaObj.pause(),this.msgMediaObj.currentTime=0),this.played=!0,this.playingAmsg=!1,this.player.removeClass("msg-playing"),s=this.listItem.hasClass("episode-list__search-entry")?this.data.search[m]:this.data[p][m],i=encodeURIComponent(s.link),a=encodeURIComponent(s.title),n=jQuery("<div>").html(s.src).html().replace(/&/g,"&"),this.isPremium&&!1!==h&&"feedurl"===h.from){if(void 0!==s.key){var v={ppplayer:h.fprint,ppepisode:s.key},_=jQuery.param(v),b=h.permalink;i=b?b+(b.indexOf("?")<0?"?":"&")+_:i,i=encodeURIComponent(i)}}else if(this.isPremium){var j=jQuery.param({sharedby:"pplayer"});i=i+(i.indexOf("?")<0?"?":"&")+encodeURIComponent(j)}var C="https://www.facebook.com/sharer.php?u="+i,w="https://twitter.com/intent/tweet?url="+i+"&text="+a,k="https://www.linkedin.com/shareArticle?mini=true&url="+i,O="mailto:?subject="+a+"&body=Link:"+i;if(this.listItem.addClass("activeEpisode media-playing"),this.episode.find(".episode-single__title").html(s.title),this.episode.find(".episode-single__author > .single-author").html(s.author),this.controls.find(".ppjs__episode-title").html(s.title),this.episode.find(".episode-single__description").html(s.description),this.modalObj){var M=this.modalObj.modal.find(".pp-modal-aux-wrapper.aux-open");M.length&&(M.find(".episode-single__title").html(s.title),M.find(".episode-single__author > .single-author").html(s.author),M.find(".episode-single__description").html(s.description),M.find(".pp-modal-tabs-list").hide(),M.find(".lists-tab").removeClass("selected"),M.find(".content-tab").addClass("selected"),M.find(".pp-modal-tabs-content").fadeIn(),M.animate({scrollTop:0},400))}return y.find(".ppsocial__facebook").attr("href",C),y.find(".ppsocial__twitter").attr("href",w),y.find(".ppsocial__linkedin").attr("href",k),y.find(".ppsocial__email").attr("href",O),y.find("input.pp-copylink").val(decodeURIComponent(i)),this.controls.find(".ppshare__download").attr("href",n),this.controls.find(".ppshare__download").attr("download",n),r=this.podcast.data("teaser"),o=this.podcast.data("elength"),l=this.podcast.data("eunit"),this.podcast.hasClass("special-style")||(d=this.episode.find(".episode-single__description"),"full"===r&&d.length?(this.controls.find(".ppjs__more").css("display","none"),this.controls.find(".ppjs__episode-full-content").html(d.html())):"none"===r?this.controls.find(".ppjs__episode-excerpt").hide():""===r&&o&&((d=!!d.length&&d.text().trim())&&d.length?(l?d.length>o?(d=d.substr(0,o),this.controls.find(".ppjs__more").css("display","inline")):this.controls.find(".ppjs__more").css("display","none"):d.split(/\s+/).length>o?(d=d.split(/\s+/).splice(0,o).join(" "),this.controls.find(".ppjs__more").css("display","inline")):this.controls.find(".ppjs__more").css("display","none"),this.controls.find(".ppjs__excerpt-content").text(d),this.controls.find(".ppjs__episode-excerpt").show()):this.controls.find(".ppjs__episode-excerpt").hide())),this.mediaObj.setSrc(n),this.mediaObj.load(),this.mediaObj.media.playbackRate=f,this.playMessage(),!0}},{key:"btnImage",value:function(){var t="pp-podcast-".concat(this.instance),e=this.listItem.attr("id")||this.listItem.attr("data-pid"),s=this.player.find(".ppjs__img-btn").attr("data-src"),i=this.listItem.hasClass("episode-list__search-entry")?this.data.search[e]:this.data[t][e],a=i.title,n=i.featured,o=i.fset;n?(this.player.find(".ppjs__img-btn").attr("srcset",o).attr("src",n).attr("alt",a).closest(".ppjs__img-wrapper").removeClass("noimg"),"undefined"!==d(s)&&!1!==s&&this.player.find(".ppjs__img-btn").attr("data-srcset",o).attr("data-src",n),this.modalObj&&this.modalObj.modal.find(".ppjs__img-btn").attr("scrset",o).attr("src",n).attr("alt",a).closest(".ppjs__img-wrapper").removeClass("noimg")):(this.player.find(".ppjs__img-wrapper").addClass("noimg"),this.modalObj&&this.modalObj.modal.find(".ppjs__img-wrapper").addClass("noimg"))}},{key:"playPauseBtn",value:function(){if(!1!==this.played)this.plBtn.parents("#pp-modal-window").length||this.modalObj.modal&&this.modalObj.modal.hasClass("pp-modal-open")&&this.modalObj.returnElem(),this.mediaObj.paused?(this.mediaObj.play(),this.listItem&&this.listItem.addClass("activeEpisode media-playing")):(this.mediaObj.pause(),this.listItem&&this.listItem.removeClass("activeEpisode media-playing"));else{if(this.played=!0,this.listItem=this.list.find(".episode-list__entry").first(),!this.listItem.length){var t="ppe-".concat(this.instance,"-1");this.listItem=jQuery("<div />",{class:"episode-list__entry",id:t})}this.play()}}},{key:"play",value:function(){var t=this;if(this.listItem.hasClass("activeEpisode"))return this.listItem.removeClass("activeEpisode"),this.mediaObj.pause(),this.player.removeClass("msg-playing"),this.playingAmsg=!1,void(this.msgMediaObj&&(this.msgMediaObj.pause(),this.msgMediaObj.currentTime=0));this.modalObj.modal&&this.modalObj.modal.hasClass("pp-modal-open")&&this.modalObj.returnElem(),!1!==e[this.id].fetched?(this.common(),this.btnImage(),this.singleWrap.addClass("activePodcast"),this.playingAmsg||this.mediaObj.play(),this.podcast.hasClass("wide-player")||jQuery("html, body").animate({scrollTop:this.player.offset().top},400)):!1===this.timeOut&&setTimeout((function(){t.play()}),200)}},{key:"playModal",value:function(t){var s=this;
1this.modalObj&&(this.listItem.hasClass("activeEpisode")?t?(this.modalObj.modal.removeClass("inline-view").addClass("modal-view"),this.modalObj.scrollDisable(),this.playingAmsg||(this.modalObj.modal.find(".episode-primary__title").find(".episode-single__title").html(this.episode.find(".episode-single__title").html()),this.mediaObj.play(),this.modalObj.modal.removeClass("media-paused"),this.listItem.addClass("media-playing"))):this.msgMediaObj&&this.playingAmsg?this.msgMediaObj.paused?(this.msgMediaObj.play(),this.modalObj.modal.removeClass("media-paused"),this.listItem.addClass("media-playing")):(this.msgMediaObj.pause(),this.modalObj.modal.addClass("media-paused"),this.listItem.removeClass("media-playing")):this.mediaObj.paused?(this.mediaObj.play(),this.modalObj.modal.removeClass("media-paused"),this.listItem.addClass("media-playing")):(this.mediaObj.pause(),this.modalObj.modal.addClass("media-paused"),this.listItem.removeClass("media-playing")):!1!==e[this.id].fetched?(this.common(),this.singleWrap.hasClass("activePodcast")?t&&(this.modalObj.modal.find(".episode-primary__title").find(".episode-single__title").html(this.episode.find(".episode-single__title").html()),this.modalObj.modal.removeClass("inline-view").addClass("modal-view"),this.modalObj.scrollDisable()):(this.modalObj.modal.hasClass("pp-modal-open")&&this.modalObj.returnElem(),this.modalObj.create(this.singleWrap,this.mediaObj,this.msgMediaObj,t),this.singleWrap.addClass("activePodcast")),this.playingAmsg||this.mediaObj.play(),this.modalObj.modal.removeClass("media-paused"),this.btnImage()):!1===this.timeOut&&setTimeout((function(){s.playModal()}),200))}},{key:"showStickyPlayer",value:function(){var t=this;this.modalObj&&(!1!==e[this.id].fetched?(this.common(),this.singleWrap.hasClass("activePodcast")||(this.modalObj.modal.hasClass("pp-modal-open")&&this.modalObj.returnElem(),this.modalObj.create(this.singleWrap,this.mediaObj,this.msgMediaObj,!1),this.singleWrap.addClass("activePodcast"))):!1===this.timeOut&&setTimeout((function(){t.showStickyPlayer()}),200))}},{key:"playMessage",value:function(){var t="pp-podcast-".concat(this.instance),e=!!this.data[t]&&this.data[t].rdata;if(e&&void 0!==e.audiomsg)if(e.playfreq<=this.msgFreqCounter||!1===this.played){if(this.msgFreqCounter=0,"start"===e.msgstart)this.playingAmsg=!0,this.player.addClass("msg-playing"),this.msgMediaObj&&this.msgMediaObj.play();else if("end"===e.msgstart)this.playAmsg=!0;else if("custom"===e.msgstart){var s=60*e.msgtime[0]*60+60*e.msgtime[1]+e.msgtime[2];this.deferredPlay(s)}}else this.msgFreqCounter++,this.playingAmsg=!1}},{key:"deferredPlay",value:function(t){var e=this;if(t){var s=this.mediaObj.currentTime;s&&s>=t?(this.playingAmsg=!0,this.mediaObj.pause(),this.msgMediaObj&&this.msgMediaObj.play(),this.player.addClass("msg-playing")):setTimeout((function(){e.deferredPlay(t)}),1e3)}}},{key:"mediaEnded",value:function(){!0===this.playAmsg?(this.playingAmsg=!1,this.player.addClass("msg-playing"),this.msgMediaObj&&this.msgMediaObj.play()):this.listItem&&!this.listItem.hasClass("episode-list__search-entry")&&this.playNextEpisode()}},{key:"msgMediaEnded",value:function(){!0===this.playingAmsg?(this.player.removeClass("msg-playing"),this.playingAmsg=!1,this.mediaObj.play()):!0===this.playAmsg&&this.listItem&&!this.listItem.hasClass("episode-list__search-entry")&&this.playNextEpisode()}},{key:"copyLink",value:function(){this.copyField.length&&(this.copyField.show(),this.copyField[0].select(),this.copyField[0].setSelectionRange(0,99999),document.execCommand("copy"),this.copylink.addClass("pp-link-copied"))}}],i&&o(s.prototype,i),t}(),p=r;function h(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var c=function(){function t(s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=s,this.podcast=e[s].podcast,this.settings=e[s].settings,this.instance=e[s].instance,this.episodes=e[s].episodes,this.list=e[s].list,this.modalObj=e[s].modal,this.modal=!!this.modalObj&&this.modalObj.modal,this.fetched=e[s].fetched,this.isStyleSupport=e.isStyleSupport,this.data=e.podcastPlayerData,this.loadbtn=this.podcast.find(".episode-list__load-more"),this.auxList=!!this.modal&&this.modal.find(".pp-modal-tabs-list"),this.events()}var s,i;return s=t,i=[{key:"events",value:function(){var t=this;this.preLoadEpisodes(),this.loadbtn.on("click",(function(){t.loadEpisodes(!1)})),this.auxList&&this.auxList.length&&this.auxList.on("click",".episode-list__load-more",(function(){t.modal.find(".modal
1-"+t.instance).length&&t.loadEpisodes(!0)}))}},{key:"preLoadEpisodes",value:function(){var t="pp-podcast-".concat(this.instance),s=!!this.data[t]&&this.data[t].rdata.from,i=!!this.data[t]&&this.data[t].load_info,a=!!i&&i.loaded;s&&"link"!==s?0!=a?e[this.id].fetched=!0:this.fetchEpisodes():s&&this.fetchMediaURL()}},{key:"loadEpisodes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e="pp-podcast-".concat(this.instance);if(this.data[e]){var s,i=this.episodes.find(".episode-list__entry").first(),a=this.data[e].rdata.from,n=this.data[e].load_info,d=this.data[e].rdata.teaser,o=this.data[e].rdata.elen,l=this.data[e].rdata.eunit,r=jQuery("<div />"),p=i.find(".pod-entry__image"),h=p.length?p.attr("sizes"):"",c=!1;s=t?this.auxList.find(".pod-entry").length:this.list.find(".pod-entry").length;var m=Math.min(s+n.step,n.loaded),u=s+1,f="fetch-feed-title";for("posts"===a&&(f="fetch-post-title");u<=m;u++){var y="ppe-".concat(this.instance,"-").concat(u),g=t?'data-pid="'+y+'"':'id="'+y+'"',v=this.data[e][y];if(c=c||y,void 0!==v){var _=v.title,b=v.description,j=v.author,C=v.date,w=v.link,k=v.featured,O=v.fset,M=jQuery("<a />",{href:w,class:f}).html(_),x=jQuery("<a />",{href:w,class:f}).html("[...]"),E=jQuery("<div />",{class:"pod-entry__title"}).html(M),P=jQuery("<div />",{class:"pod-entry__date"}).text(C),T=jQuery("<div />",{class:"pod-entry__author"}).html(j),B="",S=void 0;if(this.podcast.hasClass("postview")){var L=n.args.display,Q=0!=n.args.hdfeat,I=b?jQuery(b).text():"",A=jQuery("<div />",{class:"pod-entry__play"}).html(this.settings.ppPlayCircle+this.settings.ppPauseBtn),R=void 0,N="";if(R=L&&this.isStyleSupport(L,"playbtn")?"":(R=k?jQuery("<img />",{class:"pod-entry__image",src:k,srcset:O,sizes:h}):"")?'<div class="pod-entry__thumb">'.concat(R[0].outerHTML,"</div>"):"",Q&&!this.isStyleSupport(L,"playbtn")||(B='<div class="pod-entry__featured">'.concat(A[0].outerHTML).concat(R,"</div>")),L&&this.isStyleSupport(L,"excerpt")){var D=void 0;if("none"===d)N="";else if("full"===d){var H=b?jQuery("<div />",{class:"pod-entry__excerpt"}).html(b):"";N=H?H[0].outerHTML:""}else{var F=(D=l?I?I.substr(0,o):"":I?I.split(/\s+/).splice(0,o).join(" "):"")?jQuery("<div />",{class:"pod-entry__excerpt"}).html(D+x[0].outerHTML):"";N=F?F[0].outerHTML:""}}S="\n\t\t\t\t\t<div ".concat(g,' class="episode-list__entry pod-entry" data-search-term="').concat(_.toLowerCase(),'">\n\t\t\t\t\t\t<div class="pod-entry__wrapper">\n\t\t\t\t\t\t\t').concat(B,'\n\t\t\t\t\t\t\t<div class="pod-entry__content">\n\t\t\t\t\t\t\t\t').concat(E[0].outerHTML).concat(N).concat(P[0].outerHTML).concat(T[0].outerHTML,"\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t")}else this.podcast.hasClass("modern")?((S=this.episodes.find(".episode-list__entry").first().clone()).removeClass("activeEpisode media-playing"),S.attr("id",y),S.attr("data-search-term",_.toLowerCase()),S.find(".pod-entry__title").replaceWith(E),S.find(".pp-entry__mpost").attr("href",w)):S='\n\t\t\t\t\t<div id="'.concat(y,'" class="episode-list__entry pod-entry" data-search-term="').concat(_.toLowerCase(),'">\n\t\t\t\t\t\t<div class="pod-entry__content">\n\t\t\t\t\t\t\t').concat(E[0].outerHTML).concat(P[0].outerHTML).concat(T[0].outerHTML,"\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t");r.append(jQuery(S))}}if(t){var U=this.auxList.find(".episode-list__load-more");U.parent().before(r.html()),n.maxItems&&m>=n.maxItems&&U.hide(),n.ids&&m>=n.ids.length&&U.hide()}else this.loadbtn.parent().before(r.html()),n.maxItems&&m>=n.maxItems&&this.loadbtn.hide(),n.ids&&m>=n.ids.length&&this.loadbtn.hide();if(c){var W=this.podcast.find("#"+c);W.length&&(W.find("a").first().focus(),this.podcast.hasClass("postview")&&jQuery("html, body").animate({scrollTop:W.offset().top-150},400))}t||(n.displayed=m),n.loaded-m<=n.step&&this.fetchEpisodes()}}},{key:"fetchEpisodes",value:function(){var t="pp-podcast-".concat(this.instance),e=this.data[t].rdata;"feedurl"===e.from?this.fetchFromFeed():"posts"===e.from&&this.fetchFromPosts()}},{key:"fetchMediaURL",value:function(){var t=this,s="pp-podcast-".concat(this.instance),i="ppe-".concat(this.instance,"-1"),a=this.data[s][i],n=this.data.ajax_info,d=a.src;if(0!=d.indexOf("http://")&&0!=d.indexOf("https://")){var o={action:"pp_fetch_media_url",security:n.security,src:d};
1jQuery.ajax({url:n.ajaxurl,data:o,type:"POST",timeout:4e3,success:function(s){var i=JSON.parse(s);a.src===a.link&&(a.link=i),a.src=i,e[t.id].fetched=!0},error:function(){a.src="#",a.link="#"}})}else e[this.id].fetched=!0}},{key:"fetchFromFeed",value:function(){var t=this,s="pp-podcast-".concat(this.instance),i=this.data[s].load_info,a=this.data.ajax_info,n=i.step;e[this.id].fetched||(n*=2);var d={action:"pp_fetch_episodes",security:a.security,instance:this.instance,loaded:i.loaded,maxItems:i.maxItems,feedUrl:i.src,step:n,sortby:i.sortby,filterby:i.filterby,args:i.args};i.loaded>=i.maxItems?i.displayed>=i.loaded&&this.loadbtn.slideUp("slow"):jQuery.ajax({url:a.ajaxurl,data:d,type:"POST",timeout:4e3,success:function(a){var n=JSON.parse(a);i.loaded=n.loaded,jQuery.extend(!0,t.data[s],n.episodes),e[t.id].fetched=!0},error:function(){t.loadbtn.hide()}})}},{key:"fetchFromPosts",value:function(){var t=this,s="pp-podcast-".concat(this.instance),i=this.data[s].load_info,a=this.data.ajax_info,n=jQuery.extend(!0,{},i.args);e[this.id].fetched||(n.number=2*n.number);var d={action:"pp_fetch_posts",security:a.security,instance:this.instance,offset:i.offset,loaded:i.loaded,args:n,ids:i.ids};i.offset&&0===i.offset||i.ids&&Array.isArray(i.ids)&&i.loaded>=i.ids.length||jQuery.ajax({url:a.ajaxurl,data:d,type:"POST",timeout:4e3,success:function(a){var n=JSON.parse(a);jQuery.isEmptyObject(n)?(i.offset=0,t.loadbtn.slideUp("slow")):(i.loaded=n.loaded,i.ids=n.ids,jQuery.extend(!0,t.data[s],n.episodes),i.offset&&(i.offset+=i.step)),e[t.id].fetched=!0},error:function(){t.loadbtn.hide()}})}}],i&&h(s.prototype,i),t}(),m=c;function u(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var y=function(){function t(s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f(this,"isSrchOpen",!1),f(this,"localTimeOut",null),f(this,"serverTimeOut",null),f(this,"hasLoading",!1),f(this,"prevSearchTerm",""),this.podcast=e[s].podcast,this.instance=e[s].instance,this.isStyleSupport=e.isStyleSupport,this.data=e.podcastPlayerData,this.list=e[s].list,this.episodes=e[s].episodes,this.settings=e[s].settings,this.loadbtn=this.podcast.find(".episode-list__load-more"),this.prevBtn=this.podcast.find(".pp-prev-btn"),this.nextBtn=this.podcast.find(".pp-next-btn"),this.term=!1,this.searchBox=this.list.find(".episode-list__search input"),this.searchResults=this.list.find(".episode-search"),this.searchClose=this.list.find(".episode-list__clear-search"),this.events()}var s,i;return s=t,i=[{key:"events",value:function(){this.searchBox.on("keyup paste",this.initSearch.bind(this)),this.searchClose.on("click",this.clearSearch.bind(this))}},{key:"initSearch",value:function(){var t=this.searchBox.val();this.term!==t&&(this.term=t,!1===this.isSrchOpen&&(this.podcast.addClass("search-opened"),this.searchResults.addClass("toggled-on"),this.loadbtn.hide(),this.searchClose.show(),this.isSrchOpen=!0),clearTimeout(this.localTimeOut),this.localTimeOut=setTimeout(function(){(t=this.searchBox.val().trim().toLowerCase())&&this.filterEpisodes(t)}.bind(this),100),clearTimeout(this.serverTimeOut),this.serverTimeOut=setTimeout(function(){if(t){if(this.prevSearchTerm===t)return;this.liveSearch(t)}else this.clearSearch()}.bind(this),500))}},{key:"filterEpisodes",value:function(t){this.episodes.find(".episode-list__entry").each((function(){jQuery(this).data("search-term").includes(t)||t.length<1?jQuery(this).show():jQuery(this).hide()}))}},{key:"liveSearch",value:function(t){if(!1===this.hasLoading){var e=jQuery("<div />",{class:"episode-search__loading"}).html(this.settings.ppVidLoading);this.searchResults.html(e),this.hasLoading=!0}this.fetchResults(t)}},{key:"fetchResults",value:function(t){var e="pp-podcast-".concat(this.instance),s=this.data[e].rdata;"feedurl"===s.from?this.fetchFromFeed(t):"posts"===s.from&&this.fetchFromPosts(t)}},{key:"fetchFromFeed",value:function(t){var e=this,s="pp-podcast-".concat(this.instance),i=this.data[s].load_info,a=this.data.ajax_info,n={action:"pp_search_episodes",security:a.security,instance:"s",loaded:i.displayed,displayed:i.displayed,maxItems:i.maxItems,feedUrl:i.src,sortby:i.sortby,filterby:i.filterby,search:t,args:i.args};i.displayed>=i.maxItems?this.flushSearchResults():jQuery.ajax({url:a.ajaxurl,data:n,type:"POST",timeout:4e3,success:function(t){var s=JSON.parse(t);jQuery.isEmptyObject(s)?e.flushSearchResults():(e.data.search=s.episodes,e.showSearchResults(s.episodes
1))},error:function(t,s,i){e.flushSearchResults(),console.log(i)}})}},{key:"fetchFromPosts",value:function(t){var e=this,s="pp-podcast-".concat(this.instance),i=this.data[s].load_info,a=this.data.ajax_info,n={action:"pp_search_posts",security:a.security,offset:i.displayed,displayed:i.displayed,args:i.args,instance:"s",search:t,ids:i.ids};jQuery.ajax({url:a.ajaxurl,data:n,type:"POST",timeout:4e3,success:function(t){var s=JSON.parse(t);jQuery.isEmptyObject(s)?e.flushSearchResults():(e.data.search=s.episodes,e.showSearchResults(s.episodes))},error:function(){e.flushSearchResults()}})}},{key:"clearSearch",value:function(){var t="pp-podcast-".concat(this.instance),e=this.data[t].load_info;this.searchBox.val(""),this.prevSearchTerm="",this.isSrchOpen=!1,this.term=!1,this.podcast.removeClass("search-opened"),this.searchResults.removeClass("toggled-on"),this.searchClose.hide(),this.episodes.find(".episode-list__entry").show(),this.flushSearchResults(),e.displayed<e.loaded&&(this.loadbtn.show(),this.nextBtn.attr("disabled",!1))}},{key:"flushSearchResults",value:function(){this.searchResults.empty(),this.hasLoading=!1}},{key:"showSearchResults",value:function(t){var e="pp-podcast-".concat(this.instance),s=this.data[e].rdata.from,i=this.data[e].load_info,a=Object.getOwnPropertyNames(t),n=a.length-1,d=this.data[e].rdata.teaser,o=this.data[e].rdata.elen,l=this.data[e].rdata.eunit,r=0,p=jQuery("<div />"),h="fetch-feed-title";for("posts"===s&&(h="fetch-post-title");r<=n;r++){var c=a[r],m=t[c],u=m.title,f=m.description,y=m.author,g=m.date,v=m.link,_=m.featured;_||(_=(_=i.args.imgurl)||"");var b=jQuery("<a />",{href:v,class:h}).html(u),j=jQuery("<a />",{href:v,class:h}).html("[...]"),C=jQuery("<div />",{class:"pod-entry__title"}).html(b),w=jQuery("<div />",{class:"pod-entry__date"}).text(g),k=jQuery("<div />",{class:"pod-entry__author"}).html(y),O=void 0;if(this.podcast.hasClass("postview")){var M=i.args.display,x=f?jQuery(f).text():"",E=jQuery("<div />",{class:"pod-entry__play"}).html(this.settings.ppPlayCircle+this.settings.ppPauseBtn),P=void 0,T="";if(P=M&&this.isStyleSupport(M,"playbtn")?"":(P=_?jQuery("<img />",{class:"pod-entry__image",src:_}):"")?'<div class="pod-entry__thumb">'.concat(P[0].outerHTML,"</div>"):"",M&&this.isStyleSupport(M,"excerpt")){var B=void 0;if("none"===d)T="";else if("full"===d){var S=f?jQuery("<div />",{class:"pod-entry__excerpt"}).html(jQuery(f).html()):"";T=S?S[0].outerHTML:""}else{var L=(B=l?x?x.substr(0,o):"":x?x.split(/\s+/).splice(0,o).join(" "):"")?jQuery("<div />",{class:"pod-entry__excerpt"}).html(B+j[0].outerHTML):"";T=L?L[0].outerHTML:""}}O='\n\t\t\t\t<div id="'.concat(c,'" class="episode-list__search-entry pod-entry" data-search-term="').concat(u.toLowerCase(),'">\n\t\t\t\t\t<div class="pod-entry__wrapper">\n\t\t\t\t\t\t<div class="pod-entry__featured">\n\t\t\t\t\t\t\t').concat(E[0].outerHTML,"\n\t\t\t\t\t\t\t").concat(P,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="pod-entry__content">\n\t\t\t\t\t\t\t').concat(C[0].outerHTML).concat(T).concat(w[0].outerHTML).concat(k[0].outerHTML,"\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t")}else this.podcast.hasClass("modern")?((O=this.episodes.find(".episode-list__entry").first().clone()).removeClass("activeEpisode media-playing episode-list__entry"),O.addClass("episode-list__search-entry"),O.attr("id",c),O.attr("data-search-term",u.toLowerCase()),O.find(".pod-entry__title").replaceWith(C),O.find(".pp-entry__mpost").attr("href",v),O.css("display","block")):O='\n\t\t\t\t<div id="'.concat(c,'" class="episode-list__search-entry pod-entry" data-search-term="').concat(u.toLowerCase(),'">\n\t\t\t\t\t<div class="pod-entry__content">\n\t\t\t\t\t\t').concat(C[0].outerHTML).concat(w[0].outerHTML).concat(k[0].outerHTML,"\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t");p.append(jQuery(O)),this.searchResults.html(p.html()),this.hasLoading=!1}}}],i&&u(s.prototype,i),t}(),g=y;function v(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),_(this,"width",void 0),_(this,"resizeTimeout",null),this.id=e,this.playerStyleUpdate(),this.managerHeader(),this.mediaElements(),this.entryEpisodes(),this.loadMore(),this.searchEpisodes(),this.events()}var s,a;return s=t,(a=[{key:"events",value:function(){var t=this;clearTimeout(this.resizeTimeout),jQuery(window).on("resize",(function(){t.resizeTimeout=setTimeout(t.playerStyleUpdate.bind(t),100)}))}},{key:"playerStyleUpdate",value:function(){var t=e[this.id].podcast,s="";this.width=t.width(),window.matchMedia("(max-width: 640px)").matches?e.isLrgScrn=!1:e.isLrgScrn=!0,t.removeClass("wider-player wide-player narrow-player medium-player"),e[this.id].isWide=!1,this.width>720?(s="wider-player medium-player wide-player",e[this.id].isWide=!0):this.width>640?(s="medium-player wide-player",e[this.id].isWide=!0):this.width>450?(s="wide-player",e[this.id].isWide=!0):this.width>280&&(s="narrow-player"),t.addClass(s)}},{key:"managerHeader",value:function(){new i(this.id)}},{key:"mediaElements",value:function(){new n(this.id)}},{key:"entryEpisodes",value:function(){new p(this.id)}},{key:"loadMore",value:function(){e[this.id].loadMore=new m(this.id
1)}},{key:"searchEpisodes",value:function(){new g(this.id)}}])&&v(s.prototype,a),t}();function j(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var C=function(){function t(){var e,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),s=void 0,(e="modal")in this?Object.defineProperty(this,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[e]=s,this.settings=window.ppmejsSettings||{},this.mediaObj=!1,this.msgMediaObj=!1,this.bodyScrollDisabled=!1,this.scrollPosition=0,this.scrollingElem=document.scrollingElement||document.documentElement||document.body,this.setup(),this.events(),this.pauseMedia=this.mediaPause.bind(this),this.playMedia=this.mediaPlay.bind(this)}var e,s;return e=t,(s=[{key:"setup",value:function(){var t=this.settings,e=t.ppClose,s=t.ppArrowUp,i=t.ppCloseBtnText,a=t.ppAuxModal,n=jQuery("<button />",{class:"pp-modal-close"}).html(i+s+e),d='\n\t\t<div id="pp-modal-window" class="pp-modal-window">\n\t\t\t<div class="pp-modal-wrapper"></div>\n\t\t\t'.concat(a,"\n\t\t\t").concat(n[0].outerHTML,"\n\t\t</div>");jQuery("body").append(d),this.modal=jQuery("#pp-modal-window")}},{key:"events",value:function(){var t=this,e=t.modal.find(".pp-modal-wrapper"),s=t.modal.find(".pp-modal-aux-wrapper"),i=s.find(".pp-modal-tabs-list"),a=s.find(".pp-modal-tabs-content");this.modal.on("click",".pp-modal-close",(function(){var n=jQuery(this);t.modal.hasClass("modal-view")?t.mediaObj.isVideo?t.modalClose():(t.modal.removeClass("modal-view").addClass("inline-view"),t.scrollEnable()):(n.hasClass("modal-closed")?(n.removeClass("modal-closed"),e.animate({height:"toggle"},400)):(n.addClass("modal-closed"),e.animate({height:"toggle"},400)),s.hasClass("aux-open")&&(t.modal.find(".ppjs__secondary-controls").find(".toggled").removeClass("toggled"),s.find(".selected").removeClass("selected"),i.hide(),a.empty(),s.hide().removeClass("aux-open")))})),this.modal.on("click",".pp-text-aux-btn",(function(){var t=jQuery(this);if(t.hasClass("toggled"))t.removeClass("toggled"),i.hide(),s.find(".selected").removeClass("selected"),a.empty(),s.animate({height:"toggle"},200).removeClass("aux-open");else{var n=e.find(".episode-single__wrapper").html();t.addClass("toggled"),i.hide(),s.find(".selected").removeClass("selected"),s.find(".content-tab").addClass("selected"),a.empty().html(n).show(),s.addClass("aux-open").animate({height:"toggle"},200)}})),this.modal.on("click",".pp-modal-tabs-item",(function(){var t=jQuery(this);if(!t.hasClass("selected"))if(t.parent().find(".selected").removeClass("selected"),t.addClass("selected"),t.hasClass("lists-tab")){var e=i.find(".activeEpisode");a.hide(),i.fadeIn(),e.length&&s.animate({scrollTop:s.scrollTop()+e.position().top},400)}else t.hasClass("content-tab")&&(i.hide(),a.fadeIn())})),jQuery(document).on("keyup",(function(e){"Escape"===e.key&&(t.modal.hasClass("media-paused")?t.modalClose():t.modal.hasClass("modal-view")&&!t.mediaObj.isVideo&&(t.modal.removeClass("modal-view").addClass("inline-view"),t.scrollEnable()))})),this.modal.on("click",(function(e){var s=jQuery(e.target);t.modal.hasClass("modal-view")&&(s.closest(".pp-modal-wrapper").length||s.closest(".pp-modal-close").length||(t.modal.hasClass("media-paused")||t.mediaObj.isVideo?t.modalClose():(t.modal.removeClass("modal-view").addClass("inline-view"),t.scrollEnable())))}))}},{key:"create",value:function(t,e,s,i,a){var n,d=jQuery("<div />",{id:"pp-modal-placeholder"}),o=this.modal.find(".pp-modal-wrapper"),l=t.closest(".pp-podcast"),r=l.attr("id").replace("pp-podcast-",""),p=this.modal.find(".pp-modal-aux-wrapper"),h=p.find(".pp-modal-tabs-list"),c=this;if(a=void 0===a||a,l.is(".single-audio, .hide-content")||((n=l.find(".pod-content__list").clone()).find(".pod-entry").each((function(){var t=jQuery(this);t.show().attr("data-pid",t.attr("id")).removeAttr("id").removeClass("media-playing activeEpisode")})),n.find(".episode-list__load-more").show(),n.find(".episode-list__search-results").hide(),h.empty().append(n).addClass("lv3 postview"),h.find(".episode-list__search").hide()),l.hasClass("modern")){var m=l.find(".ppjs__time");l.find(".ppjs__audio-timer").append(m)}if(p.addClass("aux-modal-"+r),d.insertBefore(t),!l.hasClass("postview")){var u=jQuery("<div />",{class:"episode-search__loading"}).html(this.settings.ppVidLoading);d.height(t.height()).html(u)}o.empty().append(t),o.children().wrapAll('<div class="modal-'+r+'">'),i?(this.modal.addClass("modal-view pp-modal-open"),this.scrollDisable()):this.modal.addClass("inline-view pp-modal-open"),jQuery.each(["light-accent","light-color","hide-share","hide-download","hide-social","single-episode","single-audio","modern"],(function(t,e){l.hasClass(e)&&c.modal.addClass(e)})),this.mediaObj&&a&&this.mediaObj.pause(),this.mediaObj=e,this.msgMediaObj=s,this.mediaObj.media.addEventListener("ended",this.pauseMedia),this.mediaObj.media.addEventListener("pause",this.pauseMedia),this.mediaObj.media.addEventListener("play",this.playMedia),this.mediaObj.media.addEventListener("playing",this.playMedia),this.msgMediaObj&&(this.msgMediaObj.media.addEventListener("ended",this.pauseMedia),this.msgMediaObj.media.addEventListener("pause",this.pauseMedia),this.msgMediaObj.media.addEventListener("play",this.playMedia),this.msgMediaObj.media.addEventListener("playing",this.playMedia))}},{key:"mediaPause",value:function(){this.modal.addClass("media-paused"),jQuery("#pp-modal-placeholder").parent().find(".activeEpisode").removeClass("media-playing")}},{key:"mediaPlay",value:function(){this.modal.removeClass("media-paused"),jQuery("#pp-modal-placeholder").parent().find(".activeEpisode").addClass("media-playing")}},{key:"modalClose",value:function(){this.returnElem(),this.modal.removeClass().addClass("pp-modal-window"),this.scrollEnable(),this.mediaObj&&(this.mediaObj.pause(),this.mediaObj=!1),this.msgMediaObj&&(this.msgMediaObj.pause(),this.msgMediaObj.currentTime=0,this.msgMediaObj=!1)}},{key:"returnElem",value:function(){var t=this.modal.find(".pp-modal-wrapper"),e=this.modal.find(".pp-modal-aux-wrapper"),s=t.find(".pp-podcast__single"),i=jQuery("#pp-modal-placeholder"),a=this.modal.find(".pp-modal-close");if(this.mediaObj.media.removeEventListener("ended",this.pauseMedia),this.mediaObj.media.removeEventListener("pause",this.pauseMedia),this.mediaObj.media.removeEventListener("play",this.pauseMedia),this.mediaObj.media.removeEventListener("playing",this.pauseMedia),this.msgMediaObj&&(this.msgMediaObj.media.removeEventListener("ended",this.pauseMedia),this.msgMediaObj.media.removeEventListener("pause",this.pauseMedia),this.msgMediaObj.media.removeEventListener("play",this.playMedia),this.msgMediaObj.media.removeEventListener("playing",this.playMedia)),e.length&&e.hasClass("aux-open")&&(e.removeClass("aux-open").hide(),this.modal.find(".ppjs__secondary-controls").find(".toggled").removeClass("toggled")),e.removeClass().addClass("pp-modal-aux-wrapper"),this.modal.hasClass("modern")){var n=this.modal.find(".ppjs__time");this.modal.find(".ppjs__atime-container").append(n)}s.length&&(s.removeClass("activePodcast"),i.length&&s.insertAfter(i)),i.length&&(i.parent().find(".activeEpisode").removeClass("activeEpisode media-playing"),i.remove()),a.removeClass("modal-closed"),this.modal.removeClass().addClass("pp-modal-window"),t.empty().removeAttr("style")}},{key:"scrollDisable",value:function(){var t=this;this.bodyScrollDisabled||(this.scrollPosition=this.scrollingElem.scrollTop,this.bodyScrollDisabled=!0,setTimeout((function(){t.scrollingElem.scrollTop=0,t.scrollingElem.classList.add("no-scroll")}),250))}},{key:"scrollEnable",value:function(){this.bodyScrollDisabled&&(this.scrollingElem.classList.remove("no-scroll"),this.scrollingElem.scrollTop=this.scrollPosition,this.bodyScrollDisabled=!1)}}])&&j(e.prototype,s),t}();!function(t){var s=t(".pp-podcast"),i=t(".pp-social-shared").first(),a=window.ppmejsSettings||{},n=a.isPremium?new C:"",d=!1;function o(e){if("playerAdded"===e.animationName){var s=t(e.target);s.hasClass("pp-podcast")&&(s.hasClass("pp-podcast-added")||l(s))}}function l(t){if(!t.parents(".pp-podcast").length&&!t.hasClass("pp-podcast-added"))if(t.find(".pp-podcast").remove(),"undefined"!=typeof MediaElementPlayer){var s=t.attr("id"),i=new MediaElementPlayer(s+"-player",a),o=t.find(".pod-content__list"),r=t.find(".pod-content__episode"),p=o.find(".episode-list__wrapper"),h=r.find(".episode-single__wrapper"),c=t.find(".pp-podcast__single").first(),m=t.find(".pp-podcast__player"),u=t.find(".pp-player__amsg"),f=!1;
1if(u.length&&(f=new MediaElementPlayer(s+"-amsg-player",a)),void 0===e.podcastPlayerData[s]){var y=t.data("ppsdata");if(!y)return;e.podcastPlayerData[s]=y}e[s]={podcast:t,mediaObj:i,settings:a,list:o,episode:r,msgMediaObj:f,amsg:u,episodes:p,single:h,player:m,modal:n,singleWrap:c,fetched:!1,instance:s.replace("pp-podcast-","")},t.addClass("pp-podcast-added"),new b(s)}else!1===d&&setTimeout((function(){l(t)}),200)}setTimeout((function(){d=!0}),3e3),s.each((function(){l(t(this))})),document.addEventListener("animationstart",o,!1),document.addEventListener("MSAnimationStart",o,!1),document.addEventListener("webkitAnimationStart",o,!1),i.length&&t("html, body").animate({scrollTop:i.offset().top-200},400),a.isPremium&&a.isSticky&&t(window).on("scroll",e.stickyonScroll.bind(e))}(jQuery)}();
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.