/*! JW Player version 8.21.0 Copyright (c) 2021, JW Player, All Rights Reserved This source code and its use and distribution is subject to the terms and conditions of the applicable license agreement. https://www.jwplayer.com/tos/ This product includes portions of other software. For the full text of licenses, see https://ssl.p.jwpcdn.com/player/v/8.21.0/notice.txt */ (window.webpackJsonpjwplayer=window.webpackJsonpjwplayer||[]).push([[16,18],{124:function(e,t,n){"use strict";var i=n(85),r=n(84),a={TIT2:"title",TT2:"title",WXXX:"url",TPE1:"artist",TP1:"artist",TALB:"album",TAL:"album"};function o(e,t){for(var n,i,r,a=e.length,o="",s=t||0;s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(n);break;case 12:case 13:i=e[s++],o+=String.fromCharCode((31&n)<<6|63&i);break;case 14:i=e[s++],r=e[s++],o+=String.fromCharCode((15&n)<<12|(63&i)<<6|(63&r)<<0)}return o}function s(e){var t=function(e){for(var t="0x",n=0;n>1|(8323072&t)>>2|(2130706432&t)>>3}function u(e){return void 0===e&&(e=[]),e.reduce((function(e,t){if(!("value"in t)&&"data"in t&&t.data instanceof ArrayBuffer){var n=new Uint8Array(t.data),i=n.length;t={value:{key:"",data:""}};for(var r=10;r<14&&r0){var f=o(n.subarray(u,u+=c),0);if("PRIV"===t.value.key){if("com.apple.streaming.transportStreamTimestamp"===f){var h=1&s(n.subarray(u,u+=4)),p=s(n.subarray(u,u+=4))+(h?4294967296:0);t.value.data=p}else t.value.data=o(n,u+1);t.value.info=f}else t.value.info=f,t.value.data=o(n,u+1)}else{var g=n[u];t.value.data=1===g||2===g?function(e,t){for(var n=e.length-1,i="",r=t||0;r0)for(var f=0;ft.length)return!0;for(var i=0;i=0&&r[a].startTime>t.startTime;a--)n.unshift(r[a]),e.removeCue(r[a]);try{e.addCue(t),n.forEach((function(t){return e.addCue(t)}))}catch(e){console.error(e)}e.mode=i}(t,i)}else try{t.addCue(n)}catch(e){console.error(e)}}function y(e,t,n){t&&t.length&&Object(d.i)(t,(function(t){var i=t._id||"";if(n&&(t._id=void 0),!l.Browser.ie&&!l.Browser.safari||!e||!/^(native|subtitle|cc)/.test(i)){if(l.Browser.ie&&"disabled"===t.mode||(t.mode="disabled",t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);t.embedded||(t.mode="disabled"),t.inuse=!1}}))}function b(e){return"captions"===e||"subtitles"===e}function T(e){return/^native(?:captions|subtitles)/.test(e)}function w(e){var t=u(e);return{metadataType:"id3",metadataTime:e[0].startTime,metadata:t}}function x(e,t){return e.startTime===t.startTime&&e.endTime===t.endTime&&e.text===t.text&&e.data===t.data&&JSON.stringify(e.value)===JSON.stringify(t.value)}t.a=f},144:function(e,t,n){"use strict";function i(e){return{bitrate:e.bitrate,label:e.label,width:e.width,height:e.height}}n.d(t,"a",(function(){return i}))},145:function(e,t,n){"use strict";var i=n(3),r=n(52),a={canplay:function(){this.renderNatively&&this.setTextTracks(this.video.textTracks),this.trigger(i.E)},play:function(){this.stallTime=-1,this.video.paused||this.state===i.pb||this.setState(i.nb)},loadedmetadata:function(){var e={metadataType:"media",duration:this.getDuration(),height:this.video.videoHeight,width:this.video.videoWidth,seekRange:this.getSeekRange()},t=this.drmUsed;t&&(e.drm=t),this.trigger(i.K,e)},timeupdate:function(){var e=this.video.currentTime,t=this.getCurrentTime(),n=this.getDuration();if(!isNaN(n)){this.seeking||this.video.paused||this.state!==i.qb&&this.state!==i.nb||this.stallTime===e||(this.stallTime=-1,this.setState(i.pb),this.trigger(i.fb));var r={position:t,duration:n,currentTime:e,seekRange:this.getSeekRange(),metadata:{currentTime:e}},a=this.getLiveLatency();if(null!==a&&(r.latency=a,this.getTargetLatency)){var o=this.getTargetLatency();null!==o&&(r.targetLatency=o)}(this.state===i.pb||this.seeking&&this.state!==i.mb)&&this.trigger(i.S,r)}},click:function(e){this.trigger(i.o,e)},volumechange:function(){var e=this.video;this.trigger(i.V,{volume:Math.round(100*e.volume)}),this.trigger(i.M,{mute:e.muted})},seeking:function(){if(this.state===i.nb){var e=this.video.buffered.length?this.video.buffered.start(0):-1;if(this.video.currentTime===e)return}else if(this.state===i.mb)return;this.seeking=!0},seeked:function(){this.seeking&&(this.seeking=!1,this.trigger(i.R))},playing:function(){-1===this.stallTime&&this.setState(i.pb),this.trigger(i.fb)},pause:function(){this.state!==i.kb&&(this.video.ended||this.video.error||this.video.currentTime!==this.video.duration&&this.setState(i.ob))},progress:function(){var e=this.getDuration();if(!(e<=0||e===1/0)){var t=this.video.buffered;if(t&&0!==t.length){var n=Object(r.a)(t.end(t.length-1)/e,0,1);this.trigger(i.D,{bufferPercent:100*n,position:this.getCurrentTime(),duration:e,currentTime:this.video.currentTime,seekRange:this.getSeekRange()})}}},ratechange:function(){this.trigger(i.P,{playbackRate:this.video.playbackRate})},ended:function(){this.state!==i.mb&&this.state!==i.kb&&this.trigger(i.F)}};t.a=a},146:function(e,t,n){"use strict";var i=n(5),r=n(11),a=n(97),o={container:null,volume:function(e){this.video.volume=Math.min(Math.max(0,e/100),1)},mute:function(e){this.video.muted=!!e,this.video.muted||this.video.removeAttribute("muted")},resize:function(e,t,n){var a=this.video,o=a.videoWidth,s=a.videoHeight;if(e&&t&&o&&s){var u={objectFit:"",width:"",height:""},l=e/t,c=o/s;if("uniform"===n)(l>c?e-e/(l/c):t-t/(c/l))<6&&(u.objectFit="fill",n="exactfit");if(i.Browser.ie||i.OS.iOS&&(i.OS.version.major||0)<9||i.Browser.androidNative)if("uniform"!==n){u.objectFit="contain";var d=1,f=1;"none"===n?d=f=l>c?Math.ceil(100*s/t)/100:Math.ceil(100*o/e)/100:"fill"===n?d=f=l>c?l/c:c/l:"exactfit"===n&&(l>c?(d=l/c,f=1):(d=1,f=c/l)),Object(r.e)(a,"matrix("+d.toFixed(2)+", 0, 0, "+f.toFixed(2)+", 0, 0)")}else u.top=u.left=u.margin="",Object(r.e)(a,"");Object(r.d)(a,u)}},getContainer:function(){return this.container},setContainer:function(e){this.container=e,this.video.parentNode!==e&&e.appendChild(this.video)},removeFromContainer:function(){var e=this.container,t=this.video;this.container=null,e&&e===t.parentNode&&e.removeChild(t)},remove:function(){this.stop(),this.destroy(),this.removeFromContainer()},atEdgeOfLiveStream:function(){if(!this.isLive())return!1;return Object(a.a)(this.video.buffered)-this.video.currentTime<=2}};t.a=o},147:function(e,t,n){"use strict";t.a={eventsOn_:function(){},eventsOff_:function(){},attachMedia:function(){this.eventsOn_()},detachMedia:function(){return this.eventsOff_()}}},148:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var i=n(1);function r(e,t,n){var r=e+1e3,o=i.m;return t>0?(403===t&&(o=i.o),r+=a(t)):"http:"===(""+n).substring(0,5)&&"https:"===document.location.protocol?r+=12:0===t&&(r+=11),{code:r,key:o}}var a=function(e){return e>=400&&e<600?e:6}},159:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a}));var i=1,r=i+1,a=25},160:function(e,t,n){"use strict";function i(e,t,n){if(!e)return"";var i=e.bitrate||e.bandwidth;return function(e,t){var n=null;if(t&&e){var i=Object.keys(e);if(i.length){var a=function(e,t){var n,i=null,r=1/0;return e.forEach((function(e){(n=Math.abs(parseFloat(e)-t))>>0)+"_",i=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;nr&&(r=Math.max(r+i,0));r=r}})),s("Array.prototype.keys",(function(e){return e||function(){return O(this,(function(e){return e}))}}));var U="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;ne||1342177279>>=1)&&(t+=t);return n}})),s("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)P(e,t)&&n.push(e[t]);return n}})),s("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),s("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)P(e,t)&&n.push([t,e[t]]);return n}}));var B=this||self;function F(e,t){var n,i=e.split("."),r=B;i[0]in r||void 0===r.execScript||r.execScript("var "+i[0]);for(;i.length&&(n=i.shift());)i.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t} /* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ function V(e){this.i=Math.exp(Math.log(.5)/e),this.h=this.g=0}function H(e,t,n){var i=Math.pow(e.i,t);n=n*(1-i)+i*e.g,isNaN(n)||(e.g=n,e.h+=t)}function K(e){return e.g/(1-Math.pow(e.i,e.h))}function G(){this.h=new V(2),this.i=new V(5),this.g=0}function q(){}function z(){}function X(){}function W(e,t){for(var n=[],i=1;ithis.g?e:Math.min(K(this.h),K(this.i))};var $=new Set;if(e.console&&e.console.log.bind){var J={},Q=(J[1]=console.error.bind(console),J[2]=console.warn.bind(console),J[3]=console.info.bind(console),J[4]=console.log.bind(console),J[5]=console.debug.bind(console),J[6]=console.debug.bind(console),J);X=Q[2],z=Q[1]}function Z(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next())n.push(t(r.value));return n}var ee=function e(t){var n;return N(e,(function(e){return 1==e.g&&(n=0),3!=e.g?n=n[e]}if(!e)return"";var n=oe(e);if(239==n[0]&&187==n[1]&&191==n[2])return fe(n);if(254==n[0]&&255==n[1])return he(n.subarray(2),!1);if(255==n[0]&&254==n[1])return he(n.subarray(2),!0);if(0==n[0]&&0==n[2])return he(e,!1);if(0==n[1]&&0==n[3])return he(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return fe(e);throw new le(2,2,2003)}function ge(e){return ae((new TextEncoder).encode(e))}function me(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=l(te(e)),a=r.next();!a.done;a=r.next())a=a.value,i.setUint16(2*a.ha,a.item.charCodeAt(0),t);return n}F("shaka.util.BufferUtils",ne),ne.toDataView=se,ne.toUint8=oe,ne.toArrayBuffer=ae,ne.equal=ie,le.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},F("shaka.util.Error",le),le.Severity={RECOVERABLE:1,CRITICAL:2},le.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},le.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004},ce.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},F("shaka.util.StringUtils",de),de.resetFromCharCode=function(){ve.g=void 0},de.toUTF16=me,de.toUTF8=ge,de.fromBytesAutoDetect=pe,de.fromUTF16=he,de.fromUTF8=fe;var ve=new ce((function(){function e(e){try{var t=new Uint8Array(e);return 0this.R.byteLength)throw be();var t=oe(this.R,this.g,e);return this.g+=e,t},i.skip=function(e){if(this.g+e>this.R.byteLength)throw be();this.g+=e},i.je=function(e){if(this.ge||e>this.R.byteLength)throw be();this.g=e},i.Yb=function(){for(var e=this.g;this.na()&&0!=this.R.getUint8(this.g);)this.g+=1;return e=oe(this.R,e,this.g-e),this.g+=1,fe(e)},F("shaka.util.DataViewReader",ye),ye.prototype.readTerminatedString=ye.prototype.Yb,ye.prototype.seek=ye.prototype.seek,ye.prototype.rewind=ye.prototype.je,ye.prototype.skip=ye.prototype.skip,ye.prototype.readBytes=ye.prototype.Za,ye.prototype.readUint64=ye.prototype.kb,ye.prototype.readInt32=ye.prototype.he,ye.prototype.readUint32=ye.prototype.M,ye.prototype.readUint16=ye.prototype.Fb,ye.prototype.readUint8=ye.prototype.$,ye.prototype.getLength=ye.prototype.Pe,ye.prototype.getPosition=ye.prototype.Z,ye.prototype.hasMoreData=ye.prototype.na;var Te=1;function we(e,t){this.g=e,this.h=t}function xe(e,t){var n=new we(4,0),i=Ee,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function ke(e,t,n,i){X([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Se(e,t,n,i){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(""))}ye.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Te},we.prototype.toString=function(){return"v"+this.g+"."+this.h};var Ee=null;function Ae(e,t){return e.concat(t)}function Ie(){}function Ce(e){return null!=e}function Me(e){var t=Object.create(e.prototype||Object.prototype);try{var n=e.call(t);n||(xe("Factories requiring new","Factories should be plain functions"),n=t)}catch(t){xe("Factories requiring new","Factories should be plain functions"),n=new e}return n}function Re(){this.i=[],this.h=[],this.g=!1}function De(e){for(var t=je(e);e.reader.na()&&!e.parser.g;)e.parser.Fc(e.start+t,e.reader,e.partialOkay)}function Ne(e){for(var t=je(e),n=e.reader.M(),i=(n=l(ee(n))).next();!i.done&&(e.parser.Fc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i=n.next());}function _e(e){return function(t){e(t.reader.Za(t.reader.R.byteLength-t.reader.Z()))}}function Pe(e){for(var t=0,n=(e=l(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Le(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function je(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}(i=Re.prototype).box=function(e,t){var n=Pe(e);return this.i[n]=Oe,this.h[n]=t,this},i.U=function(e,t){var n=Pe(e);return this.i[n]=Ue,this.h[n]=t,this},i.stop=function(){this.g=!0},i.parse=function(e,t,n){for(e=new ye(e,0),this.g=!1;e.na()&&!this.g;)this.Fc(0,e,t,n)},i.Fc=function(e,t,n,i){var r=t.Z();if(i&&r+8>t.R.byteLength)this.g=!0;else{var a=t.M(),o=t.M(),s=!1;switch(a){case 0:a=t.R.byteLength-r;break;case 1:if(i&&t.Z()+8>t.R.byteLength)return void(this.g=!0);a=t.kb(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==Ue){if(i&&t.Z()+4>t.R.byteLength)return void(this.g=!0);l=(c=t.M())>>>24,c&=16777215}o=r+a,n&&o>t.R.byteLength&&(o=t.R.byteLength),i&&o>t.R.byteLength?this.g=!0:(i=o-t.Z(),u({parser:this,partialOkay:n||!1,version:l,flags:c,reader:t=new ye(t=0>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}F("shaka.util.Uint8ArrayUtils",Qe),Qe.concat=rt,Qe.toHex=it,Qe.fromHex=nt,Qe.fromBase64=tt,Qe.toBase64=et,Qe.toStandardBase64=Ze,Qe.equal=function(e,t){return xe("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead."),ie(e,t)};var st=new ce((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function ut(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function lt(e,t){var n=e.indexOf(t);-1=r)return null;for(var a=-1,o=-1,s=0;st;t++)e.i.push(Ut())}function Ut(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Bt(e,t){Ft(e)&&(e.i[e.h][e.g]=new Lt(t,e.D,e.s,e.m,e.u),e.g++)}function Ft(e){var t=e.g=n)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=Wt(t).value,t=null;for(var r=(n=l(Jt(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Vt(r,i,e.i)),Ot(r);return t}if(137===n)for(t=Wt(t).value,n=(t=l(Jt(e,t))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.l=!0;else{if(138===n){for(n=Wt(t).value,t=null,r=(n=l(Jt(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Vt(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=Wt(t).value,t=null,r=(n=l(Jt(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=Vt(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return Qt(e,t=Wt(t).value,i);if(143===n)return i=Qt(e,255,i),Zt(e),i;if(144===n)t.skip(1),i=Wt(t).value,e.g&&(e.g.s=0<(128&i),e.g.D=0<(64&i));else if(145===n)i=Wt(t).value,n=Wt(t).value,t.skip(1),e.g&&(t=en((48&n)>>4,(12&n)>>2,3&n),e.g.u=en((48&i)>>4,(12&i)>>2,3&i),e.g.m=t);else if(146===n)i=Wt(t).value,t=Wt(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),i=Wt(t).value,t.skip(1),e.g&&(e.g.H=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new jt;a.j=i,e.h[n]=a}i=Wt(t).value,Wt(t),Wt(t),a=Wt(t).value;var o=Wt(t).value;t=Wt(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.s=!1,t.u="white",t.m="black"),(t=e.h[n]).l=0<(32&i),t.I=1+(15&a),t.F=1+(63&o),e.g=e.h[n]}}}return null}Xt.prototype.na=function(){return this.gthis.h.length)throw new le(2,2,3e3);this.g+=e};var Jt=function e(t,n){var i;return N(e,(function(e){return 1==e.g&&(i=0),5!=e.g?8>i?1==(1&n)&&t.h[i]?T(e,i,5):e.v(5):e.v(0):(n>>=1,i++,e.v(2))}))};function Qt(e,t,n){for(var i=null,r=(t=l(Jt(e,t))).next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=Vt(a,n,e.i)),e.h[r]=null}return i}function Zt(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function en(e,t,n){var i={0:0,1:0,2:1,3:1};return nn[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}var tn=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),nn="black blue green cyan red magenta yellow white".split(" ");function rn(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.u=t,this.j=this.m=!1,this.l="white",this.s="black",on(this)}function an(e,t,n){return Nt(new ft(t,n,""),"CC"+(e.D<<1|e.u+1),e.i,t,n)}function on(e){ln(e,0,15),e.g=1}function sn(e,t,n){if(!(32>n||127=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map((function(e){return e}));else for(var r=0;r>3&1;0===n?e.m=i:e.s=i}if(n=e.u.get("CC"+(n<<1|(n?e.s:e.m)+1)),255===t.za&&255===t.Pa||!t.za&&!t.Pa||!Nn(t.za)||!Nn(t.Pa))return 45<=++e.l&&Mn(e),null;if(e.l=0,t.za&=127,t.Pa&=127,!t.za&&!t.Pa)return null;if(i=null,16==(112&t.za))e:{var r=t.za;if(i=t.Pa,n.m===(r<<8|i))n.m=null;else if(n.m=r<<8|i,16==(240&r)&&64==(192&i)){r=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|i>>5&1];var a=(30&i)>>1,o="white",s=!1;if(7>a?o=In[a]:7===a&&(s=!0),i=1==(1&i),n.h!==En){if(a=n.g,n.h===Sn&&r!==a.g){var u=1+r-a.h;un(a,u,1+a.g-a.h,a.h),ln(a,0,u-1),ln(a,r+1,15-r)}a.g=r,n.g.m=i,n.g.j=s,n.g.l=o,n.g.s="black"}}else if(17==(247&r)&&32==(240&i))n.g.m=!1,n.g.j=!1,n.g.l="white",sn(n.g,cn,32),o=!1,"white_italics"===(r=In[(14&i)>>1])&&(r="white",o=!0),n.g.m=1==(1&i),n.g.j=o,n.g.l=r;else if(16==(247&r)&&32==(240&i)||23==(247&r)&&45==(255&i))o="black",0==(7&r)&&(o=An[(14&i)>>1]),n.g.s=o;else if(17==(247&r)&&48==(240&i))sn(n.g,dn,i);else if(18==(246&r)&&32==(224&i))sn(n.g,1&r?hn:fn,i);else if(20==(246&r)&&32==(240&i)){switch(i=t.pts,r=null,t.Pa){case 32:Tn(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=bn(n,2,i);break;case 38:r=bn(n,3,i);break;case 39:r=bn(n,4,i);break;case 40:sn(n.g,cn,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=i;break;case 42:on(n.s),wn(n);break;case 43:wn(n);break;case 44:r=n.i,o=null,n.h!==En&&(o=an(r,n.j,i)),ln(r,0,15),r=o;break;case 45:r=n.g,n.h!==Sn?r=null:(o=an(r,n.j,i),un(r,(s=r.g-r.h+1)-1,s,r.h),ln(r,0,s-1),ln(r,r.g,15-r.g),n.j=i,r=o);break;case 46:ln(n.l,0,15);break;case 47:r=null,n.h!==En&&(r=an(n.i,n.j,i)),o=n.l,n.l=n.i,n.i=o,Tn(n),n.j=i}i=r;break e}i=null}else r=t.Pa,sn(n.g,cn,t.za),sn(n.g,cn,r);return i}function Dn(e,t){var n=[];try{for(;t.na();){var i=Wt(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&Wt(t).value),0!=r){e.j.has(r)||e.j.set(r,new Yt(r));for(var o=e.j.get(r),s=t.Z();t.Z()-s=l){var d=c;if(o.g){var f=o.g;switch(r=null,l){case 8:!Ft(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.F-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(r=Vt(f,d,o.i)),f.h+1>=f.I){d=f;for(var h=0,p=1;15>p;p++,h++)d.i[h]=d.i[p];for(p=0;1>p;p++,h++)d.i[h]=Ut()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(r=Vt(f,d,o.i)),f.i[f.h]=Ut(),f.g=0;break;case 12:f.isVisible()&&(r=Vt(f,d,o.i)),Ot(f),(d=f).h=0,d.g=0}var g=r}else g=null}else if(128<=l&&159>=l)g=$t(o,r,l,c);else{if(4096<=l&&4127>=l)8<=(d=255&l)&&15>=d?r.skip(1):16<=d&&23>=d?r.skip(2):24<=d&&31>=d&&r.skip(3);else if(4224<=l&&4255>=l)128<=(d=255&l)&&135>=d?r.skip(4):136<=d&&143>=d&&r.skip(5);else if(32<=l&&127>=l)r=l,o.g&&Bt(o.g,127===r?"♪":String.fromCharCode(r));else if(160<=l&&255>=l)o.g&&Bt(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(r=255&l,o.g)if(tn.has(r)){var m=tn.get(r);Bt(o.g,m)}else Bt(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&Bt(o.g,160!=(255&l)?"_":"[CC]");g=null}(r=g)&&n.push(r)}}}}catch(e){if(!(e instanceof le&&3e3===e.code))throw e;W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Nn(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function _n(){}var Pn=function e(t,n){var i,r,a,o;return N(e,(function(e){if(1==e.g){for(var t=0,s=0,u=0;s>2,f=a.$(),h=a.$();d&&(0===(u&=3)||1===u?i.h.push({pts:r,type:u,za:f,Pa:h,order:i.h.length}):(i.g.push({pts:r,type:u,value:f,order:i.g.length}),i.g.push({pts:r,type:2,value:h,order:i.g.length})))}}}}return function(e){function t(e,t){return e.pts-t.pts||e.order-t.order}var n=[];e.h.sort(t),e.g.sort(t);for(var i=l(e.h),r=i.next();!r.done;r=i.next())(r=Rn(e,r.value))&&n.push(r);for(r=(i=l(e.g)).next();!r.done;r=i.next())zt(e.i,r.value);for(r=(i=l(e.i.i)).next();!r.done;r=i.next())r=Dn(e,r.value),n.push.apply(n,c(r));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function Hn(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Kn(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function Gn(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,i=l(qn(e)),r=i.next();!r.done;r=i.next()){var a=r.value;r=a.start,(a=a.end)>t&&(n+=a-Math.max(r,t))}return n}function qn(e){if(!e)return[];for(var t=[],n=l(ee(e.length)),i=n.next();!i.done;i=n.next())i=i.value,t.push({start:e.start(i),end:e.end(i)});return t}Bn.prototype.init=function(e){var t=this,n=[],i=[];if((new Re).box("moov",De).box("mvex",De).U("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.M(),n=n.M(),t.g=e,t.h=n})).box("trak",De).U("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8),e=t.kb()):(t.skip(4),t.skip(4),e=t.M()),n.push(e)})).box("mdia",De).U("mdhd",(function(e){e=On(e.reader,e.version),i.push(e.timescale)})).parse(e,!0),!n.length||!i.length||n.length!=i.length)throw new le(2,2,2010);n.forEach((function(e,n){t.i.set(e,i[n])}))},Bn.prototype.parse=function(e){var t=this,n=[],i=this.g,r=this.h,a=[],o=null,s=9e4;return(new Re).box("moof",De).box("traf",De).U("trun",(function(e){a=Un(e.reader,e.version,e.flags).ke})).U("tfhd",(function(e){e=Ln(e.reader,e.flags),i=e.Ud||t.g,r=e.He||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).U("tfdt",(function(e){o=jn(e.reader,e.version).bd})).box("mdat",(function(e){if(null===o)throw new le(2,2,2010);e=e.reader;var u=o,c=s,d=i,f=r,h=a,p=0,g=f;for(h.length&&(g=h[0].sampleSize||f);e.na();){var m=e.M();if(6==(31&e.$())){var v=0;h.length>p&&(v=h[p].Hc||0),v=(u+v)/c;for(var y=l(Pn(t.j,e.Za(m-1))),b=y.next();!b.done;b=y.next())n.push({pf:b.value,pts:v})}else e.skip(m-1);0==(g-=m+4)&&(u=h.length>p?u+(h[p].Ed||d):u+d,p++,g=h.length>p&&h[p].sampleSize||f)}})).parse(e,!1),n},Fn.prototype.init=function(e){this.h.init(e)}; /* @license Copyright 2008 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ var zn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/; /* @license Copyright 2006 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */function Xn(e){var t;e instanceof Xn?(Wn(this,e.Da),this.nb=e.nb,this.Ga=e.Ga,Yn(this,e.Eb),this.wa=e.wa,$n(this,e.g.clone()),this.eb=e.eb):e&&(t=String(e).match(zn))?(Wn(this,t[1]||"",!0),this.nb=Jn(t[2]||""),this.Ga=Jn(t[3]||"",!0),Yn(this,t[4]),this.wa=Jn(t[5]||"",!0),$n(this,t[6]||"",!0),this.eb=Jn(t[7]||"")):this.g=new ai(null)}function Wn(e,t,n){e.Da=n?Jn(t,!0):t,e.Da&&(e.Da=e.Da.replace(/:$/,""))}function Yn(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Eb=t}else e.Eb=null}function $n(e,t,n){t instanceof ai?e.g=t:(n||(t=Qn(t,ii)),e.g=new ai(t))}function Jn(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Qn(e,t,n){return null!=e?(e=encodeURI(e).replace(t,Zn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Zn(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(i=Xn.prototype).Da="",i.nb="",i.Ga="",i.Eb=null,i.wa="",i.eb="",i.toString=function(){var e=[],t=this.Da;if(t&&e.push(Qn(t,ei,!0),":"),t=this.Ga){e.push("//");var n=this.nb;n&&e.push(Qn(n,ei,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Eb)&&e.push(":",String(t))}return(t=this.wa)&&(this.Ga&&"/"!=t.charAt(0)&&e.push("/"),e.push(Qn(t,"/"==t.charAt(0)?ni:ti,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.eb)&&e.push("#",Qn(t,ri)),e.join("")},i.resolve=function(e){var t=this.clone();"data"===t.Da&&(t=new Xn);var n=!!e.Da;n?Wn(t,e.Da):n=!!e.nb,n?t.nb=e.nb:n=!!e.Ga,n?t.Ga=e.Ga:n=null!=e.Eb;var i=e.wa;if(n)Yn(t,e.Eb);else if(n=!!e.wa){if("/"!=i.charAt(0))if(this.Ga&&!this.wa)i="/"+i;else{var r=t.wa.lastIndexOf("/");-1!=r&&(i=t.wa.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o>4).toString(16),r+=(15&o).toString(16),n=n.replace(i[0],r)}return n}function wi(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function xi(e,t,n){return e=wi(e,t),mi.get("muxjs")()&&bi(e)?Ti(n,e):e}function ki(e){var t=(e=e.split("."))[0];return e.pop(),t}function Si(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}vi.prototype.destroy=function(){return this.g.dispose(),this.g=null,Promise.resolve()};var Ei=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ai(e){this.s=null,this.i=e,this.j=this.D=0,this.l=1/0,this.h=this.g=null,this.u="",this.m=new Map}function Ii(e){return!(!Ri[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}function Ci(e,t,n){if(e.u=t,t=e.m.get(t))for(var i=l(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter((function(e){return e.endTime<=n})))&&e.i.append(r)}function Mi(e,t,n,i,r){for(var a=n+" "+i,o=new Map,s=(t=l(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),u.startTime+=r,u.endTime+=r,u.startTime>=e.j&&u.startTime=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&tn.g&&t>=n.h&&(n.h=e)),w(i)}))},F("shaka.text.TextEngine",Ai),Ai.prototype.destroy=Ai.prototype.destroy,Ai.findParser=function(e){return Ri[e]},Ai.unregisterParser=function(e){delete Ri[e]},Ai.registerParser=function(e,t){Ri[e]=t};var Ri={};function Di(e){this.g=!1,this.h=new hi,this.i=e}function Ni(e,t){if(e.g){if(t instanceof le&&7003==t.code)throw t;throw new le(2,7,7003,t)}}function _i(){this.g={}}function Pi(e,t){for(var n in e.g)t(n,e.g[n])}function Li(){this.g=new _i}function ji(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Oi;if(null==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch(e){t=!1}Oi=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}Di.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},_i.prototype.push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},_i.prototype.get=function(e){return(e=this.g[e])?e.slice():null},_i.prototype.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter((function(e){return e!=t})),0==this.g[e].length&&delete this.g[e])},_i.prototype.size=function(){return Object.keys(this.g).length},(i=Li.prototype).release=function(){this.lb(),this.g=null},i.B=function(e,t,n,i){this.g&&(e=new ji(e,t,n,i),this.g.push(t,e))},i.ua=function(e,t,n,i){var r=this;this.B(e,t,(function i(a){r.Ca(e,t,i),n(a)}),i)},i.Ca=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=l(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Ca(),this.g.remove(t,r))},i.lb=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,c(t.g[e]));for(n=(t=l(n)).next();!n.done;n=t.next())n.value.Ca();this.g.g={}}},F("shaka.util.EventManager",Li),Li.prototype.removeAll=Li.prototype.lb,Li.prototype.unlisten=Li.prototype.Ca,Li.prototype.listenOnce=Li.prototype.ua,Li.prototype.listen=Li.prototype.B,Li.prototype.release=Li.prototype.release,ji.prototype.Ca=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Oi=void 0;function Ui(e,t,n,i){var r=this;this.g=e,this.m=n,this.j={},this.I={},this.i=null,this.L=i||function(){},this.l={},this.h=new Li,this.u={},this.D=t,this.F=new hi,this.s=function(e,t){var n=new MediaSource;return e.h.ua(n,"sourceopen",(function(){URL.revokeObjectURL(e.H),t.resolve()})),e.H=Zi(n),e.g.src=e.H,n}(this,this.F),this.J=new Di((function(){return function(e){var t,n,i,r,a,o,s;return _((function(u){if(1==u.g){for(n in t=[],e.l)for(i=e.l[n],r=i[0],e.l[n]=i.slice(0,1),r&&t.push(r.p.catch(Ie)),a=l(i.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new le(2,7,7003,void 0));for(s in e.i&&t.push(e.i.destroy()),e.m&&t.push(e.m.destroy()),e.u)t.push(e.u[s].destroy());return T(u,Promise.all(t),2)}e.h&&(e.h.release(),e.h=null),e.g&&(e.g.removeAttribute("src"),e.g.load(),e.g=null),e.s=null,e.i=null,e.m=null,e.j={},e.u={},e.D=null,e.l={},w(u)}))}(r)})),this.H=""}function Bi(e){var t=wi(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Ei.forEach((function(n,i){var r=e[i];r&&t.push(n+'="'+r+'"')})),"PQ"==e.hdr&&t.push('eotf="smpte2084"'),t.join(";")}(e);return Ii(t)||MediaSource.isTypeSupported(n)||yi(t,e.type)}function Fi(e,t){e.i||(e.i=new Ai(e.m)),"application/cea-608"!=t&&"application/cea-708"!=t&&(e.i.s=Me(Ri[t]))}function Vi(e){return!e.s||"ended"==e.s.readyState}function Hi(e,t){if(t==ci)var n=e.i.g;else n=!(n=Gi(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function Ki(e,t){return t==ci?e.i.h:Hn(Gi(e,t))}function Gi(e,t){try{return e.j[t].buffered}catch(e){return null}}function qi(e,t,n,i,r,a){var o,s,u,c,d,f,h,p;return _((function(g){return 1==g.g?t==(o=di).fa?T(g,function(e,t,n,i){var r,a,o;return _((function(s){return 1==s.g?T(s,Promise.resolve(),2):e.s&&e.i?null==n||null==i?(e.s.parseInit(oe(t)),s.return()):(r={periodStart:e.D,segmentStart:n,segmentEnd:i},a=e.s.parseMedia(oe(t),r),o=a.filter((function(t){return t.startTime>=e.j&&t.startTime=n?Xi(e,t):e.j[t].remove(0,n)})),0)}))}function Xi(e,t){var n=e.l[t][0];n&&(n.p.resolve(),$i(e,t))}function Wi(e,t,n){return Ni(e.J),n={start:n,p:new hi},e.l[t].push(n),1==e.l[t].length&&Ji(e,t),n.p}function Yi(e,t){var n,i,r,a,o;return _((function(s){switch(s.g){case 1:for(r in Ni(e.J),n=[],i={},e.j)i.Jb=new hi,a={start:function(e){return function(){return e.Jb.resolve()}}(i),p:i.Jb},e.l[r].push(a),n.push(i.Jb),1==e.l[r].length&&a.start(),i={Jb:i.Jb};return x(s,2),T(s,Promise.all(n),4);case 4:S(s,3);break;case 2:throw E(s);case 3:try{t()}catch(e){throw new le(2,3,3015,e)}finally{for(o in e.j)$i(e,o)}w(s)}}))}function $i(e,t){e.l[t].shift(),Ji(e,t)}function Ji(e,t){var n=e.l[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new le(2,3,3017,t)):n.p.reject(new le(2,3,3015,i)),$i(e,t)}}function Qi(e,t,n,i){var r=e.g.mediaKeys;return null==n&&r&&(Ge()||Ke())&&"mp4"==e.I[i].split(";")[0].split("/")[1]&&(t=function(e){function t(){r=!0}function n(e){a.push(e),De(e)}e=oe(e);var i,r=!1,a=[],o=[];if((new Re).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).U("stsd",(function(e){i=e,a.push(e),Ne(e)})).U("encv",t).U("enca",t).U("avc1",(function(e){o.push({box:e,td:1701733238})})).U("ec-3",(function(e){o.push({box:e,td:1701733217})})).U("mp4a",(function(e){o.push({box:e,td:1701733217})})).parse(e),r)return e;if(0==o.length||!i)throw it(e),new le(2,3,3019);o.reverse();for(var s=l(o),u=s.next();!u.done;u=s.next())u=u.value,e=at(e,i,u.box,a,u.td);return e}(t)),t}(i=Ui.prototype).destroy=function(){return this.J.destroy()},i.init=function(e,t){var n,i,r,a,o,s,u,c=this;return _((function(d){if(1==d.g)return n=di,T(d,c.F,2);for(i={},r=l(e.keys()),a=r.next();!a.done;i={qa:i.qa},a=r.next())i.qa=a.value,o=e.get(i.qa),s=wi(o.mimeType,o.codecs),i.qa==n.fa?Fi(c,s):(!t&&MediaSource.isTypeSupported(s)||!yi(s,i.qa)||(c.u[i.qa]=new vi,s=Ti(i.qa,s)),u=c.s.addSourceBuffer(s),c.h.B(u,"error",function(e){return function(){c.l[e.qa][0].p.reject(new le(2,3,3014,c.g.error?c.g.error.code:0))}}(i)),c.h.B(u,"updateend",function(e){return function(){return Xi(c,e.qa)}}(i)),c.j[i.qa]=u,c.I[i.qa]=s,c.l[i.qa]=[]);w(d)}))},i.vc=function(){var e={total:qn(this.g.buffered),audio:qn(Gi(this,"audio")),video:qn(Gi(this,"video")),text:[]};if(this.i){var t=this.i.g,n=this.i.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},i.remove=function(e,t,n){var i=this;return _((function(r){return T(r,e==di.fa?i.i.remove(t,n):Wi(i,e,(function(){n<=t?Xi(i,e):i.j[e].remove(t,n)})),0)}))},i.flush=function(e){var t=this;return _((function(n){return e==di.fa?n.return():T(n,Wi(t,e,(function(){t.g.currentTime-=.001,Xi(t,e)})),0)}))},i.endOfStream=function(e){var t=this;return _((function(n){return T(n,Yi(t,(function(){Vi(t)||(e?t.s.endOfStream(e):t.s.endOfStream())})),0)}))},i.Ja=function(e){var t=this;return _((function(n){return T(n,Yi(t,(function(){t.s.duration=e})),0)}))},i.getDuration=function(){return this.s.duration};var Zi=e.URL.createObjectURL;function er(e,t){return e=ir(e),t=ir(t),e.split("-")[0]==t.split("-")[0]}function tr(e,t){e=ir(e),t=ir(t);var n=e.split("-"),i=t.split("-");return n[0]==i[0]&&1==n.length&&2==i.length}function nr(e,t){e=ir(e),t=ir(t);var n=e.split("-"),i=t.split("-");return 2==n.length&&2==i.length&&n[0]==i[0]}function ir(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=sr.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function rr(e,t){return e=ir(e),(t=ir(t))==e?4:tr(t,e)?3:nr(t,e)?2:tr(e,t)?1:0}function ar(e){return e.language?ir(e.language):e.audio&&e.audio.language?ir(e.audio.language):e.video&&e.video.language?ir(e.video.language):"und"}function or(e,t){for(var n=ir(e),i=new Set,r=l(t),a=r.next();!a.done;a=r.next())i.add(ir(a.value));for(a=(r=l(i)).next();!a.done;a=r.next())if((a=a.value)==n)return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(tr(a=a.value,n))return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(nr(a=a.value,n))return a;for(a=(i=l(i)).next();!a.done;a=i.next())if(tr(n,a=a.value))return a;return null}var sr=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ur(e,t){var n=Ar(e.variants,t),i=function(e){var t="",n=1/0;return Pi(e,(function(e,i){for(var r=0,a=0,o=l(i),s=o.next();!s.done;s=o.next())r+=s.value.bandwidth||0,++a;(r/=a)=t&&e<=n}var r=e.video;return!(r&&r.width&&r.height&&(!i(r.width,t.minWidth,Math.min(t.maxWidth,n.width))||!i(r.height,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function dr(e,t,n,i){return _((function(r){if(1==r.g)return i?T(r,hr(n,0=a*i.bandwidth/this.o.bandwidthDowngradeTarget&&t<=r&&(n=i)}return this.l=Date.now(),n},i.enable=function(){this.i=!0},i.disable=function(){this.i=!1},i.segmentDownloaded=function(e,t){var n=this.g;if(!(16e3>t)){var i=8e3*t/e,r=e/1e3;n.g+=t,H(n.h,r,i),H(n.i,r,i)}if(null!=this.l&&this.i)e:{if(this.s){if(Date.now()-this.l<1e3*this.o.switchInterval)break e}else{if(!(128e3<=this.g.g))break e;this.s=!0}n=this.chooseVariant(),this.g.getBandwidthEstimate(_r(this)),n&&this.j(n)}},i.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.o.defaultBandwidthEstimate)},i.setVariants=function(e){this.h=e},i.playbackRateChanged=function(e){this.m=e},i.configure=function(e){this.o=e},F("shaka.abr.SimpleAbrManager",Nr),Nr.prototype.configure=Nr.prototype.configure,Nr.prototype.playbackRateChanged=Nr.prototype.playbackRateChanged,Nr.prototype.setVariants=Nr.prototype.setVariants,Nr.prototype.getBandwidthEstimate=Nr.prototype.getBandwidthEstimate,Nr.prototype.segmentDownloaded=Nr.prototype.segmentDownloaded,Nr.prototype.disable=Nr.prototype.disable,Nr.prototype.enable=Nr.prototype.enable,Nr.prototype.chooseVariant=Nr.prototype.chooseVariant,Nr.prototype.init=Nr.prototype.init,Nr.prototype.stop=Nr.prototype.stop,Lr.prototype.add=function(e){return!!jr(this.h,e)&&(this.g.add(e),!0)},Lr.prototype.values=function(){return this.g.values()},Br.prototype.create=function(e){var t=this,n=e.filter((function(e){return jr(t.g,e)}));return n.length?new Lr(n[0],n):this.h.create(e)},Fr.prototype.create=function(e){var t=[];t=function(e,t){var n=or(ir(t),e.map((function(e){return ar(e)})));return n?e.filter((function(e){return n==ar(e)})):[]}(e,this.i);var n=e.filter((function(e){return e.primary}));for((e=function(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}(t=t.length?t:n.length?n:e,this.j)).length&&(t=e),this.g&&((e=Ar(t,this.g)).length&&(t=e)),this.h&&((e=function(e,t){return e.filter((function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h)).length&&(t=e)),e=new Lr(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,jr(e.h,n)&&e.add(n);return e};var Kr=0,Gr=1;function qr(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.s=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function zr(e){var t,n;return _((function(i){if(1==i.g){if(e.g>=e.l){if(!e.i)throw new le(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?i.return():(n=e.h*(1+(2*Math.random()-1)*e.s),T(i,new Promise((function(e){new Fe(e).T(n/1e3)})),2))}e.h*=e.m,w(i)}))}function Xr(e,t){this.promise=e,this.i=t,this.g=!1}function Wr(e){return new Xr(Promise.reject(e),(function(){return Promise.resolve()}))}function Yr(){var e=Promise.reject(new le(2,7,7001));return e.catch((function(){})),new Xr(e,(function(){return Promise.resolve()}))}function $r(e){return new Xr(Promise.resolve(e),(function(){return Promise.resolve()}))}function Jr(e){return new Xr(e,(function(){return e.catch((function(){}))}))}function Qr(e){return new Xr(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function Zr(t,n){for(var i in n=void 0===n?{}:n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function ea(){this.oc=new _i,this.nc=this}function ta(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var i=n.constructor==Array;if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function na(e){var t,n={};for(t in e)n[t]=e[t];return n}function ia(){this.g=[]}function ra(e,t){e.g.push(t.finally((function(){lt(e.g,t)})))}function aa(e){ea.call(this),this.i=!1,this.l=new ia,this.g=new Set,this.h=new Set,this.j=e||null,this.m=!1}function oa(e,t,n,i){n=n||da;var r=fa[e];(!r||n>=r.priority)&&(fa[e]={priority:n,qf:t,sf:void 0!==i&&i})}function sa(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===n?null:n}}function ua(){this.g=0}function la(e,t,n){Xr.call(this,e,t),this.h=n}Xr.prototype.abort=function(){return this.g=!0,this.i()},Xr.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Xr.prototype.aa=function(e,t){function n(n){return function(s){if(r.g&&n)a.reject(o);else{var u=n?e:t;u?i=function(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then((function(){}),(function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function i(){return a.reject(o),r.abort()}var r=this,a=new hi,o=new le(2,7,7001);return this.promise.then(n(!0),n(!1)),new Xr(a,(function(){return i()}))},F("shaka.util.AbortableOperation",Xr),Xr.prototype.chain=Xr.prototype.aa,Xr.prototype.finally=Xr.prototype.finally,Xr.all=Qr,Xr.prototype.abort=Xr.prototype.abort,Xr.notAbortable=Jr,Xr.completed=$r,Xr.aborted=Yr,Xr.failed=Wr,Zr.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Zr.prototype.stopImmediatePropagation=function(){this.g=!0},Zr.prototype.stopPropagation=function(){},F("shaka.util.FakeEvent",Zr),ea.prototype.addEventListener=function(e,t){this.oc.push(e,t)},ea.prototype.removeEventListener=function(e,t){this.oc.remove(e,t)},ea.prototype.dispatchEvent=function(e){var t=this.oc.get(e.type)||[],n=this.oc.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.nc,e.currentTarget=this.nc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},ia.prototype.destroy=function(){for(var e=[],t=l(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch((function(){})),e.push(n.abort());return this.g=[],Promise.all(e)},m(aa,ea),(i=aa.prototype).Jd=function(e){this.m=e},i.tf=function(e){this.g.add(e)},i.Kf=function(e){this.g.delete(e)},i.Ee=function(){this.g.clear()},i.uf=function(e){this.h.add(e)},i.Lf=function(e){this.h.delete(e)},i.Fe=function(){this.h.clear()},i.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.l.destroy()},i.request=function(e,t){var n=this,i=new ua;if(this.i){var r=Promise.reject(new le(2,7,7001));return r.catch((function(){})),new la(r,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?ta(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=ta(t.uris);var a=(r=function(e,t,n){for(var i=$r(void 0),r={},a=(e=l(e.g)).next();!a.done;r={Uc:r.Uc},a=e.next())r.Uc=a.value,i=i.aa(function(e){return function(){return n.body&&(n.body=ae(n.body)),e.Uc(t,n)}}(r));return i.aa(void 0,(function(e){if(e instanceof le&&7001==e.code)throw e;throw new le(2,1,1006,e)}))}(this,e,t)).aa((function(){return function e(t,n,i,r,a,o,s){t.m&&(i.uris[a]=i.uris[a].replace("http://","https://"));var u=new Xn(i.uris[a]),l=u.Da,c=!1;l||(l=(l=location.protocol).slice(0,-1),Wn(u,l),i.uris[a]=u.toString()),l=l.toLowerCase();var d=(l=fa[l])?l.qf:null;if(!d)return Wr(new le(2,1,1e3,u));var f,h=l.sf,p=null,g=null,m=!1;return Jr(zr(r)).aa((function(){if(t.i)return Yr();f=Date.now();var e=d(i.uris[a],i,n,(function(e,i,r){p&&p.stop(),g&&g.T(o/1e3),t.j&&n==ca&&(t.j(e,i),c=!0,s.g=r)}));if(!h)return e;var r=i.retryParameters.connectionTimeout;r&&(p=new Fe((function(){m=!0,e.abort()}))).T(r/1e3);var o=i.retryParameters.stallTimeout;return o&&(g=new Fe((function(){m=!0,e.abort()}))),e})).aa((function(e){return p&&p.stop(),g&&g.stop(),null==e.timeMs&&(e.timeMs=Date.now()-f),{response:e,ff:c}}),(function(u){if(p&&p.stop(),g&&g.stop(),t.i)return Yr();if(m&&(u=new le(1,1,1003,i.uris[a],n)),u instanceof le){if(7001==u.code)throw u;if(1010==u.code)throw o;if(1==u.severity){var l=new Zr("retry",{error:u});return t.dispatchEvent(l),a=(a+1)%i.uris.length,e(t,n,i,r,a,u,s)}}throw u}))}(n,e,t,new qr(t.retryParameters,!1),0,null,i)})),o=a.aa((function(t){return function(e,t,n){for(var i=$r(void 0),r={},a=(e=l(e.h)).next();!a.done;r={Vc:r.Vc},a=e.next())r.Vc=a.value,i=i.aa(function(e){return function(){var i=n.response;return i.data&&(i.data=ae(i.data)),e.Vc(t,i)}}(r));return i.aa((function(){return n}),(function(e){var t=2;if(e instanceof le){if(7001==e.code)throw e;t=e.severity}throw new le(t,1,1007,e)}))}(n,e,t)})),s=Date.now(),u=0;r.promise.then((function(){u=Date.now()-s}),(function(){}));var c=0;a.promise.then((function(){c=Date.now()}),(function(){}));var d=o.aa((function(t){var i=Date.now()-c,r=t.response;return r.timeMs+=u,r.timeMs+=i,t.ff||!n.j||r.fromCache||e!=ca||n.j(r.timeMs,r.data.byteLength),r}),(function(e){throw e&&(e.severity=2),e}));return r=new la(d.promise,(function(){return d.abort()}),i),ra(this.l,r),r},F("shaka.net.NetworkingEngine",aa),aa.prototype.request=aa.prototype.request,aa.prototype.destroy=aa.prototype.destroy,aa.makeRequest=sa,aa.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},aa.prototype.clearAllResponseFilters=aa.prototype.Fe,aa.prototype.unregisterResponseFilter=aa.prototype.Lf,aa.prototype.registerResponseFilter=aa.prototype.uf,aa.prototype.clearAllRequestFilters=aa.prototype.Ee,aa.prototype.unregisterRequestFilter=aa.prototype.Kf,aa.prototype.registerRequestFilter=aa.prototype.tf,aa.unregisterScheme=function(e){delete fa[e]},aa.registerScheme=oa,aa.prototype.setForceHTTPS=aa.prototype.Jd,aa.NumBytesRemainingClass=ua,m(la,Xr),aa.PendingRequest=la;var ca=1;aa.RequestType={MANIFEST:0,SEGMENT:ca,LICENSE:2,APP:3,TIMING:4};var da=3;aa.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:da};var fa={};function ha(){}function pa(e){return new Xn(e=pe(e)).Ga}function ga(e,t,n){function i(e){se(a).setUint32(o,e.byteLength,!0),o+=4,a.set(oe(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new le(2,6,6015);var r;r="string"==typeof t?me(t,!0):t,e=me(e=pe(e),!0);var a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function ma(e){for(var t=new Map,n=l(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function va(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function ya(e,t){if(!e&&!t)return!0;if(e&&!t||t&&!e)return!1;if(e.size!=t.size)return!1;for(var n=l(e),i=n.next();!i.done;i=n.next()){var r=l(i.value);if(i=r.next().value,r=r.next().value,!t.has(i))return!1;if((i=t.get(i))!=r||null==i)return!1}return!0}function ba(e,t){var n=this;t=void 0===t?1:t,this.C=e,this.u=new Set,this.g=this.m=null,this.oa=this.L=!1,this.H=0,this.i=null,this.h=new Li,this.j=new Map,this.D=[],this.s=new hi,this.o=null,this.l=function(t){n.s.reject(t),e.onError(t)},this.pa=new Map,this.X=new Map,this.S=new Fe((function(){return function(e){var t=e.pa,n=e.X;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),(t=Array.from(n.values())).length&&t.every((function(e){return"expired"==e}))&&e.l(new le(2,6,6014)),e.C.Dc(va(n))}(n)})),this.F=!1,this.I=[],this.N=!1,this.ca=new Fe((function(){!function(e){e.j.forEach((function(t,n){var i=t.xd,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.xd=r)}))}(n)})).Ba(t),this.s.catch((function(){})),this.J=new Di((function(){return function(e){return _((function(t){switch(t.g){case 1:return e.h.release(),e.h=null,e.s.reject(),e.ca.stop(),e.ca=null,e.S.stop(),e.S=null,T(t,La(e),2);case 2:if(!e.g){t.v(3);break}return x(t,4),T(t,e.g.setMediaKeys(null),6);case 6:S(t,5);break;case 4:E(t);case 5:e.g=null;case 3:e.i=null,e.u.clear(),e.m=null,e.D=[],e.o=null,e.l=function(){},e.C=null,w(t)}}))}(n)}))}function Ta(e,t,n,i){return e.D=n,e.F=0i&&(i+=Math.pow(2,32)),i="0x"+i.toString(16)}e.l(new le(2,6,6006,t.message,t,i))}}))}(e,t,n)}function Ea(e){return e?e.keySystem:""}function Aa(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Ia(e,t){if(navigator.userAgent.match(/Edge\//))return!0;if(t=t.toLowerCase(),Ge()&&t.includes('codecs="ac-3"')){var n=t.replace("ac-3","ec-3");return e.u.has(t)||e.u.has(n)}return e.u.has(t)}function Ca(e){return e=Z(e=e.j.keys(),(function(e){return e.sessionId})),Array.from(e)}function Ma(e,t){var n=wi(e.mimeType,t||e.codecs);return yi(n)?Ti(e.type,n):n}function Ra(e,t,n,i){var r,a,o,s,u,c,d,f,h,p,g,m,v;return _((function(y){switch(y.g){case 1:if(r=new Map,i){e:{for(var b=l(n),w=b.next();!w.done;w=b.next()){var k=l(Oa(w.value));for(w=k.next();!w.done;w=k.next()){var A=w.value;r.has(A.keySystem)||r.set(A.keySystem,[]),r.get(A.keySystem).push(A)}}if(1==r.size&&r.has(""))throw new le(2,6,6e3);for(k=(b=l([!0,!1])).next();!k.done;k=b.next())for(k=k.value,w=(A=l(n)).next();!w.done;w=A.next()){var I=l(w.value.decodingInfos);for(w=I.next();!w.done;w=I.next()){var C=w.value;if(C.supported&&C.keySystemAccess){var M=l(w=r.get(C.keySystemAccess.keySystem));for(w=M.next();!w.done;w=M.next())if(!!w.value.licenseServerUri==k){a=C.keySystemAccess;break e}}}}a=null}y.v(2);break}return T(y,function(e,t){var n,i,r,a,o,s,u,c,d,f,h;return _((function(p){switch(p.g){case 1:if(1==t.size&&t.has(""))throw new le(2,6,6e3);for(i=l(t.values()),r=i.next();!r.done;r=i.next())0==(a=r.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=l([!0,!1]),s=o.next();case 2:if(s.done){p.v(4);break}u=s.value,c=l(t.keys()),d=c.next();case 5:if(d.done){s=o.next(),p.v(2);break}if(f=d.value,h=t.get(f),h.drmInfos.some((function(e){return!!e.licenseServerUri}))!=u){p.v(6);break}return x(p,8),T(p,navigator.requestMediaKeySystemAccess(f,[h]),10);case 10:return n=p.h,p.return(n);case 8:E(p);case 9:Ni(e.J);case 6:d=c.next(),p.v(5);break;case 4:return p.return(n)}}))}(e,t),3);case 3:a=y.h;case 2:if(!(o=a))throw new le(2,6,6001);for(Ni(e.J),x(y,4),e.u.clear(),s=o.getConfiguration(),u=s.audioCapabilities||[],c=s.videoCapabilities||[],d=l(u),f=d.next();!f.done;f=d.next())h=f.value,e.u.add(h.contentType.toLowerCase());for(p=l(c),f=p.next();!f.done;f=p.next())g=f.value,e.u.add(g.contentType.toLowerCase());if(i){for(k=o.keySystem,Ba(b=r.get(o.keySystem),A=[],w=[],I=[],C=new Set),M=e.F?"persistent-license":"temporary",k={keySystem:k,licenseServerUri:A[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||M,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:w[0],initData:I,keyIds:C},A=(b=l(b)).next();!A.done;A=b.next())(A=A.value).distinctiveIdentifierRequired&&(k.distinctiveIdentifierRequired=A.distinctiveIdentifierRequired),A.persistentStateRequired&&(k.persistentStateRequired=A.persistentStateRequired);b=k}else b=o.keySystem,k=t.get(o.keySystem),A=[],w=[],I=[],C=new Set,Ba(k.drmInfos,A,w,I,C),b={keySystem:b,licenseServerUri:A[0],distinctiveIdentifierRequired:"required"==k.distinctiveIdentifier,persistentStateRequired:"required"==k.persistentState,sessionType:k.sessionTypes[0]||"temporary",audioRobustness:(k.audioCapabilities?k.audioCapabilities[0].robustness:"")||"",videoRobustness:(k.videoCapabilities?k.videoCapabilities[0].robustness:"")||"",serverCertificate:w[0],initData:I,keyIds:C};if(e.i=b,!e.i.licenseServerUri)throw new le(2,6,6012,e.i.keySystem);return T(y,o.createMediaKeys(),6);case 6:return m=y.h,Ni(e.J),e.m=m,e.L=!0,T(y,xa(e),7);case 7:Ni(e.J),S(y,0);break;case 4:if(v=E(y),Ni(e.J,v),e.i=null,e.u.clear(),v instanceof le)throw v;throw new le(2,6,6002,v.message)}}))}function Da(e,t){var n,i,r,a,o;return _((function(s){switch(s.g){case 1:try{n=e.m.createSession("persistent-license")}catch(t){return i=new le(2,6,6005,t.message),e.l(i),s.return(Promise.reject(i))}return e.h.B(n,"message",(function(t){e.g&&e.o.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.N?e.I.push(t):_a(e,t)})),e.h.B(n,"keystatuseschange",(function(t){return Pa(e,t)})),r={initData:null,loaded:!1,xd:1/0,Ka:null,type:"persistent-license"},e.j.set(n,r),x(s,2),T(s,n.load(t),4);case 4:return a=s.h,Ni(e.J),a?(r.loaded=!0,Ua(e)&&e.s.resolve(),s.return(n)):(e.j.delete(n),e.l(new le(2,6,6013)),s.return(Promise.resolve()));case 2:o=E(s),Ni(e.J,o),e.j.delete(n),e.l(new le(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function Na(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=ga(e,n=pa(e),t)),e}function _a(e,t){var n,i,r,a,o,s,u,c,d,f,h,p;_((function(g){switch(g.g){case 1:return n=t.target,e.o.logLicenseExchange&&et(t.message),i=e.j.get(n),r=e.i.licenseServerUri,a=e.o.advanced[e.i.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=sa([r],e.o.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,Aa(e.i.keySystem)&&function(e){var t=he(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var n=l((t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader")),i=n.next();!i.done;i=n.next())i=i.value,e.headers[i.getElementsByTagName("name")[0].textContent]=i.getElementsByTagName("value")[0].textContent;e.body=tt(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),x(g,2),T(g,e.C.Bb.request(2,o).promise,4);case 4:u=g.h,S(g,3);break;case 2:return c=E(g),d=new le(2,6,6007,c),e.l(d),i&&i.Ka&&i.Ka.reject(d),g.return();case 3:return e.J.g?g.return():(e.H+=(Date.now()-s)/1e3,e.o.logLicenseExchange&&et(u.data),x(g,5),T(g,n.update(u.data),7));case 7:S(g,6);break;case 5:return f=E(g),h=new le(2,6,6008,f.message),e.l(h),i&&i.Ka&&i.Ka.reject(h),g.return();case 6:p=new Zr("drmsessionupdate"),e.C.onEvent(p),i&&(i.Ka&&i.Ka.resolve(),new Fe((function(){i.loaded=!0,Ua(e)&&e.s.resolve()})).T(Ha)),w(g)}}))}function Pa(e,t){var n=t.target,i=e.j.get(n),r=!1;n.keyStatuses.forEach((function(t,n){if("string"==typeof n){var a=n;n=t,t=a}if(Aa(e.i.keySystem)&&16==n.byteLength&&navigator.userAgent.match(/Edge?\//)){var o=(a=se(n)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}"status-pending"!=t&&(i.loaded=!0),"expired"==t&&(r=!0),a=it(n),e.pa.set(a,t)}));var a=n.expiration-Date.now();(0>a||r&&1e3>a)&&i&&!i.Ka&&(e.j.delete(n),n.close().catch((function(){}))),Ua(e)&&(e.s.resolve(),e.S.T(Ka))}function La(e){var t;return _((function(n){return t=Array.from(e.j.entries()),e.j.clear(),T(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,i=t.next().value;return _((function(t){return 1==t.g?(x(t,2),e.oa||e.D.includes(n.sessionId)||"persistent-license"!==i.type?T(t,function(e){var t;return _((function(n){return 1==n.g?(t=new Promise((function(e,t){new Fe(t).T(Va)})),x(n,2),T(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?S(n,0):(E(n),void w(n))}))}(n),5):T(t,n.remove(),5)):2!=t.g?S(t,0):(E(t),void w(t))}))}))),0)}))}function ja(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=l(t),o=a.next();!o.done;o=a.next())if(o=o.value,r.keySystem==o.keySystem){a=(a=(a=[]).concat(r.initData||[])).concat(o.initData||[]);var s=r.keyIds&&o.keyIds?new Set([].concat(c(r.keyIds),c(o.keyIds))):r.keyIds||o.keyIds;n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||o.persistentStateRequired,videoRobustness:r.videoRobustness||o.videoRobustness,audioRobustness:r.audioRobustness||o.audioRobustness,serverCertificate:r.serverCertificate||o.serverCertificate,initData:a,keyIds:s});break}}return n}function Oa(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Ua(e){return function(e,t){for(var n=l(e),i=n.next();!i.done;i=n.next())if(!t(i.value))return!1;return!0}(e=e.j.values(),(function(e){return e.loaded}))}function Ba(e,t,n,i,r){for(var a={},o=(e=l(e)).next();!o.done;a={xa:a.xa},o=e.next()){if(a.xa=o.value,t.includes(a.xa.licenseServerUri)||t.push(a.xa.licenseServerUri),a.xa.serverCertificate&&(n.some(function(e){return function(t){return ie(t,e.xa.serverCertificate)}}(a))||n.push(a.xa.serverCertificate)),a.xa.initData){o={};for(var s=l(a.xa.initData),u=s.next();!u.done;o={fc:o.fc},u=s.next())o.fc=u.value,i.some(function(e){return function(t){var n=e.fc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&ie(t.initData,n.initData)}}(o))||i.push(o.fc)}if(a.xa.keyIds)for(s=(o=l(a.xa.keyIds)).next();!s.done;s=o.next())r.add(s.value)}}function Fa(t,n,i){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(i=i.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.videoRobustness||(t.videoRobustness=i.videoRobustness),t.audioRobustness||(t.audioRobustness=i.audioRobustness),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}F("shaka.util.FairPlayUtils",ha),ha.initDataTransform=ga,ha.defaultGetContentId=pa,(i=ba.prototype).destroy=function(){return this.J.destroy()},i.configure=function(e){this.o=e},i.Mb=function(e){var t,n=this;return _((function(i){if(1==i.g)return n.m?(n.g=e,n.h.ua(n.g,"play",(function(){for(var e=l(n.I),t=e.next();!t.done;t=e.next())_a(n,t.value);n.N=!0,n.I=[]})),"webkitCurrentPlaybackTargetIsWireless"in n.g&&n.h.B(n.g,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return La(n)})),T(i,n.g.setMediaKeys(n.m).catch((function(e){return Promise.reject(new le(2,6,6003,e.message))})),2)):(n.h.ua(e,"encrypted",(function(){n.l(new le(2,6,6010))})),i.return());Ni(n.J),ka(n),n.i.initData.length||n.D.length||(t=function(e){return Sa(n,e.initDataType,oe(e.initData))},n.h.B(n.g,"encrypted",t)),w(i)}))},i.Qb=function(){for(var e=1/0,t=this.j.keys(),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},i.xc=function(){return va(this.X)};var Va=1,Ha=5,Ka=.5,Ga=new ce((function(){return ae(new Uint8Array([0]))}));function qa(){}function za(e,t,n,i){var r,a,o,s;return _((function(u){if(1==u.g)return i&&(r=Ya[i.toLowerCase()])?u.return(r):(a=Wa(e))&&(o=$a[a])?u.return(o):i?u.v(2):T(u,Xa(e,t,n),3);if(2!=u.g&&(i=u.h)&&(s=Ya[i]))return u.return(s);throw new le(2,4,4e3,e)}))}function Xa(e,t,n){var i,r,a;return _((function(o){return 1==o.g?((i=sa([e],n)).method="HEAD",T(o,t.request(0,i).promise,2)):(r=o.h,a=r.headers["content-type"],o.return(a?a.toLowerCase().split(";").shift():""))}))}function Wa(e){return 1==(e=new Xn(e).wa.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}F("shaka.media.ManifestParser",qa),qa.unregisterParserByMime=function(e){delete Ya[e]},qa.registerParserByMime=function(e,t){Ya[e]=t},qa.registerParserByExtension=function(e,t){$a[e]=t};var Ya={},$a={};function Ja(e,t,n){this.ma=e,this.ja=t,this.da=n}function Qa(e,t,n,i,r,a,o,s,u,l){l=void 0===l?[]:l,this.startTime=e,this.endTime=t,this.i=n,this.ja=i,this.da=r,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l}function Za(e,t,n){this.j=e,this.Gc=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.s=0,this.u=!0,this.D=0,this.F=void 0===n||n,this.H=0}function eo(e,t){this.j=e,this.m=no(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.s=t,this.i=function(){}}function to(e){this.g=e}function no(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=l(qn(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function io(e,t,n,i,r){var a=this;this.g=e,this.D=t,this.o=n,this.u=r,this.h=new Li,this.s=!1,this.F=e.readyState,this.j=!1,this.i=i,this.m=!1,this.h.B(e,"waiting",(function(){return ro(a)})),this.l=new Fe((function(){ro(a)})).Ba(.25)}function ro(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.s)return}else e.s=!1;if(!e.g.paused||0==e.g.currentTime){var t;if(e.g.readyState!=e.F&&(e.j=!1,e.F=e.g.readyState),!(t=!e.i)){var n=(t=e.i).j,i=no(n),r=n.g.currentTime,a=Date.now()/1e3;t.g==r&&t.m==i||(t.l=a,t.g=r,t.m=i,t.h=!1),(i=(r=a-t.l)>=t.s&&i&&!t.h)&&(t.i(t.g,r),t.h=!0,t.g=n.g.currentTime),t=!i}if(t){var o=e.o.smallGapLimit;if(r=e.g.currentTime,!(null==(n=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=qn(e).findIndex((function(e,i,r){return e.start>t&&(0==i||r[i-1].end-t<=n)})))?e:null}(t=e.g.buffered,r,e.o.gapDetectionThreshold))||0==n&&!e.m||(i=t.start(n),i>=e.D.Qa()))){o=(a=i-r)<=o;var s=!1;.001>a||(o||e.j||(e.j=!0,(r=new Zr("largegap",{currentTime:r,gapSize:a})).cancelable=!0,e.u(r),e.o.jumpLargeGaps&&!r.defaultPrevented&&(s=!0)),!o&&!s)||(0!=n&&t.end(n-1),e.g.currentTime=i)}}}}}function ao(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=oo.value().get(t),n.ua(e,t,i))}Ja.prototype.Tb=function(){return this.ja},Ja.prototype.Pb=function(){return this.da},F("shaka.media.InitSegmentReference",Ja),Ja.prototype.getEndByte=Ja.prototype.Pb,Ja.prototype.getStartByte=Ja.prototype.Tb,(i=Qa.prototype).ma=function(){return this.i()},i.$e=function(){return this.startTime},i.Ne=function(){return this.endTime},i.Tb=function(){return this.ja},i.Pb=function(){return this.da},F("shaka.media.SegmentReference",Qa),Qa.prototype.getEndByte=Qa.prototype.Pb,Qa.prototype.getStartByte=Qa.prototype.Tb,Qa.prototype.getEndTime=Qa.prototype.Ne,Qa.prototype.getStartTime=Qa.prototype.$e,Qa.prototype.getUris=Qa.prototype.ma,(i=Za.prototype).getDuration=function(){return this.l},i.Te=function(){return this.g},i.Ja=function(e){this.l=e},i.Ze=function(){return this.j},i.pe=function(e){this.s=e},i.ac=function(e){this.u=e},i.Md=function(e){this.m=e},i.Ff=function(e){this.Gc=e},i.Me=function(){return this.Gc},i.Cb=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.vd(e[0].startTime),this.g=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,t),null!=this.j&&this.F&&(this.j=(Date.now()+this.s)/1e3-this.h-this.g)}},i.vd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},i.ud=function(e){this.g=Math.max(this.g,e)},i.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},i.Y=function(){return 1/0==this.l&&!this.u},i.ib=function(){return 1/0!=this.l&&!this.u},i.Ya=function(){return Math.max(this.D,this.fb()-this.m)},i.qe=function(e){this.D=e},i.fb=function(){return this.Y()||this.ib()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.j)+this.H,this.l):this.l},i.Sb=function(e){var t=Math.max(this.i,this.D);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.fb()-this.m+e,this.Qa()))},i.xb=function(){return this.Sb(0)},i.Qa=function(){return Math.max(0,this.fb()-(this.Y()||this.ib()?this.Gc:0))},i.te=function(){return!(null==this.j||null!=this.h&&this.F)},i.oe=function(e){this.H=e},F("shaka.media.PresentationTimeline",Za),Za.prototype.setAvailabilityTimeOffset=Za.prototype.oe,Za.prototype.usingPresentationStartTime=Za.prototype.te,Za.prototype.getSeekRangeEnd=Za.prototype.Qa,Za.prototype.getSeekRangeStart=Za.prototype.xb,Za.prototype.getSafeSeekRangeStart=Za.prototype.Sb,Za.prototype.getSegmentAvailabilityEnd=Za.prototype.fb,Za.prototype.setUserSeekStart=Za.prototype.qe,Za.prototype.getSegmentAvailabilityStart=Za.prototype.Ya,Za.prototype.isInProgress=Za.prototype.ib,Za.prototype.isLive=Za.prototype.Y,Za.prototype.offset=Za.prototype.offset,Za.prototype.notifyMaxSegmentDuration=Za.prototype.ud,Za.prototype.notifyMinSegmentStartTime=Za.prototype.vd,Za.prototype.notifySegments=Za.prototype.Cb,Za.prototype.getDelay=Za.prototype.Me,Za.prototype.setDelay=Za.prototype.Ff,Za.prototype.setSegmentAvailabilityDuration=Za.prototype.Md,Za.prototype.setStatic=Za.prototype.ac,Za.prototype.setClockOffset=Za.prototype.pe,Za.prototype.getPresentationStartTime=Za.prototype.Ze,Za.prototype.setDuration=Za.prototype.Ja,Za.prototype.getMaxSegmentDuration=Za.prototype.Te,Za.prototype.getDuration=Za.prototype.getDuration,eo.prototype.release=function(){this.j=null,this.i=function(){}},io.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.l&&(this.l.stop(),this.l=null),this.i&&(this.i.release(),this.i=null),this.g=this.D=this.u=null},io.prototype.yd=function(){this.m=!0,ro(this)};var oo=new ce((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function so(e,t,n){var i=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new Li,this.i=new ho(e),ao(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){co(i,i.j)}))}function uo(e){return e.m?e.g.currentTime:e.j}function lo(e,t){0Math.abs(e.g.currentTime-t)?fo(e):(e.h.ua(e.g,"seeking",(function(){fo(e)})),po(e.i,0==e.g.currentTime?t:e.g.currentTime))}function fo(e){e.m=!0,e.h.B(e.g,"seeking",(function(){return e.l()}))}function ho(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new Fe((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function po(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Ba(.1)}function go(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new Li,ao(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i?t.j=!0:(t.h.ua(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function mo(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.H=t.minBufferTime||0,this.o=n,this.D=r,this.u=null,this.j=new io(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,i=new eo(new to(e),t.stallThreshold);return function(e,t){e.i=t}(i,(function(){n?e.currentTime+=n:(e.pause(),e.play())})),i}(e,n),a),this.h=new so(e,(function(){var e=o.j;e.s=!0,e.m=!1,e.j=!1;var t=uo(o.h);return e=yo(o,t),.001e.g.getDuration()?e.g.xb():e.g.Qa():0>t&&(t=e.g.Qa()+t),vo(e,bo(e,t))}(this,i)),this.s=new Fe((function(){if(0!=o.i.readyState&&!o.i.paused){var e=uo(o.h),t=o.g.xb(),n=o.g.Qa();3>n-t&&(t=n-3),e=n?n-e.o.durationBackoff:t}function yo(e,t){var n=Math.max(e.H,e.o.rebufferingGoal),i=e.o.safeSeekOffset,r=e.g.xb(),a=e.g.Qa(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.Sb(n),u=e.g.Sb(i);return n=e.g.Sb(n+i),t>=o?vo(e,t):t>a?a:t=s||Kn(e.i.buffered,t)?t:n}function bo(e,t){var n=e.g.xb();return t(n=e.g.Qa())?n:t}function To(e){this.g=e,this.h=null,this.i=0,this.j=!1}function wo(e,t,n){return new To([new Qa(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function xo(e,t,n){this.i=e,this.h=t,this.g=n}function ko(){To.call(this,[]),this.l=[]}function So(e){var t=this;this.g=e,this.j=!1,this.i=this.g.zc(),this.h=new Fe((function(){t.g.fe(.25*t.i)}))}function Eo(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.zc()!=t&&e.g.Ld(t))}catch(e){}e.h.Ba(.25),0!=e.g.zc()&&e.g.Ld(0)}function Ao(e){var t=this;this.h=e,this.g=new Set,this.i=new Fe((function(){Io(t,!1)})).Ba(.25)}function Io(e,t){for(var n=l(e.g),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=e.h.currentTime,a=t,o=l(i.l.g),s=o.next();!s.done;s=o.next()){s=s.value;var u=i.j.get(s),c=rs.endTime?No:Do;i.j.set(s,c);for(var d=l(i.m),f=d.next();!f.done;f=d.next())(f=f.value).qb==u&&f.pb==c&&f.hb(s,a)}}}function Co(e){var t=this;this.h=function(){},this.g=new Set,this.j=e,this.i=new Fe((function(){for(var e=t.j(),n=l(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime=i.startTime&&e(e-=this.i)||e>=this.g.length?null:this.g[e]},i.offset=function(e){if(!this.j)for(var t=l(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},i.Bc=function(e){!this.j&&e.length&&(this.g=this.g.filter((function(t){return t.startTimet&&(0==n.g.length||e.endTime>n.g[0].startTime)})),this.Bc(e),this.cb(t)},i.cb=function(e){if(!this.j){var t=this.g.length;this.g=this.g.filter((function(t){return t.endTime>e})),this.i+=t-this.g.length}},i.Xa=function(e,t,n){if(n=void 0!==n&&n,!this.j){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new Qa(e.startTime,t,e.i,e.ja,e.da,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd))}},i.Jc=function(e,t){var n=this;this.j||(this.h&&this.h.stop(),this.h=new Fe((function(){var e=t();e?n.g.push.apply(n.g,c(e)):(n.h.stop(),n.h=null)})),this.h.Ba(e))},To.prototype[Symbol.iterator]=function(){return this.wb(0)},To.prototype.wb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),i=-1;if(n&&0=a.startTime&&e=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0s):a=!1,a&&t.va.abort(),w(r)}))}(e,a).catch((function(t){e.C&&e.C.onError(t)}))):function(e,t){var n,i,r,a,o;_((function(s){switch(s.g){case 1:return n=di,x(s,2),T(s,zi(e.C.P,n.fa),4);case 4:S(s,3);break;case 2:i=E(s),e.C&&e.C.onError(i);case 3:r=wi(t.mimeType,t.codecs),Fi(e.C.P,r),a=e.C.P.m,(a.isTextVisible()||e.o.alwaysStreamText)&&(o=Fo(t),e.g.set(n.fa,o),qo(e,o,0)),w(s)}}))}(e,t)}function Bo(e,t){t.Nb||t.ob||(t.Ra?(t.ob=!0,t.sc=0):null==Hi(e.C.P,t.type)?null==t.La&&qo(e,t,0):(zo(t),Go(e,t,!1,0).catch((function(t){e.C&&e.C.onError(t)}))))}function Fo(e){return{stream:e,type:e.type,ba:null,Aa:null,Ac:null,qd:null,pd:null,od:null,mb:null,endOfStream:!1,Ra:!1,La:null,ob:!1,sc:0,Mc:!1,Nb:!1,Cd:!1,Ub:!1,va:null}}function Vo(e,t,n,i,r,a){var o;return _((function(s){return 1==s.g?(o=i.closedCaptions&&0=(a=n-r-i)?o.return():T(o,e.C.P.remove(t.type,r,r+a),2);Ni(e.J),w(o)}))}(e,t,n),2)):3!=s.g?(Ni(e.J),T(s,qi(e.C.P,t.type,a,r.startTime,r.endTime,o),3)):(Ni(e.J),void w(s))}))}function Ho(e){return e&&e.type==ci&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Ko(e,t,n,i){var r,a,o,s;return _((function(u){return 1==u.g?(r=ca,a=_o(n.ma(),n.ja,n.da,e.o.retryParameters,i),o=e.C.Bb.request(r,a),t.va=o,T(u,o.promise,2)):(s=u.h,t.va=null,u.return(s.data))}))}function Go(e,t,n,i){var r,a;return _((function(o){return 1==o.g?(t.ob=!1,t.Mc=!1,t.sc=0,t.Nb=!0,t.Aa=null,t.Ac=null,t.ba=null,i?(r=e.C.yc(),a=e.C.P.getDuration(),T(o,e.C.P.remove(t.type,r+i,a),3)):T(o,zi(e.C.P,t.type),4)):3!=o.g?(Ni(e.J),n?T(o,e.C.P.flush(t.type),3):o.v(3)):(Ni(e.J),t.Nb=!1,t.endOfStream=!1,qo(e,t,0),void w(o))}))}function qo(e,t,n){var i=t.type;(i!=ci||e.g.has(i))&&(t.La=new Be((function(){var n;return _((function(i){return 1==i.g?(x(i,2),T(i,e.Wb(t),4)):2!=i.g?S(i,0):(n=E(i),e.C&&e.C.onError(n),void w(i))}))})).T(n))}function zo(e){null!=e.La&&(e.La.stop(),e.La=null)}function Xo(e){return _((function(t){return e.va?T(t,e.va.abort(),0):t.v(0)}))}function Wo(e,t){return _((function(n){if(1==n.g)return T(n,zr(e.s),2);Ni(e.J),e.C.onError(t),t.handled||e.o.failureCallback(t),w(n)}))}function Yo(e,t){var n=iu(),i=this;this.j=t,this.i=e,this.l=n,this.s=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then((function(){return function(e){return _((function(t){if(e.J.g)t=t.v(0);else{if(0==e.m.length||e.g&&!e.g.gb)var n=!1;else{e.g&&(e.g.Ha.jb(),e.g=null);var i=(n=e.m.shift()).create(e.l);i?(n.Ha.Db(),e.g={node:i.node,payload:i.payload,gb:i.gb,Ha:n.Ha}):n.Ha.Ec(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return _((function(i){switch(i.g){case 1:return e.i=e.j.Ve(e.i,e.l,e.g.node,e.g.payload),x(i,2),e.h=e.j.Je(e.i,e.l,e.g.payload),T(i,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Ha.Cc(),e.g=null),S(i,0);break;case 2:return 7001==(t=E(i)).code?e.g.Ha.jb():e.g.Ha.onError(t),e.g=null,e.h=null,n=e,T(i,e.j.handleError(e.l,t),5);case 5:n.i=i.h,w(i)}}))}(e):(e.j.mf(e.i),e.s=new hi,n=e.s),t=T(t,n,1)}return t}))}(i)})),this.J=new Di((function(){return function(e){var t,n;return _((function(i){if(1==i.g)return e.h&&e.h.abort(),Jo(e),T(i,e.u,2);for(e.g&&e.g.Ha.jb(),t=l(e.m),n=t.next();!n.done;n=t.next())n.value.Ha.jb();e.g=null,e.m=[],e.j=null,w(i)}))}(i)}))}function $o(e,t){var n={Db:function(){},Cc:function(){},jb:function(){},onError:function(){},Ec:function(){},tg:function(){}};return e.m.push({create:t,Ha:n}),e.h&&e.h.abort(),Jo(e),n}function Jo(e){e.s&&(e.s.resolve(),e.s=null)}function Qo(e){this.g=null;for(var t=l(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function Zo(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function es(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=l(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function ts(){}function ns(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function is(t,n){var i=this;this.u=!1,this.j=[],this.g=t,this.m=n,this.i=document.createElement("div"),this.i.classList.add("shaka-text-container"),this.i.style.textAlign="center",this.i.style.display="flex",this.i.style.flexDirection="column",this.i.style.alignItems="center",this.i.style.justifyContent="flex-end",this.m.appendChild(this.i),this.D=new Fe((function(){rs(i)})).Ba(.25),this.l=new Map,this.h=new Li,this.h.B(document,"fullscreenchange",(function(){rs(i,!0)})),this.s=null,"ResizeObserver"in e&&(this.s=new ResizeObserver((function(){rs(i,!0)})),this.s.observe(this.i))}function rs(e,t){function n(t){return e.j.includes(t)&&e.u&&t.startTime<=i&&t.endTime>i}t=void 0!==t&&t;for(var i=e.g.currentTime,r=l(e.l.keys()),a=r.next();!a.done;a=r.next())if(!n(a=a.value)||t){var o=e.l.get(a);e.i.removeChild(o),e.l.delete(a)}for(r=new Set(e.l.values()),o=(a=l(Array.from(e.i.childNodes))).next();!o.done;o=a.next())o=o.value,r.has(o)||e.i.removeChild(o);for(a=(r=l(r=e.j.filter((function(t){return n(t)&&!e.l.has(t)})).sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})))).next();!a.done;a=r.next())a=a.value,o=as(e,e.i,a,!1),e.l.set(a,o)}function as(e,t,n,i){var r=i?"span":"div";(n.lineBreak||n.spacer)&&(n.spacer&&xe("shaka.extern.Cue","Please use lineBreak instead of spacer."),r="br");var a=document.createElement(r);if("br"!=r)for(function(e,t,n,i){var r=t.style,a=0==n.nestedCues.length;r.whiteSpace="pre-wrap";var o=n.payload.replace(/\s+$/g,(function(e){return" ".repeat(e.length)}));i?t.textContent=o:o.length&&((r=document.createElement("span")).textContent=o,t.appendChild(r),r=r.style),r.backgroundColor=n.backgroundColor,r.border=n.border,r.color=n.color,r.direction=n.direction,r.opacity=n.opacity,r.paddingLeft=os(n.linePadding,n,e.m),r.paddingRight=os(n.linePadding,n,e.m),n.backgroundImage&&(r.backgroundImage="url('"+n.backgroundImage+"')",r.backgroundRepeat="no-repeat",r.backgroundSize="contain",r.backgroundPosition="center",""==n.backgroundColor&&(r.backgroundColor="transparent")),r.verticalAlign="before"==n.displayAlign?"top":"center"==n.displayAlign?"middle":"bottom",a||(r.margin="0"),r.fontFamily=n.fontFamily,r.fontWeight=n.fontWeight.toString(),r.fontStyle=n.fontStyle,r.letterSpacing=n.letterSpacing,r.fontSize=os(n.fontSize,n,e.m),n.line?1==n.lineInterpretation&&(r.position="absolute",n.writingMode==Tt?n.lineAlign==xt?r.top=n.line+"%":"end"==n.lineAlign&&(r.bottom=n.line+"%"):"vertical-lr"==n.writingMode?n.lineAlign==xt?r.left=n.line+"%":"end"==n.lineAlign&&(r.right=n.line+"%"):n.lineAlign==xt?r.right=n.line+"%":"end"==n.lineAlign&&(r.left=n.line+"%")):n.region&&n.region.id&&(!i&&!a||n.backgroundImage)&&(e=n.region.widthUnits==Rt?"%":"px",t=n.region.viewportAnchorUnits==Rt?"%":"px",r.height=n.region.height+(n.region.heightUnits==Rt?"%":"px"),r.width=n.region.width+e,r.position="absolute",r.top=n.region.viewportAnchorY+t,r.left=n.region.viewportAnchorX+t),r.lineHeight=n.lineHeight,n.position&&(n.writingMode==Tt?r.paddingLeft=n.position:r.paddingTop=n.position),"line-left"==n.positionAlign?r.cssFloat="left":"line-right"==n.positionAlign&&(r.cssFloat="right"),r.textAlign=n.textAlign,r.textDecoration=n.textDecoration.join(" "),r.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&r.writingMode==n.writingMode||(r.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==Tt?r.width=n.size+"%":r.height=n.size+"%")}(e,a,n,i),i=(n=l(n.nestedCues)).next();!i.done;i=n.next())as(e,a,i.value,!0);return t.appendChild(a),a}function os(e,t,n){var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),Jf:i[2]}:null;if(!i)return e;var r=i.value;switch(i.Jf){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return e}}function ss(){}function us(e,t,n,i,r){var a,o=r in i,s=!0;for(a in t){var u=r+"."+a,l=o?i[r]:n[a];o||a in n?void 0===t[a]?void 0===l||o?delete e[a]:e[a]=ta(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=ta(l)),u=us(e[a],t[a],l,i,u),s=s&&u):typeof t[a]!=typeof l||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=l.constructor?(z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&X("Unexpected number of arguments for "+u),e[a]=t[a]):(z("Invalid config, unrecognized key "+u),s=!1)}return s}function ls(e,t){for(var n={},i=n,r=0,a=0;!(0>(r=e.indexOf(".",r)));)0!=r&&"\\"==e[r-1]||(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function cs(){}function ds(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Na,logLicenseExchange:!1,updateExpirationTime:1},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1};(navigator.userAgent.match(/Edge\//)||Ge()||qe())&&(i.gapDetectionThreshold=.5),(We("Web0S")||Ge()||qe())&&(i.stallSkip=0);var r={trackSelectionCallback:function(e){return _((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return _((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?T(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:t,manifest:n,streaming:i,offline:r,abrFactory:function(){return new Nr},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};return r.trackSelectionCallback=function(e){return _((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),i=[],r=or(t,n.map((function(e){return e.language})));r&&(i=n.filter((function(e){return ir(e.language)==r}))),0==i.length&&(i=n.filter((function(e){return e.primary}))),0==i.length&&(n.map((function(e){return e.language})),i=n);var a=i.filter((function(e){return e.height&&480>=e.height}));if(a.length&&(a.sort((function(e,t){return t.height-e.height})),i=a.filter((function(e){return e.height==a[0].height}))),n=[],i.length){var o=Math.floor(i.length/2);i.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(i[o])}for(i=l(e),o=i.next();!o.done;o=i.next())(o=o.value).type!=ci&&"image"!=o.type||n.push(o);return n}(e,a.preferredAudioLanguage))}))},a}function fs(e,t,n){var i={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return us(e,t,n||ds(),i,"")}function hs(){this.g=null,this.h=[]}function ps(e,t){if(null==e.g)e.g={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function gs(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=l(e.h),r=i.next();!r.done;r=i.next())n+=(r=r.value).state==t?r.duration:0;return n}function ms(){this.i=this.h=null,this.g=[]}function vs(e,t,n){e.h!=t&&(e.h=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth}))}function ys(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function bs(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.N=this.S=this.D=this.X=NaN,this.h=new hs,this.g=new ms}function Ts(t,n){ea.call(this);var i=this;this.l=Ru,this.kc=this.g=null,this.X=!1,this.h=new Li,this.Zc=this.u=this.Va=this.A=this.pc=this.s=this.i=this.cc=this.H=this.lc=this.F=this.Fa=this.D=this.I=this.m=this.O=null,this.gd=1e9,this.o=Ms(this),this.fd={width:1/0,height:1/0},this.j=null,this.oa=new Fr(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount),this.pa=this.o.preferredTextLanguage,this.Wa=this.o.preferredTextRole,this.mc=this.o.preferForcedSubs,this.$c=[],n&&n(this),this.O=function(e){return new aa((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}))}(this),this.O.Jd(this.o.streaming.forceHTTPS),this.L=null,ju&&(this.L=Me(ju)),this.h.B(e,"online",(function(){i.Dd()})),this.ra={name:"detach"},this.Oa={name:"attach"},this.S={name:"unload"},this.kd={name:"manifest-parser"},this.ed={name:"manifest"},this.Ea={name:"media-source"},this.cd={name:"drm-engine"},this.N={name:"load"},this.ld={name:"src-equals-drm-engine"},this.Ma={name:"src-equals"};var r=new Map;r.set(this.Oa,(function(e,t){return Jr(function(e,t,n){return null==t.G&&(t.G=n.G,e.h.B(t.G,"error",(function(){var t=zs(e);t&&Gs(e,t)}))),e.g=t.G,Promise.resolve()}(i,e,t))})),r.set(this.ra,(function(e){return e.G&&(i.h.Ca(e.G,"error"),e.G=null),i.g=null,Jr(e=Promise.resolve())})),r.set(this.S,(function(e){return Jr(xs(i,e))})),r.set(this.Ea,(function(e){return Jr(e=function(e,t){var n,i,r,a;return _((function(o){if(1==o.g)return n=new Fn,i=e.o.textDisplayFactory,r=Me(i),e.dd=i,T(o,(a=function(e,t,n,i){return new Ui(e,t,n,i)}(t.G,n,r,(function(t,n,i){for(var r=(t=l(t)).next();!r.done;r=t.next())if((r=r.value).data&&r.cueTime&&r.frames){for(var a=r.cueTime+n,o=i,s=l(r.frames),u=s.next();!u.done;u=s.next())ks(e,a,o,"ID3",u.value);e.L&&e.L.onHlsTimedMetadata(r,a)}}))).F,2);e.I=a,w(o)}))}(i,e))})),r.set(this.kd,(function(e,t){return Jr(function(e,t,n){var i,r,a,o;return _((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,r=e.O,e.Va=i,a=e,T(s,za(i,r,e.o.manifest.retryParameters,t.mimeType),2);a.pc=s.h,e.s=Me(e.pc),o=ta(e.o.manifest),n.G&&"AUDIO"===n.G.nodeName&&(o.disableVideo=!0),e.s.configure(o),w(s)}))}(i,e,t))})),r.set(this.ed,(function(e){return function(e,t){var n=t.uri,i=e.O;e.cc=new Co((function(){return e.Fd()})),function(e,t){e.h=t}(e.cc,(function(t){qs(e,xu,t),e.L&&e.L.onDashTimedMetadata(t)}));var r={networkingEngine:i,filter:function(t){return _((function(n){return n.return(e.uc(t))}))},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=l(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(i=l(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions)for(var a=l(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new ko;s={id:e.gd++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:r.closedCaptions.get(o),label:null,type:ci,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(t){var n=e.cc;e:{for(var i=l(n.g),r=i.next();!r.done;r=i.next())if((r=r.value).schemeIdUri==t.schemeIdUri&&r.id==t.id&&r.startTime==t.startTime&&r.endTime==t.endTime){i=r;break e}i=null}null==i&&(n.g.add(t),n.h(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Gs(e,t)},isLowLatencyMode:function(){return e.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)}},a=Date.now()/1e3;return new Xr(function(){var t,i,o,s;return _((function(u){if(1==u.g)return t=e,T(u,e.s.start(n,r),2);if(t.A=u.h,i=ws(pu),e.dispatchEvent(i),0==e.A.variants.length)throw new le(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.A),o=Date.now()/1e3,s=o-a,e.j.H=s,w(u)}))}(),(function(){return e.s.stop()}))}(i,e)})),r.set(this.cd,(function(e){return Jr(e=function(e,t){var n,i;return _((function(r){return 1==r.g?(n=Date.now()/1e3,i=!0,e.m=Ss(e,{Bb:e.O,onError:function(t){Gs(e,t)},Dc:function(t){Xs(e,t)},onExpirationUpdated:function(t,n){Ws(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==uu&&i&&(i=!1,e.j.j=Date.now()/1e3-n)}}),e.o.useMediaCapabilities||pr(e.A),e.m.configure(e.o.drm),T(r,Ta(e.m,e.A.variants,e.A.offlineSessionIds,e.o.useMediaCapabilities),2)):3!=r.g?T(r,e.m.Mb(t.G),3):T(r,e.uc(e.A),0)}))}(i,e))})),r.set(this.N,(function(e,t){return Jr(function(e,t,n){var i,r,a,o,s,u,c,d,f,h;return _((function(p){switch(p.g){case 1:if(t.startTime=n.startTime,i=t.G,r=t.uri,e.Va=r,e.F=new So({zc:function(){return t.G.playbackRate},wc:function(){return t.G.defaultPlaybackRate},Ld:function(e){t.G.playbackRate=e},fe:function(e){t.G.currentTime+=e}}),a=function(){return _s(e)},o=function(){return Ns(e)},e.h.B(i,"playing",a),e.h.B(i,"pause",a),e.h.B(i,"ended",a),e.h.B(i,"ratechange",o),s=e.o.abrFactory,e.u&&e.Zc==s||(e.Zc=s,e.u=Me(s),"function"!=typeof e.u.playbackRateChanged&&(xe("AbrManager","Please use an AbrManager with playbackRateChanged function."),e.u.playbackRateChanged=function(){}),e.u.configure(e.o.abr)),e.oa=new Fr(e.o.preferredAudioLanguage,e.o.preferredVariantRole,e.o.preferredAudioChannelCount),e.pa=e.o.preferredTextLanguage,e.Wa=e.o.preferredTextRole,Ys(e.A.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd),e.u.init((function(t,n,i){n=void 0!==n&&n,i=void 0===i?0:i,e.i&&t!=e.i.h&&(vs(e.j.g,t,!0),jo(e.i,t,n,i),Us(e))})),e.D=function(e,t){return new mo(e.g,e.A,e.o.streaming,t,(function(){if(e.Fa&&Io(e.Fa,!0),e.i)for(var t=e.i,n=t.C.yc(),i=t.o.smallGapLimit,r=l(t.g.keys()),a=r.next();!a.done;a=r.next()){a=a.value;var o=t.g.get(a);o.ba=null;var s=t.C.P;if(a==ci?s=null!=(s=s.i).g&&null!=s.h&&(n>=s.g&&n, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),r.resolve()),e.h.ua(e.g,"error",(function(){r.reject(zs(e))})),new Xr(r,(function(){return r.reject(new le(2,7,7001)),Promise.resolve()}))}(i,e,t)})),this.ca=new Yo(this.ra,{Ve:function(e,t,n,r){var a=null;return e==i.ra&&(a=n==i.ra?i.ra:i.Oa),e==i.Oa&&(a=n==i.ra||t.G!=r.G?i.ra:n==i.Oa?i.Oa:n==i.Ea||n==i.N?i.Ea:n==i.Ma?i.ld:null),e==i.Ea&&(a=n==i.N&&t.G==r.G?i.kd:i.S),e==i.kd&&(a=nu(i.N,i.ed,i.S,n,t,r)),e==i.ed&&(a=nu(i.N,i.cd,i.S,n,t,r)),e==i.cd&&(a=nu(i.N,i.N,i.S,n,t,r)),e==i.ld&&(a=n==i.Ma&&t.G==r.G?i.Ma:i.S),e!=i.N&&e!=i.Ma||(a=i.S),e==i.S&&(a=r.G&&t.G==r.G?i.Oa:i.ra),a},Je:function(e,t,n){return i.dispatchEvent(ws(mu,{state:e.name})),r.get(e)(t,n)},handleError:function(e){return _((function(t){return 1==t.g?T(t,xs(i,e),2):t.return(e.G?i.Oa:i.ra)}))},mf:function(e){i.dispatchEvent(ws(vu,{state:e.name}))}}),t&&this.Mb(t,!0)}function ws(e,t){return new Zr(e,t)}function xs(e,t){var n,i,r,a,o,s,u,c,d;return _((function(f){switch(f.g){case 1:return e.l!=Mu&&(e.l=Ru),n=e.$c.map((function(e){return e()})),e.$c=[],T(f,Promise.all(n),2);case 2:if(e.dispatchEvent(ws(Au)),t.mimeType=null,t.startTime=null,t.uri=null,t.G&&(e.h.Ca(t.G,"loadedmetadata"),e.h.Ca(t.G,"playing"),e.h.Ca(t.G,"pause"),e.h.Ca(t.G,"ended"),e.h.Ca(t.G,"ratechange")),e.Fa&&(e.Fa.release(),e.Fa=null),e.lc&&(e.lc.stop(),e.lc=null),!e.s){f.v(3);break}return T(f,e.s.stop(),4);case 4:e.s=null,e.pc=null;case 3:if(!e.u){f.v(5);break}return T(f,e.u.stop(),5);case 5:if(!e.i){f.v(7);break}return T(f,e.i.destroy(),8);case 8:e.i=null;case 7:if(e.F&&(e.F.release(),e.F=null),e.D&&(e.D.release(),e.D=null),!e.I){f.v(9);break}return T(f,e.I.destroy(),10);case 10:e.I=null;case 9:if(e.L&&e.L.onAssetUnload(),!t.G||!t.G.src){f.v(11);break}return T(f,new Promise((function(e){return new Fe(e).T(.1)})),12);case 12:for(t.G.removeAttribute("src"),t.G.load();t.G.lastChild;)t.G.removeChild(t.G.firstChild);case 11:if(!e.m){f.v(13);break}return T(f,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.Va=null,e.H=null,e.A){for(i=l(e.A.variants),r=i.next();!r.done;r=i.next())for(a=r.value,o=l([a.audio,a.video]),s=o.next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=l(e.A.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}e.A=null,e.j=new bs,e.dd=null,Ds(e),w(f)}}))}function ks(e,t,n,i,r){e.dispatchEvent(ws(gu,{startTime:t,endTime:n,pg:i,payload:r}))}function Ss(e,t){return new ba(t,e.o.drm.updateExpirationTime)}function Es(e,t){e.H=new Vr,e.H.g=Kr,Hr(e.H,t,Math.min(.5,t/2)),Ds(e),e.lc=new Fe((function(){As(e)})).Ba(.25)}function As(e){switch(e.l){case Nu:if(e.g.ended)var t=!0;else{var n=Hn(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case Du:e:if(e.g.ended||Vi(e.I))t=!0;else{if(e.A.presentationTimeline.Y()){n=e.A.presentationTimeline.fb();var i=Hn(e.g.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=Gn(e.g.buffered,e.g.currentTime);var r=t,a=(n=e.H).h.get(n.g);t=n.g,i=r||i>=a?Gr:Kr,n.g=i,t!=i&&Ds(e)}function Is(e){if(e.s){var t=ta(e.o.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.m&&e.m.configure(e.o.drm),e.i){e.i.configure(e.o.streaming);try{Rs(e,e.A)}catch(t){Gs(e,t)}e.u&&Ps(e),!(t=e.i.h)||t.allowedByApplication&&t.allowedByKeySystem||Ls(e)}if(e.O&&e.O.Jd(e.o.streaming.forceHTTPS),e.I&&(t=e.o.textDisplayFactory,e.dd!=t)){var n=Me(t),i=e.I,r=i.m;i.m=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.i&&(i.i.i=n),e.dd=t,e.i&&((n=(t=e.i).g.get(ci))&&Uo(t,n.stream,!0,0,!0))}e.u&&(e.u.configure(e.o.abr),e.o.abr.enabled?e.u.enable():e.u.disable(),Ks(e)),e.H&&(t=e.o.streaming.rebufferingGoal,e.A&&(t=Math.max(t,e.A.minBufferTime)),Hr(e.H,t,Math.min(.5,t/2))),e.A&&Ys(e.A.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd)}function Cs(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function Ms(e){var t=ds();return t.streaming.failureCallback=function(t){e.Y()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.Dd())},t.textDisplayFactory=function(){return e.kc?new is(e.g,e.kc):new Qo(e.g)},t}function Rs(e,t){if(e.l!=Mu){for(var n=e.o.restrictions,i=e.fd,r=!1,a=l(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=cr(o,n,i),s!=o.allowedByApplication&&(r=!0)}if(r&&e.i&&Bs(e),(n=e.m?e.m.i:null)&&e.m.m)for(r=(i=l(t.variants)).next();!r.done;r=i.next())for(a=(r=l(((r=r.value).video?r.video.drmInfos:[]).concat(r.audio?r.audio.drmInfos:[]))).next();!a.done;a=r.next())if((a=a.value).keySystem==n.keySystem)for(o=(a=l(a.initData||[])).next();!o.done;o=a.next())o=o.value,Sa(e.m,o.initDataType,o.initData);$s(e,t)}}function Ds(e){var t=e.md();if(e.j&&e.H&&e.D){var n=e.F;n.j=t,Eo(n),_s(e)}e.dispatchEvent(ws(su,{buffering:t}))}function Ns(e){var t=e.g.playbackRate;0!=t&&(e.F&&e.F.set(t),t=ws(yu),e.dispatchEvent(t))}function _s(e){if(e.j&&e.H){var t=e.j.h;e.H.g==Kr?ps(t,"buffering"):e.g.paused?ps(t,"paused"):e.g.ended?ps(t,"ended"):ps(t,"playing")}}function Ps(e){try{$s(e,e.A)}catch(t){return Gs(e,t),!1}var t=e.A.variants.filter((function(e){return Er(e)}));return t=e.oa.create(t),e.u.setVariants(Array.from(t.values())),!0}function Ls(e){var t;(t=Ps(e)?e.u.chooseVariant():null)&&(js(e,t,!0,!0,0),Us(e))}function js(e,t,n,i,r){var a=e.i.h;t!=a&&(vs(e.j.g,t,n),jo(e.i,t,i,r),n=null,a&&(n=br(a)),Fs(e,n,t=br(t)))}function Os(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,Fs(e,n=kr(n),kr(t))}function Us(e){Qs(e,ws(ou))}function Bs(e){Qs(e,ws(Eu))}function Fs(e,t,n){Qs(e,t=ws(Iu,{sg:t,rg:n}))}function Vs(e){Qs(e,ws(Tu))}function Hs(e){Qs(e,ws(wu))}function Ks(e){Qs(e,ws(au,{qg:e.o.abr.enabled}))}function Gs(e,t){if(e.l!=Mu){var n=ws(cu,{detail:t});e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function qs(e,t,n){e.dispatchEvent(ws(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function zs(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new le(2,3,3016,t,n,e.g.error.message)}function Xs(e,t){if(e.i){var n=Object.keys(t),i=1==n.length&&"00"==n[0],r=!1;if(n.length)for(var a=(n=l(e.A.variants)).next();!a.done;a=n.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=s.value;if(s=a.allowedByKeySystem,u.keyIds.size){a.allowedByKeySystem=!0;for(var c=(u=l(u.keyIds)).next();!c.done;c=u.next())c=c.value,c=t[i?"00":c],a.allowedByKeySystem=a.allowedByKeySystem&&!!c&&!Pu.includes(c)}s!=a.allowedByKeySystem&&(r=!0)}}r&&Ps(e),(i=e.i.h)&&!i.allowedByKeySystem&&Ls(e),r&&Bs(e)}}function Ws(e,t,n){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,n),t=ws(du),e.dispatchEvent(t)}function Ys(e,t,n){0h?e.C.P.Ja(h):e.C.P.Ja(Math.pow(2,32)),o=l(n.keys()),s=o.next();!s.done;s=o.next())u=s.value,c=n.get(u),e.g.has(u)||(d=Fo(c),e.g.set(u,d),qo(e,d,0));w(f)}))}(e),2);Ni(e.J),e.m=!0,w(t)}))},Po.prototype.Wb=function(t){var n,i,r,a,o,s=this;return _((function(u){switch(u.g){case 1:if(Ni(s.J),t.Ra||null==t.La||t.Nb)return u.return();if(t.La=null,!t.ob){u.v(2);break}return T(u,Go(s,t,t.Mc,t.sc),3);case 3:return u.return();case 2:if(t.stream.segmentIndex){u.v(4);break}return n=t.stream,T(u,t.stream.createSegmentIndex(),5);case 5:if(n!=t.stream)return null==t.La&&qo(s,t,0),u.return();case 4:x(u,6),null!=(i=function(t,n){if(Ho(n))return function(e,t){var n=Ki(e,"video")||0;Ci(e.i,t,n)}(t.C.P,n.stream.originalId||""),null;n.type==ci&&function(e){e.i&&Ci(e.i,"",0)}(t.C.P);var i=t.C.yc(),r=n.Aa?n.Aa.endTime:i,a=function(e,t,n){return t==ci?null==(e=e.i).h||e.h=t.A.presentationTimeline.getDuration())return n.endOfStream=!0,"video"==n.type&&(i=t.g.get(ci))&&Ho(i)&&(i.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return.5;if(a=Ki(t.C.P,n.type),!(a=function(e,t,n,i){if(t.ba)return t.ba.current();if(t.Aa||i)return t.ba=t.stream.segmentIndex.wb(t.Aa?t.Aa.endTime:i),t.ba&&t.ba.next().value;e=e.o.inaccurateManifestTolerance,i=Math.max(n-e,0);var r=null;return e&&(t.ba=t.stream.segmentIndex.wb(i),r=t.ba&&t.ba.next().value),r||(t.ba=t.stream.segmentIndex.wb(n),r=t.ba&&t.ba.next().value),r}(t,n,i,a)))return 1;o=1/0;for(var s=Array.from(t.g.values()),u=(s=l(s)).next();!u.done;u=s.next())Ho(u=u.value)||u.ba&&!u.ba.current()||(o=Math.min(o,u.Aa?u.Aa.endTime:i));return r>=o+t.A.presentationTimeline.g?1:(function(t,n,i,r){var a,o,s,u,l,c,d,f,h,p,g,m,v;return _((function(y){switch(y.g){case 1:return a=di,o=n.stream,s=n.ba,n.Ra=!0,u=function(e,t,n){var i,r,a,o,s,u,l;return _((function(c){return i=[],r=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.qd&&r==t.pd&&a==t.od||(s=function(){var n;return _((function(i){if(1==i.g)return x(i,2),t.pd=r,t.od=a,t.qd=o,T(i,function(e,t,n,i,r){return _((function(a){return t==di.fa?(e.i.D=n,function(e,t,n){e.j=t,e.l=n}(e.i,i,r),a.return()):T(a,Promise.all([Wi(e,t,(function(){var n=e.j[t].appendWindowStart,i=e.j[t].appendWindowEnd;e.j[t].abort(),e.j[t].appendWindowStart=n,e.j[t].appendWindowEnd=i,Xi(e,t)})),Wi(e,t,(function(){var i=n;0>i&&(i+=.001),e.j[t].timestampOffset=i,Xi(e,t)})),Wi(e,t,(function(){e.j[t].appendWindowStart=0,e.j[t].appendWindowEnd=r,e.j[t].appendWindowStart=i,Xi(e,t)}))]),0)}))}(e.C.P,t.type,o,r,a),4);if(2!=i.g)return S(i,0);throw n=E(i),t.pd=null,t.od=null,t.qd=null,n}))},i.push(s())),!function(e,t){return e&&t?e.Tb()==t.Tb()&&e.Pb()==t.Pb()&&dt(e.ma(),t.ma()):e==t}(n.h,t.Ac)&&(t.Ac=n.h)&&(u=Ko(e,t,n.h),l=function(){var n,i,r;return _((function(a){switch(a.g){case 1:return x(a,2),T(a,u,4);case 4:return n=a.h,Ni(e.J),i=t.stream.closedCaptions&&0e})),!0)},i.append=function(e){function t(e){var n=[],i=700<=e.fontWeight,r="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return i&&n.push("b"),r&&n.push("i"),a&&n.push("u"),i=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+""}),""),e.lineBreak||e.spacer?(e.spacer&&xe("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):i+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e})),i=[];e=this.g.cues?Array.from(this.g.cues):[];for(var r={},a=(n=l(n)).next();!a.done;r={rb:r.rb},a=n.next())r.rb=a.value,e.some(function(e){return function(t){return t.startTime==e.rb.startTime&&t.endTime==e.rb.endTime&&t.text==e.rb.payload}}(r))||(a=Zo(r.rb))&&i.push(a);for(r=(e=l(e=i.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?i.indexOf(t)-i.indexOf(e):i.indexOf(e)-i.indexOf(t)})))).next();!r.done;r=e.next())this.g.addCue(r.value)},i.destroy=function(){return this.g&&(es(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},i.isTextVisible=function(){return"showing"==this.g.mode},i.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},F("shaka.text.SimpleTextDisplayer",Qo),Qo.prototype.setTextVisibility=Qo.prototype.setTextVisibility,Qo.prototype.isTextVisible=Qo.prototype.isTextVisible,Qo.prototype.destroy=Qo.prototype.destroy,Qo.prototype.append=Qo.prototype.append,Qo.prototype.remove=Qo.prototype.remove,F("shaka.util.Dom",ts),ts.removeAllChildren=ns,(i=is.prototype).append=function(e){for(var t=[].concat(c(this.j)),n={},i=(e=l(e)).next();!i.done;n={dc:n.dc},i=e.next())n.dc=i.value,t.some(function(e){return function(t){return ht(t,e.dc)}}(n))||this.j.push(n.dc);rs(this)},i.destroy=function(){this.m.removeChild(this.i),this.i=null,this.u=!1,this.j=[],this.D&&this.D.stop(),this.l.clear(),this.h&&(this.h.release(),this.h=null),this.s&&(this.s.disconnect(),this.s=null)},i.remove=function(e,t){return!!this.i&&(this.j=this.j.filter((function(n){return n.startTime=t})),rs(this),!0)},i.isTextVisible=function(){return this.u},i.setTextVisibility=function(e){this.u=e},F("shaka.text.UITextDisplayer",is),is.prototype.setTextVisibility=is.prototype.setTextVisibility,is.prototype.isTextVisible=is.prototype.isTextVisible,is.prototype.remove=is.prototype.remove,is.prototype.destroy=is.prototype.destroy,is.prototype.append=is.prototype.append,F("shaka.text.WebVttGenerator",(function(){})),F("shaka.util.ConfigUtils",ss),ss.convertToConfigObject=ls,ss.mergeConfigObjects=us,F("shaka.util.PlayerConfiguration",cs),cs.mergeConfigObjects=fs,m(Ts,ea),(i=Ts.prototype).destroy=function(){var e,t=this;return _((function(n){switch(n.g){case 1:return t.l==Mu?n.return():(t.l=Mu,e=$o(t.ca,(function(){return{node:t.ra,payload:iu(),gb:!1}})),T(n,new Promise((function(t){e.Db=function(){},e.Cc=function(){t()},e.jb=function(){t()},e.onError=function(){t()},e.Ec=function(){t()}})),2));case 2:return T(n,t.ca.destroy(),3);case 3:if(t.h&&(t.h.release(),t.h=null),t.Zc=null,t.u=null,t.o=null,t.j=null,t.kc=null,!t.O){n.v(0);break}return T(n,t.O.destroy(),5);case 5:t.O=null,w(n)}}))},i.Mb=function(e,t){if(t=void 0===t||t,this.l==Mu)return Promise.reject(tu());var n=iu();n.G=e,Ve()||(t=!1);var i=t?this.Ea:this.Oa,r=$o(this.ca,(function(){return{node:i,payload:n,gb:!1}}));return r.Db=function(){},ru(r)},i.detach=function(){var e=this;if(this.l==Mu)return Promise.reject(tu());var t=$o(this.ca,(function(){return{node:e.ra,payload:iu(),gb:!1}}));return t.Db=function(){},ru(t)},i.Pd=function(e){var t=this;if(e=void 0===e||e,this.l==Mu)return Promise.reject(tu());Ve()||(e=!1);var n=iu(),i=$o(this.ca,(function(i){var r=i.G&&e?t.Ea:i.G?t.Oa:t.ra;return n.G=i.G,{node:r,payload:n,gb:!1}}));return i.Db=function(){},ru(i)},i.load=function(e,t,n){var i=this;if(this.l==Mu)return Promise.reject(tu());this.dispatchEvent(ws(hu));var r=iu();r.uri=e,r.Nd=Date.now()/1e3,n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var a=function(e,t){if(!Ve())return!0;var n=t.mimeType,i=t.uri||"";if(n||(n={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Wa(i)]),n){if(""==(t.G||Ye()).canPlayType(n))return!1;if(!Ve()||!(n in Ya)&&!(Wa(i)in $a)||e.o.streaming.preferNativeHls)return!0;if(ze())return e.o.streaming.useNativeHlsOnSafari}return!1}(this,r)?this.Ma:this.N,o=$o(this.ca,(function(e){return null==e.G?null:(r.G=e.G,{node:a,payload:r,gb:!0})}));return this.j=new bs,o.Db=function(){},new Promise((function(e,t){o.Ec=function(){return t(new le(2,7,7002))},o.Cc=function(){e(),i.dispatchEvent(ws(fu))},o.jb=function(){return t(tu())},o.onError=function(e){return t(e)}}))},i.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=ls(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(xe("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01));var n=fs(this.o,e,Ms(this));return Is(this),n},i.getConfiguration=function(){var e=Ms(this);return fs(e,this.o,Ms(this)),e},i.zf=function(){for(var e in this.o)delete this.o[e];fs(this.o,Ms(this),Ms(this)),Is(this)},i.Qe=function(){return this.l},i.Ue=function(){return this.g},i.Rb=function(){return this.O},i.hd=function(){return this.Va},i.Yd=function(){return this.L?this.L:null},i.Y=function(){return this.A?this.A.presentationTimeline.Y():!(!this.g||!this.g.src)&&1/0==this.g.duration},i.ib=function(){return!!this.A&&this.A.presentationTimeline.ib()},i.gf=function(){if(this.A){var e=this.A.variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},i.Fd=function(){if(this.A){var e=this.A.presentationTimeline;return{start:e.xb(),end:e.Qa()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},i.keySystem=function(){return Ea(this.drmInfo())},i.drmInfo=function(){return this.m?this.m.i:null},i.Qb=function(){return this.m?this.m.Qb():1/0},i.xc=function(){return this.m?this.m.xc():{}},i.md=function(){return!!this.H&&this.H.g==Kr},i.We=function(){return this.g?this.F?this.F.i:1:0},i.If=function(e){0==e?X("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(e),this.l==Du&&(this.u.playbackRateChanged(e),Lo(this.i,1n(o,i))&&(a=o);if(a)return n=br(a),void this.ne(n,!0)}Ls(this)}else if(this.g&&this.g.audioTracks){for(r=Array.from(this.g.audioTracks),n=ir(e),a=i=null,o=(r=l(r)).next();!o.done;o=r.next()){var s=kr(o=o.value);ir(s.language)==n&&(i=o,t?s.roles.includes(t)&&(a=o):0==s.roles.length&&(a=o))}a?Os(this,a):i&&Os(this,i)}},i.Hd=function(e,t,n){if(n=void 0!==n&&n,this.A&&this.D)this.pa=e,this.Wa=t||"",this.mc=n,(e=Ir(this.A.textStreams,this.pa,this.Wa,this.mc)[0]||null)&&e!=this.i.i&&(ys(this.j.g,e,!1),this.o.streaming.alwaysStreamText||this.nd())&&(Oo(this.i,e),Vs(this));else{var i=ir(e);(e=this.yb().find((function(e){return ir(e.language)==i&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.me(e)}},i.Af=function(e){if(this.A&&this.D){for(var t=null,n=l(this.A.variants),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){t=i;break}null!=t&&(this.oa=new Fr(t.language,"",0,e),Ls(this))}},i.nd=function(){var e=this.X;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Cs(this).some((function(e){return"showing"==e.mode})):e},i.Gf=function(e){if(e=!!e,this.X!=e){if(this.X=e,this.l==Du)this.I.m.setTextVisibility(e),this.o.streaming.alwaysStreamText||(e?this.i.i||0<(e=Ir(this.A.textStreams,this.pa,this.Wa,this.mc)).length&&(Oo(this.i,e[0]),Vs(this)):function(e){var t=e.g.get(ci);t&&(zo(t),Xo(t).catch((function(){})),e.g.delete(ci)),e.i=null}(this.i));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=Cs(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");Hs(this)}},i.Ye=function(){if(!this.Y())return null;var e=this.ca.l,t=0;if(this.D)t=this.D.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.A?new Date(1e3*(this.A.presentationTimeline.j+t)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:new Date(e.getTime()+1e3*t)):null},i.Zd=function(){if(!this.Y())return null;if(this.A)return new Date(1e3*this.A.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},i.vc=function(){if(this.l==Du)return this.I.vc();var e={total:[],audio:[],video:[],text:[]};return this.l==Nu&&(e.total=qn(this.g.buffered)),e},i.getStats=function(){if(this.l!=Du&&this.l!=Nu)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};_s(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.j;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}e.getVideoPlaybackQuality&&(e=e.getVideoPlaybackQuality(),n=this.j,t=Number(e.totalVideoFrames),n.S=Number(e.droppedVideoFrames),n.N=t,this.j.L=Number(e.corruptedVideoFrames)),this.m?e=(e=this.m).H?e.H:NaN:e=NaN,this.j.m=e,this.l==Du&&((e=this.i.h)&&(this.j.u=(this.F?this.F.i:1)*e.bandwidth),e&&e.video&&(n=this.j,t=e.video.height||NaN,n.X=e.video.width||NaN,n.D=t),this.Y()&&(e=this.Zd().valueOf()+1e3*this.Fd().end,this.j.F=(Date.now()-e)/1e3),this.A&&this.A.presentationTimeline&&(this.j.I=this.A.presentationTimeline.g),e=this.u.getBandwidthEstimate(),this.j.s=e);var i=this.j;e=i.X,n=i.D,t=i.u;for(var r=i.N,a=i.S,o=i.L,s=i.s,u=i.i,c=i.l,d=i.H,f=i.j,h=gs(i.h,"playing"),p=gs(i.h,"paused"),g=gs(i.h,"buffering"),m=i.m,v=i.F,y=i.I,b=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=l(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(i.h),T=[],w=(i=l(i.g.g)).next();!w.done;w=i.next())w=w.value,T.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,completionPercent:u,loadLatency:c,manifestTimeSeconds:d,drmTimeSeconds:f,playTime:h,pauseTime:p,bufferingTime:g,licenseTime:m,liveLatency:v,maxSegmentDuration:y,stateHistory:b,switchHistory:T}},i.addTextTrack=function(e,t,n,i,r,a,o){if(o=void 0!==o&&o,xe("addTextTrack","Please use an addTextTrackAsync."),this.l!=Du&&this.l!=Nu)throw new le(1,7,7004);if(!i){var s=Wa(e);if(!(i={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[s]))throw new le(1,2,2011,s)}if(this.l==Nu){if("text/vtt"!=i)throw new le(1,2,2013,i);if(o&&(n="forced"),(i=document.createElement("track")).src=e,i.label=a||"",i.kind=n,i.srclang=t,this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous"),this.g.appendChild(i),e=this.yb().find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return Bs(this),e;throw new le(1,2,2012)}if(1/0==(s=this.A.presentationTimeline.getDuration()))throw new le(1,4,4033);if(!Ii(wi((e={id:this.gd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:wo(0,s,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:ci,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}).mimeType,e.codecs)))throw new le(2,2,2014,i);return this.A.textStreams.push(e),Bs(this),Tr(e)},i.ye=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,c,d,f,h,p,g,m,v,y,b=this;return _((function(w){switch(w.g){case 1:if(b.l!=Du&&b.l!=Nu)throw new le(1,7,7004);if(i){w.v(2);break}if(s=Wa(e),i={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[s]){w.v(3);break}return x(w,4),T(w,Xa(e,b.O,b.o.streaming.retryParameters),6);case 6:i=w.h,S(w,3);break;case 4:E(w);case 3:if(!i)throw new le(1,2,2011,s);case 2:if(b.l!=Nu){w.v(7);break}if("text/vtt"==i){w.v(8);break}return T(w,function(e,t,n){var i,r,a;return _((function(o){return 1==o.g?(i=ca,(r=sa([e],n)).method="GET",T(o,t.request(i,r).promise,2)):(a=o.h,o.return(a.data))}))}(e,b.O,b.o.streaming.retryParameters),9);case 9:u=w.h,c=function(e,t,n){var i=Ri[n];if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration},t=oe(t),function(e){function t(e){var n=[],i=700<=e.fontWeight,r="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return i&&n.push("b"),r&&n.push("i"),a&&n.push("u"),i=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+""}),""),e.lineBreak||e.spacer?(e.spacer&&xe("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):i+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e}));e="WEBVTT\n\n";for(var i=(n=l(n)).next();!i.done;i=n.next()){var r=function(e){var t=Math.floor(e/3600),n=Math.floor(e/60%60),i=Math.floor(e%60);return(10>t?"0":"")+t+":"+(10>n?"0":"")+n+":"+(10>i?"0":"")+i+"."+(100>(e=Math.floor(1e3*e%1e3))?10>e?"00":"0":"")+e};e+=r((i=i.value).startTime)+" --\x3e "+r(i.endTime)+"\n",e+=i.payload+"\n\n"}return e}(t=n.parseMedia(t,e));throw new le(2,2,2014,n)}(b,u,i),d=new Blob([c],{type:"text/vtt"}),e=Zi(d),i="text/vtt";case 8:if(o&&(n="forced"),(f=document.createElement("track")).src=e,f.label=a||"",f.kind=n,f.srclang=t,b.g.getAttribute("crossorigin")||b.g.setAttribute("crossorigin","anonymous"),b.g.appendChild(f),h=b.yb(),p=h.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return Bs(b),w.return(p);throw new le(1,2,2012);case 7:if(g=di,1/0==(m=b.A.presentationTimeline.getDuration()))throw new le(1,4,4033);if(v={id:b.gd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:wo(0,m,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:g.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},y=wi(v.mimeType,v.codecs),!Ii(y))throw new le(2,2,2014,i);return b.A.textStreams.push(v),Bs(b),w.return(Tr(v))}}))},i.Kd=function(e,t){this.fd.width=e,this.fd.height=t},i.Dd=function(){if(this.l==Du){var e=this.i;if(e.J.g)e=!1;else if(e.l)e=!1;else{for(var t=l(e.g.values()),n=t.next();!n.done;n=t.next())(n=n.value).Ub&&(n.Ub=!1,qo(e,n,.1));e=!0}}else e=!1;return e},i.Re=function(){return X("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.A},i.Se=function(){return this.pc},i.re=function(e){this.kc=e},i.uc=function(e){var t=this;return _((function(n){if(1==n.g)return T(n,function(e,t){var n;return _((function(i){if(1==i.g)return n=e.i?e.i.h:null,T(i,dr(e.m,n,t,e.o.useMediaCapabilities),2);Js(t),w(i)}))}(t,e),2);Rs(t,e),w(n)}))},F("shaka.Player",Ts),Ts.prototype.setVideoContainer=Ts.prototype.re,Ts.prototype.getManifestParserFactory=Ts.prototype.Se,Ts.prototype.getManifest=Ts.prototype.Re,Ts.prototype.retryStreaming=Ts.prototype.Dd,Ts.prototype.setMaxHardwareResolution=Ts.prototype.Kd,Ts.prototype.addTextTrackAsync=Ts.prototype.ye,Ts.prototype.addTextTrack=Ts.prototype.addTextTrack,Ts.prototype.getStats=Ts.prototype.getStats,Ts.prototype.getBufferedInfo=Ts.prototype.vc,Ts.prototype.getPresentationStartTimeAsDate=Ts.prototype.Zd,Ts.prototype.getPlayheadTimeAsDate=Ts.prototype.Ye,Ts.prototype.setTextTrackVisibility=Ts.prototype.Gf,Ts.prototype.isTextTrackVisible=Ts.prototype.nd,Ts.prototype.selectVariantsByLabel=Ts.prototype.Af,Ts.prototype.selectTextLanguage=Ts.prototype.Hd,Ts.prototype.selectAudioLanguage=Ts.prototype.Gd,Ts.prototype.getTextLanguages=Ts.prototype.bf,Ts.prototype.getAudioLanguages=Ts.prototype.Ke,Ts.prototype.getTextLanguagesAndRoles=Ts.prototype.cf,Ts.prototype.getAudioLanguagesAndRoles=Ts.prototype.Le,Ts.prototype.selectVariantTrack=Ts.prototype.ne,Ts.prototype.selectTextTrack=Ts.prototype.me,Ts.prototype.getThumbnails=Ts.prototype.df,Ts.prototype.getImageTracks=Ts.prototype.Oe,Ts.prototype.getTextTracks=Ts.prototype.yb,Ts.prototype.getVariantTracks=Ts.prototype.jd,Ts.prototype.cancelTrickPlay=Ts.prototype.Ce,Ts.prototype.trickPlay=Ts.prototype.If,Ts.prototype.getPlaybackRate=Ts.prototype.We,Ts.prototype.isBuffering=Ts.prototype.md,Ts.prototype.getKeyStatuses=Ts.prototype.xc,Ts.prototype.getExpiration=Ts.prototype.Qb,Ts.prototype.drmInfo=Ts.prototype.drmInfo,Ts.prototype.keySystem=Ts.prototype.keySystem,Ts.prototype.seekRange=Ts.prototype.Fd,Ts.prototype.isAudioOnly=Ts.prototype.gf,Ts.prototype.isInProgress=Ts.prototype.ib,Ts.prototype.isLive=Ts.prototype.Y,Ts.prototype.getAdManager=Ts.prototype.Yd,Ts.prototype.getAssetUri=Ts.prototype.hd,Ts.prototype.getNetworkingEngine=Ts.prototype.Rb,Ts.prototype.getMediaElement=Ts.prototype.Ue,Ts.prototype.getLoadMode=Ts.prototype.Qe,Ts.prototype.resetConfiguration=Ts.prototype.zf,Ts.prototype.getConfiguration=Ts.prototype.getConfiguration,Ts.prototype.configure=Ts.prototype.configure,Ts.prototype.load=Ts.prototype.load,Ts.prototype.unload=Ts.prototype.Pd,Ts.prototype.detach=Ts.prototype.detach,Ts.prototype.attach=Ts.prototype.Mb,Ts.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,_((function(o){if(1==o.g)return t={},e?T(o,function(){var e,t,n,i,r,a;return _((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],i=new Map,r=function(e){var t,r,a;return _((function(o){switch(o.g){case 1:return x(o,2),T(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),We("Tizen 3")&&(a=!1),i.set(e,{persistentState:a}),T(o,t.createMediaKeys(),5);case 5:S(o,0);break;case 2:E(o),i.set(e,null),w(o)}}))},a=e.map((function(e){return r(e)})),T(o,Promise.all(a),2)):o.return(va(i))}))}(),3):o.v(2);2!=o.g&&(t=o.h);var s={};if(Ve()){for(var u in Ya)s[u]=!0;for(var c in $a)s[c]=!0}u={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var d=(c=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!d.done;d=c.next())s[d=d.value]=Ve()?!!Ya[d]:He(d);for(var f in u)s[f]=Ve()?!!$a[f]:He(u[f]);for(n=s,s={},u=(f=l('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","))).next();!u.done;u=f.next())s[u=u.value]=Ve()?!!Ii(u)||(MediaSource.isTypeSupported(u)||yi(u)):He(u),s[c=u.split(";")[0]]=s[c]||s[u];for(a in i={manifest:n,media:s,drm:t},r=Lu)i[a]=r[a]();return o.return(i)}))},Ts.isBrowserSupported=function(){if(e.Promise||X("A Promise implementation or polyfill is required"),e.TextDecoder&&e.TextEncoder||X("A TextDecoder/TextEncoder implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&e.TextDecoder&&e.TextEncoder&&Array.prototype.forEach)||We("Trident/"))return!1;var t=Xe();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Ve()||He("application/x-mpegurl"))},Ts.setAdManagerFactory=function(e){ju=e},Ts.registerSupportPlugin=function(e,t){Lu[e]=t},Ts.prototype.destroy=Ts.prototype.destroy;var au="abrstatuschanged",ou="adaptation",su="buffering",uu="drmsessionupdate",lu="emsg",cu="error",du="expirationupdated",fu="loaded",hu="loading",pu="manifestparsed",gu="metadata",mu="onstatechange",vu="onstateidle",yu="ratechange",bu="streaming",Tu="textchanged",wu="texttrackvisibility",xu="timelineregionadded",ku="timelineregionenter",Su="timelineregionexit",Eu="trackschanged",Au="unloading",Iu="variantchanged",Cu={Pf:au,Qf:ou,Rf:su,Sf:uu,Uf:lu,Error:cu,Vf:du,Xf:"largegap",Yf:fu,Zf:hu,$f:pu,Metadata:gu,ag:mu,bg:vu,cg:yu,dg:"sessiondata",eg:bu,fg:Tu,gg:wu,hg:xu,ig:ku,jg:Su,kg:Eu,lg:Au,mg:Iu},Mu=0,Ru=1,Du=2,Nu=3;Ts.LoadMode={DESTROYED:Mu,NOT_LOADED:Ru,MEDIA_SOURCE:Du,SRC_EQUALS:Nu},Ts.version="v3.1.1";var _u=["3","1"];Ee=new function(e){this.g=e,this.i=ke,this.h=Se}(new we(Number(_u[0]),Number(_u[1])));var Pu=["output-restricted","internal-error"],Lu={},ju=null;function Ou(){this.h=[],this.j=this.i=this.g=0}function Uu(e,t){var n=this;this.i=e,this.g=t,this.j=!1,this.l=this.g.getVolume(),this.h=new Li,this.h.B(this.g,google.ima.AdEvent.Type.PAUSED,(function(){n.j=!0})),this.h.B(this.g,google.ima.AdEvent.Type.RESUMED,(function(){n.j=!1}))}function Bu(e,t,n,i){var r=this;this.m=e,this.g=t,this.u=NaN,this.j=i,this.s=null,this.h=new Li,google.ima.settings.setLocale(n),(e=new google.ima.AdDisplayContainer(this.m,this.g)).initialize(),this.l=new google.ima.AdsLoader(e),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v3.1.1"),this.i=null,this.h.ua(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(e){!function(e,t){e.j(new Zr("ads-loaded",{loadTime:Date.now()/1e3-e.u})),e.i=t.getAdsManager(e.g),e.j(new Zr("ima-ad-manager-loaded",{imaAdManager:e.i}));var n=e.i.getCuePoints();if(n.length){for(var i=[],r=(n=l(n)).next();!r.done;r=n.next())i.push(new zu(r.value));e.j(new Zr("ad-cue-points-changed",{cuepoints:i}))}!function(e){e.h.B(e.i,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Fu(e,t)})),e.h.B(e.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){Vu(e,t)})),e.h.B(e.i,google.ima.AdEvent.Type.STARTED,(function(t){Vu(e,t)})),e.h.B(e.i,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(t){e.j(new Zr("ad-first-quartile",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.MIDPOINT,(function(t){e.j(new Zr("ad-midpoint",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(t){e.j(new Zr("ad-third-quartile",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.COMPLETE,(function(t){e.j(new Zr("ad-complete",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Hu(e,t)})),e.h.B(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Hu(e,t)})),e.h.B(e.i,google.ima.AdEvent.Type.SKIPPED,(function(t){e.j(new Zr("ad-skipped",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(t){e.j(new Zr("ad-volume-changed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.VOLUME_MUTED,(function(t){e.j(new Zr("ad-muted",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.PAUSED,(function(t){e.s.j=!0,e.j(new Zr("ad-paused",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.RESUMED,(function(t){e.s.j=!1,e.j(new Zr("ad-resumed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(t){e.j(new Zr("ad-skip-state-changed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.CLICK,(function(t){e.j(new Zr("ad-clicked",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.AD_PROGRESS,(function(t){e.j(new Zr("ad-progress",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.AD_BUFFERING,(function(t){e.j(new Zr("ad-buffering",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.IMPRESSION,(function(t){e.j(new Zr("ad-impression",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.DURATION_CHANGE,(function(t){e.j(new Zr("ad-duration-changed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.USER_CLOSE,(function(t){e.j(new Zr("ad-closed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.LOADED,(function(t){e.j(new Zr("ad-loaded",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){e.j(new Zr("all-ads-completed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(t){e.j(new Zr("ad-linear-changed",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.AD_METADATA,(function(t){e.j(new Zr("ad-metadata",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.LOG,(function(t){e.j(new Zr("ad-recoverable-error",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.AD_BREAK_READY,(function(t){e.j(new Zr("ad-break-ready",{originalEvent:t}))})),e.h.B(e.i,google.ima.AdEvent.Type.INTERACTION,(function(t){e.j(new Zr("ad-interaction",{originalEvent:t}))}))}(e);try{e.i.init(e.g.offsetWidth,e.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.B(e.g,"loadeddata",(function(){e.i.resize(e.g.offsetWidth,e.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),e.i.start()}catch(t){Hu(e,null)}}(r,e)})),this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Fu(r,e)})),this.g.onended=function(){r.l.contentComplete()}}function Fu(e,t){t.getError(),Hu(e,null),e.j(new Zr("ad-cue-points-changed",{cuepoints:[]}))}function Vu(e,t){var n=t.getAd();e.s=new Uu(n,e.i),e.j(new Zr("ad-started",{ad:e.s,sdkAdObject:n,originalEvent:t})),e.m.setAttribute("ad-active","true"),e.g.pause()}function Hu(e,t){e.j(new Zr("ad-stopped",{originalEvent:t})),e.m.removeAttribute("ad-active"),e.g.play()}function Ku(e,t){this.i=e,this.h=null,this.g=t}function Gu(e,t,n,i){var r=this;this.u=e,this.g=t,this.l=null,this.I=NaN,this.j=i,this.H=!1,this.D=this.m=this.s=null,this.F="",this.h=new Li,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.i=new google.ima.dai.api.StreamManager(this.g,this.u,e),this.j(new Zr("ima-stream-manager-loaded",{imaStreamManager:this.i})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.j(new Zr("ads-loaded",{loadTime:Date.now()/1e3-e.I}));var n=t.getStreamData().url;e.l.resolve(n),e.l=null,e.H||e.h.B(e.g,"seeked",(function(){var t=e.g.currentTime;if(0!=t){e.i.streamTimeForContentTime(t);var n=e.i.previousCuePointForStreamTime(t);n&&!n.played&&(e.s=t,e.g.currentTime=n.start)}}))}(r,e)})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){r.F.length?r.l.resolve(r.F):r.l.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.l=null})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),r.m=new Ku(e,r.g),r.D&&(r.m.h=r.D),r.j(new Zr("ad-started",{ad:r.m})),r.u.setAttribute("ad-active","true")})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){r.u.removeAttribute("ad-active");var e=r.g.currentTime;r.s&&r.s>e&&(r.g.currentTime=r.s,r.s=null)})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){r.D=e.getStreamData().adProgressData,r.m&&(r.m.h=r.D)})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){r.j(new Zr("ad-first-quartile"))})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){r.j(new Zr("ad-midpoint"))})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){r.j(new Zr("ad-third-quartile"))})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){r.j(new Zr("ad-complete")),r.j(new Zr("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){r.j(new Zr("ad-skipped")),r.j(new Zr("ad-stopped"))})),this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=l(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push(new zu(n.start,n.end));r.j(new Zr("ad-cue-points-changed",{cuepoints:e}))}))}function qu(){ea.call(this),this.g=this.h=null,this.j=new Ou,this.i=navigator.language}function zu(e,t){this.start=e,this.end=void 0===t?null:t}function Xu(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof Zr){var n={};for(r in t){var i=t[r];i&&"object"==typeof i?"detail"==r&&(n[r]=i):r in Event||(n[r]=i)}return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(i=l(Object.getOwnPropertyNames(t))).next();!n.done;n=i.next())r.add(n.value);for(i={},n=(r=l(r)).next();!n.done;n=r.next())i[n=n.value]=t[n];r={__type__:"Error",contents:i}}else if(t instanceof TimeRanges)for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},i=(n=l(qn(t))).next();!i.done;i=n.next()){var a=(i=i.value).end;r.start.push(i.start),r.end.push(a)}else r=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return r}}))}function Wu(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){n=t.contents;var i,r=Error(n.message);for(i in n)r[i]=n[i];n=r}else n=t;return n}))}(i=Uu.prototype).getDuration=function(){return this.i.getDuration()},i.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()},i.getRemainingTime=function(){return this.g.getRemainingTime()},i.isPaused=function(){return this.j},i.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()},i.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},i.canSkipNow=function(){return this.g.getAdSkippableState()},i.skip=function(){return this.g.skip()},i.pause=function(){return this.g.pause()},i.play=function(){return this.g.resume()},i.getVolume=function(){return this.g.getVolume()},i.setVolume=function(e){return this.g.setVolume(e)},i.isMuted=function(){return 0==this.g.getVolume()},i.resize=function(e,t){this.g.resize(e,t,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},i.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},i.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},i.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},i.release=function(){this.g=this.i=null},F("shaka.ads.ClientSideAd",Uu),Uu.prototype.release=Uu.prototype.release,Uu.prototype.getPositionInSequence=Uu.prototype.getPositionInSequence,Uu.prototype.getSequenceLength=Uu.prototype.getSequenceLength,Uu.prototype.setMuted=Uu.prototype.setMuted,Uu.prototype.resize=Uu.prototype.resize,Uu.prototype.isMuted=Uu.prototype.isMuted,Uu.prototype.setVolume=Uu.prototype.setVolume,Uu.prototype.getVolume=Uu.prototype.getVolume,Uu.prototype.play=Uu.prototype.play,Uu.prototype.pause=Uu.prototype.pause,Uu.prototype.skip=Uu.prototype.skip,Uu.prototype.canSkipNow=Uu.prototype.canSkipNow,Uu.prototype.getTimeUntilSkippable=Uu.prototype.getTimeUntilSkippable,Uu.prototype.isSkippable=Uu.prototype.isSkippable,Uu.prototype.isPaused=Uu.prototype.isPaused,Uu.prototype.getRemainingTime=Uu.prototype.getRemainingTime,Uu.prototype.getMinSuggestedDuration=Uu.prototype.getMinSuggestedDuration,Uu.prototype.getDuration=Uu.prototype.getDuration,Bu.prototype.stop=function(){this.i&&this.i.stop(),this.m&&ns(this.m)},(i=Ku.prototype).getDuration=function(){return this.h?this.h.duration:-1},i.getMinSuggestedDuration=function(){return this.getDuration()},i.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},i.isPaused=function(){return this.g.paused},i.isSkippable=function(){return this.i.isSkippable()},i.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},i.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},i.skip=function(){this.g.currentTime+=this.getRemainingTime()},i.pause=function(){return this.g.pause()},i.play=function(){return this.g.play()},i.getVolume=function(){return this.g.volume},i.setVolume=function(e){this.g.volume=e},i.isMuted=function(){return this.g.muted},i.resize=function(){},i.setMuted=function(e){this.g.muted=e},i.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},i.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},i.release=function(){this.g=this.h=this.i=null},F("shaka.ads.ServerSideAd",Ku),Ku.prototype.release=Ku.prototype.release,Ku.prototype.getPositionInSequence=Ku.prototype.getPositionInSequence,Ku.prototype.getSequenceLength=Ku.prototype.getSequenceLength,Ku.prototype.setMuted=Ku.prototype.setMuted,Ku.prototype.resize=Ku.prototype.resize,Ku.prototype.isMuted=Ku.prototype.isMuted,Ku.prototype.setVolume=Ku.prototype.setVolume,Ku.prototype.getVolume=Ku.prototype.getVolume,Ku.prototype.play=Ku.prototype.play,Ku.prototype.pause=Ku.prototype.pause,Ku.prototype.skip=Ku.prototype.skip,Ku.prototype.canSkipNow=Ku.prototype.canSkipNow,Ku.prototype.getTimeUntilSkippable=Ku.prototype.getTimeUntilSkippable,Ku.prototype.isSkippable=Ku.prototype.isSkippable,Ku.prototype.isPaused=Ku.prototype.isPaused,Ku.prototype.getRemainingTime=Ku.prototype.getRemainingTime,Ku.prototype.getMinSuggestedDuration=Ku.prototype.getMinSuggestedDuration,Ku.prototype.getDuration=Ku.prototype.getDuration,Gu.prototype.stop=function(){this.i.reset(),this.F="",this.s=null},Gu.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.i.onTimedMetadata(t)}},m(qu,ea),(i=qu.prototype).setLocale=function(e){this.i=e},i.initClientSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new le(2,10,1e4);this.h=new Bu(t,n,this.i,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.j.h.push(e.loadTime);break;case"ad-started":i.j.g++;break;case"ad-complete":i.j.i++;break;case"ad-skipped":i.j.j++}i.dispatchEvent(e)}))},i.onAssetUnload=function(){this.h&&this.h.stop(),this.dispatchEvent(new Zr("ad-stopped")),this.j=new Ou},i.requestClientSideAds=function(e){if(!this.h)throw new le(1,10,10001);var t=this.h;t.u=Date.now()/1e3,t.l.requestAds(e)},i.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new le(2,10,10002);this.g=new Gu(t,n,this.i,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.j.h.push(e.loadTime);break;case"ad-started":i.j.g++;break;case"ad-complete":i.j.i++;break;case"ad-skipped":i.j.j++}i.dispatchEvent(e)}))},i.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new le(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;(n.mpt||n.mpv)&&X('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v3.1.1";var i=t;return(n=this.g).l?n=Promise.reject(new le(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.l=new hi,n.i.requestStream(e),n.F=i||"",n.I=Date.now()/1e3,n=n.l),n},i.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new le(1,10,10003);(e.mpt||e.mpv)&&X('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v3.1.1",this.g.i.replaceAdTagParameters(e)},i.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},i.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(t,n,e.startTime)}},i.onHlsTimedMetadata=function(e,t){this.g&&this.g.i.processMetadata("ID3",e.data,t)},i.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},F("shaka.ads.AdManager",qu),qu.prototype.onCueMetadataChange=qu.prototype.onCueMetadataChange,qu.prototype.onHlsTimedMetadata=qu.prototype.onHlsTimedMetadata,qu.prototype.onDashTimedMetadata=qu.prototype.onDashTimedMetadata,qu.prototype.getStats=qu.prototype.getStats,qu.prototype.replaceServerSideAdTagParameters=qu.prototype.replaceServerSideAdTagParameters,qu.prototype.requestServerSideStream=qu.prototype.requestServerSideStream,qu.prototype.initServerSide=qu.prototype.initServerSide,qu.prototype.requestClientSideAds=qu.prototype.requestClientSideAds,qu.prototype.onAssetUnload=qu.prototype.onAssetUnload,qu.prototype.initClientSide=qu.prototype.initClientSide,qu.prototype.setLocale=qu.prototype.setLocale,qu.ADS_LOADED="ads-loaded",qu.AD_STARTED="ad-started",qu.AD_FIRST_QUARTILE="ad-first-quartile",qu.AD_MIDPOINT="ad-midpoint",qu.AD_THIRD_QUARTILE="ad-third-quartile",qu.AD_COMPLETE="ad-complete",qu.AD_STOPPED="ad-stopped",qu.AD_SKIPPED="ad-skipped",qu.AD_VOLUME_CHANGED="ad-volume-changed",qu.AD_MUTED="ad-muted",qu.AD_PAUSED="ad-paused",qu.AD_RESUMED="ad-resumed",qu.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",qu.CUEPOINTS_CHANGED="ad-cue-points-changed",qu.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",qu.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",qu.AD_CLICKED="ad-clicked",qu.AD_PROGRESS="ad-progress",qu.AD_BUFFERING="ad-buffering",qu.AD_IMPRESSION="ad-impression",qu.AD_DURATION_CHANGED="ad-duration-changed",qu.AD_CLOSED="ad-closed",qu.AD_LOADED="ad-loaded",qu.ALL_ADS_COMPLETED="all-ads-completed",qu.AD_LINEAR_CHANGED="ad-linear-changed",qu.AD_METADATA="ad-metadata",qu.AD_RECOVERABLE_ERROR="ad-recoverable-error",qu.AD_BREAK_READY="ad-break-ready",qu.AD_INTERACTION="ad-interaction",ju=function(){return new qu};var Yu="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),$u="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ju=["loop","playbackRate"],Qu=["pause","play"],Zu={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},el={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},tl=[["getConfiguration","configure"]],nl=[["isTextTrackVisible","setTextTrackVisibility"]],il="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),rl=["attach","detach","load","unload"];function al(e,t,n,i,r,a){var o=this;this.L=e,this.j=new Fe(t),this.ca=n,this.D=!1,this.u=i,this.I=r,this.S=a,this.h=this.m=!1,this.X="",this.s=null,this.F=function(){return cl(o)},this.H=function(e,t){var n=Wu(t);switch(n.type){case"event":var i=n.targetName;n=new Zr((n=n.event).type,n),o.u(i,n);break;case"update":for(var r in i=n.update)for(var a in n=o.g[r]||{},i[r])n[a]=i[r][a];o.D&&(o.ca(),o.D=!1);break;case"asyncComplete":if(r=n.id,n=n.error,a=o.i[r],delete o.i[r],a)if(n){for(i in r=new le(n.severity,n.category,n.code),n)r[i]=n[i];a.reject(r)}else a.resolve()}},this.g={video:{},player:{}},this.N=0,this.i={},this.l=null,ml.add(this)}function ol(e,t,n){gl=n,n.addUpdateListener(e.F),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.H),cl(e),fl(e,{type:"init",initState:t,appData:e.s}),e.l.resolve()}function sl(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new le(2,8,n,t))}function ul(e,t){var n=e.S();e.l=new hi,e.D=!0,ol(e,n,t)}function ll(e){var t=gl;t.removeUpdateListener(e.F),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.H)}function cl(e){var t=!!gl&&"connected"==gl.status;if(e.h&&!t){for(var n in e.I(),e.g)e.g[n]={};dl(e)}e.h=t,e.X=t?gl.receiver.friendlyName:"",e.j.bc()}function dl(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new le(1,7,7e3))}}function fl(e,t){var n=Xu(t),i=gl;try{i.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),Y)}catch(t){throw i=new Zr("error",{detail:n=new le(2,8,8005,t)}),e.u("player",i),e.ub(),n}}(i=al.prototype).destroy=function(){return ml.delete(this),dl(this),gl&&ll(this),this.j&&(this.j.stop(),this.j=null),this.I=this.u=null,this.h=this.m=!1,this.H=this.F=this.l=this.i=this.g=this.s=null,Promise.resolve()},i.sa=function(){return this.h},i.Bd=function(){return this.X},i.init=function(){if(this.L.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.bc();var t=new chrome.cast.SessionRequest(this.L);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(ml),n=t.next();!n.done;n=t.next())ul(n.value,e)}),(function(e){for(var t=l(ml),n=t.next();!n.done;n=t.next())n=n.value,pl="available"==e,n.j.bc()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),pl&&this.j.T(hl),(t=gl)&&t.status!=chrome.cast.SessionStatus.STOPPED?ul(this,t):gl=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=vl),e.__onGCastApiAvailable!=vl&&X("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},i.Id=function(e){this.s=e,this.h&&fl(this,{type:"appData",appData:this.s})},i.cast=function(e){var t=this;return _((function(n){if(!t.m)throw new le(1,8,8e3);if(!pl)throw new le(1,8,8001);if(t.h)throw new le(1,8,8002);return t.l=new hi,chrome.cast.requestSession((function(n){return ol(t,e,n)}),(function(e){return sl(t,e)})),T(n,t.l,0)}))},i.ub=function(){if(this.h){if(dl(this),gl){ll(this);try{gl.stop((function(){}),(function(){}))}catch(e){}gl=null}cl(this)}},i.get=function(e,t){var n=this;if("video"==e){if(Qu.includes(t))return function(i){for(var r=[],a=0;an.byteLength){n=[];break e}var a=oe(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n}(e=tt(e.textContent)).filter((function(e){return e.type===dc}))[0])&&(e=oc(e=he(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=l(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=l(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""}function cc(e){var t=e.getAttribute("schemeIdUri"),n=Wl(e,"urn:mpeg:cenc:2013","default_KID"),i=Xl(e,"urn:mpeg:cenc:2013","pssh").map(Yl);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new le(2,4,4009);var r=[];try{r=i.map((function(e){return{initDataType:"cenc",initData:tt(e),keyId:null}}))}catch(e){throw new le(2,4,4007)}return{node:e,le:t,keyId:n,init:0(g=m||0))if(p){if(null==(p=Jl(p,"t",ic)))break;if(h>=p)break;g=Math.ceil((p-h)/f)-1}else{if(1/0==u)break;if(h/a>=u)break;g=Math.ceil((u*a-h)/f)-1}for(0>>31,h&=2147483647;var p=o.reader.M();if(o.reader.skip(4),1==d)throw new le(2,3,3006);s.push(new Qa(c/u+n,(c+p)/u+n,(function(){return a}),e,e+h-1,t,n,i,r)),c+=p,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)}));if(e&&u.parse(e),s)return s;throw new le(2,3,3004)}function bc(e){this.h=se(e),this.g=new ye(this.h,0)}function Tc(e){var t=wc(e);if(7s()&&!n.length?null:n}))}return Promise.resolve(S)}(u,s,r,o,a)}};var c=null;i=null,e.ea.id&&e.K.id&&(i=e.ea.id+","+e.K.id,c=n[i]);var d=function(e,t,n){var i=e.V.start,r=e.V.duration,a=i-t.Ta;r=r?i+r:1/0;for(var o=[],s={},u=l(te(t.timeline)),c=u.next();!c.done;s={Qc:s.Qc,Tc:s.Tc,Wc:s.Wc,Nc:s.Nc,Yc:s.Yc,Oc:s.Oc},c=u.next()){var d=(c=c.value).item,f=d.start,h=d.Mf;d=d.end,s.Wc=c.ha+t.Gb,s.Yc=h+t.Qd,s.Tc=e.K.id,s.Nc=e.bandwidth||null,s.Qc=t.sd,s.Oc=e.K.ya,o.push(new Qa(i+f,i+d,function(e){return function(){var t=hc(e.Qc,e.Tc,e.Wc,e.Nc||null,e.Yc);return oi(e.Oc,[t]).map((function(e){return e.toString()}))}}(s),0,null,n,a,i,r))}return o}(u,s,o),f=e.V.start,h=e.V.duration?e.V.start+e.V.duration:1/0,p=1/0!=h;return c?(p&&new To(d).Xa(f,h,!0),c.Ab(d,e.presentationTimeline.Ya())):(e.presentationTimeline.Cb(d),c=new To(d),i&&e.bb&&(n[i]=c)),p&&c.Xa(f,h),{vb:function(){return Promise.resolve(c)}}}function Lc(e){return e.$b}function jc(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function Oc(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,x,k,S,E,A,I,C,M,R,D,N,P,L;return _((function(_){switch(_.g){case 1:if(i=di,function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){t=t.value;for(var n=[],i=l(t.qc),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.channelsCount==s.channelsCount&&r.language==s.language&&r.bandwidth==s.bandwidth&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&ct(r.roles,s.roles)&&r.audioSamplingRate==s.audioSamplingRate&&r.primary==s.primary&&(a=!0);a||n.push(r)}t.qc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){t=t.value;for(var n=[],i=l(t.Lc),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.frameRate==s.frameRate&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.label==s.label&&ct(r.roles,s.roles)&&ya(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.Lc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){t=t.value;for(var n=[],i=l(t.textStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.language==s.language&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&ct(r.roles,s.roles)&&(a=!0);a||n.push(r)}t.textStreams=n}}(t),!n&&1==t.length){r=t[0],e.g=r.qc,e.h=r.Lc,e.j=r.textStreams,e.i=r.imageStreams,_.v(2);break}for(a=-1,o=l(te(t)),s=o.next();!s.done;s=o.next())u=s.value,c=u.ha,d=u.item,e.m.has(d.id)||(e.m.add(d.id),-1==a&&(a=c));if(-1==a)return _.return();for(f=t.map((function(e){return e.qc})),h=t.map((function(e){return e.Lc})),p=t.map((function(e){return e.textStreams})),g=t.map((function(e){return e.imageStreams})),m=l(p),v=m.next();!v.done;v=m.next())v.value.push({id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new To([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:ci,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null});return T(_,Bc(e.g,f,a,Hc,Gc),3);case 3:return T(_,Bc(e.h,h,a,Hc,Gc),4);case 4:return T(_,Bc(e.j,p,a,Hc,Gc),5);case 5:return T(_,Bc(e.i,g,a,Hc,Gc),2);case 2:if(y=0,b=[],e.h.length&&e.g.length)for(I=l(e.g),C=I.next();!C.done;C=I.next())for(M=C.value,R=l(e.h),D=R.next();!D.done;D=R.next())N=D.value,P=ja(M.drmInfos,N.drmInfos),M.drmInfos.length&&N.drmInfos.length&&!P.length||(L=y++,b.push({id:L,language:M.language,primary:M.primary,audio:M,video:N,bandwidth:(M.bandwidth||0)+(N.bandwidth||0),drmInfos:P,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(x=e.h.concat(e.g),k=l(x),S=k.next();!S.done;S=k.next())E=S.value,A=y++,b.push({id:A,language:E.language,primary:E.primary,audio:E.type==i.ab?E:null,video:E.type==i.Na?E:null,bandwidth:E.bandwidth||0,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});e.l=b,w(_)}}))}function Uc(e){var t,n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,w,x;return _((function(k){switch(k.g){case 1:if(t=di,1==e.length)return k.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.ab}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.Na}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.fa}))})),a=l(r),o=a.next();!o.done;o=a.next())o.value.push({id:0,originalId:"",primary:!1,type:ci,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null});return T(k,Bc([],n,0,Kc,qc),2);case 2:return s=k.h,T(k,Bc([],i,0,Kc,qc),3);case 3:return u=k.h,T(k,Bc([],r,0,Kc,qc),4);case 4:if(c=k.h,d=0,u.length&&s.length)for(g=l(s),m=g.next();!m.done;m=g.next())for(v=m.value,y=l(u),b=y.next();!b.done;b=y.next())w=b.value,x=d++,w.variantIds.push(x),v.variantIds.push(x);else for(f=u.concat(s),h=l(f),p=h.next();!p.done;p=h.next())p.value.variantIds=[d++];return k.return(u.concat(s).concat(c))}}))}function Bc(e,t,n,i,r){var a,o,s,u,c,d,f,h,p,g,m,v,y,b,w,x,k,S,E;return _((function(A){switch(A.g){case 1:for(a=di,o=[],s=l(te(t)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ha,f=c.item,d>=n?o.push(new Set(f)):o.push(new Set);h=l(e),p=h.next();case 2:if(p.done){A.v(4);break}return T(A,function(e,t,n,i,r){var a;return _((function(o){return 1==o.g?(a=zc(t,e))?T(o,Fc(a),2):o.return(!1):(Vc(e,a,n,i,r),o.return(!0))}))}(p.value,t,n,r,o),5);case 5:if(!A.h)throw new le(2,4,4037);p=h.next(),A.v(2);break;case 4:g=l(o),m=g.next();case 6:if(m.done){A.v(8);break}v=m.value,y=l(v),b=y.next();case 9:if(b.done){m=g.next(),A.v(6);break}return T(A,function(e,t,n,i,r){var a,o;return _((function(s){return 1==s.g?(a=n(e),(o=zc(t,a))?a.createSegmentIndex?T(s,Fc(o),2):s.v(2):s.return(null)):(Vc(a,o,0,i,r),s.return(a))}))}(b.value,t,i,r,o),12);case 12:(w=A.h)&&e.push(w),b=y.next(),A.v(9);break;case 8:for(x=l(o),m=x.next();!m.done;m=x.next())for(k=m.value,S={},E=l(k),b=E.next();!b.done;S={sb:S.sb},b=E.next())if(S.sb=b.value,(S.sb.type!=a.fa||S.sb.language)&&e.some(function(e){return function(t){return t.mimeType==e.sb.mimeType&&ki(t.codecs)==ki(e.sb.codecs)}}(S)))throw new le(2,4,4037);return A.return(e)}}))}function Fc(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())n=n.value,t.push(n.createSegmentIndex()),n.trickModeVideo&&!n.trickModeVideo.segmentIndex&&t.push(n.trickModeVideo.createSegmentIndex());return Promise.all(t)}function Vc(e,t,n,i,r){for(var a=(t=l(te(t))).next();!a.done;a=t.next()){var o=a.value;if(a=o.ha,o=o.item,a>=n){i(e,o);var s=!0;"audio"==e.type&&0==rr(e.language,o.language)&&(s=!1),s&&r[a].delete(o)}}}function Hc(e){return(e=Object.assign({},e)).originalId=null,e.createSegmentIndex=function(){return Promise.resolve()},e.segmentIndex=new ko,e.emsgSchemeIdUris=[],e.keyIds=new Set,e.closedCaptions=null,e.trickModeVideo=null,e}function Kc(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Gc(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris))));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||""),n=ja(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!n.length)throw new le(2,4,4038);if(e.drmInfos=n,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var i=(n=l(t.closedCaptions)).next();!i.done;i=n.next()){var r=l(i.value);i=r.next().value,r=r.next().value,e.closedCaptions.set(i,r)}}e.segmentIndex.l.push(t.segmentIndex),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Hc(t.trickModeVideo),e.trickModeVideo.segmentIndex=e.segmentIndex.clone()),Gc(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&Gc(e.trickModeVideo,t)}function qc(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,c(t.segments)),t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var i=(n=l(t.closedCaptions)).next();!i.done;i=n.next()){var r=l(i.value);i=r.next().value,r=r.next().value,e.closedCaptions.set(i,r)}}}function zc(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){for(var a=t,o={audio:Xc,video:Xc,text:Wc,image:Yc}[a.type],s={audio:$c,video:Jc,text:Qc,image:Zc}[a.type],u=null,c=(r=l(r.value)).next();!c.done;c=r.next())!o(a,c=c.value)||u&&!s(a,u,c)||(u=c);if(!(a=u))return null;n.push(a)}return n}function Xc(e,t){var n;if(!(n=t.mimeType!=e.mimeType||ki(t.codecs)!=ki(e.codecs))&&(n=e.drmInfos)){n=e.drmInfos;var i=t.drmInfos;n=!(!n.length||!i.length||0i||!(ri.length||!(r.lengthi)return!0;if(ri.length)return!0;if(r.lengthe){if(n<=e||n-et-e)return rd}else{if(n>e)return rd;if(e-ne-t)return rd}return id}function td(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))e.u||e.s.T(Math.max(3,e.u-t,K(e.F)))}function dd(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,wd:null,audioSamplingRate:null,tb:0},n=n||t.ya;for(var i=zl(e,"BaseURL"),r=i.map(Yl),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=Jl(e,"frameRate",ac)||t.frameRate,c=e.getAttribute("sar")||t.pixelAspectRatio,d=zl(e,"InbandEventStream"),f=t.emsgSchemeIdUris.slice(),h=(d=l(d)).next();!h.done;h=d.next())h=h.value.getAttribute("schemeIdUri"),f.includes(h)||f.push(h);d=function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0n.length||"data"!=n[0])throw new le(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new le(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=i.split(";"),i=n[0];var r=!1;return 1>4)&&2!=n||r(),3==n&&(n=a.$(),a.skip(n)),1==a.M()>>8){a.skip(3),0!=(n=a.$()>>6)&&1!=n||r(),0==a.$()&&r(),n=a.$();var u=a.Fb(),l=a.Fb();return(1073741824*((14&n)>>1)+((65534&u)<<14|(65534&l)>>1))/9e4}i()}else i()}(t,g.uri,g.data));case 4:throw new le(2,4,4030,t)}}))}function Jd(e,t){var n=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}"),i=n.match(/{\$\w*}/g);if(i)for(var r=(i=l(i)).next();!r.done;r=i.next()){var a=(r=r.value).slice(2,r.length-1),o=t.get(a);if(!o)throw new le(2,4,4039,a);n=n.replace(r,o)}return n}function Qd(e,t){e.j=t,e.g&&e.g.ac(e.j==rf),e.j!=rf||e.s.stop()}function Zd(e,t,n){if(!e.D)throw new le(2,7,7001);return t=e.C.networkingEngine.request(n,t),ra(e.D,t),t.promise}F("shaka.net.DataUriPlugin",Pd),Pd.parse=Ld,oa("data",Ld),(i=Od.prototype).configure=function(e){this.o=e},i.start=function(e,t){var n,i,r=this;return _((function(a){return 1==a.g?(r.C=t,r.i=t.isLowLatencyMode(),T(a,Zd(r,sa([e],r.o.retryParameters),0),2)):3!=a.g?(n=a.h,r.L=n.uri,T(a,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,k,S,A,I,C,M,R;return _((function(D){switch(D.g){case 1:if(0!=(n=Rd(e.X,t,e.L)).type)throw new le(2,4,4022);for(var N=l(wd(n.W,"EXT-X-DEFINE")),P=N.next();!P.done;P=N.next()){var L=P.value;P=vd(L,"NAME"),L=vd(L,"VALUE"),P&&L&&(e.u.has(P)||e.u.set(P,L))}for(i=wd(n.W,"EXT-X-MEDIA"),P=(N=l(r=wd(n.W,"EXT-X-STREAM-INF"))).next();!P.done;P=N.next()){var j=P.value;L=vd(j,"AUDIO"),P=vd(j,"VIDEO");var O=vd(j,"SUBTITLES");if(j=Fd(e,j),O){var U=li(ci,j);e.l.set(O,U),lt(j,U)}L&&(O=ui("audio",j),e.l.set(L,O)),P&&(L=ui("video",j),e.l.set(P,L))}for(a=wd(n.W,"EXT-X-SESSION-DATA"),o=l(a),s=o.next();!s.done;s=o.next())u=s.value,c=vd(u,"DATA-ID"),d=vd(u,"URI"),f=vd(u,"LANGUAGE"),h=vd(u,"VALUE"),p={id:c},d&&(p.uri=oi([e.L],[d])[0]),f&&(p.language=f),h&&(p.value=h),g=new Zr("sessiondata",p),e.C&&e.C.onEvent(g);return T(D,function(e,t){var n;return _((function(i){return 1==i.g?(t=t.filter((function(e){var t=vd(e,"URI")||"";return"SUBTITLES"!=vd(e,"TYPE")&&""!=t}))).length?T(i,Hd(e,t[0]),2):i.v(2):(n=t.slice(1).map((function(t){return Hd(e,t)})),T(i,Promise.all(n),0))}))}(e,i),2);case 2:for(P=(N=l(N=xd(i,"CLOSED-CAPTIONS"))).next();!P.done;P=N.next())P=Vd(O=P.value),L=yd(O,"GROUP-ID"),O=yd(O,"INSTREAM-ID"),e.I.get(L)||e.I.set(L,new Map),e.I.get(L).set(O,P);return T(D,function(e,t){var n,i,r;return _((function(a){return 1==a.g?(n=t.map((function(t){var n,i,r,a,o,s,u,c;return _((function(d){if(1==d.g)return n=vd(t,"FRAME-RATE"),i=Number(vd(t,"AVERAGE-BANDWIDTH"))||Number(yd(t,"BANDWIDTH")),r=vd(t,"RESOLUTION"),a=l(r?r.split("x"):[null,null]),o=a.next().value,s=a.next().value,u=vd(t,"VIDEO-RANGE"),T(d,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m;return _((function(v){if(1==v.g)return n=di,i=Fd(e,t),r=vd(t,"AUDIO"),a=vd(t,"VIDEO"),s=(o=r||a)&&e.m.has(o)?e.m.get(o):[],u={audio:r?s:[],video:a?s:[]},d=!1,f=yd(t,"URI"),h=u.audio.find((function(e){return e&&e.Kc==f})),p=li(n.Na,i),(g=li(n.ab,i))&&!p?c=n.ab:!s.length&&g&&p?(c=n.Na,i=[[p,g].join()]):u.audio.length&&h?(c=n.ab,d=!0):c=u.video.length?n.ab:n.Na,d?v.v(2):T(v,function(e,t,n,i){var r,a,o,s;return _((function(u){if(1==u.g){if(r=Jd(yd(t,"URI"),e.u),e.h.has(r))return u.return(e.h.get(r));var l=vd(t,"CLOSED-CAPTIONS");return a="video"==i&&l&&"NONE"!=l?e.I.get(l):null,o=ui(i,n),T(u,Kd(e,r,o,i,"und",!1,null,null,a,null,!1,!1),2)}return null==(s=u.h)?u.return(null):e.h.has(r)?u.return(e.h.get(r)):(e.h.set(r,s),u.return(s))}))}(e,t,i,c),3);if(2!=v.g&&(m=v.h),m)u[m.stream.type]=[m];else if(null===m)return v.return(null);return function(e){for(var t=(e=l(e.audio.concat(e.video))).next();!t.done;t=e.next())if(t=t.value){var n=t.stream.codecs.split(",");n=n.filter((function(e){return"mp4a.40.34"!=e})),t.stream.codecs=n.join(",")}}(u),v.return(u)}))}(e,t),2);if(c=d.h){for(var f=d.return,h=c.audio,p=c.video,g=l(p),m=g.next();!m.done;m=g.next())(m=m.value.stream)&&(m.width=Number(o)||void 0,m.height=Number(s)||void 0,m.frameRate=Number(n)||void 0,m.hdr=u||void 0);for(g=e.o.disableAudio,h.length&&!g||(h=[null]),g=e.o.disableVideo,p.length&&!g||(p=[null]),g=[],m=(h=l(h)).next();!m.done;m=h.next()){m=m.value;for(var v=l(p),y=v.next();!y.done;y=v.next()){var b=y.value;y=m?m.stream:null;var w=b?b.stream:null,x=m?m.stream.drmInfos:null,k=b?b.stream.drmInfos:null;b=(b?b.Kc:"")+" - "+(m?m.Kc:""),y&&w&&x.length&&k.length&&!(0=n&&202!=n)return{uri:r||i,ge:i,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=pe(t)}catch(e){}throw new le(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function lf(){}function cf(e,t,n,i){var r=new gf;ma(t.headers).forEach((function(e,t){r.append(t,e)}));var a=new hf,o={Rd:!1,se:!1};if(e=new Xr(e=function(e,t,n,i,r,a){var o,s,u,l,c,d,f,h,p,g,m,v;return _((function(y){switch(y.g){case 1:return o=ff,s=pf,d=c=0,f=Date.now(),x(y,2),T(y,o(e,n),4);case 4:return u=y.h,h=u.clone().body.getReader(),g=(p=u.headers.get("Content-Length"))?parseInt(p,10):0,new s({start:function(e){!function t(){var n,i;return _((function(o){switch(o.g){case 1:return x(o,2),T(o,h.read(),4);case 4:n=o.h,S(o,3);break;case 2:return E(o),o.return();case 3:if(n.done){o.v(5);break}if(c+=n.value.byteLength,!a){o.v(5);break}return T(o,a(n.value),5);case 5:(100<(i=Date.now())-f||n.done)&&(r(i-f,c-d,g-c),d=c,f=i),n.done?e.close():(e.enqueue(n.value),t()),w(o)}}))}()}}),T(y,u.arrayBuffer(),5);case 5:l=y.h,S(y,3);break;case 2:if(m=E(y),i.Rd)throw new le(1,1,7001,e,t);if(i.se)throw new le(1,1,1003,e,t);throw new le(1,1,1002,e,m,t);case 3:return v={},u.headers.forEach((function(e,t){v[t.trim()]=e})),y.return(uf(v,l,u.status,e,u.url,t))}}))}(e,n,{body:t.body||void 0,headers:r,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},o,i,t.streamDataCallback),(function(){return o.Rd=!0,a.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new Fe((function(){o.se=!0,a.abort()}));s.T(t/1e3),e.finally((function(){s.stop()}))}return e}function df(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}$a.m3u8=function(){return new Od},Ya["application/x-mpegurl"]=function(){return new Od},Ya["application/vnd.apple.mpegurl"]=function(){return new Od},F("shaka.net.HttpFetchPlugin",lf),lf.isSupported=df,lf.parse=cf;var ff=e.fetch,hf=e.AbortController,pf=e.ReadableStream,gf=e.Headers;function mf(){}function vf(e,t,n,i){var r=new yf,a=Date.now(),o=0;return new Xr(new Promise((function(s,u){for(var c in r.open(t.method,e,!0),r.responseType="arraybuffer",r.timeout=t.retryParameters.timeout,r.withCredentials=t.allowCrossSiteCredentials,r.onabort=function(){u(new le(1,1,7001,e,n))},r.onload=function(t){for(var i=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),r={},a=(i=l(i)).next();!a.done;a=i.next())r[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=uf(r,t.response,t.status,e,t.responseURL,n);s(o)}catch(e){u(e)}},r.onerror=function(t){u(new le(1,1,1002,e,t,n))},r.ontimeout=function(){u(new le(1,1,1003,e,n))},r.onprogress=function(e){var t=Date.now();(100t,!s||!u){c.v(3);break}return T(c,r.updateManifestExpiration(n.key(),t),3);case 3:return A(c),T(c,i.destroy(),10);case 10:I(c,0);break;case 2:E(c),c.v(3)}}))},Ya["application/x-offline-manifest"]=function(){return new Yf},F("shaka.offline.OfflineScheme",$f),$f.plugin=Jf,oa("offline",Jf),(i=rh.prototype).destroy=function(){return this.J.destroy()},i.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=ls(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(xe("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),fs(this.o,e)},i.getConfiguration=function(){var e=ds();return fs(e,this.o,ds()),e},i.Rb=function(){return this.O},i.store=function(e,t,n){var i=this,r=this.getConfiguration(),a=new Tf(this.O);this.zd.push(a);var o=new Xr(t=function(e,t,n,i,r,a){var o,s,u,c,d,f,h,p,g,m;return _((function(v){switch(v.g){case 1:return dh(),s=o=null,u=new _f,d=c=null,x(v,2,3),T(v,i(),5);case 5:return o=v.h,T(v,function(e,t,n,i){var r,a,o,s,u;return _((function(l){if(1==l.g)return r=null,a=e.O,o={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){r=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},n.configure(i.manifest),ch(e),T(l,n.start(t,o),2);if(3!=l.g)return s=l.h,ch(e),u=hh(s),T(l,Promise.all(Z(u,(function(e){return e.createSegmentIndex()}))),3);if(ch(e),r)throw r;return l.return(s)}))}(e,t,o,r),6);case 6:if(f=v.h,ch(e),!(!f.presentationTimeline.Y()&&!f.presentationTimeline.ib()))throw new le(2,9,9005,t);return T(v,function(e,t,n,i){var r;return _((function(a){switch(a.g){case 1:return(r=new ba({Bb:e.O,onError:n,Dc:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(i.drm),T(a,function(e,t,n,i){return e.oa=!0,e.D=[],e.F=n,wa(e,t,!!i)}(r,t.variants,i.offline.usePersistentLicense,i.useMediaCapabilities),2);case 2:return T(a,xa(r),3);case 3:return T(a,ka(r),4);case 4:return a.return(r)}}))}(e,f,(function(e){d=d||e}),r),7);case 7:if(s=v.h,ch(e),d)throw d;return T(v,e.uc(f,s,r),8);case 8:return T(v,u.init(),9);case 9:return ch(e),T(v,function(e){var t=null;if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ia:n,la:i},la:e})}))})),t)return t;throw new le(2,9,9013,"Could not find a cell that supports add-operations")}(u),10);case 10:return c=v.h,ch(e),T(v,function(e,t,n,i,r,a,o,s){var u,c,d,f,h,p,g,m,v,y;return _((function(b){switch(b.g){case 1:return u=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=th(t),appMetadata:n}}(r,i,a),c=o.offline.progressCallback,function(e,t,n){e.de=t,e.ce=n}(s,(function(e,t){u.size=t,c(u,e)}),(function(e,t){h&&o.offline.usePersistentLicense&&p==t&&Sa(n,"cenc",e)})),d=i.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})),f=i.variants.some((function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some((function(e){return e.initData&&e.initData.length}))})),p=null,(h=d&&!f)&&(g=n.i,p=ph.get(g.keySystem)),k(b),v=m=function(e,t,n,i,r,a,o,s){for(var u=new nh,c=l(r.variants),d=c.next();!d.done;d=c.next()){var f=u,h=(d=d.value).audio,p=d.video;if(h&&!p&&(f.g[h.id]=h.bandwidth||d.bandwidth),!h&&p&&(f.g[p.id]=p.bandwidth||d.bandwidth),h&&p){var g=h.bandwidth||393216,m=p.bandwidth||d.bandwidth-g;0>=m&&(m=d.bandwidth),f.g[h.id]=g,f.g[p.id]=m}}for(c=l(r.textStreams),f=c.next();!f.done;f=c.next())u.g[f.value.id]=52;for(c=l(r.imageStreams),f=c.next();!f.done;f=c.next())f=f.value,u.g[f.id]=f.bandwidth||2048;for((f=new Map).set(null,Promise.resolve(null)),d=new Map,h=hh(r),c=new Map,h=l(h),p=h.next();!p.done;p=h.next())p=p.value,g=lh(e,t,n,u,r,p,s,f,d),c.set(p.id,g);for(e=l(r.variants),d=e.next();!d.done;d=e.next())(t=d.value).audio&&c.get(t.audio.id).variantIds.push(t.id),t.video&&c.get(t.video.id).variantIds.push(t.id);return e=Array.from(c.values()),s=s.offline.usePersistentLicense,(t=i.i)&&s&&(t.initData=[]),{creationTime:Date.now(),originalManifestUri:a,duration:r.presentationTimeline.getDuration(),size:0,expiration:i.Qb(),streams:e,sessionIds:s?Ca(i):[],drmInfo:t,appMetadata:o}}(e,s,t,n,i,r,a,o),T(b,function(e){return _((function(t){return 1==t.g?T(t,Promise.all(e.g.values()),2):t.return(e.Lb.h)}))}(s),4);case 4:if(v.size=b.h,m.expiration=n.Qb(),y=Ca(n),m.sessionIds=o.offline.usePersistentLicense?y:[],d&&o.offline.usePersistentLicense&&!y.length)throw new le(2,9,9007);return b.return(m);case 2:return A(b),T(b,s.destroy(),5);case 5:I(b,0)}}))}(e,c.la,s,f,t,n,r,a),11);case 11:if(h=v.h,ch(e),d)throw d;return T(v,c.la.addManifests([h]),12);case 12:return p=v.h,ch(e),g=new Gf("manifest",c.path.Ia,c.path.la,p[0]),v.return(eh(g,h));case 3:return A(v),e.Ic=[],T(v,u.destroy(),13);case 13:if(!o){v.v(14);break}return T(v,o.stop(),14);case 14:if(!s){v.v(16);break}return T(v,s.destroy(),16);case 16:I(v,0);break;case 2:if(m=E(v),!c){v.v(18);break}return T(v,c.la.removeSegments(e.Ic,(function(){})),18);case 18:throw d||m}}))}(this,e,t||{},(function(){var t;return _((function(a){return 1==a.g?T(a,za(e,i.O,r.manifest.retryParameters,n||null),2):(t=a.h,a.return(Me(t)))}))}),r,a),(function(){return wf(a)}));return o.finally((function(){lt(i.zd,a)})),o.then=function(e){return xe("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead."),o.promise.then(e)},function(e,t){var n=t.promise;return e.Xb.push(n),t.finally((function(){lt(e.Xb,n)}))}(this,o)},i.af=function(){return xe("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported."),!1},i.uc=function(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,k,A,I,C,M,R,D,N,P;return _((function(_){switch(_.g){case 1:for(i={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return cr(e,t,n)}))}(e,n.restrictions,i),n.useMediaCapabilities?hr(e,n.offline.usePersistentLicense):(pr(e),fr(e,t)),r=[],a=n.preferredAudioChannelCount,ur(e,a),o=l(e.variants),s=o.next();!s.done;s=o.next())u=s.value,r.push(br(u));for(c=l(e.textStreams),d=c.next();!d.done;d=c.next())f=d.value,r.push(Tr(f));for(h=l(e.imageStreams),p=h.next();!p.done;p=h.next())g=p.value,r.push(wr(g));return T(_,n.offline.trackSelectionCallback(r),2);case 2:for(m=_.h,v=e.presentationTimeline.getDuration(),y=0,b=l(m),k=b.next();!k.done;k=b.next())A=k.value,I=A.bandwidth*v/8,y+=I;return x(_,3),T(_,n.offline.downloadSizeCallback(y),5);case 5:if(!_.h)throw new le(2,9,9014);S(_,4);break;case 3:if((C=E(_))instanceof le)throw C;throw new le(2,9,9015);case 4:for(M=new Set,R=new Set,D=new Set,N=l(m),k=N.next();!k.done;k=N.next())"variant"==(P=k.value).type&&M.add(P.id),"text"==P.type&&R.add(P.id),"image"==P.type&&D.add(P.id);e.variants=e.variants.filter((function(e){return M.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return R.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return D.has(e.id)})),function(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var n=l(t),i=n.next();!i.done;i=n.next())for(var r=(i=l(t)).next();!r.done;r=i.next());for(t=l(e),n=t.next();!n.done;n=t.next())for(n=l(e),i=n.next();!i.done;i=n.next());}(e),w(_)}}))},i.remove=function(e){return fh(this,function(e,t){var n,i,r,a,o,s;return _((function(u){switch(u.g){case 1:if(dh(),null==(n=qf(t))||"manifest"!=n.g)throw new le(2,9,9004,t);return i=n,r=new _f,k(u),T(u,r.init(),4);case 4:return T(u,Pf(r,i.Ia(),i.la()),5);case 5:return T(u,(a=u.h).getManifests([i.key()]),6);case 6:return o=u.h,s=o[0],T(u,Promise.all([sh(e,s,r),uh(a,i,s)]),2);case 2:return A(u),T(u,r.destroy(),8);case 8:I(u,0)}}))}(this,e))},i.xf=function(){return fh(this,function(e){var t,n,i,r,a,o,s,u,c,d;return _((function(f){switch(f.g){case 1:return dh(),t=e.O,n=e.o.drm,i=new _f,r=!1,k(f),T(f,i.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),o=l(a),s=o.next();case 5:if(s.done){f.v(2);break}return T(f,(u=s.value).getAll(),8);case 8:return c=f.h,T(f,Qf(n,t,c),9);case 9:return d=f.h,T(f,u.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),f.v(5);break;case 2:return A(f),T(f,i.destroy(),11);case 11:I(f,3);break;case 3:return f.return(!r)}}))}(this))},i.list=function(){return fh(this,_((function(i){switch(i.g){case 1:return dh(),e=[],t=new _f,k(i),T(i,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){t({Ia:n,la:i},e)}))}))}(t,(function(t,i){n=n.then((function(){return _((function(n){if(1==n.g)return T(n,i.getAllManifests(),2);n.h.forEach((function(n,i){var r=eh(new Gf("manifest",t.Ia,t.la,i),n);e.push(r)})),w(n)}))}))})),T(i,n,2);case 2:return A(i),T(i,t.destroy(),6);case 6:I(i,3);break;case 3:return i.return(e)}})));var e,t,n},F("shaka.offline.Storage",rh),rh.deleteAll=function(){var e;return _((function(t){return 1==t.g?(e=new _f,k(t),T(t,function(e){var t,n;return _((function(i){return 1==i.g?(t=Array.from(e.g.values()),(n=0=t.data.length)return e;e=[];for(var n={},i=(t=l(t.data)).next();!i.done;n={ec:n.ec},i=t.next())n.ec=i.value,e.some(function(e){return function(t){return ie(t,e.ec)}}(n))||e.push(n.ec);return rt.apply(Qe,c(e))}(e.initData)),this.dispatchEvent(t)}}function _h(e,t){this.keySystem=e;for(var n=!1,i=l(t),r=i.next();!r.done;r=i.next()){var a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(r=r.value).initDataTypes,sessionTypes:["temporary"],label:r.label},o=!1;if(r.audioCapabilities)for(var s=l(r.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.audioCapabilities.push(u),n=!0));if(r.videoCapabilities)for(u=(s=l(r.videoCapabilities)).next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==r.persistentState&&(n=!1),n)return void(this.g=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Ph(e){var t=this.mediaKeys;return t&&t!=e&&jh(t,null),delete this.mediaKeys,(this.mediaKeys=e)?jh(e,this):Promise.resolve()}function Lh(e){this.g=new MSMediaKeys(e),this.h=new Li}function jh(e,t){if(e.h.lb(),!t)return Promise.resolve();e.h.B(t,"msneedkey",Nh);try{return ao(t,HTMLMediaElement.HAVE_METADATA,e.h,(function(){t.msSetMediaKeys(e.g)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Oh(e){ea.call(this),this.j=null,this.l=e,this.i=this.g=null,this.h=new Li,this.sessionId="",this.expiration=NaN,this.closed=new hi,this.keyStatuses=new Bh}function Uh(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new Zr("keystatuseschange"),e.dispatchEvent(n)}function Bh(){this.size=0,this.g=void 0}function Fh(){return Promise.reject(Error("The key system specified is not supported."))}function Vh(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Hh(){throw new TypeError("Illegal constructor.")}function Kh(){throw this.keySystem="",new TypeError("Illegal constructor.")}function Gh(e){return tp?tp+e.charAt(0).toUpperCase()+e.slice(1):e}function qh(e,t){try{var n=new Xh(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function zh(e){var t=this.mediaKeys;return t&&t!=e&&Yh(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Yh(e,this),Promise.resolve()}function Xh(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video");for(var a=l(t),o=a.next();!o.done;o=a.next()){var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(o=o.value).initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var c=l(o.audioCapabilities),d=c.next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,r.canPlayType(d.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(d),i=!0));if(o.videoCapabilities)for(d=(c=l(o.videoCapabilities)).next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,r.canPlayType(d.contentType,this.g)&&(s.videoCapabilities.push(d),i=!0));if(u||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i)return void(this.h=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Wh(e){this.l=e,this.g=null,this.h=new Li,this.i=[],this.j=new Map}function Yh(e,t){e.g=t,e.h.lb();var n=tp;t&&(e.h.B(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=ae(t.initData),e.g.dispatchEvent(n)})),e.h.B(t,n+"keymessage",(function(t){var n=$h(e,t.sessionId);n&&(t=new Zr("message",{messageType:null==n.keyStatuses.g?"licenserequest":"licenserenewal",message:t.message}),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.h.B(t,n+"keyadded",(function(t){(t=$h(e,t.sessionId))&&(Zh(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.h.B(t,n+"keyerror",(function(t){var n=$h(e,t.sessionId);n&&n.handleError(t)})))}function $h(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function Jh(e,t,n){ea.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new hi,this.keyStatuses=new ep}function Qh(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var i=oe(ge("LOAD_SESSION|"+n));else{var r=ge("PERSISTENT|");i=rt(r,t)}else i=oe(t)}catch(e){return Promise.reject(e)}e.h=new hi;var a=Gh("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Fe((function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}})).T(.01)}return e.h}function Zh(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new Zr("keystatuseschange"),e.dispatchEvent(n)}function ep(){this.size=0,this.g=void 0}mh((function(){kg()}),-2),mh((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",yh),document.addEventListener("webkitfullscreenerror",yh),document.addEventListener("mozfullscreenchange",yh),document.addEventListener("mozfullscreenerror",yh),document.addEventListener("MSFullscreenChange",yh),document.addEventListener("MSFullscreenError",yh)}})),mh((function(){})),mh((function(){!qe()&&navigator.mediaCapabilities||!e.MediaSource||(navigator.mediaCapabilities={},navigator.mediaCapabilities.decodingInfo=bh)}),-1),mh((function(){var t=Xe();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),n.some((function(e){return e.startsWith("codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}():t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(Th(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Th()):(We("Tizen 2")||We("Tizen 3")||We("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=ki(t)&&e(t)}}()),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex((function(e){return e.startsWith("codecs=")}));if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex((function(e){return e.startsWith("vp09")}));return 0<=a&&(r[a]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)}}()})),m(wh,ea),wh.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},wh.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},mh((function(){screen.orientation||null!=e.orientation&&function(){function t(){switch(e.orientation){case-90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new wh;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new Zr("change",{});n.dispatchEvent(e)}))}()})),Eh.prototype.createMediaKeys=function(){var e=new Ah(this.keySystem);return Promise.resolve(e)},Eh.prototype.getConfiguration=function(){return this.g},Ah.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Ch(this.g,e)},Ah.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Ch,ea),(i=Ch.prototype).generateRequest=function(e,t){var n=this;this.g=new hi;try{var i=this.l.createSession("video/mp4",oe(t));this.j=i,this.sessionId=i.sessionId||"",this.h.B(this.j,"webkitkeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new Zr("message",{messageType:null==n.keyStatuses.g?"license-request":"license-renewal",message:ae(e.message)}),n.dispatchEvent(e)})),this.h.B(i,"webkitkeyadded",(function(){n.i&&(Mh(n,"usable"),n.i.resolve(),n.i=null)})),this.h.B(i,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.j.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.i)n.i.reject(e),n.i=null;else switch(n.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Mh(n,"output-not-allowed");break;default:Mh(n,"internal-error")}})),Mh(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.i=new hi;try{this.j.update(oe(e))}catch(e){this.i.reject(e)}return this.i},i.close=function(){try{this.j.close(),this.closed.resolve(),this.h.lb()}catch(e){this.closed.reject(e)}return this.closed},i.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(i=Rh.prototype).forEach=function(e){this.g&&e(this.g,Ga.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ga.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},mh((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=kh,e.MediaKeys=Ah,e.MediaKeySystemAccess=Eh,navigator.requestMediaKeySystemAccess=xh)})),_h.prototype.createMediaKeys=function(){var e=new Lh(this.keySystem);return Promise.resolve(e)},_h.prototype.getConfiguration=function(){return this.g},Lh.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Oh(this.g,e)},Lh.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Oh,ea),(i=Oh.prototype).generateRequest=function(e,t){var n=this;this.g=new hi;try{this.j=this.l.createSession("video/mp4",oe(t),null),this.h.B(this.j,"mskeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new Zr("message",{messageType:null==n.keyStatuses.g?"license-request":"license-renewal",message:ae(e.message)}),n.dispatchEvent(e)})),this.h.B(this.j,"mskeyadded",(function(){n.g?(Uh(n,"usable"),n.g.resolve(),n.g=null):n.i&&(Uh(n,"usable"),n.i.resolve(),n.i=null)})),this.h.B(this.j,"mskeyerror",(function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=n.j.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.i)n.i.reject(e),n.i=null;else switch(n.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Uh(n,"output-not-allowed");break;default:Uh(n,"internal-error")}})),Uh(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.i=new hi;try{this.j.update(oe(e))}catch(e){this.i.reject(e)}return this.i},i.close=function(){try{this.j.close(),this.closed.resolve(),this.h.lb()}catch(e){this.closed.reject(e)}return this.closed},i.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(i=Bh.prototype).forEach=function(e){this.g&&e(this.g,Ga.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ga.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},mh((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,e.MediaKeys=Lh,e.MediaKeySystemAccess=_h,navigator.requestMediaKeySystemAccess=Dh,HTMLMediaElement.prototype.setMediaKeys=Ph)})),Hh.prototype.createSession=function(){},Hh.prototype.setServerCertificate=function(){},Kh.prototype.getConfiguration=function(){},Kh.prototype.createMediaKeys=function(){},mh((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Fh,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vh,e.MediaKeys=Hh,e.MediaKeySystemAccess=Kh)}),-10),Xh.prototype.createMediaKeys=function(){var e=new Wh(this.g);return Promise.resolve(e)},Xh.prototype.getConfiguration=function(){return this.h},Wh.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.g||document.createElement("video");return t.src||(t.src="about:blank"),e=new Jh(t,this.l,e),this.i.push(e),e},Wh.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Jh,ea),(i=Jh.prototype).handleError=function(e){var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Zh(this,"output-restricted"):Zh(this,1==t?"expired":"internal-error"))},i.generateRequest=function(e,t){return Qh(this,t,null)},i.load=function(e){return"persistent-license"==this.l?Qh(this,null,e):Promise.reject(Error("Not a persistent session."))},i.update=function(e){var t=new hi;return function e(t,n,i){if(t.g)t.g.then((function(){return e(t,n,i)})).catch((function(){return e(t,n,i)}));else{if(t.g=n,"webkit-org.w3.clearkey"==t.i){var r=fe(i),a=JSON.parse(r);"oct"!=a.keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),r=tt(a.keys[0].k),a=tt(a.keys[0].kid)}else r=oe(i),a=null;var o=Gh("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},i.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Gh("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},i.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(i=ep.prototype).forEach=function(e){this.g&&e(this.g,Ga.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ga.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var tp="";function np(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function ip(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function rp(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function ap(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function op(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function sp(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function up(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function lp(t,n,i){return new e.TextTrackCue(t,n,i)}function cp(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function dp(){}mh((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)tp="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=qh,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=zh,e.MediaKeys=Wh,e.MediaKeySystemAccess=Xh}})),mh((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=ip,Object.defineProperty(t,"disablePictureInPicture",{get:ap,set:op,enumerable:!0,configurable:!0}),document.exitPictureInPicture=rp,document.addEventListener("webkitpresentationmodechanged",np,!0))}})),mh((function(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=sp)})),mh((function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),mh((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=up)}})),mh((function(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=lp;else if(6==n)t=cp;else{try{var i=!!lp(1,2,"")}catch(e){i=!1}i&&(t=lp)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}})),dp.prototype.parseInit=function(){},dp.prototype.parseMedia=function(e,t){for(var n=null,i=[],r=fe(e).split(/\r?\n/),a=(r=l(r)).next();!a.done;a=r.next())if((a=a.value)&&!/^\s+$/.test(a)&&(a=fp.exec(a))){var o=hp.exec(a[1]);a=new ft(o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),t.segmentEnd?t.segmentEnd:o+2,a[2]),n&&(n.endTime=o,i.push(n)),n=a}return n&&i.push(n),i},F("shaka.text.LrcTextParser",dp),dp.prototype.parseMedia=dp.prototype.parseMedia,dp.prototype.parseInit=dp.prototype.parseInit;var fp=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,hp=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function pp(){}function gp(e,t,n,i,r,a,o,s,u,c){var d=e.parentNode;if(e.nodeType==Node.TEXT_NODE){var f=document.createElement("span");f.textContent=e.textContent,e=f}if(s="default"==(e.getAttribute("xml:space")||(s?"default":"preserve")),f=/\S/.test(e.textContent),!(e.hasAttribute("begin")||e.hasAttribute("end")||e.hasAttribute("dur")||f||"br"==e.tagName||u&&!s))return null;var h=kp(e,n);for(f=h.start,h=h.end;d&&d.nodeType==Node.ELEMENT_NODE&&"tt"!=d.tagName;)f=(h=xp(d,n,f,h)).start,h=h.end,d=d.parentNode;if(null==f&&(f=0),f+=t,h=null==h?1/0:h+t,"br"==e.tagName)return(i=new ft(f,h,"")).lineBreak=!0,i;var p="";if(d=[],Array.from(e.childNodes).every((function(e){return e.nodeType==Node.TEXT_NODE})))p=e.textContent,s&&(p=(p=p.trim()).replace(/\s+/g," "));else for(var g=l(e.childNodes),m=g.next();!m.done;m=g.next())(m=gp(m.value,t,n,i,r,a,o,s,!0,c))&&d.push(m);if((t=new ft(f,h,p)).nestedCues=d,c&&(t.cellResolution=c),(a=wp(e,"region",a,"")[0])&&a.getAttribute("xml:id")){var v=a.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==v}))[0]}for(o=null,n=(c=l(Bp)).next();!n.done&&!(o=wp(e,"backgroundImage",i,"#",n.value)[0]);n=c.next());return function(e,t,n,i,r,a,o){"rtl"==vp(t,n,r,"direction",a=a||o)&&(e.direction="rtl"),"tb"==(o=vp(t,n,r,"writingMode",a))||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=bt),(o=vp(t,n,r,"textAlign",a))?(e.positionAlign=Up[o],e.lineAlign=Op[o],e.textAlign=mt[o.toUpperCase()]):e.textAlign="start",(o=vp(t,n,r,"displayAlign",a))&&(e.displayAlign=yt[o.toUpperCase()]);(o=vp(t,n,r,"color",a))&&(e.color=o);(o=vp(t,n,r,"backgroundColor",a))&&(e.backgroundColor=o);(o=vp(t,n,r,"border",a))&&(e.border=o);(o=vp(t,n,r,"fontFamily",a))&&(e.fontFamily=o);(o=vp(t,n,r,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),o=vp(t,n,r,"wrapOption",a),e.wrapLine=!o||"noWrap"!=o,(o=vp(t,n,r,"lineHeight",a))&&o.match(Mp)&&(e.lineHeight=o),(o=vp(t,n,r,"fontSize",a))&&(o.match(Mp)||o.match(Cp))&&(e.fontSize=o),(o=vp(t,n,r,"fontStyle",a))&&(e.fontStyle=Ct[o.toUpperCase()]);if(i){o=i.getAttribute("imageType")||i.getAttribute("imagetype");var s=i.getAttribute("encoding");i=i.textContent.trim(),"PNG"==o&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)}(i=vp(t,n,r,"letterSpacing",a))&&i.match(Mp)&&(e.letterSpacing=i),(i=vp(t,n,r,"linePadding",a))&&i.match(Mp)&&(e.linePadding=i),(a=vp(t,n,r,"opacity",a))&&(e.opacity=parseFloat(a));(n=yp(n,r,"textDecoration"))&&mp(e,n),(t=bp(t,r,"textDecoration"))&&mp(e,t)}(t,e,a,o,r,u,0==d.length),t}function mp(e,t){for(var n=l(t.split(" ")),i=n.next();!i.done;i=n.next())switch(i.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&<(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&<(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&<(e.textDecoration,"overline")}}function vp(e,t,n,i,r){return r=void 0===r||r,(e=bp(e,n,i))?e:r?yp(t,n,i):null}function yp(e,t,n){if(!e)return null;var i=Wl(e,"http://www.w3.org/ns/ttml#styling",n);return i||Tp(e,t,n)}function bp(e,t,n){var i=Wl(e,"http://www.w3.org/ns/ttml#styling",n);return i||Tp(e,t,n)}function Tp(e,t,n){e=wp(e,"style",t,"");for(var i=null,r=0;rn.length)return a;var o=e;for(e=null;o&&!(e=r?Wl(o,r,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(r=(t=l(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=l(n)).next();!o.done;o=e.next())if(i+(o=o.value).getAttribute("xml:id")==r){a.push(o);break}return a}function xp(e,t,n,i){return e=kp(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==i?i=e.end:null!=e.start&&(i+=e.start),{start:n,end:i}}function kp(e,t){var n=Sp(e.getAttribute("begin"),t),i=Sp(e.getAttribute("end"),t),r=Sp(e.getAttribute("dur"),t);return null==i&&null!=r&&(i=n+r),{start:n,end:i}}function Sp(e,t){var n=null;if(Dp.test(e)){n=Dp.exec(e);var i=Number(n[1]),r=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.h)/t.frameRate)+60*r+3600*i}else if(Np.test(e))n=Ep(Np,e);else if(_p.test(e))n=Ep(_p,e);else if(Pp.test(e))n=Pp.exec(e),n=Number(n[1])/t.frameRate;else if(Lp.test(e))n=Lp.exec(e),n=Number(n[1])/t.g;else if(jp.test(e))n=Ep(jp,e);else if(e)throw new le(2,2,2001,"Could not parse cue time range in TTML");return n}function Ep(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function Ap(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}Ri["application/x-subtitle-lrc"]=function(){return new dp},pp.prototype.parseInit=function(){},pp.prototype.parseMedia=function(e,t){var n=fe(e),i=[],r=new DOMParser,a=null;if(""==n)return i;try{a=r.parseFromString(n,"text/xml")}catch(e){throw new le(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new le(2,2,2005,n.textContent);var o=a.getElementsByTagName("tt")[0];if(!o)throw new le(2,2,2005,"TTML does not contain tag.");if(!(r=o.getElementsByTagName("body")[0]))return[];n=Wl(o,"http://www.w3.org/ns/ttml#parameter","frameRate");var s=Wl(o,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),u=Wl(o,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),c=Wl(o,"http://www.w3.org/ns/ttml#parameter","tickRate"),d=Wl(o,"http://www.w3.org/ns/ttml#parameter","cellResolution");a=o.getAttribute("xml:space")||"default";var f=Wl(o,"http://www.w3.org/ns/ttml#styling","extent");if("default"!=a&&"preserve"!=a)throw new le(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,n=new Ap(n,s,u,c),d=d&&(d=/^(\d+) (\d+)$/.exec(d))?{columns:parseInt(d[1],10),rows:parseInt(d[2],10)}:null,s=(s=o.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(s):[],u=Array.from(o.getElementsByTagName("style")),c=[];for(var h=l(o=Array.from(o.getElementsByTagName("region"))),p=h.next();!p.done;p=h.next()){var g=p.value;p=new Mt;var m=g.getAttribute("xml:id");if(m){p.id=m;var v,y,b=null;f&&(b=Ip.exec(f)||Rp.exec(f)),m=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=yp(g,u,"extent"))&&(null!=(v=(y=Ip.exec(v))||Rp.exec(v))&&(p.width=Number(v[1]),p.height=Number(v[2]),y||(null!=m&&(p.width=100*p.width/m),null!=b&&(p.height=100*p.height/b)),p.widthUnits=y||null!=m?Rt:0,p.heightUnits=y||null!=b?Rt:0)),(g=yp(g,u,"origin"))&&(null!=(v=(y=Ip.exec(g))||Rp.exec(g))&&(p.viewportAnchorX=Number(v[1]),p.viewportAnchorY=Number(v[2]),y||(null!=b&&(p.viewportAnchorY=100*p.viewportAnchorY/b),null!=m&&(p.viewportAnchorX=100*p.viewportAnchorX/m)),p.viewportAnchorUnits=y||null!=m?Rt:0))}else p=null;p&&c.push(p)}if(zl(r,"p").length)throw new le(2,2,2001,"

can only be inside

in TTML");for(f=(r=l(zl(r,"div"))).next();!f.done;f=r.next()){if(zl(f=f.value,"span").length)throw new le(2,2,2001," can only be inside

in TTML");if((h=zl(f,"p"))&&h.length)for(h=(f=l(h)).next();!h.done;h=f.next())(h=gp(h.value,t.periodStart,n,s,u,o,c,a,!1,d))&&i.push(h);else(f=gp(f,t.periodStart,n,s,u,o,c,a,!1,d))&&i.push(f)}}return i},F("shaka.text.TtmlTextParser",pp),pp.prototype.parseMedia=pp.prototype.parseMedia,pp.prototype.parseInit=pp.prototype.parseInit;var Ip=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Cp=/^(\d{1,2}(?:\.\d+)?|100)%$/,Mp=/^(\d+px|\d+em|\d*\.?\d+c)$/,Rp=/^(\d+)px (\d+)px$/,Dp=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Np=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,_p=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Pp=/^(\d*(?:\.\d*)?)f$/,Lp=/^(\d*(?:\.\d*)?)t$/,jp=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Op={left:xt,center:"center",right:"end",start:xt,end:"end"},Up={left:"line-left",center:"center",right:"line-right"},Bp=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Fp(){this.s=new pp}function Vp(){}function Hp(e){for(var t=l(Object.entries(St)),n=t.next();!n.done;n=t.next()){var i=l(n.value);n=i.next().value,i=i.next().value;var r=new ft(0,0,"");r.color=i,e.set(n,r)}for(n=(t=l(Object.entries(Et))).next();!n.done;n=t.next())n=(i=l(n.value)).next().value,i=i.next().value,(r=new ft(0,0,"")).backgroundColor=i,e.set(n,r)}function Kp(e,t,n){0===n.size&&Hp(n);e:{var i=e;e=[];for(var r=-1,a="",o=0;o",o);if(s<=o){e=i;break e}s=i.substring(o+1,s);var u=e.pop();if(u===s)a+="/"+s+">";else{if(!u.startsWith("c.")||"c"!==s){e=i;break e}a+="/"+u+">"}o+=s.length+1}else"<"===i[o]?r=o+1:">"===i[o]&&0"+e+"","span")){if(i=[],1==(r=r.childNodes).length&&((a=r[0]).nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE))return void(t.payload=e);for(r=(e=l(r)).next();!r.done;r=e.next())qp(r.value,t,i,n);t.nestedCues=i}else t.payload=e}function Gp(e,t){return e&&0>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function ig(e){return 3600*((e=lg.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Ri["application/ttml+xml"]=function(){return new pp},Fp.prototype.parseInit=function(e){var t=!1;if((new Re).box("moov",De).box("trak",De).box("mdia",De).box("minf",De).box("stbl",De).U("stsd",Ne).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new le(2,2,2007)},Fp.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new Re).box("mdat",_e((function(e){i=!0,r=r.concat(n.s.parseMedia(e,t))}))).parse(e,!1),!i)throw new le(2,2,2007);return r},F("shaka.text.Mp4TtmlParser",Fp),Fp.prototype.parseMedia=Fp.prototype.parseMedia,Fp.prototype.parseInit=Fp.prototype.parseInit,Ri['application/mp4; codecs="stpp"']=function(){return new Fp},Ri['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Fp},Ri['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Fp},Vp.prototype.parseInit=function(){},Vp.prototype.parseMedia=function(e,t){var n=fe(e),i=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(i[0]))throw new le(2,2,2e3);if(n=t.periodStart,i[0].includes("X-TIMESTAMP-MAP")){var r=i[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=i[0].match(/MPEGTS:(\d+)/m);if(r&&a){if(null==(n=Xp(new Ed(r[1]))))throw new le(2,2,2e3);for(a=Number(a[1]),r=t.segmentStart;95443.7176888889<=r;)r-=95443.7176888889,a+=8589934592;n=t.periodStart+a/9e4-n}}a=[];for(var o=(r=l(i[0].split("\n"))).next();!o.done;o=r.next())if(o=o.value,/^Region:/.test(o)){o=new Ed(o);var s=new Mt;Cd(o),Ad(o);for(var u=Cd(o);u;){var c=s,d=u;(u=/^id=(.*)$/.exec(d))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(d))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),Ad(o),u=Cd(o)}a.push(s)}for(Hp(r=new Map),o=[],s=(i=l(i.slice(1))).next();!s.done;s=i.next()){if((1!=(s=s.value.split("\n")).length||s[0])&&!/^NOTE($|[ \t])/.test(s[0])&&"STYLE"==s[0]&&s[1].includes("::cue")){c="global",(u=s[1].match(/\((.*)\)/))&&(c=u.pop()),u=s.slice(2,-1),s[1].includes("}")&&(d=/\{(.*?)\}/.exec(s[1]))&&(u=d[1].split(";")),d=new ft(0,0,"");for(var f=!1,h=0;h/,p=/^WEBVTT([ \t].*)?$/,g=function(e,t,n){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new m,this.syncCueParsing=n,this.regionList=[],this.maxCueBatch=1e3};function m(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}}function v(){this.values=Object.create(null)}v.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i=0&&t<=100&&(this.set(e,t),!0)}};var y=new r.a(0,0,0),b="middle"===y.align?"middle":"center";function T(e,t,n){var i=e;function r(){var t=function(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(a);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(l,""),t}function o(){e=e.replace(f,"")}if(o(),t.startTime=r(),o(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),o(),t.endTime=r(),o(),function(e,t){var i=new v;!function(e,t,n,i){for(var r=i?e.split(i):[e],a=0;a<=r.length;a+=1)if("string"==typeof r[a]){var o=r[a].split(n);if(2===o.length)t(o[0],o[1])}}(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",b,"end"]);break;case"position":var s=t.split(",");i.percent(e,s[0]),2===s.length&&i.alt("positionAlign",s[1],["start",b,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",b,"end","left","right"])}}),c,d),t.region=i.get("region",null),t.vertical=i.get("vertical","");var r=i.get("line","auto");"auto"===r&&-1===y.line&&(r=-1),t.line=r,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",b);var a=i.get("position","auto");"auto"===a&&50===y.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}g.prototype={parse:function(e,t){var n,a=this;function o(){for(var e=a.buffer,t=0;t1&&this.shakaPlayer.trickPlay(e)},o.seek=function(e){if("LIVE"!==this.streamType){var t=this.shakaPlayer.seekRange().end;this.videoTag.currentTime=e<0?t+e:e}},o.getPlaybackRate=function(){return this.shakaPlayer?this.shakaPlayer.getPlaybackRate()||1:this.videoTag.playbackRate},o.isLive=function(){return this.shakaPlayer.isLive()},o.isDvr=function(){return"DVR"===this.streamType},o.getCurrentTime=function(){var e=this.videoTag.currentTime;return this.shakaPlayer.isLive()&&"DVR"===this.streamType&&(e-=this.shakaPlayer.seekRange().end),e},o.getDuration=function(){var e=this.loadedItem,t=this.shakaPlayer,n=this.videoTag.duration;if(!e)return n;var i=e.minDvrWindow;if(this.shakaPlayer.isLive()){var r=t.seekRange();n=r.start-r.end,n=Object(m.a)(n,i)?n:1/0}return this.streamType=Object(m.b)(n,i),n},o.getLoadedItem=function(){return this.loadedItem},o.getSeekRange=function(){return this.shakaPlayer.seekRange()},o.getVariantHistory=function(e){return e=e||0,this.shakaPlayer.getStats().switchHistory.filter((function(t){return"variant"===t.type&&t.timestamp>e}))},o.setLoadedItem=function(e){this.loadedItem=e,this.streamType="VOD"},o.unload=function(){this.loadedItem=null,this.shakaPlayer.unload()},o.destroy=function(){return window.VTTCue=u.a,this.loadedItem=null,this.shakaPlayer.destroy()},r}(h.a),b=n(37),T=n(160),w=n(3),x=n(11),k=n(13),S=n(27),E=n(57),A=n(145),I=n(146),C=n(147),M=n(124),R=n(79),D=n(161),N=n(1),_=n(148),P=g.a.util.Error,L=P.Severity.RECOVERABLE,j=P.Category,O=j.NETWORK,U=j.MEDIA,B=j.MANIFEST,F=j.PLAYER,V=j.DRM,H=P.Code,K=H.UNSUPPORTED_SCHEME,G=H.BAD_HTTP_STATUS,q=H.HTTP_ERROR,z=H.TIMEOUT,X=H.MP4_SIDX_WRONG_BOX_TYPE,W=H.VIDEO_ERROR,Y=H.DASH_INVALID_XML,$=H.CONTENT_UNSUPPORTED_BY_BROWSER,J=H.RESTRICTIONS_CANNOT_BE_MET,Q=H.REQUEST_FILTER_ERROR,Z=H.RESPONSE_FILTER_ERROR;function ee(e,t,n){var o,s,u,c=this,d={},f=null,p=null,m=Object(D.a)(this,t.bandwidthEstimate),v=t.bitrateSelection;function E(){p.addEventListener("error",ne),p.addEventListener("trackschanged",ce),p.addEventListener("adaptation",(function(){c.pollAdaptation=!0})),p.addEventListener("emsg",P),Object(i.i)(d,(function(e,t){n.addEventListener(t,e)})),c.service.on("cues",ye),m.start()}function P(e){var t=e.detail,n=t.startTime,i=t.endTime,r=t.id,a=t.schemeIdUri,o=t.timescale,s=t.presentationTimeDelta,u=t.eventDuration,l=t.messageData,d={metadataType:"emsg",id:r,schemeIdUri:a,timescale:o,presentationTimeOffset:s,duration:u,start:n,end:i},f=c.createCue(n,i,JSON.stringify(d));f.value=l,f._parsed=!0,c.addVTTCue({type:"metadata",cue:f},r+"_"+s+"_"+n+"_"+i)&&(delete d.metadataType,d.messageData=l,c.trigger(w.L,{metadataType:"emsg",metadata:d}))}function j(e,n){return Object(T.a)(e,t.qualityLabels,n)}function H(){p&&(p.removeEventListener("error",ne),p.removeEventListener("trackschanged",ce),p.removeEventListener("emsg",P)),Object(i.i)(d,(function(e,t){n.removeEventListener(t,e)})),c.service&&c.service.off("cues",ye),m.stop()}function ee(){if(f=null,H(),p){var e=p.getNetworkingEngine();e.clearAllRequestFilters(),e.clearAllResponseFilters(),p=null}if(c.service){var t=c.service.destroy();return c.service=null,t}}function te(){c.seeking?c.setState(w.nb):c.state===w.pb&&(c.stallTime=n.currentTime,c.setState(w.qb))}function ne(e){if(!(n.src||n.played&&n.played.length))return c.destroy(),void(p=ie(n));var t=e.detail?e.detail:e,r=function(e){var t=e.category,n=e.code,i=e.data,r=e.severity!==L,a=n===X,o=r?24e4:34e4,s=r?N.m:null;if(r)switch(n){case K:o=241004;break;case G:var u=Object(_.b)(24e4,i[1],i[0]);o=u.code,s=u.key;break;case q:var c=Object(_.b)(24e4,0,i[0]);o=c.code,s=c.key;break;case z:o=241001;break;case X:o=244604;break;case W:o=244e3,i[0]>1&&i[0]<5&&(o+=i[0]-1);break;case Y:o=242601;break;case $:s=N.l,o=242632;break;case J:o=242635;break;case Q:case Z:o=241005;break;default:l.Browser.ie&&e.message&&0===e.message.indexOf("Access is denied.")?o=241012:t===B?o=242600:t===O?o=241e3:t===U?o=244e3:t===F?o=249e3:t===V&&(o=246e3)}return{key:s,code:o,fatal:r,changeLevel:a}}(t),a=r.key,o=r.code,s=r.fatal,u=r.changeLevel;if(s){if(u){var d=function(){var e=Object(i.m)(c.shakaLevels,{active:!0});if(e)for(var t=0;t0&&n.currentTimev,a=n.language!==s;v=n.bandwidth,p.selectVariantTrack(n,r||a)}var o=0===e;c.service.enableAbr(o),o||(c.pollAdaptation=!0)}}function le(e){var t=c.audioTracks[e||he()];if(t){var n=c.shakaAudioTracks[t.shakaIndex];n&&(s=n.language,p.selectAudioLanguage(s),ve(c.currentQuality))}}function ce(){var e=p.getTextTracks();c._tracksById&&e.length===Object.keys(c._tracksById).length||(e=e.filter((function(e){return"Shaka Player TextTrack"!==e.label})).map((function(e){var t=e;return t.kind=(t.kind||"subtitles").replace(/^(.+[^s])$/,"$1s"),t.embedded=!0,t.label=Object(k.d)(t.language),t.source="currentTime",t})),c.addTextTracks(e));var t=p.getVariantTracks(),n=Object(i.m)(t,{active:!0}),r=Object(i.n)(t,"language"),a="video";if(c.tracksByLang=r,Object(i.F)(r)&&n){de(r[n.language]);var o=0;if(!c.service.abrEnabled()){var s=c.service.getVariantHistory();if(s.length){var u=s[0].id,l=Object(i.m)(c.jwLevels,{shakaId:u});o=c.jwLevels.indexOf(l)}}c.currentQuality=Math.max(0,o),ue(c.currentQuality),c.trigger(w.I,{levels:c.jwLevels,currentQuality:c.currentQuality}),function(e,t){var n=Object(i.l)(e[t],(function(e){return e.active})),r=[];Object.keys(e).forEach((function(i){i===t?r.push(n):r.push(e[i][0])})),Array.isArray(r)&&pe(r);c.trigger(w.g,{tracks:c.audioTracks,currentTrack:c.currentAudioIndex})}(r,n.language),le(c.currentAudioIndex),n.mimeType.indexOf("audio")>-1&&(a="audio"),c.trigger(w.T,{mediaType:a})}}function de(e){c.shakaLevels=e,c.shakaLevels.sort((function(e,t){return e.height1&&c.jwLevels.unshift({label:"Auto",shakaId:"auto"})}function fe(e,t){return Object(i.v)(e)&&!Object(i.u)(e)&&e>=0&&e1,o=Object(k.d)(r);return"und"===r?o="Unknown":"dv"===r&&(o="Audio Description"),a&&(o+=" ("+Object(T.d)(e.bandwidth)+" kbps)"),{autoselect:!1,defaulttrack:!!e.active,groupid:"default",language:e.language,name:o,shakaIndex:n,shakaId:e.id}})),c.currentAudioIndex=fe(c.currentAudioIndex,c.audioTracks)?c.currentAudioIndex:((n=Object(i.l)(c.audioTracks,(function(e){return e.defaulttrack&&"dv"!==e.language})))||(n=Object(i.l)(c.audioTracks,(function(e){return"dv"!==e.language}))),n?n.shakaIndex:0))}function ge(){c.livePausedItem=c.service.loadedItem,c.service.unload()}function me(){H(),c.service&&c.service.setLoadedItem(null),f=null}function ve(e){c.tracksByLang&&c.audioTracks&&de(c.tracksByLang[c.audioTracks[c.currentAudioIndex].language]),ue(e),c.currentQuality=e}function ye(e){var t=p.getTextTracks(),n=c.getSubtitlesTrack();if(n<0){var r=Object(i.m)(t,{active:!0});n=Object(i.p)(t,r)}var a=t[n];if(a){var o,s=Object(i.m)(c._tracksById,{language:a.language});o=s?s._id:a.kind+"s"+n,e.forEach((function(e){l.Browser.ie?e.align="middle":e.align="center",c.addVTTCue({type:a.kind+"s",cue:e,track:o})}))}return[]}c.video=n,c.drmUsed=null,c.position=0,c.levels=[],c.currentQuality=-1,c.supportsPlaybackRate=!0,c.service=null,c.adaptationId=-1,c.adaptationTs=-1,c.pollAdaptation=!1,c.livePausedItem=null,c.jwLevels=[],c.state=w.mb,Object(i.i)(A.a,(function(e,t){d[t]=e.bind(c)})),c.checkAdaptation=function(){var e=n.videoWidth,t=n.videoHeight,r=p.getStats(),a=r.width,o=r.height;c.shakaLevels||ce();var s=c.service.getVariantHistory(c.adaptationTs);if(s.length){var u=-1===c.adaptationTs,l=Object(i.l)(c.jwLevels,(function(n){return s.some((function(i){var r=i.id===n.shakaId&&(n.width===e&&n.height===t||null===n.width);return r&&(c.adaptationTs=i.timestamp),r}))}));if(l&&l.shakaId!==c.adaptationId){c.adaptationId=l.shakaId,c.pollAdaptation=!1;var d=c.jwLevels.indexOf(l),f=l.label,h=l.bitrate,g=c.service.abrEnabled(),m=g?"auto":"manual",v=g?"auto":"api";u&&(v="initial choice"),c.trigger(w.U,{level:{index:d,label:f,bitrate:h,width:a,height:o},bandwidth:r.estimatedBandwidth,mode:m,reason:v})}}else c.pollAdaptation=!1},Object(i.j)(c,h.a,I.a,C.a,M.a,{seeking:!1,eventsOn_:function(){p||(p=ie(n)),E()},eventsOff_:function(){if(!o||!l.Browser.firefox)return ee();c.remove(),c.setContainer(c.container)},init:function(){c.currentAudioIndex=-1,c.adaptationId=-1,c.adaptationTs=-1},preload:function(e){var t="auto"===e.preload?a.a:a.c;p||(p=ie(n));c.service.setMaxBuffer(t),H(),E(),f=ae(e)},load:function(e){H(),p&&n.src||(c.destroy(),p=ie(n),c.service.setLoadedItem(null));if(E(),c.service.setMaxBuffer(a.a),c.setState(w.nb),c.service.getLoadedItem()!==e)return c.adaptationId=-1,c.adaptationTs=-1,c.drmUsed=null,f=ae(e),n.play(),f;return re(e.tracks),f},pause:function(){p&&p.isLive()&&!c.service.isDvr()&&!c.livePausedItem&&(ge(),c.setState(w.ob));n.pause()},getQualityLevels:function(){return Object(i.A)(c.jwLevels,(function(e){return Object(r.a)(e)}))},getCurrentQuality:function(){return c.currentQuality},getAudioTracks:function(){if(!Array.isArray(c.audioTracks))return[];return c.audioTracks},getCurrentAudioTrack:he,play:function(){var e=c.livePausedItem;e&&(c.livePausedItem=null,c.load(e));return n.play()||Object(R.a)(n)},seek:function(e){var t=c.getSeekRange(),n=t.end,r=t.start,a=e<0?n-r+e:e,o=c.getDuration(),s=this.video.currentTime;if(c.trigger(w.Q,{position:c.getCurrentTime(),offset:a,duration:o,currentTime:s,seekRange:t,metadata:{currentTime:s}}),c.seeking=!0,c.service.seek(e),0!==o&&o!==1/0&&Object(i.z)(o)){var u=this.video.currentTime;c.trigger(w.S,{position:c.getCurrentTime(),duration:o,currentTime:u,seekRange:t,metadata:{currentTime:u}})}},setCurrentQuality:function(e){fe(e,c.jwLevels)&&e!==c.currentQuality&&(ve(e),c.trigger(w.J,{currentQuality:e,levels:c.jwLevels}))},setAudioTracks:function(e){Array.isArray(e)&&(pe(e),c.trigger(w.g,{tracks:c.audioTracks,currentTrack:c.currentAudioIndex}))},setCurrentAudioTrack:function(e){var t;fe(e,c.audioTracks)&&(t=e,c.currentAudioIndex=t,fe(t,c.audioTracks)&&le(c.currentAudioIndex),c.trigger(w.g,{tracks:c.audioTracks,currentTrack:e}),c.trigger(w.h,{tracks:c.audioTracks,currentTrack:e}))},setPlaybackRate:function(e){c.service&&c.service.setPlaybackRate(e)},getPlaybackRate:function(){return c.service?c.service.getPlaybackRate():1},isLive:function(){return!!c.service&&c.service.isLive()},getCurrentTime:function(){return c.service?c.service.getCurrentTime():0},getDuration:function(){return c.service?c.service.getDuration():0},getSeekRange:function(){return c.service?c.service.getSeekRange():{start:0,end:0}},getLiveLatency:function(){var e=null,t=this.service.getSeekRange().end;return c.isLive()&&t&&(e=t-n.currentTime),e},setVisibility:function(e){(e=!!e)?Object(x.d)(c.container,{visibility:"visible",opacity:1}):Object(x.d)(c.container,{visibility:"",opacity:0})},stop:function(){me(),n.pause(),c.setState(w.mb)},setShakaPlayer:function(e){p=e},destroy:ee,supportsFullscreen:Object(i.d)(!0),getName:Object(i.d)({name:"shaka"}),renderNatively:(u=t.renderCaptionsNatively,l.Browser.chrome&&u),setSubtitlesTrack:function(e){M.a.setSubtitlesTrack.call(c,e);var n=p.getTextTracks()[e-1];c.renderNatively||(c._currentTextTrackIndex=e-1),n&&(p.selectTextLanguage(n.language),t.selectedCaptionCode=n.language),ve(c.currentQuality)},getBandwidthEstimate:function(){return p?p.getStats().estimatedBandwidth:null}}),d.loadeddata=function(){c.checkAdaptation(),[].forEach.call(n.textTracks,(function(e){if("Shaka Player TextTrack"===e.label)return e.inuse=!1,e.mode="hidden",void(e.embedded=!0)}))},d.timeupdate=function(){c.pollAdaptation&&c.checkAdaptation(),A.a.timeupdate.call(c)},d.waiting=te,d.ratechange=function(){if(0===n.playbackRate&&0!==n.defaultPlaybackRate){if(n.duration-n.currentTime<.4)return void A.a.ended.call(c);te()}else A.a.ratechange.call(c)}}Object(i.j)(ee.prototype,E.a),ee.getName=Object(i.d)({name:"shaka"});t.default=ee},78:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(2);function r(e){var t=[],n=(e=Object(i.i)(e)).split("\r\n\r\n");1===n.length&&(n=e.split("\n\n"));for(var r=0;r0&&(r=0),n.length>r+1&&n[r+1]){var a=n[r],o=a.indexOf(" --\x3e ");o>0&&(t.begin=Object(i.g)(a.substr(0,o)),t.end=Object(i.g)(a.substr(o+5)),t.text=n.slice(r+1).join("\r\n"))}return t}},79:function(e,t,n){"use strict";function i(e){return new Promise((function(t,n){if(e.paused)return n(r("NotAllowedError",0,"play() failed."));var i=function(){e.removeEventListener("play",a),e.removeEventListener("playing",o),e.removeEventListener("pause",o),e.removeEventListener("abort",o),e.removeEventListener("error",o)},a=function(){e.addEventListener("playing",o),e.addEventListener("abort",o),e.addEventListener("error",o),e.addEventListener("pause",o)},o=function(e){if(i(),"playing"!==e.type){var a='The play() request was interrupted by a "'+e.type+'" event.';return"error"===e.type?n(r("NotSupportedError",9,a)):n(r("AbortError",20,a))}t()};e.addEventListener("play",a)}))}function r(e,t,n){var i=new Error(n);return i.name=e,i.code=t,i}n.d(t,"a",(function(){return i}))},81:function(e,t,n){"use strict";var i=window.VTTCue;function r(e){if("string"!=typeof e)return!1;return!!{start:!0,middle:!0,end:!0,left:!0,right:!0}[e.toLowerCase()]&&e.toLowerCase()}if(!i){(i=function(e,t,n){var i=this;i.hasBeenReset=!1;var a="",o=!1,s=e,u=t,l=n,c=null,d="",f=!0,h="auto",p="start",g="auto",m=100,v="middle";Object.defineProperty(i,"id",{enumerable:!0,get:function(){return a},set:function(e){a=""+e}}),Object.defineProperty(i,"pauseOnExit",{enumerable:!0,get:function(){return o},set:function(e){o=!!e}}),Object.defineProperty(i,"startTime",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}}),Object.defineProperty(i,"endTime",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}}),Object.defineProperty(i,"text",{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}}),Object.defineProperty(i,"region",{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}}),Object.defineProperty(i,"vertical",{enumerable:!0,get:function(){return d},set:function(e){var t=function(e){return"string"==typeof e&&(!!{"":!0,lr:!0,rl:!0}[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");d=t,this.hasBeenReset=!0}}),Object.defineProperty(i,"snapToLines",{enumerable:!0,get:function(){return f},set:function(e){f=!!e,this.hasBeenReset=!0}}),Object.defineProperty(i,"line",{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}}),Object.defineProperty(i,"lineAlign",{enumerable:!0,get:function(){return p},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}}),Object.defineProperty(i,"position",{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}}),Object.defineProperty(i,"size",{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}}),Object.defineProperty(i,"align",{enumerable:!0,get:function(){return v},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}}),i.displayState=void 0}).prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)}}t.a=i},83:function(e,t,n){"use strict";function i(e,t){return e!==1/0&&Math.abs(e)>=Math.max(a(t),0)}function r(e,t){var n="VOD";return e===1/0?n="LIVE":e<0&&(n=i(e,a(t))?"DVR":"LIVE"),n}function a(e){return void 0===e?120:Math.max(e,0)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}))},84:function(e,t,n){"use strict";function i(e,t){var n=e.kind||"cc";return e.default||e.defaulttrack?"default":e._id||e.file||n+t}function r(e,t){var n=e.label||e.name||e.language;return n||(n="Unknown CC",(t+=1)>1&&(n+=" ["+t+"]")),{label:n,unknownCount:t}}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}))},85:function(e,t,n){"use strict";var i=n(81),r=n(8),a=n(27),o=n(4),s=n(78),u=n(2),l=n(1);function c(e){throw new l.q(null,e)}function d(e,t,i){e.xhr=Object(a.b)(e.file,(function(a){!function(e,t,i,a){var d,f,p=e.responseXML?e.responseXML.firstChild:null;if(p)for("xml"===Object(o.b)(p)&&(p=p.nextSibling);p&&p.nodeType===p.COMMENT_NODE;)p=p.nextSibling;try{if(p&&"tt"===Object(o.b)(p)){if(!e.responseXML)throw new Error("Empty XML response");d=function(e){e||c(306007);var t=[],n=e.getElementsByTagName("p"),i=30,r=e.getElementsByTagName("tt");if(r&&r[0]){var a=parseFloat(r[0].getAttribute("ttp:frameRate")||"");isNaN(a)||(i=a)}n||c(306005),n.length||(n=e.getElementsByTagName("tt:p")).length||(n=e.getElementsByTagName("tts:p"));for(var o=0;o\s+<").replace(/(<\/?)tts?:/g,"$1").replace(//g,"\r\n");if(p){var g=s.getAttribute("begin")||"",m=s.getAttribute("dur")||"",v=s.getAttribute("end")||"",y={begin:Object(u.g)(g,i),text:p};v?y.end=Object(u.g)(v,i):m&&(y.end=(y.begin||0)+Object(u.g)(m,i)),t.push(y)}}return t.length||c(306005),t}(e.responseXML),f=h(d),delete t.xhr,i(f)}else{var g=e.responseText;g.indexOf("WEBVTT")>=0?n.e(18).then(function(e){return n(165).default}.bind(null,n)).catch(Object(r.c)(301131)).then((function(e){var n=new e(window);f=[],n.oncue=function(e){f.push(e)},n.onflush=function(){delete t.xhr,i(f)},n.parse(g)})).catch((function(e){delete t.xhr,a(Object(l.z)(null,l.c,e))})):(d=Object(s.a)(g),f=h(d),delete t.xhr,i(f))}}catch(e){delete t.xhr,a(Object(l.z)(null,l.c,e))}}(a,e,t,i)}),(function(e,t,n,r){i(Object(l.y)(r,l.c))}))}function f(e){e&&e.forEach((function(e){var t=e.xhr;t&&(t.onload=null,t.onreadystatechange=null,t.onerror=null,"abort"in t&&t.abort()),delete e.xhr}))}function h(e){return e.map((function(e){return new i.a(e.begin,e.end,e.text)}))}n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return f}))},97:function(e,t,n){"use strict";function i(e){return e&&e.length?e.end(e.length-1):0}n.d(t,"a",(function(){return i}))}}]);