ravnur-player-public 3.3.7 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var e={};function n(t){try{return t instanceof Element}catch(e){return!!t.nodeName}}function i(t){return Array.isArray(t)}function s(t){return t&&"object"==typeof t&&!1===i(t)}function o(t){return"function"==typeof t}function r(t){return"string"==typeof t}function a(t,e){return r(t)&&r(e)?(n=e,t.indexOf(n)>-1):function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(t,o(e)?e:t=>t===e);var n}t.d(e,{default:()=>Lo});const l=Object.prototype.hasOwnProperty;function h(t,e){return l.call(t,e)}function c(t,e){t instanceof Array?function(t,e){for(let n=0;n<t.length;n++)e(t[n],n,t)}(t,e):function(t,e){for(const n in t)h(t,n)&&e(t[n],n,t)}(t,e)}function p(t,e,n=null){return c(t,((t,i,s)=>{n=e(n,t,i,s)})),n}function d(t,e){return t===e||(i(t)&&i(e)?t.length==t.length&&p(t,((t,n)=>t&&a(e,n)),!0):!(!s(t)||!s(e))&&(!!d(Object.keys(t),Object.keys(e))&&p(t,((t,n,i)=>t&&d(n,e[i])),!0)))}function u(){}const g=Number.MAX_VALUE;function m(t,e=0,n=g){return t>=e&&t<n}function b(t){return null!=t}function y(t){return e=>!t(e)}const _=y(b);function x(t){return _(t)||t instanceof Array&&!t.length||"string"==typeof t&&!t.length}const f=y(x);function $(t){var e=document.createElement("div");e.innerHTML='<a href="'+t.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")+'">x</a>';const n=e.firstChild;return n&&n instanceof HTMLLinkElement?n.href:t}function v(){return"rav_id_xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function w(t,e,i){t&&(b(i)&&n(i)?t.insertBefore(e,i):t.appendChild(e))}function C(t,e={},i=null,s="http://www.w3.org/1999/xhtml"){let o;return o=b(document.createElementNS)?document.createElementNS(s,t):document.createElement(t),c(e,((t,e)=>{o.setAttribute(e,t)})),b(i)&&n(i)&&w(i,o),o}function k(t,e,n,i=!1){return t.addEventListener?(t.addEventListener(e,s,i),{elem:t,handler:s,event:e}):(t.attachEvent("on"+e,o),{elem:t,handler:o,event:e});function s(e){var i=n.apply(t,arguments);return!1===i&&(e.stopPropagation(),e.preventDefault()),i}function o(){var e=n.call(t,window.event);return!1===e&&(window.event.returnValue=!1,window.event.cancelBubble=!0),e}}function T(t){t.elem.removeEventListener?t.elem.removeEventListener(t.event,t.handler):t.elem.detachEvent("on"+t.event,t.handler)}function E(t,e){return!!t&&!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function S(t,e){E(t,e)||(t.className+=" "+e)}function L(t,e){if(E(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}}function M(t,e,n){_(n)&&(n=!E(t,e)),n?S(t,e):L(t,e)}function P(t,e=f){const n=[];return c(t,(t=>{e(t)&&n.push(t)})),n}function A(t,e){for(let n=0;n<t.length;n++){const i=t[n];if(e(i))return i}return null}function F(t,e){const n=[];return c(t,((t,i,s)=>n.push(e(t,i,s)))),n}function z(t){return t[0]}function N(t){return t[t.length-1]}function R(t){return t[0]}function O(t,e){const n=o(e)?e:t=>t===e;for(let e=0;e<t.length;e++)if(n(t[e]))return e;return-1}function H(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function B(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e}function D(t,...e){return c(e,(e=>{_(e)||c(e,((e,n)=>{t[n]=e}))})),t}function I(t,e="",n=null){const i=e.split(".");for(;b(t)&&i.length;)t=t[i.shift()];return b(t)?t:n}function V(t,e,n,i){const s=t[e],o=()=>n.apply(t,[s]),r=e=>i.apply(t,[e]);if(Object.defineProperty)Object.defineProperty(t,e,{get:o,set:r});else if(t.__defineGetter__)t.__defineGetter__(e,o),t.__defineSetter__(e,r);else{const n=i=>{i.propertyName===e&&(t.detachEvent("onpropertychange",n),r(t[e]),t[e]=o,t[e].toString=()=>o().toString(),t.attachEvent("onpropertychange",n))};try{t[e]=o,t[e].toString=()=>o().toString()}catch(t){}t.attachEvent("onpropertychange",n)}}function j(t){return t.substring(0,1).toUpperCase()+t.substring(1)}function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class W{constructor(t,e){U(this,"_tokens",[]),U(this,"bus",void 0),U(this,"logger",void 0),this.bus=t,this.logger=e}addEvent(t,e,n,i=!1){const s=k(t,e,n,i);this._tokens.push(s)}destroy(){c(this._tokens,T),this._tokens.length=0}}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const G=1e3;class Q extends W{constructor(t,e){super(t.bus,t.logger),q(this,"options",void 0),q(this,"state",void 0),this.state=e,this.logger.debug("player:created"),this.options=t,setTimeout((()=>this.getElement().setAttribute("tabindex","-1")))}focus(){let t=this.getElement();this.options.isAudio&&(t=t.parentNode.parentNode),t&&t instanceof HTMLElement&&t.focus()}getTimeCode(){return this.options.timecode}getCurrentTime(){return this.getElement().currentTime+this.getTimeCode()}setCurrentTime(t,e=!0){if(!this.getElement())return;t-=this.getTimeCode();const{clip:n}=this.options;if(n){let[e,i]=n;e=e||0,i=i||this.getElement().duration,t=Math.max(t,e),t=Math.min(t,i)}this.getElement().currentTime=t,e||this.focus()}nextFrame(){const t=this._getFrameDuration();let e=this.getElement().currentTime,n=Math.floor(e*G/t);e=Math.ceil(++n*t)/G,this.setCurrentTime(e+this.getTimeCode())}prevFrame(){const t=this._getFrameDuration();let e=this.getElement().currentTime,n=Math.floor(e*G/t);e=Math.ceil(--n*t)/G,this.setCurrentTime(e+this.getTimeCode())}isPaused(){return!!this.getElement()&&this.getElement().paused}isEnded(){if(!this.getElement())return!1;const{clip:t}=this.options;if(t){const e=this.getElement().duration;let[n,i]=t;return i=i||e,i+=this.getTimeCode(),this.getCurrentTime()>=i}return this.getElement().ended}play(t=!0){this.bus.emit("handle-play-clicked"),t||this.focus();const{clip:e}=this.options;if(this.isEnded()&&e){const[t]=e;this.setCurrentTime(t||0)}return this.getElement().play()}pause(t=!0){return t||this.focus(),this.getElement().pause()}getDuration(){if(!this.getElement())return"";let t=this.getElement().duration;const{clip:e}=this.options;if(e){let[n,i]=e;n=n||0,i=i||t,t=i-n}return t+this.getTimeCode()}isMuted(){return this.getElement().muted}setMuted(t,e=!0){this.getElement().muted=t,e||this.focus()}getVolume(){return this.getElement().volume}setVolume(t,e=!0){this.getElement().volume=t,e||this.focus()}destroy(){this.logger.debug("player:destroy"),super.destroy()}getLevels(){throw new Error("You must override it")}getLevel(){throw new Error("You must override it")}setLevel(){throw new Error("You must override it")}isMultiAudioTracks(){return this.getAudioTracks().length>1}getAudioTracks(){return[]}getAudioTrack(){return 0}setAudioTrack(t){}getTextTracks(){}load(){throw new Error("You must override it")}isMultiQuality(){return this.getLevels().length>1}getBufferedPercent(){return 0}getElement(){throw new Error("You must override it")}_getFrameDuration(){return G/this.options.frameRate}}const Y=["loadstart","progress","suspend","abort","error","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"];function Z(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class X extends Q{constructor(t,e){super(t,e),K(this,"$el",void 0),K(this,"source",void 0),K(this,"_levels",[]),K(this,"_currentLevel",null),this.logger.debug("html:player:creating");let n="video";const i={id:v(),tabindex:-1};t.disableAutoFullScreenOnIOS&&(i["webkit-playsinline"]=!0,i.playsinline=!0),t.isMobile&&(i.preload="metadata",n=t.isAudio?"audio":"video"),this.$el=C(n,i),c(Y,(t=>{this.addEvent(this.$el,t,(e=>{this.logger.debug("triggered event",t),this.bus.emit(t,e)}))})),this.handleFullscreenChanging=this.handleFullscreenChanging.bind(this),this.handleWebkitEndFullscreen=this.handleWebkitEndFullscreen.bind(this),Z()&&this.bus.on("fullscreenchanging",this.handleFullscreenChanging),this.logger.debug("html:player:created")}load({type:t,src:e,cc:n}){let s={type:t,src:e};if(this.options.isMobile&&"audio/mp3"===t&&(s={src:e}),i(e)){if(this._levels=e,this.options.qualityLevel){const t=parseInt(this.options.qualityLevel,10);t&&(this._currentLevel=A(this._levels,(e=>parseInt(e.name,10)===t)))}this._currentLevel=this._currentLevel||A(this._levels,(t=>t.default)),this._currentLevel=this._currentLevel||R(this._levels),s.src=this._currentLevel.src}this.logger.debug("html:player:loading",e),this.source=C("source",s),this.source.addEventListener("error",(t=>{this.bus.emit("error",t),this.logger.error(t)})),w(this.$el,this.source),Z()&&c(n,(t=>{3!==t.state&&"json"!==t.type&&w(this.$el,C("track",t))})),this.$el.audioTracks&&(this.$el.audioTracks.onchange=()=>{this.bus.emit("audiotrackswitched")}),this.$el.addEventListener("webkitendfullscreen",this.handleWebkitEndFullscreen),Z()&&this.bus.once("loadeddata",(()=>{const t=this.getTextTracks();t instanceof TextTrackList&&t.addEventListener("change",(()=>{const e=A(t,(t=>"showing"===t.mode));e&&this.bus.emit("cclang",e.language)})),this.handleWebkitEndFullscreen()}))}getLevels(){return this._levels}setLevel(t){const e=this.$el.currentTime,n=this.$el.paused;this._currentLevel=t,this.$el.pause(),this.source.src=t.src,this.bus.once("loadedmetadata",(()=>{this.$el.currentTime=e,n||this.$el.play()})),this.$el.currentTime=e,this.$el.load()}setPlaybackRate(t){this.$el.playbackRate=t,this.$el.defaultPlaybackRate=t}getLevel(){return this._currentLevel}getElement(){return this.$el}getBufferedPercent(){const t=this.$el;return t&&t.buffered&&t.buffered.length>0&&t.buffered.end&&t.duration?t.buffered.end(t.buffered.length-1)/t.duration:0}getAudioTrack(){return O(this.getAudioTracks(),(t=>t.enabled))}getAudioTracks(){return this.$el.audioTracks||[]}setAudioTrack(t){c(this.getAudioTracks(),((e,n)=>{e&&"object"==typeof e&&(e.enabled=n==t)}))}getTextTracks(){return this.$el.textTracks||[]}handleFullscreenChanging(t){const e=!0!==t?this.state.getCCLang():"__";this._textTrackWalker((t=>t.language===e?"showing":"disabled"))}handleWebkitEndFullscreen(){this.handleFullscreenChanging(this.$el.webkitDisplayingFullscreen)}_textTrackWalker(t){c(this.getTextTracks(),(e=>{e&&"object"==typeof e&&(e.mode=t(e))}))}destroy(){this.$el.removeEventListener("webkitendfullscreen",this.handleWebkitEndFullscreen),this.bus.off("fullscreenchanging",this.handleFullscreenChanging),super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null,this.source=null}}const J={name:"Auto"},tt={maxFragLookUpTolerance:.5,maxMaxBufferLength:600,liveSyncDuration:20,highBufferWatchdogPeriod:3,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:10,retryDelayMs:3e3,maxRetryDelayMs:8e3}}}},et=["volume","src","currentTime","muted","duration","paused","ended","levels","currentLevel","level","error","currentSrc","networkState","preload","buffered","bufferedBytes","bufferedTime","readyState","seeking","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","seekable","autoplay","loop","controls"],nt=["load","play","pause","canPlayType"],it=window.navigator.appName.toLowerCase(),st=-1!==it.indexOf("microsoft")||null!==it.match(/trident/gi);class ot{constructor(t,e,n){this.name=t,this.options=e,this.supportedMediaTypes=n}canPlayType(t){return a(this.supportedMediaTypes,t)}create(t,e,n){e.logger.debug("FlashRenderer.create",e,n);let i,s,o={};o.options=e,o.id=t.id+"_"+o.options.prefix,o.mediaElement=t,o.flashState={},o.flashApi=null,o.flashApiStack=[],c(et,function(t){return e=>{t.flashState[e]=null;const n=j(e);t["get"+n]=()=>{if(t.options.logger.debug("[",t.options.prefix," get]: ",e),null===t.flashApi)return null;if(_(t.flashApi["get_"+e]))return t.options.logger.warn("[",t.options.prefix," MISSING]: ",e),null;var n=t.flashApi["get_"+e]();return"buffered"===e?{start:()=>0,end:()=>n,length:1}:n},t["set"+n]=n=>{t.options.logger.debug("[",t.options.prefix," set]: ",e," = ",n),"src"===e&&(n=$(n)),null!==t.flashApi&&b(t.flashApi["set_"+e])?t.flashApi["set_"+e](n):t.flashApiStack.push({type:"set",propName:e,value:n})}}}(o));const r=nt.slice();r.push("stop"),c(r,function(t){return e=>{t[e]=()=>{if(t.options.logger.debug("["+t.options.prefix+" "+e+"()]"),_(t.flashApi))t.flashApiStack.push({type:"call",methodName:e});else if(t.flashApi["fire_"+e])try{t.flashApi["fire_"+e]()}catch(e){t.options.logger.error("error occurred when calling flash api.",e)}else t.options.logger.warn("flash","missing method",e)}}}(o)),window["__ready__"+o.id]=function(t){return()=>{t.options.logger.debug("flash is ready");try{t.flashApi=document.getElementById("__"+t.id),t.options.bus.emit("rendererready",t),c(t.flashApiStack,(e=>{if(t.options.logger.debug("- stack",e.type,e),"set"===e.type){const n=j(e.propName);t["set"+n](e.value)}else"call"===e.type&&t[e.methodName]()}))}catch(e){t.options.logger.error(e)}}}(o),window["__event__"+o.id]=(t,n)=>e.bus.emit(t,n);const a="video"===I(t,"originalNode.tagName","").toLowerCase();if(function(t,e,n){t.flashWrapper=C("div",{class:"rmp-flash-wrapper"});const i=t.options,s=e.getAttribute("autoplay"),o=["uid="+t.id,"autoplay="+s],r=n?e.originalNode.height:1,a=n?e.originalNode.width:1;o.push("pseudostreamstart=start"),o.push("pseudostreamtype=byte"),w(e,t.flashWrapper),n&&null!==e.originalNode&&(e.originalNode.style.display="none");var l=[];if(st){var h=C("div");w(t.flashWrapper,h),l=['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"','codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"','id="__'+t.id+'"','width="'+a+'"','height="'+r+'"'],n||l.push('style="clip: rect(0 0 0 0); position: absolute;"'),h.outerHTML="<object "+l.join(" ")+'><param name="movie" value="'+i.flashPath+i.filename+"?x="+new Date+'" /><param name="flashvars" value="'+o.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><div>Loading...</div></object>'}else l=[`id="__${t.id}"`,`name="__${t.id}"`,'play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="always"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"',`src="${i.flashPath}${i.filename}"`,`flashvars="${o.join("&")}"`,`width="${a}"`,`height="${r}"`],n||l.push('style="clip: rect(0 0 0 0); position: absolute;"'),t.flashWrapper.innerHTML=`<embed ${l.join(" ")}>`;t.flashNode=t.flashWrapper.lastChild}(o,t,a),o.hide=()=>{if(o.options.logger.debug("hiding flash plugin"),a){o.flashNode.style.position="absolute",o.flashNode.style.width="1px",o.flashNode.style.height="1px";try{o.flashNode.style.clip="rect(0 0 0 0);"}catch(t){o.options.logger.error("error on hiding flash player",t)}}},o.show=()=>{if(o.options.logger.debug("showing flash plugin"),a){o.flashNode.style.position="",o.flashNode.style.width="",o.flashNode.style.height="";try{o.flashNode.style.clip=""}catch(t){o.options.logger.error("error on showing flash player",t)}}},o.setSize=(t,e)=>{o.options.logger.debug("changing size for flash plugin",t,e),o.flashNode.style.width=t,o.flashNode.style.height=e,null!==o.flashApi&&o.flashApi.fire_setSize(t,e)},f(n))for(i=0,s=n.length;i<s;i++)if(this.canPlayType(n[i].type)){o.options.logger.debug("FLASH","init, set src",n[i].src),o.setSrc(n[i].src),o.load();break}return o}}const rt=[new ot("flash_video",{prefix:"flash_video",filename:"ravnur-flash-video.swf",enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",pseudoStreamingType:"byte"},["video/mp4","video/flv","video/rtmp","audio/rtmp","rtmp/mp4","audio/mp4"]),new ot("flash_hls",{prefix:"flash_hls",filename:"ravnur-flash-video-hls.swf"},["audio/hls","video/hls","application/x-mpegURL","application/x-mpegurl","vnd.apple.mpegURL","audio/ism/manifest(format=m3u8-aapl-v3)"]),new ot("flash_audio",{prefix:"flash_audio",filename:"ravnur-flash-audio.swf"},["audio/mp3"])];let at=0;function lt(t,e={}){var n=C("div",{class:"rmp-flash-wrapper"});n.options=e,n.originalNode=t;const i=t.id||"me_flash_"+ ++at;n.originalNode.setAttribute("id",i+"_from_mejs"),n.originalNode.parentNode&&n.originalNode.parentNode.insertBefore(n,n.originalNode),n.appendChild(n.originalNode),n.id=i,n.renderers={},n.renderer=null,n.rendererName=null,c(et,function(t){return function(e){if("src"===e)return;const n=j(e),i=()=>b(t.renderer)?t.renderer["get"+n]():(t.options.logger.warn(`Could not called getter "${n}". Renderer is empty`),null),s=e=>{b(t.renderer)?t.renderer["set"+n](e):t.options.logger.warn(`Could not called setter "${n}". Renderer is empty`)};V(t,e,i,s),t["get"+n]=i,t["set"+n]=s}}(n));const s=()=>b(n.renderer)?n.renderer.getSrc():null,o=t=>{let i;const s=[];if("string"==typeof t?s.push({src:t,type:t?ct(t):""}):c(t,(t=>{const e=$(t.src),n=t.type;s.push({src:e,type:n||ct(e)})})),n.originalNode.setAttribute("src",I(z(s),"src","")),i=function(t){for(let e=0,n=rt.length;e<n;e++){const n=pt(rt[e],t);if(b(n))return n}return null}(s),n.originalNode.setAttribute("src",I(z(s),"src","")),null===i)return e.bus.emit("error",{message:"No renderer found"}),void n.options.logger.error("No renderer found");n.changeRenderer(i.rendererName,s),_(n.renderer)&&(e.bus.emit("error",{message:"Error creating renderer"}),n.options.logger.error("Error creating renderer"))};return V(n,"src",s,o),n.getSrc=s,n.setSrc=o,c(nt,function(t){return function(e){t[e]=(...n)=>(t.options.logger.debug("[wrapper ",t.id,".",e,"()]",t.renderer),I(t,`renderer.${e}`)?t.renderer[e](n):(t.options.logger.warn(`Could not called method "${e}"`),null))}}(n)),n.changeRenderer=function(t){return function(e,n){if(I(t,"renderer.name")===e)return t.options.logger.debug("Already using: ",e),t.renderer.show(),t.renderer.setSrc(z(n).src),!0;b(t.renderer)&&(t.options.logger.debug("Stopping and hiding: ",t.renderer),t.renderer.pause(),t.renderer.stop&&t.renderer.stop(),t.renderer.hide());let i=t.renderers[e];if(b(i))return t.options.logger.debug("restoring: ",i.name),i.show(),i.setSrc(z(n).src),t.renderer=i,!0;const s=A(rt,(t=>t.name===e));if(_(s))return t.options.logger.error("can't found: "+e),!1;var o=D({},t.options,s.options);return i=s.create(t,o,n),i.name=e,t.renderers[s.name]=i,t.renderer=i,t.rendererName=e,i.show(),!0}}(n),n.setSize=(t,e)=>{b(n.renderer)?n.renderer.setSize(t,e):n.options.logger.warn("Could not set the sizes. Renderer is not found")},b(n.originalNode)&&function(t){const e=[],n=t.originalNode;switch(n.nodeName.toLowerCase()){case"iframe":e.push({type:"",src:n.getAttribute("src")});break;case"audio":case"video":var i=n.childNodes.length,s=n.getAttribute("src");s&&e.push({src:s,type:ht(s,n.getAttribute("type"))});for(let t=0;t<i;t++){const i=n.childNodes[t];if(1===i.nodeType&&"source"===i.tagName.toLowerCase()){const t=i.getAttribute("src");e.push({src:t,type:ht(t,i.getAttribute("type"))})}}}f(e)&&(t.options.logger.debug("initializing src",z(e).src),t.src=e)}(n),n}function ht(t,e){return t&&!e?ct(t):function(t){return t&&~t.indexOf(";")?z(t.split(";")):t}(e)}function ct(t){if(a(t=t.toLowerCase(),"rtmp"))return a(t,".mp3")?"audio/rtmp":"video/rtmp";if(a(t,".oga")||a(t,".ogg"))return"audio/ogg";if(a(t,".m3u8")||a(t,"m3u8-aapl-v3"))return"application/x-mpegURL";if(a(t,".mpd"))return"application/dash+xml";const e=function(t){const e=z(t.split("?"));if(~e.indexOf(".")){let t=e.lastIndexOf(".");return e.substring(++t)}return""}(t),n=function(t){switch(t){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return t}}(e);return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(e)?"video":"audio")+"/"+n}function pt(t,e){const n=A(e,(e=>t.canPlayType(e.type)));return b(n)?{rendererName:t.name,src:n.src}:null}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ut={name:"Auto",index:-1},gt={name:"Auto"},mt=["application/x-mpegURL","vnd.apple.mpegURL","application/vnd.apple.mpegurl"],bt={};function yt(t){const{type:e,logger:n}=t;return t.useHTMLPlayer?(n.debug("Using html player for type: ",e),"HTML5"):function(){const t=window.MediaSource||window.WebKitMediaSource;return b(t)&&o(t.isTypeSupported)&&t.isTypeSupported("video/mp4; codecs=avc1.42E01E,mp4a.40.2")}()&&(t.useHLSJSPlayer||t.isLive)?(n.debug("Using hlsjs player for type: ",e),"HLS"):(n.debug("Using shaka player for type: ",e),"Shaka")}bt.HLS=class extends X{constructor(t,e){super(t,e),this.logger.debug("hls:player:created")}load({src:t}){t=s(t=i(t)?z(t):t)?t.src:t,this.logger.debug("hls:player:loading",t),b(window.Hls)?this._attachMedia(t):this._loadLibraryAndAttachMedia(t)}_loadLibraryAndAttachMedia(t){if("function"==typeof window.define&&window.define.amd)window.require.config({paths:{hlsjs:this.options.hlsjsURL}}),window.require(["hlsjs"],(e=>{window.Hls=e,this._attachMedia(t)}));else{const e=C("script",{src:this.options.hlsjsURL}),n=R(document.getElementsByTagName("script"));if(e.onload=e.onreadystatechange=()=>this._attachMedia(t),!n.parentNode)return;n.parentNode.insertBefore(e,n)}}_attachMedia(t){const e=window.Hls;if(e.isSupported())if(this.hls=new e(D(tt,this.options.hls)),this.hls.loadSource(t),this.hls.attachMedia(this.$el),this.hls.on(e.Events.ERROR,((t,e)=>{this.bus.emit("error",e),this.logger.error(e)})),this.hls.on(e.Events.AUDIO_TRACK_SWITCHED,(()=>{this.bus.emit("audiotrackswitched")})),this.hls.on(e.Events.MANIFEST_PARSED,((t,e)=>{if(this.options.showSubtitles||(this.hls.subtitleDisplay=!1),this.options.qualityLevel){const t=parseInt(this.options.qualityLevel,10);if(t){const n=A(e.levels,(e=>e.height===t));n&&this.setLevel(n)}}if(this.options.startLevel){const t=parseInt(this.options.startLevel,10);if(t){const n=O(e.levels,(e=>e.height===t));this.hls.startLevel=n}}})),this.hls.on(e.Events.BUFFER_CREATED,(()=>{this.options.isLive&&this.goToLive()})),this.options.aesToken){let t;this.hls.config.xhrSetup=(e,n)=>{e.addEventListener("load",(()=>{if("string"==typeof e.response&&e.response.indexOf("#EXTM3U")>=0){const i=e.response.split("\n").find((t=>0===t.indexOf("#EXT-X-KEY")))?.split('URI="')[1].split('"')[0],s="https://"+n.split("/")[2]+i;i&&(t=s)}})),n===t&&e.setRequestHeader("Authorization","Bearer "+this.options.aesToken)}}else{const e=t.split("?")[1];e&&(this.hls.config.xhrSetup=(t,n)=>{t.open("GET",n+`?${e}`,!0)})}else this.logger.error("HLS is not supported for this browser")}goToLive(){this.hls.media&&(this.logger.debug("hls:player:live"),this.hls.media.currentTime=this.hls.liveSyncPosition||this.hls.media.duration-10)}isLive(){return this.hls?.liveSyncPosition?this.hls?.media.currentTime>=this.hls?.liveSyncPosition-10:this.hls?.media.currentTime>=this.hls?.media.duration-10}getLevels(){return[J].concat(this.hls.levels)}setLevel(t){const e=O(this.hls.levels,t);this.hls.currentLevel=e}getLevel(){return this.hls.levels[this.hls.manualLevel]||J}isMultiQuality(){return this.hls.levels.length>1}getAudioTracks(){return this.hls.audioTracks}getAudioTrack(){return this.hls.audioTrack}getTextTracks(){return this.$el.textTracks||[]}setAudioTrack(t){this.hls.audioTrack=t}destroy(){this.hls.destroy(),super.destroy()}},bt.Flash=class extends Q{constructor(t,e){super(t,e),dt(this,"$el",void 0),dt(this,"_levels",[]),dt(this,"_currentLevel",null),dt(this,"mediaElement",null),this.logger.debug("flash:controller:creating"),this.$el=C(t.isAudio?"audio":"video"),this.onFullScreenChanged=this.onFullScreenChanged.bind(this),this.logger.debug("flash:controller:created")}load({src:t}){i(t)&&(this._levels=t,this._currentLevel=A(this._levels,(t=>t.default))||R(this._levels),t=this._currentLevel.src),this.logger.debug("flash:controller:loading",t);const e=new lt(this.$el,this.options);this.mediaElement=e,e.setSrc(t),e.setSize("100%","100%"),e.play(),this.bus.once("loadedmetadata",(()=>{if(e.pause(),this.options.qualityLevel){const t=parseInt(this.options.qualityLevel,10),e=A(this.getLevels(),(e=>e.height===t));e&&(this.setLevel(e),this.bus.emit("qualitychange",`${t}p`))}})),this.options.isAudio&&(e.pause(),this.bus.once("canplaythrough",(()=>{e.pause(),this.bus.emit("loadedmetadata")}))),this.bus.on("fullscreenchanged",this.onFullScreenChanged),this.bus.on("cclayoutchange",this.onFullScreenChanged)}isHLS(){return"flash_hls"===I(this.mediaElement,"rendererName")}getLevels(){if(this.isHLS()){const t=B(this.mediaElement.levels);return[ut].concat(t)}return this._levels}setLevel(t){if(this.isHLS())this.mediaElement.level=t.index;else if(this._currentLevel!==t){const e=this.mediaElement.currentTime,n=this.mediaElement.paused;this._currentLevel=t,this.mediaElement.setSrc(t.src),this.mediaElement.setSize("100%","100%"),this.mediaElement.play(),this.bus.once("loadedmetadata",(()=>{this.mediaElement.currentTime=e,this.mediaElement.pause(),this.mediaElement.play(),n&&this.mediaElement.pause()}))}}getLevel(){return this.isHLS()?this.mediaElement.levels[this.getElement().currentLevel]||ut:this._currentLevel}getElement(){return this.mediaElement}setCurrentTime(t,e=!0){const n=this.isPaused();this.pause(e),super.setCurrentTime(t,e),n||this.play(e)}isMultiQuality(){return(this.isHLS()?this.mediaElement.levels:this._levels).length>1}onFullScreenChanged(t=!1){if(t){const{mediaElement:t}=this;t&&t.setSize("100%","100%")}else setTimeout((()=>this._resizeME()))}_resizeME(){const t=this.$el.parentNode,e=this.mediaElement;if(t&&e&&t instanceof HTMLElement){const n=t.offsetWidth,i=t.offsetHeight;e.setSize(`${n}px`,`${i}px`)}}getBufferedPercent(){const t=this.mediaElement;return t.buffered.end(t.buffered.length-1)/t.duration}destroy(){this.pause();const{mediaElement:t}=this;t&&t.renderer.hide(),super.destroy(),this.bus.off("fullscreenchanged",this.onFullScreenChanged),this.bus.off("cclayoutchange",this.onFullScreenChanged),t&&(t.removeChild(this.$el),t.parentNode.removeChild(t)),this.mediaElement=null}},bt.HTML5=X,bt.Shaka=class extends X{constructor(t,e){super(t,e),this.logger.debug("shaka:player:created")}load({src:t,type:e}){t=s(t=i(t)?z(t):t)?t.src:t,/format=mpd-time-csf/.test(t)&&Z()&&!this.options.disableAutoUrlRewrite&&(e="application/x-mpegurl",t=t.replace("format=mpd-time-csf","format=m3u8-cmaf")),this.onError=this.onError.bind(this),this.logger.debug("shaka:player:loading",t),this._loadLibraryAndAttachMedia(t,e)}_loadLibraryAndAttachMedia(t,e){if("function"==typeof window.define&&window.define.amd)window.require.config({paths:{shakajs:this.options.shakaURL}}),window.require(["shakajs"],(n=>{window.shaka=n,this._attachMedia(t,e)}));else{const n=C("script",{src:this.options.shakaURL}),i=R(document.getElementsByTagName("script"));if(n.onload=n.onreadystatechange=()=>this._attachMedia(t,e),!i.parentNode)return;i.parentNode.insertBefore(n,i)}}async _attachMedia(t,e){let n=this.options.shaka;window.shaka.polyfill.installAll(),window.shaka.Player.isBrowserSupported()?(this.shaka=new window.shaka.Player,this.options.shaka&&this.shaka.configure(this.options.shaka),this.shaka.setTextTrackVisibility(!!this.options.showSubtitles),this.preselectQuality(),this.modifyRequests(t),await this.configureDRM(),await this.shaka.attach(this.$el),await this.shaka.load(t,null,e).catch(this.onError),(new window.shaka.util.EventManager).listen(this.shaka,"error",(t=>this.onError(t.detail))),this.shaka.configure(n)):this.logger.error("Browser not supported!")}async configureDRM(){const t={};if(this.options.widevineURL&&(t["com.widevine.alpha"]=this.options.widevineURL),this.options.playreadyURL&&(t["com.microsoft.playready"]=this.options.playreadyURL),this.options.fairplayURL&&(t["com.apple.fps.1_0"]=this.options.fairplayURL),this.shaka.configure({drm:{servers:t}}),this.options.fairplayCertificateUrl){const t=await fetch(this.options.fairplayCertificateUrl),e=await t.arrayBuffer();this.shaka.configure("drm.advanced.com\\.apple\\.fps\\.1_0.serverCertificate",new Uint8Array(e)),window.shaka.polyfill.PatchedMediaKeysApple.install();const n=window.shaka.util.FairPlayUtils;this.shaka.getNetworkingEngine().registerRequestFilter(n.ezdrmFairPlayRequest),this.shaka.getNetworkingEngine().registerResponseFilter(n.commonFairPlayResponse),this.shaka.configure("drm.initDataTransform",n.ezdrmInitDataTransform)}}onError(t){this.bus.emit("error",t),this.logger.error(t)}modifyRequests(t){this.shaka.getNetworkingEngine().registerRequestFilter(((e,n)=>{e===window.shaka.net.NetworkingEngine.RequestType.KEY&&this.options.aesToken&&(n.headers.Authorization="Bearer "+this.options.aesToken);const i=t?.split("?")[1]?.split("&");i?.length&&i.forEach((t=>{const e=n.uris[0]?.split("?")[1];e?n.uris[0].includes(t)||(n.uris[0]+="&"+t):n.uris[0]+="?"+t}))}))}preselectQuality(){this.options.qualityLevel&&(new window.shaka.util.EventManager).listen(this.shaka,"streaming",(()=>{const t=parseInt(this.options.qualityLevel,10),e=this.getLevels().find((e=>e.height===t));e&&this.setLevel(e)}))}getLevels(){return[gt].concat(this.shaka.getVariantTracks())}setLevel(t){t===gt?this.shaka.configure({abr:{enabled:!0}}):(this.shaka.configure({abr:{enabled:!1}}),this.shaka.selectVariantTrack(t,!0))}goToLive(){this.shaka.goToLive()}isLive(){return this.$el.currentTime>=this.shaka.seekRange().end-10}getLevel(){const t=this.shaka.getVariantTracks().find((t=>t.active));return this.shaka.getConfiguration().abr.enabled?gt:t}isMultiQuality(){return this.shaka.getVariantTracks().length>1}destroy(){this.shaka.destroy(),super.destroy()}};var _t=(()=>{for(var t,e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,s=n.length,o={};i<s;i++)if((t=n[i])&&t[1]in document){for(i=0,e=t.length;i<e;i++)o[n[0][i]]=t[i];return o}return!1})();const xt={request(t){var e=_t.requestFullscreen;t=t||document.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent),t[e]()},exit(){this.isFullscreen&&document[_t.exitFullscreen]()},toggle(t){this.isFullscreen?this.exit():this.request(t)},raw:_t};V(xt,"isFullscreen",(function(){return Boolean(document[_t.fullscreenElement])}),u),V(xt,"element",(function(){return document[_t.fullscreenElement]}),u),V(xt,"enabled",(function(){return Boolean(document[_t.fullscreenEnabled])}),u);const ft=!!_t&&xt,$t="rmp-";function vt(t,e){try{localStorage.setItem($t+t,e)}catch(t){}}function wt(t,e){try{const n=localStorage.getItem($t+t);return b(n)?n:e}catch(t){return e}}function Ct({url:t,success:e,responseType:n,rangeStart:i,rangeEnd:s,error:o}){const r=function(t,e){if("undefined"==typeof XDomainRequest){const n=new XMLHttpRequest;return n.onreadystatechange=function(){try{4===n.readyState&&(200===n.status?setTimeout(t):e&&(!n.status||n.status>=400)&&setTimeout(e))}catch(t){}},n}const n=new XDomainRequest;return n.onload=t,n}((()=>{const t="arraybuffer"===r.responseType?r.response:r.responseText;e({url:r.responseURL,data:t})}),o);r.open("GET",t,!0),b(s)&&b(i)&&r.setRequestHeader("Range","bytes="+i+"-"+--s),b(n)&&(r.responseType=n),r.send(null)}function kt(t){const e=t.split(":"),n=[3600,60,1];let i=0;for(;e.length&&n.length;)i+=e.pop()*n.pop();return i}function Tt(t,e=!1,n=!1){const i=Math.round(1e3*t)%1e3;t=Math.floor(t);const s=e?[24,60,60]:[60,60],o=[];for(;s.length;){const e=s.pop();o.unshift((r=t%e)<10?`0${r}`:`${r}`),t=Math.floor(t/e)}var r;return n?o.join(":")+"."+i:o.join(":")}const Et=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;function St(t,e,n){Ct({url:t,success:({data:t})=>{e(function(t){let e=t.split(/\n\s*\n+/gm);if("WEBVTT"!==e.shift().trim())return[];return F(P(e),(t=>{const e=t.split(/\n/g),n=z(e).indexOf("--\x3e")<0?e.shift():"",i=e.shift().split("--\x3e");return{from:kt(z(i).trim()),to:kt(N(i).trim()),text:e.filter((t=>!!t)).join("<br/>&nbsp;").replace(Et,""),title:n,id:v()}}))}(t))},error:n})}function Lt(){return!!navigator.userAgent.match(/Android/i)}function Mt(){return Lt()||Z()||!!navigator.userAgent.match(/(BlackBerry|BB10)/i)||!!navigator.userAgent.match(/(IEMobile|Windows Phone)/i)}const Pt=[{key:"red",value:"#F44336"},{key:"purple",value:"#9C27B0"},{key:"indigo",value:"#3F51B5"},{key:"blue",value:"#2196F3"},{key:"green",value:"#4CAF50"},{key:"yellow",value:"#FFEB3B"},{key:"orange",value:"#FF9800"},{key:"brown",value:"#795548"},{key:"grey",value:"#9E9E9E"},{key:"white",value:"#FFF"},{key:"black",value:"#000"}],At=[{label:"75%",value:"75%"},{label:"100%",value:"100%"},{label:"125%",value:"125%"},{label:"150%",value:"150%"},{label:"200%",value:"200%"}],Ft=[{key:"monoserif",value:'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace'},{key:"propserif",value:'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'},{key:"monosans",value:'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace'},{key:"propssans",value:'Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif'}],zt=[{key:"cc-location-over",value:"over"},{key:"cc-location-below",value:"below"}],Nt={label:"None",srclang:"",src:"",state:2},Rt={color:"fontcolor",bgcolor:"bgcolor",fontSize:"fontsize",fontFamily:"fontfamily",location:"cc_location",lang:"cclang"},Ot="toclang",Ht={theaterchanging:(t,e)=>D({},e,{isTheaterMode:!e.isTheaterMode}),fullscreenchanging:(t,e,n)=>D({},e,{isFullScreen:n="boolean"==typeof n?n:!e.isFullScreen}),cclang(t,e,n){const i=e.cc.sources,s=i[Math.max(O(i,(t=>t.srclang===n)),0)];if(!s)return e;2===s.state&&vt(Rt.lang,n);const o=D({},e.cc,{lang:n,loading:!1}),r=D({},e,{cc:o});return t.emit("captionschange",s),s.srclang&&(r.cc.loading=!0,qt(t,"refreshcaptions",s)),e.cc.lang&&n||t.emit("cclayoutchange",{mode:n&&e.cc.location||"over",fontSize:e.cc.fontSize}),r},ccsources(t,e,n,i=!1){const s=Wt(n,e.cc.lang);n=s.sources;const o=s.current&&s.current.srclang||"";i||setTimeout((()=>t.emit("cclang",o)),5);const r=D({},e.cc,{sources:n,lang:o,timedata:[]});return D({},e,{cc:r})},refreshcaptions(t,e,n,i){const s=D({},e.cc,{timedata:n});return s.timedataLang=i,s.loading=!1,D({},e,{cc:s})},cclocation(t,e,n){vt(Rt.location,n),t.emit("cclayoutchange",{mode:e.cc.lang&&n||"over",fontSize:e.cc.fontSize});const i=D({},e.cc,{location:n});return D({},e,{cc:i})},ccfontfamily(t,e,n){vt(Rt.fontFamily,n);const i=D({},e.cc,{fontFamily:n});return D({},e,{cc:i})},ccfontsize(t,e,n){vt(Rt.fontSize,n),t.emit("cclayoutchange",{mode:e.cc.lang&&e.cc.location||"over",fontSize:n});const i=D({},e.cc,{fontSize:n});return D({},e,{cc:i})},ccbgcolor(t,e,n){vt(Rt.bgcolor,n);const i=D({},e.cc,{bgcolor:n});return D({},e,{cc:i})},cccolor(t,e,n){vt(Rt.color,n);const i=D({},e.cc,{color:n});return D({},e,{cc:i})},chaptersloaded(t,e,n,i){const s=D({},e.toc,{timedata:n});return s.timedataLang=i,D({},e,{toc:s})},tocsources(t,e,n){const i=jt(),s=Wt(n,i.lang);i.sources=s.sources,i.lang=s.current&&s.current.srclang||"";const o=A(i.sources,(t=>t.srclang===i.lang));if(o&&o.srclang)qt(t,"chaptersloaded",o);else{const e=1;qt(t,"chaptersloaded",A(i.sources,(t=>!!t.default))||i.sources[e])}return D({},e,{toc:i})},changesource(t,e,n){const i=Vt(),s=Wt(n.cc,i.lang);i.sources=s.sources,i.lang=s.current&&s.current.srclang||"";const o=A(i.sources,(t=>t.srclang===i.lang));if(o&&o.srclang)qt(t,"refreshcaptions",o);else{const e=1;qt(t,"refreshcaptions",A(i.sources,(t=>!!t.default))||i.sources[e])}const r=jt(),a=Wt(n.chapters,r.lang);r.sources=a.sources,r.lang=a.current&&a.current.srclang||"";const l=A(r.sources,(t=>t.srclang===r.lang));if(l&&l.srclang)qt(t,"chaptersloaded",l);else{const e=1;qt(t,"chaptersloaded",A(r.sources,(t=>!!t.default))||r.sources[e])}return D({},e,{cc:i,toc:r})},toclang(t,e,n){const i=e.toc.sources,s=i[Math.max(O(i,(t=>t.srclang===n)),0)];2===s.state&&vt(Ot,n);const o=D({},e.toc,{lang:n}),r=D({},e,{toc:o});return s.srclang&&qt(t,"chaptersloaded",s),r}},Bt={isFullScreen:!1,isTheaterMode:!1,cc:{color:"#FFF",bgcolor:"#000",fontSize:"100%",fontFamily:'Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif',location:"over",lang:null,sources:[],timedata:[],timedataLang:"",loading:!1},toc:{lang:null,sources:[],timedata:[],timedataLang:""}},Dt={};class It extends W{constructor(t,e){var n,i;super(t,e),i=void 0,(n="_uid")in this?Object.defineProperty(this,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):this._uid=i,this._uid=v(),Dt[this._uid]=D({},Bt),Dt[this._uid].cc=Vt(),c(Ht,((e,n)=>{"number"!=typeof n&&t.on(n,((...n)=>{const i=Dt[this._uid],s=e.apply(this,[t,i].concat(n));Dt[this._uid]=s,t.emit("statechanged",s,i)}))}))}isFullScreen(){return Dt[this._uid].isFullScreen}isTheaterMode(){return Dt[this._uid].isTheaterMode}getCCLang(){return Dt[this._uid].cc.lang}getCCTextColor(){return Dt[this._uid].cc.color}getCCBgColor(){return Dt[this._uid].cc.bgcolor}getCCFontSize(){return Dt[this._uid].cc.fontSize}getCCFontFamily(){return Dt[this._uid].cc.fontFamily}getCCLocation(){return Dt[this._uid].cc.location}getCCSources(){const t=Dt[this._uid].cc.sources||[];return Mt()?P(t,(t=>3!==t.state)):t}getCCTimeData(){return Dt[this._uid].cc.timedata}getCCTimeDataLang(){return Dt[this._uid].cc.timedataLang}getSelectedCC(){const t=Dt[this._uid],{sources:e,lang:n}=t.cc;return e[Math.max(O(e,(t=>t.srclang===n)),0)]}isTranslatingCC(){const t=Dt[this._uid],{sources:e,lang:n,loading:i}=t.cc,s=Math.max(O(e,(t=>t.srclang===n)),0);return i&&0===e[s].state}getTOCSources(){return Dt[this._uid].toc.sources}getTOCLang(){return Dt[this._uid].toc.lang}getTOCTimeData(){return Dt[this._uid].toc.timedata}getTOCTimeDataLang(){return Dt[this._uid].toc.timedataLang}}function Vt(){const t=D({},Bt.cc);return c(Rt,((e,n)=>{t[n]=wt(e,Bt.cc[n])})),t}function jt(){const t=D({},Bt.toc);return t.lang=wt(Ot,Bt.toc.lang),t}function Ut(t){return D({},t,{state:"number"==typeof t.state?t.state:2})}function Wt(t,e){const n=function(t){return t.sort(((t,e)=>{const n="number"==typeof t.state?t.state:2,i="number"==typeof e.state?t.state:2;return n===i?t.label<e.label?-1:1:"number"==typeof n&&"number"==typeof i?i-n:0}))}(F(t||[],Ut)),i=n.length?[Nt].concat(n):[];let s=A(i,(t=>t.srclang===e&&0!==t.state));if(!s){let t=P(i,(t=>0!==t.state));const e=1;s=A(i,(t=>!!t.default))||t[e]}return{sources:i,current:s}}function qt(t,e,n){if(!n||!n.src)return void t.emit(e,[]);const i=n.srclang,s=()=>t.emit(e,[],i);"json"===n.type?Ct({url:n.src,success:n=>t.emit(e,JSON.parse(n.data),i),error:s}):St(n.src,(n=>t.emit(e,n,i)),s)}const Gt={fullscreen:"Fullscreen","exit-fullscreen":"Exit full screen",theater:"Theater mode","exit-theater":"Standard mode",play:"Play",pause:"Pause",replay:"Replay","standard-playbackrate":"Standard",forward:"Forward 10 sec",backward:"Back 10 sec",prevframe:"Move to previous frame",nextframe:"Move to next frame",annotations:"Annotations",quality:"Quality","audio-tracks":"Audio tracks","playback-rate":"Playback rate",settings:"Settings",buffering:"Buffering...",cc:"Closed Captions",transcript:"Transcript",chapters:"Chapters",back:"Back","settings-fontcolor":"Font color","settings-fontsize":"Font size","settings-fontfamily":"Font family","settings-background":"Background color","settings-captionlocations":"Captions location",help:"Help",download:"Download","video-drm":"Video","video-only":"Video Only","video-and":"Video and",language:"Language","unapproved-source":"(unapproved)",translate:"Translate",translating:"Translating...",monoserif:"Monospace serif",propserif:"Proportionate serif",monosans:"Monospace sans serif",propssans:"Proportionate sans serif","cc-location-over":"Overlay video","cc-location-below":"Below the video",red:"Red",purple:"Purple",indigo:"Indigo",blue:"Blue",green:"Green",yellow:"Yellow",orange:"Orange",brown:"Brown",grey:"Grey",white:"White",black:"Black","help-bacward":'"Left (◄)" - Jump backward by 10 seconds',"help-play":'"Space" - Toggle playback',"help-skip":'"Right (►)" - Skip 10 seconds',"help-volume":'"UP/DOWN (▲/▼)" - Change volume by 10%',"help-esc":'"ESC" - exit fullscreen',"no-video":"No playable sources found","no-flash":"For watching video you need to install Flash Player and restart your browser","playlist-count-of":"videos","caption-search":"Search captions",c2pa:"C2PA","view-more":"Learn more","c2pa-invalid-claim":"Content credentials are incomplete or missing","c2pa-exception-subtitle":"Unexpected error occurred while validating content provenance","c2pa-unverified-claim":"Content credentials are unverified","c2pa-no-data-message":"Video is missing provenance information. Video owner cannot be established","c2pa-video-credentials-status":"Video credentials status:","c2pa-status-valid":"Valid","c2pa-status-invalid":"Invalid","c2pa-status-incomplete":"Incomplete","c2pa-status-unknown":"Unknown","c2pa-signature-valid":"Digital signature is valid","c2pa-signature-valid-extended":"Digital signature is valid. All tracks pass validation and are signed by the owner.","c2pa-issued-to":"Issued to:","c2pa-issued-by":"Issued by:","c2pa-encoded-by":"Encoded by:","c2pa-video-owner":"Video owner:","c2pa-signature-invalid":"Content credentials have been changed, and authenticity cannot be verified",next:"Next",prev:"Previous",error:"An error occurred while playing the media."};function Qt(t={},e){return(t?t[e]:null)||Gt[e]}function Yt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Zt extends W{constructor(t,e,n,i=[]){super(n.bus,n.logger),Yt(this,"player",void 0),Yt(this,"options",void 0),Yt(this,"state",void 0),Yt(this,"_events",void 0),this.player=t,this.options=n,this.state=e,this._events=i;const s=this._listener.bind(this);s._safe_inner=!0,f(i)&&(this._listener=s,this.bus.on("*",s))}$t(t){return Qt(this.options.i18n,t)}_listener(t,...e){if(a(this._events,t)){const n=this[`on${j(t)}`];o(n)&&n.apply(this,e)}}destroy(){super.destroy(),this.bus.off("*",this._listener)}getElement(){return null}getOuter(){return null}}function Kt(t,e,i){i.style.display="block";let s=t.getElement();const o=s?s.offsetWidth:0;if(n(e)){const t=(o?s:s.parentNode).getBoundingClientRect(),n=e.getBoundingClientRect();e=Xt(n.left+n.right)-t.left}const r=i.offsetWidth;let a=Math.max(3,e-Xt(r));o&&(a=Math.min(a,o-r-3)),i.style.left=`${a}px`,i.style.display=""}function Xt(t){return Math.floor(t/2)}function Jt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const te="rmp-ext-progress",ee=`${te}__current`,ne=`${te}__duration`,ie=`${te}__bar`,se=`${te}__bar-padding`,oe=`${te}__handle`,re=`${te}__overlay`,ae=`${te}__play-progress`,le=`${te}__progress`,he=`${te}__c2pa-status`,ce=`${he}--invalid-segment`,pe=`${te}__tooltip`,de=`${te}__tooltip--visible`,ue=`${te}__thumbmail`,ge=`${te}__thumbmail-time`,me=`${te}__generic-live-stream`,be=`${te}__hidden`,ye=`${te}__chapter-bubble`;function _e(t){if(t===1/0||isNaN(t))return"--:--";const e=Math.floor(t/3600),n=Math.floor(t/60)%60,i=Math.floor(t%60);return(e?xe(e)+":":"")+xe(n)+":"+xe(i)}function xe(t){return t<10?`0${t}`:`${t}`}const fe={width:32,height:32,viewBox:"0 0 24 24"},$e="M8 5v14l11-7z",ve="M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z",we="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z",Ce="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z",ke="M6 6h2v12H6zm3.5 6l8.5 6V6z",Te="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z",Ee="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z",Se="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z",Le="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z";function Me(t,e,n={}){const i=C("svg",n=D({},fe,n),t,"http://www.w3.org/2000/svg");return Array.isArray(e)?e.forEach((t=>{C("path",Pe(t),i,"http://www.w3.org/2000/svg")})):C("path",Pe(e),i,"http://www.w3.org/2000/svg"),i}function Pe(t){return"string"==typeof t?{d:t}:{...t}}const Ae="rmp-ext-popover",Fe=`${Ae}--visible`;function ze(t,{$button:e,text:n}){const i=e.parentNode,s=C("span",{class:Ae,tabindex:0});w(i,s,e),e.setAttribute("aria-label",o(n)?n():n);let r=0;function a(){s.textContent=o(n)?n():n,s.style.left="0",Kt(t.player,e,s),S(s,Fe)}function l(){clearTimeout(r),L(s,Fe)}t.addEvent(e,"mouseenter",(()=>r=setTimeout(a,500))),t.addEvent(e,"mouseleave",l),t.addEvent(e,"click",l)}const Ne="rmp-ext-play",Re=`${Ne}--playing`,Oe=`${Ne}--paused`,He=`${Ne}--ended`,Be="rmp-ext-volume",De=`${Be}__btn`,Ie=`${De}--muted`,Ve=`${Be}__selector`,je=`${Ve}--open`,Ue=`${Ve}--active`,We=`${Be}__slider`,qe=`${Be}__handle`,Ge=`${Be}__progress`,Qe=`${Be}__overlay`,Ye="volume",Ze="muted";function Ke(t){return t=Math.max(0,t),Math.min(t,1)}const Xe="rmp-ext-fullscreen",Je=`${Xe}--exit`;function tn(t,e){if(!t||!t.getElement())return;e.style.maxHeight="";const n=t.getElement().parentNode.getBoundingClientRect(),i=(n.height||n.bottom-n.top)-100;e.style.maxHeight=`${Math.min(i,300)}px`}function en(t,{$button:e,$selector:n,SELECTOR_OPEN_CN:i,reposition:s=!0,closeOnClick:o=!1,heightControl:r=!1,firstFocusItemSelector:a="",toMainFn:l=(()=>{})}){let h=null;function c(t,e){const n=document.activeElement;let i=t;return!i&&n.parentElement.classList.value.includes("tab-content")&&(i=n.parentElement[e]),i}function p(t,e){let n=t;return n&&n.classList.value.includes("tab-content")&&(n=n[e]),n}function d(t,e){let n=t,i=t&&(n.offsetWidth>0||n.offsetHeight>0);for(;!i&&n;)n=n[e],i=t&&(n.offsetWidth>0||n.offsetHeight>0);return n}function u(){l(),t.bus.emit("hidepopup"),L(n,i),b(h)&&(T(h),h=null)}t.addEvent(e,"click",(function(){b(h)?u():(S(n,i),s&&Kt(t.player,e,n),setTimeout((()=>{t.bus.emit("showpopup",n),h=k(document,"click",u)})),r&&tn(t.player,n),a&&setTimeout((()=>{n.querySelector(a).focus()})))})),o||t.addEvent(n,"click",(t=>t.stopPropagation())),t.addEvent(t.player.getElement(),"mouseleave",u),t.addEvent(t.$selector,"keydown",(function(e){e.stopPropagation();const n=e.keyCode,i=document.activeElement;if(27===n)return e.preventDefault(),u(),void t.$button.focus();if(39===n)return e.preventDefault(),void(i.classList.value.includes("__more")&&i.click());if(37!==n){if(40===n){e.preventDefault();let t=i.nextElementSibling;return t=d(t,"nextElementSibling"),t=p(t,"firstElementChild"),t||(t=c(t,"nextElementSibling")),void(t&&t.focus())}if(38===n){e.preventDefault();let t=i.previousElementSibling;t=c(t,"previousElementSibling"),t=d(t,"previousElementSibling"),t=p(t,"lastElementChild"),t&&t.focus()}}else{e.preventDefault();const n=t.$selector.querySelectorAll('button[class$="__back"]'),i=Array.from(n).find((t=>t.offsetWidth>0||t.offsetHeight>0));i&&i.click()}})),t.bus.on("resizeplayer",u)}function nn(t,e){c(e,(e=>{t[e]=t[e].bind(t)}))}function sn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const on="rmp-ext-cc",rn=`${on}__button`,an=`${on}__selector`,ln=`${an}--open`,hn=`${an}--main-step`,cn=`${an}--settings-step`,pn=`${an}--additional-step`,dn=`${an}--translate-step`,un=`${on}__main-step`,gn=`${on}__settings-step`,mn=`${on}__additional-step`,bn=`${on}__item`,yn=`${bn}--checked`,_n=`${on}__settings`,xn=`${_n}--progress`,fn=`${on}__more`,$n=`${on}__current-value`,vn=`${on}__text`,wn=`${vn}--visible`,Cn=`${on}__text-holder`,kn=`${on}__back`,Tn=`${on}__translate-wrapper`,En=`${on}__settings-wrapper`;function Sn(t){S(t,fn);const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Ln(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Mn="rmp-ext-toc",Pn=`${Mn}__button`,An=`${Mn}__selector`,Fn=`${An}--main-step`,zn=`${An}--languages-step`,Nn=`${An}--translate-step`,Rn=`${An}--open`,On=`${Mn}__languages-step`,Hn=`${Mn}__more`,Bn=`${Mn}__back`,Dn=`${Mn}__main-step`,In=`${Mn}__languge-btn`,Vn=`${Mn}__chapters`,jn=`${Mn}__item`,Un=`${Mn}__lang-item`,Wn=`${Un}--checked`,qn=`${Mn}__translate-step`,Gn=`${Mn}__current-value`;function Qn(t){S(t,Hn);const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Yn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Zn="rmp-annotation",Kn=`${Zn}--visible`,Xn=`${Zn}__holder`,Jn=`${Zn}__button`,ti=/(https?:\/\/[^\s]+)/g;function ei({text:t,starts:e,ends:n,top:i,left:s,width:o,height:r,fontsize:a,fontcolor:l,background:h}){return{text:t,top:i,left:s,width:o,height:r,fontsize:a,fontcolor:l,background:h,from:kt(`${e.hh}:${e.mm}:${e.ss}`),to:kt(`${n.hh}:${n.mm}:${n.ss}`)}}const ni="rmp-ext-poster",ii=`${ni}--video`,si=`${ni}--hidden`;function oi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ri="rmp-ext-placeholder",ai=`${ri}--animation`,li=`${ri}__icon`,hi=`${ri}__play-btn`,ci={32:"_togglePlay",37:"_skeepLeft",39:"_skeepRight",38:"_upVolume",40:"_downVolume",74:"_prevFrame",75:"_nextFrame"};let pi,di,ui;var gi="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof t.g&&t.g.global===t.g?t.g:void 0;function mi(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){xi(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function bi(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function yi(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var _i=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),xi=gi.saveAs||("object"!=typeof window||window!==gi?function(){}:"download"in HTMLAnchorElement.prototype&&!_i?function(t,e,n){var i=gi.URL||gi.webkitURL,s=document.createElement("a");e=e||t.name||"download",s.download=e,s.rel="noopener","string"==typeof t?(s.href=t,s.origin!==location.origin?bi(s.href)?mi(t,e,n):yi(s,s.target="_blank"):yi(s)):(s.href=i.createObjectURL(t),setTimeout((function(){i.revokeObjectURL(s.href)}),4e4),setTimeout((function(){yi(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(bi(t))mi(t,e,n);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout((function(){yi(i)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return mi(t,e,n);var s="application/octet-stream"===t.type,o=/constructor/i.test(gi.HTMLElement)||gi.safari,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||s&&o||_i)&&"undefined"!=typeof FileReader){var a=new FileReader;a.onloadend=function(){var t=a.result;t=r?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},a.readAsDataURL(t)}else{var l=gi.URL||gi.webkitURL,h=l.createObjectURL(t);i?i.location=h:location.href=h,i=null,setTimeout((function(){l.revokeObjectURL(h)}),4e4)}});const fi="rmp-ext-download",$i=`${fi}__button`,vi=`${fi}__selector`,wi=`${vi}--open`,Ci=`${vi}--additional`,ki=`${fi}__more`,Ti=`${fi}__main-step`,Ei=`${fi}__additional-step`,Si=`${fi}__back`,Li=`${fi}__download-cc`;function Mi(t){const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Pi(t){return 1!==t.state&&0!==t.state}function Ai(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Fi="rmp-ext-settings",zi=`${Fi}__button`,Ni=`${Fi}__selector`,Ri=`${Ni}--open`,Oi=`${Ni}--additional`,Hi=`${Fi}__main-step`,Bi=`${Fi}__additional-step`,Di=`${Fi}__annotations`,Ii=`${Fi}__quality`,Vi=`${Fi}__playback-rate`,ji=`${Fi}__back`,Ui=`${Fi}__more`,Wi=`${Fi}__current-value`,qi=`${Fi}__item`,Gi=`${qi}--checked`,Qi="annotationslang",Yi={label:"None",srclang:""},Zi=[{rate:.5},{rate:.8},{rate:1,labelKey:"standard-playbackrate"},{rate:1.5},{rate:2},{rate:3,hide:t=>t.isLive},{rate:5,hide:t=>t.isAudio||t.isLive}];function Ki(t){const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Xi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ji="rmp-ext-title",ts=`${Ji}__title`;function es(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ns="rmp-ext-prev",is=`${ns}__button`,ss=`${ns}__thumbnail`;function os(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const rs="rmp-ext-next",as=`${rs}__button`,ls=`${rs}__thumbnail`,hs="rmp-ext-buffering",cs=`${hs}--processing`,ps={page_type:"watchpage",player_name:"RavnurPlayer",player_version:"3.3.3",video_stream_type:"on-demand"},ds="rmp-ext-theater",us=`${ds}--exit`,gs=`${ds}--hidden`,ms="rmp-ext-audio-tracks",bs=`${ms}__button`,ys=`${ms}__selector`,_s=`${ys}--open`,xs=`${ms}__item`,fs=`${xs}--checked`,$s=document.createElement("span");function vs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ws="rmp-ext-search--hidden",Cs="rmp-ext-search__item--current";function ks(t){return`cc-${t}`}const Ts="rmp-ext-bottom-next",Es=`${Ts}--hidden`,Ss="rmp-ext-bottom-prev",Ls=`${Ss}--hidden`;function Ms(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ps="rmp-ext-crawl",As=`${Ps}__text`;class Fs extends Zt{constructor(t,e,n){super(t,e,n,[]),Ms(this,"$crawl",void 0),Ms(this,"$intervalId",void 0),this.logger.debug("crawl:extensions:creating"),this.render(),this.logger.debug("crawl:extensions:created"),n.bus.on("fullscreenchanging",(()=>{setTimeout((()=>this.refresh(this.options.crawl,this.options.showCrawl)),100)})),n.bus.on("resizeplayer",(()=>{setTimeout((()=>this.refresh(this.options.crawl,this.options.showCrawl)),100)}))}startAnimation(t=100){if(this.$intervalId)return;const e=document.getElementById("crawlText"),n=document.querySelector(".rmp-ext-crawl").offsetWidth,i=e.offsetWidth;let s=n;this.$intervalId=setInterval((()=>{s--,s<-i&&(s=n),e.style.transform=`translateX(${s}px)`}),t)}render(){this.$crawl=C("div",{class:Ps,"data-testid":"crawl"}),C("div",{id:"crawlText",class:As,title:this.options.crawl,tabindex:0},this.$crawl).innerHTML=zs(this.options.crawl.text)||"",this.$crawl.style.color=this.options.crawl.textColor,this.$crawl.style.backgroundColor=this.options.crawl.backgroundColor,this.toggle(this.options.showCrawl),setTimeout((()=>this.startAnimation(this.options.crawl.speed)))}getOuter(){return this.$crawl}toggle(t){this.$crawl.style.display=t?"block":"none"}refresh(t,e){this.$crawl&&(document.getElementById("crawlText").innerHTML=zs(t.text)||"",this.$crawl.style.color=t.textColor,this.$crawl.style.backgroundColor=t.backgroundColor,clearInterval(this.$intervalId),this.$intervalId=null,this.toggle(e),e&&this.startAnimation(t.speed))}destroy(){super.destroy(),this.$crawl&&(this.$crawl.parentNode.removeChild(this.$crawl),this.$crawl=null,clearInterval(this.$intervalId),this.$intervalId=null)}}function zs(t){return t.replace(/(\r\n|\n|\r)/gm,"").replace(/<br\s*[\/]?>/gi,"")}const Ns="rmp-ext-live",Rs=`${Ns}--live`,Os="rmp-ext-error",Hs=`${Os}--hidden`,Bs=`${Os}__content`,Ds=[["showTitle",class extends Zt{constructor(t,e,n){var i,s;super(t,e,n),s=void 0,(i="$outer")in this?Object.defineProperty(this,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[i]=s,this.logger.debug("title:extension:creating"),this.render(),this.logger.debug("title:extension:created")}render(){this.$outer=C("div",{class:Ji,"data-testid":"title"}),C("span",{class:ts,title:this.options.title,tabindex:0},this.$outer).textContent=this.options.title||""}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],[!0,class extends Zt{constructor(t,e,n){var i,s;super(t,e,n,["seeking","waiting","seeked","canplay","playing","timeupdate"]),s=void 0,(i="_timerId")in this?Object.defineProperty(this,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[i]=s,this.logger.debug("buffering:extension:creating"),this.render(),n.isMobile||this.startProcessing(),this.logger.debug("buffering:extension:created")}onWaiting(){this.startProcessing()}onSeeking(){this.startProcessing()}startProcessing(){clearTimeout(this._timerId),this._timerId=setTimeout((()=>S(this.$outer,cs)),this.options.bufferingTimeout)}onTimeupdate(){this.hideProcessing()}onSeeked(){this.hideProcessing()}onCanplay(){this.hideProcessing()}onPlaying(){this.hideProcessing()}render(){this.$outer=C("div",{class:hs}),Me(C("span",{class:`${hs}__message`},this.$outer),"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",{})}getOuter(){return this.$outer}hideProcessing(){clearTimeout(this._timerId),L(this.$outer,cs)}destroy(){super.destroy(),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null}}],["showPoster",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("poster:extension:creating"),this._hidePoster=this._hidePoster.bind(this),this.render(),this.logger.debug("poster:extension:created")}render(){this.$outer=C("div",{class:ni,tabindex:-1}),C("img",{src:this.options.poster},this.$outer).setAttribute("aria-label",this.options.title),this.options.isAudio||(S(this.$outer,ii),this.bus.on("play",this._hidePoster))}_hidePoster(){S(this.$outer,si)}getOuter(){return this.$outer}destroy(){this.bus.off("play",this._hidePoster),super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],["showError",class extends Zt{constructor(t,e,n){super(t,e,n,["error"]),this.logger.debug("error:extension:creating"),this.onError=this.onError.bind(this),this.render(),this.logger.debug("error:extension:created")}render(){this.$outer=C("div",{class:`${Os} ${Hs}`,tabindex:-1}),Me(this.$outer,"M7.493 0.015 C 7.442 0.021,7.268 0.039,7.107 0.055 C 5.234 0.242,3.347 1.208,2.071 2.634 C 0.660 4.211,-0.057 6.168,0.009 8.253 C 0.124 11.854,2.599 14.903,6.110 15.771 C 8.169 16.280,10.433 15.917,12.227 14.791 C 14.017 13.666,15.270 11.933,15.771 9.887 C 15.943 9.186,15.983 8.829,15.983 8.000 C 15.983 7.171,15.943 6.814,15.771 6.113 C 14.979 2.878,12.315 0.498,9.000 0.064 C 8.716 0.027,7.683 -0.006,7.493 0.015 M8.853 1.563 C 9.967 1.707,11.010 2.136,11.944 2.834 C 12.273 3.080,12.920 3.727,13.166 4.056 C 13.727 4.807,14.142 5.690,14.330 6.535 C 14.544 7.500,14.544 8.500,14.330 9.465 C 13.916 11.326,12.605 12.978,10.867 13.828 C 10.239 14.135,9.591 14.336,8.880 14.444 C 8.456 14.509,7.544 14.509,7.120 14.444 C 5.172 14.148,3.528 13.085,2.493 11.451 C 2.279 11.114,1.999 10.526,1.859 10.119 C 1.618 9.422,1.514 8.781,1.514 8.000 C 1.514 6.961,1.715 6.075,2.160 5.160 C 2.500 4.462,2.846 3.980,3.413 3.413 C 3.980 2.846,4.462 2.500,5.160 2.160 C 6.313 1.599,7.567 1.397,8.853 1.563 M7.706 4.290 C 7.482 4.363,7.355 4.491,7.293 4.705 C 7.257 4.827,7.253 5.106,7.259 6.816 C 7.267 8.786,7.267 8.787,7.325 8.896 C 7.398 9.033,7.538 9.157,7.671 9.204 C 7.803 9.250,8.197 9.250,8.329 9.204 C 8.462 9.157,8.602 9.033,8.675 8.896 C 8.733 8.787,8.733 8.786,8.741 6.816 C 8.749 4.664,8.749 4.662,8.596 4.481 C 8.472 4.333,8.339 4.284,8.040 4.276 C 7.893 4.272,7.743 4.278,7.706 4.290 M7.786 10.530 C 7.597 10.592,7.410 10.753,7.319 10.932 C 7.249 11.072,7.237 11.325,7.294 11.495 C 7.388 11.780,7.697 12.000,8.000 12.000 C 8.303 12.000,8.612 11.780,8.706 11.495 C 8.763 11.325,8.751 11.072,8.681 10.932 C 8.616 10.804,8.460 10.646,8.333 10.580 C 8.217 10.520,7.904 10.491,7.786 10.530",{class:"error",width:800,height:800,viewBox:"0 0 16 16"}),C("div",{class:Bs},this.$outer).textContent=this.$t("error"),this.logger.debug("error:extension:rendered")}onError(){this.logger.debug("error:extension:onError"),L(this.$outer,Hs)}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],["showBackward",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("backward:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.backward.bind(this)),this.logger.debug("backward:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-backward"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("backward")}))),Me(this.$el,ve)}backward(){this.player.setCurrentTime(this.player.getCurrentTime()-this.options.skipDelta),this.bus.emit("heartbeatextensions")}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showPrevFrame",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("prevframe:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.prevframe.bind(this)),this.logger.debug("prevframe:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-prev-frame"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("prevframe")}))),Me(this.$el,ke)}prevframe(){this.player.prevFrame()}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showBottomPrev",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("bottom-prev:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$el,"click",(()=>i.emit("prevtrack"))),this.logger.debug("bottom-prev:extension:created")}render(){this.$el=C("button",{type:"button",class:`${Ss}`}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("prev")}))),Me(this.$el,ke),this.player.options.prevTrackTitle||this.$el.classList.add(Ls)}getElement(){return this.$el}destroy(){super.destroy(),this.$el&&(this.$el.parentNode.removeChild(this.$el),this.$el=null)}}],["showPlay",class extends Zt{constructor(t,e,n){super(t,e,n,["pause","play","ended","seeking"]),this.logger.debug("play:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),this.logger.debug("play:extension:created")}render(){this.$el=C("button",{type:"button",class:`${Ne} ${Oe}`}),setTimeout((()=>{ze(this,{$button:this.$el,text:()=>this.player.isEnded()?this.$t("replay"):this.player.isPaused()?this.$t("play"):this.$t("pause")})})),Me(this.$el,$e,{class:"play"}),Me(this.$el,"M6 19h4V5H6v14zm8-14v14h4V5h-4z",{class:"pause"}),Me(this.$el,"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",{class:"replay"})}toggle(){this.player.isPaused()||this.player.isEnded()?this.player.play():this.player.pause()}onPause(){this.$el.setAttribute("aria-label","Play"),L(this.$el,Re),L(this.$el,He),S(this.$el,Oe)}onPlay(){this.$el.setAttribute("aria-label","Pause"),L(this.$el,Oe),L(this.$el,He),S(this.$el,Re)}onEnded(){this.options.playLoop?this.player.play():(this.$el.setAttribute("aria-label","Reply"),L(this.$el,Oe),L(this.$el,Re),S(this.$el,He))}onSeeking(){L(this.$el,He),L(this.$el,Oe),L(this.$el,Re),this.player.isPaused()?S(this.$el,Oe):S(this.$el,Re)}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showBottomNext",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("bottom-next:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$el,"click",(()=>i.emit("nexttrack"))),this.logger.debug("bottom-next:extension:created")}render(){this.$el=C("button",{type:"button",class:`${Ts}`}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("next")}))),Me(this.$el,Ce),this.player.options.nextTrackTitle||this.$el.classList.add(Es)}getElement(){return this.$el}destroy(){super.destroy(),this.$el&&(this.$el.parentNode.removeChild(this.$el),this.$el=null)}}],["showNextFrame",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("nextframe:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.nextframe.bind(this)),this.logger.debug("nextframe:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-next-frame"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("nextframe")}))),Me(this.$el,Ce)}nextframe(){this.player.nextFrame()}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showForward",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("forward:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.forward.bind(this)),this.logger.debug("forward:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-forward"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("forward")}))),Me(this.$el,we)}forward(){this.player.setCurrentTime(this.player.getCurrentTime()+this.options.skipDelta),this.bus.emit("heartbeatextensions")}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showVolume",class extends Zt{constructor(t,e,n){var i,s;super(t,e,n,["volumechange","loadedmetadata"]),s=[],(i="_dragNdropTokens")in this?Object.defineProperty(this,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[i]=s,this.logger.debug("volume:extension:creating"),this.onHandleMouseUp=this.onHandleMouseUp.bind(this),this.onHandleMouseDown=this.onHandleMouseDown.bind(this),this.onHandleMouseMove=this.onHandleMouseMove.bind(this),this.onHandleEsqKey=this.onHandleEsqKey.bind(this),this.render(),this.addEvent(this.$button,"click",this.toggle.bind(this)),this.addEvent(this.$slider,"click",this.changeVolume.bind(this)),this.addEvent(this.$handle,"mousedown",this.onHandleMouseDown),function(t,{$button:e,$selector:n,SELECTOR_OPEN_CN:i}){t.addEvent(e,"click",(function(){M(n,i),Kt(t.player,e,n)}));let s=0;function o(){S(n,i),Kt(t.player,e,n)}t.addEvent(t.getElement(),"mouseleave",(function(){clearTimeout(s),L(n,i)})),t.addEvent(e,"mouseenter",(()=>s=setTimeout(o,200)))}(this,{$button:this.$button,$selector:this.$selector,SELECTOR_OPEN_CN:je,closeOnClick:!1}),this.refreshHandle(),this.logger.debug("volume:extension:created")}render(){this.$el=C("span",{class:Be}),this.$button=C("button",{type:"button",class:De},this.$el),this.$button.setAttribute("aria-label","Volume"),this.$button.addEventListener("keydown",this.onHandleEsqKey),this.$selector=C("div",{class:Ve},this.$el),this.$slider=C("span",{class:We},this.$selector),C("span",{class:Qe},this.$slider),this.$progress=C("span",{class:Ge},this.$slider),this.$handle=C("span",{class:qe},this.$slider),Me(this.$button,Se,{class:"muted"}),Me(this.$button,Le,{class:"unmuted"})}toggle(){const t=!this.player.isMuted();if(this.player.setMuted(t),vt(Ze,t),!t){const t=Math.max(this.player.getVolume(),.1);this.player.setVolume(t),vt(Ye,t)}}_getVolumeByEvent(t){const e=this.$slider.getBoundingClientRect();return(1-(function(t){return t.clientY}(t)-e.top)/this.$slider.offsetHeight).toFixed(2)}changeVolume(t){const e=this._getVolumeByEvent(t);this.updateVolume(e)}updateVolume(t){t=Ke(t),this.logger.debug("changevolume",t),t?(this.player.setVolume(t),this.player.setMuted(!1),vt(Ye,t),vt(Ze,!1)):(this.player.setMuted(!0),vt(Ze,!0))}onVolumechange(){this.player.isMuted()?S(this.$button,Ie):L(this.$button,Ie),this.refreshHandle()}onLoadedmetadata(){const t=this.options.muted;this.player.setVolume(parseFloat(wt(Ye,"1.0"))),"boolean"==typeof t?this.player.setMuted(t):this.player.setMuted("true"===wt(Ze,"false"),!0)}refreshHandle(){this._refreshHadle4volume(this.player.getVolume())}_refreshHadle4volume(t){const e=this.player.isMuted()?"100%":100*(1-t)+"%";this.$handle.style.top=this.$progress.style.top=e}onHandleMouseDown(){S(this.$selector,Ue),this._dragNdropTokens.push(k(document,"mouseup",this.onHandleMouseUp)),this._dragNdropTokens.push(k(document,"mousemove",this.onHandleMouseMove))}onHandleMouseUp(t){c(this._dragNdropTokens,T),this._dragNdropTokens.length=0,this.changeVolume(t),L(this.$selector,Ue)}onHandleMouseMove(t){let e=this._getVolumeByEvent(t);e=Ke(e),this._refreshHadle4volume(e)}onHandleEsqKey(t){27===t.keyCode&&(L(this.$selector,je),t.preventDefault())}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$button&&this.$button.removeEventListener("keydown",this.onHandleEsqKey),this.$el=null,this.$button=null,this.$selector=null,this.$slider=null,this.$progress=null,this.$handle=null}}],["isLive",class extends Zt{constructor(t,e,n){super(t,e,n,["timeupdate","progress"]),this.logger.debug("play:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),this.logger.debug("live:extension:created")}render(){this.$el=C("button",{type:"button",class:Ns}),Me(this.$el,"M 8.0136719 7.0292969 A 1.0001 1.0001 0 0 0 7.3222656 7.3222656 C 2.7995047 11.846068 -1.1842379e-15 18.102792 0 25 C 0 31.897208 2.7995047 38.153932 7.3222656 42.677734 A 1.0001 1.0001 0 0 0 8.7363281 42.677734 L 11.570312 39.84375 A 1.0001 1.0001 0 0 0 11.570312 38.429688 C 8.1286602 34.987084 6 30.242812 6 25 C 6 19.757188 8.1297921 15.013788 11.572266 11.572266 A 1.0001 1.0001 0 0 0 11.572266 10.158203 L 8.7363281 7.3222656 A 1.0001 1.0001 0 0 0 8.0136719 7.0292969 z M 41.957031 7.0292969 A 1.0001 1.0001 0 0 0 41.263672 7.3222656 L 38.427734 10.158203 A 1.0001 1.0001 0 0 0 38.427734 11.572266 C 41.870208 15.013788 44 19.757188 44 25 C 44 30.242812 41.870208 34.986212 38.427734 38.427734 A 1.0001 1.0001 0 0 0 38.427734 39.841797 L 41.263672 42.677734 A 1.0001 1.0001 0 0 0 42.677734 42.677734 C 47.201645 38.154865 50 31.897208 50 25 C 50 18.102792 47.200495 11.846068 42.677734 7.3222656 A 1.0001 1.0001 0 0 0 41.957031 7.0292969 z M 8.0976562 9.5117188 L 9.5195312 10.933594 C 6.1269359 14.664061 4 19.575176 4 25 C 4 30.424712 6.1260807 35.337173 9.5175781 39.068359 L 8.0976562 40.488281 C 4.3450168 36.394537 2 30.995061 2 25 C 2 19.004939 4.3450168 13.605463 8.0976562 9.5117188 z M 41.902344 9.5117188 C 45.654983 13.605463 48 19.004939 48 25 C 48 30.995061 45.655695 36.395442 41.902344 40.488281 L 40.480469 39.066406 C 43.873064 35.335939 46 30.424824 46 25 C 46 19.575176 43.873064 14.664061 40.480469 10.933594 L 41.902344 9.5117188 z M 14.382812 13.398438 A 1.0001 1.0001 0 0 0 13.691406 13.691406 C 10.796092 16.587786 9 20.593819 9 25 C 9 29.406181 10.796092 33.412214 13.691406 36.308594 A 1.0001 1.0001 0 0 0 15.105469 36.308594 L 17.931641 33.482422 A 1.0001 1.0001 0 0 0 17.931641 32.068359 C 16.119902 30.255711 15 27.761761 15 25 C 15 22.238239 16.119902 19.744289 17.931641 17.931641 A 1.0001 1.0001 0 0 0 17.931641 16.517578 L 15.105469 13.691406 A 1.0001 1.0001 0 0 0 14.382812 13.398438 z M 35.587891 13.398438 A 1.0001 1.0001 0 0 0 34.894531 13.691406 L 32.068359 16.517578 A 1.0001 1.0001 0 0 0 32.068359 17.931641 C 33.880098 19.744289 35 22.238239 35 25 C 35 27.761761 33.880098 30.255711 32.068359 32.068359 A 1.0001 1.0001 0 0 0 32.068359 33.482422 L 34.894531 36.308594 A 1.0001 1.0001 0 0 0 36.308594 36.308594 C 39.203908 33.412214 41 29.406181 41 25 C 41 20.593819 39.203908 16.587786 36.308594 13.691406 A 1.0001 1.0001 0 0 0 35.587891 13.398438 z M 14.466797 15.880859 L 15.947266 17.361328 C 14.184764 19.450917 13 22.061346 13 25 C 13 27.938654 14.184764 30.549083 15.947266 32.638672 L 14.466797 34.119141 C 12.335969 31.66133 11 28.50273 11 25 C 11 21.49727 12.335969 18.33867 14.466797 15.880859 z M 35.533203 15.880859 C 37.664031 18.33867 39 21.49727 39 25 C 39 28.50273 37.664031 31.66133 35.533203 34.119141 L 34.052734 32.638672 C 35.815236 30.549083 37 27.938654 37 25 C 37 22.061346 35.815236 19.450917 34.052734 17.361328 L 35.533203 15.880859 z M 25 18 C 21.134 18 18 21.134 18 25 C 18 28.866 21.134 32 25 32 C 28.866 32 32 28.866 32 25 C 32 21.134 28.866 18 25 18 z M 25 20 C 27.757 20 30 22.243 30 25 C 30 27.757 27.757 30 25 30 C 22.243 30 20 27.757 20 25 C 20 22.243 22.243 20 25 20 z",{class:"broadcast-off",width:50,height:50,viewBox:"0 0 50 50"}),Me(this.$el,"M 8.03125 8.4570312 C 7.770375 8.4589063 7.5103125 8.5625312 7.3203125 8.7695312 C 3.3953125 13.041531 1 18.741 1 25 C 1 31.259 3.3953125 36.958469 7.3203125 41.230469 C 7.7003125 41.644469 8.3569063 41.643094 8.7539062 41.246094 L 10.882812 39.117188 C 11.265812 38.734187 11.263391 38.124656 10.900391 37.722656 C 7.8553906 34.352656 6 29.889 6 25 C 6 20.111 7.8553906 15.647344 10.900391 12.277344 C 11.263391 11.875344 11.265813 11.266812 10.882812 10.882812 L 8.7539062 8.7539062 C 8.5554063 8.5554063 8.292125 8.4551562 8.03125 8.4570312 z M 41.96875 8.4570312 C 41.707625 8.4554062 41.444594 8.5554062 41.246094 8.7539062 L 39.115234 10.884766 C 38.732234 11.267766 38.734656 11.875344 39.097656 12.277344 C 42.143656 15.646344 44 20.111 44 25 C 44 29.889 42.144609 34.352656 39.099609 37.722656 C 38.736609 38.124656 38.734188 38.733187 39.117188 39.117188 L 41.246094 41.246094 C 41.643094 41.643094 42.299687 41.643469 42.679688 41.230469 C 46.604687 36.958469 49 31.259 49 25 C 49 18.741 46.604687 13.041531 42.679688 8.7695312 C 42.489688 8.5625312 42.229875 8.4586563 41.96875 8.4570312 z M 35.625 14.837891 C 35.355125 14.824516 35.079594 14.920406 34.871094 15.128906 L 32.740234 17.259766 C 32.381234 17.618766 32.341969 18.196938 32.667969 18.585938 C 34.123969 20.323937 35 22.561 35 25 C 35 27.439 34.123969 29.675109 32.667969 31.412109 C 32.341969 31.801109 32.381234 32.379281 32.740234 32.738281 L 34.871094 34.871094 C 35.288094 35.288094 35.967516 35.250687 36.353516 34.804688 C 38.625516 32.175687 40 28.748 40 25 C 40 21.252 38.625516 17.824312 36.353516 15.195312 C 36.160516 14.972313 35.894875 14.851266 35.625 14.837891 z M 14.375 14.839844 C 14.105125 14.853219 13.839484 14.974266 13.646484 15.197266 C 11.374484 17.825266 10 21.252 10 25 C 10 28.748 11.374484 32.175688 13.646484 34.804688 C 14.032484 35.250687 14.711906 35.288094 15.128906 34.871094 L 17.259766 32.740234 C 17.618766 32.381234 17.658031 31.803062 17.332031 31.414062 C 15.876031 29.676062 15 27.439 15 25 C 15 22.561 15.876031 20.324891 17.332031 18.587891 C 17.658031 18.198891 17.618766 17.620719 17.259766 17.261719 L 15.128906 15.128906 C 14.920406 14.920406 14.644875 14.826469 14.375 14.839844 z M 25 19 C 21.686 19 19 21.686 19 25 C 19 28.314 21.686 31 25 31 C 28.314 31 31 28.314 31 25 C 31 21.686 28.314 19 25 19 z",{class:"broadcast-on",width:50,height:50,viewBox:"0 0 50 50"}),setTimeout((()=>{const t=this.player.isLive()?"Live":"Go to live";ze(this,{$button:this.$el,text:t})}),100)}toggle(){this.goToLive()}goToLive(){this.player.goToLive(),S(this.$el,Rs)}onTimeupdate(){this.player.isLive()?(this.$el.setAttribute("aria-label","Live"),S(this.$el,Rs)):(this.$el.setAttribute("aria-label","Go to live"),L(this.$el,Rs))}onProgress(){this.player.isLive()?(this.$el.setAttribute("aria-label","Live"),S(this.$el,Rs)):(this.$el.setAttribute("aria-label","Go to live"),L(this.$el,Rs))}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showProgress",class extends Zt{constructor(t,e,n){super(t,e,n,["progress","timeupdate","loadedmetadata","canplaythrough","statechanged","c2pafragment","durationchange"]),Jt(this,"thumbnails",[]),Jt(this,"_dragNdropTokens",[]),Jt(this,"_isLoadedMetadata",!1),Jt(this,"_chapters",[]),Jt(this,"_bubbles",[]),this.logger.debug("progress:extension:creating"),this.onLeave=this.onLeave.bind(this),this.onHover=this.onHover.bind(this),this.onHandleMouseUp=this.onHandleMouseUp.bind(this),this.onHandleMouseDown=this.onHandleMouseDown.bind(this),this.onHandleMouseMove=this.onHandleMouseMove.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.render(),this.addEvent(this.$bar,"click",(e=>{if((e.target||e.srcElement)===this.$handle)e.stopPropagation();else{const n=this._getTimeByEventPosition(e);t.setCurrentTime(n),this._moveHandle2time(n)}})),this.addEvent(this.$bar,"mouseleave",this.onLeave),this.addEvent(this.$bar,"mousemove",this.onHover),this.addEvent(this.$handle,"mousedown",this.onHandleMouseDown),this.addEvent(this.$handle,"touchstart",this.onTouchStart),b(n.preview)&&St(n.preview,(t=>this.thumbnails=t)),this.logger.debug("progress:extension:created")}render(){this.$el=C("span",{class:te});const t=this.player.$el.parentNode.querySelector(".rmp-extensions");this.$bar=C("span",{class:ie,tabindex:0},t),C("span",{class:se},this.$bar),C("span",{class:re},this.$bar),this.$handle=C("span",{class:oe},this.$bar),this.$current=C("span",{class:ee},this.$el),C("span",{},this.$el).textContent="/",this.$duration=C("span",{class:ne},this.$el),this.$c2paStatus=C("span",{class:he},this.$bar),this.$playProgress=C("span",{class:ae},this.$bar),this.$progress=C("span",{class:le},this.$bar),this.$tooltip=C("div",{class:pe},this.$el),this.$thumbnail=C("div",{class:ue},this.$tooltip),this.$thumbnailTime=C("span",{class:ge},this.$tooltip),this.options.isProgressLiveStream&&(S(this.$el,me),S(this.$bar,me)),this.options.isLive&&S(this.$el,be),this.options.isMobile&&(this.$tooltip.style.visibility="hidden")}onTimeupdate(){f(this._dragNdropTokens)||(this.options.isLive&&this.player?.isLive()?(this.$progress.style.width="100%",this.$handle.style.left=this.$playProgress.style.width="100%",this.$current.textContent=_e(+this._getCurrentTime()),this.$bar.setAttribute("aria-label",this._getAriaLabelValue())):this._moveHandle2time(this._getCurrentTime()))}_moveHandle2time(t){const e=this.player.getDuration(),{timecode:n,clip:i}=this.options;if(b(t)&&e){let s;if(this.$current.textContent=_e(+t),this.$bar.setAttribute("aria-label",this._getAriaLabelValue()),i){let[o,r]=i;o=o||0,r=r?r+n:e+o,s=(t-o-n)/(r-o-n)}else s=(t-n)/(e-n);const o=(100*s).toFixed(2)+"%";this.$handle.style.left=this.$playProgress.style.width=o}}onProgress(){this.$duration.textContent=_e(this._getDuration()),this.$progress.style.width=100*this.player.getBufferedPercent()+"%"}onHandleMouseDown(){this._dragNdropTokens.push(k(document,"mouseup",this.onHandleMouseUp)),this._dragNdropTokens.push(k(document,"mousemove",this.onHandleMouseMove))}onTouchStart(){this._dragNdropTokens.push(k(document,"touchend",this.onTouchEnd)),this._dragNdropTokens.push(k(document,"touchmove",this.onTouchMove))}onHandleMouseUp(t){t.stopPropagation(),t.preventDefault(),c(this._dragNdropTokens,T),this._dragNdropTokens.length=0,this.player.setCurrentTime(this._getTimeByEventPosition(t))}onTouchMove(t){t.stopPropagation(),t.preventDefault();const e=this.$bar.getBoundingClientRect(),n=t.touches[0];let i=Math.max(e.left,n.clientX);i=Math.min(e.right,i),i-=e.left,i=i/this.$bar.offsetWidth*100+"%",this.$handle.style.left=this.$playProgress.style.width=i;const s=this._getTimeByEventPosition(n);this.player.setCurrentTime(s),this.bus.emit("heartbeatextensions")}onTouchEnd(t){t.stopPropagation(),t.preventDefault(),c(this._dragNdropTokens,T),this._dragNdropTokens.length=0}onHandleMouseMove(t){const e=this.$bar.getBoundingClientRect();let n=Math.max(e.left,t.clientX);n=Math.min(e.right,n),n-=e.left,n=n/this.$bar.offsetWidth*100+"%",this.$handle.style.left=this.$playProgress.style.width=n}onDurationchange(){this.options.isLive||this.isProgressLiveStream||this._updateTimes()}onCanplaythrough(){this._updateTimes()}onLoadedmetadata(){this._updateTimes()}onC2pafragment(t){t.valid||setTimeout((()=>{const e=this.player.getDuration(),n=t.start/e*100,i=t.duration/e*100,s=C("span",{class:ce},this.$c2paStatus);s.style.left=n+"%",s.style.width=i+"%"}),1e3)}_getAriaLabelValue(){const t=this.$current.textContent,e=this.$duration.textContent;return`Current: ${this._timeCodeToSentence(t)} Total: ${this._timeCodeToSentence(e)}`}_timeCodeToSentence(t){const e=t.split(":"),n=["minutes","seconds"];e.length>2&&n.unshift("hours");const i=e.map(((t,e)=>`${"0"===t.charAt(0)?t.charAt(1):t} ${n[e]}`));return i.join(" ")}_getDuration(){const{clip:t,timecode:e}=this.options,n=this.player.getDuration();if(t){let[i,s]=t;return i=i||0,s?s+e:n+i}return n}_getCurrentTime(){const t=this.player.getCurrentTime(),{clip:e,timecode:n}=this.options,[i]=e||[0];return Math.max(t,i+n)}onLeave(){this.$tooltip.classList.remove(de)}onHover(t){let e;const{useOriginTimeForPreview:n,timecode:i}=this.options,s=t.target||t.srcElement;if(E(s,ye)){const t=parseInt(s.getAttribute("data-idx"),10),n=this._chapters[t];e=n.from,this.$thumbnailTime.innerHTML=n.text||n.title}else e=this._getTimeByEventPosition(t),this.$thumbnailTime.textContent=_e(e);if(x(this.thumbnails))return void this._popoverPosition(t);const o=n?e-i:e,r=A(this.thumbnails,(({from:t,to:e})=>m(o,t,e)));if(r){const[t,e]=r.text.split("#");this.$thumbnail.style.backgroundImage=`url("${t}")`;const n=N(e.split("=")).split(","),i=n.pop().trim(),s=n.pop().trim(),o=n.pop().trim(),a=n.pop().trim();this.$thumbnail.style.width=`${s}px`,this.$thumbnail.style.height=`${i}px`,this.$thumbnail.style.backgroundPosition=`-${a}px -${o}px`,this.$thumbnail.style.marginBottom="7px"}else this.$thumbnail.style.height="",this.$thumbnail.style.width="",this.$thumbnail.style.marginBottom="";this._popoverPosition(t)}_updateTimes(){this.$duration.textContent=_e(this._getDuration()),this.$current.textContent=_e(this._getCurrentTime()),this.$bar.setAttribute("aria-label",this._getAriaLabelValue()),this._isLoadedMetadata=!0,this._renderChaptersIfNeeded()}_popoverPosition(t){Kt(this.player,this._offsetX(t),this.$tooltip),this.$tooltip.classList.add(de)}onStatechanged(t,e){(t.toc.lang!==e.toc.lang||t.toc.timedata!==e.toc.timedata)&&this._refreshTOC()}_refreshTOC(){const t=this.state.getTOCTimeData(),e=this.state.getTOCLang();this._chapters=e?t:[],this._renderChaptersIfNeeded()}_renderChaptersIfNeeded(){if(c(this._bubbles,(t=>this.$bar.removeChild(t))),this._bubbles.length=0,x(this._chapters)||!this._isLoadedMetadata)return;const t=this.player.getDuration();c(this._chapters,((e,n)=>{const i=C("span",{class:ye,"data-idx":n},this.$bar);i.style.left=(100*e.from/t).toFixed(0)+"%",this.addEvent(i,"click",(t=>{t.stopPropagation(),this._moveHandle2time(e.from),this.player.setCurrentTime(e.from)})),this._bubbles.push(i)}))}_getTimeByEventPosition(t){const e=this.player.getDuration(),{timecode:n,clip:i}=this.options,s=this._getPercentageByPosition(t);if(i){let[t,o]=i;return t=t||0,o=o||e+t-n,((o-t)*s+t+n).toFixed(2)}return parseFloat(((e-n)*s+n).toFixed(2))}_getPercentageByPosition(t){const e=this.$bar.getBoundingClientRect();let n=Math.max(e.left,t.clientX);return n=Math.min(e.right,n),n-=e.left,(n/this.$bar.offsetWidth).toFixed(2)}_offsetX(t){if(!this.player.getElement())return;const e=this.$bar.getBoundingClientRect(),n=this.player.getElement().parentNode.getBoundingClientRect();let i=Math.max(e.left,t.clientX);return i=Math.min(e.right,i),i-=n.left,i}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null,this.$bar=null,this.$handle=null,this.$current=null,this.$duration=null,this.$playProgress=null,this.$progress=null,this.$tooltip=null,this.$thumbnail=null,this.$thumbnailTime=null}}],["showAnnotations",class extends Zt{constructor(t,e,n){super(t,e,n,["timeupdate","annotationslang"]),Yn(this,"annotations",[]),Yn(this,"sources",[]),Yn(this,"current",null),this.logger.debug("annotations:extension:creating"),this.render(),this.init(),this.logger.debug("annotations:extension:created")}init(){this.addEvent(this.$button,"click",(()=>{H(this.annotations,this.current),L(this.$outer,Kn),this.current=null,this.player.focus()}));const{annotations:t}=this.options;this.sources=i(t)?t:[t]}onAnnotationslang(t){this.annotations.length=0,this.current=null,this.onTimeupdate();const e=A(this.sources,(e=>e.srclang===t));e&&Ct({url:e.src,success:t=>{try{this.annotations=F(JSON.parse(t.data),ei),this.onTimeupdate()}catch(e){this.logger.error("Error occurred when parsing the response",t.data,e)}}})}render(){this.$outer=C("div",{class:Zn}),this.$button=C("button",{type:"button",class:Jn},this.$outer),this.$button.setAttribute("aria-label","Close annotation"),Me(this.$button,"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",{width:16,height:16}),this.$outerHolder=C("div",{class:Xn},this.$outer)}onTimeupdate(){const t=this.player.getCurrentTime();var e,n;b(this.current)&&m(t,this.current.from,this.current.to)||(this.current=A(this.annotations,(e=>m(t,e.from,e.to))),b(this.current)?(e=this.$outer,n=this.current,e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.fontSize=n.fontsize,e.style.color=`#${n.fontcolor}`,e.style.backgroundColor=`#${n.background}`,function(t,e){t.textContent=e;let n=function(t){return t.replace(ti,'<a href="$1">$1</a>')}(t.innerHTML);n=function(t){return t.replace(/\n/g,"<br />")}(n),t.innerHTML=n}(this.$outerHolder,this.current.text),S(this.$outer,Kn)):L(this.$outer,Kn))}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],["showTheaterMode",class extends Zt{constructor(t,e,n){var i;super(t,e,n,["statechanged"]),i=void 0,"$el"in this?Object.defineProperty(this,"$el",{value:i,enumerable:!0,configurable:!0,writable:!0}):this.$el=i,this.logger.debug("theater:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),M(this.$el,us,e.isTheaterMode()),this.logger.debug("theater:extension:created")}render(){this.$el=C("button",{type:"button",class:ds}),Me(this.$el,"M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z",{class:`${ds}__icon`}),Me(this.$el,"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z",{class:`${ds}__exit-icon`});const t=()=>this.$t(this.state.isTheaterMode()?"exit-theater":"theater");setTimeout((()=>ze(this,{$button:this.$el,text:t})))}toggle(){this.bus.emit("theaterchanging")}onStatechanged(t){M(this.$el,us,t.isTheaterMode),M(this.$el,gs,t.isFullScreen)}getElement(){return this.$el}}],["showClosedCaptions",class extends Zt{constructor(t,e,n){super(t,e,n,["timeupdate","showpopup","statechanged"]),sn(this,"$el",void 0),sn(this,"$button",void 0),sn(this,"$selector",void 0),sn(this,"$text",void 0),sn(this,"$textHolder",void 0),sn(this,"$mainStep",void 0),sn(this,"$embedCaptions",void 0),sn(this,"$settingsStep",void 0),sn(this,"$settings",void 0),sn(this,"$toMain",void 0),sn(this,"$toSettings",void 0),sn(this,"$fontColorSettings",void 0),sn(this,"$backgroundColorSettings",void 0),sn(this,"$fontSizeSettings",void 0),sn(this,"$fontFamilySettings",void 0),sn(this,"$locationSettings",null),sn(this,"$currentColor",void 0),sn(this,"$currentSize",void 0),sn(this,"$currentBgColor",void 0),sn(this,"$currentLocation",void 0),sn(this,"$currentFamily",void 0),sn(this,"$additionalStep",void 0),sn(this,"$additionalBackText",void 0),sn(this,"$additionalStepWrapper",void 0),sn(this,"$translate",void 0),sn(this,"$currentCustomTranslate",void 0),sn(this,"$captions",[]),sn(this,"$translatableCaptions",[]),sn(this,"embedCaptionsAutoShow",!0),this.logger.debug("cc:extension:creating"),this.render(),this.init(),this.logger.debug("cc:extension:created")}init(){nn(this,["_toSettingsPage","_toMainPage","_toColorPage","_toBackgroundColorPage","_toFontFamilyPage","_toSizesPage","_toLocationsPage","_toTranslatePage","_handleEmbedChanged"]),en(this,{$button:this.$button,$selector:this.$selector,SELECTOR_OPEN_CN:ln,heightControl:!0,firstFocusItemSelector:`.${bn}`,toMainFn:this._toMainPage.bind(this)}),ze(this,{$button:this.$button,text:this.$t("cc")}),this.addEvent(this.$settings,"click",this._toSettingsPage),this.addEvent(this.$toMain,"click",this._toMainPage),this.addEvent(this.$toSettings,"click",this._toSettingsPage),this.addEvent(this.$fontColorSettings,"click",this._toColorPage),this.addEvent(this.$backgroundColorSettings,"click",this._toBackgroundColorPage),this.addEvent(this.$fontFamilySettings,"click",this._toFontFamilyPage),this.addEvent(this.$fontSizeSettings,"click",this._toSizesPage),this.$locationSettings&&this.addEvent(this.$locationSettings,"click",this._toLocationsPage),this.$translate&&this.addEvent(this.$translate,"click",this._toTranslatePage),this.player.$el?.textTracks.addEventListener("addtrack",this._handleEmbedChanged),this.player.$el?.textTracks.addEventListener("change",this._handleEmbedChanged),this._toMainPage(),this._refresh(),this.changeLang(this.state.getCCLang())}render(){this.$el=C("div",{class:on}),this.$button=C("button",{type:"button",class:rn},this.$el),this.$selector=C("div",{class:an},this.$el),this.$text=C("span",{class:vn}),this.$textHolder=C("span",{class:Cn},this.$text),this._renderMainPage(),this._renderSettingsPage(),this._renderAdditionalPage()}_handleEmbedChanged(){const t=this.player.getTextTracks(),e=this.state.getCCSources();this.$el.style.display=e.length||t?.length?"block":"none";const n=()=>{const e=C("button",{type:"button",class:bn},this.$embedCaptions);e.textContent="None",this.addEvent(e,"click",(()=>{c(t,(t=>{c(this.$captions,(t=>L(t,yn))),t.mode="disabled",S(e,yn)}))})),this.$captions.push(e)};if(e.length)this.$settings.style.display="block";else{this.$settings.style.display="none";const t=this.$embedCaptions.childNodes[0];t&&"None"===t?.textContent||n()}t?.length&&c(t,(t=>{if(A(this.$captions,(e=>e.textContent===t.label)))return;const e=C("button",{type:"button",class:bn},this.$embedCaptions);e.textContent=t.label,this.addEvent(e,"click",(()=>{c(this.$captions,(t=>L(t,yn))),c(this.$translatableCaptions,(t=>L(t,yn)));const n=this.$captions.findIndex((t=>t===e));S(this.$captions[n],yn),t.mode="showing"})),this.$captions.push(e),this.embedCaptionsAutoShow&&(e.click(),this.embedCaptionsAutoShow=!1)}))}_renderMainPage(){this.$mainStep=C("div",{class:un,tabindex:-1},this.$selector),Me(this.$button,"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z");const t=this.state.getCCSources();this.$el.style.display=t.length?"block":"none";const e=P(t,(t=>3!==t.state&&0!==t.state));c(e,(t=>{const e=C("button",{type:"button",class:bn},this.$mainStep);e.textContent=1===t.state?`${t.label} ${this.$t("unapproved-source")}`:t.label,this.addEvent(e,"click",(()=>this.bus.emit("cclang",t.srclang))),this.$captions.push(e)})),this.$embedCaptions=C("div",{},this.$mainStep);const n=C("button",{type:"button",class:_n},this.$mainStep);this.$translate=n;let i=C("span",{},n);i.textContent=this.$t("translate"),Sn(n),this.$currentCustomTranslate=C("span",{class:$n},this.$translate);const s=e.length!==t.length;n.style.display=s?"block":"none",this.$settings=C("button",{type:"button",class:_n},this.$mainStep),i=C("span",{},this.$settings),i.textContent=this.$t("settings"),Sn(this.$settings)}_rerenderLanguages(t){const{$mainStep:e,$translate:n,$settings:i}=this;if(this.$el.style.display=t.length?"block":"none",!e)return;c(this.$captions,(t=>{e.removeChild(t)})),this.$captions.length=0;const s=P(t,(t=>3!==t.state&&0!==t.state));if(c(s,(t=>{const e=C("button",{type:"button",class:bn},this.$mainStep);e.textContent=1===t.state?`${t.label} ${this.$t("unapproved-source")}`:t.label,this.addEvent(e,"click",(()=>this.bus.emit("cclang",t.srclang))),this.$captions.push(e)})),n){e.removeChild(n);const i=s.length!==t.length;n.style.display=i?"block":"none",w(e,n)}i&&(e.removeChild(i),w(e,i))}_renderSettingsPage(){this.$settingsStep=C("div",{class:gn},this.$selector),this.$toMain=C("button",{type:"button",class:kn},this.$settingsStep),Me(C("span",{class:"arrow"},this.$toMain),Te,{class:"arrow"}),C("span",{},this.$toMain).textContent=this.$t("cc");const t=C("div",{class:`${En} tab-content`},this.$settingsStep);this.$fontColorSettings=C("button",{type:"button"},t);let e=C("span",{},this.$fontColorSettings);e.textContent=this.$t("settings-fontcolor"),Sn(this.$fontColorSettings),this.$currentColor=C("span",{class:$n},this.$fontColorSettings);let n=A(Pt,(t=>t.value===this.state.getCCTextColor()));this.$currentColor.textContent=n&&n.key?this.$t(n.key):"",this.$fontSizeSettings=C("button",{type:"button"},t),e=C("span",{},this.$fontSizeSettings),e.textContent=this.$t("settings-fontsize"),Sn(this.$fontSizeSettings),this.$currentSize=C("span",{class:$n},this.$fontSizeSettings),this.$currentSize.textContent=this.state.getCCFontSize(),this.$fontFamilySettings=C("button",{type:"button"},t),e=C("span",{},this.$fontFamilySettings),e.textContent=this.$t("settings-fontfamily"),Sn(this.$fontFamilySettings),this.$currentFamily=C("span",{class:$n},this.$fontFamilySettings);const i=A(Ft,(t=>t.value===this.state.getCCFontFamily()));if(this.$currentFamily.textContent=i&&i.key?this.$t(i.key):"",this.$backgroundColorSettings=C("button",{type:"button"},t),e=C("span",{},this.$backgroundColorSettings),e.textContent=this.$t("settings-background"),Sn(this.$backgroundColorSettings),this.$currentBgColor=C("span",{class:$n},this.$backgroundColorSettings),n=A(Pt,(t=>t.value===this.state.getCCBgColor())),this.$currentBgColor.textContent=n&&n.key?this.$t(n.key):"",this.options.showCCLayout){const n=C("button",{type:"button"},t);this.$locationSettings=n,e=C("span",{},n),e.textContent=this.$t("settings-captionlocations"),Sn(n),this.$currentLocation=C("span",{class:$n},this.$locationSettings);const i=A(zt,(t=>t.value===this.state.getCCLocation()));this.$currentLocation.textContent=i&&i.key?this.$t(i.key):""}const s=C("div",{class:`${Tn} tab-content`},this.$settingsStep);c(P(this.state.getCCSources(),(t=>3===t.state||0===t.state)),(t=>{const e=C("button",{type:"button",class:bn},s);e.textContent=t.label,this.addEvent(e,"click",(()=>{this.bus.emit("cclang",t.srclang),this._toMainPage()})),this.$translatableCaptions.push(e)}))}_renderAdditionalPage(){this.$additionalStep=C("div",{class:mn},this.$selector),this.$toSettings=C("button",{type:"button",class:kn},this.$additionalStep),Me(C("span",{class:"arrow"},this.$toSettings),Te,{class:"arrow"}),this.$additionalBackText=C("span",{},this.$toSettings),this.$additionalStepWrapper=C("div",{class:"tab-content"},this.$additionalStep)}onStatechanged(t,e){t.cc.sources!==e.cc.sources?(this._rerenderLanguages(t.cc.sources),this.changeLang(t.cc.lang)):t.cc.lang!==e.cc.lang?this.changeLang(t.cc.lang):t.cc.timedata!==e.cc.timedata?this.onLoadingTimedata():t.cc.location===e.cc.location&&t.cc.fontFamily===e.cc.fontFamily&&t.cc.fontSize===e.cc.fontSize&&t.cc.bgcolor===e.cc.bgcolor&&t.cc.color===e.cc.color||this._refresh()}onLoadingTimedata(){const t=this.state.getSelectedCC(),{$currentCustomTranslate:e,$translate:n}=this;e&&n&&(L(n,xn),e.textContent="",t&&!t.state&&(e.textContent=t.label)),this.onTimeupdate()}changeLang(t){c(this.$captions,(t=>L(t,yn))),c(this.$translatableCaptions,(t=>L(t,yn)));const e=this.player.getTextTracks();e?.length&&c(e,(t=>{t.mode="disabled"}));const n=this.state.getCCSources(),i=P(n,(t=>3!==t.state&&0!==t.state)),{$currentCustomTranslate:s,$translate:o}=this;s&&(s.textContent="");let r=O(i,(e=>e.srclang===t));if(-1===r){const e=P(n,(t=>!t.state));r=O(e,(e=>e.srclang===t)),this.$translatableCaptions[r]&&S(this.$translatableCaptions[r],yn),s&&e[r]&&(s.textContent=this.$t("translating")),o&&S(o,xn)}else this.$captions[r]&&S(this.$captions[r],yn),t||L(this.$text,wn)}onTimeupdate(){const t=this.state.getCCLang(),e=this.state.getCCTimeData();if(!t)return;if(x(e))return void L(this.$text,wn);const n=this.player.getCurrentTime(),i=A(e,(({from:t,to:e})=>m(n,t,e)));i?(this.$textHolder.innerHTML=i.text.split("\n").join("<br>"),S(this.$text,wn)):L(this.$text,wn)}onShowpopup(t){t===this.$selector&&(E(this.$selector,hn)?tn(this.player,this.$mainStep):E(this.$selector,cn)?tn(this.player,this.$settingsStep):E(this.$selector,pn)&&tn(this.player,this.$additionalStep))}_toMainPage(){S(this.$selector,hn),L(this.$selector,cn),L(this.$selector,pn),L(this.$selector,dn),tn(this.player,this.$mainStep);const t=document.querySelectorAll(`.${un} > .${bn}`);t[0]&&t[0].focus()}_toSettingsPage(){S(this.$selector,cn),L(this.$selector,hn),L(this.$selector,pn),L(this.$selector,dn),tn(this.player,this.$settingsStep),document.querySelector(`.${kn}`).focus()}_toAdditionalPage(){S(this.$selector,pn),L(this.$selector,cn),L(this.$selector,hn),L(this.$selector,dn),c(B(this.$additionalStepWrapper.childNodes),(t=>this.$additionalStepWrapper.removeChild(t))),tn(this.player,this.$additionalStep)}_toTranslatePage(){this.state.isTranslatingCC()||(S(this.$selector,dn),L(this.$selector,cn),L(this.$selector,hn),L(this.$selector,pn),tn(this.player,this.$settingsStep),document.querySelector(`.${kn}`).focus())}_prepareAdditionalPage(t,e,n,i){this._toAdditionalPage(),this.$additionalBackText.textContent=this.$t(t),this.$toSettings.focus();const s=[],o=this.state[e]();c(i,(t=>{const e=C("button",{type:"button",class:bn},this.$additionalStepWrapper),i=t.key;e.textContent=i?this.$t(i):t.label,o===t.value&&S(e,yn),this.addEvent(e,"click",(()=>{c(s,(t=>L(t,yn))),S(e,yn),this.bus.emit(n,t.value),this._toSettingsPage()})),s.push(e)}))}_toColorPage(){this._prepareAdditionalPage("settings-fontcolor","getCCTextColor","cccolor",Pt)}_toBackgroundColorPage(){this._prepareAdditionalPage("settings-background","getCCBgColor","ccbgcolor",Pt)}_toSizesPage(){this._prepareAdditionalPage("settings-fontsize","getCCFontSize","ccfontsize",At)}_toFontFamilyPage(){this._prepareAdditionalPage("settings-fontfamily","getCCFontFamily","ccfontfamily",Ft)}_toLocationsPage(){this._prepareAdditionalPage("settings-captionlocations","getCCLocation","cclocation",zt)}_detectLabel(t,e){const n=A(t,(t=>t.value===e));if(!n)return"";const i=n.key;return i?this.$t(i):n.label||""}_refresh(){const t=this.state.getCCTextColor(),e=this.state.getCCBgColor(),n=this.state.getCCFontSize(),i=this.state.getCCFontFamily();this.$textHolder.style.color=t,this.$textHolder.style.backgroundColor=e,this.$textHolder.style.fontSize=n,this.$textHolder.style.fontFamily=i,this.$currentColor.textContent=this._detectLabel(Pt,t),this.$currentBgColor.textContent=this._detectLabel(Pt,e),this.$currentSize.textContent=this._detectLabel(At,n),this.$currentFamily.textContent=this._detectLabel(Ft,i),this.$currentLocation&&(this.$currentLocation.textContent=this._detectLabel(zt,this.state.getCCLocation()))}getElement(){return this.$el}getOuter(){return this.$text}destroy(){super.destroy(),this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$text.parentNode&&this.$text.parentNode.removeChild(this.$text)}}],["showTOC",class extends Zt{constructor(t,e,n){super(t,e,n,["statechanged"]),Ln(this,"$el",void 0),Ln(this,"$button",void 0),Ln(this,"$selector",void 0),Ln(this,"$mainStep",void 0),Ln(this,"$languagesStep",void 0),Ln(this,"$chaptersWrapper",void 0),Ln(this,"$moreLanguages",void 0),Ln(this,"$currentLanguage",void 0),Ln(this,"$toMain",void 0),Ln(this,"$translateStep",void 0),Ln(this,"$toLanguages",void 0),Ln(this,"$translate",void 0),Ln(this,"$currentCustomTranslate",void 0),Ln(this,"$languages",[]),Ln(this,"$translatableLanguages",[]),Ln(this,"$items",[]),this.logger.debug("toc:extension:creating"),nn(this,["_toMainPage","_toLanguagesPage","_toTranslatePage"]),this.render(),this.init(),this.changeLang(this.state.getTOCLang()),this.logger.debug("toc:extension:created")}init(){const{$button:t,$selector:e}=this;en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:Rn,heightControl:!0,firstFocusItemSelector:"button",toMainFn:this._toMainPage.bind(this)}),ze(this,{$button:t,text:this.$t("chapters")}),this.addEvent(this.$moreLanguages,"click",this._toLanguagesPage),this.addEvent(this.$toMain,"click",this._toMainPage),this.addEvent(this.$toLanguages,"click",this._toLanguagesPage),this._toMainPage()}render(){this.$el=C("div",{class:Mn}),this.$button=C("button",{type:"button",class:Pn},this.$el),this.$selector=C("div",{class:An},this.$el),Me(this.$button,"M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"),this.$mainStep=C("div",{class:Dn,tabindex:-1},this.$selector),this.$languagesStep=C("div",{class:On},this.$selector),this.$chaptersWrapper=C("div",{class:`${Vn} tab-content`},this.$mainStep),this.$moreLanguages=C("button",{type:"button",class:In},this.$mainStep),C("span",{},this.$moreLanguages).textContent=this.$t("language"),Qn(this.$moreLanguages),this.$currentLanguage=C("span",{class:Gn},this.$moreLanguages),this.$toMain=C("button",{type:"button",class:Bn},this.$languagesStep);let t=C("span",{class:"arrow"},this.$toMain);Me(t,Te,{class:"arrow"});let e=C("span",{},this.$toMain);e.textContent=this.$t("chapters"),this.$translateStep=C("div",{class:qn},this.$selector),this.$toLanguages=C("button",{type:"button",class:Bn},this.$translateStep),t=C("span",{class:"arrow"},this.$toLanguages),Me(t,Te,{class:"arrow"}),e=C("span",{},this.$toLanguages),e.textContent=this.$t("language"),this.fillLanguages()}fillLanguages(){c(this.$languages,(t=>{this.$languagesStep&&this.$languagesStep.removeChild(t)})),c(this.$translatableLanguages,(t=>{this.$languagesStep&&this.$languagesStep.removeChild(t)})),this.$translate&&this.$languagesStep.removeChild(this.$translate),this.$languages=[],this.$translatableLanguages=[];const t=this.state.getTOCSources(),e=P(t,(t=>!!t.state));if(this.$el.style.display=t.length?"block":"none",c(e,(t=>{const e=C("button",{type:"button",class:Un},this.$languagesStep);e.textContent=1===t.state?`${t.label} ${this.$t("unapproved-source")}`:t.label,this.addEvent(e,"click",(()=>{this._toMainPage(),this.bus.emit("toclang",t.srclang)})),this.$languages.push(e)})),e.length!==t.length){const t=C("button",{type:"button",class:Vn},this.$languagesStep);this.$translate=t,C("span",{},t).textContent=this.$t("translate"),Qn(t),this.$currentCustomTranslate=C("span",{class:Gn},this.$translate),this.addEvent(t,"click",this._toTranslatePage)}c(P(t,(t=>!t.state)),(t=>{const e=C("button",{type:"button",class:Un},this.$translateStep);e.textContent=t.label,this.addEvent(e,"click",(()=>{this._toMainPage(),this.bus.emit("toclang",t.srclang)})),this.$translatableLanguages.push(e)}))}onStatechanged(t,e){t.toc.sources!==e.toc.sources&&this.fillLanguages(),t.toc.lang!==e.toc.lang&&this.changeLang(t.toc.lang),t.toc.timedata!==e.toc.timedata&&this.renderTimeData()}changeLang(t){c(this.$languages,(t=>L(t,Wn))),c(this.$translatableLanguages,(t=>L(t,Wn)));const e=this.state.getTOCSources(),n=P(e,(t=>!!t.state));this.$currentCustomTranslate&&(this.$currentCustomTranslate.textContent="");let i=O(n,(e=>e.srclang===t));if(-1===i){const n=P(e,(t=>!t.state));if(i=O(n,(e=>e.srclang===t)),-1===i)return;S(this.$translatableLanguages[i],Wn),this.$currentCustomTranslate&&(this.$currentCustomTranslate.textContent=n[i].label),this.$currentLanguage.textContent=n[i].label}else S(this.$languages[i],Wn),this.$currentLanguage.textContent=n[i].label;this.renderTimeData()}renderTimeData(){const t=this.state.getTOCLang()?this.state.getTOCTimeData():[];c(this.$items,(t=>{this.$chaptersWrapper.removeChild(t)})),this._toMainPage(),this.$items.length=0,c(t,(t=>{const e=C("button",{href:"#",class:jn},this.$chaptersWrapper);e.innerHTML=t.text||t.title,this.addEvent(e,"click",(e=>{e.preventDefault(),e.stopPropagation();const n=this.player.isPaused();this.player.setCurrentTime(t.from),n&&this.player.play()})),this.$items.push(e)}))}_toMainPage(){S(this.$selector,Fn),L(this.$selector,zn),L(this.$selector,Nn),tn(this.player,this.$mainStep),setTimeout((()=>{const t=document.querySelectorAll(`.${Vn} > .${jn}`);if(t[0])t[0].focus();else{const t=document.querySelector(`.${In}`);t&&t.focus()}}))}_toLanguagesPage(){S(this.$selector,zn),L(this.$selector,Fn),L(this.$selector,Nn),tn(this.player,this.$languagesStep);const t=document.querySelector(`.${On} > .${Bn}`);t&&t.focus()}_toTranslatePage(){S(this.$selector,Nn),L(this.$selector,Fn),L(this.$selector,zn),this.$translateStep&&tn(this.player,this.$translateStep);const t=document.querySelector(`.${qn} > .${Bn}`);t&&t.focus()}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$items.length=0,this.$languages.length=0,this.$translatableLanguages.length=0}}],["showAudioTracks",class extends Zt{constructor(t,e,n){super(t,e,n,["loadeddata","audiotrackswitched"]),this.logger.debug("audio-tracks:extension:creating"),this.render(),this.init(),this.logger.debug("audio-tracks:extension:created")}render(){this.$el=C("div",{class:ms}),this.$button=C("button",{type:"button",class:bs},this.$el),this.$selector=C("div",{class:ys,tabindex:-1},this.$el),Me(this.$button,"M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z")}init(){const t=this.$button,e=this.$selector;ze(this,{$button:t,text:this.$t("audio-tracks")}),en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:_s,reposition:!1,closeOnClick:!0,heightControl:!0,firstFocusItemSelector:`.${xs}`})}_renderAudioTracks(){c(B(this.$selector.childNodes),(t=>this.$selector.removeChild(t)));const t=this.player.getAudioTrack(),e=[];c(this.player.getAudioTracks(),((n,i)=>{if(!n||"object"!=typeof n)return;const s=C("button",{type:"button",class:xs},this.$selector);s.textContent=n.name||n.label,+i===t&&S(s,fs),this.addEvent(s,"click",(()=>{c(e,(t=>L(t,fs))),S(s,fs),this.player.setAudioTrack(n.id)})),e.push(s)}))}onAudiotrackswitched(){this._renderAudioTracks()}onLoadeddata(){this.player.isMultiAudioTracks()?this._renderAudioTracks():this.$el.style.display="none"}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showPlaceholder",class extends Zt{constructor(t,e,n){super(t,e,n),oi(this,"$outer",void 0),oi(this,"$placeholderIcon",void 0),oi(this,"$playButton",void 0),this.logger.debug("placeholder:extension:creating"),ui=this.options.accessibility,this.render(),n.isHandlingKeyboardEvents&&this.addEvent(document,"keydown",this.onKeyDown.bind(this),n.globalKeyboardListeners),this.addEvent(this.$outer,"click",this.onPlaceholderClick.bind(this)),this.addEvent(this.$playButton,"click",this.onPlaceholderClick.bind(this)),setTimeout((()=>{const t=this.$outer.parentNode.querySelector(".rmp-ext-title");t&&this.addEvent(t,"click",this.onPlaceholderClick.bind(this)),this.addEvent(this.$outer.parentNode,"dblclick",this.toggleFullScreen.bind(this))})),this.logger.debug("placeholder:extension:created")}render(){this.$outer=C("div",{class:ri,tabindex:-1}),this.$placeholderIcon=C("div",{class:li,tabindex:-1},this.$outer),this.$playButton=C("button",{type:"button",class:hi,tabindex:-1},this.$outer),Me(this.$playButton,$e),this.$playButton.setAttribute("aria-label","Play")}onPlaceholderClick(){this.logger.debug("placeholder:click"),clearTimeout(pi),pi=setTimeout((()=>this._togglePlay()),350)}onKeyDown(t){if(!this.player.getElement())return;this.logger.debug("placeholder:keydown");const e=t.target||t.srcElement;let n=e===this.player.getElement();n=n||E(e,"rplayer"),n=n||this.player.getElement().parentNode.contains(e),(n||this.options.globalKeyboardListeners&&!function(t){let e=!1;return e=e||t instanceof HTMLTextAreaElement,e=e||t instanceof HTMLInputElement&&"text"===t.type,e}(t.target))&&this._processKeyDown(t)}_processKeyDown(t){if(t.target instanceof HTMLInputElement)return;const e=t.keyCode;if(32===e&&ui&&"BUTTON"===t.target.tagName)return;let n=ci[e];b(n)&&o(this[n])&&(this[n](this.player),t.preventDefault(),t.stopPropagation()),n=this.options.keyboardListeners[e],b(n)&&o(n)&&(n(this.player),t.preventDefault(),t.stopPropagation())}toggleFullScreen(){this.logger.debug("placeholder:toggleFullScreen"),clearTimeout(pi),this.options.showFullScreen&&this.bus.emit("fullscreenchanging")}_togglePlay(){this.logger.debug("placeholder:togglePlay"),this.options.isMobile?this.bus.emit("mobiletouch"):this.player.isPaused()?(this.player.play(),this._showAction("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z")):(this.player.pause(),this._showAction("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"))}_skeepLeft(){this.logger.debug("placeholder:skeepLeft"),this.player.setCurrentTime(this.player.getCurrentTime()-this.options.skipDelta),this._showAction(ve)}_skeepRight(){this.logger.debug("placeholder:skeepRight"),this.player.setCurrentTime(this.player.getCurrentTime()+this.options.skipDelta),this._showAction(we)}_upVolume(){this.logger.debug("placeholder:volumeup");const t=Math.min(1,.1+this.player.getVolume());this.player.setMuted(!1),this.player.setVolume(t),this._showAction(Le)}_downVolume(){this.logger.debug("placeholder:volumedown");const t=Math.max(0,this.player.getVolume()-.1).toFixed(2);0==t?(this.player.setVolume(0),this.player.setMuted(!0),this._showAction(Se)):(this.player.setVolume(t),this._showAction("M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"))}_showAction(t){this.logger.debug("placeholder:showaction"),L(this.$outer,ai),clearTimeout(di),di=setTimeout((()=>{this.logger.debug("placeholder:showaction:clear"),this._clearPlaceholderIcon(),Me(this.$placeholderIcon,t),S(this.$outer,ai),di=setTimeout((()=>{this.logger.debug("placeholder:showaction:remove"),this._clearPlaceholderIcon(),L(this.$outer,ai)}),500)}),350)}_clearPlaceholderIcon(){this.$placeholderIcon.childNodes.length&&c(this.$placeholderIcon.childNodes,(t=>{this.$placeholderIcon.removeChild(t)}))}_prevFrame(){this.player.prevFrame()}_nextFrame(){this.player.nextFrame()}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer.removeChild(this.$placeholderIcon),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null,this.$placeholderIcon=null}}],["showCaptionSearch",class extends Zt{constructor(t,e,n){super(t,e,n,["statechanged","timeupdate","showpopup","loadedmetadata","canplaythrough"]),vs(this,"$el",void 0),vs(this,"filter",""),this.logger.debug("search:extension:creating"),this.render(),this.init(),nn(this,["onTimeupdate"]),this.logger.debug("search:extension:created")}render(){this.$el=C("div",{class:"rmp-ext-search"}),this.$button=C("button",{type:"button",class:"rmp-ext-search__button"},this.$el),this.$selector=C("div",{class:"rmp-ext-search__selector"},this.$el),this.$captions=C("div",{class:"rmp-ext-search__captions"},this.$selector),this.$input=C("input",{class:"rmp-ext-search__input",placeholder:this.$t("caption-search")},this.$selector),this.$clearBtn=C("button",{class:"rmp-ext-search__cc-clear rmp-ext-search--hidden"},this.$selector),Me(this.$clearBtn,"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"),Me(this.$button,"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z")}init(){const t=this.$button,e=this.$selector;ze(this,{$button:t,text:this.$t("caption-search")}),en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:"rmp-ext-search__selector--open",reposition:!1,closeOnClick:!1,heightControl:!1}),this.addEvent(this.$input,"input",(()=>{this.filter=this.$input.value,this.renderCaptions(),this.$input.value?this.$clearBtn.classList.remove(ws):this.$clearBtn.classList.add(ws)})),this.$clearBtn.addEventListener("click",(()=>{this.$input.value="",this.filter="",this.renderCaptions()}))}onStatechanged(t,e){t.cc.lang!==e.cc.lang?this.handleCaptionLanguageChanged(t.cc.lang):t.cc.timedata!==e.cc.timedata&&this.handleTimeDataChanged()}onCanplaythrough(){this.handleTimeDataChanged()}onLoadedmetadata(){this.handleTimeDataChanged()}handleCaptionLanguageChanged(t){M(this.$el,ws,!t)}handleTimeDataChanged(){const t=this.state.getCCLang();this.handleCaptionLanguageChanged(t),this.renderCaptions()}filteredCaptions(){const t=new RegExp(this.filter.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"ig");return P(this.state.getCCTimeData(),(e=>(t.lastIndex=0,t.test(e.text))))}renderCaptions(){const t=this.player.getDuration();if(!t)return;const e=t>3600;c(B(this.$captions.childNodes),(t=>this.$captions.removeChild(t))),c(this.filteredCaptions(),(t=>{const n=C("button",{type:"button",class:"rmp-ext-search__item",id:ks(t.id)},this.$captions);C("span",{class:"rmp-ext-search__cc-time"},n).textContent=Tt(t.from,e);const i=(s=t.text,$s.innerHTML=s,$s.textContent);var s;C("span",{class:"rmp-ext-search__cc-text",title:i},n).textContent=i,this.addEvent(n,"click",(e=>{e.preventDefault(),e.stopPropagation();const n=this.player.isPaused();this.player.setCurrentTime(t.from),n&&this.player.play()}))}))}onShowpopup(){this.onTimeupdate(),this.scrollToCurrentCaption()}scrollToCurrentCaption(){const t=this.filteredCaptions(),e=this.player.getCurrentTime(),n=O(t,(({from:t,to:n})=>m(e,t,n)));if(n>-1){const t=B(this.$captions.childNodes)[Math.max(0,n-2)];t&&function(t,e){const{top:n}=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=e.scrollTop,o=Math.floor(n-i.top);e.scrollTop=s+o}(t,this.$captions)}}onTimeupdate(){const t=this.filteredCaptions();if(x(t))return;const e=this.player.getCurrentTime(),n=O(t,(({from:t,to:n})=>m(e,t,n)));if(n>-1){const e=t[n],i=document.getElementById(ks(e.id));if(!i)return void c(B(this.$captions.childNodes),(t=>L(t,Cs)));if(E(i,Cs))return;c(B(this.$captions.childNodes),(t=>L(t,Cs))),S(i,Cs)}else c(B(this.$captions.childNodes),(t=>L(t,Cs)))}getElement(){return this.$el}destroy(){super.destroy();const t=this.$el.parentNode;t instanceof HTMLElement&&t.removeChild(this.$el),this.$el=null}}],["showDownload",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("download:extension:creating"),this.render(),this.init(),this.logger.debug("download:extension:created")}render(){this.$el=C("span",{class:fi,"data-testid":"download"}),this.$button=C("button",{type:"button",class:$i},this.$el),this.$selector=C("div",{class:vi},this.$el),this.$link=C("a",{style:"display: none;"},this.$selector),this.$mainStep=C("div",{class:Ti},this.$selector),this.options.showDownloadVideo&&(this.$video=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$video).textContent=this.$t("video-drm"),S(this.$video,ki),Mi(this.$video)),this.options.showDownloadCC&&(this.$cc=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$cc).textContent=this.$t("cc"),S(this.$cc,ki),Mi(this.$cc),this.$transcript=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$transcript).textContent=this.$t("transcript"),S(this.$transcript,ki),Mi(this.$transcript)),this.options.downloadVideoURL&&(this.$mp4=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$mp4).textContent=this.$t("video-drm")),this.$svg=Me(this.$button,"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"),this.$spinner=C("img",{src:"/images/Spinner-small.gif",height:"26",width:"26"}),this.$additionalStep=C("div",{class:Ei},this.$selector),this.$back=C("button",{type:"button",class:Si},this.$additionalStep),Me(C("span",{class:"arrow"},this.$back),Te),this.$backText=C("span",{},this.$back),this.$additional=C("div",{class:"tab-content"},this.$additionalStep)}init(){const t=this.$button,e=this.$selector,n=this.options;en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:wi,reposition:!1,closeOnClick:!1,firstFocusItemSelector:`.${Li}`,toMainFn:this._toMain.bind(this)}),ze(this,{$button:t,text:this.$t("download")}),!x(n.downloadCCLanguages)||n.showDownloadCC||n.downloadVideoURL?(n.downloadVideoURL&&this.addEvent(this.$mp4,"click",this.performClick.bind(this,n.downloadVideoURL)),this.addEvent(this.$back,"click",(()=>this._toMain())),n.showDownloadVideo&&this.addEvent(this.$video,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("video-drm")),this._renderVideos()})),n.showDownloadCC&&(this.addEvent(this.$transcript,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("transcript")),this._renderTranscripts()})),this.addEvent(this.$cc,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("cc")),this._renderClosedCaptions()})))):this.addEvent(this.$el,"click",this.downloadDRMVideo.bind(this,null))}downloadDRMVideo(t){let e=this.options.downloadURL;null!==t&&(e+="?ccLang="+t),this.bus.emit("downloadRequested",e,this.performClick.bind(this)),this.$button.removeChild(this.$svg),this.$button.appendChild(this.$spinner)}downloadTranscript(t){const e=`transcript__${t.srclang}.txt`;"json"===t.type?Ct({url:t.src,success:t=>this.prepareTranscriptForDownload(JSON.parse(t.data),e)}):St(t.src,(t=>this.prepareTranscriptForDownload(t,e)))}prepareTranscriptForDownload(t,e){const{text:n}=t.reduce((({prevSegmentTime:t,text:e},n)=>(t>0&&n.from>=t+.1&&(e+="\r\n"),e=e+n.text.replace(/(\r?\n|\r)$/,"").replace(/<br\s*\/?>/gm,"\r\n")+"\r\n",{prevSegmentTime:n.to,text:e})),{text:"",prevSegmentTime:0});var i=new Blob([n],{type:"text/plain;charset=utf-8"});xi(i,e)}downloadCC(t){const e=`captions__${t.srclang}.vtt`;"json"===t.type?Ct({url:t.src,success:t=>this.prepareCCForDownload(JSON.parse(t.data),e)}):Ct({url:t.src,success:t=>{var n=new Blob([t.data],{type:"text/plain;charset=utf-8"});xi(n,e)}})}prepareCCForDownload(t,e){const n=t.reduce(((t,e)=>(t||(t+="WEBVTT\r\n"),t+="\r\n",t+=Tt(e.from,!1,!0)+" --\x3e "+Tt(e.to,!1,!0),t+="\r\n",(t+=e.text)+"\r\n")),"");var i=new Blob([n],{type:"text/plain;charset=utf-8"});xi(i,e)}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}performClick(t){var e=document.createElement("a",{href:t,target:"_blank"});e.href=t,e.target="_blank",e.className="rmp-ext-download-hidden",e.download=N(t.split("/"))||"video.mp4",document.body.appendChild(e),e.click();try{this.$button.removeChild(this.$spinner),this.$button.appendChild(this.$svg)}catch(t){}}_toMain(){L(this.$selector,Ci),tn(this.player,this.$mainStep);const t=document.querySelectorAll(`.${Ti} > .${Li}`);t[0]&&t[0].focus()}_toAdditional(t){c(B(this.$additional.childNodes),(t=>this.$additional.removeChild(t))),S(this.$selector,Ci),this.$backText.textContent=t,tn(this.player,this.$additionalStep),this.$back.focus()}_renderVideos(){const t=C("button",{type:"button",class:Li},this.$additional);this.addEvent(t,"click",(()=>this.downloadDRMVideo(null))),C("span",{},t).textContent=this.$t("video-only"),c(this.options.downloadCCLanguages,(t=>{const e=C("button",{type:"button",class:Li},this.$additional);this.addEvent(e,"click",(()=>this.downloadDRMVideo(t.code))),C("span",{},e).textContent=`${this.$t("video-and")} ${t.label} CC`}))}_renderTranscripts(){c(this.options.cc.filter(Pi),(t=>{const e=C("button",{type:"button",class:Li},this.$additional);this.addEvent(e,"click",(()=>this.downloadTranscript(t))),C("span",{},e).textContent=t.label}))}_renderClosedCaptions(){c(this.options.cc.filter(Pi),(t=>{const e=C("button",{type:"button",class:Li},this.$additional);this.addEvent(e,"click",(()=>this.downloadCC(t))),C("span",{},e).textContent=t.label}))}}],["showPrev",class extends Zt{constructor(t,e,n){super(t,e,n),es(this,"$outer",void 0),es(this,"$button",void 0),this.logger.debug("prev:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$outer,"click",(()=>i.emit("prevtrack"))),this.logger.debug("prev:extension:created")}render(){const t=this.options.prevTrackTitle;this.$outer=C("div",{class:ns,title:t}),this.$button=C("button",{type:"button",class:is},this.$outer),Me(this.$button,ke),this.$button.setAttribute("aria-label","Go to previous track"),C("img",{src:this.options.prevTrackThumbnails,class:ss},this.$outer)}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null}}],["showNext",class extends Zt{constructor(t,e,n){super(t,e,n),os(this,"$outer",void 0),os(this,"$button",void 0),this.logger.debug("next:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$outer,"click",(()=>i.emit("nexttrack"))),this.logger.debug("next:extension:created")}render(){const t=this.options.nextTrackTitle;this.$outer=C("div",{class:rs,title:t}),this.$button=C("button",{type:"button",class:as},this.$outer),Me(this.$button,Ce),this.$button.setAttribute("aria-label","Go to next track"),C("img",{src:this.options.nextTrackThumbnails,class:ls},this.$outer)}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null}}],["useMux",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("mux:extension:creating"),this.init(),this.logger.debug("mux:extension:created")}init(){b(window.mux)?this.monitor():this.loadLibraryAndStartMonitor()}loadLibraryAndStartMonitor(){const t=C("script",{src:this.options.muxURL}),e=R(document.getElementsByTagName("script"));t.onload=t.onreadystatechange=()=>this.monitor(),e.parentNode&&e.parentNode.insertBefore(t,e)}monitor(){const t=this.player.getElement(),e=D({},ps,this.options.mux);window.mux.monitor(`#${t.id}`,{debug:!1,data:e})}destroy(){const t=this.player.getElement();t?.mux&&t.mux.destroy(),super.destroy()}}],[!0,class extends Zt{constructor(t,e,n){super(t,e,n),Xi(this,"_w",void 0),Xi(this,"_h",void 0),this.onResize=this.onResize.bind(this),setTimeout(this.onResize),this.addEvent(window,"resize",(()=>setTimeout(this.onResize))),this.bus.on("fullscreenchanged",(()=>setTimeout(this.onResize,500))),this.bus.on("cclayoutchange",(()=>setTimeout(this.onResize)))}onResize(){const t=this.player.getElement();if(!t)return;const e=t.parentNode?t.parentNode:t,n=Math.max(t.offsetWidth,e.offsetWidth),i=Math.max(t.offsetHeight,e.offsetHeight,e.parentNode.offsetHeight),s=Math.max(t.offsetWidth,e.parentNode.offsetWidth);n===this._w&&i===this._h||(this._h=i,this._w=n,setTimeout((()=>this.bus.emit("resizeplayer",{width:n,height:i,outerWidth:s}))))}}],["showCrawl",Fs],["showSettings",class extends Zt{constructor(t,e,n){super(t,e,n,["loadedmetadata","annotationslang","qualitychange","timeupdate"]),Ai(this,"playbackRate",1),Ai(this,"annLang",""),this.logger.debug("settings:extension:creating"),this.render(),this.init(),this.logger.debug("settings:extension:created")}render(){this.$el=C("div",{class:Fi}),this.$button=C("button",{type:"button",class:zi},this.$el),this.$selector=C("div",{class:Ni},this.$el),this.$mainStep=C("div",{class:Hi},this.$selector),Me(this.$button,"M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"),this.options.showAnnotations&&(this.$annotations=C("button",{type:"button",class:Di},this.$mainStep),C("span",{},this.$annotations).textContent=this.$t("annotations"),S(this.$annotations,Ui),Ki(this.$annotations),this.$currentAnnotation=C("span",{class:Wi},this.$annotations)),this.options.showQuality&&(this.$quality=C("button",{type:"button",class:Ii},this.$mainStep),C("span",{},this.$quality).textContent=this.$t("quality"),S(this.$quality,Ui),Ki(this.$quality),this.$currentQuality=C("span",{class:Wi},this.$quality)),this.options.showPlaybackRate&&(this.$speed=C("button",{type:"button",class:Vi},this.$mainStep),C("span",{},this.$speed).textContent=this.$t("playback-rate"),S(this.$speed,Ui),Ki(this.$speed),this.$currentSpeed=C("span",{class:Wi},this.$speed),this.$currentSpeed.textContent=this.$t("standard-playbackrate")),this.$additionalStep=C("div",{class:Bi},this.$selector),this.$back=C("button",{type:"button",class:ji},this.$additionalStep),Me(C("span",{class:"arrow"},this.$back),Te),this.$backText=C("span",{},this.$back),this.$additional=C("div",{class:"tab-content"},this.$additionalStep)}init(){const t=this.$button;if(en(this,{$button:t,$selector:this.$selector,SELECTOR_OPEN_CN:Ri,reposition:!1,closeOnClick:!1,firstFocusItemSelector:`.${Ui}`,toMainFn:this._toMain.bind(this)}),this.options.showAnnotations){this.addEvent(this.$annotations,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("annotations")),this._renderAnnotationsLanguages()}));const t=[Yi].concat(this.options.annotations),e=wt(Qi);let n=A(t,(t=>t.srclang===e));n||(n=A(t,(t=>t.default))),n=n||t[1],this.bus.emit("annotationslang",n.srclang)}this.options.showQuality&&this.addEvent(this.$quality,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("quality")),this._renderQualities()})),this.options.showPlaybackRate&&this.addEvent(this.$speed,"click",(()=>{this._toAdditional(this.$t("playback-rate")),this._renderPlaybackRate()})),this.addEvent(this.$back,"click",(()=>this._toMain())),ze(this,{$button:t,text:this.$t("settings")})}_toAdditional(t){c(B(this.$additional.childNodes),(t=>this.$additional.removeChild(t))),S(this.$selector,Oi),this.$backText.textContent=t,tn(this.player,this.$additionalStep),this.$back.focus()}_renderQualities(){c(B(this.$additional.childNodes),(t=>this.$additional.removeChild(t)));const t=this.player.getLevel(),e=[],n=this.player.getLevels();n.sort(((t,e)=>e.height-t.height)),c(n,(n=>{if(!n.name&&!n.height)return;const i=C("button",{type:"button",class:qi},this.$additional);i.textContent=n.name||`${n.height}p`,(d(n,t)||I(n,"index",-1)===I(t,"index",-2))&&(S(i,Gi),this.$currentQuality.textContent||this.bus.emit("qualitychange",i.textContent)),this.addEvent(i,"click",(()=>{this.bus.emit("qualitychange",i.textContent),this.bus.emit("manualquality",i.textContent),c(e,(t=>L(t,Gi))),S(i,Gi),this.player.setLevel(n),this._toMain()})),e.push(i)}))}_renderAnnotationsLanguages(){const t=[],e=this.annLang;c([Yi].concat(this.options.annotations),(n=>{const i=C("button",{type:"button",class:qi},this.$additional);i.textContent=n.label,e===n.srclang&&S(i,Gi),this.addEvent(i,"click",(()=>{vt(Qi,n.srclang),this.bus.emit("annotationslang",n.srclang),this._toMain()})),t.push(i)}))}_mapRates(){const t=this.options.playbackRates;-1===t.indexOf(1)&&t.push(1);let e=t.map((t=>{const e=Math.round(100*t)/100;return 1===e?{rate:e,labelKey:"standard-playbackrate"}:5===e?{rate:e,hide:t=>t.isAudio}:{rate:e}}));return e=e.filter(((t,e)=>t.rate<=5&&t.rate>0)).sort(((t,e)=>t.rate-e.rate)),e}_renderPlaybackRate(){const t=[];c(Array.isArray(this.options.playbackRates)?this._mapRates():Zi,(e=>{if(h(e,"hide")&&o(e.hide)&&e.hide(this.options))return;const n=C("button",{type:"button",class:qi},this.$additional);n.textContent=b(e.labelKey)?this.$t(e.labelKey):e.rate,e.rate===this.playbackRate&&(S(n,Gi),this.$currentSpeed.textContent=n.textContent),this.addEvent(n,"click",(()=>{c(t,(t=>L(t,Gi))),S(n,Gi),this.player.setPlaybackRate(e.rate),this.playbackRate=e.rate,this.$currentSpeed.textContent=n.textContent,this._toMain()})),t.push(n)}))}_toMain(){L(this.$selector,Oi),tn(this.player,this.$mainStep);const t=document.querySelectorAll(`.${Hi} > .${Ui}`);t[0]&&t[0].focus()}onAnnotationslang(t){const e=A([Yi].concat(this.options.annotations),(e=>e.srclang===t))||Yi;this.annLang=e.srclang,this.$currentAnnotation.textContent=e.label}onLoadedmetadata(){this.options.showQuality&&(this.player.isMultiQuality()?this._renderQualities():this.$quality.style.display="none")}onQualitychange(t){this.$currentQuality&&(this.$currentQuality.textContent=t)}onTimeupdate(){this.player.isLive?.()&&(this.player.setPlaybackRate(1),this.$currentSpeed.textContent=this.$t("standard-playbackrate"),this.playbackRate=1)}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null,this.$button=null,this.$selector=null}}],["showFullScreen",class extends Zt{constructor(t,e,n){var i;super(t,e,n,["statechanged"]),i=void 0,"$el"in this?Object.defineProperty(this,"$el",{value:i,enumerable:!0,configurable:!0,writable:!0}):this.$el=i,this.logger.debug("fullscreen:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),this.addEvent(document,"keyup",this.onKeyup.bind(this)),navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)&&this.addEvent(window,"resize",this.onResize.bind(this)),M(this.$el,Je,this.state.isFullScreen()),this.logger.debug("fullscreen:extension:created")}render(){this.$el=C("button",{type:"button",class:Xe,"data-testid":"fullscreen"}),Me(this.$el,"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z",{class:"fullscreen-icon"}),Me(this.$el,"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z",{class:"exit-fullscreen-icon"});const t=()=>this.$t(this.state.isFullScreen()?"exit-fullscreen":"fullscreen");setTimeout((()=>ze(this,{$button:this.$el,text:t})))}onResize(){this.state.isFullScreen()&&this.bus.emit("fullscreenchanging",!0)}onKeyup(t){27===t.keyCode&&this.bus.emit("fullscreenchanging",!1)}onStatechanged(t){M(this.$el,Je,t.isFullScreen)}toggle(){this.bus.emit("fullscreenchanging")}getElement(){return this.$el}destroy(){super.destroy();const t=this.$el.parentNode;t instanceof HTMLElement&&t.removeChild(this.$el)}}]];function Is(t,e){const n=function(t,e){let n="calc(100% - 160px)";return e&&(n=e.bottom-e.top-160+"px"),`\n.rplayer {\n font-family: 'Roboto',sans-serif;\n width: 100%;\n height: 100%;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n outline: 0;\n position: relative;\n z-index: 1;\n text-align: left;\n}\n\n.rplayer, .rplayer * {\n box-sizing: border-box;\n}\n\n.rplayer--fullscreen .rplayer__inner {\n height: 100% !important;\n width: 100% !important;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 9999999;\n position: static;\n padding-bottom: 0;\n margin: 0 auto\n}\n\n@media (orientation: portrait) {\n .rplayer--fullscreen .rplayer--iphone .rmp-extensions {\n bottom: 40px;\n }\n .rplayer--fullscreen .rplayer--iphone .rmp-ext-cc__text {\n bottom: 125px;\n }\n}\n\n.rplayer--fullscreen:-webkit-full-screen .rplayer__inner,\n.rplayer--fullscreen:-moz-full-screen .rplayer__inner,\n.rplayer--fullscreen:-ms-fullscreen .rplayer__inner,\n.rplayer--fullscreen:fullscreen .rplayer__inner,\n min-height: 100vh;\n min-width: 100vw;\n}\n\n.rplayer--fullscreen .rplayer__playlist-wrapper {\n display: none;\n}\n\n.rplayer button span {\n display: inline;\n padding: 0;\n}\n\n.rplayer--fullscreen .rplayer .rmp-flash-wrapper, .rplayer--fullscreen .rplayer video {\n background-color: black;\n}\n\n.rplayer audio {\n width: 100%\n}\n\n.rplayer video {\n outline: 0\n}\n\n.rplayer--fullscreen {\n position: fixed!important;\n top: 0!important;\n bottom: 0!important;\n right: 0!important;\n left: 0!important;\n background-color: black;\n width: 100%!important;\n max-width: 100% !important;\n height: 100vh !important;\n z-index: 9999999!important;\n display: block;\n}\n\n.rplayer--fullscreen .rplayer {\n display: table-cell;\n vertical-align: middle\n}\n\n.rplayer__inner {\n margin: auto;\n background-color: black;\n}\n\n.rplayer__inner, .rplayer__playlist-wrapper {\n position: relative;\n overflow: hidden;\n width: 100%;\n height: 100%;\n}\n\n.rplayer__inner--playing .rmp-ext-help, .rplayer__inner--playing .rmp-ext-title {\n opacity: 0;\n z-index: -9;\n}\n\n.rplayer__inner--loading>* {\n visibility: hidden\n}\n\n.rplayer__inner--loading>.loader {\n border: 4px solid #f3f3f3;\n border-top: 4px solid #666;\n border-radius: 50%;\n width: 60px;\n height: 60px;\n animation: spin 2s linear infinite;\n visibility: visible;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-top: -30px;\n margin-left: -30px\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg)\n }\n\n to {\n transform: rotate(-360deg)\n }\n}\n\n@-webkit-keyframes spin {\n 0% {\n transform: rotate(0deg)\n }\n\n to {\n transform: rotate(360deg)\n }\n}\n\n.rplayer .rmp-flash-wrapper,.rplayer video {\n background-color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0\n}\n\n.rplayer .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer .rplayer__inner--cc-below video {\n position: relative;\n height: ${n};\n}\n\n.rplayer--cc-75-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-75-below .rplayer__inner--cc-below video {\n height: calc(100% - 110px);\n}\n\n.rplayer--cc-100-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-100-below .rplayer__inner--cc-below video {\n height: calc(100% - 140px);\n}\n\n.rplayer--cc-125-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-125-below .rplayer__inner--cc-below video {\n height: calc(100% - 150px);\n}\n\n.rplayer--cc-150-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-150-below .rplayer__inner--cc-below video {\n height: calc(100% - 170px);\n}\n\n.rplayer--cc-200-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-200-below .rplayer__inner--cc-below video {\n height: calc(100% - 200px);\n}\n\n.rplayer--fullscreen .rplayer--cc-75-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-75-below .rplayer__inner--cc-below video {\n height: calc(100vh - 130px);\n}\n\n.rplayer--fullscreen .rplayer--cc-100-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-100-below .rplayer__inner--cc-below video {\n height: calc(100vh - 160px);\n}\n\n.rplayer--fullscreen .rplayer--cc-125-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-125-below .rplayer__inner--cc-below video {\n height: calc(100vh - 180px);\n}\n\n.rplayer--fullscreen .rplayer--cc-150-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-150-below .rplayer__inner--cc-below video {\n height: calc(100vh - 210px);\n}\n\n.rplayer--fullscreen .rplayer--cc-200-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-200-below .rplayer__inner--cc-below video {\n height: calc(100vh - 230px);\n}\n\n.rmp-extensions, .rmp-ext-title {\n height: 86px;\n left: 0;\n right: 0;\n position: absolute;\n background-repeat: repeat-x;\n\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDg2NUVBOEM1QTQ0MTFFNzlGNTJDQTRCNzY1MURGNEMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDg2NUVBOEI1QTQ0MTFFNzlGNTJDQTRCNzY1MURGNEMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjAzOTcwY2FjLWEyYWMtMTE3YS05OGUxLWI5NzUzOTY2ZTQ4MyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjAzOTcwY2FjLWEyYWMtMTE3YS05OGUxLWI5NzUzOTY2ZTQ4MyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoORptwAAACaSURBVHjafFBbDoAgDBsbev87egsF8fEBtqmY2LRrGRtmZpvfcD7QEE7BKtYIinAruoNVAQXvKAjv2R27HHiMOpN7TN0qWjVRo7XU5iNnKFuvqfczwZTxgbj/hNJUDj/3n5xPpTJcSDIokrrMGM6dJZQvBOaisyRqgXLB2jJ1s3DHLCuOkXEMNQF1plUDt1Sbkxv4iMQG+CXAAOG1UnHx2OgyAAAAAElFTkSuQmCC');\n\n color: ${t.mainColor};\n z-index: 4;\n transition: opacity 500ms ease;\n}\n\n.rplayer--iphone .rmp-extensions, .rplayer--iphone .rmp-ext-title {\n transition: none;\n transform: translateZ(0);\n z-index: 9;\n background: linear-gradient(360deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.75) 50%, rgba(0,0,0,0) 100%);\n}\n\n.rmp-extensions {\n background-position: bottom;\n bottom: -26px;\n padding-top: 26px;\n padding-right: 5px;\n font-size: 12px;\n z-index: 5;\n display: flex;\n}\n\n.rmp-ext-backward, .rmp-ext-prev-frame, .rmp-ext-play, .rmp-ext-next-frame, .rmp-ext-forward, \n.rmp-ext-volume, .rmp-ext-progress, .rmp-ext-settings, .rmp-ext-theater, .rmp-ext-cc, .rmp-ext-toc,\n.rmp-ext-audio-tracks, .rmp-ext-search, .rmp-ext-settings, .rmp-ext-fullscreen, .rmp-ext-bottom-next,\n.rmp-ext-bottom-prev {\n max-height: 31px;\n}\n\n.rplayer--mobile .rmp-extensions {\n bottom: -20px;\n}\n\n.rplayer__inner--light .rmp-ext-help,\n.rmp-extensions--hidden > .rmp-extensions, .rmp-extensions--hidden > .rmp-ext-title, .rmp-extensions--hidden > .rmp-ext-help {\n opacity: 0;\n}\n\n.rplayer__inner--light.rplayer__inner--hovering .rmp-extensions, .rplayer__inner--light.rplayer__inner--hovering .rmp-ext-help,\n.rplayer__inner--active .rmp-extensions, .rplayer__inner--active .rmp-ext-help {\n opacity: 1;\n}\n\n.rmp-extensions button, .rmp-ext-help__button {\n height: 32px;\n border: none;\n cursor: pointer;\n position: relative;\n background-color: transparent;\n float: left;\n color: ${t.submenuColor};\n width: 36px\n}\n\n\n.rplayer--mobile .rmp-extensions .rmp-ext-forward, .rplayer--mobile .rmp-extensions .rmp-ext-backward {\n display: none;\n}\n\n.rplayer--mobile .arrow svg {\n width: 24px !important;\n height: 24px !important;\n}\n\n.rmp-extensions button svg, .rmp-ext-help__button {\n width: 24px;\n height: 24px;\n display: block;\n fill: ${t.mainColor};\n opacity: .75\n}\n\n.rmp-extensions button:hover svg, .rmp-ext-help__button:hover {\n opacity: 1\n}\n\n.rmp-extensions button, .rmp-ext-title__title,\n.rplayer__playlist-item, .rmp-ext-c2pa__item {\n padding: 0 5px;\n outline-offset: -2px;\n}\n\n.rplayer__inner--accessibility .rmp-extensions button:focus,\n.rplayer__inner--accessibility .rmp-ext-progress__bar:focus,\n.rplayer__inner--accessibility .rmp-ext-title__title:focus,\n.rplayer__inner--accessibility .rplayer__playlist-item:focus,\n.rplayer__inner--accessibility .rmp-ext-c2pa__item:focus {\n outline: 2px solid blue;\n}\n\n.rmp-extensions > button:first-of-type {\n margin-left: 6px\n}\n\n.rmp-ext-placeholder {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n background-color: #000;\n opacity: 0.001;\n}\n\n.rmp-ext-placeholder--animation {\n background-color: transparent;\n opacity: 1;\n}\n\n.rplayer__inner--light .rmp-ext-placeholder__play-btn {\n display: inline-block;\n}\n\n.rplayer__inner--light .rmp-ext-placeholder {\n background-color: transparent;\n opacity: 1;\n cursor: pointer;\n}\n\n.rplayer__inner--light.rplayer__inner--hovering .rmp-ext-placeholder__play-btn {\n width: 78px;\n height: 78px;\n margin-top: -40px;\n margin-left: -40px;\n cursor: pointer;\n}\n\n.rplayer__inner--light.rplayer__inner--hovering .rmp-ext-placeholder__play-btn svg {\n top: 11px;\n left: 11px;\n cursor: pointer;\n}\n\n.rmp-ext-placeholder__play-btn {\n background-color: rgba(61,61,61,.75);\n border: 0 none;\n border-radius: 50%;\n position: absolute;\n width: 72px;\n height: 72px;\n left: 50%;\n top: 50%;\n margin-top: -36px;\n margin-left: -36px;\n display: none;\n outline: none;\n}\n\n.rmp-ext-placeholder__icon {\n position: absolute;\n width: 56px;\n height: 56px;\n left: 50%;\n top: 50%;\n margin-top: -28px;\n margin-left: -28px\n}\n\n.rmp-ext-placeholder__icon svg, .rmp-ext-placeholder__play-btn svg {\n position: absolute;\n width: 56px;\n height: 56px;\n fill: #222\n}\n\n.rmp-ext-placeholder__play-btn svg {\n fill: ${t.mainColor};\n position: absolute;\n top: 8px;\n left: 8px;\n}\n\n.rmp-ext-placeholder--animation .rmp-ext-placeholder__icon {\n animation: disappear-icon .75s ease 1\n}\n\n@keyframes disappear-icon {\n 0% {\n opacity: 1\n }\n\n to {\n transform: scale(2);\n opacity: 0\n }\n}\n\n@-webkit-keyframes disappear-icon {\n 0% {\n opacity: 1\n }\n\n to {\n transform: scale(2);\n opacity: 0\n }\n}\n\n.rmp-extensions .rmp-ext-play svg {\n display: none\n}\n\n.rmp-extensions .rmp-ext-play--paused .play,.rmp-extensions .rmp-ext-play--playing .pause, .rmp-extensions .rmp-ext-play--ended .replay {\n display: block\n}\n\n.rmp-ext-progress {\n flex-grow: 1;\n}\n\n.rmp-ext-progress__current {\n line-height: 32px;\n padding: 0 8px;\n user-select: none\n}\n\n.rmp-ext-progress__overlay {\n background-color: #fff;\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n opacity: .75\n}\n\n.rmp-ext-progress__bar {\n cursor: pointer;\n height: 4px;\n border-radius: 2px;\n position: absolute;\n top: 14px;\n left: 16px;\n right: 16px;\n display: block;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n transition: all 50ms linear\n}\n\n.rmp-ext-progress__generic-live-stream.rmp-ext-progress__bar {\n pointer-events: none;\n}\n.rmp-ext-progress__generic-live-stream .rmp-ext-progress__progress {\n width: 100% !important;\n background-color: #e62048;\n}\n.rmp-ext-progress__generic-live-stream .rmp-ext-progress__handle,\n.rmp-ext-progress__generic-live-stream .rmp-ext-progress__play-progress,\n.rmp-ext-progress__generic-live-stream.rmp-ext-progress > span:nth-child(2),\n.rmp-ext-progress__generic-live-stream.rmp-ext-progress > span:nth-child(3) {\n display: none;\n}\n\n.rmp-ext-progress__bar:hover {\n height: 8px;\n margin-top: -2px\n}\n\n.rmp-ext-progress__bar-padding {\n position: absolute;\n z-index: 5;\n bottom: -2px;\n left: 0;\n right: 0;\n display: block;\n height: 18px;\n cursor: pointer;\n}\n\n.rmp-ext-progress__duration {\n line-height: 32px;\n padding: 0 8px;\n user-select: none;\n position: relative\n}\n\n.rmp-ext-progress__handle {\n position: absolute;\n left: 0;\n width: 6px;\n height: 10px;\n top: -3px;\n margin-left: -3px;\n cursor: pointer;\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n z-index: 7;\n transform: translateZ(0);\n}\n\n@media only screen and (max-device-width: 768px) and (pointer:coarse) {\n .rmp-ext-progress__handle {\n width: 12px !important;\n height: 24px !important;\n top: -9px !important;\n margin-left: -6px !important;\n background-color: transparent;\n box-shadow: none;\n transform: translateZ(0);\n padding: 6px 5px;\n }\n\n .rmp-ext-progress__chapter-bubble {\n z-index: 5;\n }\n\n .rmp-ext-progress__handle:before {\n content: '';\n display: block;\n width: 6px;\n height: 10px;\n top: -3px;\n margin-left: -3px;\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n transform: translateZ(0);\n }\n\n .rmp-ext-progress__bar:hover .rmp-ext-progress__handle:before {\n height: 14px;\n }\n}\n\n.rmp-ext-progress__progress {\n left: 0;\n position: absolute;\n top: 0;\n bottom: 0;\n background: #fff;\n z-index: 2\n}\n\n.rmp-ext-progress__play-progress {\n left: 0;\n position: absolute;\n top: 0;\n bottom: 0;\n background: ${t.accentColor};\n z-index: 3\n}\n\n.rmp-ext-progress__bar:hover .rmp-ext-progress__handle {\n top: -4px;\n height: 16px\n}\n\n.rmp-ext-progress__tooltip {\n position: absolute;\n bottom: 80px;\n background-color: #333;\n padding: 4px 8px;\n font-size: 12px;\n border-radius: 4px;\n display: none;\n text-align: center;\n z-index: 5\n}\n\n.rmp-ext-progress__thumbmail:not(:empty) {\n margin-bottom: 7px\n}\n\n.rmp-ext-progress__thumbmail-time,.rmp-ext-volume {\n display: inline-block\n}\n\n.rmp-ext-volume__btn .muted,.rmp-ext-volume__btn--muted .unmuted {\n display: none\n}\n\n.rmp-ext-volume__btn--muted .muted {\n display: block\n}\n\n.rmp-ext-progress__tooltip--visible {\n display: flex !important;\n justify-content: center !important;\n flex-direction: column !important;\n align-items: center !important;\n}\n\n.rmp-ext-progress__chapter-bubble {\n position: absolute;\n display: block;\n width: 12px;\n height: 12px;\n top: 50%;\n margin-top: -6px;\n margin-left: -6px;\n z-index: 6\n}\n\n.rmp-ext-progress__chapter-bubble:before {\n content: '';\n position: absolute;\n display: block;\n position: absolute;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: ${t.chaptersBubbleColor};\n top: 50%;\n margin-top: -4px;\n margin-left: 2px;\n -webkit-box-shadow: 0 0 2px 0 rgba(251,251,251,.85);\n box-shadow: 0 0 2px 0 rgba(251,251,251,.85);\n}\n\n.rmp-ext-volume__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 33px;\n}\n\n.rmp-ext-volume__selector--open, .rmp-ext-volume__selector--active {\n display: block;\n}\n\n.rmp-ext-volume__slider {\n cursor: pointer;\n height: 100px;\n display: inline-block;\n width: 4px;\n margin: 6px 14px;\n position: relative;\n line-height: 32px\n}\n\n.rmp-ext-volume__handle,.rmp-ext-volume__overlay,.rmp-ext-volume__progress {\n position: absolute;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n border-radius: 2px\n}\n\n.rmp-ext-volume__handle {\n width: 12px;\n height: 8px;\n margin-top: -4px;\n cursor: pointer;\n z-index: 2;\n left: -4px;\n border: 1px solid #90A4AE;\n background-color: #fff\n}\n\n.rmp-ext-volume__overlay,.rmp-ext-volume__progress {\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${t.accentColor}\n}\n\n.rmp-ext-volume__overlay {\n display: block;\n top: 0;\n background-color: #fff;\n opacity: .75\n}\n\n.rmp-ext-theater--hidden {\n display: none;\n}\n\n.rmp-ext-fullscreen .exit-fullscreen-icon,.rmp-ext-fullscreen--exit .fullscreen-icon,\n.rmp-ext-theater--exit .rmp-ext-theater__icon,.rmp-ext-theater .rmp-ext-theater__exit-icon {\n display: none\n}\n\n.rmp-ext-fullscreen--exit .exit-fullscreen-icon, .rmp-ext-theater--exit .rmp-ext-theater__exit-icon {\n display: block\n}\n\n.rmp-ext-cc__text {\n position: absolute;\n bottom: 60px;\n left: 0;\n right: 0;\n text-align: center;\n display: none;\n pointer-events: none;\n color: ${t.mainColor};\n font-size: 18px;\n opacity: .85;\n z-index: 3;\n transition: bottom 250ms ease\n}\n\n.rmp-ext-crawl {\n position: absolute;\n bottom: 60px;\n left: 0;\n right: 0;\n pointer-events: none;\n z-index: 3;\n transition: bottom 250ms ease;\n background-color: #224367;\n color: #FFFFFF;\n padding: 5px 0;\n overflow: hidden;\n white-space: nowrap;\n}\n \n .rmp-ext-crawl__text {\n width: max-content;\n will-change: transform;\n }\n\n .rmp-ext-crawl__text * {\n color: inherit !important;\n }\n\n .rmp-ext-crawl > .rmp-ext-crawl__text, .rmp-ext-crawl > .rmp-ext-crawl__text > * {\n display: inline-block;\n margin: 0;\n padding: 0;\n }\n\n.rmp-ext-crawl--exist > .rmp-ext-cc__text {\n bottom: 100px;\n}\n\n.rplayer--iphone .rmp-ext-cc__text {\n transition: none;\n bottom: 100px;\n will-change: auto;\n}\n\n.rmp-extensions--hidden > .rmp-ext-cc__text {\n bottom: 10px\n}\n\n.rmp-extensions--hidden > .rmp-ext-crawl {\n bottom: 10px\n}\n\n.rmp-extensions--hidden.rmp-ext-crawl--exist > .rmp-ext-cc__text {\n bottom: 50px\n}\n\n.rmp-ext-cc__text--visible {\n display: block\n}\n\n.rmp-ext-cc__text-holder {\n background-color: #333;\n padding: 4px 8px;\n border-radius: 4px;\n display: inline-block;\n line-height: 1.2\n}\n\n.rplayer__inner--cc-below .rmp-ext-cc__text {\n position: static;\n margin-top: 5px;\n}\n\n.rmp-ext-cc__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n margin-left: -15px;\n background-color: ${t.submenuBgColor};\n overflow: hidden;\n width: 250px\n}\n\n.rmp-ext-cc__selector--open {\n display: block\n}\n\n.rmp-ext-cc__selector .rmp-ext-cc__item {\n padding-left: 18px;\n}\n\n.rmp-ext-cc__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-cc__item--checked:before,.rmp-ext-settings__item--checked:before,.rmp-ext-toc__lang-item--checked:before,.rmp-ext-audio-tracks__item--checked:before {\n position: absolute;\n content: '•';\n margin-left: -12px;\n font-size: 24px;\n margin-top: -1px\n}\n\n.rmp-ext-toc {\n width: 34px;\n padding: 0 2px\n}\n\n.rmp-ext-toc__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n overflow: hidden;\n background-color: ${t.submenuBgColor};\n width: 250px\n}\n\n.rmp-ext-toc__chapters > .rmp-ext-toc__item {\n width: 100%;\n height: auto;\n min-height: 32px;\n text-align: left;\n padding: 0 15px;\n}\n\n.rmp-ext-toc__chapters:empty {\n padding-top: 0;\n}\n\n\n.rmp-ext-toc__selector--open {\n display: block\n}\n\n.rmp-ext-toc__item,.rmp-ext-toc__selector a:hover {\n text-decoration: none;\n color: #000\n}\n\n.rmp-ext-toc__item {\n margin-bottom: 14px;\n display: block;\n color: ${t.submenuColor};\n padding: 8px 0\n}\n\n.rmp-ext-toc__item:hover {\n color: #333;\n text-decoration: underline\n}\n\n.rmp-ext-toc__item:last-child {\n margin-bottom: 0\n}\n\nbutton.rmp-ext-toc__more {\n text-align: left;\n width: 100%;\n line-height: 32px;\n padding-left: 12px;\n border-top: 1px solid #AAA;\n}\n\n.rmp-ext-toc__more .arrow {\n float: right;\n width: 20px;\n margin-top: 4px;\n}\n\n.rmp-ext-toc__more .arrow svg, button.rmp-ext-toc__back svg {\n fill: ${t.submenuColor}\n}\n\n.rmp-ext-toc__main-step:after, .rmp-ext-toc__languages-step:after {\n content: ' ';\n display: table;\n clear: both;\n}\n\n.rmp-ext-toc__main-step, .rmp-ext-toc__languages-step, .rmp-ext-toc__translate-step {\n display: none;\n position: absolute;\n left: 265px;\n bottom: 0;\n width: 100%;\n overflow: auto;\n}\n\n.rmp-ext-toc__selector--main-step .rmp-ext-toc__main-step,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__translate-step,\n.rmp-ext-toc__selector--languages-step .rmp-ext-toc__languages-step {\n display: block;\n position: relative;\n left: 0;\n width: 100%;\n}\n\n.rmp-ext-toc__selector--languages-step .rmp-ext-toc__main-step,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__main-step,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__languages-step {\n display: none;\n position: absolute;\n left: -265px;\n}\n\n.rmp-ext-toc__selector--languages-step .rmp-ext-toc__back,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__back {\n border-bottom: 1px solid #AAA;\n text-align: left;\n width: 100%;\n line-height: 32px;\n}\n\n.rmp-ext-toc__back span:first-of-type {\n float: left;\n padding: 3px 0;\n}\n\nbutton.rmp-ext-toc__lang-item {\n width: 100%;\n text-align: left;\n padding: 0 12px 0 20px;\n line-height: 32px;\n}\n\n\n.rmp-ext-toc__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n\n.rmp-ext-popover {\n position: absolute;\n bottom: 56px;\n background-color: #666;\n z-index: 9;\n padding: 4px 6px;\n border-radius: 4px;\n font-size: 12px;\n opacity: .875;\n display: none\n}\n\n.rmp-annotation:hover .rmp-annotation__button,.rmp-ext-popover--visible {\n display: block\n}\n\n.rmp-annotation {\n position: absolute;\n background-color: rgba(0,0,0,.8);\n padding: 4px 6px;\n color: #fff;\n border: 1px solid #888;\n display: none;\n z-index: 3\n}\n\n.rmp-annotation--visible {\n display: block\n}\n\n.rmp-annotation__button {\n position: absolute;\n top: -6px;\n right: -6px;\n background-color: #eee;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n border: 0 none;\n display: none;\n cursor: pointer\n}\n\n.rmp-annotation__button svg {\n fill: #666;\n position: absolute;\n top: 1px;\n left: 1px\n}\n\n.rmp-annotation__button:hover svg {\n fill: #333\n}\n\n.rmp-ext-poster, .rmp-ext-poster img {\n width: 100%\n}\n.rmp-ext-poster img {\n position: absolute;\n margin: auto;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100% !important;\n height: auto !important;\n}\n\n.rmp-ext-poster {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: black;\n}\n\n.rmp-ext-poster--hidden {\n display: none\n}\n\n.rmp-ext-settings {\n width: 34px;\n padding: 0 2px;\n}\n\n.rmp-ext-settings__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 260px;\n right: 5px;\n overflow: hidden;\n}\n\n.rmp-ext-settings__selector--open {\n display: block\n}\n\n.rmp-ext-settings__selector button {\n width: 100%;\n text-align: left;\n padding: 0 6px;\n line-height: 32px;\n}\n\n.rmp-ext-settings__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-download__more .arrow, .rmp-ext-settings__more .arrow {\n float: right;\n width: 20px;\n margin-top: 5px;\n}\n\n.rmp-ext-download__more .arrow svg, .rmp-ext-settings__more .arrow svg {\n fill: ${t.submenuColor}\n}\n\n.rmp-ext-settings__current-value, .rmp-ext-cc__current-value, .rmp-ext-toc__current-value {\n float: right;\n font-size: 11px;\n color: #757575\n}\n\n.rmp-ext-cc__settings--progress .rmp-ext-cc__current-value {\n font-style: italic;\n}\n\n.rmp-ext-cc__settings--progress {\n background-color: transparent !important;\n}\n\n\n.rmp-ext-cc__settings--progress > span {\n opacity: 0.5;\n}\n\n.rmp-ext-download__main-step, .rmp-ext-settings__main-step {\n width: 100%;\n left: 0;\n position: relative;\n}\n\n.rmp-ext-download__main-step:after, .rmp-ext-download__additional-step:after,\n.rmp-ext-settings__main-step:after, .rmp-ext-settings__additional-step:after, .rplayer--right-playlist:after {\n content: ' ';\n display: table;\n clear: both;\n}\n\n.rmp-ext-download__additional-step, .rmp-ext-settings__additional-step {\n display: none;\n position: absolute;\n left: 265px;\n bottom: 0;\n width: 100%;\n overflow: auto;\n}\n\n.rmp-ext-download__selector--additional .rmp-ext-download__additional-step,\n.rmp-ext-settings__selector--additional .rmp-ext-settings__additional-step {\n display: block;\n position: relative;\n left: 0;\n width: 100%;\n}\n\n.rmp-ext-download__selector--additional .rmp-ext-download__main-step,\n.rmp-ext-settings__selector--additional .rmp-ext-settings__main-step {\n display: none;\n position: absolute;\n left: -265px;\n}\n\nbutton.rmp-ext-download__back, button.rmp-ext-settings__back {\n border-bottom: 1px solid #AAA;\n}\n\nbutton.rmp-ext-download__back svg, button.rmp-ext-settings__back svg {\n fill: ${t.submenuColor};\n float: left;\n}\n\n.rmp-ext-download__back > span:first-of-type, .rmp-ext-settings__back > span:first-of-type {\n display: block;\n float: left;\n padding: 4px 0;\n}\n\nbutton.rmp-ext-settings__item {\n padding-left: 20px\n}\n\nbutton.rmp-ext-settings__item.rmp-ext-settings__item--checked:before {\n margin-top: -1px;\n}\n\n.rmp-ext-audio-tracks, .rmp-ext-search {\n width: 34px;\n padding: 0 2px;\n}\n\n.rmp-ext-search--hidden {\n display: none;\n}\n\n.rmp-ext-audio-tracks__selector, .rmp-ext-search__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 260px;\n right: 5px;\n overflow: auto;\n}\n\n.rmp-ext-audio-tracks__selector--open, .rmp-ext-search__selector--open {\n display: block\n}\n\n.rmp-ext-audio-tracks__selector button, .rmp-ext-search__selector button {\n width: 100%;\n text-align: left;\n padding: 0 6px 0 20px;\n line-height: 32px;\n}\n\n.rmp-ext-audio-tracks__selector button:hover, .rmp-ext-search__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-search__captions {\n overflow: auto;\n max-height: 160px;\n}\n\n.rmp-ext-search__input {\n width: 100%;\n margin-top: 2px;\n}\n\n.rplayer--mobile .rmp-ext-search__input {\n height: 40px;\n}\n\n.rmp-ext-search__item--current {\n font-weight: 600;\n}\n\n.rmp-ext-search__cc-text {\n font-family: Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif;\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block !important;\n white-space: nowrap;\n width: 156px;\n padding-left: 6px !important;\n vertical-align: middle;\n}\n\n.rmp-ext-search__cc-time {\n font-family: Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif;\n display: inline-block !important;\n width: 59px;\n padding-right: 5px;\n vertical-align: middle;\n overflow: hidden;\n margin-left: -5px;\n}\n\nbutton.rmp-ext-cc__more {\n text-align: left;\n width: 100%;\n line-height: 32px;\n padding-left: 20px;\n}\n\n.rmp-ext-cc__main-step button.rmp-ext-cc__more {\n border-top: 1px solid #AAA;\n}\n\n.rmp-ext-cc__more .arrow {\n float: right;\n width: 20px;\n margin-top: 4px;\n}\n\n.rmp-ext-cc__more .arrow svg, button.rmp-ext-cc__back svg {\n fill: ${t.submenuColor}\n}\n\n.rmp-ext-cc__main-step, .rmp-ext-cc__settings-step, .rmp-ext-cc__additional-step {\n position: relative;\n left: 0;\n width: 100%;\n overflow: auto;\n display: block;\n}\n\n.rmp-ext-cc__selector--settings-step .rmp-ext-cc__main-step, .rmp-ext-cc__selector--additional-step .rmp-ext-cc__main-step,\n.rmp-ext-cc__selector--additional-step .rmp-ext-cc__settings-step, .rmp-ext-cc__selector--translate-step .rmp-ext-cc__main-step {\n display: none;\n position: absolute;\n left: -255px;\n}\n\n.rmp-ext-cc__selector--main-step .rmp-ext-cc__settings-step, .rmp-ext-cc__selector--main-step .rmp-ext-cc__additional-step,\n.rmp-ext-cc__selector--settings-step .rmp-ext-cc__additional-step, .rmp-ext-cc__selector--translate-step .rmp-ext-cc__additional-step {\n display: none;\n position: absolute;\n left: 255px;\n}\n\n.rmp-ext-cc__selector--settings-step .rmp-ext-cc__translate-wrapper, .rmp-ext-cc__selector--translate-step .rmp-ext-cc__settings-wrapper {\n display: none;\n}\n\n.rmp-ext-cc__selector button {\n text-align: left;\n width: 100%;\n line-height: 32px;\n}\n\nbutton.rmp-ext-cc__back {\n border-bottom: 1px solid #AAA;\n}\n\n.rmp-ext-cc__back span:first-of-type {\n float: left;\n padding: 3px 0;\n}\n\n.rmp-ext-help__button {\n position: absolute;\n top: 8px;\n right: 10px;\n z-index: 6;\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.rmp-ext-help, .rmp-ext-help__canvas {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n}\n\n.rmp-ext-help__canvas, rmp-ext-help__canvas--visible .rmp-ext-help__button {\n display: none;\n}\n\n.rmp-ext-help__canvas--visible, .rmp-ext-help__canvas--visible .rmp-ext-help__canvas {\n display: block;\n z-index: 999;\n}\n\n.rmp-ext-title {\n width: 100%;\n top: 0;\n z-index: 2\n}\n\n.rmp-ext-title__title {\n font-size: 20px;\n padding: 12px 50px 0 12px;\n opacity: 0.95;\n display: block;\n\n max-height: 60px;\n overflow: hidden;\n\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n\n.rmp-ext-prev, .rmp-ext-next {\n display: none;\n position: absolute;\n top: 50%;\n margin-top: -34px;\n cursor: pointer;\n opacity: 0.75;\n z-index: 4;\n}\n\n.rplayer--fullscreen .rmp-ext-prev, .rplayer--fullscreen .rmp-ext-next {\n display: block;\n}\n\n.rmp-ext-prev:hover, .rmp-ext-next:hover {\n opacity: 1;\n}\n\n.rmp-ext-prev {\n transition: left 150ms ease\n}\n\n.rmp-ext-next {\n transition: right 150ms ease\n}\n\n.rmp-ext-prev, .rplayer__inner--light.rplayer__inner--hovering .rmp-ext-prev {\n left: -120px;\n}\n\n.rplayer__inner--light .rmp-ext-prev,\n.rmp-extensions--hidden > .rmp-ext-prev {\n left: -175px;\n}\n\n.rmp-ext-next, .rplayer__inner--light.rplayer__inner--hovering .rmp-ext-next {\n right: -120px;\n}\n\n.rplayer__inner--light .rmp-ext-next,\n.rmp-extensions--hidden > .rmp-ext-next {\n right: -175px;\n}\n\n@media only screen and (max-device-width: 768px){\n.rplayer__inner .rmp-ext-next:hover {\n right: -120px !important;\n}\n\n.rplayer__inner .rmp-ext-prev:hover {\n left: -120px !important;\n}\n}\n\n.rmp-ext-prev__button, .rmp-ext-next__button {\n background-color: #333;\n border: 0;\n height: 67.5px;\n cursor: pointer\n}\n\n.rmp-ext-prev__button {\n border-radius: 0 50% 50% 0;\n float: right;\n padding-left: 0;\n}\n\n.rmp-ext-next__button {\n border-radius: 50% 0 0 50%;\n float: left;\n padding-right: 0;\n}\n\n.rmp-ext-prev__thumbnail, .rmp-ext-next__thumbnail {\n width: 120px;\n height: 67.5px;\n border: 5px solid #333;\n}\n\n.rmp-ext-prev__button, .rmp-ext-prev__thumbnail {\n -webkit-box-shadow: -2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n box-shadow: -2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n}\n\n.rmp-ext-next__button, .rmp-ext-next__thumbnail {\n -webkit-box-shadow: 2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n box-shadow: 2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n}\n\n.rmp-ext-next:hover {\n right: 0 !important;\n}\n\n.rmp-ext-prev:hover {\n left: 0 !important;\n}\n\n.rmp-ext-prev__button svg, .rmp-ext-next__button svg {\n fill: ${t.mainColor};\n}\n\n.rmp-no-video {\n position: absolute;\n top: 50%;\n margin-top: -.5em;\n display: block;\n text-align: center;\n left: 0;\n right: 0;\n}\n\n.rmp-ext-buffering {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(51,51,51,.5);\n display: none;\n z-index: 9999;\n}\n\n.rmp-ext-buffering--processing {\n display: block;\n}\n\n.rmp-ext-buffering__message {\n padding: 20px;\n display: inline-block;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.rmp-ext-buffering__message svg {\n fill: #FFF;\n opacity: .75;\n width: 50px;\n height: 50px;\n animation: spin 1.5s linear infinite;\n animation-direction: reverse;\n}\n\n.rmp-ext-buffering--processing ~ .rmp-ext-placeholder {\n opacity: 0;\n}\n\n.rmp-ext-download__main-step {\n position: relative;\n left: 0;\n width: 100%;\n overflow: auto;\n\n -webkit-transition: left .25s ease;\n transition: left .25s ease;\n}\n\n.rmp-ext-download-hidden {\n position: absolute;\n opacity: 0;\n}\n\n.rmp-ext-download__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 200px;\n right: 5px;\n overflow: hidden;\n}\n\n.rmp-ext-download__selector--open {\n display: block\n}\n\n.rmp-ext-download__selector button {\n width: 100%;\n text-align: left;\n padding: 0 6px;\n line-height: 32px;\n}\n\n.rmp-ext-download__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-c2pa {\n display: none;\n position: absolute;\n right: 12px;\n top: 12px;\n transition: opacity .25s ease;\n}\n\n.rmp-ext-c2pa__items-wrapper {\n max-height: 250px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.rmp-ext-c2pa--visible { \n display: block !important;\n}\n\n.rmp-ext-c2pa--no-data > .rmp-ext-c2pa__button > svg {\n fill: #F7B100;\n}\n\n.rmp-ext-c2pa--invalid > .rmp-ext-c2pa__button > svg {\n fill: #E62048;\n}\n\n.rplayer__inner--playing .rmp-ext-c2pa {\n opacity: 0;\n}\n.rplayer__inner--hovering .rmp-ext-c2pa {\n opacity: 1 !important;\n}\n\n.rmp-ext-c2pa__selector.rmp-ext-c2pa__selector--open {\n display: block;\n}\n\n.rmp-ext-c2pa__selector {\n display: none;\n background-color: #FFFFFF;\n padding: 16px;\n position: absolute;\n min-width: 320px;\n max-width: 320px;\n z-index: 100;\n top: 0;\n right: 40px;\n border-radius: 8px;\n width: max-content;\n}\n\n.rmp-ext-c2pa button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n}\n\n.rmp-ext-c2pa > button > svg {\n width: 24px;\n height: 24px;\n display: block;\n fill: #fff;\n z-index: 100;\n position: relative;\n}\n\n.rmp-ext-c2pa__item {\n position: relative;\n min-height: 45px;\n}\n\n.rmp-ext-c2pa__item--collapsed::before {\n content: "";\n display: block;\n position: absolute;\n top: 5px;\n left: 0;\n width: 16px;\n height: 16px;\n background-color: #414141;\n border-radius: 50%;\n}\n\n.rmp-ext-c2pa__item--invalid .rmp-ext-c2pa__item--collapsed::before {\n background-color: #E62048;\n}\n\n.rmp-ext-c2pa__item--collapsed::after {\n content: "";\n display: block;\n position: absolute;\n top: 9px;\n left: 4px;\n width: 8px;\n height: 8px;\n background-color: #A9A9A9;\n border-radius: 50%;\n}\n\n.rmp-ext-c2pa__item:not(:last-of-type) .rmp-ext-c2pa__item--line {\n width: 2px;\n background-color: #414141;\n height: 100%;\n position: absolute;\n left: 7px;\n top: 21px;\n}\n\n.rmp-ext-c2pa__item--section-title {\n font-size: 12px;\n color: #767676;\n margin-left: 35px;\n margin-bottom: 5px;\n }\n\n .rmp-ext-c2pa__item--collapsed .rmp-ext-c2pa__item--section-title {\n margin-left: 0;\n }\n\n.rmp-ext-c2pa__item--wrapper {\n display: flex;\n align-items: start;\n margin-bottom: 12px;\n position: relative;\n}\n\n.rmp-ext-c2pa__item--toggler {\n padding: 0;\n position: absolute;\n top: -5px;\n right: 0px;\n transform: rotate(0deg);\n transition: transform .2s ease-in-out;\n}\n\n.rmp-ext-c2pa__item--toggler-opened {\n transform: rotate(-180deg);\n}\n\n.rmp-ext-c2pa__item--thumbnail {\n min-width: 30px;\n height: 25px;\n margin: 0 5px 0 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n border-radius: 2px;\n position: relative;\n}\n\n.rmp-ext-c2pa__item--thumbnail img {\n object-fit: cover;\n width: 100%;\n}\n\n.rmp-ext-c2pa__item--thumbnail svg {\n fill: #000000;\n width: 20px;\n opacity: 0.8;\n}\n\n.rmp-ext-c2pa__item--info-wrapper {\n line-height: 15px;\n width: 100%;\n}\n\n.rmp-ext-c2pa__item:not(:last-of-type) .rmp-ext-c2pa__item--info-wrapper {\n border-bottom: 1px solid #E5E5E5;\n padding-bottom: 12px;\n}\n\n.rmp-ext-c2pa__item--title {\n word-wrap: anywhere;\n font-size: 14px;\n font-weight: 500;\n max-width: 230px;\n padding-right: 20px;\n margin-bottom: 6px;\n}\n\n.rmp-ext-c2pa__item--status-message, .rmp-ext-c2pa__item--status-message-extended {\n font-size: 12px;\n color: #767676;\n}\n\n.rmp-ext-c2pa__item--status-message-extended {\n display: none;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item--status-message-extended {\n display: block;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item--status-message {\n display: none;\n}\n\n.rmp-ext-c2pa__view-more {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 40px;\n margin-top: 6px;\n padding: 5px;\n border-radius: 100px;\n background-color: #3665F3 !important;\n color: #FFFFFF !important;\n font-weight: 700;\n font-size: 14px;\n text-decoration: none;\n}\n\n.rmp-ext-c2pa__item-details {\n display: none;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-top: 15px;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details > div {\n display: flex;\n}\n\n.rmp-ext-c2pa__item--collapsed {\n padding-left: 20px;\n}\n\n.rmp-ext-c2pa__item--collapsed .rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details > div:nth-child(2) {\n flex-direction: column;\n margin-top: 16px;\n}\n\n.rmp-ext-c2pa__item--collapsed .rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details > div:nth-child(2) > .rmp-ext-c2pa__item--wrapper {\n margin: 5px 0px 0 -5px;\n}\n\n.rmp-ext-c2pa__item-details--icon {\n margin-top: 5px;\n}\n\n.rmp-ext-c2pa__item-details > svg {\n min-width: 32px;\n}\n\n.rmp-ext-c2pa__item-details--wrapper {\n margin-left: 10px;\n}\n\n.rmp-ext-c2pa__item-details--issuer {\n color: #767676;\n font-size: 12px;\n display: flex;\n}\n\n.rmp-ext-c2pa__item-details--issuer-title {\n font-weight: 700;\n min-width: 65px;\n margin-bottom: 4px;\n}\n\n.rmp-ext-c2pa__view-more svg {\n fill: #FFFFFF;\n margin-left: 5px;\n}\n\n.rmp-ext-progress__c2pa-status {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n}\n\n.rmp-ext-c2pa__items-status--wrapper {\n font-size: 12px;\n margin-bottom: 24px;\n color: #767676;\n display: flex;\n text-transform: uppercase;\n}\n\n.rmp-ext-c2pa__items-status {\n padding-left: 5px;\n}\n\n.rmp-ext-c2pa__items-status--success {\n color: #767676;\n}\n\n.rmp-ext-c2pa__items-status--no-data {\n color: #F7B100;\n}\n\n.rmp-ext-c2pa__items-status--invalid {\n color: #E62048;\n}\n\n.rmp-ext-c2pa__items-status--undefined {\n color: #E62048;\n}\n\n.rmp-ext-c2pa__no-data-message-wrapper {\n display: flex;\n align-items: center;\n margin-bottom: 24px;\n}\n\n.rmp-ext-c2pa__no-data-message-wrapper > svg {\n fill: #767676;\n}\n\n.rmp-ext-c2pa__no-data-message {\n max-width: 220px;\n margin-left: 12px;\n font-size: 12px;\n color: #767676;\n font-weight: 500;\n}\n\n.rmp-ext-progress__c2pa-status--invalid-segment {\n position: absolute;\n top: 0;\n bottom: 0;\n background-color: orange;\n z-index: 6;\n transform: scale(1);\n transition: all .1s ease-in-out;\n}\n\n.rmp-ext-bottom-next--hidden, .rmp-ext-bottom-prev--hidden {\n display: none;\n}\n\n.rmp-ext-search__selector > .rmp-ext-search__cc-clear {\n position: absolute;\n bottom: 3px;\n right: 5px;\n width: 15px;\n height: 15px;\n padding: 0;\n}\n\n.rmp-ext-search__selector > .rmp-ext-search__cc-clear:hover {\n background-color: transparent;\n opacity: 0.8;\n}\n\n.rmp-ext-search__selector > .rmp-ext-search__cc-clear svg {\n width: 15px;\n height: 15px;\n fill: #707070;\n}\n\n.rmp-ext-live {\n width: 34px;\n}\n\n.rmp-ext-live .broadcast-off {\n display: block;\n}\n\n.rmp-ext-live .broadcast-on {\n display: none;\n}\n\n.rmp-ext-live--live .broadcast-off {\n display: none;\n}\n\n.rmp-ext-live--live .broadcast-on {\n display: block;\n fill: #ff1111;\n}\n\n.rmp-ext-progress__hidden > span{\n visibility: hidden;\n}\n\n@media only screen and (max-width: 1224px) {\n .rmp-ext-progress__hidden > .rmp-ext-progress__current {\n visibility: visible !important;\n }\n}\n\n.rmp-ext-error {\n padding: 20px;\n text-align: center;\n z-index: 9999;\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: black;\n color: #FFFFFF;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n}\n\n.rmp-ext-error > svg {\n width: 50px;\n height: 50px;\n fill: #FFFFFF;\n margin-bottom: 20px;\n}\n \n.rmp-ext-error--hidden {\n display: none;\n}\n\n\n\n `}(t,e)+" "+function(t,e){const n=function(t,e){let n=`calc(100% - ${t.rplaylistHeight})`,i=t.rplaylistHeight;if(e){const t=e.right-e.left;n=.7*t+"px",i=.3*t+"px"}return`\n\n.rplayer--fullscreen .rplayer--right-playlist .rplayer__playlist-wrapper {\n max-height: calc(100vh - 44px);\n width: 0;\n}\n\n.rplayer--right-playlist .rplayer__playlist-wrapper {\n width: ${i};\n float: right;\n height: 100%;\n}\n\n.rplayer--right-playlist .rplayer__playlist {\n background-color: #424242;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n top: 78px;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.rplayer--right-playlist .rplayer__playlist-wrapper.rplayer__playlist-wrapper--wot-title .rplayer__playlist {\n top: 22px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-header {\n max-height: 56px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n\n.rplayer--right-playlist .rplayer__inner {\n width: ${n};\n float: left;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item {\n padding: 8px;\n height: 70px;\n border-top: 1px solid #000;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item-title {\n font-size: 13px;\n line-height: 1.4;\n height: 52px;\n display: block;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 3;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item-thumb {\n margin-right: 6px;\n width: 96px;\n height: 54px;\n float: left;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item--current .rplayer__playlist-item-thumb:before {\n font-size: 28px;\n line-height: 54px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-of {\n left: 8px;\n top: 58px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-wrapper.rplayer__playlist-wrapper--wot-title .rplayer__playlist-of {\n top: 5px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-left-btn, .rplayer--right-playlist .rplayer__playlist-right-btn {\n display: none !important;\n}\n\n `}(t,e),i=function(t,e){let n="calc(100% - 152px)";return e&&(n=e.bottom-e.top-152+"px"),`\n\n\n.rplayer--fullscreen .rplayer--bottom-playlist .rplayer__playlist-wrapper {\n height: 0;\n width: 0;\n}\n\n.rplayer--bottom-playlist .rplayer__inner {\n height: ${n};\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-wrapper {\n height: 152px\n}\n\n.rplayer--bottom-playlist .rplayer__playlist {\n margin-top: 6px;\n position: absolute;\n bottom: 0\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-header {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 30px;\n position: absolute;\n left: 0;\n right: 65px;\n top: 0;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-of {\n top: 12px;\n right: 8px;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-current-title {\n display: block;\n position: absolute;\n left: 8px;\n top: 40px;\n color: ${t.mainColor};\n font-size: 12px;\n right: 8px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item {\n margin-right: 10px;\n float: left\n}\n\n.rplayer__playlist-left-btn, .rplayer__playlist-right-btn {\n position: absolute;\n bottom: 1px;\n z-index: 10;\n background-color: rgba(0,0,0,.75);\n border: 0;\n cursor: pointer;\n height: 92px\n}\n\n.rplayer__playlist-left-btn svg, .rplayer__playlist-right-btn svg {\n fill: ${t.mainColor}\n}\n\n.rplayer__playlist-left-btn {\n left: 0;\n}\n\n.rplayer__playlist-right-btn {\n right: 0;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item-thumb {\n width: 160px;\n height: 90px;\n float: left;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item--current .rplayer__playlist-item-thumb:before {\n font-size: 36px;\n line-height: 90px;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item .rplayer__playlist-item-title {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n\n font-size: 11px;\n padding: 6px;\n line-height: 1.1;\n background-color: rgba(31,31,31,0.625);\n display: block;\n\n height: 32px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item--current .rplayer__playlist-item-title {\n display: none;\n}\n\n `}(t,e);return`\n\n.rplayer__playlist-wrapper {\n background-color: #000;\n}\n\n.rplayer__playlist {\n color: ${t.mainColor}\n}\n\n.rplayer__playlist-header {\n padding: 8px;\n margin: 0;\n font-size: 16px;\n line-height: 1.4;\n display: block;\n overflow: hidden;\n color: ${t.mainColor};\n font-weight: 400;\n}\n\n.rplayer__playlist-current-title {\n display: none;\n}\n\n.rplayer__playlist-item {\n position: relative;\n cursor: pointer;\n}\n\n.rplayer__playlist-item-thumb {\n position: relative;\n overflow: hidden;\n}\n\n.rplayer__playlist-of {\n position: absolute;\n font-size: 12px;\n color: ${t.mainColor};\n}\n\n.rplayer__playlist .rplayer__playlist-item:last-child {\n margin: 0 !important\n}\n\n.rplayer__playlist-item--current {\n cursor: inherit;\n background-color: #757575\n}\n\n.rplayer__playlist-item--current .rplayer__playlist-item-thumb:before {\n display: block;\n content: '►';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n text-align: center;\n z-index: 9;\n background-color: rgba(255,255,255,0.5);\n text-shadow: 0.125rem 0.125rem 0.5rem #333\n}\n\n.rplayer__playlist-item-thumb img {\n position: absolute;\n width: 100%\n}\n\n\n${n}\n\n${i}\n\n `}(t,e),i=document.head||R(document.getElementsByTagName("head")),s=C("style",{type:"text/css"});s.styleSheet?window.$?window.$('<style type="text/css">'+n+"</style>").appendTo("head"):s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n)),i.appendChild(s)}function Vs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const js="rplayer__playlist-wrapper",Us=`${js}--wot-title`,Ws="rplayer__playlist-item",qs=`${Ws}--current`;class Gs extends W{constructor(t,e){super(e.bus,e.logger),Vs(this,"$element",void 0),Vs(this,"$wrapper",void 0),Vs(this,"$of",void 0),Vs(this,"$currentTitle",void 0),Vs(this,"$header",void 0),Vs(this,"$left",void 0),Vs(this,"$right",void 0),Vs(this,"$items",[]),Vs(this,"_playlist",[]),Vs(this,"_current",null),Vs(this,"_header",""),Vs(this,"_label","videos"),Vs(this,"_point",void 0),Vs(this,"_mode",void 0),Vs(this,"_forceDowngrade",!1),Vs(this,"_isLoop",!1),this._playlist=t,this._mode=e.mode,this._header=e.title,this._label=e.label,this._point=e.forcePoint,this._isLoop=e.loop,this._onResize=this._onResize.bind(this),this._onFullScreenChanged=this._onFullScreenChanged.bind(this),this._gotoNextTrack=this._gotoNextTrack.bind(this),this._gotoPrevTrack=this._gotoPrevTrack.bind(this),e.bus.on("resizeplayer",this._onResize),e.bus.on("nexttrack",this._gotoNextTrack),e.bus.on("prevtrack",this._gotoPrevTrack),e.bus.on("fullscreenchanged",this._onFullScreenChanged),this.render(),this.addEvent(this.$left,"click",(()=>this.slideLeft(250))),this.addEvent(this.$right,"click",(()=>this.slideRight(250)))}isBottom(){return!!this._forceDowngrade||"bottom"===this._mode}_gotoNextTrack(){let t=O(this.$items,this._current),e=this.$items[++t];this._isLoop&&!e&&(e=this.$items[0]),Qs(e,"click")}_gotoPrevTrack(){let t=O(this.$items,this._current);const e=this.$items[--t];e&&Qs(e,"click")}render(){this.$wrapper=C("div",{class:`${js} ${this._header?"":Us}`}),this.$header=C("h3",{class:"rplayer__playlist-header",title:this._header},this.$wrapper),this.$header.textContent=this._header,this.$of=C("span",{class:"rplayer__playlist-of"},this.$wrapper),this.$currentTitle=C("span",{class:"rplayer__playlist-current-title"},this.$wrapper),this.$element=C("div",{class:"rplayer__playlist",tabindex:-1},this.$wrapper);this.$left=C("button",{type:"button",class:"rplayer__playlist-left-btn",style:"display: none;"},this.$wrapper),Me(this.$left,Te),this.$left.setAttribute("aria-label","Scroll left"),this.$right=C("button",{type:"button",class:"rplayer__playlist-right-btn"},this.$wrapper),Me(this.$right,Ee),this.$right.setAttribute("aria-label","Scroll right");let t=z(this._playlist);c(this._playlist,(e=>{const n=this._renderItem(e);e===t&&(this._changeSource(t),this._changeCurrent(n)),this.$items.push(n)}))}_changeSource(t){this.bus.emit("changesource",t),this.bus.emit("changeplaylistmode",this.isBottom()?"bottom":"right");const e=this._playlist.indexOf(t)+1;this.$of.textContent=`${e}/${this._playlist.length} ${this._label}`,this.$currentTitle.textContent=t.title,this.$currentTitle.setAttribute("title",t.title)}_changeCurrent(t){this._current&&L(this._current,qs),S(t,qs),this._current=t,this._stablePlaylist()}_stablePlaylist(){if(!this._current)return;const t=this._current.getBoundingClientRect();if(this.isBottom()){if(this.$left){let e=this.$left.getBoundingClientRect();e.right>t.left&&this.slideLeft(e.right-t.left)}if(this.$right){let e=this.$right.getBoundingClientRect();e.left<t.right&&this.slideRight(t.right-e.left)}}else{const e=this.$element.getBoundingClientRect();this.$element.scrollTop-=Math.max(0,e.top-t.top),this.$element.scrollTop+=Math.max(0,t.bottom-e.bottom)}}_renderItem(t){const e=C("div",{class:Ws,title:t.title,tabindex:0},this.$element),n=C("div",{class:"rplayer__playlist-item-thumb"},e);C("img",{src:t.poster},n),C("span",{class:"rplayer__playlist-item-title"},e).textContent=t.title,C("b",{},e);const i=()=>{E(e,qs)||(this._changeSource(t),this._changeCurrent(e))};return this.addEvent(e,"click",i),this.addEvent(e,"keydown",(t=>{32===t.keyCode&&(t.preventDefault(),i())})),e}_onResize(t){const{outerWidth:e}=t;this._forceDowngrade!==e<this._point&&(this._forceDowngrade=!this._forceDowngrade,this.bus.emit("changeplaylistmode",this.isBottom()?"bottom":"right"),this.$wrapper.style.height="",this.$element.style.width="",this.$element.style.marginLeft="",this._stablePlaylist()),this.isBottom()?this._resize4bottom(t):this._resize4right(t)}_resize4right({height:t}){if(this.$wrapper.style.height=`${t}px`,!this._current)return;const e=this._current.getBoundingClientRect(),n=this.$element.getBoundingClientRect();n.top>e.top?this.$element.scrollTop=this.$element.scrollTop-(n.top-e.top):n.bottom<e.bottom&&(this.$element.scrollTop=this.$element.scrollTop+e.bottom-n.bottom)}_resize4bottom({width:t}){c(this.$items,(t=>{t.style.width=""})),this.$element.style.width=`${t}px`,t=0,c(this.$items,(e=>{t+=e.offsetWidth;const n=e.currentStyle||window.getComputedStyle(e);t+=parseFloat(n.marginRight)})),this.$element.style.width=`${t}px`,this._stableBottomPosition()}_stableBottomPosition(){if(!this._current)return;const t=this._current.getBoundingClientRect(),e=this.$wrapper.getBoundingClientRect();e.left>t.left?(Qs(this.$left,"click"),setTimeout((()=>this._stableBottomPosition()))):e.right<t.right&&(Qs(this.$right,"click"),setTimeout((()=>this._stableBottomPosition())))}_onFullScreenChanged(t){this.$element.style.display=t?"none":"block"}slideLeft(t){let e=parseInt(this.$element.style.marginLeft,10)||0;e=Math.min(0,e+t),this.$element.style.marginLeft=`${e}px`,this.$right.style.display="block",e||(this.$left.style.display="none")}slideRight(t){const e=this.$element.parentNode;if(!(e instanceof HTMLElement))return;let n=parseInt(this.$element.style.marginLeft,10)||0;n-=t;const i=e.offsetWidth-this.$element.offsetWidth;n=Math.max(i,n),this.$element.style.marginLeft=`${n}px`,this.$left.style.display="block",n===i&&(this.$right.style.display="none")}getElement(){return this.$wrapper}destroy(){super.destroy(),this.bus.off("resizeplayer",this._onResize),this.bus.off("nexttrack",this._gotoNextTrack),this.bus.off("prevtrack",this._gotoPrevTrack),this.bus.off("fullscreenchanged",this._onFullScreenChanged),this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element),this.$items.length=0,this._playlist.length=0,this._current=null}}function Qs(t,e){var n;document.createEvent?(n=document.createEvent("HTMLEvents")).initEvent(e,!0,!0):(n=document.createEventObject()).eventType=e,n.eventName=e,t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n)}class Ys{constructor(){var t,e;e={},(t="_events")in this?Object.defineProperty(this,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):this[t]=e}on(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)}off(t,e){this._events=this._events||{},t in this._events!=0&&H(this._events[t],e)}once(t,e){const n=(...i)=>{this._call(e,i),this.off(t,n)};this.on(t,n)}emit(t,...e){if("*"!==t&&this.emit.apply(this,["*",t].concat(e)),this._events=this._events||{},t in this._events!=0)for(var n=this._events[t].length-1;n>=0;n--)this._call(this._events[t][n],e)}destroy(){this._events={}}_call(t,e){if(t._safe_inner)t.apply(this,e);else try{t.apply(this,e)}catch(t){console.error(t)}}}const Zs=window.navigator,Ks={plugins:[],hasPluginVersion:(t,e)=>{const n=Ks.plugins[t];return e[1]=e[1]||0,e[2]=e[2]||0,n[0]>e[0]||n[0]===e[0]&&n[1]>e[1]||n[0]===e[0]&&n[1]===e[1]&&n[2]>=e[2]},addPlugin:(t,e,n,i,s)=>{Ks.plugins[t]=Ks.detectPlugin(e,n,i,s)},detectPlugin:(t,e,n,i)=>{let s,o,r=[0,0,0];if(null!==Zs.plugins&&void 0!==Zs.plugins&&"object"==typeof Zs.plugins[t]){if(s=Zs.plugins[t].description,s&&(void 0===Zs.mimeTypes||!Zs.mimeTypes[e]||Zs.mimeTypes[e].enabledPlugin)){r=s.replace(t,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(let t=0,e=r.length;t<e;t++)r[t]=parseInt(r[t].match(/\d+/),10)}}else if(void 0!==window.ActiveXObject)try{o=new ActiveXObject(n),o&&(r=i(o))}catch(t){console.log(t)}return r}};Ks.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",(t=>{let e=[],n=t.GetVariable("$version");return n&&(n=n.split(" ")[1].split(","),e=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),e}));const Xs=Ks.hasPluginVersion("flash",[10,0,0]);function Js(t){return window.console?function(...e){t in console&&o(console[t])&&(e.unshift((new Date).toString()),console[t].apply(console,e))}:u}function to(t=2){let e=1;const n={};return n.debug=++e>t?Js("debug"):u,n.log=++e>t?Js("log"):u,n.warn=++e>t?Js("warn"):u,n.error=++e>t?Js("error"):u,n}function eo(){const t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")&&parseInt(t.split("msie")[1],10)}function no(){return 8===eo()}const io={annotations:null,chapters:null,cc:null,preview:null,poster:null,title:"",nextTrackTitle:"",nextTrackThumbnails:"",clip:null,isAudio:!1},so=["audio/mp3","audio/mpeg","audio/mp4"];function oo(t,e){const n={showAnnotations:!b((e=D({},io,t,e)).showAnnotations)||e.showAnnotations,showQuality:!b(e.showQuality)||e.showQuality,showPlaceholder:!b(e.showPlaceholder)||e.showPlaceholder};var i;return n.showPoster=e.showPoster&&b(e.poster),e.showHelp&&(n.showHelp=function(){const t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))}()),i=e.type,(a(so,i)||e.isAudio)&&(n.showFullScreen=!1,n.showClosedCaptions=!1,n.showTOC=!1,n.showAnnotations=!1,n.showQuality=!1,n.isAudio=!0),Mt()&&(n.showVolume=!1,n.showQuality=!1,n.showHelp=!1,n.preview=null,n.showTitle=!1,n.showCCLayout=!1,n.isMobile=!0,n.extensionsVisibilityTimeout=4e3),Lt()&&(n.showPlaybackRate=!1),no()&&(n.showCCLayout=!1,n.useMux=!1),!e.startTime&&Z()&&(n.startTime=.5),_(e.annotations)&&(n.showAnnotations=!1),e.startTime&&!n.isAudio&&(n.showPoster=!1),"Flash"===yt(e)&&(n.showPlaybackRate=!1),e.showAnnotations&&(n.showAnnotations=b(e.annotations)&&f(e.annotations)),!1===n.showAnnotations&&!1===n.showPlaybackRate&&!1===n.showQuality&&(n.showSettings=!1,e.showSettings=!1),n.showDownloadCC=e.showDownloadCC&&b(e.cc)&&f(e.cc),e.showDownloadVideo&&(n.showDownloadVideo=!!navigator.userAgent.match(/(Windows NT 10)/i)&&b(e.downloadURL)&&f(e.downloadURL)),n.showDownload=e.showDownload&&(n.showDownloadVideo||n.showDownloadCC||!!e.downloadVideoURL),n.showCaptionSearch=e.showCaptionSearch&&b(e.cc)&&f(e.cc),e.showExtensions||(n.showPlay=!1,n.showProgress=!1,n.showVolume=!1,n.showFullScreen=!1,n.showClosedCaptions=!1,n.showTOC=!1,n.showAnnotations=!1,n.showQuality=!1,n.showPoster=!1,n.showPlaceholder=!1,n.showPlaybackRate=!1,n.showForward=!1,n.showBackward=!1,n.showSettings=!1,n.showDownload=!1,n.showHelp=!1,n.showTitle=!1,n.showNext=!1),D(e,n)}const ro="bottom",ao="right",lo="auto",ho=[lo,ro,ao],co={loggerLevel:2,timecode:0,frameRate:23.976,autoStart:!1,startTime:null,endTime:null,useNativeControls:!1,useOriginTimeForPreview:!0,playlistmode:lo,plalistAutoGoNext:!0,playlistitle:"",playlistforcepoint:0,showExtensions:!0,alwaysShowExtensions:!1,extensionsVisibilityTimeout:2e3,showPlay:!0,showProgress:!0,showVolume:!0,showFullScreen:!0,showClosedCaptions:!0,showTOC:!0,showAnnotations:!0,showQuality:!0,showAudioTracks:!1,showPoster:!0,showError:!1,showPlaceholder:!0,showPlaybackRate:!0,showForward:!0,showBackward:!0,showSettings:!0,showDownload:!0,showDownloadVideo:!0,showDownloadCC:!1,showBottomNext:!1,showBottomPrev:!1,showCaptionSearch:!1,showCrawl:!1,crawl:{},downloadVideoURL:null,showHelp:!0,showTitle:!0,showNext:!1,showNextFrame:!1,showPrevFrame:!1,showCCLayout:!0,showTheaterMode:!1,useMux:!1,showSubtitles:!1,skipDelta:10,keyboardListeners:{},globalKeyboardListeners:!1,isHandlingKeyboardEvents:!0,bufferingTimeout:200,hls:{maxFragLookUpTolerance:.001,maxMaxBufferLength:60},shaka:{},mux:{env_key:"",page_type:"watchpage",viewer_user_id:"",experiment_name:"",sub_property_id:"",player_name:"RavnurPlayer",player_version:"3.3.3",player_init_time:"",video_id:"",video_title:"",video_series:"",video_producer:"",video_content_type:"",video_language_code:"",video_variant_name:"",video_variant_id:"",video_duration:"",video_stream_type:"on-demand",video_encoding_variant:"",video_cdn:""},i18n:null,hlsjsURL:"https://cdn.jsdelivr.net/npm/hls.js@1.4.0/dist/hls.min.js",shakaURL:"https://cdn.jsdelivr.net/npm/shaka-player@4.9.11/dist/shaka-player.compiled.min.js",flashPath:"/",muxURL:"https://src.litix.io/core/4/mux.js",disableAutoUrlRewrite:!1,useHTMLPlayer:!1,useHLSJSPlayer:!1},po={accentColor:"#81d4fa",mainColor:"#fff",submenuBgColor:"#eee",submenuColor:"#333",chaptersBubbleColor:"#1565C0",pltHeight:"135px",rplaylistHeight:"30%"};function uo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const go="rplayer--fullscreen",mo="rplayer__inner",bo=`${mo}--playing`,yo=`${mo}--active`,_o=`${mo}--hovering`,xo=`${mo}--light`,fo=`${mo}--cc-below`,$o=`${mo}--accessibility`,vo="rmp-extensions--hidden",wo="last-play-time";let Co,ko=!1,To=!1,Eo=0;const So={[ro]:"rplayer--bottom-playlist",[ao]:"rplayer--right-playlist"};class Lo extends W{constructor(t,e={},n=to()){super(new Ys,n),uo(this,"controller",null),uo(this,"extensions",[]),uo(this,"state",void 0),uo(this,"_playlist",[]),uo(this,"originOptions",null),uo(this,"options",null),uo(this,"activeSourceId",void 0),uo(this,"$el",void 0),uo(this,"$inner",void 0),uo(this,"$extensionsWrapper",null),uo(this,"playlistController",null),uo(this,"_timerId",null),uo(this,"_isOpenPopup",!1),uo(this,"_clipStopInterval",null),uo(this,"_isPlaylist",!1),ko||(Is(e=D({},po,e),no()?t.getBoundingClientRect():null),ko=!0);const i=t;this.$el=C("div",{class:"rplayer"},i),M(this.$el,"rplayer--iphone",Z()),M(this.$el,"rplayer--mobile",Mt()),this.$inner=C("div",{class:mo},this.$el),nn(this,["onStateChanged","onFullScreenChanged","disappearExtensions","appearExtensions","_renderPlayer","onPlay","onPause","onMouseMove","onClick","_disappearExtensionsDelayed","_appearExtensionsImmediately","onOpenPopup","onClosePopup","onPlayClicked","onChangePlaylistMode","onMouseEnter","onMouseLeave","onKeydown","onMobileTouch","_heartbeatExtension","_handleQualityChange","onTimeUpdate","_handleLastPlayTime"]),this.bus.on("statechanged",this.onStateChanged),this.bus.on("pause",this.onPause),this.bus.on("timeupdate",this.onTimeUpdate),this.bus.on("ended",this.onPause),this.bus.on("play",this.onPlay),this.bus.on("changesource",this._renderPlayer),this.bus.on("showpopup",this.onOpenPopup),this.bus.on("hidepopup",this.onClosePopup),this.bus.on("handle-play-clicked",this.onPlayClicked),this.bus.on("changeplaylistmode",this.onChangePlaylistMode),this.bus.on("heartbeatextensions",this._heartbeatExtension),this.bus.on("manualquality",this._handleQualityChange),this.state=new It(this.bus,n),Mt()?this.bus.on("mobiletouch",this.onMobileTouch):(this.addEvent(this.$el,"mouseleave",this.onMouseLeave),this.addEvent(this.$el,"mouseenter",this.onMouseEnter),this.addEvent(this.$el,"mousemove",this.onMouseMove),this.addEvent(this.$el,"keydown",this.onKeydown),this.addEvent(this.$el,"click",this.onClick)),ft.enabled&&(this.$el.addEventListener("webkitfullscreenchange",this.onFullScreenChanged),this.$el.addEventListener("fullscreenchange",this.onFullScreenChanged),document.addEventListener("mozfullscreenchange",this.onFullScreenChanged),document.addEventListener("MSFullscreenChange",this.onFullScreenChanged))}onMouseLeave(){L(this.$inner,_o),this.disappearExtensions()}onMouseEnter(){S(this.$inner,_o),this.appearExtensions()}onKeydown(t){To&&(clearInterval(Co),Eo=0,9===t.keyCode&&this.appearExtensions(),Co=setInterval((()=>{Eo++,Eo>5&&(Eo=0,this.disappearExtensions(),clearInterval(Co))}),1e3))}onPlay(){S(this.$inner,bo),this.onMouseMove()}onPause(){this.options.playLoop||(L(this.$inner,bo),this.appearExtensions())}onPlayClicked(){L(this.$inner,xo)}onTimeUpdate(){const{activeSourceId:t,controller:e}=this,{savePlayTime:n}=this.originOptions,i=e.getDuration()<=15;let s=e.getCurrentTime();if(s<5||i)return;if(!n||!t)return;let o=wt(wo)||"{}";if(o=JSON.parse(o),!o.expires){let t=new Date;o.expires=(new Date).setMonth(t.getMonth()+1)}(new Date).getTime()>o.expires&&(o={},o.expires=(new Date).setMonth((new Date).getMonth()+1));const r=e.getDuration()-10;s=s<=r?s:r,o[t]=s,vt(wo,JSON.stringify(o))}isShownExtensions(){const{$extensionsWrapper:t}=this;if(!t)return!1;let e=!E(this.$inner,vo);return e=e||E(this.$inner,xo),e}onMobileTouch(){const{controller:t}=this;t&&this.isShownExtensions()&&(t.isPaused()?t.play():t.pause()),this._heartbeatExtension()}onMouseMove(){this._heartbeatExtension()}onClick(){this._heartbeatExtension()}_heartbeatExtension(){this._appearExtensionsImmediately(),this._isOpenPopup||this._disappearExtensionsDelayed()}onOpenPopup(){this._isOpenPopup=!0,S(this.$inner,yo),this._appearExtensionsImmediately()}onClosePopup(){this._isOpenPopup=!1,L(this.$inner,yo),this._disappearExtensionsDelayed()}_appearExtensionsImmediately(){this.appearExtensions(),this._timerId&&clearTimeout(this._timerId)}_disappearExtensionsDelayed(){const{originOptions:t}=this;t&&!t.alwaysShowExtensions&&(this._timerId=setTimeout(this.disappearExtensions,t.extensionsVisibilityTimeout))}_getParentElementForController(){const{controller:t}=this;if(!t)return null;const e=t.getElement();if(!e)return null;const n=e.parentNode;return n&&n instanceof HTMLElement?n:null}changeFullScreenMode(){if(!this._getParentElementForController()&&!Z())return;const t=this.state.isFullScreen();if(this.$inner.style.width="",this.$inner.style.height="",ft.enabled)t?ft.request(this.$el):ft.exit();else if(Z()&&this.controller)this.controller.getElement().webkitEnterFullscreen(),this.bus.emit("fullscreenchanging",!1);else{const n=this.$el.parentNode;if(!(n&&n instanceof HTMLElement))return;t?(S(n,go),function(t){const e=function(){const t=document.documentElement;return t?t.clientWidth:null}(),n=function(){const t=document.documentElement;return t?t.clientHeight:null}();"number"==typeof e&&"number"==typeof n&&function(t,e,n){t.style.width=`${e}px`,t.style.height=`${n}px`}(t,e,n)}(n)):(L(n,go),(e=n).style.width="",e.style.height=""),this.bus.emit("fullscreenchanged",t)}var e}onStateChanged(t,e){if(t.isFullScreen!==e.isFullScreen&&this.changeFullScreenMode(),t.cc.fontSize!==e.cc.fontSize||t.cc.location!==e.cc.location||t.cc.lang!==e.cc.lang){const e=t.cc.lang;e&&this.changeLayout(e,t.cc.fontSize,t.cc.location)}}onFullScreenChanged(){const t=ft.isFullscreen;this.bus.emit("fullscreenchanging",t);const e=this.$el.parentNode;e&&e instanceof HTMLElement&&M(e,go,ft.isFullscreen)}changeLayout(t,e,n){const i=t&&"below"===n;M(this.$inner,fo,i),M(this.$el,"rplayer--cc-75-below",i&&"75%"===e),M(this.$el,"rplayer--cc-100-below",i&&"100%"===e),M(this.$el,"rplayer--cc-125-below",i&&"125%"===e),M(this.$el,"rplayer--cc-150-below",i&&"150%"===e),M(this.$el,"rplayer--cc-200-below",i&&"200%"===e)}_detectPlaylistMode(){const{originOptions:t}=this;if(!t)return"auto";let e=t.playlistmode;return e=a(ho,e)?e:z(ho),e===lo&&(e=Mt()?ro:ao),e}setup(t,e={}){const n=b(e.loggerLevel)?e.loggerLevel:co.loggerLevel,s=e.logger||to(n),o=D({bus:this.bus,logger:e.logger||s},co,e);if(To=e.accessibility,To&&S(this.$inner,$o),this.originOptions=o,this._isPlaylist=i(t),this._playlist=[].concat(t),!this._playlist.length)return void setTimeout((()=>{const t=this.$el.parentNode;t&&t instanceof HTMLElement&&(t.style.position="relative",t.style.border="1px solid grey"),this.destroy(),C("i",{class:"rmp-no-video"},t).textContent=Qt(o.i18n,"no-video")}),5);if(this._isPlaylist){const t=this._detectPlaylistMode();this.onChangePlaylistMode(t);const e=Qt(o.i18n,"playlist-count-of"),n=o.playlistitle,i=o.playlistforcepoint,r=o.playLoop,a={mode:t,bus:this.bus,title:n,label:e,forcePoint:i,logger:s,loop:r};this.playlistController=new Gs(this._playlist,a),o.hideplaylist||w(this.$el,this.playlistController.getElement()),o.plalistAutoGoNext&&this.bus.on("ended",(()=>{this.bus.emit("nexttrack"),this._playOnLoad()}))}this._isPlaylist&&!this.originOptions.hideplaylist||this.bus.emit("changesource",z(this._playlist)),this.bus.on("*",(t=>o.logger.debug(t)));const r=this.state,a=r.getCCLang()&&r.getCCLocation()||"over";this._afterSetup(),setTimeout((()=>{this.bus.emit("cclayoutchange",{mode:a,fontSize:r.getCCFontSize()})}))}onChangePlaylistMode(t){this.originOptions.hideplaylist||c(So,((e,n)=>M(this.$el,e,n===t)))}_runOnce(t){this.bus.once("canplaythrough",(()=>setTimeout(t))),this.bus.once("loadedmetadata",(()=>setTimeout(t)))}_playOnLoad(){this._runOnce((()=>{const{controller:t}=this;t&&t.play()}))}_afterSetup(){const{controller:t,originOptions:e}=this;if(!t||!e)return;const{autoStart:n,startTime:i,endTime:s}=e;n&&this._playOnLoad(),(i||s)&&this.playPart(i,s,!0)}_handleLastPlayTime(){const{savePlayTime:t,startTime:e}=this.originOptions,{activeSourceId:n}=this;if(e||!t||!n)return;let i=wt(wo);if(!i)return;i=JSON.parse(i);const s=i[n];s&&this.playPart(s,void 0,!0)}playPart(t,e,n=!1){const{controller:i}=this;if(i){if("number"==typeof t)if(n){const e=t;this._runOnce((()=>i.setCurrentTime(e)))}else i.setCurrentTime(t);if("number"==typeof e){const t=()=>{const n=i.getCurrentTime();"number"==typeof n&&"number"==typeof e&&n>e&&(i.pause(),this.bus.off("timeupdate",t))};this.bus.on("timeupdate",t)}n||i.play()}}_renderPlayer(t){if(!t.src)throw new Error("Incorrent load's options.");this.activeSourceId=t.id;const e=this.state.getCCLang();e&&this.changeLayout(e,this.state.getCCFontSize(),this.state.getCCLocation());let n={};if(this._isPlaylist&&!this.originOptions.hideplaylist){const e=O(this._playlist,t),i=this._playlist[e+1]||null,s=this._playlist[e-1]||null;n={showNext:b(i),nextTrackThumbnails:I(i,"poster",""),nextTrackTitle:I(i,"title",""),showPrev:b(s),prevTrackThumbnails:I(s,"poster",""),prevTrackTitle:I(s,"title","")}}const i=oo(this.originOptions||{},D({},t,n));if(this.options=i,this.controller&&this.controller.destroy(),this.destroyExtensions(),s=i.type,a(mt,s)&&!Lo.canPlayHLS){const t=this.$el.parentNode;t&&t instanceof HTMLElement&&(t.style.position="relative",t.style.border="1px solid grey"),this.destroy();const e=C("i",{class:"rmp-no-video"},t);return void(this.originOptions&&(e.textContent=Qt(this.originOptions.i18n||{},"no-flash")))}var s;this._beforeRender(i);const o=function(t,e){const n=yt(t);return new(0,bt[n])(t,e)}(i,this.state);if(this.controller=o,w(this.$inner,o.$el),o.load(i),this._handleLastPlayTime(),i.useNativeControls)return;L(this.$inner,bo),S(this.$inner,xo),i.showCrawl&&S(this.$inner,"rmp-ext-crawl--exist");const r=C("div",{class:"rmp-extensions"},this.$inner);this.$extensionsWrapper=r,c(function(t,e,n){const i=[];return c(Ds,(([s,o])=>{(!0===s||"string"==typeof s&&!0===n[s])&&i.push(new o(t,e,n))})),i}(o,this.state,i),(t=>{try{const e=t.getElement();e&&(w(r,e),t.addEvent(e,"dblclick",Mo));const n=t.getOuter();n&&w(this.$inner,n,r),this.extensions.push(t)}catch(t){i.logger.error(t)}}))}_beforeRender({clip:t,timecode:e}){if(this._clipStopInterval&&clearInterval(this._clipStopInterval),t){const[n,i]=t;n&&this._runOnce((()=>{this.controller&&this.controller.setCurrentTime(n)})),i&&(this._clipStopInterval=setInterval((()=>{const t=this.controller;t&&!t.isPaused()&&t.getCurrentTime()>i+e&&(t.pause(),setTimeout((()=>this.bus.emit("ended"))))}),26))}}_handleQualityChange(t){this.originOptions&&(this.originOptions.qualityLevel=t)}refreshCrawlExtension(t,e=!0){if(this.originOptions.logger.debug("crawl:extensions:refreshing"),!t)throw new Error("Crawl options not found");const n=this.extensions.find((t=>"$crawl"in t));if(!n){this.originOptions.logger.debug("crawl:extensions:creating");const e=D({},this.originOptions,{crawl:t}),n=new Fs(this.controller,this.state,e),i=n.getOuter();return i&&w(this.$inner,i,this.$extensionsWrapper),void this.extensions.push(n)}this.logger.debug("crawl:extensions:refreshing"),n.refresh(t,e)}destroyExtensions(){c(this.extensions,(t=>t.destroy())),this.extensions.length=0;const{$extensionsWrapper:t}=this;if(t&&n(t)){const e=t.parentNode;e&&e.removeChild(t)}}disappearExtensions(){const{originOptions:t,$inner:e}=this;if(!t||!e)return;const n=t.alwaysShowExtensions;this.controller&&(n||this._isOpenPopup||this.controller.isPaused())||S(e,vo)}appearExtensions(){L(this.$inner,vo)}on(t,e){this.bus.on(t,e)}off(t,e){this.bus.off(t,e)}destroy(){super.destroy(),this.bus.destroy(),this._clipStopInterval&&clearInterval(this._clipStopInterval),this.destroyExtensions();const{controller:t}=this;t&&(t.pause(),t.destroy()),this.controller=null,ft.enabled&&(this.$el.removeEventListener("webkitfullscreenchange",this.onFullScreenChanged),this.$el.removeEventListener("fullscreenchange",this.onFullScreenChanged),document.removeEventListener("mozfullscreenchange",this.onFullScreenChanged),document.removeEventListener("MSFullscreenChange",this.onFullScreenChanged)),this.playlistController&&this.playlistController.destroy();const e=this.$el.parentNode;this.$el.removeChild(this.$inner),e&&e.removeChild(this.$el)}static addStyles(t){Is(D({},po,t))}}function Mo(t){t.stopPropagation()}uo(Lo,"canPlayHLS",!(eo()||window.MSInputMethodContext&&document.documentMode)||Xs),exports.RavnurMediaPlayer=e.default})();
1
+ (()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var e={};function n(t){try{return t instanceof Element}catch(e){return!!t.nodeName}}function i(t){return Array.isArray(t)}function s(t){return t&&"object"==typeof t&&!1===i(t)}function o(t){return"function"==typeof t}function r(t){return"string"==typeof t}function a(t,e){return r(t)&&r(e)?(n=e,t.indexOf(n)>-1):function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(t,o(e)?e:t=>t===e);var n}t.d(e,{default:()=>Lo});const l=Object.prototype.hasOwnProperty;function h(t,e){return l.call(t,e)}function c(t,e){t instanceof Array?function(t,e){for(let n=0;n<t.length;n++)e(t[n],n,t)}(t,e):function(t,e){for(const n in t)h(t,n)&&e(t[n],n,t)}(t,e)}function p(t,e,n=null){return c(t,((t,i,s)=>{n=e(n,t,i,s)})),n}function d(t,e){return t===e||(i(t)&&i(e)?t.length===e.length&&p(t,((t,n)=>t&&a(e,n)),!0):!(!s(t)||!s(e))&&(!!d(Object.keys(t),Object.keys(e))&&p(t,((t,n,i)=>t&&d(n,e[i])),!0)))}function u(){}const g=Number.MAX_VALUE;function m(t,e=0,n=g){return t>=e&&t<n}function b(t){return null!=t}function y(t){return e=>!t(e)}const x=y(b);function _(t){return x(t)||t instanceof Array&&!t.length||"string"==typeof t&&!t.length}const f=y(_);function $(t){var e=document.createElement("div");e.innerHTML='<a href="'+t.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")+'">x</a>';const n=e.firstChild;return n&&n instanceof HTMLLinkElement?n.href:t}function v(){return"rav_id_xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function w(t,e,i){t&&(b(i)&&n(i)?t.insertBefore(e,i):t.appendChild(e))}function C(t,e={},i=null,s="http://www.w3.org/1999/xhtml"){let o;return o=b(document.createElementNS)?document.createElementNS(s,t):document.createElement(t),c(e,((t,e)=>{o.setAttribute(e,t)})),b(i)&&n(i)&&w(i,o),o}function k(t,e,n,i=!1){return t.addEventListener?(t.addEventListener(e,s,i),{elem:t,handler:s,event:e}):(t.attachEvent("on"+e,o),{elem:t,handler:o,event:e});function s(e){var i=n.apply(t,arguments);return!1===i&&(e.stopPropagation(),e.preventDefault()),i}function o(){var e=n.call(t,window.event);return!1===e&&(window.event.returnValue=!1,window.event.cancelBubble=!0),e}}function T(t){t.elem.removeEventListener?t.elem.removeEventListener(t.event,t.handler):t.elem.detachEvent("on"+t.event,t.handler)}function E(t,e){return!!t&&!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function S(t,e){E(t,e)||(t.className+=" "+e)}function L(t,e){if(E(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}}function M(t,e,n){x(n)&&(n=!E(t,e)),n?S(t,e):L(t,e)}function P(t,e=f){const n=[];return c(t,(t=>{e(t)&&n.push(t)})),n}function A(t,e){for(let n=0;n<t.length;n++){const i=t[n];if(e(i))return i}return null}function F(t,e){const n=[];return c(t,((t,i,s)=>n.push(e(t,i,s)))),n}function z(t){return t[0]}function N(t){return t[t.length-1]}function R(t){return t[0]}function O(t,e){const n=o(e)?e:t=>t===e;for(let e=0;e<t.length;e++)if(n(t[e]))return e;return-1}function H(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function B(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e}function D(t,...e){return c(e,(e=>{x(e)||c(e,((e,n)=>{t[n]=e}))})),t}function I(t,e="",n=null){const i=e.split(".");for(;b(t)&&i.length;)t=t[i.shift()];return b(t)?t:n}function V(t,e,n,i){const s=t[e],o=()=>n.apply(t,[s]),r=e=>i.apply(t,[e]);if(Object.defineProperty)Object.defineProperty(t,e,{get:o,set:r});else if(t.__defineGetter__)t.__defineGetter__(e,o),t.__defineSetter__(e,r);else{const n=i=>{i.propertyName===e&&(t.detachEvent("onpropertychange",n),r(t[e]),t[e]=o,t[e].toString=()=>o().toString(),t.attachEvent("onpropertychange",n))};try{t[e]=o,t[e].toString=()=>o().toString()}catch(t){}t.attachEvent("onpropertychange",n)}}function j(t){return t.substring(0,1).toUpperCase()+t.substring(1)}function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class W{constructor(t,e){U(this,"_tokens",[]),U(this,"bus",void 0),U(this,"logger",void 0),this.bus=t,this.logger=e}addEvent(t,e,n,i=!1){const s=k(t,e,n,i);this._tokens.push(s)}destroy(){c(this._tokens,T),this._tokens.length=0}}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const G=1e3;class Q extends W{constructor(t,e){super(t.bus,t.logger),q(this,"options",void 0),q(this,"state",void 0),this.state=e,this.logger.debug("player:created"),this.options=t,setTimeout((()=>this.getElement().setAttribute("tabindex","-1")))}focus(){let t=this.getElement();this.options.isAudio&&(t=t.parentNode.parentNode),t&&t instanceof HTMLElement&&t.focus()}getTimeCode(){return this.options.timecode}getCurrentTime(){return this.getElement().currentTime+this.getTimeCode()}setCurrentTime(t,e=!0){if(!this.getElement())return;t-=this.getTimeCode();const{clip:n}=this.options;if(n){let[e,i]=n;e=e||0,i=i||this.getElement().duration,t=Math.max(t,e),t=Math.min(t,i)}this.getElement().currentTime=t,e||this.focus()}nextFrame(){const t=this._getFrameDuration();let e=this.getElement().currentTime,n=Math.floor(e*G/t);e=Math.ceil(++n*t)/G,this.setCurrentTime(e+this.getTimeCode())}prevFrame(){const t=this._getFrameDuration();let e=this.getElement().currentTime,n=Math.floor(e*G/t);e=Math.ceil(--n*t)/G,this.setCurrentTime(e+this.getTimeCode())}isPaused(){return!!this.getElement()&&this.getElement().paused}isEnded(){if(!this.getElement())return!1;const{clip:t}=this.options;if(t){const e=this.getElement().duration;let[n,i]=t;return i=i||e,i+=this.getTimeCode(),this.getCurrentTime()>=i}return this.getElement().ended}play(t=!0){this.bus.emit("handle-play-clicked"),t||this.focus();const{clip:e}=this.options;if(this.isEnded()&&e){const[t]=e;this.setCurrentTime(t||0)}return this.getElement().play()}pause(t=!0){return t||this.focus(),this.getElement().pause()}getDuration(){if(!this.getElement())return"";let t=this.getElement().duration;const{clip:e}=this.options;if(e){let[n,i]=e;n=n||0,i=i||t,t=i-n}return t+this.getTimeCode()}isMuted(){return this.getElement().muted}setMuted(t,e=!0){this.getElement().muted=t,e||this.focus()}getVolume(){return this.getElement().volume}setVolume(t,e=!0){this.getElement().volume=t,e||this.focus()}destroy(){this.logger.debug("player:destroy"),super.destroy()}getLevels(){throw new Error("You must override it")}getLevel(){throw new Error("You must override it")}setLevel(){throw new Error("You must override it")}isMultiAudioTracks(){return this.getAudioTracks().length>1}getAudioTracks(){return[]}getAudioTrack(){return 0}setAudioTrack(t){}getTextTracks(){}load(){throw new Error("You must override it")}isMultiQuality(){return this.getLevels().length>1}getBufferedPercent(){return 0}getElement(){throw new Error("You must override it")}_getFrameDuration(){return G/this.options.frameRate}}const Y=["loadstart","progress","suspend","abort","error","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"];function Z(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class X extends Q{constructor(t,e){super(t,e),K(this,"$el",void 0),K(this,"source",void 0),K(this,"_levels",[]),K(this,"_currentLevel",null),this.logger.debug("html:player:creating");let n="video";const i={id:v(),tabindex:-1};t.disableAutoFullScreenOnIOS&&(i["webkit-playsinline"]=!0,i.playsinline=!0),t.isMobile&&(i.preload="metadata",n=t.isAudio?"audio":"video"),this.$el=C(n,i),c(Y,(t=>{this.addEvent(this.$el,t,(e=>{this.logger.debug("triggered event",t),this.bus.emit(t,e)}))})),this.handleFullscreenChanging=this.handleFullscreenChanging.bind(this),this.handleWebkitEndFullscreen=this.handleWebkitEndFullscreen.bind(this),Z()&&this.bus.on("fullscreenchanging",this.handleFullscreenChanging),this.logger.debug("html:player:created")}load({type:t,src:e,cc:n}){let s={type:t,src:e};if(this.options.isMobile&&"audio/mp3"===t&&(s={src:e}),i(e)){if(this._levels=e,this.options.qualityLevel){const t=parseInt(this.options.qualityLevel,10);t&&(this._currentLevel=A(this._levels,(e=>parseInt(e.name,10)===t)))}this._currentLevel=this._currentLevel||A(this._levels,(t=>t.default)),this._currentLevel=this._currentLevel||R(this._levels),s.src=this._currentLevel.src}this.logger.debug("html:player:loading",e),this.source=C("source",s),this.source.addEventListener("error",(t=>{this.bus.emit("error",t),this.logger.error(t)})),w(this.$el,this.source),Z()&&c(n,(t=>{3!==t.state&&"json"!==t.type&&w(this.$el,C("track",t))})),this.$el.audioTracks&&(this.$el.audioTracks.onchange=()=>{this.bus.emit("audiotrackswitched")}),this.$el.addEventListener("webkitendfullscreen",this.handleWebkitEndFullscreen),Z()&&this.bus.once("loadeddata",(()=>{const t=this.getTextTracks();t instanceof TextTrackList&&t.addEventListener("change",(()=>{const e=A(t,(t=>"showing"===t.mode));e&&this.bus.emit("cclang",e.language)})),this.handleWebkitEndFullscreen()}))}getLevels(){return this._levels}setLevel(t){const e=this.$el.currentTime,n=this.$el.paused;this._currentLevel=t,this.$el.pause(),this.source.src=t.src,this.bus.once("loadedmetadata",(()=>{this.$el.currentTime=e,n||this.$el.play()})),this.$el.currentTime=e,this.$el.load()}setPlaybackRate(t){this.$el.playbackRate=t,this.$el.defaultPlaybackRate=t}getLevel(){return this._currentLevel}getElement(){return this.$el}getBufferedPercent(){const t=this.$el;return t&&t.buffered&&t.buffered.length>0&&t.buffered.end&&t.duration?t.buffered.end(t.buffered.length-1)/t.duration:0}getAudioTrack(){return O(this.getAudioTracks(),(t=>t.enabled))}getAudioTracks(){return this.$el.audioTracks||[]}setAudioTrack(t){c(this.getAudioTracks(),((e,n)=>{e&&"object"==typeof e&&(e.enabled=n==t)}))}getTextTracks(){return this.$el.textTracks||[]}handleFullscreenChanging(t){const e=!0!==t?this.state.getCCLang():"__";this._textTrackWalker((t=>t.language===e?"showing":"disabled"))}handleWebkitEndFullscreen(){this.handleFullscreenChanging(this.$el.webkitDisplayingFullscreen)}_textTrackWalker(t){c(this.getTextTracks(),(e=>{e&&"object"==typeof e&&(e.mode=t(e))}))}destroy(){this.$el.removeEventListener("webkitendfullscreen",this.handleWebkitEndFullscreen),this.bus.off("fullscreenchanging",this.handleFullscreenChanging),super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null,this.source=null}}const J={name:"Auto"},tt={maxFragLookUpTolerance:.5,maxMaxBufferLength:600,highBufferWatchdogPeriod:3,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:10,retryDelayMs:3e3,maxRetryDelayMs:8e3}}}},et=["volume","src","currentTime","muted","duration","paused","ended","levels","currentLevel","level","error","currentSrc","networkState","preload","buffered","bufferedBytes","bufferedTime","readyState","seeking","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","seekable","autoplay","loop","controls"],nt=["load","play","pause","canPlayType"],it=window.navigator.appName.toLowerCase(),st=-1!==it.indexOf("microsoft")||null!==it.match(/trident/gi);class ot{constructor(t,e,n){this.name=t,this.options=e,this.supportedMediaTypes=n}canPlayType(t){return a(this.supportedMediaTypes,t)}create(t,e,n){e.logger.debug("FlashRenderer.create",e,n);let i,s,o={};o.options=e,o.id=t.id+"_"+o.options.prefix,o.mediaElement=t,o.flashState={},o.flashApi=null,o.flashApiStack=[],c(et,function(t){return e=>{t.flashState[e]=null;const n=j(e);t["get"+n]=()=>{if(t.options.logger.debug("[",t.options.prefix," get]: ",e),null===t.flashApi)return null;if(x(t.flashApi["get_"+e]))return t.options.logger.warn("[",t.options.prefix," MISSING]: ",e),null;var n=t.flashApi["get_"+e]();return"buffered"===e?{start:()=>0,end:()=>n,length:1}:n},t["set"+n]=n=>{t.options.logger.debug("[",t.options.prefix," set]: ",e," = ",n),"src"===e&&(n=$(n)),null!==t.flashApi&&b(t.flashApi["set_"+e])?t.flashApi["set_"+e](n):t.flashApiStack.push({type:"set",propName:e,value:n})}}}(o));const r=nt.slice();r.push("stop"),c(r,function(t){return e=>{t[e]=()=>{if(t.options.logger.debug("["+t.options.prefix+" "+e+"()]"),x(t.flashApi))t.flashApiStack.push({type:"call",methodName:e});else if(t.flashApi["fire_"+e])try{t.flashApi["fire_"+e]()}catch(e){t.options.logger.error("error occurred when calling flash api.",e)}else t.options.logger.warn("flash","missing method",e)}}}(o)),window["__ready__"+o.id]=function(t){return()=>{t.options.logger.debug("flash is ready");try{t.flashApi=document.getElementById("__"+t.id),t.options.bus.emit("rendererready",t),c(t.flashApiStack,(e=>{if(t.options.logger.debug("- stack",e.type,e),"set"===e.type){const n=j(e.propName);t["set"+n](e.value)}else"call"===e.type&&t[e.methodName]()}))}catch(e){t.options.logger.error(e)}}}(o),window["__event__"+o.id]=(t,n)=>e.bus.emit(t,n);const a="video"===I(t,"originalNode.tagName","").toLowerCase();if(function(t,e,n){t.flashWrapper=C("div",{class:"rmp-flash-wrapper"});const i=t.options,s=e.getAttribute("autoplay"),o=["uid="+t.id,"autoplay="+s],r=n?e.originalNode.height:1,a=n?e.originalNode.width:1;o.push("pseudostreamstart=start"),o.push("pseudostreamtype=byte"),w(e,t.flashWrapper),n&&null!==e.originalNode&&(e.originalNode.style.display="none");var l=[];if(st){var h=C("div");w(t.flashWrapper,h),l=['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"','codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"','id="__'+t.id+'"','width="'+a+'"','height="'+r+'"'],n||l.push('style="clip: rect(0 0 0 0); position: absolute;"'),h.outerHTML="<object "+l.join(" ")+'><param name="movie" value="'+i.flashPath+i.filename+"?x="+new Date+'" /><param name="flashvars" value="'+o.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><div>Loading...</div></object>'}else l=[`id="__${t.id}"`,`name="__${t.id}"`,'play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="always"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"',`src="${i.flashPath}${i.filename}"`,`flashvars="${o.join("&")}"`,`width="${a}"`,`height="${r}"`],n||l.push('style="clip: rect(0 0 0 0); position: absolute;"'),t.flashWrapper.innerHTML=`<embed ${l.join(" ")}>`;t.flashNode=t.flashWrapper.lastChild}(o,t,a),o.hide=()=>{if(o.options.logger.debug("hiding flash plugin"),a){o.flashNode.style.position="absolute",o.flashNode.style.width="1px",o.flashNode.style.height="1px";try{o.flashNode.style.clip="rect(0 0 0 0);"}catch(t){o.options.logger.error("error on hiding flash player",t)}}},o.show=()=>{if(o.options.logger.debug("showing flash plugin"),a){o.flashNode.style.position="",o.flashNode.style.width="",o.flashNode.style.height="";try{o.flashNode.style.clip=""}catch(t){o.options.logger.error("error on showing flash player",t)}}},o.setSize=(t,e)=>{o.options.logger.debug("changing size for flash plugin",t,e),o.flashNode.style.width=t,o.flashNode.style.height=e,null!==o.flashApi&&o.flashApi.fire_setSize(t,e)},f(n))for(i=0,s=n.length;i<s;i++)if(this.canPlayType(n[i].type)){o.options.logger.debug("FLASH","init, set src",n[i].src),o.setSrc(n[i].src),o.load();break}return o}}const rt=[new ot("flash_video",{prefix:"flash_video",filename:"ravnur-flash-video.swf",enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",pseudoStreamingType:"byte"},["video/mp4","video/flv","video/rtmp","audio/rtmp","rtmp/mp4","audio/mp4"]),new ot("flash_hls",{prefix:"flash_hls",filename:"ravnur-flash-video-hls.swf"},["audio/hls","video/hls","application/x-mpegURL","application/x-mpegurl","vnd.apple.mpegURL","audio/ism/manifest(format=m3u8-aapl-v3)"]),new ot("flash_audio",{prefix:"flash_audio",filename:"ravnur-flash-audio.swf"},["audio/mp3"])];let at=0;function lt(t,e={}){var n=C("div",{class:"rmp-flash-wrapper"});n.options=e,n.originalNode=t;const i=t.id||"me_flash_"+ ++at;n.originalNode.setAttribute("id",i+"_from_mejs"),n.originalNode.parentNode&&n.originalNode.parentNode.insertBefore(n,n.originalNode),n.appendChild(n.originalNode),n.id=i,n.renderers={},n.renderer=null,n.rendererName=null,c(et,function(t){return function(e){if("src"===e)return;const n=j(e),i=()=>b(t.renderer)?t.renderer["get"+n]():(t.options.logger.warn(`Could not called getter "${n}". Renderer is empty`),null),s=e=>{b(t.renderer)?t.renderer["set"+n](e):t.options.logger.warn(`Could not called setter "${n}". Renderer is empty`)};V(t,e,i,s),t["get"+n]=i,t["set"+n]=s}}(n));const s=()=>b(n.renderer)?n.renderer.getSrc():null,o=t=>{let i;const s=[];if("string"==typeof t?s.push({src:t,type:t?ct(t):""}):c(t,(t=>{const e=$(t.src),n=t.type;s.push({src:e,type:n||ct(e)})})),n.originalNode.setAttribute("src",I(z(s),"src","")),i=function(t){for(let e=0,n=rt.length;e<n;e++){const n=pt(rt[e],t);if(b(n))return n}return null}(s),n.originalNode.setAttribute("src",I(z(s),"src","")),null===i)return e.bus.emit("error",{message:"No renderer found"}),void n.options.logger.error("No renderer found");n.changeRenderer(i.rendererName,s),x(n.renderer)&&(e.bus.emit("error",{message:"Error creating renderer"}),n.options.logger.error("Error creating renderer"))};return V(n,"src",s,o),n.getSrc=s,n.setSrc=o,c(nt,function(t){return function(e){t[e]=(...n)=>(t.options.logger.debug("[wrapper ",t.id,".",e,"()]",t.renderer),I(t,`renderer.${e}`)?t.renderer[e](n):(t.options.logger.warn(`Could not called method "${e}"`),null))}}(n)),n.changeRenderer=function(t){return function(e,n){if(I(t,"renderer.name")===e)return t.options.logger.debug("Already using: ",e),t.renderer.show(),t.renderer.setSrc(z(n).src),!0;b(t.renderer)&&(t.options.logger.debug("Stopping and hiding: ",t.renderer),t.renderer.pause(),t.renderer.stop&&t.renderer.stop(),t.renderer.hide());let i=t.renderers[e];if(b(i))return t.options.logger.debug("restoring: ",i.name),i.show(),i.setSrc(z(n).src),t.renderer=i,!0;const s=A(rt,(t=>t.name===e));if(x(s))return t.options.logger.error("can't found: "+e),!1;var o=D({},t.options,s.options);return i=s.create(t,o,n),i.name=e,t.renderers[s.name]=i,t.renderer=i,t.rendererName=e,i.show(),!0}}(n),n.setSize=(t,e)=>{b(n.renderer)?n.renderer.setSize(t,e):n.options.logger.warn("Could not set the sizes. Renderer is not found")},b(n.originalNode)&&function(t){const e=[],n=t.originalNode;switch(n.nodeName.toLowerCase()){case"iframe":e.push({type:"",src:n.getAttribute("src")});break;case"audio":case"video":var i=n.childNodes.length,s=n.getAttribute("src");s&&e.push({src:s,type:ht(s,n.getAttribute("type"))});for(let t=0;t<i;t++){const i=n.childNodes[t];if(1===i.nodeType&&"source"===i.tagName.toLowerCase()){const t=i.getAttribute("src");e.push({src:t,type:ht(t,i.getAttribute("type"))})}}}f(e)&&(t.options.logger.debug("initializing src",z(e).src),t.src=e)}(n),n}function ht(t,e){return t&&!e?ct(t):function(t){return t&&~t.indexOf(";")?z(t.split(";")):t}(e)}function ct(t){if(a(t=t.toLowerCase(),"rtmp"))return a(t,".mp3")?"audio/rtmp":"video/rtmp";if(a(t,".oga")||a(t,".ogg"))return"audio/ogg";if(a(t,".m3u8")||a(t,"m3u8-aapl-v3"))return"application/x-mpegURL";if(a(t,".mpd"))return"application/dash+xml";const e=function(t){const e=z(t.split("?"));if(~e.indexOf(".")){let t=e.lastIndexOf(".");return e.substring(++t)}return""}(t),n=function(t){switch(t){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return t}}(e);return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(e)?"video":"audio")+"/"+n}function pt(t,e){const n=A(e,(e=>t.canPlayType(e.type)));return b(n)?{rendererName:t.name,src:n.src}:null}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ut={name:"Auto",index:-1},gt={name:"Auto"},mt=["application/x-mpegURL","vnd.apple.mpegURL","application/vnd.apple.mpegurl"],bt={};function yt(t){const{type:e,logger:n}=t;return t.useHTMLPlayer?(n.debug("Using html player for type: ",e),"HTML5"):function(){const t=window.ManagedMediaSource||window.MediaSource||window.WebKitMediaSource;return b(t)&&o(t.isTypeSupported)&&t.isTypeSupported("video/mp4; codecs=avc1.42E01E,mp4a.40.2")}()&&(t.useHLSJSPlayer||t.isLive)?(n.debug("Using hlsjs player for type: ",e),"HLS"):(n.debug("Using shaka player for type: ",e),"Shaka")}bt.HLS=class extends X{constructor(t,e){super(t,e),this.logger.debug("hls:player:created")}load({src:t}){t=s(t=i(t)?z(t):t)?t.src:t,this.logger.debug("hls:player:loading",t),b(window.Hls)?this._attachMedia(t):this._loadLibraryAndAttachMedia(t)}_loadLibraryAndAttachMedia(t){if("function"==typeof window.define&&window.define.amd)window.require.config({paths:{hlsjs:this.options.hlsjsURL}}),window.require(["hlsjs"],(e=>{window.Hls=e,this._attachMedia(t)}));else{const e=C("script",{src:this.options.hlsjsURL}),n=R(document.getElementsByTagName("script"));if(e.onload=e.onreadystatechange=()=>this._attachMedia(t),!n.parentNode)return;n.parentNode.insertBefore(e,n)}}_attachMedia(t){const e=window.Hls;if(e.isSupported())if(this.hls=new e(D(tt,this.options.hls)),this.hls.loadSource(t),this.hls.attachMedia(this.$el),this.hls.on(e.Events.ERROR,((t,e)=>{this.bus.emit("error",e),this.logger.error(e)})),this.hls.on(e.Events.AUDIO_TRACK_SWITCHED,(()=>{this.bus.emit("audiotrackswitched")})),this.hls.on(e.Events.LEVEL_SWITCHED,((t,e)=>{const n=this.hls.levels[e.level];this.logger.debug(`quality:switched ${n.height}p`)})),this.hls.on(e.Events.MANIFEST_PARSED,((t,e)=>{if(this.options.showSubtitles||(this.hls.subtitleDisplay=!1),this.options.qualityLevel){const t=parseInt(this.options.qualityLevel,10);if(t){const n=A(e.levels,(e=>e.height===t));n&&this.setLevel(n)}}if(this.options.maxQualityLevel&&this.limitLevel(this.options.maxQualityLevel),this.options.startLevel){const t=parseInt(this.options.startLevel,10);if(t){const n=O(e.levels,(e=>e.height===t));this.hls.startLevel=n}}})),this.hls.on(e.Events.BUFFER_CREATED,(()=>{this.options.isLive&&this.goToLive()})),this.options.aesToken){let t;this.hls.config.xhrSetup=(e,n)=>{e.addEventListener("load",(()=>{if("string"==typeof e.response&&e.response.indexOf("#EXTM3U")>=0){const i=e.response.split("\n").find((t=>0===t.indexOf("#EXT-X-KEY")))?.split('URI="')[1].split('"')[0],s="https://"+n.split("/")[2]+i;i&&(t=s)}})),n===t&&e.setRequestHeader("Authorization","Bearer "+this.options.aesToken)}}else{const e=t.split("?")[1];e&&(this.hls.config.xhrSetup=(t,n)=>{t.open("GET",n+`?${e}`,!0)})}else this.logger.error("HLS is not supported for this browser")}goToLive(){this.hls.media&&(this.logger.debug("hls:player:live"),this.hls.media.currentTime=this.hls.liveSyncPosition||this.hls.media.duration-10)}isLive(){return this.hls?.liveSyncPosition?this.hls?.media.currentTime>=this.hls?.liveSyncPosition-10:this.hls?.media.currentTime>=this.hls?.media.duration-10}getLevels(){return[J].concat(this.hls.levels)}setLevel(t){const e=O(this.hls.levels,t);this.hls.currentLevel=e}limitLevel(t){const e=parseInt(t,10);if(e){const t=O(this.hls.levels,(t=>t.height===e));this.hls.autoLevelCapping=t}}getLevel(){return this.hls.levels[this.hls.manualLevel]||J}isMultiQuality(){return this.hls.levels.length>1}getAudioTracks(){return this.hls.audioTracks}getAudioTrack(){return this.hls.audioTrack}getTextTracks(){return this.$el.textTracks||[]}setAudioTrack(t){this.hls.audioTrack=t}destroy(){this.hls.destroy(),super.destroy()}},bt.Flash=class extends Q{constructor(t,e){super(t,e),dt(this,"$el",void 0),dt(this,"_levels",[]),dt(this,"_currentLevel",null),dt(this,"mediaElement",null),this.logger.debug("flash:controller:creating"),this.$el=C(t.isAudio?"audio":"video"),this.onFullScreenChanged=this.onFullScreenChanged.bind(this),this.logger.debug("flash:controller:created")}load({src:t}){i(t)&&(this._levels=t,this._currentLevel=A(this._levels,(t=>t.default))||R(this._levels),t=this._currentLevel.src),this.logger.debug("flash:controller:loading",t);const e=new lt(this.$el,this.options);this.mediaElement=e,e.setSrc(t),e.setSize("100%","100%"),e.play(),this.bus.once("loadedmetadata",(()=>{if(e.pause(),this.options.qualityLevel){const t=parseInt(this.options.qualityLevel,10),e=A(this.getLevels(),(e=>e.height===t));e&&(this.setLevel(e),this.bus.emit("qualitychange",`${t}p`))}})),this.options.isAudio&&(e.pause(),this.bus.once("canplaythrough",(()=>{e.pause(),this.bus.emit("loadedmetadata")}))),this.bus.on("fullscreenchanged",this.onFullScreenChanged),this.bus.on("cclayoutchange",this.onFullScreenChanged)}isHLS(){return"flash_hls"===I(this.mediaElement,"rendererName")}getLevels(){if(this.isHLS()){const t=B(this.mediaElement.levels);return[ut].concat(t)}return this._levels}setLevel(t){if(this.isHLS())this.mediaElement.level=t.index;else if(this._currentLevel!==t){const e=this.mediaElement.currentTime,n=this.mediaElement.paused;this._currentLevel=t,this.mediaElement.setSrc(t.src),this.mediaElement.setSize("100%","100%"),this.mediaElement.play(),this.bus.once("loadedmetadata",(()=>{this.mediaElement.currentTime=e,this.mediaElement.pause(),this.mediaElement.play(),n&&this.mediaElement.pause()}))}}getLevel(){return this.isHLS()?this.mediaElement.levels[this.getElement().currentLevel]||ut:this._currentLevel}getElement(){return this.mediaElement}setCurrentTime(t,e=!0){const n=this.isPaused();this.pause(e),super.setCurrentTime(t,e),n||this.play(e)}isMultiQuality(){return(this.isHLS()?this.mediaElement.levels:this._levels).length>1}onFullScreenChanged(t=!1){if(t){const{mediaElement:t}=this;t&&t.setSize("100%","100%")}else setTimeout((()=>this._resizeME()))}_resizeME(){const t=this.$el.parentNode,e=this.mediaElement;if(t&&e&&t instanceof HTMLElement){const n=t.offsetWidth,i=t.offsetHeight;e.setSize(`${n}px`,`${i}px`)}}getBufferedPercent(){const t=this.mediaElement;return t.buffered.end(t.buffered.length-1)/t.duration}destroy(){this.pause();const{mediaElement:t}=this;t&&t.renderer.hide(),super.destroy(),this.bus.off("fullscreenchanged",this.onFullScreenChanged),this.bus.off("cclayoutchange",this.onFullScreenChanged),t&&(t.removeChild(this.$el),t.parentNode.removeChild(t)),this.mediaElement=null}},bt.HTML5=X,bt.Shaka=class extends X{constructor(t,e){super(t,e),this.logger.debug("shaka:player:created")}load({src:t,type:e}){t=s(t=i(t)?z(t):t)?t.src:t,/format=mpd-time-csf/.test(t)&&Z()&&!this.options.disableAutoUrlRewrite&&(e="application/x-mpegurl",t=t.replace("format=mpd-time-csf","format=m3u8-cmaf")),this.onError=this.onError.bind(this),this.logger.debug("shaka:player:loading",t),this._loadLibraryAndAttachMedia(t,e)}_loadLibraryAndAttachMedia(t,e){if("function"==typeof window.define&&window.define.amd)window.require.config({paths:{shakajs:this.options.shakaURL}}),window.require(["shakajs"],(n=>{window.shaka=n,this._attachMedia(t,e)}));else{const n=C("script",{src:this.options.shakaURL}),i=R(document.getElementsByTagName("script"));if(n.onload=n.onreadystatechange=()=>this._attachMedia(t,e),!i.parentNode)return;i.parentNode.insertBefore(n,i)}}async _attachMedia(t,e){let n=this.options.shaka;if(window.shaka.polyfill.installAll(),window.shaka.Player.isBrowserSupported()){this.shaka=new window.shaka.Player,this.options.shaka&&this.shaka.configure(this.options.shaka),this.shaka.setTextTrackVisibility(!!this.options.showSubtitles),this.preselectQuality(),this.modifyRequests(t),this.options.maxQualityLevel&&this.limitLevel(this.options.maxQualityLevel),await this.configureDRM(),await this.shaka.attach(this.$el),await this.shaka.load(t,null,e).catch(this.onError);const i=new window.shaka.util.EventManager;i.listen(this.shaka,"error",(t=>this.onError(t.detail))),i.listen(this.shaka,"adaptation",(t=>this.onAdaptation(t))),this.shaka.configure(n)}else this.logger.error("Browser not supported!")}async configureDRM(){const t={};if(this.options.widevineURL&&(t["com.widevine.alpha"]=this.options.widevineURL),this.options.playreadyURL&&(t["com.microsoft.playready"]=this.options.playreadyURL),this.options.fairplayURL&&(t["com.apple.fps.1_0"]=this.options.fairplayURL),this.shaka.configure({drm:{servers:t}}),this.options.fairplayCertificateUrl){const t=await fetch(this.options.fairplayCertificateUrl),e=await t.arrayBuffer();this.shaka.configure("drm.advanced.com\\.apple\\.fps\\.1_0.serverCertificate",new Uint8Array(e)),window.shaka.polyfill.PatchedMediaKeysApple.install();const n=window.shaka.util.FairPlayUtils;this.shaka.getNetworkingEngine().registerRequestFilter(n.ezdrmFairPlayRequest),this.shaka.getNetworkingEngine().registerResponseFilter(n.commonFairPlayResponse),this.shaka.configure("drm.initDataTransform",n.ezdrmInitDataTransform)}}onError(t){this.bus.emit("error",t),this.logger.error(t)}onAdaptation(t){this.logger.debug("quality:switched",`${t.newTrack.height}p`)}modifyRequests(t){this.shaka.getNetworkingEngine().registerRequestFilter(((e,n)=>{e===window.shaka.net.NetworkingEngine.RequestType.KEY&&this.options.aesToken&&(n.headers.Authorization="Bearer "+this.options.aesToken);const i=t?.split("?")[1]?.split("&");i?.length&&i.forEach((t=>{const e=n.uris[0]?.split("?")[1];e?n.uris[0].includes(t)||(n.uris[0]+="&"+t):n.uris[0]+="?"+t}))}))}preselectQuality(){this.options.qualityLevel&&(new window.shaka.util.EventManager).listen(this.shaka,"streaming",(()=>{const t=parseInt(this.options.qualityLevel,10),e=this.getLevels().find((e=>e.height===t));e&&this.setLevel(e)}))}getLevels(){return[gt].concat(this.shaka.getVariantTracks())}setLevel(t){t===gt?this.shaka.configure({abr:{enabled:!0}}):(this.shaka.configure({abr:{enabled:!1}}),this.shaka.selectVariantTrack(t,!0))}limitLevel(t){const e=parseInt(t,10);e&&this.shaka.configure({abr:{restrictions:{maxHeight:e}}})}goToLive(){this.shaka.goToLive()}isLive(){return this.$el.currentTime>=this.shaka?.seekRange()?.end-10}getLevel(){const t=this.shaka.getVariantTracks().find((t=>t.active));return this.shaka.getConfiguration().abr.enabled?gt:t}isMultiQuality(){return this.shaka.getVariantTracks().length>1}destroy(){this.shaka.destroy(),super.destroy()}};var xt=(()=>{for(var t,e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,s=n.length,o={};i<s;i++)if((t=n[i])&&t[1]in document){for(i=0,e=t.length;i<e;i++)o[n[0][i]]=t[i];return o}return!1})();const _t={request(t){var e=xt.requestFullscreen;t=t||document.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent),t[e]()},exit(){this.isFullscreen&&document[xt.exitFullscreen]()},toggle(t){this.isFullscreen?this.exit():this.request(t)},raw:xt};V(_t,"isFullscreen",(function(){return Boolean(document[xt.fullscreenElement])}),u),V(_t,"element",(function(){return document[xt.fullscreenElement]}),u),V(_t,"enabled",(function(){return Boolean(document[xt.fullscreenEnabled])}),u);const ft=!!xt&&_t,$t="rmp-";function vt(t,e){try{localStorage.setItem($t+t,e)}catch(t){}}function wt(t,e){try{const n=localStorage.getItem($t+t);return b(n)?n:e}catch(t){return e}}function Ct({url:t,success:e,responseType:n,rangeStart:i,rangeEnd:s,error:o}){const r=function(t,e){if("undefined"==typeof XDomainRequest){const n=new XMLHttpRequest;return n.onreadystatechange=function(){try{4===n.readyState&&(200===n.status?setTimeout(t):e&&(!n.status||n.status>=400)&&setTimeout(e))}catch(t){}},n}const n=new XDomainRequest;return n.onload=t,n}((()=>{const t="arraybuffer"===r.responseType?r.response:r.responseText;e({url:r.responseURL,data:t})}),o);r.open("GET",t,!0),b(s)&&b(i)&&r.setRequestHeader("Range","bytes="+i+"-"+--s),b(n)&&(r.responseType=n),r.send(null)}function kt(t){const e=t.split(":"),n=[3600,60,1];let i=0;for(;e.length&&n.length;)i+=e.pop()*n.pop();return i}function Tt(t,e=!1,n=!1){const i=Math.round(1e3*t)%1e3;t=Math.floor(t);const s=e?[24,60,60]:[60,60],o=[];for(;s.length;){const e=s.pop();o.unshift((r=t%e)<10?`0${r}`:`${r}`),t=Math.floor(t/e)}var r;return n?o.join(":")+"."+i:o.join(":")}const Et=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;function St(t,e,n){Ct({url:t,success:({data:t})=>{e(function(t){let e=t.split(/\n\s*\n+/gm);if("WEBVTT"!==e.shift().trim())return[];return F(P(e),(t=>{const e=t.split(/\n/g),n=z(e).indexOf("--\x3e")<0?e.shift():"",i=e.shift().split("--\x3e");return{from:kt(z(i).trim()),to:kt(N(i).trim()),text:e.filter((t=>!!t)).join("<br/>&nbsp;").replace(Et,""),title:n,id:v()}}))}(t))},error:n})}function Lt(){return!!navigator.userAgent.match(/Android/i)}function Mt(){return Lt()||Z()||!!navigator.userAgent.match(/(BlackBerry|BB10)/i)||!!navigator.userAgent.match(/(IEMobile|Windows Phone)/i)}const Pt=[{key:"red",value:"#F44336"},{key:"purple",value:"#9C27B0"},{key:"indigo",value:"#3F51B5"},{key:"blue",value:"#2196F3"},{key:"green",value:"#4CAF50"},{key:"yellow",value:"#FFEB3B"},{key:"orange",value:"#FF9800"},{key:"brown",value:"#795548"},{key:"grey",value:"#9E9E9E"},{key:"white",value:"#FFF"},{key:"black",value:"#000"}],At=[{label:"75%",value:"75%"},{label:"100%",value:"100%"},{label:"125%",value:"125%"},{label:"150%",value:"150%"},{label:"200%",value:"200%"}],Ft=[{key:"monoserif",value:'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace'},{key:"propserif",value:'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'},{key:"monosans",value:'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace'},{key:"propssans",value:'Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif'}],zt=[{key:"cc-location-over",value:"over"},{key:"cc-location-below",value:"below"}],Nt={label:"None",srclang:"",src:"",state:2},Rt={color:"fontcolor",bgcolor:"bgcolor",fontSize:"fontsize",fontFamily:"fontfamily",location:"cc_location",lang:"cclang"},Ot="toclang",Ht={theaterchanging:(t,e)=>D({},e,{isTheaterMode:!e.isTheaterMode}),fullscreenchanging:(t,e,n)=>D({},e,{isFullScreen:n="boolean"==typeof n?n:!e.isFullScreen}),cclang(t,e,n){const i=e.cc.sources,s=i[Math.max(O(i,(t=>t.srclang===n)),0)];if(!s)return e;2===s.state&&vt(Rt.lang,n);const o=D({},e.cc,{lang:n,loading:!1}),r=D({},e,{cc:o});return t.emit("captionschange",s),s.srclang&&(r.cc.loading=!0,qt(t,"refreshcaptions",s)),e.cc.lang&&n||t.emit("cclayoutchange",{mode:n&&e.cc.location||"over",fontSize:e.cc.fontSize}),r},ccsources(t,e,n,i=!1){const s=Wt(n,e.cc.lang);n=s.sources;const o=s.current&&s.current.srclang||"";i||setTimeout((()=>t.emit("cclang",o)),5);const r=D({},e.cc,{sources:n,lang:o,timedata:[]});return D({},e,{cc:r})},refreshcaptions(t,e,n,i){const s=D({},e.cc,{timedata:n});return s.timedataLang=i,s.loading=!1,D({},e,{cc:s})},cclocation(t,e,n){vt(Rt.location,n),t.emit("cclayoutchange",{mode:e.cc.lang&&n||"over",fontSize:e.cc.fontSize});const i=D({},e.cc,{location:n});return D({},e,{cc:i})},ccfontfamily(t,e,n){vt(Rt.fontFamily,n);const i=D({},e.cc,{fontFamily:n});return D({},e,{cc:i})},ccfontsize(t,e,n){vt(Rt.fontSize,n),t.emit("cclayoutchange",{mode:e.cc.lang&&e.cc.location||"over",fontSize:n});const i=D({},e.cc,{fontSize:n});return D({},e,{cc:i})},ccbgcolor(t,e,n){vt(Rt.bgcolor,n);const i=D({},e.cc,{bgcolor:n});return D({},e,{cc:i})},cccolor(t,e,n){vt(Rt.color,n);const i=D({},e.cc,{color:n});return D({},e,{cc:i})},chaptersloaded(t,e,n,i){const s=D({},e.toc,{timedata:n});return s.timedataLang=i,D({},e,{toc:s})},tocsources(t,e,n){const i=jt(),s=Wt(n,i.lang);i.sources=s.sources,i.lang=s.current&&s.current.srclang||"";const o=A(i.sources,(t=>t.srclang===i.lang));if(o&&o.srclang)qt(t,"chaptersloaded",o);else{const e=1;qt(t,"chaptersloaded",A(i.sources,(t=>!!t.default))||i.sources[e])}return D({},e,{toc:i})},changesource(t,e,n){const i=Vt(),s=Wt(n.cc,i.lang);i.sources=s.sources,i.lang=s.current&&s.current.srclang||"";const o=A(i.sources,(t=>t.srclang===i.lang));if(o&&o.srclang)qt(t,"refreshcaptions",o);else{const e=1;qt(t,"refreshcaptions",A(i.sources,(t=>!!t.default))||i.sources[e])}const r=jt(),a=Wt(n.chapters,r.lang);r.sources=a.sources,r.lang=a.current&&a.current.srclang||"";const l=A(r.sources,(t=>t.srclang===r.lang));if(l&&l.srclang)qt(t,"chaptersloaded",l);else{const e=1;qt(t,"chaptersloaded",A(r.sources,(t=>!!t.default))||r.sources[e])}return D({},e,{cc:i,toc:r})},toclang(t,e,n){const i=e.toc.sources,s=i[Math.max(O(i,(t=>t.srclang===n)),0)];2===s.state&&vt(Ot,n);const o=D({},e.toc,{lang:n}),r=D({},e,{toc:o});return s.srclang&&qt(t,"chaptersloaded",s),r}},Bt={isFullScreen:!1,isTheaterMode:!1,cc:{color:"#FFF",bgcolor:"#000",fontSize:"100%",fontFamily:'Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif',location:"over",lang:null,sources:[],timedata:[],timedataLang:"",loading:!1},toc:{lang:null,sources:[],timedata:[],timedataLang:""}},Dt={};class It extends W{constructor(t,e){var n,i;super(t,e),i=void 0,(n="_uid")in this?Object.defineProperty(this,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):this._uid=i,this._uid=v(),Dt[this._uid]=D({},Bt),Dt[this._uid].cc=Vt(),c(Ht,((e,n)=>{"number"!=typeof n&&t.on(n,((...n)=>{const i=Dt[this._uid],s=e.apply(this,[t,i].concat(n));Dt[this._uid]=s,t.emit("statechanged",s,i)}))}))}isFullScreen(){return Dt[this._uid].isFullScreen}isTheaterMode(){return Dt[this._uid].isTheaterMode}getCCLang(){return Dt[this._uid].cc.lang}getCCTextColor(){return Dt[this._uid].cc.color}getCCBgColor(){return Dt[this._uid].cc.bgcolor}getCCFontSize(){return Dt[this._uid].cc.fontSize}getCCFontFamily(){return Dt[this._uid].cc.fontFamily}getCCLocation(){return Dt[this._uid].cc.location}getCCSources(){const t=Dt[this._uid].cc.sources||[];return Mt()?P(t,(t=>3!==t.state)):t}getCCTimeData(){return Dt[this._uid].cc.timedata}getCCTimeDataLang(){return Dt[this._uid].cc.timedataLang}getSelectedCC(){const t=Dt[this._uid],{sources:e,lang:n}=t.cc;return e[Math.max(O(e,(t=>t.srclang===n)),0)]}isTranslatingCC(){const t=Dt[this._uid],{sources:e,lang:n,loading:i}=t.cc,s=Math.max(O(e,(t=>t.srclang===n)),0);return i&&0===e[s].state}getTOCSources(){return Dt[this._uid].toc.sources}getTOCLang(){return Dt[this._uid].toc.lang}getTOCTimeData(){return Dt[this._uid].toc.timedata}getTOCTimeDataLang(){return Dt[this._uid].toc.timedataLang}}function Vt(){const t=D({},Bt.cc);return c(Rt,((e,n)=>{t[n]=wt(e,Bt.cc[n])})),t}function jt(){const t=D({},Bt.toc);return t.lang=wt(Ot,Bt.toc.lang),t}function Ut(t){return D({},t,{state:"number"==typeof t.state?t.state:2})}function Wt(t,e){const n=function(t){return t.sort(((t,e)=>{const n="number"==typeof t.state?t.state:2,i="number"==typeof e.state?t.state:2;return n===i?t.label<e.label?-1:1:"number"==typeof n&&"number"==typeof i?i-n:0}))}(F(t||[],Ut)),i=n.length?[Nt].concat(n):[];let s=A(i,(t=>t.srclang===e&&0!==t.state));if(!s){let t=P(i,(t=>0!==t.state));const e=1;s=A(i,(t=>!!t.default))||t[e]}return{sources:i,current:s}}function qt(t,e,n){if(!n||!n.src)return void t.emit(e,[]);const i=n.srclang,s=()=>t.emit(e,[],i);"json"===n.type?Ct({url:n.src,success:n=>t.emit(e,JSON.parse(n.data),i),error:s}):St(n.src,(n=>t.emit(e,n,i)),s)}const Gt={fullscreen:"Fullscreen","exit-fullscreen":"Exit full screen",theater:"Theater mode","exit-theater":"Standard mode",play:"Play",pause:"Pause",replay:"Replay","standard-playbackrate":"Standard",forward:"Forward 10 sec",backward:"Back 10 sec",prevframe:"Move to previous frame",nextframe:"Move to next frame",annotations:"Annotations",quality:"Quality","audio-tracks":"Audio tracks","playback-rate":"Playback rate",settings:"Settings",buffering:"Buffering...",cc:"Closed Captions",transcript:"Transcript",chapters:"Chapters",back:"Back","settings-fontcolor":"Font color","settings-fontsize":"Font size","settings-fontfamily":"Font family","settings-background":"Background color","settings-captionlocations":"Captions location",help:"Help",download:"Download","video-drm":"Video","video-only":"Video Only","video-and":"Video and",language:"Language","unapproved-source":"(unapproved)",translate:"Translate",translating:"Translating...",monoserif:"Monospace serif",propserif:"Proportionate serif",monosans:"Monospace sans serif",propssans:"Proportionate sans serif","cc-location-over":"Overlay video","cc-location-below":"Below the video",red:"Red",purple:"Purple",indigo:"Indigo",blue:"Blue",green:"Green",yellow:"Yellow",orange:"Orange",brown:"Brown",grey:"Grey",white:"White",black:"Black","help-bacward":'"Left (◄)" - Jump backward by 10 seconds',"help-play":'"Space" - Toggle playback',"help-skip":'"Right (►)" - Skip 10 seconds',"help-volume":'"UP/DOWN (▲/▼)" - Change volume by 10%',"help-esc":'"ESC" - exit fullscreen',"no-video":"No playable sources found","no-flash":"For watching video you need to install Flash Player and restart your browser","playlist-count-of":"videos","caption-search":"Search captions",c2pa:"C2PA","view-more":"Learn more","c2pa-invalid-claim":"Content credentials are incomplete or missing","c2pa-exception-subtitle":"Unexpected error occurred while validating content provenance","c2pa-unverified-claim":"Content credentials are unverified","c2pa-no-data-message":"Video is missing provenance information. Video owner cannot be established","c2pa-video-credentials-status":"Video credentials status:","c2pa-status-valid":"Valid","c2pa-status-invalid":"Invalid","c2pa-status-incomplete":"Incomplete","c2pa-status-unknown":"Unknown","c2pa-signature-valid":"Digital signature is valid","c2pa-signature-valid-extended":"Digital signature is valid. All tracks pass validation and are signed by the owner.","c2pa-issued-to":"Issued to:","c2pa-issued-by":"Issued by:","c2pa-encoded-by":"Encoded by:","c2pa-video-owner":"Video owner:","c2pa-signature-invalid":"Content credentials have been changed, and authenticity cannot be verified",next:"Next",prev:"Previous",error:"An error occurred while playing the media."};function Qt(t={},e){return(t?t[e]:null)||Gt[e]}function Yt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Zt extends W{constructor(t,e,n,i=[]){super(n.bus,n.logger),Yt(this,"player",void 0),Yt(this,"options",void 0),Yt(this,"state",void 0),Yt(this,"_events",void 0),this.player=t,this.options=n,this.state=e,this._events=i;const s=this._listener.bind(this);s._safe_inner=!0,f(i)&&(this._listener=s,this.bus.on("*",s))}$t(t){return Qt(this.options.i18n,t)}_listener(t,...e){if(a(this._events,t)){const n=this[`on${j(t)}`];o(n)&&n.apply(this,e)}}destroy(){super.destroy(),this.bus.off("*",this._listener)}getElement(){return null}getOuter(){return null}}function Kt(t,e,i){i.style.display="block";let s=t.getElement();const o=s?s.offsetWidth:0;if(n(e)){const t=(o?s:s.parentNode).getBoundingClientRect(),n=e.getBoundingClientRect();e=Xt(n.left+n.right)-t.left}const r=i.offsetWidth;let a=Math.max(3,e-Xt(r));o&&(a=Math.min(a,o-r-3)),i.style.left=`${a}px`,i.style.display=""}function Xt(t){return Math.floor(t/2)}function Jt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const te="rmp-ext-progress",ee=`${te}__current`,ne=`${te}__duration`,ie=`${te}__bar`,se=`${te}__bar-padding`,oe=`${te}__handle`,re=`${te}__overlay`,ae=`${te}__play-progress`,le=`${te}__progress`,he=`${te}__c2pa-status`,ce=`${he}--invalid-segment`,pe=`${te}__tooltip`,de=`${te}__tooltip--visible`,ue=`${te}__thumbmail`,ge=`${te}__thumbmail-time`,me=`${te}__generic-live-stream`,be=`${te}__hidden`,ye=`${te}__chapter-bubble`;function xe(t){if(t===1/0||isNaN(t))return"--:--";const e=Math.floor(t/3600),n=Math.floor(t/60)%60,i=Math.floor(t%60);return(e?_e(e)+":":"")+_e(n)+":"+_e(i)}function _e(t){return t<10?`0${t}`:`${t}`}const fe={width:32,height:32,viewBox:"0 0 24 24"},$e="M8 5v14l11-7z",ve="M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z",we="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z",Ce="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z",ke="M6 6h2v12H6zm3.5 6l8.5 6V6z",Te="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z",Ee="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z",Se="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z",Le="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z";function Me(t,e,n={}){const i=C("svg",n=D({},fe,n),t,"http://www.w3.org/2000/svg");return Array.isArray(e)?e.forEach((t=>{C("path",Pe(t),i,"http://www.w3.org/2000/svg")})):C("path",Pe(e),i,"http://www.w3.org/2000/svg"),i}function Pe(t){return"string"==typeof t?{d:t}:{...t}}const Ae="rmp-ext-popover",Fe=`${Ae}--visible`;function ze(t,{$button:e,text:n}){const i=e.parentNode,s=C("span",{class:Ae,tabindex:0});w(i,s,e),e.setAttribute("aria-label",o(n)?n():n);let r=0;function a(){s.textContent=o(n)?n():n,s.style.left="0",Kt(t.player,e,s),S(s,Fe)}function l(){clearTimeout(r),L(s,Fe)}t.addEvent(e,"mouseenter",(()=>r=setTimeout(a,500))),t.addEvent(e,"mouseleave",l),t.addEvent(e,"click",l)}const Ne="rmp-ext-play",Re=`${Ne}--playing`,Oe=`${Ne}--paused`,He=`${Ne}--ended`,Be="rmp-ext-volume",De=`${Be}__btn`,Ie=`${De}--muted`,Ve=`${Be}__selector`,je=`${Ve}--open`,Ue=`${Ve}--active`,We=`${Be}__slider`,qe=`${Be}__handle`,Ge=`${Be}__progress`,Qe=`${Be}__overlay`,Ye="volume",Ze="muted";function Ke(t){return t=Math.max(0,t),Math.min(t,1)}const Xe="rmp-ext-fullscreen",Je=`${Xe}--exit`;function tn(t,e){if(!t||!t.getElement())return;e.style.maxHeight="";const n=t.getElement().parentNode.getBoundingClientRect(),i=(n.height||n.bottom-n.top)-100;e.style.maxHeight=`${Math.min(i,300)}px`}function en(t,{$button:e,$selector:n,SELECTOR_OPEN_CN:i,reposition:s=!0,closeOnClick:o=!1,heightControl:r=!1,firstFocusItemSelector:a="",toMainFn:l=(()=>{})}){let h=null;function c(t,e){const n=document.activeElement;let i=t;return!i&&n.parentElement.classList.value.includes("tab-content")&&(i=n.parentElement[e]),i}function p(t,e){let n=t;return n&&n.classList.value.includes("tab-content")&&(n=n[e]),n}function d(t,e){let n=t,i=t&&(n.offsetWidth>0||n.offsetHeight>0);for(;!i&&n;)n=n[e],i=t&&(n.offsetWidth>0||n.offsetHeight>0);return n}function u(){l(),t.bus.emit("hidepopup"),L(n,i),b(h)&&(T(h),h=null)}t.addEvent(e,"click",(function(){b(h)?u():(S(n,i),s&&Kt(t.player,e,n),setTimeout((()=>{t.bus.emit("showpopup",n),h=k(document,"click",u)})),r&&tn(t.player,n),a&&setTimeout((()=>{n.querySelector(a).focus()})))})),o||t.addEvent(n,"click",(t=>t.stopPropagation())),t.addEvent(t.player.getElement(),"mouseleave",u),t.addEvent(t.$selector,"keydown",(function(e){e.stopPropagation();const n=e.keyCode,i=document.activeElement;if(27===n)return e.preventDefault(),u(),void t.$button.focus();if(39===n)return e.preventDefault(),void(i.classList.value.includes("__more")&&i.click());if(37!==n){if(40===n){e.preventDefault();let t=i.nextElementSibling;return t=d(t,"nextElementSibling"),t=p(t,"firstElementChild"),t||(t=c(t,"nextElementSibling")),void(t&&t.focus())}if(38===n){e.preventDefault();let t=i.previousElementSibling;t=c(t,"previousElementSibling"),t=d(t,"previousElementSibling"),t=p(t,"lastElementChild"),t&&t.focus()}}else{e.preventDefault();const n=t.$selector.querySelectorAll('button[class$="__back"]'),i=Array.from(n).find((t=>t.offsetWidth>0||t.offsetHeight>0));i&&i.click()}})),t.bus.on("resizeplayer",u)}function nn(t,e){c(e,(e=>{t[e]=t[e].bind(t)}))}function sn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const on="rmp-ext-cc",rn=`${on}__button`,an=`${on}__selector`,ln=`${an}--open`,hn=`${an}--main-step`,cn=`${an}--settings-step`,pn=`${an}--additional-step`,dn=`${an}--translate-step`,un=`${on}__main-step`,gn=`${on}__settings-step`,mn=`${on}__additional-step`,bn=`${on}__item`,yn=`${bn}--checked`,xn=`${on}__settings`,_n=`${xn}--progress`,fn=`${on}__more`,$n=`${on}__current-value`,vn=`${on}__text`,wn=`${vn}--visible`,Cn=`${on}__text-holder`,kn=`${on}__back`,Tn=`${on}__translate-wrapper`,En=`${on}__settings-wrapper`;function Sn(t){S(t,fn);const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Ln(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Mn="rmp-ext-toc",Pn=`${Mn}__button`,An=`${Mn}__selector`,Fn=`${An}--main-step`,zn=`${An}--languages-step`,Nn=`${An}--translate-step`,Rn=`${An}--open`,On=`${Mn}__languages-step`,Hn=`${Mn}__more`,Bn=`${Mn}__back`,Dn=`${Mn}__main-step`,In=`${Mn}__languge-btn`,Vn=`${Mn}__chapters`,jn=`${Mn}__item`,Un=`${Mn}__lang-item`,Wn=`${Un}--checked`,qn=`${Mn}__translate-step`,Gn=`${Mn}__current-value`;function Qn(t){S(t,Hn);const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Yn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Zn="rmp-annotation",Kn=`${Zn}--visible`,Xn=`${Zn}__holder`,Jn=`${Zn}__button`,ti=/(https?:\/\/[^\s]+)/g;function ei({text:t,starts:e,ends:n,top:i,left:s,width:o,height:r,fontsize:a,fontcolor:l,background:h}){return{text:t,top:i,left:s,width:o,height:r,fontsize:a,fontcolor:l,background:h,from:kt(`${e.hh}:${e.mm}:${e.ss}`),to:kt(`${n.hh}:${n.mm}:${n.ss}`)}}const ni="rmp-ext-poster",ii=`${ni}--video`,si=`${ni}--hidden`;function oi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ri="rmp-ext-placeholder",ai=`${ri}--animation`,li=`${ri}__icon`,hi=`${ri}__play-btn`,ci={32:"_togglePlay",37:"_skeepLeft",39:"_skeepRight",38:"_upVolume",40:"_downVolume",74:"_prevFrame",75:"_nextFrame"};let pi,di,ui;var gi="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof t.g&&t.g.global===t.g?t.g:void 0;function mi(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){_i(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function bi(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function yi(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var xi=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),_i=gi.saveAs||("object"!=typeof window||window!==gi?function(){}:"download"in HTMLAnchorElement.prototype&&!xi?function(t,e,n){var i=gi.URL||gi.webkitURL,s=document.createElement("a");e=e||t.name||"download",s.download=e,s.rel="noopener","string"==typeof t?(s.href=t,s.origin!==location.origin?bi(s.href)?mi(t,e,n):yi(s,s.target="_blank"):yi(s)):(s.href=i.createObjectURL(t),setTimeout((function(){i.revokeObjectURL(s.href)}),4e4),setTimeout((function(){yi(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(bi(t))mi(t,e,n);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout((function(){yi(i)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return mi(t,e,n);var s="application/octet-stream"===t.type,o=/constructor/i.test(gi.HTMLElement)||gi.safari,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||s&&o||xi)&&"undefined"!=typeof FileReader){var a=new FileReader;a.onloadend=function(){var t=a.result;t=r?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},a.readAsDataURL(t)}else{var l=gi.URL||gi.webkitURL,h=l.createObjectURL(t);i?i.location=h:location.href=h,i=null,setTimeout((function(){l.revokeObjectURL(h)}),4e4)}});const fi="rmp-ext-download",$i=`${fi}__button`,vi=`${fi}__selector`,wi=`${vi}--open`,Ci=`${vi}--additional`,ki=`${fi}__more`,Ti=`${fi}__main-step`,Ei=`${fi}__additional-step`,Si=`${fi}__back`,Li=`${fi}__download-cc`;function Mi(t){const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Pi(t){return 1!==t.state&&0!==t.state}function Ai(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Fi="rmp-ext-settings",zi=`${Fi}__button`,Ni=`${Fi}__selector`,Ri=`${Ni}--open`,Oi=`${Ni}--additional`,Hi=`${Fi}__main-step`,Bi=`${Fi}__additional-step`,Di=`${Fi}__annotations`,Ii=`${Fi}__quality`,Vi=`${Fi}__playback-rate`,ji=`${Fi}__back`,Ui=`${Fi}__more`,Wi=`${Fi}__current-value`,qi=`${Fi}__item`,Gi=`${qi}--checked`,Qi="annotationslang",Yi={label:"None",srclang:""},Zi=[{rate:.5},{rate:.8},{rate:1,labelKey:"standard-playbackrate"},{rate:1.5},{rate:2},{rate:3,hide:t=>t.isLive},{rate:5,hide:t=>t.isAudio||t.isLive}];function Ki(t){const e=C("span",{class:"arrow"},t);return Me(e,Ee),e}function Xi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ji="rmp-ext-title",ts=`${Ji}__title`;function es(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ns="rmp-ext-prev",is=`${ns}__button`,ss=`${ns}__thumbnail`;function os(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const rs="rmp-ext-next",as=`${rs}__button`,ls=`${rs}__thumbnail`,hs="rmp-ext-buffering",cs=`${hs}--processing`,ps={page_type:"watchpage",player_name:"RavnurPlayer",player_version:"3.3.3",video_stream_type:"on-demand"},ds="rmp-ext-theater",us=`${ds}--exit`,gs=`${ds}--hidden`,ms="rmp-ext-audio-tracks",bs=`${ms}__button`,ys=`${ms}__selector`,xs=`${ys}--open`,_s=`${ms}__item`,fs=`${_s}--checked`,$s=document.createElement("span");function vs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ws="rmp-ext-search--hidden",Cs="rmp-ext-search__item--current";function ks(t){return`cc-${t}`}const Ts="rmp-ext-bottom-next",Es=`${Ts}--hidden`,Ss="rmp-ext-bottom-prev",Ls=`${Ss}--hidden`;function Ms(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ps="rmp-ext-crawl",As=`${Ps}__text`;class Fs extends Zt{constructor(t,e,n){super(t,e,n,[]),Ms(this,"$crawl",void 0),Ms(this,"$intervalId",void 0),this.logger.debug("crawl:extensions:creating"),this.render(),this.logger.debug("crawl:extensions:created"),n.bus.on("fullscreenchanging",(()=>{setTimeout((()=>this.refresh(this.options.crawl,this.options.showCrawl)),100)})),n.bus.on("resizeplayer",(()=>{setTimeout((()=>this.refresh(this.options.crawl,this.options.showCrawl)),100)}))}startAnimation(t=100){if(this.$intervalId)return;const e=document.getElementById("crawlText"),n=document.querySelector(".rmp-ext-crawl").offsetWidth,i=e.offsetWidth;let s=n;this.$intervalId=setInterval((()=>{s--,s<-i&&(s=n),e.style.transform=`translateX(${s}px)`}),t)}render(){this.$crawl=C("div",{class:Ps,"data-testid":"crawl"}),C("div",{id:"crawlText",class:As,title:this.options.crawl,tabindex:0},this.$crawl).innerHTML=zs(this.options.crawl.text)||"",this.$crawl.style.color=this.options.crawl.textColor,this.$crawl.style.backgroundColor=this.options.crawl.backgroundColor,this.toggle(this.options.showCrawl),setTimeout((()=>this.startAnimation(this.options.crawl.speed)))}getOuter(){return this.$crawl}toggle(t){this.$crawl.style.display=t?"block":"none"}refresh(t,e){this.$crawl&&(document.getElementById("crawlText").innerHTML=zs(t.text)||"",this.$crawl.style.color=t.textColor,this.$crawl.style.backgroundColor=t.backgroundColor,clearInterval(this.$intervalId),this.$intervalId=null,this.toggle(e),e&&this.startAnimation(t.speed))}destroy(){super.destroy(),this.$crawl&&(this.$crawl.parentNode.removeChild(this.$crawl),this.$crawl=null,clearInterval(this.$intervalId),this.$intervalId=null)}}function zs(t){return t.replace(/(\r\n|\n|\r)/gm,"").replace(/<br\s*[\/]?>/gi,"")}const Ns="rmp-ext-live",Rs=`${Ns}--live`,Os="rmp-ext-error",Hs=`${Os}--hidden`,Bs=`${Os}__content`,Ds=[["showTitle",class extends Zt{constructor(t,e,n){var i,s;super(t,e,n),s=void 0,(i="$outer")in this?Object.defineProperty(this,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[i]=s,this.logger.debug("title:extension:creating"),this.render(),this.logger.debug("title:extension:created")}render(){this.$outer=C("div",{class:Ji,"data-testid":"title"}),C("span",{class:ts,title:this.options.title,tabindex:0},this.$outer).textContent=this.options.title||""}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],[!0,class extends Zt{constructor(t,e,n){var i,s;super(t,e,n,["seeking","waiting","seeked","canplay","playing","timeupdate"]),s=void 0,(i="_timerId")in this?Object.defineProperty(this,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[i]=s,this.logger.debug("buffering:extension:creating"),this.render(),n.isMobile||this.startProcessing(),this.logger.debug("buffering:extension:created")}onWaiting(){this.startProcessing()}onSeeking(){this.startProcessing()}startProcessing(){clearTimeout(this._timerId),this._timerId=setTimeout((()=>S(this.$outer,cs)),this.options.bufferingTimeout)}onTimeupdate(){this.hideProcessing()}onSeeked(){this.hideProcessing()}onCanplay(){this.hideProcessing()}onPlaying(){this.hideProcessing()}render(){this.$outer=C("div",{class:hs}),Me(C("span",{class:`${hs}__message`},this.$outer),"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",{})}getOuter(){return this.$outer}hideProcessing(){clearTimeout(this._timerId),L(this.$outer,cs)}destroy(){super.destroy(),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null}}],["showPoster",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("poster:extension:creating"),this._hidePoster=this._hidePoster.bind(this),this.render(),this.logger.debug("poster:extension:created")}render(){this.$outer=C("div",{class:ni,tabindex:-1}),C("img",{src:this.options.poster},this.$outer).setAttribute("aria-label",this.options.title),this.options.isAudio||(S(this.$outer,ii),this.bus.on("play",this._hidePoster))}_hidePoster(){S(this.$outer,si)}getOuter(){return this.$outer}destroy(){this.bus.off("play",this._hidePoster),super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],["showError",class extends Zt{constructor(t,e,n){super(t,e,n,["error"]),this.logger.debug("error:extension:creating"),this.onError=this.onError.bind(this),this.render(),this.logger.debug("error:extension:created")}render(){this.$outer=C("div",{class:`${Os} ${Hs}`,tabindex:-1}),Me(this.$outer,"M7.493 0.015 C 7.442 0.021,7.268 0.039,7.107 0.055 C 5.234 0.242,3.347 1.208,2.071 2.634 C 0.660 4.211,-0.057 6.168,0.009 8.253 C 0.124 11.854,2.599 14.903,6.110 15.771 C 8.169 16.280,10.433 15.917,12.227 14.791 C 14.017 13.666,15.270 11.933,15.771 9.887 C 15.943 9.186,15.983 8.829,15.983 8.000 C 15.983 7.171,15.943 6.814,15.771 6.113 C 14.979 2.878,12.315 0.498,9.000 0.064 C 8.716 0.027,7.683 -0.006,7.493 0.015 M8.853 1.563 C 9.967 1.707,11.010 2.136,11.944 2.834 C 12.273 3.080,12.920 3.727,13.166 4.056 C 13.727 4.807,14.142 5.690,14.330 6.535 C 14.544 7.500,14.544 8.500,14.330 9.465 C 13.916 11.326,12.605 12.978,10.867 13.828 C 10.239 14.135,9.591 14.336,8.880 14.444 C 8.456 14.509,7.544 14.509,7.120 14.444 C 5.172 14.148,3.528 13.085,2.493 11.451 C 2.279 11.114,1.999 10.526,1.859 10.119 C 1.618 9.422,1.514 8.781,1.514 8.000 C 1.514 6.961,1.715 6.075,2.160 5.160 C 2.500 4.462,2.846 3.980,3.413 3.413 C 3.980 2.846,4.462 2.500,5.160 2.160 C 6.313 1.599,7.567 1.397,8.853 1.563 M7.706 4.290 C 7.482 4.363,7.355 4.491,7.293 4.705 C 7.257 4.827,7.253 5.106,7.259 6.816 C 7.267 8.786,7.267 8.787,7.325 8.896 C 7.398 9.033,7.538 9.157,7.671 9.204 C 7.803 9.250,8.197 9.250,8.329 9.204 C 8.462 9.157,8.602 9.033,8.675 8.896 C 8.733 8.787,8.733 8.786,8.741 6.816 C 8.749 4.664,8.749 4.662,8.596 4.481 C 8.472 4.333,8.339 4.284,8.040 4.276 C 7.893 4.272,7.743 4.278,7.706 4.290 M7.786 10.530 C 7.597 10.592,7.410 10.753,7.319 10.932 C 7.249 11.072,7.237 11.325,7.294 11.495 C 7.388 11.780,7.697 12.000,8.000 12.000 C 8.303 12.000,8.612 11.780,8.706 11.495 C 8.763 11.325,8.751 11.072,8.681 10.932 C 8.616 10.804,8.460 10.646,8.333 10.580 C 8.217 10.520,7.904 10.491,7.786 10.530",{class:"error",width:800,height:800,viewBox:"0 0 16 16"}),C("div",{class:Bs},this.$outer).textContent=this.$t("error"),this.logger.debug("error:extension:rendered")}onError(){this.logger.debug("error:extension:onError"),L(this.$outer,Hs)}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],["showBackward",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("backward:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.backward.bind(this)),this.logger.debug("backward:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-backward"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("backward")}))),Me(this.$el,ve)}backward(){this.player.setCurrentTime(this.player.getCurrentTime()-this.options.skipDelta),this.bus.emit("heartbeatextensions")}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showPrevFrame",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("prevframe:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.prevframe.bind(this)),this.logger.debug("prevframe:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-prev-frame"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("prevframe")}))),Me(this.$el,ke)}prevframe(){this.player.prevFrame()}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showBottomPrev",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("bottom-prev:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$el,"click",(()=>i.emit("prevtrack"))),this.logger.debug("bottom-prev:extension:created")}render(){this.$el=C("button",{type:"button",class:`${Ss}`}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("prev")}))),Me(this.$el,ke),this.player.options.prevTrackTitle||this.$el.classList.add(Ls)}getElement(){return this.$el}destroy(){super.destroy(),this.$el&&(this.$el.parentNode.removeChild(this.$el),this.$el=null)}}],["showPlay",class extends Zt{constructor(t,e,n){super(t,e,n,["pause","play","ended","seeking"]),this.logger.debug("play:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),this.logger.debug("play:extension:created")}render(){this.$el=C("button",{type:"button",class:`${Ne} ${Oe}`}),setTimeout((()=>{ze(this,{$button:this.$el,text:()=>this.player.isEnded()?this.$t("replay"):this.player.isPaused()?this.$t("play"):this.$t("pause")})})),Me(this.$el,$e,{class:"play"}),Me(this.$el,"M6 19h4V5H6v14zm8-14v14h4V5h-4z",{class:"pause"}),Me(this.$el,"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",{class:"replay"})}toggle(){this.player.isPaused()||this.player.isEnded()?this.player.play():this.player.pause()}onPause(){this.$el.setAttribute("aria-label","Play"),L(this.$el,Re),L(this.$el,He),S(this.$el,Oe)}onPlay(){this.$el.setAttribute("aria-label","Pause"),L(this.$el,Oe),L(this.$el,He),S(this.$el,Re)}onEnded(){this.options.playLoop?this.player.play():(this.$el.setAttribute("aria-label","Reply"),L(this.$el,Oe),L(this.$el,Re),S(this.$el,He))}onSeeking(){L(this.$el,He),L(this.$el,Oe),L(this.$el,Re),this.player.isPaused()?S(this.$el,Oe):S(this.$el,Re)}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showBottomNext",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("bottom-next:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$el,"click",(()=>i.emit("nexttrack"))),this.logger.debug("bottom-next:extension:created")}render(){this.$el=C("button",{type:"button",class:`${Ts}`}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("next")}))),Me(this.$el,Ce),this.player.options.nextTrackTitle||this.$el.classList.add(Es)}getElement(){return this.$el}destroy(){super.destroy(),this.$el&&(this.$el.parentNode.removeChild(this.$el),this.$el=null)}}],["showNextFrame",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("nextframe:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.nextframe.bind(this)),this.logger.debug("nextframe:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-next-frame"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("nextframe")}))),Me(this.$el,Ce)}nextframe(){this.player.nextFrame()}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showForward",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("forward:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.forward.bind(this)),this.logger.debug("forward:extension:created")}render(){this.$el=C("button",{type:"button",class:"rmp-ext-forward"}),setTimeout((()=>ze(this,{$button:this.$el,text:this.$t("forward")}))),Me(this.$el,we)}forward(){this.player.setCurrentTime(this.player.getCurrentTime()+this.options.skipDelta),this.bus.emit("heartbeatextensions")}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showVolume",class extends Zt{constructor(t,e,n){var i,s;super(t,e,n,["volumechange","loadedmetadata"]),s=[],(i="_dragNdropTokens")in this?Object.defineProperty(this,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):this[i]=s,this.logger.debug("volume:extension:creating"),this.onHandleMouseUp=this.onHandleMouseUp.bind(this),this.onHandleMouseDown=this.onHandleMouseDown.bind(this),this.onHandleMouseMove=this.onHandleMouseMove.bind(this),this.onHandleEsqKey=this.onHandleEsqKey.bind(this),this.render(),this.addEvent(this.$button,"click",this.toggle.bind(this)),this.addEvent(this.$slider,"click",this.changeVolume.bind(this)),this.addEvent(this.$handle,"mousedown",this.onHandleMouseDown),function(t,{$button:e,$selector:n,SELECTOR_OPEN_CN:i}){t.addEvent(e,"click",(function(){M(n,i),Kt(t.player,e,n)}));let s=0;function o(){S(n,i),Kt(t.player,e,n)}t.addEvent(t.getElement(),"mouseleave",(function(){clearTimeout(s),L(n,i)})),t.addEvent(e,"mouseenter",(()=>s=setTimeout(o,200)))}(this,{$button:this.$button,$selector:this.$selector,SELECTOR_OPEN_CN:je,closeOnClick:!1}),this.refreshHandle(),this.logger.debug("volume:extension:created")}render(){this.$el=C("span",{class:Be}),this.$button=C("button",{type:"button",class:De},this.$el),this.$button.setAttribute("aria-label","Volume"),this.$button.addEventListener("keydown",this.onHandleEsqKey),this.$selector=C("div",{class:Ve},this.$el),this.$slider=C("span",{class:We},this.$selector),C("span",{class:Qe},this.$slider),this.$progress=C("span",{class:Ge},this.$slider),this.$handle=C("span",{class:qe},this.$slider),Me(this.$button,Se,{class:"muted"}),Me(this.$button,Le,{class:"unmuted"})}toggle(){const t=!this.player.isMuted();if(this.player.setMuted(t),vt(Ze,t),!t){const t=Math.max(this.player.getVolume(),.1);this.player.setVolume(t),vt(Ye,t)}}_getVolumeByEvent(t){const e=this.$slider.getBoundingClientRect();return(1-(function(t){return t.clientY}(t)-e.top)/this.$slider.offsetHeight).toFixed(2)}changeVolume(t){const e=this._getVolumeByEvent(t);this.updateVolume(e)}updateVolume(t){t=Ke(t),this.logger.debug("changevolume",t),t?(this.player.setVolume(t),this.player.setMuted(!1),vt(Ye,t),vt(Ze,!1)):(this.player.setMuted(!0),vt(Ze,!0))}onVolumechange(){this.player.isMuted()?S(this.$button,Ie):L(this.$button,Ie),this.refreshHandle()}onLoadedmetadata(){const t=this.options.muted;this.player.setVolume(parseFloat(wt(Ye,"1.0"))),"boolean"==typeof t?this.player.setMuted(t):this.player.setMuted("true"===wt(Ze,"false"),!0)}refreshHandle(){this._refreshHadle4volume(this.player.getVolume())}_refreshHadle4volume(t){const e=this.player.isMuted()?"100%":100*(1-t)+"%";this.$handle.style.top=this.$progress.style.top=e}onHandleMouseDown(){S(this.$selector,Ue),this._dragNdropTokens.push(k(document,"mouseup",this.onHandleMouseUp)),this._dragNdropTokens.push(k(document,"mousemove",this.onHandleMouseMove))}onHandleMouseUp(t){c(this._dragNdropTokens,T),this._dragNdropTokens.length=0,this.changeVolume(t),L(this.$selector,Ue)}onHandleMouseMove(t){let e=this._getVolumeByEvent(t);e=Ke(e),this._refreshHadle4volume(e)}onHandleEsqKey(t){27===t.keyCode&&(L(this.$selector,je),t.preventDefault())}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$button&&this.$button.removeEventListener("keydown",this.onHandleEsqKey),this.$el=null,this.$button=null,this.$selector=null,this.$slider=null,this.$progress=null,this.$handle=null}}],["isLive",class extends Zt{constructor(t,e,n){super(t,e,n,["timeupdate","progress"]),this.logger.debug("play:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),this.logger.debug("live:extension:created")}render(){this.$el=C("button",{type:"button",class:Ns}),Me(this.$el,"M 8.0136719 7.0292969 A 1.0001 1.0001 0 0 0 7.3222656 7.3222656 C 2.7995047 11.846068 -1.1842379e-15 18.102792 0 25 C 0 31.897208 2.7995047 38.153932 7.3222656 42.677734 A 1.0001 1.0001 0 0 0 8.7363281 42.677734 L 11.570312 39.84375 A 1.0001 1.0001 0 0 0 11.570312 38.429688 C 8.1286602 34.987084 6 30.242812 6 25 C 6 19.757188 8.1297921 15.013788 11.572266 11.572266 A 1.0001 1.0001 0 0 0 11.572266 10.158203 L 8.7363281 7.3222656 A 1.0001 1.0001 0 0 0 8.0136719 7.0292969 z M 41.957031 7.0292969 A 1.0001 1.0001 0 0 0 41.263672 7.3222656 L 38.427734 10.158203 A 1.0001 1.0001 0 0 0 38.427734 11.572266 C 41.870208 15.013788 44 19.757188 44 25 C 44 30.242812 41.870208 34.986212 38.427734 38.427734 A 1.0001 1.0001 0 0 0 38.427734 39.841797 L 41.263672 42.677734 A 1.0001 1.0001 0 0 0 42.677734 42.677734 C 47.201645 38.154865 50 31.897208 50 25 C 50 18.102792 47.200495 11.846068 42.677734 7.3222656 A 1.0001 1.0001 0 0 0 41.957031 7.0292969 z M 8.0976562 9.5117188 L 9.5195312 10.933594 C 6.1269359 14.664061 4 19.575176 4 25 C 4 30.424712 6.1260807 35.337173 9.5175781 39.068359 L 8.0976562 40.488281 C 4.3450168 36.394537 2 30.995061 2 25 C 2 19.004939 4.3450168 13.605463 8.0976562 9.5117188 z M 41.902344 9.5117188 C 45.654983 13.605463 48 19.004939 48 25 C 48 30.995061 45.655695 36.395442 41.902344 40.488281 L 40.480469 39.066406 C 43.873064 35.335939 46 30.424824 46 25 C 46 19.575176 43.873064 14.664061 40.480469 10.933594 L 41.902344 9.5117188 z M 14.382812 13.398438 A 1.0001 1.0001 0 0 0 13.691406 13.691406 C 10.796092 16.587786 9 20.593819 9 25 C 9 29.406181 10.796092 33.412214 13.691406 36.308594 A 1.0001 1.0001 0 0 0 15.105469 36.308594 L 17.931641 33.482422 A 1.0001 1.0001 0 0 0 17.931641 32.068359 C 16.119902 30.255711 15 27.761761 15 25 C 15 22.238239 16.119902 19.744289 17.931641 17.931641 A 1.0001 1.0001 0 0 0 17.931641 16.517578 L 15.105469 13.691406 A 1.0001 1.0001 0 0 0 14.382812 13.398438 z M 35.587891 13.398438 A 1.0001 1.0001 0 0 0 34.894531 13.691406 L 32.068359 16.517578 A 1.0001 1.0001 0 0 0 32.068359 17.931641 C 33.880098 19.744289 35 22.238239 35 25 C 35 27.761761 33.880098 30.255711 32.068359 32.068359 A 1.0001 1.0001 0 0 0 32.068359 33.482422 L 34.894531 36.308594 A 1.0001 1.0001 0 0 0 36.308594 36.308594 C 39.203908 33.412214 41 29.406181 41 25 C 41 20.593819 39.203908 16.587786 36.308594 13.691406 A 1.0001 1.0001 0 0 0 35.587891 13.398438 z M 14.466797 15.880859 L 15.947266 17.361328 C 14.184764 19.450917 13 22.061346 13 25 C 13 27.938654 14.184764 30.549083 15.947266 32.638672 L 14.466797 34.119141 C 12.335969 31.66133 11 28.50273 11 25 C 11 21.49727 12.335969 18.33867 14.466797 15.880859 z M 35.533203 15.880859 C 37.664031 18.33867 39 21.49727 39 25 C 39 28.50273 37.664031 31.66133 35.533203 34.119141 L 34.052734 32.638672 C 35.815236 30.549083 37 27.938654 37 25 C 37 22.061346 35.815236 19.450917 34.052734 17.361328 L 35.533203 15.880859 z M 25 18 C 21.134 18 18 21.134 18 25 C 18 28.866 21.134 32 25 32 C 28.866 32 32 28.866 32 25 C 32 21.134 28.866 18 25 18 z M 25 20 C 27.757 20 30 22.243 30 25 C 30 27.757 27.757 30 25 30 C 22.243 30 20 27.757 20 25 C 20 22.243 22.243 20 25 20 z",{class:"broadcast-off",width:50,height:50,viewBox:"0 0 50 50"}),Me(this.$el,"M 8.03125 8.4570312 C 7.770375 8.4589063 7.5103125 8.5625312 7.3203125 8.7695312 C 3.3953125 13.041531 1 18.741 1 25 C 1 31.259 3.3953125 36.958469 7.3203125 41.230469 C 7.7003125 41.644469 8.3569063 41.643094 8.7539062 41.246094 L 10.882812 39.117188 C 11.265812 38.734187 11.263391 38.124656 10.900391 37.722656 C 7.8553906 34.352656 6 29.889 6 25 C 6 20.111 7.8553906 15.647344 10.900391 12.277344 C 11.263391 11.875344 11.265813 11.266812 10.882812 10.882812 L 8.7539062 8.7539062 C 8.5554063 8.5554063 8.292125 8.4551562 8.03125 8.4570312 z M 41.96875 8.4570312 C 41.707625 8.4554062 41.444594 8.5554062 41.246094 8.7539062 L 39.115234 10.884766 C 38.732234 11.267766 38.734656 11.875344 39.097656 12.277344 C 42.143656 15.646344 44 20.111 44 25 C 44 29.889 42.144609 34.352656 39.099609 37.722656 C 38.736609 38.124656 38.734188 38.733187 39.117188 39.117188 L 41.246094 41.246094 C 41.643094 41.643094 42.299687 41.643469 42.679688 41.230469 C 46.604687 36.958469 49 31.259 49 25 C 49 18.741 46.604687 13.041531 42.679688 8.7695312 C 42.489688 8.5625312 42.229875 8.4586563 41.96875 8.4570312 z M 35.625 14.837891 C 35.355125 14.824516 35.079594 14.920406 34.871094 15.128906 L 32.740234 17.259766 C 32.381234 17.618766 32.341969 18.196938 32.667969 18.585938 C 34.123969 20.323937 35 22.561 35 25 C 35 27.439 34.123969 29.675109 32.667969 31.412109 C 32.341969 31.801109 32.381234 32.379281 32.740234 32.738281 L 34.871094 34.871094 C 35.288094 35.288094 35.967516 35.250687 36.353516 34.804688 C 38.625516 32.175687 40 28.748 40 25 C 40 21.252 38.625516 17.824312 36.353516 15.195312 C 36.160516 14.972313 35.894875 14.851266 35.625 14.837891 z M 14.375 14.839844 C 14.105125 14.853219 13.839484 14.974266 13.646484 15.197266 C 11.374484 17.825266 10 21.252 10 25 C 10 28.748 11.374484 32.175688 13.646484 34.804688 C 14.032484 35.250687 14.711906 35.288094 15.128906 34.871094 L 17.259766 32.740234 C 17.618766 32.381234 17.658031 31.803062 17.332031 31.414062 C 15.876031 29.676062 15 27.439 15 25 C 15 22.561 15.876031 20.324891 17.332031 18.587891 C 17.658031 18.198891 17.618766 17.620719 17.259766 17.261719 L 15.128906 15.128906 C 14.920406 14.920406 14.644875 14.826469 14.375 14.839844 z M 25 19 C 21.686 19 19 21.686 19 25 C 19 28.314 21.686 31 25 31 C 28.314 31 31 28.314 31 25 C 31 21.686 28.314 19 25 19 z",{class:"broadcast-on",width:50,height:50,viewBox:"0 0 50 50"}),setTimeout((()=>{const t=this.player.isLive()?"Live":"Go to live";ze(this,{$button:this.$el,text:t})}),100)}toggle(){this.goToLive()}goToLive(){this.player.goToLive(),S(this.$el,Rs)}onTimeupdate(){this.player.isLive()?(this.$el.setAttribute("aria-label","Live"),S(this.$el,Rs)):(this.$el.setAttribute("aria-label","Go to live"),L(this.$el,Rs))}onProgress(){this.player.isLive()?(this.$el.setAttribute("aria-label","Live"),S(this.$el,Rs)):(this.$el.setAttribute("aria-label","Go to live"),L(this.$el,Rs))}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showProgress",class extends Zt{constructor(t,e,n){super(t,e,n,["progress","timeupdate","loadedmetadata","canplaythrough","statechanged","c2pafragment","durationchange"]),Jt(this,"thumbnails",[]),Jt(this,"_dragNdropTokens",[]),Jt(this,"_isLoadedMetadata",!1),Jt(this,"_chapters",[]),Jt(this,"_bubbles",[]),this.logger.debug("progress:extension:creating"),this.onLeave=this.onLeave.bind(this),this.onHover=this.onHover.bind(this),this.onHandleMouseUp=this.onHandleMouseUp.bind(this),this.onHandleMouseDown=this.onHandleMouseDown.bind(this),this.onHandleMouseMove=this.onHandleMouseMove.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.render(),this.addEvent(this.$bar,"click",(e=>{if((e.target||e.srcElement)===this.$handle)e.stopPropagation();else{const n=this._getTimeByEventPosition(e);t.setCurrentTime(n),this._moveHandle2time(n)}})),this.addEvent(this.$bar,"mouseleave",this.onLeave),this.addEvent(this.$bar,"mousemove",this.onHover),this.addEvent(this.$handle,"mousedown",this.onHandleMouseDown),this.addEvent(this.$handle,"touchstart",this.onTouchStart),b(n.preview)&&St(n.preview,(t=>this.thumbnails=t)),this.logger.debug("progress:extension:created")}render(){this.$el=C("span",{class:te});const t=this.player.$el.parentNode.querySelector(".rmp-extensions");this.$bar=C("span",{class:ie,tabindex:0},t),C("span",{class:se},this.$bar),C("span",{class:re},this.$bar),this.$handle=C("span",{class:oe},this.$bar),this.$current=C("span",{class:ee},this.$el),C("span",{},this.$el).textContent="/",this.$duration=C("span",{class:ne},this.$el),this.$c2paStatus=C("span",{class:he},this.$bar),this.$playProgress=C("span",{class:ae},this.$bar),this.$progress=C("span",{class:le},this.$bar),this.$tooltip=C("div",{class:pe},this.$el),this.$thumbnail=C("div",{class:ue},this.$tooltip),this.$thumbnailTime=C("span",{class:ge},this.$tooltip),this.options.isProgressLiveStream&&(S(this.$el,me),S(this.$bar,me)),this.options.isLive&&S(this.$el,be),this.options.isMobile&&(this.$tooltip.style.visibility="hidden")}onTimeupdate(){f(this._dragNdropTokens)||(this.options.isLive&&this.player?.isLive()?(this.$progress.style.width="100%",this.$handle.style.left=this.$playProgress.style.width="100%",this.$current.textContent=xe(+this._getCurrentTime()),this.$bar.setAttribute("aria-label",this._getAriaLabelValue())):this._moveHandle2time(this._getCurrentTime()))}_moveHandle2time(t){const e=this.player.getDuration(),{timecode:n,clip:i}=this.options;if(b(t)&&e){let s;if(this.$current.textContent=xe(+t),this.$bar.setAttribute("aria-label",this._getAriaLabelValue()),i){let[o,r]=i;o=o||0,r=r?r+n:e+o,s=(t-o-n)/(r-o-n)}else s=(t-n)/(e-n);const o=(100*s).toFixed(2)+"%";this.$handle.style.left=this.$playProgress.style.width=o}}onProgress(){this.$duration.textContent=xe(this._getDuration()),this.$progress.style.width=100*this.player.getBufferedPercent()+"%"}onHandleMouseDown(){this._dragNdropTokens.push(k(document,"mouseup",this.onHandleMouseUp)),this._dragNdropTokens.push(k(document,"mousemove",this.onHandleMouseMove))}onTouchStart(){this._dragNdropTokens.push(k(document,"touchend",this.onTouchEnd)),this._dragNdropTokens.push(k(document,"touchmove",this.onTouchMove))}onHandleMouseUp(t){t.stopPropagation(),t.preventDefault(),c(this._dragNdropTokens,T),this._dragNdropTokens.length=0,this.player.setCurrentTime(this._getTimeByEventPosition(t))}onTouchMove(t){t.stopPropagation(),t.preventDefault();const e=this.$bar.getBoundingClientRect(),n=t.touches[0];let i=Math.max(e.left,n.clientX);i=Math.min(e.right,i),i-=e.left,i=i/this.$bar.offsetWidth*100+"%",this.$handle.style.left=this.$playProgress.style.width=i;const s=this._getTimeByEventPosition(n);this.player.setCurrentTime(s),this.bus.emit("heartbeatextensions")}onTouchEnd(t){t.stopPropagation(),t.preventDefault(),c(this._dragNdropTokens,T),this._dragNdropTokens.length=0}onHandleMouseMove(t){const e=this.$bar.getBoundingClientRect();let n=Math.max(e.left,t.clientX);n=Math.min(e.right,n),n-=e.left,n=n/this.$bar.offsetWidth*100+"%",this.$handle.style.left=this.$playProgress.style.width=n}onDurationchange(){this.options.isLive||this.isProgressLiveStream||this._updateTimes()}onCanplaythrough(){this._updateTimes()}onLoadedmetadata(){this._updateTimes()}onC2pafragment(t){t.valid||setTimeout((()=>{const e=this.player.getDuration(),n=t.start/e*100,i=t.duration/e*100,s=C("span",{class:ce},this.$c2paStatus);s.style.left=n+"%",s.style.width=i+"%"}),1e3)}_getAriaLabelValue(){const t=this.$current.textContent,e=this.$duration.textContent;return`Current: ${this._timeCodeToSentence(t)} Total: ${this._timeCodeToSentence(e)}`}_timeCodeToSentence(t){const e=t.split(":"),n=["minutes","seconds"];e.length>2&&n.unshift("hours");const i=e.map(((t,e)=>`${"0"===t.charAt(0)?t.charAt(1):t} ${n[e]}`));return i.join(" ")}_getDuration(){const{clip:t,timecode:e}=this.options,n=this.player.getDuration();if(t){let[i,s]=t;return i=i||0,s?s+e:n+i}return n}_getCurrentTime(){const t=this.player.getCurrentTime(),{clip:e,timecode:n}=this.options,[i]=e||[0];return Math.max(t,i+n)}onLeave(){this.$tooltip.classList.remove(de)}onHover(t){let e;const{useOriginTimeForPreview:n,timecode:i}=this.options,s=t.target||t.srcElement;if(E(s,ye)){const t=parseInt(s.getAttribute("data-idx"),10),n=this._chapters[t];e=n.from,this.$thumbnailTime.innerHTML=n.text||n.title}else e=this._getTimeByEventPosition(t),this.$thumbnailTime.textContent=xe(e);if(_(this.thumbnails))return void this._popoverPosition(t);const o=n?e-i:e,r=A(this.thumbnails,(({from:t,to:e})=>m(o,t,e)));if(r){const[t,e]=r.text.split("#");this.$thumbnail.style.backgroundImage=`url("${t}")`;const n=N(e.split("=")).split(","),i=n.pop().trim(),s=n.pop().trim(),o=n.pop().trim(),a=n.pop().trim();this.$thumbnail.style.width=`${s}px`,this.$thumbnail.style.height=`${i}px`,this.$thumbnail.style.backgroundPosition=`-${a}px -${o}px`,this.$thumbnail.style.marginBottom="7px"}else this.$thumbnail.style.height="",this.$thumbnail.style.width="",this.$thumbnail.style.marginBottom="";this._popoverPosition(t)}_updateTimes(){this.$duration.textContent=xe(this._getDuration()),this.$current.textContent=xe(this._getCurrentTime()),this.$bar.setAttribute("aria-label",this._getAriaLabelValue()),this._isLoadedMetadata=!0,this._renderChaptersIfNeeded()}_popoverPosition(t){Kt(this.player,this._offsetX(t),this.$tooltip),this.$tooltip.classList.add(de)}onStatechanged(t,e){(t.toc.lang!==e.toc.lang||t.toc.timedata!==e.toc.timedata)&&this._refreshTOC()}_refreshTOC(){const t=this.state.getTOCTimeData(),e=this.state.getTOCLang();this._chapters=e?t:[],this._renderChaptersIfNeeded()}_renderChaptersIfNeeded(){if(c(this._bubbles,(t=>this.$bar.removeChild(t))),this._bubbles.length=0,_(this._chapters)||!this._isLoadedMetadata)return;const t=this.player.getDuration();c(this._chapters,((e,n)=>{const i=C("span",{class:ye,"data-idx":n},this.$bar);i.style.left=(100*e.from/t).toFixed(0)+"%",this.addEvent(i,"click",(t=>{t.stopPropagation(),this._moveHandle2time(e.from),this.player.setCurrentTime(e.from)})),this._bubbles.push(i)}))}_getTimeByEventPosition(t){const e=this.player.getDuration(),{timecode:n,clip:i}=this.options,s=this._getPercentageByPosition(t);if(i){let[t,o]=i;return t=t||0,o=o||e+t-n,((o-t)*s+t+n).toFixed(2)}return parseFloat(((e-n)*s+n).toFixed(2))}_getPercentageByPosition(t){const e=this.$bar.getBoundingClientRect();let n=Math.max(e.left,t.clientX);return n=Math.min(e.right,n),n-=e.left,(n/this.$bar.offsetWidth).toFixed(2)}_offsetX(t){if(!this.player.getElement())return;const e=this.$bar.getBoundingClientRect(),n=this.player.getElement().parentNode.getBoundingClientRect();let i=Math.max(e.left,t.clientX);return i=Math.min(e.right,i),i-=n.left,i}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null,this.$bar=null,this.$handle=null,this.$current=null,this.$duration=null,this.$playProgress=null,this.$progress=null,this.$tooltip=null,this.$thumbnail=null,this.$thumbnailTime=null}}],["showAnnotations",class extends Zt{constructor(t,e,n){super(t,e,n,["timeupdate","annotationslang"]),Yn(this,"annotations",[]),Yn(this,"sources",[]),Yn(this,"current",null),this.logger.debug("annotations:extension:creating"),this.render(),this.init(),this.logger.debug("annotations:extension:created")}init(){this.addEvent(this.$button,"click",(()=>{H(this.annotations,this.current),L(this.$outer,Kn),this.current=null,this.player.focus()}));const{annotations:t}=this.options;this.sources=i(t)?t:[t]}onAnnotationslang(t){this.annotations.length=0,this.current=null,this.onTimeupdate();const e=A(this.sources,(e=>e.srclang===t));e&&Ct({url:e.src,success:t=>{try{this.annotations=F(JSON.parse(t.data),ei),this.onTimeupdate()}catch(e){this.logger.error("Error occurred when parsing the response",t.data,e)}}})}render(){this.$outer=C("div",{class:Zn}),this.$button=C("button",{type:"button",class:Jn},this.$outer),this.$button.setAttribute("aria-label","Close annotation"),Me(this.$button,"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",{width:16,height:16}),this.$outerHolder=C("div",{class:Xn},this.$outer)}onTimeupdate(){const t=this.player.getCurrentTime();var e,n;b(this.current)&&m(t,this.current.from,this.current.to)||(this.current=A(this.annotations,(e=>m(t,e.from,e.to))),b(this.current)?(e=this.$outer,n=this.current,e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`,e.style.fontSize=n.fontsize,e.style.color=`#${n.fontcolor}`,e.style.backgroundColor=`#${n.background}`,function(t,e){t.textContent=e;let n=function(t){return t.replace(ti,'<a href="$1">$1</a>')}(t.innerHTML);n=function(t){return t.replace(/\n/g,"<br />")}(n),t.innerHTML=n}(this.$outerHolder,this.current.text),S(this.$outer,Kn)):L(this.$outer,Kn))}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer&&(this.$outer.parentNode.removeChild(this.$outer),this.$outer=null)}}],["showTheaterMode",class extends Zt{constructor(t,e,n){var i;super(t,e,n,["statechanged"]),i=void 0,"$el"in this?Object.defineProperty(this,"$el",{value:i,enumerable:!0,configurable:!0,writable:!0}):this.$el=i,this.logger.debug("theater:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),M(this.$el,us,e.isTheaterMode()),this.logger.debug("theater:extension:created")}render(){this.$el=C("button",{type:"button",class:ds}),Me(this.$el,"M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z",{class:`${ds}__icon`}),Me(this.$el,"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z",{class:`${ds}__exit-icon`});const t=()=>this.$t(this.state.isTheaterMode()?"exit-theater":"theater");setTimeout((()=>ze(this,{$button:this.$el,text:t})))}toggle(){this.bus.emit("theaterchanging")}onStatechanged(t){M(this.$el,us,t.isTheaterMode),M(this.$el,gs,t.isFullScreen)}getElement(){return this.$el}}],["showClosedCaptions",class extends Zt{constructor(t,e,n){super(t,e,n,["timeupdate","showpopup","statechanged"]),sn(this,"$el",void 0),sn(this,"$button",void 0),sn(this,"$selector",void 0),sn(this,"$text",void 0),sn(this,"$textHolder",void 0),sn(this,"$mainStep",void 0),sn(this,"$embedCaptions",void 0),sn(this,"$settingsStep",void 0),sn(this,"$settings",void 0),sn(this,"$toMain",void 0),sn(this,"$toSettings",void 0),sn(this,"$fontColorSettings",void 0),sn(this,"$backgroundColorSettings",void 0),sn(this,"$fontSizeSettings",void 0),sn(this,"$fontFamilySettings",void 0),sn(this,"$locationSettings",null),sn(this,"$currentColor",void 0),sn(this,"$currentSize",void 0),sn(this,"$currentBgColor",void 0),sn(this,"$currentLocation",void 0),sn(this,"$currentFamily",void 0),sn(this,"$additionalStep",void 0),sn(this,"$additionalBackText",void 0),sn(this,"$additionalStepWrapper",void 0),sn(this,"$translate",void 0),sn(this,"$currentCustomTranslate",void 0),sn(this,"$captions",[]),sn(this,"$translatableCaptions",[]),sn(this,"embedCaptionsAutoShow",!0),this.logger.debug("cc:extension:creating"),this.render(),this.init(),this.logger.debug("cc:extension:created")}init(){nn(this,["_toSettingsPage","_toMainPage","_toColorPage","_toBackgroundColorPage","_toFontFamilyPage","_toSizesPage","_toLocationsPage","_toTranslatePage","_handleEmbedChanged"]),en(this,{$button:this.$button,$selector:this.$selector,SELECTOR_OPEN_CN:ln,heightControl:!0,firstFocusItemSelector:`.${bn}`,toMainFn:this._toMainPage.bind(this)}),ze(this,{$button:this.$button,text:this.$t("cc")}),this.addEvent(this.$settings,"click",this._toSettingsPage),this.addEvent(this.$toMain,"click",this._toMainPage),this.addEvent(this.$toSettings,"click",this._toSettingsPage),this.addEvent(this.$fontColorSettings,"click",this._toColorPage),this.addEvent(this.$backgroundColorSettings,"click",this._toBackgroundColorPage),this.addEvent(this.$fontFamilySettings,"click",this._toFontFamilyPage),this.addEvent(this.$fontSizeSettings,"click",this._toSizesPage),this.$locationSettings&&this.addEvent(this.$locationSettings,"click",this._toLocationsPage),this.$translate&&this.addEvent(this.$translate,"click",this._toTranslatePage),this.player.$el?.textTracks.addEventListener("addtrack",this._handleEmbedChanged),this.player.$el?.textTracks.addEventListener("change",this._handleEmbedChanged),this._toMainPage(),this._refresh(),this.changeLang(this.state.getCCLang())}render(){this.$el=C("div",{class:on}),this.$button=C("button",{type:"button",class:rn},this.$el),this.$selector=C("div",{class:an},this.$el),this.$text=C("span",{class:vn}),this.$textHolder=C("span",{class:Cn},this.$text),this._renderMainPage(),this._renderSettingsPage(),this._renderAdditionalPage()}_handleEmbedChanged(){const t=this.player.getTextTracks(),e=this.state.getCCSources();this.$el.style.display=e.length||t?.length?"block":"none";const n=()=>{const e=C("button",{type:"button",class:bn},this.$embedCaptions);e.textContent="None",this.addEvent(e,"click",(()=>{c(t,(t=>{c(this.$captions,(t=>L(t,yn))),t.mode="disabled",S(e,yn)}))})),this.$captions.push(e)};if(e.length)this.$settings.style.display="block";else{this.$settings.style.display="none";const t=this.$embedCaptions.childNodes[0];t&&"None"===t?.textContent||n()}t?.length&&c(t,(t=>{if(A(this.$captions,(e=>e.textContent===t.label)))return;const e=C("button",{type:"button",class:bn},this.$embedCaptions);e.textContent=t.label,this.addEvent(e,"click",(()=>{c(this.$captions,(t=>L(t,yn))),c(this.$translatableCaptions,(t=>L(t,yn)));const n=this.$captions.findIndex((t=>t===e));S(this.$captions[n],yn),t.mode="showing"})),this.$captions.push(e),this.embedCaptionsAutoShow&&(e.click(),this.embedCaptionsAutoShow=!1)}))}_renderMainPage(){this.$mainStep=C("div",{class:un,tabindex:-1},this.$selector),Me(this.$button,"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z");const t=this.state.getCCSources();this.$el.style.display=t.length?"block":"none";const e=P(t,(t=>3!==t.state&&0!==t.state));c(e,(t=>{const e=C("button",{type:"button",class:bn},this.$mainStep);e.textContent=1===t.state?`${t.label} ${this.$t("unapproved-source")}`:t.label,this.addEvent(e,"click",(()=>this.bus.emit("cclang",t.srclang))),this.$captions.push(e)})),this.$embedCaptions=C("div",{},this.$mainStep);const n=C("button",{type:"button",class:xn},this.$mainStep);this.$translate=n;let i=C("span",{},n);i.textContent=this.$t("translate"),Sn(n),this.$currentCustomTranslate=C("span",{class:$n},this.$translate);const s=e.length!==t.length;n.style.display=s?"block":"none",this.$settings=C("button",{type:"button",class:xn},this.$mainStep),i=C("span",{},this.$settings),i.textContent=this.$t("settings"),Sn(this.$settings)}_rerenderLanguages(t){const{$mainStep:e,$translate:n,$settings:i}=this;if(this.$el.style.display=t.length?"block":"none",!e)return;c(this.$captions,(t=>{e.removeChild(t)})),this.$captions.length=0;const s=P(t,(t=>3!==t.state&&0!==t.state));if(c(s,(t=>{const e=C("button",{type:"button",class:bn},this.$mainStep);e.textContent=1===t.state?`${t.label} ${this.$t("unapproved-source")}`:t.label,this.addEvent(e,"click",(()=>this.bus.emit("cclang",t.srclang))),this.$captions.push(e)})),n){e.removeChild(n);const i=s.length!==t.length;n.style.display=i?"block":"none",w(e,n)}i&&(e.removeChild(i),w(e,i))}_renderSettingsPage(){this.$settingsStep=C("div",{class:gn},this.$selector),this.$toMain=C("button",{type:"button",class:kn},this.$settingsStep),Me(C("span",{class:"arrow"},this.$toMain),Te,{class:"arrow"}),C("span",{},this.$toMain).textContent=this.$t("cc");const t=C("div",{class:`${En} tab-content`},this.$settingsStep);this.$fontColorSettings=C("button",{type:"button"},t);let e=C("span",{},this.$fontColorSettings);e.textContent=this.$t("settings-fontcolor"),Sn(this.$fontColorSettings),this.$currentColor=C("span",{class:$n},this.$fontColorSettings);let n=A(Pt,(t=>t.value===this.state.getCCTextColor()));this.$currentColor.textContent=n&&n.key?this.$t(n.key):"",this.$fontSizeSettings=C("button",{type:"button"},t),e=C("span",{},this.$fontSizeSettings),e.textContent=this.$t("settings-fontsize"),Sn(this.$fontSizeSettings),this.$currentSize=C("span",{class:$n},this.$fontSizeSettings),this.$currentSize.textContent=this.state.getCCFontSize(),this.$fontFamilySettings=C("button",{type:"button"},t),e=C("span",{},this.$fontFamilySettings),e.textContent=this.$t("settings-fontfamily"),Sn(this.$fontFamilySettings),this.$currentFamily=C("span",{class:$n},this.$fontFamilySettings);const i=A(Ft,(t=>t.value===this.state.getCCFontFamily()));if(this.$currentFamily.textContent=i&&i.key?this.$t(i.key):"",this.$backgroundColorSettings=C("button",{type:"button"},t),e=C("span",{},this.$backgroundColorSettings),e.textContent=this.$t("settings-background"),Sn(this.$backgroundColorSettings),this.$currentBgColor=C("span",{class:$n},this.$backgroundColorSettings),n=A(Pt,(t=>t.value===this.state.getCCBgColor())),this.$currentBgColor.textContent=n&&n.key?this.$t(n.key):"",this.options.showCCLayout){const n=C("button",{type:"button"},t);this.$locationSettings=n,e=C("span",{},n),e.textContent=this.$t("settings-captionlocations"),Sn(n),this.$currentLocation=C("span",{class:$n},this.$locationSettings);const i=A(zt,(t=>t.value===this.state.getCCLocation()));this.$currentLocation.textContent=i&&i.key?this.$t(i.key):""}const s=C("div",{class:`${Tn} tab-content`},this.$settingsStep);c(P(this.state.getCCSources(),(t=>3===t.state||0===t.state)),(t=>{const e=C("button",{type:"button",class:bn},s);e.textContent=t.label,this.addEvent(e,"click",(()=>{this.bus.emit("cclang",t.srclang),this._toMainPage()})),this.$translatableCaptions.push(e)}))}_renderAdditionalPage(){this.$additionalStep=C("div",{class:mn},this.$selector),this.$toSettings=C("button",{type:"button",class:kn},this.$additionalStep),Me(C("span",{class:"arrow"},this.$toSettings),Te,{class:"arrow"}),this.$additionalBackText=C("span",{},this.$toSettings),this.$additionalStepWrapper=C("div",{class:"tab-content"},this.$additionalStep)}onStatechanged(t,e){t.cc.sources!==e.cc.sources?(this._rerenderLanguages(t.cc.sources),this.changeLang(t.cc.lang)):t.cc.lang!==e.cc.lang?this.changeLang(t.cc.lang):t.cc.timedata!==e.cc.timedata?this.onLoadingTimedata():t.cc.location===e.cc.location&&t.cc.fontFamily===e.cc.fontFamily&&t.cc.fontSize===e.cc.fontSize&&t.cc.bgcolor===e.cc.bgcolor&&t.cc.color===e.cc.color||this._refresh()}onLoadingTimedata(){const t=this.state.getSelectedCC(),{$currentCustomTranslate:e,$translate:n}=this;e&&n&&(L(n,_n),e.textContent="",t&&!t.state&&(e.textContent=t.label)),this.onTimeupdate()}changeLang(t){c(this.$captions,(t=>L(t,yn))),c(this.$translatableCaptions,(t=>L(t,yn)));const e=this.player.getTextTracks();e?.length&&c(e,(t=>{t.mode="disabled"}));const n=this.state.getCCSources(),i=P(n,(t=>3!==t.state&&0!==t.state)),{$currentCustomTranslate:s,$translate:o}=this;s&&(s.textContent="");let r=O(i,(e=>e.srclang===t));if(-1===r){const e=P(n,(t=>!t.state));r=O(e,(e=>e.srclang===t)),this.$translatableCaptions[r]&&S(this.$translatableCaptions[r],yn),s&&e[r]&&(s.textContent=this.$t("translating")),o&&S(o,_n)}else this.$captions[r]&&S(this.$captions[r],yn),t||L(this.$text,wn)}onTimeupdate(){const t=this.state.getCCLang(),e=this.state.getCCTimeData();if(!t)return;if(_(e))return void L(this.$text,wn);const n=this.player.getCurrentTime(),i=A(e,(({from:t,to:e})=>m(n,t,e)));i?(this.$textHolder.innerHTML=i.text.split("\n").join("<br>"),S(this.$text,wn)):L(this.$text,wn)}onShowpopup(t){t===this.$selector&&(E(this.$selector,hn)?tn(this.player,this.$mainStep):E(this.$selector,cn)?tn(this.player,this.$settingsStep):E(this.$selector,pn)&&tn(this.player,this.$additionalStep))}_toMainPage(){S(this.$selector,hn),L(this.$selector,cn),L(this.$selector,pn),L(this.$selector,dn),tn(this.player,this.$mainStep);const t=document.querySelectorAll(`.${un} > .${bn}`);t[0]&&t[0].focus()}_toSettingsPage(){S(this.$selector,cn),L(this.$selector,hn),L(this.$selector,pn),L(this.$selector,dn),tn(this.player,this.$settingsStep),document.querySelector(`.${kn}`).focus()}_toAdditionalPage(){S(this.$selector,pn),L(this.$selector,cn),L(this.$selector,hn),L(this.$selector,dn),c(B(this.$additionalStepWrapper.childNodes),(t=>this.$additionalStepWrapper.removeChild(t))),tn(this.player,this.$additionalStep)}_toTranslatePage(){this.state.isTranslatingCC()||(S(this.$selector,dn),L(this.$selector,cn),L(this.$selector,hn),L(this.$selector,pn),tn(this.player,this.$settingsStep),document.querySelector(`.${kn}`).focus())}_prepareAdditionalPage(t,e,n,i){this._toAdditionalPage(),this.$additionalBackText.textContent=this.$t(t),this.$toSettings.focus();const s=[],o=this.state[e]();c(i,(t=>{const e=C("button",{type:"button",class:bn},this.$additionalStepWrapper),i=t.key;e.textContent=i?this.$t(i):t.label,o===t.value&&S(e,yn),this.addEvent(e,"click",(()=>{c(s,(t=>L(t,yn))),S(e,yn),this.bus.emit(n,t.value),this._toSettingsPage()})),s.push(e)}))}_toColorPage(){this._prepareAdditionalPage("settings-fontcolor","getCCTextColor","cccolor",Pt)}_toBackgroundColorPage(){this._prepareAdditionalPage("settings-background","getCCBgColor","ccbgcolor",Pt)}_toSizesPage(){this._prepareAdditionalPage("settings-fontsize","getCCFontSize","ccfontsize",At)}_toFontFamilyPage(){this._prepareAdditionalPage("settings-fontfamily","getCCFontFamily","ccfontfamily",Ft)}_toLocationsPage(){this._prepareAdditionalPage("settings-captionlocations","getCCLocation","cclocation",zt)}_detectLabel(t,e){const n=A(t,(t=>t.value===e));if(!n)return"";const i=n.key;return i?this.$t(i):n.label||""}_refresh(){const t=this.state.getCCTextColor(),e=this.state.getCCBgColor(),n=this.state.getCCFontSize(),i=this.state.getCCFontFamily();this.$textHolder.style.color=t,this.$textHolder.style.backgroundColor=e,this.$textHolder.style.fontSize=n,this.$textHolder.style.fontFamily=i,this.$currentColor.textContent=this._detectLabel(Pt,t),this.$currentBgColor.textContent=this._detectLabel(Pt,e),this.$currentSize.textContent=this._detectLabel(At,n),this.$currentFamily.textContent=this._detectLabel(Ft,i),this.$currentLocation&&(this.$currentLocation.textContent=this._detectLabel(zt,this.state.getCCLocation()))}getElement(){return this.$el}getOuter(){return this.$text}destroy(){super.destroy(),this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$text.parentNode&&this.$text.parentNode.removeChild(this.$text)}}],["showTOC",class extends Zt{constructor(t,e,n){super(t,e,n,["statechanged"]),Ln(this,"$el",void 0),Ln(this,"$button",void 0),Ln(this,"$selector",void 0),Ln(this,"$mainStep",void 0),Ln(this,"$languagesStep",void 0),Ln(this,"$chaptersWrapper",void 0),Ln(this,"$moreLanguages",void 0),Ln(this,"$currentLanguage",void 0),Ln(this,"$toMain",void 0),Ln(this,"$translateStep",void 0),Ln(this,"$toLanguages",void 0),Ln(this,"$translate",void 0),Ln(this,"$currentCustomTranslate",void 0),Ln(this,"$languages",[]),Ln(this,"$translatableLanguages",[]),Ln(this,"$items",[]),this.logger.debug("toc:extension:creating"),nn(this,["_toMainPage","_toLanguagesPage","_toTranslatePage"]),this.render(),this.init(),this.changeLang(this.state.getTOCLang()),this.logger.debug("toc:extension:created")}init(){const{$button:t,$selector:e}=this;en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:Rn,heightControl:!0,firstFocusItemSelector:"button",toMainFn:this._toMainPage.bind(this)}),ze(this,{$button:t,text:this.$t("chapters")}),this.addEvent(this.$moreLanguages,"click",this._toLanguagesPage),this.addEvent(this.$toMain,"click",this._toMainPage),this.addEvent(this.$toLanguages,"click",this._toLanguagesPage),this._toMainPage()}render(){this.$el=C("div",{class:Mn}),this.$button=C("button",{type:"button",class:Pn},this.$el),this.$selector=C("div",{class:An},this.$el),Me(this.$button,"M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"),this.$mainStep=C("div",{class:Dn,tabindex:-1},this.$selector),this.$languagesStep=C("div",{class:On},this.$selector),this.$chaptersWrapper=C("div",{class:`${Vn} tab-content`},this.$mainStep),this.$moreLanguages=C("button",{type:"button",class:In},this.$mainStep),C("span",{},this.$moreLanguages).textContent=this.$t("language"),Qn(this.$moreLanguages),this.$currentLanguage=C("span",{class:Gn},this.$moreLanguages),this.$toMain=C("button",{type:"button",class:Bn},this.$languagesStep);let t=C("span",{class:"arrow"},this.$toMain);Me(t,Te,{class:"arrow"});let e=C("span",{},this.$toMain);e.textContent=this.$t("chapters"),this.$translateStep=C("div",{class:qn},this.$selector),this.$toLanguages=C("button",{type:"button",class:Bn},this.$translateStep),t=C("span",{class:"arrow"},this.$toLanguages),Me(t,Te,{class:"arrow"}),e=C("span",{},this.$toLanguages),e.textContent=this.$t("language"),this.fillLanguages()}fillLanguages(){c(this.$languages,(t=>{this.$languagesStep&&this.$languagesStep.removeChild(t)})),c(this.$translatableLanguages,(t=>{this.$languagesStep&&this.$languagesStep.removeChild(t)})),this.$translate&&this.$languagesStep.removeChild(this.$translate),this.$languages=[],this.$translatableLanguages=[];const t=this.state.getTOCSources(),e=P(t,(t=>!!t.state));if(this.$el.style.display=t.length?"block":"none",c(e,(t=>{const e=C("button",{type:"button",class:Un},this.$languagesStep);e.textContent=1===t.state?`${t.label} ${this.$t("unapproved-source")}`:t.label,this.addEvent(e,"click",(()=>{this._toMainPage(),this.bus.emit("toclang",t.srclang)})),this.$languages.push(e)})),e.length!==t.length){const t=C("button",{type:"button",class:Vn},this.$languagesStep);this.$translate=t,C("span",{},t).textContent=this.$t("translate"),Qn(t),this.$currentCustomTranslate=C("span",{class:Gn},this.$translate),this.addEvent(t,"click",this._toTranslatePage)}c(P(t,(t=>!t.state)),(t=>{const e=C("button",{type:"button",class:Un},this.$translateStep);e.textContent=t.label,this.addEvent(e,"click",(()=>{this._toMainPage(),this.bus.emit("toclang",t.srclang)})),this.$translatableLanguages.push(e)}))}onStatechanged(t,e){t.toc.sources!==e.toc.sources&&this.fillLanguages(),t.toc.lang!==e.toc.lang&&this.changeLang(t.toc.lang),t.toc.timedata!==e.toc.timedata&&this.renderTimeData()}changeLang(t){c(this.$languages,(t=>L(t,Wn))),c(this.$translatableLanguages,(t=>L(t,Wn)));const e=this.state.getTOCSources(),n=P(e,(t=>!!t.state));this.$currentCustomTranslate&&(this.$currentCustomTranslate.textContent="");let i=O(n,(e=>e.srclang===t));if(-1===i){const n=P(e,(t=>!t.state));if(i=O(n,(e=>e.srclang===t)),-1===i)return;S(this.$translatableLanguages[i],Wn),this.$currentCustomTranslate&&(this.$currentCustomTranslate.textContent=n[i].label),this.$currentLanguage.textContent=n[i].label}else S(this.$languages[i],Wn),this.$currentLanguage.textContent=n[i].label;this.renderTimeData()}renderTimeData(){const t=this.state.getTOCLang()?this.state.getTOCTimeData():[];c(this.$items,(t=>{this.$chaptersWrapper.removeChild(t)})),this._toMainPage(),this.$items.length=0,c(t,(t=>{const e=C("button",{href:"#",class:jn},this.$chaptersWrapper);e.innerHTML=t.text||t.title,this.addEvent(e,"click",(e=>{e.preventDefault(),e.stopPropagation();const n=this.player.isPaused();this.player.setCurrentTime(t.from),n&&this.player.play()})),this.$items.push(e)}))}_toMainPage(){S(this.$selector,Fn),L(this.$selector,zn),L(this.$selector,Nn),tn(this.player,this.$mainStep),setTimeout((()=>{const t=document.querySelectorAll(`.${Vn} > .${jn}`);if(t[0])t[0].focus();else{const t=document.querySelector(`.${In}`);t&&t.focus()}}))}_toLanguagesPage(){S(this.$selector,zn),L(this.$selector,Fn),L(this.$selector,Nn),tn(this.player,this.$languagesStep);const t=document.querySelector(`.${On} > .${Bn}`);t&&t.focus()}_toTranslatePage(){S(this.$selector,Nn),L(this.$selector,Fn),L(this.$selector,zn),this.$translateStep&&tn(this.player,this.$translateStep);const t=document.querySelector(`.${qn} > .${Bn}`);t&&t.focus()}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.$items.length=0,this.$languages.length=0,this.$translatableLanguages.length=0}}],["showAudioTracks",class extends Zt{constructor(t,e,n){super(t,e,n,["loadeddata","audiotrackswitched"]),this.logger.debug("audio-tracks:extension:creating"),this.render(),this.init(),this.logger.debug("audio-tracks:extension:created")}render(){this.$el=C("div",{class:ms}),this.$button=C("button",{type:"button",class:bs},this.$el),this.$selector=C("div",{class:ys,tabindex:-1},this.$el),Me(this.$button,"M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z")}init(){const t=this.$button,e=this.$selector;ze(this,{$button:t,text:this.$t("audio-tracks")}),en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:xs,reposition:!1,closeOnClick:!0,heightControl:!0,firstFocusItemSelector:`.${_s}`})}_renderAudioTracks(){c(B(this.$selector.childNodes),(t=>this.$selector.removeChild(t)));const t=this.player.getAudioTrack(),e=[];c(this.player.getAudioTracks(),((n,i)=>{if(!n||"object"!=typeof n)return;const s=C("button",{type:"button",class:_s},this.$selector);s.textContent=n.name||n.label,+i===t&&S(s,fs),this.addEvent(s,"click",(()=>{c(e,(t=>L(t,fs))),S(s,fs),this.player.setAudioTrack(n.id)})),e.push(s)}))}onAudiotrackswitched(){this._renderAudioTracks()}onLoadeddata(){this.player.isMultiAudioTracks()?this._renderAudioTracks():this.$el.style.display="none"}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}}],["showPlaceholder",class extends Zt{constructor(t,e,n){super(t,e,n),oi(this,"$outer",void 0),oi(this,"$placeholderIcon",void 0),oi(this,"$playButton",void 0),this.logger.debug("placeholder:extension:creating"),ui=this.options.accessibility,this.render(),n.isHandlingKeyboardEvents&&this.addEvent(document,"keydown",this.onKeyDown.bind(this),n.globalKeyboardListeners),this.addEvent(this.$outer,"click",this.onPlaceholderClick.bind(this)),this.addEvent(this.$playButton,"click",this.onPlaceholderClick.bind(this)),setTimeout((()=>{const t=this.$outer.parentNode.querySelector(".rmp-ext-title");t&&this.addEvent(t,"click",this.onPlaceholderClick.bind(this)),this.addEvent(this.$outer.parentNode,"dblclick",this.toggleFullScreen.bind(this))})),this.logger.debug("placeholder:extension:created")}render(){this.$outer=C("div",{class:ri,tabindex:-1}),this.$placeholderIcon=C("div",{class:li,tabindex:-1},this.$outer),this.$playButton=C("button",{type:"button",class:hi,tabindex:-1},this.$outer),Me(this.$playButton,$e),this.$playButton.setAttribute("aria-label","Play")}onPlaceholderClick(){this.logger.debug("placeholder:click"),clearTimeout(pi),pi=setTimeout((()=>this._togglePlay()),350)}onKeyDown(t){if(!this.player.getElement())return;this.logger.debug("placeholder:keydown");const e=t.target||t.srcElement;let n=e===this.player.getElement();n=n||E(e,"rplayer"),n=n||this.player.getElement().parentNode.contains(e),(n||this.options.globalKeyboardListeners&&!function(t){let e=!1;return e=e||t instanceof HTMLTextAreaElement,e=e||t instanceof HTMLInputElement&&"text"===t.type,e}(t.target))&&this._processKeyDown(t)}_processKeyDown(t){if(t.target instanceof HTMLInputElement)return;const e=t.keyCode;if(32===e&&ui&&"BUTTON"===t.target.tagName)return;let n=ci[e];b(n)&&o(this[n])&&(this[n](this.player),t.preventDefault(),t.stopPropagation()),n=this.options.keyboardListeners[e],b(n)&&o(n)&&(n(this.player),t.preventDefault(),t.stopPropagation())}toggleFullScreen(){this.logger.debug("placeholder:toggleFullScreen"),clearTimeout(pi),this.options.showFullScreen&&this.bus.emit("fullscreenchanging")}_togglePlay(){this.logger.debug("placeholder:togglePlay"),this.options.isMobile?this.bus.emit("mobiletouch"):this.player.isPaused()?(this.player.play(),this._showAction("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z")):(this.player.pause(),this._showAction("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"))}_skeepLeft(){this.logger.debug("placeholder:skeepLeft"),this.player.setCurrentTime(this.player.getCurrentTime()-this.options.skipDelta),this._showAction(ve)}_skeepRight(){this.logger.debug("placeholder:skeepRight"),this.player.setCurrentTime(this.player.getCurrentTime()+this.options.skipDelta),this._showAction(we)}_upVolume(){this.logger.debug("placeholder:volumeup");const t=Math.min(1,.1+this.player.getVolume());this.player.setMuted(!1),this.player.setVolume(t),this._showAction(Le)}_downVolume(){this.logger.debug("placeholder:volumedown");const t=Math.max(0,this.player.getVolume()-.1).toFixed(2);0==t?(this.player.setVolume(0),this.player.setMuted(!0),this._showAction(Se)):(this.player.setVolume(t),this._showAction("M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"))}_showAction(t){this.logger.debug("placeholder:showaction"),L(this.$outer,ai),clearTimeout(di),di=setTimeout((()=>{this.logger.debug("placeholder:showaction:clear"),this._clearPlaceholderIcon(),Me(this.$placeholderIcon,t),S(this.$outer,ai),di=setTimeout((()=>{this.logger.debug("placeholder:showaction:remove"),this._clearPlaceholderIcon(),L(this.$outer,ai)}),500)}),350)}_clearPlaceholderIcon(){this.$placeholderIcon.childNodes.length&&c(this.$placeholderIcon.childNodes,(t=>{this.$placeholderIcon.removeChild(t)}))}_prevFrame(){this.player.prevFrame()}_nextFrame(){this.player.nextFrame()}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer.removeChild(this.$placeholderIcon),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null,this.$placeholderIcon=null}}],["showCaptionSearch",class extends Zt{constructor(t,e,n){super(t,e,n,["statechanged","timeupdate","showpopup","loadedmetadata","canplaythrough"]),vs(this,"$el",void 0),vs(this,"filter",""),this.logger.debug("search:extension:creating"),this.render(),this.init(),nn(this,["onTimeupdate"]),this.logger.debug("search:extension:created")}render(){this.$el=C("div",{class:"rmp-ext-search"}),this.$button=C("button",{type:"button",class:"rmp-ext-search__button"},this.$el),this.$selector=C("div",{class:"rmp-ext-search__selector"},this.$el),this.$captions=C("div",{class:"rmp-ext-search__captions"},this.$selector),this.$input=C("input",{class:"rmp-ext-search__input",placeholder:this.$t("caption-search")},this.$selector),this.$clearBtn=C("button",{class:"rmp-ext-search__cc-clear rmp-ext-search--hidden"},this.$selector),Me(this.$clearBtn,"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"),Me(this.$button,"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z")}init(){const t=this.$button,e=this.$selector;ze(this,{$button:t,text:this.$t("caption-search")}),en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:"rmp-ext-search__selector--open",reposition:!1,closeOnClick:!1,heightControl:!1}),this.addEvent(this.$input,"input",(()=>{this.filter=this.$input.value,this.renderCaptions(),this.$input.value?this.$clearBtn.classList.remove(ws):this.$clearBtn.classList.add(ws)})),this.$clearBtn.addEventListener("click",(()=>{this.$input.value="",this.filter="",this.renderCaptions()}))}onStatechanged(t,e){t.cc.lang!==e.cc.lang?this.handleCaptionLanguageChanged(t.cc.lang):t.cc.timedata!==e.cc.timedata&&this.handleTimeDataChanged()}onCanplaythrough(){this.handleTimeDataChanged()}onLoadedmetadata(){this.handleTimeDataChanged()}handleCaptionLanguageChanged(t){M(this.$el,ws,!t)}handleTimeDataChanged(){const t=this.state.getCCLang();this.handleCaptionLanguageChanged(t),this.renderCaptions()}filteredCaptions(){const t=new RegExp(this.filter.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"ig");return P(this.state.getCCTimeData(),(e=>(t.lastIndex=0,t.test(e.text))))}renderCaptions(){const t=this.player.getDuration();if(!t)return;const e=t>3600;c(B(this.$captions.childNodes),(t=>this.$captions.removeChild(t))),c(this.filteredCaptions(),(t=>{const n=C("button",{type:"button",class:"rmp-ext-search__item",id:ks(t.id)},this.$captions);C("span",{class:"rmp-ext-search__cc-time"},n).textContent=Tt(t.from,e);const i=(s=t.text,$s.innerHTML=s,$s.textContent);var s;C("span",{class:"rmp-ext-search__cc-text",title:i},n).textContent=i,this.addEvent(n,"click",(e=>{e.preventDefault(),e.stopPropagation();const n=this.player.isPaused();this.player.setCurrentTime(t.from),n&&this.player.play()}))}))}onShowpopup(){this.onTimeupdate(),this.scrollToCurrentCaption()}scrollToCurrentCaption(){const t=this.filteredCaptions(),e=this.player.getCurrentTime(),n=O(t,(({from:t,to:n})=>m(e,t,n)));if(n>-1){const t=B(this.$captions.childNodes)[Math.max(0,n-2)];t&&function(t,e){const{top:n}=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=e.scrollTop,o=Math.floor(n-i.top);e.scrollTop=s+o}(t,this.$captions)}}onTimeupdate(){const t=this.filteredCaptions();if(_(t))return;const e=this.player.getCurrentTime(),n=O(t,(({from:t,to:n})=>m(e,t,n)));if(n>-1){const e=t[n],i=document.getElementById(ks(e.id));if(!i)return void c(B(this.$captions.childNodes),(t=>L(t,Cs)));if(E(i,Cs))return;c(B(this.$captions.childNodes),(t=>L(t,Cs))),S(i,Cs)}else c(B(this.$captions.childNodes),(t=>L(t,Cs)))}getElement(){return this.$el}destroy(){super.destroy();const t=this.$el.parentNode;t instanceof HTMLElement&&t.removeChild(this.$el),this.$el=null}}],["showDownload",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("download:extension:creating"),this.render(),this.init(),this.logger.debug("download:extension:created")}render(){this.$el=C("span",{class:fi,"data-testid":"download"}),this.$button=C("button",{type:"button",class:$i},this.$el),this.$selector=C("div",{class:vi},this.$el),this.$link=C("a",{style:"display: none;"},this.$selector),this.$mainStep=C("div",{class:Ti},this.$selector),this.options.showDownloadVideo&&(this.$video=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$video).textContent=this.$t("video-drm"),S(this.$video,ki),Mi(this.$video)),this.options.showDownloadCC&&(this.$cc=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$cc).textContent=this.$t("cc"),S(this.$cc,ki),Mi(this.$cc),this.$transcript=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$transcript).textContent=this.$t("transcript"),S(this.$transcript,ki),Mi(this.$transcript)),this.options.downloadVideoURL&&(this.$mp4=C("button",{type:"button",class:Li},this.$mainStep),C("span",{},this.$mp4).textContent=this.$t("video-drm")),this.$svg=Me(this.$button,"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"),this.$spinner=C("img",{src:"/images/Spinner-small.gif",height:"26",width:"26"}),this.$additionalStep=C("div",{class:Ei},this.$selector),this.$back=C("button",{type:"button",class:Si},this.$additionalStep),Me(C("span",{class:"arrow"},this.$back),Te),this.$backText=C("span",{},this.$back),this.$additional=C("div",{class:"tab-content"},this.$additionalStep)}init(){const t=this.$button,e=this.$selector,n=this.options;en(this,{$button:t,$selector:e,SELECTOR_OPEN_CN:wi,reposition:!1,closeOnClick:!1,firstFocusItemSelector:`.${Li}`,toMainFn:this._toMain.bind(this)}),ze(this,{$button:t,text:this.$t("download")}),!_(n.downloadCCLanguages)||n.showDownloadCC||n.downloadVideoURL?(n.downloadVideoURL&&this.addEvent(this.$mp4,"click",this.performClick.bind(this,n.downloadVideoURL)),this.addEvent(this.$back,"click",(()=>this._toMain())),n.showDownloadVideo&&this.addEvent(this.$video,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("video-drm")),this._renderVideos()})),n.showDownloadCC&&(this.addEvent(this.$transcript,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("transcript")),this._renderTranscripts()})),this.addEvent(this.$cc,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("cc")),this._renderClosedCaptions()})))):this.addEvent(this.$el,"click",this.downloadDRMVideo.bind(this,null))}downloadDRMVideo(t){let e=this.options.downloadURL;null!==t&&(e+="?ccLang="+t),this.bus.emit("downloadRequested",e,this.performClick.bind(this)),this.$button.removeChild(this.$svg),this.$button.appendChild(this.$spinner)}downloadTranscript(t){const e=`transcript__${t.srclang}.txt`;"json"===t.type?Ct({url:t.src,success:t=>this.prepareTranscriptForDownload(JSON.parse(t.data),e)}):St(t.src,(t=>this.prepareTranscriptForDownload(t,e)))}prepareTranscriptForDownload(t,e){const{text:n}=t.reduce((({prevSegmentTime:t,text:e},n)=>(t>0&&n.from>=t+.1&&(e+="\r\n"),e=e+n.text.replace(/(\r?\n|\r)$/,"").replace(/<br\s*\/?>/gm,"\r\n")+"\r\n",{prevSegmentTime:n.to,text:e})),{text:"",prevSegmentTime:0});var i=new Blob([n],{type:"text/plain;charset=utf-8"});_i(i,e)}downloadCC(t){const e=`captions__${t.srclang}.vtt`;"json"===t.type?Ct({url:t.src,success:t=>this.prepareCCForDownload(JSON.parse(t.data),e)}):Ct({url:t.src,success:t=>{var n=new Blob([t.data],{type:"text/plain;charset=utf-8"});_i(n,e)}})}prepareCCForDownload(t,e){const n=t.reduce(((t,e)=>(t||(t+="WEBVTT\r\n"),t+="\r\n",t+=Tt(e.from,!1,!0)+" --\x3e "+Tt(e.to,!1,!0),t+="\r\n",(t+=e.text)+"\r\n")),"");var i=new Blob([n],{type:"text/plain;charset=utf-8"});_i(i,e)}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null}performClick(t){var e=document.createElement("a",{href:t,target:"_blank"});e.href=t,e.target="_blank",e.className="rmp-ext-download-hidden",e.download=N(t.split("/"))||"video.mp4",document.body.appendChild(e),e.click();try{this.$button.removeChild(this.$spinner),this.$button.appendChild(this.$svg)}catch(t){}}_toMain(){L(this.$selector,Ci),tn(this.player,this.$mainStep);const t=document.querySelectorAll(`.${Ti} > .${Li}`);t[0]&&t[0].focus()}_toAdditional(t){c(B(this.$additional.childNodes),(t=>this.$additional.removeChild(t))),S(this.$selector,Ci),this.$backText.textContent=t,tn(this.player,this.$additionalStep),this.$back.focus()}_renderVideos(){const t=C("button",{type:"button",class:Li},this.$additional);this.addEvent(t,"click",(()=>this.downloadDRMVideo(null))),C("span",{},t).textContent=this.$t("video-only"),c(this.options.downloadCCLanguages,(t=>{const e=C("button",{type:"button",class:Li},this.$additional);this.addEvent(e,"click",(()=>this.downloadDRMVideo(t.code))),C("span",{},e).textContent=`${this.$t("video-and")} ${t.label} CC`}))}_renderTranscripts(){c(this.options.cc.filter(Pi),(t=>{const e=C("button",{type:"button",class:Li},this.$additional);this.addEvent(e,"click",(()=>this.downloadTranscript(t))),C("span",{},e).textContent=t.label}))}_renderClosedCaptions(){c(this.options.cc.filter(Pi),(t=>{const e=C("button",{type:"button",class:Li},this.$additional);this.addEvent(e,"click",(()=>this.downloadCC(t))),C("span",{},e).textContent=t.label}))}}],["showPrev",class extends Zt{constructor(t,e,n){super(t,e,n),es(this,"$outer",void 0),es(this,"$button",void 0),this.logger.debug("prev:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$outer,"click",(()=>i.emit("prevtrack"))),this.logger.debug("prev:extension:created")}render(){const t=this.options.prevTrackTitle;this.$outer=C("div",{class:ns,title:t}),this.$button=C("button",{type:"button",class:is},this.$outer),Me(this.$button,ke),this.$button.setAttribute("aria-label","Go to previous track"),C("img",{src:this.options.prevTrackThumbnails,class:ss},this.$outer)}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null}}],["showNext",class extends Zt{constructor(t,e,n){super(t,e,n),os(this,"$outer",void 0),os(this,"$button",void 0),this.logger.debug("next:extension:creating"),this.render();const i=this.options.bus;this.addEvent(this.$outer,"click",(()=>i.emit("nexttrack"))),this.logger.debug("next:extension:created")}render(){const t=this.options.nextTrackTitle;this.$outer=C("div",{class:rs,title:t}),this.$button=C("button",{type:"button",class:as},this.$outer),Me(this.$button,Ce),this.$button.setAttribute("aria-label","Go to next track"),C("img",{src:this.options.nextTrackThumbnails,class:ls},this.$outer)}getOuter(){return this.$outer}destroy(){super.destroy(),this.$outer.parentNode.removeChild(this.$outer),this.$outer=null}}],["useMux",class extends Zt{constructor(t,e,n){super(t,e,n),this.logger.debug("mux:extension:creating"),this.init(),this.logger.debug("mux:extension:created")}init(){b(window.mux)?this.monitor():this.loadLibraryAndStartMonitor()}loadLibraryAndStartMonitor(){const t=C("script",{src:this.options.muxURL}),e=R(document.getElementsByTagName("script"));t.onload=t.onreadystatechange=()=>this.monitor(),e.parentNode&&e.parentNode.insertBefore(t,e)}monitor(){const t=this.player.getElement(),e=D({},ps,this.options.mux);window.mux.monitor(`#${t.id}`,{debug:!1,data:e})}destroy(){const t=this.player.getElement();t?.mux&&t.mux.destroy(),super.destroy()}}],[!0,class extends Zt{constructor(t,e,n){super(t,e,n),Xi(this,"_w",void 0),Xi(this,"_h",void 0),this.onResize=this.onResize.bind(this),setTimeout(this.onResize),this.addEvent(window,"resize",(()=>setTimeout(this.onResize))),this.bus.on("fullscreenchanged",(()=>setTimeout(this.onResize,500))),this.bus.on("cclayoutchange",(()=>setTimeout(this.onResize)))}onResize(){const t=this.player.getElement();if(!t)return;const e=t.parentNode?t.parentNode:t,n=Math.max(t.offsetWidth,e.offsetWidth),i=Math.max(t.offsetHeight,e.offsetHeight,e.parentNode.offsetHeight),s=Math.max(t.offsetWidth,e.parentNode.offsetWidth);n===this._w&&i===this._h||(this._h=i,this._w=n,setTimeout((()=>this.bus.emit("resizeplayer",{width:n,height:i,outerWidth:s}))))}}],["showCrawl",Fs],["showSettings",class extends Zt{constructor(t,e,n){super(t,e,n,["loadedmetadata","annotationslang","qualitychange","timeupdate"]),Ai(this,"playbackRate",1),Ai(this,"annLang",""),this.logger.debug("settings:extension:creating"),this.render(),this.init(),this.logger.debug("settings:extension:created")}render(){this.$el=C("div",{class:Fi}),this.$button=C("button",{type:"button",class:zi},this.$el),this.$selector=C("div",{class:Ni},this.$el),this.$mainStep=C("div",{class:Hi},this.$selector),Me(this.$button,"M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"),this.options.showAnnotations&&(this.$annotations=C("button",{type:"button",class:Di},this.$mainStep),C("span",{},this.$annotations).textContent=this.$t("annotations"),S(this.$annotations,Ui),Ki(this.$annotations),this.$currentAnnotation=C("span",{class:Wi},this.$annotations)),this.options.showQuality&&(this.$quality=C("button",{type:"button",class:Ii},this.$mainStep),C("span",{},this.$quality).textContent=this.$t("quality"),S(this.$quality,Ui),Ki(this.$quality),this.$currentQuality=C("span",{class:Wi},this.$quality)),this.options.showPlaybackRate&&(this.$speed=C("button",{type:"button",class:Vi},this.$mainStep),C("span",{},this.$speed).textContent=this.$t("playback-rate"),S(this.$speed,Ui),Ki(this.$speed),this.$currentSpeed=C("span",{class:Wi},this.$speed),this.$currentSpeed.textContent=this.$t("standard-playbackrate")),this.$additionalStep=C("div",{class:Bi},this.$selector),this.$back=C("button",{type:"button",class:ji},this.$additionalStep),Me(C("span",{class:"arrow"},this.$back),Te),this.$backText=C("span",{},this.$back),this.$additional=C("div",{class:"tab-content"},this.$additionalStep)}init(){const t=this.$button;if(en(this,{$button:t,$selector:this.$selector,SELECTOR_OPEN_CN:Ri,reposition:!1,closeOnClick:!1,firstFocusItemSelector:`.${Ui}`,toMainFn:this._toMain.bind(this)}),this.options.showAnnotations){this.addEvent(this.$annotations,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("annotations")),this._renderAnnotationsLanguages()}));const t=[Yi].concat(this.options.annotations),e=wt(Qi);let n=A(t,(t=>t.srclang===e));n||(n=A(t,(t=>t.default))),n=n||t[1],this.bus.emit("annotationslang",n.srclang)}this.options.showQuality&&this.addEvent(this.$quality,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._toAdditional(this.$t("quality")),this._renderQualities()})),this.options.showPlaybackRate&&this.addEvent(this.$speed,"click",(()=>{this._toAdditional(this.$t("playback-rate")),this._renderPlaybackRate()})),this.addEvent(this.$back,"click",(()=>this._toMain())),ze(this,{$button:t,text:this.$t("settings")})}_toAdditional(t){c(B(this.$additional.childNodes),(t=>this.$additional.removeChild(t))),S(this.$selector,Oi),this.$backText.textContent=t,tn(this.player,this.$additionalStep),this.$back.focus()}_renderQualities(){c(B(this.$additional.childNodes),(t=>this.$additional.removeChild(t)));const t=this.player.getLevel(),e=[],n=this.player.getLevels();n.sort(((t,e)=>e.height-t.height)),c(n,(n=>{if(!n.name&&!n.height)return;const i=C("button",{type:"button",class:qi},this.$additional);i.textContent=n.name||`${n.height}p`,(d(n,t)||I(n,"index",-1)===I(t,"index",-2))&&(S(i,Gi),this.$currentQuality.textContent||this.bus.emit("qualitychange",i.textContent)),this.addEvent(i,"click",(()=>{this.bus.emit("qualitychange",i.textContent),this.bus.emit("manualquality",i.textContent),c(e,(t=>L(t,Gi))),S(i,Gi),this.player.setLevel(n),this._toMain()})),e.push(i)}))}_renderAnnotationsLanguages(){const t=[],e=this.annLang;c([Yi].concat(this.options.annotations),(n=>{const i=C("button",{type:"button",class:qi},this.$additional);i.textContent=n.label,e===n.srclang&&S(i,Gi),this.addEvent(i,"click",(()=>{vt(Qi,n.srclang),this.bus.emit("annotationslang",n.srclang),this._toMain()})),t.push(i)}))}_mapRates(){const t=this.options.playbackRates;-1===t.indexOf(1)&&t.push(1);let e=t.map((t=>{const e=Math.round(100*t)/100;return 1===e?{rate:e,labelKey:"standard-playbackrate"}:5===e?{rate:e,hide:t=>t.isAudio}:{rate:e}}));return e=e.filter(((t,e)=>t.rate<=5&&t.rate>0)).sort(((t,e)=>t.rate-e.rate)),e}_renderPlaybackRate(){const t=[];c(Array.isArray(this.options.playbackRates)?this._mapRates():Zi,(e=>{if(h(e,"hide")&&o(e.hide)&&e.hide(this.options))return;const n=C("button",{type:"button",class:qi},this.$additional);n.textContent=b(e.labelKey)?this.$t(e.labelKey):e.rate,e.rate===this.playbackRate&&(S(n,Gi),this.$currentSpeed.textContent=n.textContent),this.addEvent(n,"click",(()=>{c(t,(t=>L(t,Gi))),S(n,Gi),this.player.setPlaybackRate(e.rate),this.playbackRate=e.rate,this.$currentSpeed.textContent=n.textContent,this._toMain()})),t.push(n)}))}_toMain(){L(this.$selector,Oi),tn(this.player,this.$mainStep);const t=document.querySelectorAll(`.${Hi} > .${Ui}`);t[0]&&t[0].focus()}onAnnotationslang(t){const e=A([Yi].concat(this.options.annotations),(e=>e.srclang===t))||Yi;this.annLang=e.srclang,this.$currentAnnotation.textContent=e.label}onLoadedmetadata(){this.options.showQuality&&(this.player.isMultiQuality()?this._renderQualities():this.$quality.style.display="none")}onQualitychange(t){this.$currentQuality&&(this.$currentQuality.textContent=t)}onTimeupdate(){this.player.isLive?.()&&(this.player.setPlaybackRate(1),this.$currentSpeed.textContent=this.$t("standard-playbackrate"),this.playbackRate=1)}getElement(){return this.$el}destroy(){super.destroy(),this.$el.parentNode.removeChild(this.$el),this.$el=null,this.$button=null,this.$selector=null}}],["showFullScreen",class extends Zt{constructor(t,e,n){var i;super(t,e,n,["statechanged"]),i=void 0,"$el"in this?Object.defineProperty(this,"$el",{value:i,enumerable:!0,configurable:!0,writable:!0}):this.$el=i,this.logger.debug("fullscreen:extension:creating"),this.render(),this.addEvent(this.$el,"click",this.toggle.bind(this)),this.addEvent(document,"keyup",this.onKeyup.bind(this)),navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)&&this.addEvent(window,"resize",this.onResize.bind(this)),M(this.$el,Je,this.state.isFullScreen()),this.logger.debug("fullscreen:extension:created")}render(){this.$el=C("button",{type:"button",class:Xe,"data-testid":"fullscreen"}),Me(this.$el,"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z",{class:"fullscreen-icon"}),Me(this.$el,"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z",{class:"exit-fullscreen-icon"});const t=()=>this.$t(this.state.isFullScreen()?"exit-fullscreen":"fullscreen");setTimeout((()=>ze(this,{$button:this.$el,text:t})))}onResize(){this.state.isFullScreen()&&this.bus.emit("fullscreenchanging",!0)}onKeyup(t){27===t.keyCode&&this.bus.emit("fullscreenchanging",!1)}onStatechanged(t){M(this.$el,Je,t.isFullScreen)}toggle(){this.bus.emit("fullscreenchanging")}getElement(){return this.$el}destroy(){super.destroy();const t=this.$el.parentNode;t instanceof HTMLElement&&t.removeChild(this.$el)}}]];function Is(t,e){const n=function(t,e){let n="calc(100% - 160px)";return e&&(n=e.bottom-e.top-160+"px"),`\n.rplayer {\n font-family: 'Roboto',sans-serif;\n width: 100%;\n height: 100%;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n outline: 0;\n position: relative;\n z-index: 1;\n text-align: left;\n}\n\n.rplayer, .rplayer * {\n box-sizing: border-box;\n}\n\n.rplayer--fullscreen .rplayer__inner {\n height: 100% !important;\n width: 100% !important;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 9999999;\n position: static;\n padding-bottom: 0;\n margin: 0 auto\n}\n\n@media (orientation: portrait) {\n .rplayer--fullscreen .rplayer--iphone .rmp-extensions {\n bottom: 40px;\n }\n .rplayer--fullscreen .rplayer--iphone .rmp-ext-cc__text {\n bottom: 125px;\n }\n}\n\n.rplayer--fullscreen:-webkit-full-screen .rplayer__inner,\n.rplayer--fullscreen:-moz-full-screen .rplayer__inner,\n.rplayer--fullscreen:-ms-fullscreen .rplayer__inner,\n.rplayer--fullscreen:fullscreen .rplayer__inner,\n min-height: 100vh;\n min-width: 100vw;\n}\n\n.rplayer--fullscreen .rplayer__playlist-wrapper {\n display: none;\n}\n\n.rplayer button span {\n display: inline;\n padding: 0;\n}\n\n.rplayer--fullscreen .rplayer .rmp-flash-wrapper, .rplayer--fullscreen .rplayer video {\n background-color: black;\n}\n\n.rplayer audio {\n width: 100%\n}\n\n.rplayer video {\n outline: 0\n}\n\n.rplayer--fullscreen {\n position: fixed!important;\n top: 0!important;\n bottom: 0!important;\n right: 0!important;\n left: 0!important;\n background-color: black;\n width: 100%!important;\n max-width: 100% !important;\n height: 100vh !important;\n z-index: 9999999!important;\n display: block;\n}\n\n.rplayer--fullscreen .rplayer {\n display: table-cell;\n vertical-align: middle\n}\n\n.rplayer__inner {\n margin: auto;\n background-color: black;\n}\n\n.rplayer__inner, .rplayer__playlist-wrapper {\n position: relative;\n overflow: hidden;\n width: 100%;\n height: 100%;\n}\n\n.rplayer__inner--playing .rmp-ext-help, .rplayer__inner--playing .rmp-ext-title {\n opacity: 0;\n z-index: -9;\n}\n\n.rplayer__inner--loading>* {\n visibility: hidden\n}\n\n.rplayer__inner--loading>.loader {\n border: 4px solid #f3f3f3;\n border-top: 4px solid #666;\n border-radius: 50%;\n width: 60px;\n height: 60px;\n animation: spin 2s linear infinite;\n visibility: visible;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-top: -30px;\n margin-left: -30px\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg)\n }\n\n to {\n transform: rotate(-360deg)\n }\n}\n\n@-webkit-keyframes spin {\n 0% {\n transform: rotate(0deg)\n }\n\n to {\n transform: rotate(360deg)\n }\n}\n\n.rplayer .rmp-flash-wrapper,.rplayer video {\n background-color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0\n}\n\n.rplayer .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer .rplayer__inner--cc-below video {\n position: relative;\n height: ${n};\n}\n\n.rplayer--cc-75-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-75-below .rplayer__inner--cc-below video {\n height: calc(100% - 110px);\n}\n\n.rplayer--cc-100-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-100-below .rplayer__inner--cc-below video {\n height: calc(100% - 140px);\n}\n\n.rplayer--cc-125-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-125-below .rplayer__inner--cc-below video {\n height: calc(100% - 150px);\n}\n\n.rplayer--cc-150-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-150-below .rplayer__inner--cc-below video {\n height: calc(100% - 170px);\n}\n\n.rplayer--cc-200-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--cc-200-below .rplayer__inner--cc-below video {\n height: calc(100% - 200px);\n}\n\n.rplayer--fullscreen .rplayer--cc-75-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-75-below .rplayer__inner--cc-below video {\n height: calc(100vh - 130px);\n}\n\n.rplayer--fullscreen .rplayer--cc-100-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-100-below .rplayer__inner--cc-below video {\n height: calc(100vh - 160px);\n}\n\n.rplayer--fullscreen .rplayer--cc-125-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-125-below .rplayer__inner--cc-below video {\n height: calc(100vh - 180px);\n}\n\n.rplayer--fullscreen .rplayer--cc-150-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-150-below .rplayer__inner--cc-below video {\n height: calc(100vh - 210px);\n}\n\n.rplayer--fullscreen .rplayer--cc-200-below .rplayer__inner--cc-below .rmp-flash-wrapper[id],.rplayer--fullscreen .rplayer--cc-200-below .rplayer__inner--cc-below video {\n height: calc(100vh - 230px);\n}\n\n.rmp-extensions, .rmp-ext-title {\n height: 86px;\n left: 0;\n right: 0;\n position: absolute;\n background-repeat: repeat-x;\n\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDg2NUVBOEM1QTQ0MTFFNzlGNTJDQTRCNzY1MURGNEMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDg2NUVBOEI1QTQ0MTFFNzlGNTJDQTRCNzY1MURGNEMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjAzOTcwY2FjLWEyYWMtMTE3YS05OGUxLWI5NzUzOTY2ZTQ4MyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjAzOTcwY2FjLWEyYWMtMTE3YS05OGUxLWI5NzUzOTY2ZTQ4MyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoORptwAAACaSURBVHjafFBbDoAgDBsbev87egsF8fEBtqmY2LRrGRtmZpvfcD7QEE7BKtYIinAruoNVAQXvKAjv2R27HHiMOpN7TN0qWjVRo7XU5iNnKFuvqfczwZTxgbj/hNJUDj/3n5xPpTJcSDIokrrMGM6dJZQvBOaisyRqgXLB2jJ1s3DHLCuOkXEMNQF1plUDt1Sbkxv4iMQG+CXAAOG1UnHx2OgyAAAAAElFTkSuQmCC');\n\n color: ${t.mainColor};\n z-index: 4;\n transition: opacity 500ms ease;\n}\n\n.rplayer--iphone .rmp-extensions, .rplayer--iphone .rmp-ext-title {\n transition: none;\n transform: translateZ(0);\n z-index: 9;\n background: linear-gradient(360deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.75) 50%, rgba(0,0,0,0) 100%);\n}\n\n.rmp-extensions {\n background-position: bottom;\n bottom: -26px;\n padding-top: 26px;\n padding-right: 5px;\n font-size: 12px;\n z-index: 5;\n display: flex;\n}\n\n.rmp-ext-backward, .rmp-ext-prev-frame, .rmp-ext-play, .rmp-ext-next-frame, .rmp-ext-forward, \n.rmp-ext-volume, .rmp-ext-progress, .rmp-ext-settings, .rmp-ext-theater, .rmp-ext-cc, .rmp-ext-toc,\n.rmp-ext-audio-tracks, .rmp-ext-search, .rmp-ext-settings, .rmp-ext-fullscreen, .rmp-ext-bottom-next,\n.rmp-ext-bottom-prev {\n max-height: 31px;\n}\n\n.rplayer--mobile .rmp-extensions {\n bottom: -20px;\n}\n\n.rplayer__inner--light .rmp-ext-help,\n.rmp-extensions--hidden > .rmp-extensions, .rmp-extensions--hidden > .rmp-ext-title, .rmp-extensions--hidden > .rmp-ext-help {\n opacity: 0;\n}\n\n.rplayer__inner--light.rplayer__inner--hovering .rmp-extensions, .rplayer__inner--light.rplayer__inner--hovering .rmp-ext-help,\n.rplayer__inner--active .rmp-extensions, .rplayer__inner--active .rmp-ext-help {\n opacity: 1;\n}\n\n.rmp-extensions button, .rmp-ext-help__button {\n height: 32px;\n border: none;\n cursor: pointer;\n position: relative;\n background-color: transparent;\n float: left;\n color: ${t.submenuColor};\n width: 36px\n}\n\n\n.rplayer--mobile .rmp-extensions .rmp-ext-forward, .rplayer--mobile .rmp-extensions .rmp-ext-backward {\n display: none;\n}\n\n.rplayer--mobile .arrow svg {\n width: 24px !important;\n height: 24px !important;\n}\n\n.rmp-extensions button svg, .rmp-ext-help__button {\n width: 24px;\n height: 24px;\n display: block;\n fill: ${t.mainColor};\n opacity: .75\n}\n\n.rmp-extensions button:hover svg, .rmp-ext-help__button:hover {\n opacity: 1\n}\n\n.rmp-extensions button, .rmp-ext-title__title,\n.rplayer__playlist-item, .rmp-ext-c2pa__item {\n padding: 0 5px;\n outline-offset: -2px;\n}\n\n.rplayer__inner--accessibility .rmp-extensions button:focus,\n.rplayer__inner--accessibility .rmp-ext-progress__bar:focus,\n.rplayer__inner--accessibility .rmp-ext-title__title:focus,\n.rplayer__inner--accessibility .rplayer__playlist-item:focus,\n.rplayer__inner--accessibility .rmp-ext-c2pa__item:focus {\n outline: 2px solid blue;\n}\n\n.rmp-extensions > button:first-of-type {\n margin-left: 6px\n}\n\n.rmp-ext-placeholder {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n background-color: #000;\n opacity: 0.001;\n}\n\n.rmp-ext-placeholder--animation {\n background-color: transparent;\n opacity: 1;\n}\n\n.rplayer__inner--light .rmp-ext-placeholder__play-btn {\n display: inline-block;\n}\n\n.rplayer__inner--light .rmp-ext-placeholder {\n background-color: transparent;\n opacity: 1;\n cursor: pointer;\n}\n\n.rplayer__inner--light.rplayer__inner--hovering .rmp-ext-placeholder__play-btn {\n width: 78px;\n height: 78px;\n margin-top: -40px;\n margin-left: -40px;\n cursor: pointer;\n}\n\n.rplayer__inner--light.rplayer__inner--hovering .rmp-ext-placeholder__play-btn svg {\n top: 11px;\n left: 11px;\n cursor: pointer;\n}\n\n.rmp-ext-placeholder__play-btn {\n background-color: rgba(61,61,61,.75);\n border: 0 none;\n border-radius: 50%;\n position: absolute;\n width: 72px;\n height: 72px;\n left: 50%;\n top: 50%;\n margin-top: -36px;\n margin-left: -36px;\n display: none;\n outline: none;\n}\n\n.rmp-ext-placeholder__icon {\n position: absolute;\n width: 56px;\n height: 56px;\n left: 50%;\n top: 50%;\n margin-top: -28px;\n margin-left: -28px\n}\n\n.rmp-ext-placeholder__icon svg, .rmp-ext-placeholder__play-btn svg {\n position: absolute;\n width: 56px;\n height: 56px;\n fill: #222\n}\n\n.rmp-ext-placeholder__play-btn svg {\n fill: ${t.mainColor};\n position: absolute;\n top: 8px;\n left: 8px;\n}\n\n.rmp-ext-placeholder--animation .rmp-ext-placeholder__icon {\n animation: disappear-icon .75s ease 1\n}\n\n@keyframes disappear-icon {\n 0% {\n opacity: 1\n }\n\n to {\n transform: scale(2);\n opacity: 0\n }\n}\n\n@-webkit-keyframes disappear-icon {\n 0% {\n opacity: 1\n }\n\n to {\n transform: scale(2);\n opacity: 0\n }\n}\n\n.rmp-extensions .rmp-ext-play svg {\n display: none\n}\n\n.rmp-extensions .rmp-ext-play--paused .play,.rmp-extensions .rmp-ext-play--playing .pause, .rmp-extensions .rmp-ext-play--ended .replay {\n display: block\n}\n\n.rmp-ext-progress {\n flex-grow: 1;\n}\n\n.rmp-ext-progress__current {\n line-height: 32px;\n padding: 0 8px;\n user-select: none\n}\n\n.rmp-ext-progress__overlay {\n background-color: #fff;\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n opacity: .75\n}\n\n.rmp-ext-progress__bar {\n cursor: pointer;\n height: 4px;\n border-radius: 2px;\n position: absolute;\n top: 14px;\n left: 16px;\n right: 16px;\n display: block;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n transition: all 50ms linear\n}\n\n.rmp-ext-progress__generic-live-stream.rmp-ext-progress__bar {\n pointer-events: none;\n}\n.rmp-ext-progress__generic-live-stream .rmp-ext-progress__progress {\n width: 100% !important;\n background-color: #e62048;\n}\n.rmp-ext-progress__generic-live-stream .rmp-ext-progress__handle,\n.rmp-ext-progress__generic-live-stream .rmp-ext-progress__play-progress,\n.rmp-ext-progress__generic-live-stream.rmp-ext-progress > span:nth-child(2),\n.rmp-ext-progress__generic-live-stream.rmp-ext-progress > span:nth-child(3) {\n display: none;\n}\n\n.rmp-ext-progress__bar:hover {\n height: 8px;\n margin-top: -2px\n}\n\n.rmp-ext-progress__bar-padding {\n position: absolute;\n z-index: 5;\n bottom: -2px;\n left: 0;\n right: 0;\n display: block;\n height: 18px;\n cursor: pointer;\n}\n\n.rmp-ext-progress__duration {\n line-height: 32px;\n padding: 0 8px;\n user-select: none;\n position: relative\n}\n\n.rmp-ext-progress__handle {\n position: absolute;\n left: 0;\n width: 6px;\n height: 10px;\n top: -3px;\n margin-left: -3px;\n cursor: pointer;\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n z-index: 7;\n transform: translateZ(0);\n}\n\n@media only screen and (max-device-width: 768px) and (pointer:coarse) {\n .rmp-ext-progress__handle {\n width: 12px !important;\n height: 24px !important;\n top: -9px !important;\n margin-left: -6px !important;\n background-color: transparent;\n box-shadow: none;\n transform: translateZ(0);\n padding: 6px 5px;\n }\n\n .rmp-ext-progress__chapter-bubble {\n z-index: 5;\n }\n\n .rmp-ext-progress__handle:before {\n content: '';\n display: block;\n width: 6px;\n height: 10px;\n top: -3px;\n margin-left: -3px;\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.25);\n transform: translateZ(0);\n }\n\n .rmp-ext-progress__bar:hover .rmp-ext-progress__handle:before {\n height: 14px;\n }\n}\n\n.rmp-ext-progress__progress {\n left: 0;\n position: absolute;\n top: 0;\n bottom: 0;\n background: #fff;\n z-index: 2\n}\n\n.rmp-ext-progress__play-progress {\n left: 0;\n position: absolute;\n top: 0;\n bottom: 0;\n background: ${t.accentColor};\n z-index: 3\n}\n\n.rmp-ext-progress__bar:hover .rmp-ext-progress__handle {\n top: -4px;\n height: 16px\n}\n\n.rmp-ext-progress__tooltip {\n position: absolute;\n bottom: 80px;\n background-color: #333;\n padding: 4px 8px;\n font-size: 12px;\n border-radius: 4px;\n display: none;\n text-align: center;\n z-index: 5\n}\n\n.rmp-ext-progress__thumbmail:not(:empty) {\n margin-bottom: 7px\n}\n\n.rmp-ext-progress__thumbmail-time,.rmp-ext-volume {\n display: inline-block\n}\n\n.rmp-ext-volume__btn .muted,.rmp-ext-volume__btn--muted .unmuted {\n display: none\n}\n\n.rmp-ext-volume__btn--muted .muted {\n display: block\n}\n\n.rmp-ext-progress__tooltip--visible {\n display: flex !important;\n justify-content: center !important;\n flex-direction: column !important;\n align-items: center !important;\n}\n\n.rmp-ext-progress__chapter-bubble {\n position: absolute;\n display: block;\n width: 12px;\n height: 12px;\n top: 50%;\n margin-top: -6px;\n margin-left: -6px;\n z-index: 6\n}\n\n.rmp-ext-progress__chapter-bubble:before {\n content: '';\n position: absolute;\n display: block;\n position: absolute;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: ${t.chaptersBubbleColor};\n top: 50%;\n margin-top: -4px;\n margin-left: 2px;\n -webkit-box-shadow: 0 0 2px 0 rgba(251,251,251,.85);\n box-shadow: 0 0 2px 0 rgba(251,251,251,.85);\n}\n\n.rmp-ext-volume__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 33px;\n}\n\n.rmp-ext-volume__selector--open, .rmp-ext-volume__selector--active {\n display: block;\n}\n\n.rmp-ext-volume__slider {\n cursor: pointer;\n height: 100px;\n display: inline-block;\n width: 4px;\n margin: 6px 14px;\n position: relative;\n line-height: 32px\n}\n\n.rmp-ext-volume__handle,.rmp-ext-volume__overlay,.rmp-ext-volume__progress {\n position: absolute;\n -webkit-box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n box-shadow: 0 0 2px 0 rgba(51,51,51,.5);\n border-radius: 2px\n}\n\n.rmp-ext-volume__handle {\n width: 12px;\n height: 8px;\n margin-top: -4px;\n cursor: pointer;\n z-index: 2;\n left: -4px;\n border: 1px solid #90A4AE;\n background-color: #fff\n}\n\n.rmp-ext-volume__overlay,.rmp-ext-volume__progress {\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${t.accentColor}\n}\n\n.rmp-ext-volume__overlay {\n display: block;\n top: 0;\n background-color: #fff;\n opacity: .75\n}\n\n.rmp-ext-theater--hidden {\n display: none;\n}\n\n.rmp-ext-fullscreen .exit-fullscreen-icon,.rmp-ext-fullscreen--exit .fullscreen-icon,\n.rmp-ext-theater--exit .rmp-ext-theater__icon,.rmp-ext-theater .rmp-ext-theater__exit-icon {\n display: none\n}\n\n.rmp-ext-fullscreen--exit .exit-fullscreen-icon, .rmp-ext-theater--exit .rmp-ext-theater__exit-icon {\n display: block\n}\n\n.rmp-ext-cc__text {\n position: absolute;\n bottom: 60px;\n left: 0;\n right: 0;\n text-align: center;\n display: none;\n pointer-events: none;\n color: ${t.mainColor};\n font-size: 18px;\n opacity: .85;\n z-index: 3;\n transition: bottom 250ms ease\n}\n\n.rmp-ext-crawl {\n position: absolute;\n bottom: 60px;\n left: 0;\n right: 0;\n pointer-events: none;\n z-index: 3;\n transition: bottom 250ms ease;\n background-color: #224367;\n color: #FFFFFF;\n padding: 5px 0;\n overflow: hidden;\n white-space: nowrap;\n}\n \n .rmp-ext-crawl__text {\n width: max-content;\n will-change: transform;\n }\n\n .rmp-ext-crawl__text * {\n color: inherit !important;\n }\n\n .rmp-ext-crawl > .rmp-ext-crawl__text, .rmp-ext-crawl > .rmp-ext-crawl__text > * {\n display: inline-block;\n margin: 0;\n padding: 0;\n }\n\n.rmp-ext-crawl--exist > .rmp-ext-cc__text {\n bottom: 100px;\n}\n\n.rplayer--iphone .rmp-ext-cc__text {\n transition: none;\n bottom: 100px;\n will-change: auto;\n}\n\n.rmp-extensions--hidden > .rmp-ext-cc__text {\n bottom: 10px\n}\n\n.rmp-extensions--hidden > .rmp-ext-crawl {\n bottom: 10px\n}\n\n.rmp-extensions--hidden.rmp-ext-crawl--exist > .rmp-ext-cc__text {\n bottom: 50px\n}\n\n.rmp-ext-cc__text--visible {\n display: block\n}\n\n.rmp-ext-cc__text-holder {\n background-color: #333;\n padding: 4px 8px;\n border-radius: 4px;\n display: inline-block;\n line-height: 1.2\n}\n\n.rplayer__inner--cc-below .rmp-ext-cc__text {\n position: static;\n margin-top: 5px;\n}\n\n.rmp-ext-cc__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n margin-left: -15px;\n background-color: ${t.submenuBgColor};\n overflow: hidden;\n width: 250px\n}\n\n.rmp-ext-cc__selector--open {\n display: block\n}\n\n.rmp-ext-cc__selector .rmp-ext-cc__item {\n padding-left: 18px;\n}\n\n.rmp-ext-cc__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-cc__item--checked:before,.rmp-ext-settings__item--checked:before,.rmp-ext-toc__lang-item--checked:before,.rmp-ext-audio-tracks__item--checked:before {\n position: absolute;\n content: '•';\n margin-left: -12px;\n font-size: 24px;\n margin-top: -1px\n}\n\n.rmp-ext-toc {\n width: 34px;\n padding: 0 2px\n}\n\n.rmp-ext-toc__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n overflow: hidden;\n background-color: ${t.submenuBgColor};\n width: 250px\n}\n\n.rmp-ext-toc__chapters > .rmp-ext-toc__item {\n width: 100%;\n height: auto;\n min-height: 32px;\n text-align: left;\n padding: 0 15px;\n}\n\n.rmp-ext-toc__chapters:empty {\n padding-top: 0;\n}\n\n\n.rmp-ext-toc__selector--open {\n display: block\n}\n\n.rmp-ext-toc__item,.rmp-ext-toc__selector a:hover {\n text-decoration: none;\n color: #000\n}\n\n.rmp-ext-toc__item {\n margin-bottom: 14px;\n display: block;\n color: ${t.submenuColor};\n padding: 8px 0\n}\n\n.rmp-ext-toc__item:hover {\n color: #333;\n text-decoration: underline\n}\n\n.rmp-ext-toc__item:last-child {\n margin-bottom: 0\n}\n\nbutton.rmp-ext-toc__more {\n text-align: left;\n width: 100%;\n line-height: 32px;\n padding-left: 12px;\n border-top: 1px solid #AAA;\n}\n\n.rmp-ext-toc__more .arrow {\n float: right;\n width: 20px;\n margin-top: 4px;\n}\n\n.rmp-ext-toc__more .arrow svg, button.rmp-ext-toc__back svg {\n fill: ${t.submenuColor}\n}\n\n.rmp-ext-toc__main-step:after, .rmp-ext-toc__languages-step:after {\n content: ' ';\n display: table;\n clear: both;\n}\n\n.rmp-ext-toc__main-step, .rmp-ext-toc__languages-step, .rmp-ext-toc__translate-step {\n display: none;\n position: absolute;\n left: 265px;\n bottom: 0;\n width: 100%;\n overflow: auto;\n}\n\n.rmp-ext-toc__selector--main-step .rmp-ext-toc__main-step,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__translate-step,\n.rmp-ext-toc__selector--languages-step .rmp-ext-toc__languages-step {\n display: block;\n position: relative;\n left: 0;\n width: 100%;\n}\n\n.rmp-ext-toc__selector--languages-step .rmp-ext-toc__main-step,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__main-step,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__languages-step {\n display: none;\n position: absolute;\n left: -265px;\n}\n\n.rmp-ext-toc__selector--languages-step .rmp-ext-toc__back,\n.rmp-ext-toc__selector--translate-step .rmp-ext-toc__back {\n border-bottom: 1px solid #AAA;\n text-align: left;\n width: 100%;\n line-height: 32px;\n}\n\n.rmp-ext-toc__back span:first-of-type {\n float: left;\n padding: 3px 0;\n}\n\nbutton.rmp-ext-toc__lang-item {\n width: 100%;\n text-align: left;\n padding: 0 12px 0 20px;\n line-height: 32px;\n}\n\n\n.rmp-ext-toc__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n\n.rmp-ext-popover {\n position: absolute;\n bottom: 56px;\n background-color: #666;\n z-index: 9;\n padding: 4px 6px;\n border-radius: 4px;\n font-size: 12px;\n opacity: .875;\n display: none\n}\n\n.rmp-annotation:hover .rmp-annotation__button,.rmp-ext-popover--visible {\n display: block\n}\n\n.rmp-annotation {\n position: absolute;\n background-color: rgba(0,0,0,.8);\n padding: 4px 6px;\n color: #fff;\n border: 1px solid #888;\n display: none;\n z-index: 3\n}\n\n.rmp-annotation--visible {\n display: block\n}\n\n.rmp-annotation__button {\n position: absolute;\n top: -6px;\n right: -6px;\n background-color: #eee;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n border: 0 none;\n display: none;\n cursor: pointer\n}\n\n.rmp-annotation__button svg {\n fill: #666;\n position: absolute;\n top: 1px;\n left: 1px\n}\n\n.rmp-annotation__button:hover svg {\n fill: #333\n}\n\n.rmp-ext-poster, .rmp-ext-poster img {\n width: 100%\n}\n.rmp-ext-poster img {\n position: absolute;\n margin: auto;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100% !important;\n height: auto !important;\n}\n\n.rmp-ext-poster {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: black;\n}\n\n.rmp-ext-poster--hidden {\n display: none\n}\n\n.rmp-ext-settings {\n width: 34px;\n padding: 0 2px;\n}\n\n.rmp-ext-settings__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 260px;\n right: 5px;\n overflow: hidden;\n}\n\n.rmp-ext-settings__selector--open {\n display: block\n}\n\n.rmp-ext-settings__selector button {\n width: 100%;\n text-align: left;\n padding: 0 6px;\n line-height: 32px;\n}\n\n.rmp-ext-settings__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-download__more .arrow, .rmp-ext-settings__more .arrow {\n float: right;\n width: 20px;\n margin-top: 5px;\n}\n\n.rmp-ext-download__more .arrow svg, .rmp-ext-settings__more .arrow svg {\n fill: ${t.submenuColor}\n}\n\n.rmp-ext-settings__current-value, .rmp-ext-cc__current-value, .rmp-ext-toc__current-value {\n float: right;\n font-size: 11px;\n color: #757575\n}\n\n.rmp-ext-cc__settings--progress .rmp-ext-cc__current-value {\n font-style: italic;\n}\n\n.rmp-ext-cc__settings--progress {\n background-color: transparent !important;\n}\n\n\n.rmp-ext-cc__settings--progress > span {\n opacity: 0.5;\n}\n\n.rmp-ext-download__main-step, .rmp-ext-settings__main-step {\n width: 100%;\n left: 0;\n position: relative;\n}\n\n.rmp-ext-download__main-step:after, .rmp-ext-download__additional-step:after,\n.rmp-ext-settings__main-step:after, .rmp-ext-settings__additional-step:after, .rplayer--right-playlist:after {\n content: ' ';\n display: table;\n clear: both;\n}\n\n.rmp-ext-download__additional-step, .rmp-ext-settings__additional-step {\n display: none;\n position: absolute;\n left: 265px;\n bottom: 0;\n width: 100%;\n overflow: auto;\n}\n\n.rmp-ext-download__selector--additional .rmp-ext-download__additional-step,\n.rmp-ext-settings__selector--additional .rmp-ext-settings__additional-step {\n display: block;\n position: relative;\n left: 0;\n width: 100%;\n}\n\n.rmp-ext-download__selector--additional .rmp-ext-download__main-step,\n.rmp-ext-settings__selector--additional .rmp-ext-settings__main-step {\n display: none;\n position: absolute;\n left: -265px;\n}\n\nbutton.rmp-ext-download__back, button.rmp-ext-settings__back {\n border-bottom: 1px solid #AAA;\n}\n\nbutton.rmp-ext-download__back svg, button.rmp-ext-settings__back svg {\n fill: ${t.submenuColor};\n float: left;\n}\n\n.rmp-ext-download__back > span:first-of-type, .rmp-ext-settings__back > span:first-of-type {\n display: block;\n float: left;\n padding: 4px 0;\n}\n\nbutton.rmp-ext-settings__item {\n padding-left: 20px\n}\n\nbutton.rmp-ext-settings__item.rmp-ext-settings__item--checked:before {\n margin-top: -1px;\n}\n\n.rmp-ext-audio-tracks, .rmp-ext-search {\n width: 34px;\n padding: 0 2px;\n}\n\n.rmp-ext-search--hidden {\n display: none;\n}\n\n.rmp-ext-audio-tracks__selector, .rmp-ext-search__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 260px;\n right: 5px;\n overflow: auto;\n}\n\n.rmp-ext-audio-tracks__selector--open, .rmp-ext-search__selector--open {\n display: block\n}\n\n.rmp-ext-audio-tracks__selector button, .rmp-ext-search__selector button {\n width: 100%;\n text-align: left;\n padding: 0 6px 0 20px;\n line-height: 32px;\n}\n\n.rmp-ext-audio-tracks__selector button:hover, .rmp-ext-search__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-search__captions {\n overflow: auto;\n max-height: 160px;\n}\n\n.rmp-ext-search__input {\n width: 100%;\n margin-top: 2px;\n}\n\n.rplayer--mobile .rmp-ext-search__input {\n height: 40px;\n}\n\n.rmp-ext-search__item--current {\n font-weight: 600;\n}\n\n.rmp-ext-search__cc-text {\n font-family: Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif;\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block !important;\n white-space: nowrap;\n width: 156px;\n padding-left: 6px !important;\n vertical-align: middle;\n}\n\n.rmp-ext-search__cc-time {\n font-family: Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, sans-serif;\n display: inline-block !important;\n width: 59px;\n padding-right: 5px;\n vertical-align: middle;\n overflow: hidden;\n margin-left: -5px;\n}\n\nbutton.rmp-ext-cc__more {\n text-align: left;\n width: 100%;\n line-height: 32px;\n padding-left: 20px;\n}\n\n.rmp-ext-cc__main-step button.rmp-ext-cc__more {\n border-top: 1px solid #AAA;\n}\n\n.rmp-ext-cc__more .arrow {\n float: right;\n width: 20px;\n margin-top: 4px;\n}\n\n.rmp-ext-cc__more .arrow svg, button.rmp-ext-cc__back svg {\n fill: ${t.submenuColor}\n}\n\n.rmp-ext-cc__main-step, .rmp-ext-cc__settings-step, .rmp-ext-cc__additional-step {\n position: relative;\n left: 0;\n width: 100%;\n overflow: auto;\n display: block;\n}\n\n.rmp-ext-cc__selector--settings-step .rmp-ext-cc__main-step, .rmp-ext-cc__selector--additional-step .rmp-ext-cc__main-step,\n.rmp-ext-cc__selector--additional-step .rmp-ext-cc__settings-step, .rmp-ext-cc__selector--translate-step .rmp-ext-cc__main-step {\n display: none;\n position: absolute;\n left: -255px;\n}\n\n.rmp-ext-cc__selector--main-step .rmp-ext-cc__settings-step, .rmp-ext-cc__selector--main-step .rmp-ext-cc__additional-step,\n.rmp-ext-cc__selector--settings-step .rmp-ext-cc__additional-step, .rmp-ext-cc__selector--translate-step .rmp-ext-cc__additional-step {\n display: none;\n position: absolute;\n left: 255px;\n}\n\n.rmp-ext-cc__selector--settings-step .rmp-ext-cc__translate-wrapper, .rmp-ext-cc__selector--translate-step .rmp-ext-cc__settings-wrapper {\n display: none;\n}\n\n.rmp-ext-cc__selector button {\n text-align: left;\n width: 100%;\n line-height: 32px;\n}\n\nbutton.rmp-ext-cc__back {\n border-bottom: 1px solid #AAA;\n}\n\n.rmp-ext-cc__back span:first-of-type {\n float: left;\n padding: 3px 0;\n}\n\n.rmp-ext-help__button {\n position: absolute;\n top: 8px;\n right: 10px;\n z-index: 6;\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.rmp-ext-help, .rmp-ext-help__canvas {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n}\n\n.rmp-ext-help__canvas, rmp-ext-help__canvas--visible .rmp-ext-help__button {\n display: none;\n}\n\n.rmp-ext-help__canvas--visible, .rmp-ext-help__canvas--visible .rmp-ext-help__canvas {\n display: block;\n z-index: 999;\n}\n\n.rmp-ext-title {\n width: 100%;\n top: 0;\n z-index: 2\n}\n\n.rmp-ext-title__title {\n font-size: 20px;\n padding: 12px 50px 0 12px;\n opacity: 0.95;\n display: block;\n\n max-height: 60px;\n overflow: hidden;\n\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n\n.rmp-ext-prev, .rmp-ext-next {\n display: none;\n position: absolute;\n top: 50%;\n margin-top: -34px;\n cursor: pointer;\n opacity: 0.75;\n z-index: 4;\n}\n\n.rplayer--fullscreen .rmp-ext-prev, .rplayer--fullscreen .rmp-ext-next {\n display: block;\n}\n\n.rmp-ext-prev:hover, .rmp-ext-next:hover {\n opacity: 1;\n}\n\n.rmp-ext-prev {\n transition: left 150ms ease\n}\n\n.rmp-ext-next {\n transition: right 150ms ease\n}\n\n.rmp-ext-prev, .rplayer__inner--light.rplayer__inner--hovering .rmp-ext-prev {\n left: -120px;\n}\n\n.rplayer__inner--light .rmp-ext-prev,\n.rmp-extensions--hidden > .rmp-ext-prev {\n left: -175px;\n}\n\n.rmp-ext-next, .rplayer__inner--light.rplayer__inner--hovering .rmp-ext-next {\n right: -120px;\n}\n\n.rplayer__inner--light .rmp-ext-next,\n.rmp-extensions--hidden > .rmp-ext-next {\n right: -175px;\n}\n\n@media only screen and (max-device-width: 768px){\n.rplayer__inner .rmp-ext-next:hover {\n right: -120px !important;\n}\n\n.rplayer__inner .rmp-ext-prev:hover {\n left: -120px !important;\n}\n}\n\n.rmp-ext-prev__button, .rmp-ext-next__button {\n background-color: #333;\n border: 0;\n height: 67.5px;\n cursor: pointer\n}\n\n.rmp-ext-prev__button {\n border-radius: 0 50% 50% 0;\n float: right;\n padding-left: 0;\n}\n\n.rmp-ext-next__button {\n border-radius: 50% 0 0 50%;\n float: left;\n padding-right: 0;\n}\n\n.rmp-ext-prev__thumbnail, .rmp-ext-next__thumbnail {\n width: 120px;\n height: 67.5px;\n border: 5px solid #333;\n}\n\n.rmp-ext-prev__button, .rmp-ext-prev__thumbnail {\n -webkit-box-shadow: -2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n box-shadow: -2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n}\n\n.rmp-ext-next__button, .rmp-ext-next__thumbnail {\n -webkit-box-shadow: 2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n box-shadow: 2px 4px 5px 0px rgba(50, 50, 50, 0.75);\n}\n\n.rmp-ext-next:hover {\n right: 0 !important;\n}\n\n.rmp-ext-prev:hover {\n left: 0 !important;\n}\n\n.rmp-ext-prev__button svg, .rmp-ext-next__button svg {\n fill: ${t.mainColor};\n}\n\n.rmp-no-video {\n position: absolute;\n top: 50%;\n margin-top: -.5em;\n display: block;\n text-align: center;\n left: 0;\n right: 0;\n}\n\n.rmp-ext-buffering {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(51,51,51,.5);\n display: none;\n z-index: 9999;\n}\n\n.rmp-ext-buffering--processing {\n display: block;\n}\n\n.rmp-ext-buffering__message {\n padding: 20px;\n display: inline-block;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.rmp-ext-buffering__message svg {\n fill: #FFF;\n opacity: .75;\n width: 50px;\n height: 50px;\n animation: spin 1.5s linear infinite;\n animation-direction: reverse;\n}\n\n.rmp-ext-buffering--processing ~ .rmp-ext-placeholder {\n opacity: 0;\n}\n\n.rmp-ext-download__main-step {\n position: relative;\n left: 0;\n width: 100%;\n overflow: auto;\n\n -webkit-transition: left .25s ease;\n transition: left .25s ease;\n}\n\n.rmp-ext-download-hidden {\n position: absolute;\n opacity: 0;\n}\n\n.rmp-ext-download__selector {\n position: absolute;\n bottom: 56px;\n border-radius: 4px;\n display: none;\n z-index: 8;\n background-color: ${t.submenuBgColor};\n width: 200px;\n right: 5px;\n overflow: hidden;\n}\n\n.rmp-ext-download__selector--open {\n display: block\n}\n\n.rmp-ext-download__selector button {\n width: 100%;\n text-align: left;\n padding: 0 6px;\n line-height: 32px;\n}\n\n.rmp-ext-download__selector button:hover {\n background-color: rgba(51,51,51,.25)\n}\n\n.rmp-ext-c2pa {\n display: none;\n position: absolute;\n right: 12px;\n top: 12px;\n transition: opacity .25s ease;\n}\n\n.rmp-ext-c2pa__items-wrapper {\n max-height: 250px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.rmp-ext-c2pa--visible { \n display: block !important;\n}\n\n.rmp-ext-c2pa--no-data > .rmp-ext-c2pa__button > svg {\n fill: #F7B100;\n}\n\n.rmp-ext-c2pa--invalid > .rmp-ext-c2pa__button > svg {\n fill: #E62048;\n}\n\n.rplayer__inner--playing .rmp-ext-c2pa {\n opacity: 0;\n}\n.rplayer__inner--hovering .rmp-ext-c2pa {\n opacity: 1 !important;\n}\n\n.rmp-ext-c2pa__selector.rmp-ext-c2pa__selector--open {\n display: block;\n}\n\n.rmp-ext-c2pa__selector {\n display: none;\n background-color: #FFFFFF;\n padding: 16px;\n position: absolute;\n min-width: 320px;\n max-width: 320px;\n z-index: 100;\n top: 0;\n right: 40px;\n border-radius: 8px;\n width: max-content;\n}\n\n.rmp-ext-c2pa button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n}\n\n.rmp-ext-c2pa > button > svg {\n width: 24px;\n height: 24px;\n display: block;\n fill: #fff;\n z-index: 100;\n position: relative;\n}\n\n.rmp-ext-c2pa__item {\n position: relative;\n min-height: 45px;\n}\n\n.rmp-ext-c2pa__item--collapsed::before {\n content: "";\n display: block;\n position: absolute;\n top: 5px;\n left: 0;\n width: 16px;\n height: 16px;\n background-color: #414141;\n border-radius: 50%;\n}\n\n.rmp-ext-c2pa__item--invalid .rmp-ext-c2pa__item--collapsed::before {\n background-color: #E62048;\n}\n\n.rmp-ext-c2pa__item--collapsed::after {\n content: "";\n display: block;\n position: absolute;\n top: 9px;\n left: 4px;\n width: 8px;\n height: 8px;\n background-color: #A9A9A9;\n border-radius: 50%;\n}\n\n.rmp-ext-c2pa__item:not(:last-of-type) .rmp-ext-c2pa__item--line {\n width: 2px;\n background-color: #414141;\n height: 100%;\n position: absolute;\n left: 7px;\n top: 21px;\n}\n\n.rmp-ext-c2pa__item--section-title {\n font-size: 12px;\n color: #767676;\n margin-left: 35px;\n margin-bottom: 5px;\n }\n\n .rmp-ext-c2pa__item--collapsed .rmp-ext-c2pa__item--section-title {\n margin-left: 0;\n }\n\n.rmp-ext-c2pa__item--wrapper {\n display: flex;\n align-items: start;\n margin-bottom: 12px;\n position: relative;\n}\n\n.rmp-ext-c2pa__item--toggler {\n padding: 0;\n position: absolute;\n top: -5px;\n right: 0px;\n transform: rotate(0deg);\n transition: transform .2s ease-in-out;\n}\n\n.rmp-ext-c2pa__item--toggler-opened {\n transform: rotate(-180deg);\n}\n\n.rmp-ext-c2pa__item--thumbnail {\n min-width: 30px;\n height: 25px;\n margin: 0 5px 0 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n border-radius: 2px;\n position: relative;\n}\n\n.rmp-ext-c2pa__item--thumbnail img {\n object-fit: cover;\n width: 100%;\n}\n\n.rmp-ext-c2pa__item--thumbnail svg {\n fill: #000000;\n width: 20px;\n opacity: 0.8;\n}\n\n.rmp-ext-c2pa__item--info-wrapper {\n line-height: 15px;\n width: 100%;\n}\n\n.rmp-ext-c2pa__item:not(:last-of-type) .rmp-ext-c2pa__item--info-wrapper {\n border-bottom: 1px solid #E5E5E5;\n padding-bottom: 12px;\n}\n\n.rmp-ext-c2pa__item--title {\n word-wrap: anywhere;\n font-size: 14px;\n font-weight: 500;\n max-width: 230px;\n padding-right: 20px;\n margin-bottom: 6px;\n}\n\n.rmp-ext-c2pa__item--status-message, .rmp-ext-c2pa__item--status-message-extended {\n font-size: 12px;\n color: #767676;\n}\n\n.rmp-ext-c2pa__item--status-message-extended {\n display: none;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item--status-message-extended {\n display: block;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item--status-message {\n display: none;\n}\n\n.rmp-ext-c2pa__view-more {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 40px;\n margin-top: 6px;\n padding: 5px;\n border-radius: 100px;\n background-color: #3665F3 !important;\n color: #FFFFFF !important;\n font-weight: 700;\n font-size: 14px;\n text-decoration: none;\n}\n\n.rmp-ext-c2pa__item-details {\n display: none;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-top: 15px;\n}\n\n.rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details > div {\n display: flex;\n}\n\n.rmp-ext-c2pa__item--collapsed {\n padding-left: 20px;\n}\n\n.rmp-ext-c2pa__item--collapsed .rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details > div:nth-child(2) {\n flex-direction: column;\n margin-top: 16px;\n}\n\n.rmp-ext-c2pa__item--collapsed .rmp-ext-c2pa__item-details-visible .rmp-ext-c2pa__item-details > div:nth-child(2) > .rmp-ext-c2pa__item--wrapper {\n margin: 5px 0px 0 -5px;\n}\n\n.rmp-ext-c2pa__item-details--icon {\n margin-top: 5px;\n}\n\n.rmp-ext-c2pa__item-details > svg {\n min-width: 32px;\n}\n\n.rmp-ext-c2pa__item-details--wrapper {\n margin-left: 10px;\n}\n\n.rmp-ext-c2pa__item-details--issuer {\n color: #767676;\n font-size: 12px;\n display: flex;\n}\n\n.rmp-ext-c2pa__item-details--issuer-title {\n font-weight: 700;\n min-width: 65px;\n margin-bottom: 4px;\n}\n\n.rmp-ext-c2pa__view-more svg {\n fill: #FFFFFF;\n margin-left: 5px;\n}\n\n.rmp-ext-progress__c2pa-status {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n}\n\n.rmp-ext-c2pa__items-status--wrapper {\n font-size: 12px;\n margin-bottom: 24px;\n color: #767676;\n display: flex;\n text-transform: uppercase;\n}\n\n.rmp-ext-c2pa__items-status {\n padding-left: 5px;\n}\n\n.rmp-ext-c2pa__items-status--success {\n color: #767676;\n}\n\n.rmp-ext-c2pa__items-status--no-data {\n color: #F7B100;\n}\n\n.rmp-ext-c2pa__items-status--invalid {\n color: #E62048;\n}\n\n.rmp-ext-c2pa__items-status--undefined {\n color: #E62048;\n}\n\n.rmp-ext-c2pa__no-data-message-wrapper {\n display: flex;\n align-items: center;\n margin-bottom: 24px;\n}\n\n.rmp-ext-c2pa__no-data-message-wrapper > svg {\n fill: #767676;\n}\n\n.rmp-ext-c2pa__no-data-message {\n max-width: 220px;\n margin-left: 12px;\n font-size: 12px;\n color: #767676;\n font-weight: 500;\n}\n\n.rmp-ext-progress__c2pa-status--invalid-segment {\n position: absolute;\n top: 0;\n bottom: 0;\n background-color: orange;\n z-index: 6;\n transform: scale(1);\n transition: all .1s ease-in-out;\n}\n\n.rmp-ext-bottom-next--hidden, .rmp-ext-bottom-prev--hidden {\n display: none;\n}\n\n.rmp-ext-search__selector > .rmp-ext-search__cc-clear {\n position: absolute;\n bottom: 3px;\n right: 5px;\n width: 15px;\n height: 15px;\n padding: 0;\n}\n\n.rmp-ext-search__selector > .rmp-ext-search__cc-clear:hover {\n background-color: transparent;\n opacity: 0.8;\n}\n\n.rmp-ext-search__selector > .rmp-ext-search__cc-clear svg {\n width: 15px;\n height: 15px;\n fill: #707070;\n}\n\n.rmp-ext-live {\n width: 34px;\n}\n\n.rmp-ext-live .broadcast-off {\n display: block;\n}\n\n.rmp-ext-live .broadcast-on {\n display: none;\n}\n\n.rmp-ext-live--live .broadcast-off {\n display: none;\n}\n\n.rmp-ext-live--live .broadcast-on {\n display: block;\n fill: #ff1111;\n}\n\n.rmp-ext-progress__hidden > span{\n visibility: hidden;\n}\n\n@media only screen and (max-width: 1224px) {\n .rmp-ext-progress__hidden > .rmp-ext-progress__current {\n visibility: visible !important;\n }\n}\n\n.rmp-ext-error {\n padding: 20px;\n text-align: center;\n z-index: 9999;\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: black;\n color: #FFFFFF;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n}\n\n.rmp-ext-error > svg {\n width: 50px;\n height: 50px;\n fill: #FFFFFF;\n margin-bottom: 20px;\n}\n \n.rmp-ext-error--hidden {\n display: none;\n}\n\n\n\n `}(t,e)+" "+function(t,e){const n=function(t,e){let n=`calc(100% - ${t.rplaylistHeight})`,i=t.rplaylistHeight;if(e){const t=e.right-e.left;n=.7*t+"px",i=.3*t+"px"}return`\n\n.rplayer--fullscreen .rplayer--right-playlist .rplayer__playlist-wrapper {\n max-height: calc(100vh - 44px);\n width: 0;\n}\n\n.rplayer--right-playlist .rplayer__playlist-wrapper {\n width: ${i};\n float: right;\n height: 100%;\n}\n\n.rplayer--right-playlist .rplayer__playlist {\n background-color: #424242;\n overflow-y: auto;\n overflow-x: hidden;\n position: absolute;\n top: 78px;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.rplayer--right-playlist .rplayer__playlist-wrapper.rplayer__playlist-wrapper--wot-title .rplayer__playlist {\n top: 22px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-header {\n max-height: 56px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n\n.rplayer--right-playlist .rplayer__inner {\n width: ${n};\n float: left;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item {\n padding: 8px;\n height: 70px;\n border-top: 1px solid #000;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item-title {\n font-size: 13px;\n line-height: 1.4;\n height: 52px;\n display: block;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 3;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item-thumb {\n margin-right: 6px;\n width: 96px;\n height: 54px;\n float: left;\n}\n\n.rplayer--right-playlist .rplayer__playlist-item--current .rplayer__playlist-item-thumb:before {\n font-size: 28px;\n line-height: 54px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-of {\n left: 8px;\n top: 58px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-wrapper.rplayer__playlist-wrapper--wot-title .rplayer__playlist-of {\n top: 5px;\n}\n\n.rplayer--right-playlist .rplayer__playlist-left-btn, .rplayer--right-playlist .rplayer__playlist-right-btn {\n display: none !important;\n}\n\n `}(t,e),i=function(t,e){let n="calc(100% - 152px)";return e&&(n=e.bottom-e.top-152+"px"),`\n\n\n.rplayer--fullscreen .rplayer--bottom-playlist .rplayer__playlist-wrapper {\n height: 0;\n width: 0;\n}\n\n.rplayer--bottom-playlist .rplayer__inner {\n height: ${n};\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-wrapper {\n height: 152px\n}\n\n.rplayer--bottom-playlist .rplayer__playlist {\n margin-top: 6px;\n position: absolute;\n bottom: 0\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-header {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 30px;\n position: absolute;\n left: 0;\n right: 65px;\n top: 0;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-of {\n top: 12px;\n right: 8px;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-current-title {\n display: block;\n position: absolute;\n left: 8px;\n top: 40px;\n color: ${t.mainColor};\n font-size: 12px;\n right: 8px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item {\n margin-right: 10px;\n float: left\n}\n\n.rplayer__playlist-left-btn, .rplayer__playlist-right-btn {\n position: absolute;\n bottom: 1px;\n z-index: 10;\n background-color: rgba(0,0,0,.75);\n border: 0;\n cursor: pointer;\n height: 92px\n}\n\n.rplayer__playlist-left-btn svg, .rplayer__playlist-right-btn svg {\n fill: ${t.mainColor}\n}\n\n.rplayer__playlist-left-btn {\n left: 0;\n}\n\n.rplayer__playlist-right-btn {\n right: 0;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item-thumb {\n width: 160px;\n height: 90px;\n float: left;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item--current .rplayer__playlist-item-thumb:before {\n font-size: 36px;\n line-height: 90px;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item .rplayer__playlist-item-title {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n\n font-size: 11px;\n padding: 6px;\n line-height: 1.1;\n background-color: rgba(31,31,31,0.625);\n display: block;\n\n height: 32px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n\n.rplayer--bottom-playlist .rplayer__playlist-item--current .rplayer__playlist-item-title {\n display: none;\n}\n\n `}(t,e);return`\n\n.rplayer__playlist-wrapper {\n background-color: #000;\n}\n\n.rplayer__playlist {\n color: ${t.mainColor}\n}\n\n.rplayer__playlist-header {\n padding: 8px;\n margin: 0;\n font-size: 16px;\n line-height: 1.4;\n display: block;\n overflow: hidden;\n color: ${t.mainColor};\n font-weight: 400;\n}\n\n.rplayer__playlist-current-title {\n display: none;\n}\n\n.rplayer__playlist-item {\n position: relative;\n cursor: pointer;\n}\n\n.rplayer__playlist-item-thumb {\n position: relative;\n overflow: hidden;\n}\n\n.rplayer__playlist-of {\n position: absolute;\n font-size: 12px;\n color: ${t.mainColor};\n}\n\n.rplayer__playlist .rplayer__playlist-item:last-child {\n margin: 0 !important\n}\n\n.rplayer__playlist-item--current {\n cursor: inherit;\n background-color: #757575\n}\n\n.rplayer__playlist-item--current .rplayer__playlist-item-thumb:before {\n display: block;\n content: '►';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n text-align: center;\n z-index: 9;\n background-color: rgba(255,255,255,0.5);\n text-shadow: 0.125rem 0.125rem 0.5rem #333\n}\n\n.rplayer__playlist-item-thumb img {\n position: absolute;\n width: 100%\n}\n\n\n${n}\n\n${i}\n\n `}(t,e),i=document.head||R(document.getElementsByTagName("head")),s=C("style",{type:"text/css"});s.styleSheet?window.$?window.$('<style type="text/css">'+n+"</style>").appendTo("head"):s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n)),i.appendChild(s)}function Vs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const js="rplayer__playlist-wrapper",Us=`${js}--wot-title`,Ws="rplayer__playlist-item",qs=`${Ws}--current`;class Gs extends W{constructor(t,e){super(e.bus,e.logger),Vs(this,"$element",void 0),Vs(this,"$wrapper",void 0),Vs(this,"$of",void 0),Vs(this,"$currentTitle",void 0),Vs(this,"$header",void 0),Vs(this,"$left",void 0),Vs(this,"$right",void 0),Vs(this,"$items",[]),Vs(this,"_playlist",[]),Vs(this,"_current",null),Vs(this,"_header",""),Vs(this,"_label","videos"),Vs(this,"_point",void 0),Vs(this,"_mode",void 0),Vs(this,"_forceDowngrade",!1),Vs(this,"_isLoop",!1),this._playlist=t,this._mode=e.mode,this._header=e.title,this._label=e.label,this._point=e.forcePoint,this._isLoop=e.loop,this._onResize=this._onResize.bind(this),this._onFullScreenChanged=this._onFullScreenChanged.bind(this),this._gotoNextTrack=this._gotoNextTrack.bind(this),this._gotoPrevTrack=this._gotoPrevTrack.bind(this),e.bus.on("resizeplayer",this._onResize),e.bus.on("nexttrack",this._gotoNextTrack),e.bus.on("prevtrack",this._gotoPrevTrack),e.bus.on("fullscreenchanged",this._onFullScreenChanged),this.render(),this.addEvent(this.$left,"click",(()=>this.slideLeft(250))),this.addEvent(this.$right,"click",(()=>this.slideRight(250)))}isBottom(){return!!this._forceDowngrade||"bottom"===this._mode}_gotoNextTrack(){let t=O(this.$items,this._current),e=this.$items[++t];this._isLoop&&!e&&(e=this.$items[0]),Qs(e,"click")}_gotoPrevTrack(){let t=O(this.$items,this._current);const e=this.$items[--t];e&&Qs(e,"click")}render(){this.$wrapper=C("div",{class:`${js} ${this._header?"":Us}`}),this.$header=C("h3",{class:"rplayer__playlist-header",title:this._header},this.$wrapper),this.$header.textContent=this._header,this.$of=C("span",{class:"rplayer__playlist-of"},this.$wrapper),this.$currentTitle=C("span",{class:"rplayer__playlist-current-title"},this.$wrapper),this.$element=C("div",{class:"rplayer__playlist",tabindex:-1},this.$wrapper);this.$left=C("button",{type:"button",class:"rplayer__playlist-left-btn",style:"display: none;"},this.$wrapper),Me(this.$left,Te),this.$left.setAttribute("aria-label","Scroll left"),this.$right=C("button",{type:"button",class:"rplayer__playlist-right-btn"},this.$wrapper),Me(this.$right,Ee),this.$right.setAttribute("aria-label","Scroll right");let t=z(this._playlist);c(this._playlist,(e=>{const n=this._renderItem(e);e===t&&(this._changeSource(t),this._changeCurrent(n)),this.$items.push(n)}))}_changeSource(t){this.bus.emit("changesource",t),this.bus.emit("changeplaylistmode",this.isBottom()?"bottom":"right");const e=this._playlist.indexOf(t)+1;this.$of.textContent=`${e}/${this._playlist.length} ${this._label}`,this.$currentTitle.textContent=t.title,this.$currentTitle.setAttribute("title",t.title)}_changeCurrent(t){this._current&&L(this._current,qs),S(t,qs),this._current=t,this._stablePlaylist()}_stablePlaylist(){if(!this._current)return;const t=this._current.getBoundingClientRect();if(this.isBottom()){if(this.$left){let e=this.$left.getBoundingClientRect();e.right>t.left&&this.slideLeft(e.right-t.left)}if(this.$right){let e=this.$right.getBoundingClientRect();e.left<t.right&&this.slideRight(t.right-e.left)}}else{const e=this.$element.getBoundingClientRect();this.$element.scrollTop-=Math.max(0,e.top-t.top),this.$element.scrollTop+=Math.max(0,t.bottom-e.bottom)}}_renderItem(t){const e=C("div",{class:Ws,title:t.title,tabindex:0},this.$element),n=C("div",{class:"rplayer__playlist-item-thumb"},e);C("img",{src:t.poster},n),C("span",{class:"rplayer__playlist-item-title"},e).textContent=t.title,C("b",{},e);const i=()=>{E(e,qs)||(this._changeSource(t),this._changeCurrent(e))};return this.addEvent(e,"click",i),this.addEvent(e,"keydown",(t=>{32===t.keyCode&&(t.preventDefault(),i())})),e}_onResize(t){const{outerWidth:e}=t;this._forceDowngrade!==e<this._point&&(this._forceDowngrade=!this._forceDowngrade,this.bus.emit("changeplaylistmode",this.isBottom()?"bottom":"right"),this.$wrapper.style.height="",this.$element.style.width="",this.$element.style.marginLeft="",this._stablePlaylist()),this.isBottom()?this._resize4bottom(t):this._resize4right(t)}_resize4right({height:t}){if(this.$wrapper.style.height=`${t}px`,!this._current)return;const e=this._current.getBoundingClientRect(),n=this.$element.getBoundingClientRect();n.top>e.top?this.$element.scrollTop=this.$element.scrollTop-(n.top-e.top):n.bottom<e.bottom&&(this.$element.scrollTop=this.$element.scrollTop+e.bottom-n.bottom)}_resize4bottom({width:t}){c(this.$items,(t=>{t.style.width=""})),this.$element.style.width=`${t}px`,t=0,c(this.$items,(e=>{t+=e.offsetWidth;const n=e.currentStyle||window.getComputedStyle(e);t+=parseFloat(n.marginRight)})),this.$element.style.width=`${t}px`,this._stableBottomPosition()}_stableBottomPosition(){if(!this._current)return;const t=this._current.getBoundingClientRect(),e=this.$wrapper.getBoundingClientRect();e.left>t.left?(Qs(this.$left,"click"),setTimeout((()=>this._stableBottomPosition()))):e.right<t.right&&(Qs(this.$right,"click"),setTimeout((()=>this._stableBottomPosition())))}_onFullScreenChanged(t){this.$element.style.display=t?"none":"block"}slideLeft(t){let e=parseInt(this.$element.style.marginLeft,10)||0;e=Math.min(0,e+t),this.$element.style.marginLeft=`${e}px`,this.$right.style.display="block",e||(this.$left.style.display="none")}slideRight(t){const e=this.$element.parentNode;if(!(e instanceof HTMLElement))return;let n=parseInt(this.$element.style.marginLeft,10)||0;n-=t;const i=e.offsetWidth-this.$element.offsetWidth;n=Math.max(i,n),this.$element.style.marginLeft=`${n}px`,this.$left.style.display="block",n===i&&(this.$right.style.display="none")}getElement(){return this.$wrapper}destroy(){super.destroy(),this.bus.off("resizeplayer",this._onResize),this.bus.off("nexttrack",this._gotoNextTrack),this.bus.off("prevtrack",this._gotoPrevTrack),this.bus.off("fullscreenchanged",this._onFullScreenChanged),this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element),this.$items.length=0,this._playlist.length=0,this._current=null}}function Qs(t,e){var n;document.createEvent?(n=document.createEvent("HTMLEvents")).initEvent(e,!0,!0):(n=document.createEventObject()).eventType=e,n.eventName=e,t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n)}class Ys{constructor(){var t,e;e={},(t="_events")in this?Object.defineProperty(this,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):this[t]=e}on(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)}off(t,e){this._events=this._events||{},t in this._events!=0&&H(this._events[t],e)}once(t,e){const n=(...i)=>{this._call(e,i),this.off(t,n)};this.on(t,n)}emit(t,...e){if("*"!==t&&this.emit.apply(this,["*",t].concat(e)),this._events=this._events||{},t in this._events!=0)for(var n=this._events[t].length-1;n>=0;n--)this._call(this._events[t][n],e)}destroy(){this._events={}}_call(t,e){if(t._safe_inner)t.apply(this,e);else try{t.apply(this,e)}catch(t){console.error(t)}}}const Zs=window.navigator,Ks={plugins:[],hasPluginVersion:(t,e)=>{const n=Ks.plugins[t];return e[1]=e[1]||0,e[2]=e[2]||0,n[0]>e[0]||n[0]===e[0]&&n[1]>e[1]||n[0]===e[0]&&n[1]===e[1]&&n[2]>=e[2]},addPlugin:(t,e,n,i,s)=>{Ks.plugins[t]=Ks.detectPlugin(e,n,i,s)},detectPlugin:(t,e,n,i)=>{let s,o,r=[0,0,0];if(null!==Zs.plugins&&void 0!==Zs.plugins&&"object"==typeof Zs.plugins[t]){if(s=Zs.plugins[t].description,s&&(void 0===Zs.mimeTypes||!Zs.mimeTypes[e]||Zs.mimeTypes[e].enabledPlugin)){r=s.replace(t,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(let t=0,e=r.length;t<e;t++)r[t]=parseInt(r[t].match(/\d+/),10)}}else if(void 0!==window.ActiveXObject)try{o=new ActiveXObject(n),o&&(r=i(o))}catch(t){console.log(t)}return r}};Ks.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",(t=>{let e=[],n=t.GetVariable("$version");return n&&(n=n.split(" ")[1].split(","),e=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),e}));const Xs=Ks.hasPluginVersion("flash",[10,0,0]);function Js(t){return window.console?function(...e){t in console&&o(console[t])&&(e.unshift((new Date).toString()),console[t].apply(console,e))}:u}function to(t=2){let e=1;const n={};return n.debug=++e>t?Js("debug"):u,n.log=++e>t?Js("log"):u,n.warn=++e>t?Js("warn"):u,n.error=++e>t?Js("error"):u,n}function eo(){const t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")&&parseInt(t.split("msie")[1],10)}function no(){return 8===eo()}const io={annotations:null,chapters:null,cc:null,preview:null,poster:null,title:"",nextTrackTitle:"",nextTrackThumbnails:"",clip:null,isAudio:!1},so=["audio/mp3","audio/mpeg","audio/mp4"];function oo(t,e){const n={showAnnotations:!b((e=D({},io,t,e)).showAnnotations)||e.showAnnotations,showQuality:!b(e.showQuality)||e.showQuality,showPlaceholder:!b(e.showPlaceholder)||e.showPlaceholder};var i;return n.showPoster=e.showPoster&&b(e.poster),e.showHelp&&(n.showHelp=function(){const t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))}()),i=e.type,(a(so,i)||e.isAudio)&&(n.showFullScreen=!1,n.showClosedCaptions=!1,n.showTOC=!1,n.showAnnotations=!1,n.showQuality=!1,n.isAudio=!0),Mt()&&(n.showVolume=!1,n.showQuality=!1,n.showHelp=!1,n.preview=null,n.showTitle=!1,n.showCCLayout=!1,n.isMobile=!0,n.extensionsVisibilityTimeout=4e3),Lt()&&(n.showPlaybackRate=!1),no()&&(n.showCCLayout=!1,n.useMux=!1),!e.startTime&&Z()&&(n.startTime=.5),x(e.annotations)&&(n.showAnnotations=!1),e.startTime&&!n.isAudio&&(n.showPoster=!1),"Flash"===yt(e)&&(n.showPlaybackRate=!1),e.showAnnotations&&(n.showAnnotations=b(e.annotations)&&f(e.annotations)),!1===n.showAnnotations&&!1===n.showPlaybackRate&&!1===n.showQuality&&(n.showSettings=!1,e.showSettings=!1),n.showDownloadCC=e.showDownloadCC&&b(e.cc)&&f(e.cc),e.showDownloadVideo&&(n.showDownloadVideo=!!navigator.userAgent.match(/(Windows NT 10)/i)&&b(e.downloadURL)&&f(e.downloadURL)),n.showDownload=e.showDownload&&(n.showDownloadVideo||n.showDownloadCC||!!e.downloadVideoURL),n.showCaptionSearch=e.showCaptionSearch&&b(e.cc)&&f(e.cc),e.showExtensions||(n.showPlay=!1,n.showProgress=!1,n.showVolume=!1,n.showFullScreen=!1,n.showClosedCaptions=!1,n.showTOC=!1,n.showAnnotations=!1,n.showQuality=!1,n.showPoster=!1,n.showPlaceholder=!1,n.showPlaybackRate=!1,n.showForward=!1,n.showBackward=!1,n.showSettings=!1,n.showDownload=!1,n.showHelp=!1,n.showTitle=!1,n.showNext=!1),D(e,n)}const ro="bottom",ao="right",lo="auto",ho=[lo,ro,ao],co={loggerLevel:2,timecode:0,frameRate:23.976,autoStart:!1,startTime:null,endTime:null,useNativeControls:!1,useOriginTimeForPreview:!0,playlistmode:lo,plalistAutoGoNext:!0,playlistitle:"",playlistforcepoint:0,showExtensions:!0,alwaysShowExtensions:!1,extensionsVisibilityTimeout:2e3,showPlay:!0,showProgress:!0,showVolume:!0,showFullScreen:!0,showClosedCaptions:!0,showTOC:!0,showAnnotations:!0,showQuality:!0,showAudioTracks:!1,showPoster:!0,showError:!1,showPlaceholder:!0,showPlaybackRate:!0,showForward:!0,showBackward:!0,showSettings:!0,showDownload:!0,showDownloadVideo:!0,showDownloadCC:!1,showBottomNext:!1,showBottomPrev:!1,showCaptionSearch:!1,showCrawl:!1,crawl:{},downloadVideoURL:null,showHelp:!0,showTitle:!0,showNext:!1,showNextFrame:!1,showPrevFrame:!1,showCCLayout:!0,showTheaterMode:!1,useMux:!1,showSubtitles:!1,skipDelta:10,keyboardListeners:{},globalKeyboardListeners:!1,isHandlingKeyboardEvents:!0,bufferingTimeout:200,hls:{maxFragLookUpTolerance:.001,maxMaxBufferLength:60},shaka:{},mux:{env_key:"",page_type:"watchpage",viewer_user_id:"",experiment_name:"",sub_property_id:"",player_name:"RavnurPlayer",player_version:"3.3.3",player_init_time:"",video_id:"",video_title:"",video_series:"",video_producer:"",video_content_type:"",video_language_code:"",video_variant_name:"",video_variant_id:"",video_duration:"",video_stream_type:"on-demand",video_encoding_variant:"",video_cdn:""},i18n:null,hlsjsURL:"https://cdn.jsdelivr.net/npm/hls.js@1.5.17/dist/hls.min.js",shakaURL:"https://cdn.jsdelivr.net/npm/shaka-player@4.16.0/dist/shaka-player.compiled.min.js",flashPath:"/",muxURL:"https://src.litix.io/core/4/mux.js",disableAutoUrlRewrite:!1,useHTMLPlayer:!1,useHLSJSPlayer:!1},po={accentColor:"#81d4fa",mainColor:"#fff",submenuBgColor:"#eee",submenuColor:"#333",chaptersBubbleColor:"#1565C0",pltHeight:"135px",rplaylistHeight:"30%"};function uo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const go="rplayer--fullscreen",mo="rplayer__inner",bo=`${mo}--playing`,yo=`${mo}--active`,xo=`${mo}--hovering`,_o=`${mo}--light`,fo=`${mo}--cc-below`,$o=`${mo}--accessibility`,vo="rmp-extensions--hidden",wo="last-play-time";let Co,ko=!1,To=!1,Eo=0;const So={[ro]:"rplayer--bottom-playlist",[ao]:"rplayer--right-playlist"};class Lo extends W{constructor(t,e={},n=to()){super(new Ys,n),uo(this,"controller",null),uo(this,"extensions",[]),uo(this,"state",void 0),uo(this,"_playlist",[]),uo(this,"originOptions",null),uo(this,"options",null),uo(this,"activeSourceId",void 0),uo(this,"$el",void 0),uo(this,"$inner",void 0),uo(this,"$extensionsWrapper",null),uo(this,"playlistController",null),uo(this,"_timerId",null),uo(this,"_isOpenPopup",!1),uo(this,"_clipStopInterval",null),uo(this,"_isPlaylist",!1),ko||(Is(e=D({},po,e),no()?t.getBoundingClientRect():null),ko=!0);const i=t;this.$el=C("div",{class:"rplayer"},i),M(this.$el,"rplayer--iphone",Z()),M(this.$el,"rplayer--mobile",Mt()),this.$inner=C("div",{class:mo},this.$el),nn(this,["onStateChanged","onFullScreenChanged","disappearExtensions","appearExtensions","_renderPlayer","onPlay","onPause","onMouseMove","onClick","_disappearExtensionsDelayed","_appearExtensionsImmediately","onOpenPopup","onClosePopup","onPlayClicked","onChangePlaylistMode","onMouseEnter","onMouseLeave","onKeydown","onMobileTouch","_heartbeatExtension","_handleQualityChange","onTimeUpdate","_handleLastPlayTime"]),this.bus.on("statechanged",this.onStateChanged),this.bus.on("pause",this.onPause),this.bus.on("timeupdate",this.onTimeUpdate),this.bus.on("ended",this.onPause),this.bus.on("play",this.onPlay),this.bus.on("changesource",this._renderPlayer),this.bus.on("showpopup",this.onOpenPopup),this.bus.on("hidepopup",this.onClosePopup),this.bus.on("handle-play-clicked",this.onPlayClicked),this.bus.on("changeplaylistmode",this.onChangePlaylistMode),this.bus.on("heartbeatextensions",this._heartbeatExtension),this.bus.on("manualquality",this._handleQualityChange),this.state=new It(this.bus,n),Mt()?this.bus.on("mobiletouch",this.onMobileTouch):(this.addEvent(this.$el,"mouseleave",this.onMouseLeave),this.addEvent(this.$el,"mouseenter",this.onMouseEnter),this.addEvent(this.$el,"mousemove",this.onMouseMove),this.addEvent(this.$el,"keydown",this.onKeydown),this.addEvent(this.$el,"click",this.onClick)),ft.enabled&&(this.$el.addEventListener("webkitfullscreenchange",this.onFullScreenChanged),this.$el.addEventListener("fullscreenchange",this.onFullScreenChanged),document.addEventListener("mozfullscreenchange",this.onFullScreenChanged),document.addEventListener("MSFullscreenChange",this.onFullScreenChanged))}onMouseLeave(){L(this.$inner,xo),this.disappearExtensions()}onMouseEnter(){S(this.$inner,xo),this.appearExtensions()}onKeydown(t){To&&(clearInterval(Co),Eo=0,9===t.keyCode&&this.appearExtensions(),Co=setInterval((()=>{Eo++,Eo>5&&(Eo=0,this.disappearExtensions(),clearInterval(Co))}),1e3))}onPlay(){S(this.$inner,bo),this.onMouseMove()}onPause(){this.options.playLoop||(L(this.$inner,bo),this.appearExtensions())}onPlayClicked(){L(this.$inner,_o)}onTimeUpdate(){const{activeSourceId:t,controller:e}=this,{savePlayTime:n}=this.originOptions,i=e.getDuration()<=15;let s=e.getCurrentTime();if(s<5||i)return;if(!n||!t)return;let o=wt(wo)||"{}";if(o=JSON.parse(o),!o.expires){let t=new Date;o.expires=(new Date).setMonth(t.getMonth()+1)}(new Date).getTime()>o.expires&&(o={},o.expires=(new Date).setMonth((new Date).getMonth()+1));const r=e.getDuration()-10;s=s<=r?s:r,o[t]=s,vt(wo,JSON.stringify(o))}isShownExtensions(){const{$extensionsWrapper:t}=this;if(!t)return!1;let e=!E(this.$inner,vo);return e=e||E(this.$inner,_o),e}onMobileTouch(){const{controller:t}=this;t&&this.isShownExtensions()&&(t.isPaused()?t.play():t.pause()),this._heartbeatExtension()}onMouseMove(){this._heartbeatExtension()}onClick(){this._heartbeatExtension()}_heartbeatExtension(){this._appearExtensionsImmediately(),this._isOpenPopup||this._disappearExtensionsDelayed()}onOpenPopup(){this._isOpenPopup=!0,S(this.$inner,yo),this._appearExtensionsImmediately()}onClosePopup(){this._isOpenPopup=!1,L(this.$inner,yo),this._disappearExtensionsDelayed()}_appearExtensionsImmediately(){this.appearExtensions(),this._timerId&&clearTimeout(this._timerId)}_disappearExtensionsDelayed(){const{originOptions:t}=this;t&&!t.alwaysShowExtensions&&(this._timerId=setTimeout(this.disappearExtensions,t.extensionsVisibilityTimeout))}_getParentElementForController(){const{controller:t}=this;if(!t)return null;const e=t.getElement();if(!e)return null;const n=e.parentNode;return n&&n instanceof HTMLElement?n:null}changeFullScreenMode(){if(!this._getParentElementForController()&&!Z())return;const t=this.state.isFullScreen();if(this.$inner.style.width="",this.$inner.style.height="",ft.enabled)t?ft.request(this.$el):ft.exit();else if(Z()&&this.controller)this.controller.getElement().webkitEnterFullscreen(),this.bus.emit("fullscreenchanging",!1);else{const n=this.$el.parentNode;if(!(n&&n instanceof HTMLElement))return;t?(S(n,go),function(t){const e=function(){const t=document.documentElement;return t?t.clientWidth:null}(),n=function(){const t=document.documentElement;return t?t.clientHeight:null}();"number"==typeof e&&"number"==typeof n&&function(t,e,n){t.style.width=`${e}px`,t.style.height=`${n}px`}(t,e,n)}(n)):(L(n,go),(e=n).style.width="",e.style.height=""),this.bus.emit("fullscreenchanged",t)}var e}onStateChanged(t,e){if(t.isFullScreen!==e.isFullScreen&&this.changeFullScreenMode(),t.cc.fontSize!==e.cc.fontSize||t.cc.location!==e.cc.location||t.cc.lang!==e.cc.lang){const e=t.cc.lang;e&&this.changeLayout(e,t.cc.fontSize,t.cc.location)}}onFullScreenChanged(){const t=ft.isFullscreen;this.bus.emit("fullscreenchanging",t);const e=this.$el.parentNode;e&&e instanceof HTMLElement&&M(e,go,ft.isFullscreen)}changeLayout(t,e,n){const i=t&&"below"===n;M(this.$inner,fo,i),M(this.$el,"rplayer--cc-75-below",i&&"75%"===e),M(this.$el,"rplayer--cc-100-below",i&&"100%"===e),M(this.$el,"rplayer--cc-125-below",i&&"125%"===e),M(this.$el,"rplayer--cc-150-below",i&&"150%"===e),M(this.$el,"rplayer--cc-200-below",i&&"200%"===e)}_detectPlaylistMode(){const{originOptions:t}=this;if(!t)return"auto";let e=t.playlistmode;return e=a(ho,e)?e:z(ho),e===lo&&(e=Mt()?ro:ao),e}setup(t,e={}){const n=b(e.loggerLevel)?e.loggerLevel:co.loggerLevel,s=e.logger||to(n),o=D({bus:this.bus,logger:e.logger||s},co,e);if(To=e.accessibility,To&&S(this.$inner,$o),this.originOptions=o,this._isPlaylist=i(t),this._playlist=[].concat(t),!this._playlist.length)return void setTimeout((()=>{const t=this.$el.parentNode;t&&t instanceof HTMLElement&&(t.style.position="relative",t.style.border="1px solid grey"),this.destroy(),C("i",{class:"rmp-no-video"},t).textContent=Qt(o.i18n,"no-video")}),5);if(this._isPlaylist){const t=this._detectPlaylistMode();this.onChangePlaylistMode(t);const e=Qt(o.i18n,"playlist-count-of"),n=o.playlistitle,i=o.playlistforcepoint,r=o.playLoop,a={mode:t,bus:this.bus,title:n,label:e,forcePoint:i,logger:s,loop:r};this.playlistController=new Gs(this._playlist,a),o.hideplaylist||w(this.$el,this.playlistController.getElement()),o.plalistAutoGoNext&&this.bus.on("ended",(()=>{this.bus.emit("nexttrack"),this._playOnLoad()}))}this._isPlaylist&&!this.originOptions.hideplaylist||this.bus.emit("changesource",z(this._playlist)),this.bus.on("*",(t=>o.logger.debug(t)));const r=this.state,a=r.getCCLang()&&r.getCCLocation()||"over";this._afterSetup(),setTimeout((()=>{this.bus.emit("cclayoutchange",{mode:a,fontSize:r.getCCFontSize()})}))}onChangePlaylistMode(t){this.originOptions.hideplaylist||c(So,((e,n)=>M(this.$el,e,n===t)))}_runOnce(t){this.bus.once("canplaythrough",(()=>setTimeout(t))),this.bus.once("loadedmetadata",(()=>setTimeout(t)))}_playOnLoad(){this._runOnce((()=>{const{controller:t}=this;t&&t.play()}))}_afterSetup(){const{controller:t,originOptions:e}=this;if(!t||!e)return;const{autoStart:n,startTime:i,endTime:s}=e;n&&this._playOnLoad(),(i||s)&&this.playPart(i,s,!0)}_handleLastPlayTime(){const{savePlayTime:t,startTime:e}=this.originOptions,{activeSourceId:n}=this;if(e||!t||!n)return;let i=wt(wo);if(!i)return;i=JSON.parse(i);const s=i[n];s&&this.playPart(s,void 0,!0)}playPart(t,e,n=!1){const{controller:i}=this;if(i){if("number"==typeof t)if(n){const e=t;this._runOnce((()=>i.setCurrentTime(e)))}else i.setCurrentTime(t);if("number"==typeof e){const t=()=>{const n=i.getCurrentTime();"number"==typeof n&&"number"==typeof e&&n>e&&(i.pause(),this.bus.off("timeupdate",t))};this.bus.on("timeupdate",t)}n||i.play()}}_renderPlayer(t){if(!t.src)throw new Error("Incorrent load's options.");this.activeSourceId=t.id;const e=this.state.getCCLang();e&&this.changeLayout(e,this.state.getCCFontSize(),this.state.getCCLocation());let n={};if(this._isPlaylist&&!this.originOptions.hideplaylist){const e=O(this._playlist,t),i=this._playlist[e+1]||null,s=this._playlist[e-1]||null;n={showNext:b(i),nextTrackThumbnails:I(i,"poster",""),nextTrackTitle:I(i,"title",""),showPrev:b(s),prevTrackThumbnails:I(s,"poster",""),prevTrackTitle:I(s,"title","")}}const i=oo(this.originOptions||{},D({},t,n));if(this.options=i,this.controller&&this.controller.destroy(),this.destroyExtensions(),s=i.type,a(mt,s)&&!Lo.canPlayHLS){const t=this.$el.parentNode;t&&t instanceof HTMLElement&&(t.style.position="relative",t.style.border="1px solid grey"),this.destroy();const e=C("i",{class:"rmp-no-video"},t);return void(this.originOptions&&(e.textContent=Qt(this.originOptions.i18n||{},"no-flash")))}var s;this._beforeRender(i);const o=function(t,e){const n=yt(t);return new(0,bt[n])(t,e)}(i,this.state);if(this.controller=o,w(this.$inner,o.$el),o.load(i),this._handleLastPlayTime(),i.useNativeControls)return;L(this.$inner,bo),S(this.$inner,_o),i.showCrawl&&S(this.$inner,"rmp-ext-crawl--exist");const r=C("div",{class:"rmp-extensions"},this.$inner);this.$extensionsWrapper=r,c(function(t,e,n){const i=[];return c(Ds,(([s,o])=>{(!0===s||"string"==typeof s&&!0===n[s])&&i.push(new o(t,e,n))})),i}(o,this.state,i),(t=>{try{const e=t.getElement();e&&(w(r,e),t.addEvent(e,"dblclick",Mo));const n=t.getOuter();n&&w(this.$inner,n,r),this.extensions.push(t)}catch(t){i.logger.error(t)}}))}_beforeRender({clip:t,timecode:e}){if(this._clipStopInterval&&clearInterval(this._clipStopInterval),t){const[n,i]=t;n&&this._runOnce((()=>{this.controller&&this.controller.setCurrentTime(n)})),i&&(this._clipStopInterval=setInterval((()=>{const t=this.controller;t&&!t.isPaused()&&t.getCurrentTime()>i+e&&(t.pause(),setTimeout((()=>this.bus.emit("ended"))))}),26))}}_handleQualityChange(t){this.originOptions&&(this.originOptions.qualityLevel=t)}refreshCrawlExtension(t,e=!0){if(this.originOptions.logger.debug("crawl:extensions:refreshing"),!t)throw new Error("Crawl options not found");const n=this.extensions.find((t=>"$crawl"in t));if(!n){this.originOptions.logger.debug("crawl:extensions:creating");const e=D({},this.originOptions,{crawl:t}),n=new Fs(this.controller,this.state,e),i=n.getOuter();return i&&w(this.$inner,i,this.$extensionsWrapper),void this.extensions.push(n)}this.logger.debug("crawl:extensions:refreshing"),n.refresh(t,e)}destroyExtensions(){c(this.extensions,(t=>t.destroy())),this.extensions.length=0;const{$extensionsWrapper:t}=this;if(t&&n(t)){const e=t.parentNode;e&&e.removeChild(t)}}disappearExtensions(){const{originOptions:t,$inner:e}=this;if(!t||!e)return;const n=t.alwaysShowExtensions;this.controller&&(n||this._isOpenPopup||this.controller.isPaused())||S(e,vo)}appearExtensions(){L(this.$inner,vo)}on(t,e){this.bus.on(t,e)}off(t,e){this.bus.off(t,e)}destroy(){super.destroy(),this.bus.destroy(),this._clipStopInterval&&clearInterval(this._clipStopInterval),this.destroyExtensions();const{controller:t}=this;t&&(t.pause(),t.destroy()),this.controller=null,ft.enabled&&(this.$el.removeEventListener("webkitfullscreenchange",this.onFullScreenChanged),this.$el.removeEventListener("fullscreenchange",this.onFullScreenChanged),document.removeEventListener("mozfullscreenchange",this.onFullScreenChanged),document.removeEventListener("MSFullscreenChange",this.onFullScreenChanged)),this.playlistController&&this.playlistController.destroy();const e=this.$el.parentNode;this.$el.removeChild(this.$inner),e&&e.removeChild(this.$el)}static addStyles(t){Is(D({},po,t))}}function Mo(t){t.stopPropagation()}uo(Lo,"canPlayHLS",!(eo()||window.MSInputMethodContext&&document.documentMode)||Xs),exports.RavnurMediaPlayer=e.default})();