!function(){"use strict";vare={7251:function(e,t,n){vari=n(2667),a=(n(5101),n(5466)),o=(n(6116),n(9518)),r=n(3074),l=n.n(r),s=n(365),u=n(920),c=n.n(u),d=n(2276),p=n(2787),m=n(4426),f=n(3811);functionh(e){vart=null,n=e.split(".");if(n.length)switch(n=n[n.length-1]){case"webm":t="audio/webm";break;case"flac":t="audio/flac";break;case"wave":t="audio/wave";break;case"wav":t="audio/wav";break;case"ogg":case"ogg":t="audio/ogg";break;case"mp3":case"mpeg":t="audio/mpeg"}returnt}n(2322),n(9268);vary=n(9688),b=n(5793),g=n(6983),v=n(9450);function_(e){return(_="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}functionE(e,t){for(varn=0;n<t.length;n++){vari=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}functionw(e,t){return(w=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functionk(e,t){return!t||"object"!==_(t)&&"function"!=typeoft?C(e):t}functionC(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functionP(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}newv.Z;varS=function(e){!function(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(l,e);vart,n,i,o,r=(i=l,o=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){vare,t=P(i);if(o){varn=P(this).constructor;e=Reflect.construct(t,arguments,n)}elsee=t.apply(this,arguments);returnk(this,e)});functionl(e){vart;!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,l),t=r.call(this,e);varn=d.Z.get("media-data");t.AudioPlayerData={},t.audioStartedPlaying=!1;vari=(0,y.U)(n.original_media_url,s.Z._currentValue.url);t.videoSources=[{src:i,type:h(i)}],t.videoPoster=n.poster_url,t.videoPoster=t.videoPoster?t.videoPoster:n.thumbnail_url,t.videoPoster=t.videoPoster?(0,y.U)(t.videoPoster,s.Z._currentValue.url):"",t.updatePlayerVolume=t.updatePlayerVolume.bind(C(t)),t.onAudioEnd=t.onAudioEnd.bind(C(t)),t.onAudioRestart=t.onAudioRestart.bind(C(t)),m.Z.on("switched_media_auto_play",t.onUpdateMediaAutoPlay.bind(C(t))),t.wrapperClick=t.wrapperClick.bind(C(t));vara=newv.Z;returna.update(d.Z.get("media-data").duration),t.durationISO8601=a.ISO8601(),t}returnt=l,(n=[{key:"componentDidMount",value:function(){this.videoSources.length||console.warn("Audio DEBUG:","Audio file doesn't exist"),this.recommendedMedia=d.Z.get("media-data").related_media.length?newg.Z(d.Z.get("media-data").related_media,this.refs.AudioElem.parentNode,this.props.inEmbed):null,this.upNextLoaderView=!this.props.inEmbed&&d.Z.get("media-data").related_media.length?newb.Z(d.Z.get("media-data").related_media[0]):null,document.hasFocus()||"visible"===document.visibilityState?this.initPlayerInstance():(this.initPlayerInstance=this.initPlayerInstance.bind(this),window.addEventListener("focus",this.initPlayerInstance),document.addEventListener("visibilitychange",this.initPlayerInstance))}},{key:"componentWillUnmount",value:function(){this.recommendedMedia&&(this.AudioPlayerData.instance.player.off("fullscreenchange",this.recommendedMedia.onResize),m.Z.removeListener("window_resize",this.recommendedMedia.onResize),p.Z.removeListener("changed_viewer_mode",this.recommendedMedia.onResize),this.recommendedMedia.destroy()),videojs(this.refs.AudioElem).dispose(),this.AudioPlayerData.instance=null,deletethis.AudioPlayerData.instance}},{key:"initPlayerInstance",value:function(){window.removeEventListener("focus",this.initPlayerInstance)