/*! For license information please see shaka-player.ba6d63bf3213ba56553b.js.LICENSE.txt */ (this.webpackJsonpLivePlayer=this.webpackJsonpLivePlayer||[]).push([[6],{55:function(e,t,n){(function(e){!function(){var n="undefined"!=typeof window?window:e,i={};for(var r in function(e,t,n){var i;function r(e){var t=0;return function(){return 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)L(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)L(e,t)&&n.push([t,e[t]]);return n}}));var F=this||self;function B(e,t){var n,i=e.split("."),r=F;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}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.ga,a.item.charCodeAt(0),t);return n}B("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," ")},B("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},B("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.me=function(e){if(this.ge||e>this.R.byteLength)throw be();this.g=e},i.cc=function(){for(var e=this.g;this.pa()&&0!=this.R.getUint8(this.g);)this.g+=1;return e=oe(this.R,e,this.g-e),this.g+=1,fe(e)},B("shaka.util.DataViewReader",ye),ye.prototype.readTerminatedString=ye.prototype.cc,ye.prototype.seek=ye.prototype.seek,ye.prototype.rewind=ye.prototype.me,ye.prototype.skip=ye.prototype.skip,ye.prototype.readBytes=ye.prototype.bb,ye.prototype.readUint64=ye.prototype.Hb,ye.prototype.readInt32=ye.prototype.ke,ye.prototype.readUint32=ye.prototype.N,ye.prototype.readUint16=ye.prototype.Gb,ye.prototype.readUint8=ye.prototype.aa,ye.prototype.getLength=ye.prototype.Te,ye.prototype.getPosition=ye.prototype.$,ye.prototype.hasMoreData=ye.prototype.pa;var we=1;function Te(e,t){this.g=e,this.h=t}function xe(e,t){var n=new Te(4,0),i=Ae,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function Se(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 Ee(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:we},Te.prototype.toString=function(){return"v"+this.g+"."+this.h};var Ae=null;function ke(e,t){return e.concat(t)}function Ie(){}function Me(e){return null!=e}function Ce(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 De(){this.i=[],this.h=[],this.g=!1}function Re(e){for(var t=_e(e);e.reader.pa()&&!e.parser.g;)e.parser.Kc(e.start+t,e.reader,e.partialOkay)}function Ne(e){for(var t=_e(e),n=e.reader.N(),i=(n=l(ee(n))).next();!i.done&&(e.parser.Kc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i=n.next());}function Pe(e){return function(t){e(t.reader.bb(t.reader.R.byteLength-t.reader.$()))}}function Le(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 je(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function _e(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}(i=De.prototype).box=function(e,t){var n=Le(e);return this.i[n]=Oe,this.h[n]=t,this},i.T=function(e,t){var n=Le(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.pa()&&!this.g;)this.Kc(0,e,t,n)},i.Kc=function(e,t,n,i){var r=t.$();if(i&&r+8>t.R.byteLength)this.g=!0;else{var a=t.N(),o=t.N(),s=!1;switch(a){case 0:a=t.R.byteLength-r;break;case 1:if(i&&t.$()+8>t.R.byteLength)return void(this.g=!0);a=t.Hb(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==Ue){if(i&&t.$()+4>t.R.byteLength)return void(this.g=!0);l=(c=t.N())>>>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.$(),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))}B("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 Ft(e,t){Bt(e)&&(e.i[e.h][e.g]=new jt(t,e.C,e.s,e.m,e.u),e.g++)}function Bt(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.C=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 _t;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&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!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.pa=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&~n)&&t.h[i]?w(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.C=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.C<<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.Ba&&255===t.Ta||!t.Ba&&!t.Ta||!Nn(t.Ba)||!Nn(t.Ta))return 45<=++e.l&&Cn(e),null;if(e.l=0,t.Ba&=127,t.Ta&=127,!t.Ba&&!t.Ta)return null;if(i=null,16==(112&t.Ba))e:{var r=t.Ba;if(i=t.Ta,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&~i),n.h!==An){if(a=n.g,n.h===En&&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&~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",!(7&r)&&(o=kn[(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.Ta){case 32:wn(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),Tn(n);break;case 43:Tn(n);break;case 44:r=n.i,o=null,n.h!==An&&(o=an(r,n.j,i)),ln(r,0,15),r=o;break;case 45:r=n.g,n.h!==En?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!==An&&(r=an(n.i,n.j,i)),o=n.l,n.l=n.i,n.i=o,wn(n),n.j=i}i=r;break e}i=null}else r=t.Ta,sn(n.g,cn,t.Ba),sn(n.g,cn,r);return i}function Rn(e,t){var n=[];try{for(;t.pa();){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.$();t.$()-s=l){var d=c;if(o.g){var f=o.g;switch(r=null,l){case 8:!Bt(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&&Ft(o.g,127===r?"♪":String.fromCharCode(r));else if(160<=l&&255>=l)o.g&&Ft(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);Ft(o.g,m)}else Ft(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&Ft(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 Pn(){}var Ln=function e(t,n){var i,r,a,o;return N(e,(function(e){if(1==e.g){for(var t=n,s=0,u=0;u>2,f=a.aa(),h=a.aa();d&&(0===(u&=3)||1===u?i.h.push({pts:r,type:u,Ba:f,Ta: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=Dn(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=Rn(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}Fn.prototype.init=function(e){var t=this,n=[],i=[];if((new De).box("moov",Re).box("mvex",Re).T("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.N(),n=n.N(),t.g=e,t.h=n})).box("trak",Re).T("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4)),e=t.N(),n.push(e)})).box("mdia",Re).T("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])}))},Fn.prototype.parse=function(e){var t=this,n=[],i=this.g,r=this.h,a=[],o=null,s=9e4;return(new De).box("moof",Re).box("traf",Re).T("trun",(function(e){a=Un(e.reader,e.version,e.flags).ne})).T("tfhd",(function(e){e=jn(e.reader,e.flags),i=e.Xd||t.g,r=e.Le||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).T("tfdt",(function(e){o=_n(e.reader,e.version).fd})).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.pa();){var m=e.N();if(6==(31&e.aa())){var v=0;h.length>p&&(v=h[p].Mc||0),v=(u+v)/c;for(var y=l(Ln(t.j,e.bb(m-1))),b=y.next();!b.done;b=y.next())n.push({tf:b.value,pts:v})}else e.skip(m-1);0==(g-=m+4)&&(u=h.length>p?u+(h[p].Gd||d):u+d,p++,g=h.length>p&&h[p].sampleSize||f)}})).parse(e,!1),n},Bn.prototype.init=function(e){this.h.init(e)};var zn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Xn(e){var t;e instanceof Xn?(Wn(this,e.Ga),this.qb=e.qb,this.Ia=e.Ia,Yn(this,e.Fb),this.ya=e.ya,$n(this,e.g.clone()),this.hb=e.hb):e&&(t=String(e).match(zn))?(Wn(this,t[1]||"",!0),this.qb=Jn(t[2]||""),this.Ia=Jn(t[3]||"",!0),Yn(this,t[4]),this.ya=Jn(t[5]||"",!0),$n(this,t[6]||"",!0),this.hb=Jn(t[7]||"")):this.g=new ai(null)}function Wn(e,t,n){e.Ga=n?Jn(t,!0):t,e.Ga&&(e.Ga=e.Ga.replace(/:$/,""))}function Yn(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Fb=t}else e.Fb=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).Ga="",i.qb="",i.Ia="",i.Fb=null,i.ya="",i.hb="",i.toString=function(){var e=[],t=this.Ga;if(t&&e.push(Qn(t,ei,!0),":"),t=this.Ia){e.push("//");var n=this.qb;n&&e.push(Qn(n,ei,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Fb)&&e.push(":",String(t))}return(t=this.ya)&&(this.Ia&&"/"!=t.charAt(0)&&e.push("/"),e.push(Qn(t,"/"==t.charAt(0)?ni:ti,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.hb)&&e.push("#",Qn(t,ri)),e.join("")},i.resolve=function(e){var t=this.clone();"data"===t.Ga&&(t=new Xn);var n=!!e.Ga;n?Wn(t,e.Ga):n=!!e.qb,n?t.qb=e.qb:n=!!e.Ia,n?t.Ia=e.Ia:n=null!=e.Fb;var i=e.ya;if(n)Yn(t,e.Fb);else if(n=!!e.ya){if("/"!=i.charAt(0))if(this.Ia&&!this.ya)i="/"+i;else{var r=t.ya.lastIndexOf("/");-1!=r&&(i=t.ya.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 Ti(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function xi(e,t,n){return e=Ti(e,t),mi.get("muxjs")()&&bi(e)?wi(n,e):e}function Si(e){var t=(e=e.split("."))[0];return e.pop(),t}function Ei(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 Ai=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function ki(e){this.s=null,this.i=e,this.j=this.C=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 Mi(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 Ci(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=l(t.nestedCues)).next();!i.done;i=t.next())Ci(e,i.value,n)}function Di(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,[]),Ci(e,u,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)),T(i)}))},B("shaka.text.TextEngine",ki),ki.prototype.destroy=ki.prototype.destroy,ki.findParser=function(e){return Ri[e]},ki.unregisterParser=function(e){delete Ri[e]},ki.registerParser=function(e,t){Ri[e]=t};var Ri={};function Ni(e){this.g=!1,this.h=new hi,this.i=e}function Pi(e,t){if(e.g){if(t instanceof le&&7003==t.code)throw t;throw new le(2,7,7003,t)}}function Li(){this.g={}}function ji(e,t){for(var n in e.g)t(n,e.g[n])}function _i(){this.g=new Li}function Oi(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=Ui;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}Ui=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}Ni.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()})))},Li.prototype.push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},Li.prototype.get=function(e){return(e=this.g[e])?e.slice():null},Li.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])},Li.prototype.size=function(){return Object.keys(this.g).length},(i=_i.prototype).release=function(){this.ob(),this.g=null},i.A=function(e,t,n,i){this.g&&(e=new Oi(e,t,n,i),this.g.push(t,e))},i.wa=function(e,t,n,i){var r=this;this.A(e,t,(function i(a){r.Ea(e,t,i),n(a)}),i)},i.Ea=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.Ea(),this.g.remove(t,r))},i.ob=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.Ea();this.g.g={}}},B("shaka.util.EventManager",_i),_i.prototype.removeAll=_i.prototype.ob,_i.prototype.unlisten=_i.prototype.Ea,_i.prototype.listenOnce=_i.prototype.wa,_i.prototype.listen=_i.prototype.A,_i.prototype.release=_i.prototype.release,Oi.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Ui=void 0;function Fi(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 _i,this.u={},this.C=t,this.F=new hi,this.s=function(e,t){var n=new MediaSource;return e.h.wa(n,"sourceopen",(function(){URL.revokeObjectURL(e.H),t.resolve()})),e.H=er(n),e.g.src=e.H,n}(this,this.F),this.J=new Ni((function(){return function(e){var t,n,i,r,a,o,s;return P((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 w(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.C=null,e.l={},T(u)}))}(r)})),this.H=""}function Bi(e){var t=Ti(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Ai.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 Vi(e,t){e.i||(e.i=new ki(e.m)),"application/cea-608"!=t&&"application/cea-708"!=t&&(e.i.s=Ce(Ri[t]))}function Hi(e){return!e.s||"ended"==e.s.readyState}function Ki(e,t){if(t==ci)var n=e.i.g;else n=!(n=qi(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 Gi(e,t){return t==ci?e.i.h:Hn(qi(e,t))}function qi(e,t){try{return e.j[t].buffered}catch(e){return null}}function zi(e,t,n,i,r,a){var o,s,u,c,d,f,h,p;return P((function(g){return 1==g.g?t==(o=di).ba?w(g,function(e,t,n,i){var r,a,o;return P((function(s){return 1==s.g?w(s,Promise.resolve(),2):e.s&&e.i?null==n||null==i?(e.s.parseInit(oe(t)),s.return()):(r={periodStart:e.C,segmentStart:n,segmentEnd:i},a=e.s.parseMedia(oe(t),r),o=a.filter((function(t){return t.startTime>=e.j&&t.startTime=n?Wi(e,t):e.j[t].remove(0,n)})),0)}))}function Wi(e,t){var n=e.l[t][0];n&&(n.p.resolve(),Ji(e,t))}function Yi(e,t,n){return Pi(e.J),n={start:n,p:new hi},e.l[t].push(n),1==e.l[t].length&&Qi(e,t),n.p}function $i(e,t){var n,i,r,a,o;return P((function(s){switch(s.g){case 1:for(r in Pi(e.J),n=[],i={},e.j)i.Lb=new hi,a={start:function(e){return function(){return e.Lb.resolve()}}(i),p:i.Lb},e.l[r].push(a),n.push(i.Lb),1==e.l[r].length&&a.start(),i={Lb:i.Lb};return x(s,2),w(s,Promise.all(n),4);case 4:E(s,3);break;case 2:throw A(s);case 3:try{t()}catch(e){throw new le(2,3,3015,e)}finally{for(o in e.j)Ji(e,o)}T(s)}}))}function Ji(e,t){e.l[t].shift(),Qi(e,t)}function Qi(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)),Ji(e,t)}}function Zi(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),Re(e)}e=oe(e);var i,r=!1,a=[],o=[];if((new De).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).T("stsd",(function(e){i=e,a.push(e),Ne(e)})).T("encv",t).T("enca",t).T("avc1",(function(e){o.push({box:e,$b:1701733238})})).T("avc3",(function(e){o.push({box:e,$b:1701733238})})).T("ac-3",(function(e){o.push({box:e,$b:1701733217})})).T("ec-3",(function(e){o.push({box:e,$b:1701733217})})).T("mp4a",(function(e){o.push({box:e,$b: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.$b);return e}(t)),t}(i=Fi.prototype).destroy=function(){return this.J.destroy()},i.init=function(e,t){var n,i,r,a,o,s,u,c=this;return P((function(d){if(1==d.g)return n=di,w(d,c.F,2);for(i={},r=l(e.keys()),a=r.next();!a.done;i={sa:i.sa},a=r.next())i.sa=a.value,o=e.get(i.sa),s=Ti(o.mimeType,o.codecs),i.sa==n.ba?Vi(c,s):(!t&&MediaSource.isTypeSupported(s)||!yi(s,i.sa)||(c.u[i.sa]=new vi,s=wi(i.sa,s)),u=c.s.addSourceBuffer(s),c.h.A(u,"error",function(e){return function(){c.l[e.sa][0].p.reject(new le(2,3,3014,c.g.error?c.g.error.code:0))}}(i)),c.h.A(u,"updateend",function(e){return function(){return Wi(c,e.sa)}}(i)),c.j[i.sa]=u,c.I[i.sa]=s,c.l[i.sa]=[]);T(d)}))},i.zc=function(){var e={total:qn(this.g.buffered),audio:qn(qi(this,"audio")),video:qn(qi(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 P((function(r){return w(r,e==di.ba?i.i.remove(t,n):Yi(i,e,(function(){n<=t?Wi(i,e):i.j[e].remove(t,n)})),0)}))},i.flush=function(e){var t=this;return P((function(n){return e==di.ba?n.return():w(n,Yi(t,e,(function(){t.g.currentTime-=.001,Wi(t,e)})),0)}))},i.endOfStream=function(e){var t=this;return P((function(n){return w(n,$i(t,(function(){Hi(t)||(e?t.s.endOfStream(e):t.s.endOfStream())})),0)}))},i.Ma=function(e){var t=this;return P((function(n){return w(n,$i(t,(function(){t.s.duration=e})),0)}))},i.getDuration=function(){return this.s.duration};var er=e.URL.createObjectURL;function tr(e,t){return e=rr(e),t=rr(t),e.split("-")[0]==t.split("-")[0]}function nr(e,t){e=rr(e),t=rr(t);var n=e.split("-"),i=t.split("-");return n[0]==i[0]&&1==n.length&&2==i.length}function ir(e,t){e=rr(e),t=rr(t);var n=e.split("-"),i=t.split("-");return 2==n.length&&2==i.length&&n[0]==i[0]}function rr(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=ur.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function ar(e,t){return e=rr(e),(t=rr(t))==e?4:nr(t,e)?3:ir(t,e)?2:nr(e,t)?1:0}function or(e){return e.language?rr(e.language):e.audio&&e.audio.language?rr(e.audio.language):e.video&&e.video.language?rr(e.video.language):"und"}function sr(e,t){for(var n=rr(e),i=new Set,r=l(t),a=r.next();!a.done;a=r.next())i.add(rr(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(nr(a=a.value,n))return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(ir(a=a.value,n))return a;for(a=(i=l(i)).next();!a.done;a=i.next())if(nr(n,a=a.value))return a;return null}var ur=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 lr(e,t){var n=Cr(e.variants,t);n=function(e){for(var t=new Li,n=(e=l(e)).next();!n.done;n=e.next()){var i=cr(n=n.value);t.push(i,n)}return t}(n),n=function(e){var t=0,n=new Map,i=e.size();return ji(e,(function(e,r){for(var a=l(r),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new Li);var u=n.get(s);u.push(e,o),u.size()===i&&(t=Math.max(t,s))}}})),t?n.get(t):e}(n);var i=function(e){var t="",n=1/0;return ji(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 fr(e,t,n,i){return P((function(r){if(1==r.g)return i?w(r,pr(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},B("shaka.abr.SimpleAbrManager",jr),jr.prototype.configure=jr.prototype.configure,jr.prototype.playbackRateChanged=jr.prototype.playbackRateChanged,jr.prototype.setVariants=jr.prototype.setVariants,jr.prototype.getBandwidthEstimate=jr.prototype.getBandwidthEstimate,jr.prototype.segmentDownloaded=jr.prototype.segmentDownloaded,jr.prototype.disable=jr.prototype.disable,jr.prototype.enable=jr.prototype.enable,jr.prototype.chooseVariant=jr.prototype.chooseVariant,jr.prototype.init=jr.prototype.init,jr.prototype.stop=jr.prototype.stop,Ur.prototype.add=function(e){return!!Fr(this.h,e)&&(this.g.add(e),!0)},Ur.prototype.values=function(){return this.g.values()},Hr.prototype.create=function(e){var t=this,n=e.filter((function(e){return Fr(t.g,e)}));return n.length?new Ur(n[0],n):this.h.create(e)},Kr.prototype.create=function(e){var t=[];t=function(e,t){var n=rr(t),i=sr(n,e.map((function(e){return or(e)})));return i?e.filter((function(e){return i==or(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),e.length&&(t=e),this.g&&((e=Cr(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),e.length&&(t=e)),e=new Ur(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,Fr(e.h,n)&&e.add(n);return e};var zr=0,Xr=1;function Wr(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 Yr(e){var t,n;return P((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),w(i,new Promise((function(e){new Be(e).V(n/1e3)})),2))}e.h*=e.m,T(i)}))}function $r(e,t){this.promise=e,this.i=t,this.g=!1}function Jr(e){return new $r(Promise.reject(e),(function(){return Promise.resolve()}))}function Qr(){var e=Promise.reject(new le(2,7,7001));return e.catch((function(){})),new $r(e,(function(){return Promise.resolve()}))}function Zr(e){return new $r(Promise.resolve(e),(function(){return Promise.resolve()}))}function ea(e){return new $r(e,(function(){return e.catch((function(){}))}))}function ta(e){return new $r(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function na(t,n){if(n)if(n instanceof Map)for(var i=l(n.keys()),r=i.next();!r.done;r=i.next())r=r.value,Object.defineProperty(this,r,{value:n.get(r),writable:!0,enumerable:!0});else for(i in 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 ia(e){var t,n=new na(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}function ra(){this.U=new Li,this.sc=this}function aa(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 oa(e){var t,n={};for(t in e)n[t]=e[t];return n}function sa(){this.g=[]}function ua(e,t){e.g.push(t.finally((function(){lt(e.g,t)})))}function la(e){ra.call(this),this.i=!1,this.l=new sa,this.g=new Set,this.h=new Set,this.j=e||null,this.m=!1}function ca(e,t,n,i){n=n||ma;var r=va[e];(!r||n>=r.priority)&&(va[e]={priority:n,uf:t,wf:void 0!==i&&i})}function da(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 fa(e,t,n,i,r,a,o){e.m&&(n.uris[r]=n.uris[r].replace("http://","https://"));var s=new Xn(n.uris[r]),u=s.Ga,l=!1;u||(Wn(s,u=(u=location.protocol).slice(0,-1)),n.uris[r]=s.toString()),u=u.toLowerCase();var c=(u=va[u])?u.uf:null;if(!c)return Jr(new le(2,1,1e3,s));var d,f=u.wf,h=null,p=null,g=!1;return ea(Yr(i)).ca((function(){if(e.i)return Qr();d=Date.now();var i=c(n.uris[r],n,t,(function(n,i,r){h&&h.stop(),p&&p.V(s/1e3),e.j&&t==ga&&(e.j(n,i),l=!0,o.g=r)}));if(!f)return i;var a=n.retryParameters.connectionTimeout;a&&(h=new Be((function(){g=!0,i.abort()}))).V(a/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new Be((function(){g=!0,i.abort()}))),i})).ca((function(e){return h&&h.stop(),p&&p.stop(),null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,kf:l}}),(function(s){if(h&&h.stop(),p&&p.stop(),e.i)return Qr();if(g&&(s=new le(1,1,1003,n.uris[r],t)),s instanceof le){if(7001==s.code)throw s;if(1010==s.code)throw a;if(1==s.severity){var u=(new Map).set("error",s);return u=new na("retry",u),e.dispatchEvent(u),r=(r+1)%n.uris.length,fa(e,t,n,i,r,s,o)}}throw s}))}function ha(){this.g=0}function pa(e,t,n){$r.call(this,e,t),this.h=n}$r.prototype.abort=function(){return this.g=!0,this.i()},$r.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},$r.prototype.ca=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 $r(a,(function(){return i()}))},B("shaka.util.AbortableOperation",$r),$r.prototype.chain=$r.prototype.ca,$r.prototype.finally=$r.prototype.finally,$r.all=ta,$r.prototype.abort=$r.prototype.abort,$r.notAbortable=ea,$r.completed=Zr,$r.aborted=Qr,$r.failed=Jr,na.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},na.prototype.stopImmediatePropagation=function(){this.g=!0},na.prototype.stopPropagation=function(){},B("shaka.util.FakeEvent",na),ra.prototype.addEventListener=function(e,t){this.U&&this.U.push(e,t)},ra.prototype.removeEventListener=function(e,t){this.U&&this.U.remove(e,t)},ra.prototype.dispatchEvent=function(e){if(!this.U)return!0;var t=this.U.get(e.type)||[],n=this.U.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.sc,e.currentTarget=this.sc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},ra.prototype.release=function(){this.U=null},sa.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(la,ra),(i=la.prototype).Ld=function(e){this.m=e},i.xf=function(e){this.g.add(e)},i.Of=function(e){this.g.delete(e)},i.Ie=function(){this.g.clear()},i.yf=function(e){this.h.add(e)},i.Pf=function(e){this.h.delete(e)},i.Je=function(){this.h.clear()},i.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),ra.prototype.release.call(this),this.l.destroy()},i.request=function(e,t){var n=this,i=new ha;if(this.i){var r=Promise.reject(new le(2,7,7001));return r.catch((function(){})),new pa(r,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?aa(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=aa(t.uris),r=function(e,t,n){for(var i=Zr(void 0),r={},a=(e=l(e.g)).next();!a.done;r={Zc:r.Zc},a=e.next())r.Zc=a.value,i=i.ca(function(e){return function(){return n.body&&(n.body=ae(n.body)),e.Zc(t,n)}}(r));return i.ca(void 0,(function(e){if(e instanceof le&&7001==e.code)throw e;throw new le(2,1,1006,e)}))}(this,e,t);var a=r.ca((function(){return fa(n,e,t,new Wr(t.retryParameters,!1),0,null,i)})),o=a.ca((function(t){return function(e,t,n){for(var i=Zr(void 0),r={},a=(e=l(e.h)).next();!a.done;r={$c:r.$c},a=e.next())r.$c=a.value,i=i.ca(function(e){return function(){var i=n.response;return i.data&&(i.data=ae(i.data)),e.$c(t,i)}}(r));return i.ca((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.ca((function(t){var i=Date.now()-c,r=t.response;return r.timeMs+=u,r.timeMs+=i,t.kf||!n.j||r.fromCache||e!=ga||n.j(r.timeMs,r.data.byteLength),r}),(function(e){throw e&&(e.severity=2),e}));return r=new pa(d.promise,(function(){return d.abort()}),i),ua(this.l,r),r},B("shaka.net.NetworkingEngine",la),la.prototype.request=la.prototype.request,la.prototype.destroy=la.prototype.destroy,la.makeRequest=da,la.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},la.prototype.clearAllResponseFilters=la.prototype.Je,la.prototype.unregisterResponseFilter=la.prototype.Pf,la.prototype.registerResponseFilter=la.prototype.yf,la.prototype.clearAllRequestFilters=la.prototype.Ie,la.prototype.unregisterRequestFilter=la.prototype.Of,la.prototype.registerRequestFilter=la.prototype.xf,la.unregisterScheme=function(e){delete va[e]},la.registerScheme=ca,la.prototype.setForceHTTPS=la.prototype.Ld,la.NumBytesRemainingClass=ha,m(pa,$r),la.PendingRequest=pa;var ga=1;la.RequestType={MANIFEST:0,SEGMENT:ga,LICENSE:2,APP:3,TIMING:4};var ma=3;la.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ma};var va={};function ya(){}function ba(e){return new Xn(e=pe(e)).Ia}function wa(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 Ta(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 xa(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Sa(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 Ea(e,t){var n=this;t=void 0===t?1:t,this.D=e,this.u=new Set,this.g=this.m=null,this.qa=this.L=!1,this.H=0,this.i=null,this.h=new _i,this.j=new Map,this.C=[],this.s=new hi,this.o=null,this.l=function(t){n.s.reject(t),e.onError(t)},this.ra=new Map,this.ea=new Map,this.U=new Be((function(){return function(e){var t=e.ra,n=e.ea;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),t=Array.from(n.values()),t.length&&t.every((function(e){return"expired"==e}))&&e.l(new le(2,6,6014)),e.D.Ic(xa(n))}(n)})),this.F=!1,this.I=[],this.O=!1,this.la=new Be((function(){!function(e){e.j.forEach((function(t,n){var i=t.zd,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.zd=r)}))}(n)})).Da(t),this.s.catch((function(){})),this.J=new Ni((function(){return function(e){return P((function(t){switch(t.g){case 1:return e.h.release(),e.h=null,e.s.reject(),e.la.stop(),e.la=null,e.U.stop(),e.U=null,w(t,Ba(e),2);case 2:if(!e.g){t.v(3);break}return x(t,4),w(t,e.g.setMediaKeys(null),6);case 6:E(t,5);break;case 4:A(t);case 5:e.g=null;case 3:e.i=null,e.u.clear(),e.m=null,e.C=[],e.o=null,e.l=function(){},e.D=null,e.W=!1,T(t)}}))}(n)})),this.W=!1}function Aa(e,t,n,i){return e.C=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 Da(e){return e?e.keySystem:""}function Ra(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Na(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 Pa(e){return e=Z(e=e.j.keys(),(function(e){return e.sessionId})),Array.from(e)}function La(e,t){var n=Ti(e.mimeType,t||e.codecs);return yi(n)?wi(e.type,n):n}function ja(e,t,n,i){var r,a,o,s,u,c,d,f,h,p,g,m,v;return P((function(y){switch(y.g){case 1:if(r=new Map,i){e:{for(var b=l(n),T=b.next();!T.done;T=b.next()){var S=l(Ha(T.value));for(T=S.next();!T.done;T=S.next()){var k=T.value;r.has(k.keySystem)||r.set(k.keySystem,[]),r.get(k.keySystem).push(k)}}if(1==r.size&&r.has(""))throw new le(2,6,6e3);for(S=(b=l([!0,!1])).next();!S.done;S=b.next())for(S=S.value,T=(k=l(n)).next();!T.done;T=k.next()){var I=l(T.value.decodingInfos);for(T=I.next();!T.done;T=I.next()){var M=T.value;if(M.supported&&M.keySystemAccess){var C=l(T=r.get(M.keySystemAccess.keySystem));for(T=C.next();!T.done;T=C.next())if(!!T.value.licenseServerUri==S){a=M.keySystemAccess;break e}}}}a=null}y.v(2);break}return w(y,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p;return P((function(g){switch(g.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){g.v(4);break}u=s.value,c=l(t.keys()),d=c.next();case 5:if(d.done){s=o.next(),g.v(2);break}if(f=d.value,h=t.get(f),p=h.drmInfos.some((function(e){return!!e.licenseServerUri})),p!=u){g.v(6);break}return x(g,8),w(g,navigator.requestMediaKeySystemAccess(f,[h]),10);case 10:return n=g.h,g.return(n);case 8:A(g);case 9:Pi(e.J);case 6:d=c.next(),g.v(5);break;case 4:return g.return(n)}}))}(e,t),3);case 3:a=y.h;case 2:if(!(o=a))throw new le(2,6,6001);for(Pi(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(S=o.keySystem,Ga(b=r.get(o.keySystem),k=[],T=[],I=[],M=new Set),C=e.F?"persistent-license":"temporary",S={keySystem:S,licenseServerUri:k[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||C,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:T[0],initData:I,keyIds:M},k=(b=l(b)).next();!k.done;k=b.next())(k=k.value).distinctiveIdentifierRequired&&(S.distinctiveIdentifierRequired=k.distinctiveIdentifierRequired),k.persistentStateRequired&&(S.persistentStateRequired=k.persistentStateRequired);b=S}else b=o.keySystem,S=t.get(o.keySystem),k=[],T=[],I=[],M=new Set,Ga(S.drmInfos,k,T,I,M),b={keySystem:b,licenseServerUri:k[0],distinctiveIdentifierRequired:"required"==S.distinctiveIdentifier,persistentStateRequired:"required"==S.persistentState,sessionType:S.sessionTypes[0]||"temporary",audioRobustness:(S.audioCapabilities?S.audioCapabilities[0].robustness:"")||"",videoRobustness:(S.videoCapabilities?S.videoCapabilities[0].robustness:"")||"",serverCertificate:T[0],initData:I,keyIds:M};if(e.i=b,!e.i.licenseServerUri)throw new le(2,6,6012,e.i.keySystem);return w(y,o.createMediaKeys(),6);case 6:return m=y.h,Pi(e.J),e.m=m,e.L=!0,w(y,Ia(e),7);case 7:Pi(e.J),E(y,0);break;case 4:if(v=A(y),Pi(e.J,v),e.i=null,e.u.clear(),v instanceof le)throw v;throw new le(2,6,6002,v.message)}}))}function _a(e,t){var n,i,r,a,o;return P((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.A(n,"message",(function(t){e.g&&e.o.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.O?e.I.push(t):Ua(e,t)})),e.h.A(n,"keystatuseschange",(function(t){return Fa(e,t)})),r={initData:null,loaded:!1,zd:1/0,Na:null,type:"persistent-license"},e.j.set(n,r),x(s,2),w(s,n.load(t),4);case 4:return a=s.h,Pi(e.J),a?(r.loaded=!0,Ka(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=A(s),Pi(e.J,o),e.j.delete(n),e.l(new le(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function Oa(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=wa(e,n=ba(e),t)),e}function Ua(e,t){var n,i,r,a,o,s,u,c,d,f,h,p;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=da([r],e.o.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,Ra(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),w(g,e.D.Cb.request(2,o).promise,4);case 4:u=g.h,E(g,3);break;case 2:return c=A(g),d=new le(2,6,6007,c),e.l(d),i&&i.Na&&i.Na.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),w(g,n.update(u.data),7));case 7:E(g,6);break;case 5:return f=A(g),h=new le(2,6,6008,f.message),e.l(h),i&&i.Na&&i.Na.reject(h),g.return();case 6:p=new na("drmsessionupdate"),e.D.onEvent(p),i&&(i.Na&&i.Na.resolve(),new Be((function(){i.loaded=!0,Ka(e)&&e.s.resolve()})).V(Xa)),T(g)}}))}function Fa(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(Ra(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.ra.set(a,t)}));var a=n.expiration-Date.now();(0>a||r&&1e3>a)&&i&&!i.Na&&(e.j.delete(n),n.close().catch((function(){}))),Ka(e)&&(e.s.resolve(),e.U.V(Wa))}function Ba(e){var t;return P((function(n){return t=Array.from(e.j.entries()),e.j.clear(),w(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,i=t.next().value;return P((function(t){return 1==t.g?(x(t,2),e.qa||e.C.includes(n.sessionId)||"persistent-license"!==i.type?w(t,function(e){var t;return P((function(n){return 1==n.g?(t=new Promise((function(e,t){new Be(t).V(za)})),x(n,2),w(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?E(n,0):(A(n),void T(n))}))}(n),5):w(t,n.remove(),5)):2!=t.g?E(t,0):(A(t),void T(t))}))}))),0)}))}function Va(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={},o=l(t),s=o.next();!s.done;a={Fa:a.Fa},s=o.next())if(s=s.value,r.keySystem==s.keySystem){a.Fa=[],a.Fa=a.Fa.concat(r.initData||[]),a.Fa=a.Fa.concat(s.initData||[]),a.Fa=a.Fa.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Fa.findIndex((function(e){return e.keyId===t.keyId}))}}(a)),o=r.keyIds&&s.keyIds?new Set([].concat(c(r.keyIds),c(s.keyIds))):r.keyIds||s.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||s.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||s.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||s.persistentStateRequired,videoRobustness:r.videoRobustness||s.videoRobustness,audioRobustness:r.audioRobustness||s.audioRobustness,serverCertificate:r.serverCertificate||s.serverCertificate,initData:a.Fa,keyIds:o});break}}return n}function Ha(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Ka(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 Ga(e,t,n,i,r){for(var a={},o=(e=l(e)).next();!o.done;a={za:a.za},o=e.next()){if(a.za=o.value,t.includes(a.za.licenseServerUri)||t.push(a.za.licenseServerUri),a.za.serverCertificate&&(n.some(function(e){return function(t){return ie(t,e.za.serverCertificate)}}(a))||n.push(a.za.serverCertificate)),a.za.initData){o={};for(var s=l(a.za.initData),u=s.next();!u.done;o={lc:o.lc},u=s.next())o.lc=u.value,i.some(function(e){return function(t){var n=e.lc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&ie(t.initData,n.initData)}}(o))||i.push(o.lc)}if(a.za.keyIds)for(s=(o=l(a.za.keyIds)).next();!s.done;s=o.next())r.add(s.value)}}function qa(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"))}B("shaka.util.FairPlayUtils",ya),ya.initDataTransform=wa,ya.defaultGetContentId=ba,(i=Ea.prototype).destroy=function(){return this.J.destroy()},i.configure=function(e){this.o=e},i.Qb=function(e){var t,n=this;return P((function(i){if(1==i.g)return n.m?(n.g=e,n.h.wa(n.g,"play",(function(){for(var e=l(n.I),t=e.next();!t.done;t=e.next())Ua(n,t.value);n.O=!0,n.I=[]})),"webkitCurrentPlaybackTargetIsWireless"in n.g&&n.h.A(n.g,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Ba(n)})),w(i,n.g.setMediaKeys(n.m).catch((function(e){return Promise.reject(new le(2,6,6003,e.message))})),2)):(n.h.wa(e,"encrypted",(function(){n.l(new le(2,6,6010))})),i.return());Pi(n.J),Ma(n),n.i.initData.length||n.C.length||(t=function(e){return Ca(n,e.initDataType,oe(e.initData))},n.h.A(n.g,"encrypted",t)),T(i)}))},i.Ub=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.Bc=function(){return xa(this.ea)};var za=1,Xa=5,Wa=.5,Ya=new ce((function(){return ae(new Uint8Array([0]))}));function $a(){}function Ja(e,t,n,i){var r,a,o,s;return P((function(u){if(1==u.g)return i&&(r=eo[i.toLowerCase()])?u.return(r):(a=Za(e))&&(o=to[a])?u.return(o):i?u.v(2):w(u,Qa(e,t,n),3);if(2!=u.g&&(i=u.h)&&(s=eo[i]))return u.return(s);throw new le(2,4,4e3,e)}))}function Qa(e,t,n){var i,r,a;return P((function(o){return 1==o.g?((i=da([e],n)).method="HEAD",w(o,t.request(0,i).promise,2)):(r=o.h,a=r.headers["content-type"],o.return(a?a.toLowerCase().split(";").shift():""))}))}function Za(e){return 1==(e=new Xn(e).ya.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}B("shaka.media.ManifestParser",$a),$a.unregisterParserByMime=function(e){delete eo[e]},$a.registerParserByMime=function(e,t){eo[e]=t},$a.registerParserByExtension=function(e,t){to[e]=t};var eo={},to={};function no(e,t,n){this.oa=e,this.ka=t,this.fa=n}function io(e,t,n,i,r,a,o,s,u,l){l=void 0===l?[]:l,this.startTime=e,this.j=this.endTime=t,this.i=n,this.ka=i,this.fa=r,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l}function ro(e,t,n){this.j=e,this.Lc=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.s=0,this.u=!0,this.C=0,this.F=void 0===n||n,this.H=0}function ao(e,t){this.j=e,this.m=so(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.s=t,this.i=function(){}}function oo(e){this.g=e}function so(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 uo(e,t,n,i,r){var a=this;this.g=e,this.C=t,this.o=n,this.u=r,this.h=new _i,this.s=!1,this.F=e.readyState,this.j=!1,this.i=i,this.m=!1,this.h.A(e,"waiting",(function(){return lo(a)})),this.l=new Be((function(){lo(a)})).Da(.25)}function lo(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&&(e.g.autoplay||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=so(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){r=e.o.smallGapLimit;var o=e.g.currentTime;if(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,o,e.o.gapDetectionThreshold),!(null==n||0==n&&!e.m||(i=t.start(n),i>=e.C.Ua()))){var s=i-o;r=s<=r,a=!1,.001>s||(r||e.j||(e.j=!0,(o=new na("largegap",o=(new Map).set("currentTime",o).set("gapSize",s))).cancelable=!0,e.u(o),e.o.jumpLargeGaps&&!o.defaultPrevented&&(a=!0)),!r&&!a)||(0!=n&&t.end(n-1),e.g.currentTime=i)}}}}}function co(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=fo.value().get(t),n.wa(e,t,i))}no.prototype.Xb=function(){return this.ka},no.prototype.Tb=function(){return this.fa},B("shaka.media.InitSegmentReference",no),no.prototype.getEndByte=no.prototype.Tb,no.prototype.getStartByte=no.prototype.Xb,(i=io.prototype).oa=function(){return this.i()},i.df=function(){return this.startTime},i.Re=function(){return this.endTime},i.Xb=function(){return this.ka},i.Tb=function(){return this.fa},B("shaka.media.SegmentReference",io),io.prototype.getEndByte=io.prototype.Tb,io.prototype.getStartByte=io.prototype.Xb,io.prototype.getEndTime=io.prototype.Re,io.prototype.getStartTime=io.prototype.df,io.prototype.getUris=io.prototype.oa,(i=ro.prototype).getDuration=function(){return this.l},i.Xe=function(){return this.g},i.Ma=function(e){this.l=e},i.cf=function(){return this.j},i.se=function(e){this.s=e},i.fc=function(e){this.u=e},i.Od=function(e){this.m=e},i.Jf=function(e){this.Lc=e},i.Qe=function(){return this.Lc},i.Db=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.xd(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.xd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},i.wd=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.Z=function(){return 1/0==this.l&&!this.u},i.mb=function(){return 1/0!=this.l&&!this.u},i.Va=function(){return Math.max(this.C,this.ib()-this.m)},i.te=function(e){this.C=e},i.ib=function(){return this.Z()||this.mb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.j)+this.H,this.l):this.h||this.l},i.Wb=function(e){var t=Math.max(this.i,this.C);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.ib()-this.m+e,this.Ua()))},i.zb=function(){return this.Wb(0)},i.Ua=function(){return Math.max(0,this.ib()-(this.Z()||this.mb()?this.Lc:0))},i.we=function(){return!(null==this.j||null!=this.h&&this.F)},i.re=function(e){this.H=e},B("shaka.media.PresentationTimeline",ro),ro.prototype.setAvailabilityTimeOffset=ro.prototype.re,ro.prototype.usingPresentationStartTime=ro.prototype.we,ro.prototype.getSeekRangeEnd=ro.prototype.Ua,ro.prototype.getSeekRangeStart=ro.prototype.zb,ro.prototype.getSafeSeekRangeStart=ro.prototype.Wb,ro.prototype.getSegmentAvailabilityEnd=ro.prototype.ib,ro.prototype.setUserSeekStart=ro.prototype.te,ro.prototype.getSegmentAvailabilityStart=ro.prototype.Va,ro.prototype.isInProgress=ro.prototype.mb,ro.prototype.isLive=ro.prototype.Z,ro.prototype.offset=ro.prototype.offset,ro.prototype.notifyMaxSegmentDuration=ro.prototype.wd,ro.prototype.notifyMinSegmentStartTime=ro.prototype.xd,ro.prototype.notifySegments=ro.prototype.Db,ro.prototype.getDelay=ro.prototype.Qe,ro.prototype.setDelay=ro.prototype.Jf,ro.prototype.setSegmentAvailabilityDuration=ro.prototype.Od,ro.prototype.setStatic=ro.prototype.fc,ro.prototype.setClockOffset=ro.prototype.se,ro.prototype.getPresentationStartTime=ro.prototype.cf,ro.prototype.setDuration=ro.prototype.Ma,ro.prototype.getMaxSegmentDuration=ro.prototype.Xe,ro.prototype.getDuration=ro.prototype.getDuration,ao.prototype.release=function(){this.j=null,this.i=function(){}},uo.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.C=this.u=null},uo.prototype.Bd=function(){this.m=!0,lo(this)};var fo=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 ho(e,t,n){var i=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new _i,this.i=new yo(e),co(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){mo(i,i.j)}))}function po(e){return e.m?e.g.currentTime:e.j}function go(e,t){0Math.abs(e.g.currentTime-t)?vo(e):(e.h.wa(e.g,"seeking",(function(){vo(e)})),bo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function vo(e){e.m=!0,e.h.A(e.g,"seeking",(function(){return e.l()}))}function yo(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new Be((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function bo(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Da(.1)}function wo(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new _i,co(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i||0==t.i?t.j=!0:(t.h.wa(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function To(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.C=r,this.u=null,this.j=new uo(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,i=new ao(new oo(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 ho(e,(function(){var e=o.j;e.s=!0,e.m=!1,e.j=!1;var t=po(o.h);return e=So(o,t),.001e.g.getDuration()?e.g.zb():e.g.Ua():0>t&&(t=e.g.Ua()+t),xo(e,Eo(e,t))}(this,i)),this.s=new Be((function(){if(0!=o.i.readyState&&!o.i.paused){var e=po(o.h),t=o.g.zb(),n=o.g.Ua();3>n-t&&(t=n-3),e=n?n-e.o.durationBackoff:t}function So(e,t){var n=Math.max(e.H,e.o.rebufferingGoal),i=e.o.safeSeekOffset,r=e.g.zb(),a=e.g.Ua(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.Wb(n),u=e.g.Wb(i);return n=e.g.Wb(n+i),t>=o?xo(e,t):t>a?a:t=s||Kn(e.i.buffered,t)?t:n}function Eo(e,t){var n=e.g.zb();return t(n=e.g.Ua())?n:t}function Ao(e){this.M=e,this.g=null,this.h=0,this.i=!1}function ko(e,t,n){return new Ao([new io(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function Io(e,t,n){this.i=e,this.h=t,this.g=n}function Mo(){Ao.call(this,[]),this.j=[]}function Co(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Dc(),this.h=new Be((function(){t.g.ie(.25*t.i)}))}function Do(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Dc()!=t&&e.g.Nd(t))}catch(e){}e.h.Da(.25),0!=e.g.Dc()&&e.g.Nd(0)}function Ro(e){var t=this;this.h=e,this.g=new Set,this.i=new Be((function(){No(t,!1)})).Da(.25)}function No(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.i.g),s=o.next();!s.done;s=o.next()){s=s.value;var u=i.g.get(s),c=rs.endTime?Uo:Oo;i.g.set(s,c);for(var d=l(i.j),f=d.next();!f.done;f=d.next())(f=f.value).tb==u&&f.sb==c&&f.lb(s,a)}}}function Po(e){ra.call(this);var t=this;this.g=new Set,this.i=e,this.h=new Be((function(){for(var e=t.i(),n=l(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime=i.startTime&&e(e-=this.h)||e>=this.M.length?null:this.M[e]},i.offset=function(e){if(!this.i)for(var t=l(this.M),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},i.Gc=function(e){!this.i&&e.length&&(this.M=this.M.filter((function(t){return t.startTimet&&(0==n.M.length||e.endTime>n.M[0].startTime)})),this.Gc(e),this.gb(t)},i.gb=function(e){if(!this.i){var t=this.M.length;this.M=this.M.filter((function(t){return t.endTime>e})),this.h+=t-this.M.length}},i.ab=function(e,t,n){if(n=void 0!==n&&n,!this.i){for(;this.M.length&&this.M[this.M.length-1].startTime>=t;)this.M.pop();for(;this.M.length&&this.M[0].endTime<=e;)this.M.shift(),n||this.h++;0!=this.M.length&&(e=this.M[this.M.length-1],this.M[this.M.length-1]=new io(e.startTime,t,e.i,e.ka,e.fa,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd))}},i.Oc=function(e,t){var n=this;this.i||(this.g&&this.g.stop(),this.g=new Be((function(){var e=t();e?n.M.push.apply(n.M,c(e)):(n.g.stop(),n.g=null)})),this.g.Da(e))},Ao.prototype[Symbol.iterator]=function(){return this.yb(0)},Ao.prototype.yb=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.xa.abort(),T(r)}))}(e,a).catch((function(t){e.D&&e.D.onError(t)}))):function(e,t){var n,i,r,a;P((function(o){switch(o.g){case 1:return n=di,x(o,2),w(o,Xi(e.D.S,n.ba),4);case 4:E(o,3);break;case 2:i=A(o),e.D&&e.D.onError(i);case 3:r=Ti(t.mimeType,t.codecs),Vi(e.D.S,r),(e.D.S.m.isTextVisible()||e.o.alwaysStreamText)&&(a=zo(t),e.g.set(n.ba,a),Jo(e,a,0)),T(o)}}))}(e,t)}function qo(e,t){t.Rb||t.rb||(t.La?(t.rb=!0,t.wc=0):null==Ki(e.D.S,t.type)?null==t.Oa&&Jo(e,t,0):(Qo(t),$o(e,t,!1,0).catch((function(t){e.D&&e.D.onError(t)}))))}function zo(e){return{stream:e,type:e.type,da:null,Ca:null,Fc:null,td:null,sd:null,rd:null,pb:null,endOfStream:!1,La:!1,Oa:null,rb:!1,wc:0,Rc:!1,Rb:!1,Ed:!1,Yb:!1,xa:null}}function Xo(e,t,n,i,r,a){var o;return P((function(s){return 1==s.g?(o=i.closedCaptions&&0=(a=n-r-i)?o.return():w(o,e.D.S.remove(t.type,r,r+a),2);Pi(e.J),T(o)}))}(e,t,n),2)):3!=s.g?(Pi(e.J),w(s,zi(e.D.S,t.type,a,r.startTime,r.endTime,o),3)):(Pi(e.J),void T(s))}))}function Wo(e){return e&&e.type==ci&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Yo(e,t,n,i){var r,a,o,s;return P((function(u){return 1==u.g?(r=ga,a=Fo(n.oa(),n.ka,n.fa,e.o.retryParameters,i),o=e.D.Cb.request(r,a),t.xa=o,w(u,o.promise,2)):(s=u.h,t.xa=null,u.return(s.data))}))}function $o(e,t,n,i){var r,a;return P((function(o){return 1==o.g?(t.rb=!1,t.Rc=!1,t.wc=0,t.Rb=!0,t.Ca=null,t.Fc=null,t.da=null,i?(r=e.D.Cc(),a=e.D.S.getDuration(),w(o,e.D.S.remove(t.type,r+i,a),3)):w(o,Xi(e.D.S,t.type),4)):3!=o.g?(Pi(e.J),n?w(o,e.D.S.flush(t.type),3):o.v(3)):(Pi(e.J),t.Rb=!1,t.endOfStream=!1,Jo(e,t,0),void T(o))}))}function Jo(e,t,n){var i=t.type;(i!=ci||e.g.has(i))&&(t.Oa=new Fe((function(){var n;return P((function(i){return 1==i.g?(x(i,2),w(i,e.ac(t),4)):2!=i.g?E(i,0):(n=A(i),e.D&&e.D.onError(n),void T(i))}))})).V(n))}function Qo(e){null!=e.Oa&&(e.Oa.stop(),e.Oa=null)}function Zo(e){return P((function(t){return e.xa?w(t,e.xa.abort(),0):t.v(0)}))}function es(e,t){return P((function(n){if(1==n.g)return w(n,Yr(e.s),2);Pi(e.J),e.D.onError(t),t.handled||e.o.failureCallback(t),T(n)}))}function ts(e,t){var n=cu(),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 P((function(t){if(e.J.g)t=t.v(0);else{if(0==e.m.length||e.g&&!e.g.kb)var n=!1;else{e.g&&(e.g.Ja.nb(),e.g=null);var i=(n=e.m.shift()).create(e.l);i?(n.Ja.Eb(),e.g={node:i.node,payload:i.payload,kb:i.kb,Ja:n.Ja}):n.Ja.Jc(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return P((function(i){switch(i.g){case 1:return e.i=e.j.Ze(e.i,e.l,e.g.node,e.g.payload),x(i,2),e.h=e.j.Ne(e.i,e.l,e.g.payload),w(i,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Ja.Hc(),e.g=null),E(i,0);break;case 2:return 7001==(t=A(i)).code?e.g.Ja.nb():e.g.Ja.onError(t),e.g=null,e.h=null,n=e,w(i,e.j.handleError(e.l,t),5);case 5:n.i=i.h,T(i)}}))}(e):(e.j.rf(e.i),e.s=new hi,n=e.s),t=w(t,n,1)}return t}))}(i)})),this.J=new Ni((function(){return function(e){var t,n;return P((function(i){if(1==i.g)return e.h&&e.h.abort(),is(e),w(i,e.u,2);for(e.g&&e.g.Ja.nb(),t=l(e.m),n=t.next();!n.done;n=t.next())n.value.Ja.nb();e.g=null,e.m=[],e.j=null,T(i)}))}(i)}))}function ns(e,t){var n={Eb:function(){},Hc:function(){},nb:function(){},onError:function(){},Jc:function(){},sg:function(){}};return e.m.push({create:t,Ja:n}),e.h&&e.h.abort(),is(e),n}function is(e){e.s&&(e.s.resolve(),e.s=null)}function rs(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 as(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 os(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 ss(){}function us(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ls(t,n){var i=this;this.m=!1,this.l=[],this.g=t,this.u=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.u.appendChild(this.i),this.C=new Be((function(){ds(i)})).Da(.25),this.j=new Map,this.h=new _i,this.h.A(document,"fullscreenchange",(function(){ds(i,!0)})),this.s=null,"ResizeObserver"in e&&(this.s=new ResizeObserver((function(){ds(i,!0)})),this.s.observe(this.i))}function cs(e,t,n,i,r){for(var a=!1,o=[],s=[],u=(t=l(t)).next();!u.done;u=t.next()){u=u.value,r.push(u);var c=e.j.get(u),d=u.startTime<=i&&u.endTime>i,f=c?c.ye:null;c&&(o.push(c.Vd),d||(a=!0,e.j.delete(u),c=null)),d&&(s.push(u),c||(fs(e,u,r),f=(c=e.j.get(u)).ye,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 vs(){}function ys(){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:Oa,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 P((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return P((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?w(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 jr},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 P((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),i=[],r=sr(t,n.map((function(e){return e.language})));r&&(i=n.filter((function(e){return rr(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 bs(e,t,n){var i={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return gs(e,t,n||ys(),i,"")}function ws(){this.g=null,this.h=[]}function Ts(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 xs(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 Ss(){this.i=this.h=null,this.g=[]}function Es(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 As(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 ks(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.O=this.U=this.C=this.W=NaN,this.h=new ws,this.g=new Ss}function Is(t,n){ra.call(this);var i=this;this.l=Ou,this.qc=this.g=null,this.ea=!1,this.h=new _i,this.dd=this.u=this.$a=this.B=this.tc=this.s=this.i=this.ic=this.I=this.rc=this.F=this.Pa=this.C=this.L=this.m=this.P=null,this.ld=1e9,this.o=_s(this),this.kd={width:1/0,height:1/0},this.j=null,this.qa=new Kr(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount),this.ra=this.o.preferredTextLanguage,this.Ob=this.o.preferredTextRole,this.Nb=this.o.preferForcedSubs,this.ed=[],n&&n(this),this.P=function(e){return new la((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}))}(this),this.P.Ld(this.o.streaming.forceHTTPS),this.H=null,Ku&&(this.H=Ce(Ku)),this.h.A(e,"online",(function(){i.Fd()})),this.ta={name:"detach"},this.Sa={name:"attach"},this.W={name:"unload"},this.nd={name:"manifest-parser"},this.jd={name:"manifest"},this.Ha={name:"media-source"},this.gd={name:"drm-engine"},this.O={name:"load"},this.od={name:"src-equals-drm-engine"},this.Qa={name:"src-equals"};var r=new Map;r.set(this.Sa,(function(e,t){return ea(function(e,t,n){return null==t.G&&(t.G=n.G,e.h.A(t.G,"error",(function(){var t=Zs(e);t&&Js(e,t)}))),e.g=t.G,Promise.resolve()}(i,e,t))})),r.set(this.ta,(function(e){return e.G&&(i.h.Ea(e.G,"error"),e.G=null),i.H&&i.H.release(),i.g=null,ea(e=Promise.resolve())})),r.set(this.W,(function(e){return ea(Cs(i,e))})),r.set(this.Ha,(function(e){return e=function(e,t){var n,i,r,a;return P((function(o){if(1==o.g)return n=new Bn,i=e.o.textDisplayFactory,r=Ce(i),e.hd=i,a=function(e,t,n,i){return new Fi(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())Ds(e,a,o,"ID3",u.value);e.H&&e.H.onHlsTimedMetadata(r,a)}})),w(o,a.F,2);e.L=a,T(o)}))}(i,e),ea(e)})),r.set(this.nd,(function(e,t){var n=function(e,t,n){var i,r,a,o;return P((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,r=e.P,e.$a=i,a=e,w(s,Ja(i,r,e.o.manifest.retryParameters,t.mimeType),2);a.tc=s.h,e.s=Ce(e.tc),o=aa(e.o.manifest),n.G&&"AUDIO"===n.G.nodeName&&(o.disableVideo=!0),e.s.configure(o),T(s)}))}(i,e,t);return ea(n)})),r.set(this.jd,(function(e){return function(e,t){var n=t.uri,i=e.P;e.ic=new Po((function(){return e.Hd()})),e.ic.addEventListener("regionadd",(function(t){t=t.region,Qs(e,Cu,t),e.H&&e.H.onDashTimedMetadata(t)}));var r={networkingEngine:i,filter:function(t){return P((function(n){return n.return(e.yc(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 Mo;s={id:e.ld++,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.ic;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),t=new na("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Js(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 $r(function(){var t,i,o,s;return P((function(u){if(1==u.g)return t=e,w(u,e.s.start(n,r),2);if(t.B=u.h,i=Ms(Tu),e.dispatchEvent(i),0==e.B.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.B),o=Date.now()/1e3,s=o-a,e.j.H=s,T(u)}))}(),(function(){return e.s.stop()}))}(i,e)})),r.set(this.gd,(function(e){return e=function(e,t){var n,i;return P((function(r){return 1==r.g?(n=Date.now()/1e3,i=!0,e.m=Rs(e,{Cb:e.P,onError:function(t){Js(e,t)},Ic:function(t){eu(e,t)},onExpirationUpdated:function(t,n){tu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==gu&&i&&(i=!1,e.j.j=Date.now()/1e3-n)}}),e.o.useMediaCapabilities||gr(e.B),e.m.configure(e.o.drm),w(r,Aa(e.m,e.B.variants,e.B.offlineSessionIds,e.o.useMediaCapabilities),2)):3!=r.g?w(r,e.m.Qb(t.G),3):w(r,e.yc(e.B),0)}))}(i,e),ea(e)})),r.set(this.O,(function(e,t){return ea(function(e,t,n){var i,r,a,o,s,u,c,d,f,h;return P((function(p){switch(p.g){case 1:if(t.startTime=n.startTime,i=t.G,r=t.uri,e.$a=r,e.F=new Co({Dc:function(){return t.G.playbackRate},Ac:function(){return t.G.defaultPlaybackRate},Nd:function(e){t.G.playbackRate=e},ie:function(e){t.G.currentTime+=e}}),a=function(){return Bs(e)},o=function(){return Fs(e)},e.h.A(i,"playing",a),e.h.A(i,"pause",a),e.h.A(i,"ended",a),e.h.A(i,"ratechange",o),s=e.o.abrFactory,e.u&&e.dd==s||(e.dd=s,e.u=Ce(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.qa=new Kr(e.o.preferredAudioLanguage,e.o.preferredVariantRole,e.o.preferredAudioChannelCount),e.ra=e.o.preferredTextLanguage,e.Ob=e.o.preferredTextRole,e.Nb=e.o.preferForcedSubs,nu(e.B.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&&(Es(e.j.g,t,!0),Ho(e.i,t,n,i),qs(e))})),e.C=function(e,t){return new To(e.g,e.B,e.o.streaming,t,(function(){if(e.Pa&&No(e.Pa,!0),e.i)for(var t=e.i,n=t.D.Cc(),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.da=null;var s=t.D.S;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.wa(e.g,"error",(function(){r.reject(Zs(e))})),new $r(r,(function(){return r.reject(new le(2,7,7001)),Promise.resolve()}))}(i,e,t)})),this.la=new ts(this.ta,{Ze:function(e,t,n,r){var a=null;return e==i.ta&&(a=n==i.ta?i.ta:i.Sa),e==i.Sa&&(a=n==i.ta||t.G!=r.G?i.ta:n==i.Sa?i.Sa:n==i.Ha||n==i.O?i.Ha:n==i.Qa?i.od:null),e==i.Ha&&(a=n==i.O&&t.G==r.G?i.nd:i.W),e==i.nd&&(a=lu(i.O,i.jd,i.W,n,t,r)),e==i.jd&&(a=lu(i.O,i.gd,i.W,n,t,r)),e==i.gd&&(a=lu(i.O,i.O,i.W,n,t,r)),e==i.od&&(a=n==i.Qa&&t.G==r.G?i.Qa:i.W),e!=i.O&&e!=i.Qa||(a=i.W),e==i.W&&(a=r.G&&t.G==r.G?i.Sa:i.ta),a},Ne:function(e,t,n){return i.dispatchEvent(Ms(Su,(new Map).set("state",e.name))),r.get(e)(t,n)},handleError:function(e){return P((function(t){return 1==t.g?w(t,Cs(i,e),2):t.return(e.G?i.Sa:i.ta)}))},rf:function(e){i.dispatchEvent(Ms(Eu,(new Map).set("state",e.name)))}}),t&&this.Qb(t,!0)}function Ms(e,t){return new na(e,t)}function Cs(e,t){var n,i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:return e.l!=_u&&(e.l=Ou),n=e.ed.map((function(e){return e()})),e.ed=[],w(f,Promise.all(n),2);case 2:if(e.dispatchEvent(Ms(Pu)),t.mimeType=null,t.startTime=null,t.uri=null,t.G&&(e.h.Ea(t.G,"loadedmetadata"),e.h.Ea(t.G,"playing"),e.h.Ea(t.G,"pause"),e.h.Ea(t.G,"ended"),e.h.Ea(t.G,"ratechange")),e.Pa&&(e.Pa.release(),e.Pa=null),e.rc&&(e.rc.stop(),e.rc=null),!e.s){f.v(3);break}return w(f,e.s.stop(),4);case 4:e.s=null,e.tc=null;case 3:if(!e.u){f.v(5);break}return w(f,e.u.stop(),5);case 5:if(!e.i){f.v(7);break}return w(f,e.i.destroy(),8);case 8:e.i=null;case 7:if(e.F&&(e.F.release(),e.F=null),e.C&&(e.C.release(),e.C=null),!e.L){f.v(9);break}return w(f,e.L.destroy(),10);case 10:e.L=null;case 9:if(e.H&&e.H.onAssetUnload(),!t.G||!t.G.src){f.v(11);break}return w(f,new Promise((function(e){return new Be(e).V(.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 w(f,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.$a=null,e.I=null,e.B){for(i=l(e.B.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.B.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}e.B=null,e.j=new ks,e.hd=null,Us(e),T(f)}}))}function Ds(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(Ms(xu,t))}function Rs(e,t){return new Ea(t,e.o.drm.updateExpirationTime)}function Ns(e,t){e.I=new Gr,e.I.g=zr,qr(e.I,t,Math.min(.5,t/2)),Us(e),e.rc=new Be((function(){Ps(e)})).Da(.25)}function Ps(e){switch(e.l){case Fu:if(e.g.ended)var t=!0;else{var n=Hn(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case Uu:e:if(e.g.ended||Hi(e.L))t=!0;else{if(e.B.presentationTimeline.Z()){n=e.B.presentationTimeline.ib();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.I).h.get(n.g);t=n.g,i=r||i>=a?Xr:zr,n.g=i,t!=i&&Us(e)}function Ls(e){if(e.s){var t=aa(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{Os(e,e.B)}catch(t){Js(e,t)}e.u&&Vs(e),!(t=e.i.h)||t.allowedByApplication&&t.allowedByKeySystem||Hs(e)}if(e.P&&e.P.Ld(e.o.streaming.forceHTTPS),e.L&&(t=e.o.textDisplayFactory,e.hd!=t)){var n=Ce(t),i=e.L,r=i.m;i.m=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.i&&(i.i.i=n),e.hd=t,e.i&&((n=(t=e.i).g.get(ci))&&Go(t,n.stream,!0,0,!0))}e.u&&(e.u.configure(e.o.abr),e.o.abr.enabled?e.u.enable():e.u.disable(),$s(e)),e.I&&(t=e.o.streaming.rebufferingGoal,e.B&&(t=Math.max(t,e.B.minBufferTime)),qr(e.I,t,Math.min(.5,t/2))),e.B&&nu(e.B.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd)}function js(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function _s(e){var t=ys();return t.streaming.failureCallback=function(t){e.Z()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.Fd())},t.textDisplayFactory=function(){return e.qc?new ls(e.g,e.qc):new rs(e.g)},t}function Os(e,t){if(e.l!=_u){for(var n=e.o.restrictions,i=e.kd,r=!1,a=l(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=dr(o,n,i),s!=o.allowedByApplication&&(r=!0)}if(r&&e.i&&zs(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,Ca(e.m,o.initDataType,o.initData);iu(e,t)}}function Us(e){var t=e.pd();if(e.j&&e.I&&e.C){var n=e.F;n.j=t,Do(n),Bs(e)}t=(new Map).set("buffering",t),e.dispatchEvent(Ms(pu,t))}function Fs(e){var t=e.g.playbackRate;0!=t&&(e.F&&e.F.set(t),t=Ms(Au),e.dispatchEvent(t))}function Bs(e){if(e.j&&e.I){var t=e.j.h;e.I.g==zr?Ts(t,"buffering"):e.g.paused?Ts(t,"paused"):e.g.ended?Ts(t,"ended"):Ts(t,"playing")}}function Vs(e){try{iu(e,e.B)}catch(t){return Js(e,t),!1}var t=e.B.variants.filter((function(e){return Mr(e)}));return t=e.qa.create(t),e.u.setVariants(Array.from(t.values())),!0}function Hs(e){var t;(t=Vs(e)?e.u.chooseVariant():null)&&(Ks(e,t,!0,!0,0),qs(e))}function Ks(e,t,n,i,r){var a=e.i.h;t==a?i&&Ho(e.i,t,i,r,!0):(Es(e.j.g,t,n),Ho(e.i,t,i,r),n=null,a&&(n=xr(a)),Xs(e,n,t=xr(t)))}function Gs(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),Xs(e,n=kr(n),kr(t))}function qs(e){au(e,Ms(hu))}function zs(e){au(e,Ms(Nu))}function Xs(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),au(e,t=Ms(Lu,t))}function Ws(e){au(e,Ms(Iu))}function Ys(e){au(e,Ms(Mu))}function $s(e){var t=(new Map).set("newStatus",e.o.abr.enabled);au(e,Ms(fu,t))}function Js(e,t){if(e.l!=_u){var n=Ms(vu,(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function Qs(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(Ms(t,n))}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 eu(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.B.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&&!Vu.includes(c)}s!=a.allowedByKeySystem&&(r=!0)}}r&&Vs(e),(i=e.i.h)&&!i.allowedByKeySystem&&Hs(e),r&&zs(e)}}function tu(e,t,n){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,n),t=Ms(yu),e.dispatchEvent(t)}function nu(e,t,n){0h?e.D.S.Ma(h):e.D.S.Ma(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=zo(c),e.g.set(u,d),Jo(e,d,0));T(f)}))}(e),2);Pi(e.J),e.m=!0,T(t)}))},Bo.prototype.ac=function(t){var n,i,r,a,o,s=this;return P((function(u){switch(u.g){case 1:if(Pi(s.J),t.La||null==t.Oa||t.Rb)return u.return();if(t.Oa=null,!t.rb){u.v(2);break}return w(u,$o(s,t,t.Rc,t.wc),3);case 3:return u.return();case 2:if(t.stream.segmentIndex){u.v(4);break}return n=t.stream,w(u,t.stream.createSegmentIndex(),5);case 5:if(n!=t.stream)return null==t.Oa&&Jo(s,t,0),u.return();case 4:x(u,6),i=function(t,n){if(Wo(n))return function(e,t){var n=Gi(e,"video")||0;Mi(e.i,t,n)}(t.D.S,n.stream.originalId||""),null;n.type==ci&&function(e){e.i&&Mi(e.i,"",0)}(t.D.S);var i=t.D.Cc(),r=n.Ca?n.Ca.endTime:i,a=function(e,t,n){return t==ci?null==(e=e.i).h||e.ht.B.presentationTimeline.getDuration()-r)return n.endOfStream=!0,"video"==n.type&&(i=t.g.get(ci))&&Wo(i)&&(i.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return.5;if(a=Gi(t.D.S,n.type),a=function(e,t,n,i){if(t.da)return t.da.current();if(t.Ca||i)return t.da=t.stream.segmentIndex.yb(t.Ca?t.Ca.endTime:i),t.da&&t.da.next().value;e=e.o.inaccurateManifestTolerance,i=Math.max(n-e,0);var r=null;return e&&(t.da=t.stream.segmentIndex.yb(i),r=t.da&&t.da.next().value),r||(t.da=t.stream.segmentIndex.yb(n),r=t.da&&t.da.next().value),r}(t,n,i,a),!a)return 1;o=1/0;for(var s=Array.from(t.g.values()),u=(s=l(s)).next();!u.done;u=s.next())Wo(u=u.value)||u.da&&!u.da.current()||(o=Math.min(o,u.Ca?u.Ca.endTime:i));return r>=o+t.B.presentationTimeline.g?1:(function(t,n,i,r){var a,o,s,u,l,c,d,f,h,p,g;return P((function(m){switch(m.g){case 1:return a=di,o=n.stream,s=n.da,n.La=!0,x(m,2),w(m,function(e,t,n){var i,r,a,o,s,u,l;return P((function(c){return i=[],r=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.td&&r==t.sd&&a==t.rd||(s=function(){var n;return P((function(i){if(1==i.g)return x(i,2),t.sd=r,t.rd=a,t.td=o,w(i,function(e,t,n,i,r){return P((function(a){return t==di.ba?(e.i.C=n,function(e,t,n){e.j=t,e.l=n}(e.i,i,r),a.return()):w(a,Promise.all([Yi(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,Wi(e,t)})),Yi(e,t,(function(){var i=n;0>i&&(i+=.001),e.j[t].timestampOffset=i,Wi(e,t)})),Yi(e,t,(function(){e.j[t].appendWindowStart=0,e.j[t].appendWindowEnd=r,e.j[t].appendWindowStart=i,Wi(e,t)}))]),0)}))}(e.D.S,t.type,o,r,a),4);if(2!=i.g)return E(i,0);throw n=A(i),t.sd=null,t.rd=null,t.td=null,n}))},i.push(s())),!function(e,t){return e&&t?e.Xb()==t.Xb()&&e.Tb()==t.Tb()&&dt(e.oa(),t.oa()):e==t}(n.h,t.Fc)&&(t.Fc=n.h)&&(u=Yo(e,t,n.h),l=function(){var n,i,r;return P((function(a){switch(a.g){case 1:return x(a,2),w(a,u,4);case 4:return n=a.h,Pi(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={ub:r.ub},a=n.next())r.ub=a.value,e.some(function(e){return function(t){return t.startTime==e.ub.startTime&&t.endTime==e.ub.endTime&&t.text==e.ub.payload}}(r))||(a=as(r.ub))&&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&&(os(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"},B("shaka.text.SimpleTextDisplayer",rs),rs.prototype.setTextVisibility=rs.prototype.setTextVisibility,rs.prototype.isTextVisible=rs.prototype.isTextVisible,rs.prototype.destroy=rs.prototype.destroy,rs.prototype.append=rs.prototype.append,rs.prototype.remove=rs.prototype.remove,B("shaka.util.Dom",ss),ss.removeAllChildren=us,(i=ls.prototype).append=function(e){for(var t=[].concat(c(this.l)),n={},i=(e=l(e)).next();!i.done;n={jc:n.jc},i=e.next())n.jc=i.value,t.some(function(e){return function(t){return ht(t,e.jc)}}(n))||this.l.push(n.jc);ds(this)},i.destroy=function(){this.u.removeChild(this.i),this.i=null,this.m=!1,this.l=[],this.C&&this.C.stop(),this.j.clear(),this.h&&(this.h.release(),this.h=null),this.s&&(this.s.disconnect(),this.s=null)},i.remove=function(e,t){if(!this.i)return!1;var n=this.l.length;return this.l=this.l.filter((function(n){return n.startTime=t})),ds(this,n>this.l.length),!0},i.isTextVisible=function(){return this.m},i.setTextVisibility=function(e){this.m=e},B("shaka.text.UITextDisplayer",ls),ls.prototype.setTextVisibility=ls.prototype.setTextVisibility,ls.prototype.isTextVisible=ls.prototype.isTextVisible,ls.prototype.remove=ls.prototype.remove,ls.prototype.destroy=ls.prototype.destroy,ls.prototype.append=ls.prototype.append,B("shaka.text.WebVttGenerator",(function(){})),B("shaka.util.ConfigUtils",ps),ps.convertToConfigObject=ms,ps.mergeConfigObjects=gs,B("shaka.util.PlayerConfiguration",vs),vs.mergeConfigObjects=bs,m(Is,ra),(i=Is.prototype).destroy=function(){var e,t=this;return P((function(n){switch(n.g){case 1:return t.l==_u?n.return():(t.l=_u,e=ns(t.la,(function(){return{node:t.ta,payload:cu(),kb:!1}})),w(n,new Promise((function(t){e.Eb=function(){},e.Hc=function(){t()},e.nb=function(){t()},e.onError=function(){t()},e.Jc=function(){t()}})),2));case 2:return w(n,t.la.destroy(),3);case 3:if(t.h&&(t.h.release(),t.h=null),t.dd=null,t.u=null,t.o=null,t.j=null,t.qc=null,!t.P){n.v(4);break}return w(n,t.P.destroy(),5);case 5:t.P=null;case 4:ra.prototype.release.call(t),T(n)}}))},i.Qb=function(e,t){if(t=void 0===t||t,this.l==_u)return Promise.reject(uu());var n=cu();n.G=e,Ve()||(t=!1);var i=t?this.Ha:this.Sa,r=ns(this.la,(function(){return{node:i,payload:n,kb:!1}}));return r.Eb=function(){},du(r)},i.detach=function(){var e=this;if(this.l==_u)return Promise.reject(uu());var t=ns(this.la,(function(){return{node:e.ta,payload:cu(),kb:!1}}));return t.Eb=function(){},du(t)},i.Rd=function(e){var t=this;if(e=void 0===e||e,this.l==_u)return Promise.reject(uu());Ve()||(e=!1);var n=cu(),i=ns(this.la,(function(i){var r=i.G&&e?t.Ha:i.G?t.Sa:t.ta;return n.G=i.G,{node:r,payload:n,kb:!1}}));return i.Eb=function(){},du(i)},i.load=function(e,t,n){var i=this;if(this.l==_u)return Promise.reject(uu());this.dispatchEvent(Ms(wu));var r=cu();r.uri=e,r.Pd=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",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Za(i)]),n){if(""==(t.G||Ye()).canPlayType(n))return!1;if(!Ve()||!(n in eo)&&!(Za(i)in to)||e.o.streaming.preferNativeHls)return!0;if(ze())return e.o.streaming.useNativeHlsOnSafari}return!1}(this,r)?this.Qa:this.O,o=ns(this.la,(function(e){return null==e.G?null:(r.G=e.G,{node:a,payload:r,kb:!0})}));return this.j=new ks,o.Eb=function(){},new Promise((function(e,t){o.Jc=function(){return t(new le(2,7,7002))},o.Hc=function(){e(),i.dispatchEvent(Ms(bu))},o.nb=function(){return t(uu())},o.onError=function(e){return t(e)}}))},i.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=ms(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=bs(this.o,e,_s(this));return Ls(this),n},i.getConfiguration=function(){var e=_s(this);return bs(e,this.o,_s(this)),e},i.Df=function(){for(var e in this.o)delete this.o[e];bs(this.o,_s(this),_s(this)),Ls(this)},i.Ue=function(){return this.l},i.Ye=function(){return this.g},i.Vb=function(){return this.P},i.md=function(){return this.$a},i.ae=function(){return this.H?this.H:null},i.Z=function(){return this.B?this.B.presentationTimeline.Z():!(!this.g||!this.g.src)&&1/0==this.g.duration},i.mb=function(){return!!this.B&&this.B.presentationTimeline.mb()},i.lf=function(){if(this.B){var e=this.B.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.Hd=function(){if(this.B){var e=this.B.presentationTimeline;return{start:e.zb(),end:e.Ua()}}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 Da(this.drmInfo())},i.drmInfo=function(){return this.m?this.m.i:null},i.Ub=function(){return this.m?this.m.Ub():1/0},i.Bc=function(){return this.m?this.m.Bc():{}},i.pd=function(){return!!this.I&&this.I.g==zr},i.$e=function(){return this.g?this.F?this.F.i:1:0},i.Mf=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==Uu&&(this.u.playbackRateChanged(e),Vo(this.i,1n(o,i))&&(a=o);if(a)return n=xr(a),void this.qe(n,!0)}Hs(this)}else if(this.g&&this.g.audioTracks){for(r=Array.from(this.g.audioTracks),n=rr(e),a=i=null,o=(r=l(r)).next();!o.done;o=r.next()){var s=kr(o=o.value);rr(s.language)==n&&(i=o,t?s.roles.includes(t)&&(a=o):0==s.roles.length&&(a=o))}a?Gs(this,a):i&&Gs(this,i)}},i.Jd=function(e,t,n){if(n=void 0!==n&&n,this.B&&this.C)this.ra=e,this.Ob=t||"",this.Nb=n,(e=Dr(this.B.textStreams,this.ra,this.Ob,this.Nb)[0]||null)&&e!=this.i.i&&(As(this.j.g,e,!1),this.o.streaming.alwaysStreamText||this.qd())&&(Ko(this.i,e),Ws(this));else{var i=rr(e);(e=this.jb().find((function(e){return rr(e.language)==i&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.pe(e)}},i.Ef=function(e){if(this.B&&this.C){for(var t=null,n=l(this.B.variants),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){t=i;break}null!=t&&(this.qa=new Kr(t.language,"",0,e),Hs(this))}},i.qd=function(){var e=this.ea;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?js(this).some((function(e){return"showing"==e.mode})):e},i.Kf=function(e){if(e=!!e,this.ea!=e){if(this.ea=e,this.l==Uu)this.L.m.setTextVisibility(e),this.o.streaming.alwaysStreamText||(e?this.i.i||0<(e=Dr(this.B.textStreams,this.ra,this.Ob,this.Nb)).length&&(Ko(this.i,e[0]),Ws(this)):function(e){var t=e.g.get(ci);t&&(Qo(t),Zo(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=js(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");Ys(this)}},i.bf=function(){if(!this.Z())return null;var e=this.la.l,t=0;if(this.C)t=this.C.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.B?new Date(1e3*(this.B.presentationTimeline.j+t)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:new Date(e.getTime()+1e3*t)):null},i.be=function(){if(!this.Z())return null;if(this.B)return new Date(1e3*this.B.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},i.zc=function(){if(this.l==Uu)return this.L.zc();var e={total:[],audio:[],video:[],text:[]};return this.l==Fu&&(e.total=qn(this.g.buffered)),e},i.getStats=function(){if(this.l!=Uu&&this.l!=Fu)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:[]};Bs(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.U=Number(e.droppedVideoFrames),n.O=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==Uu&&((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.W=e.video.width||NaN,n.C=t),this.Z()&&(e=this.be().valueOf()+1e3*this.Hd().end,this.j.F=(Date.now()-e)/1e3),this.B&&this.B.presentationTimeline&&(this.j.I=this.B.presentationTimeline.g),e=this.u.getBandwidthEstimate(),this.j.s=e);var i=this.j;e=i.W,n=i.C,t=i.u;for(var r=i.O,a=i.U,o=i.L,s=i.s,u=i.i,c=i.l,d=i.H,f=i.j,h=xs(i.h,"playing"),p=xs(i.h,"paused"),g=xs(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),w=[],T=(i=l(i.g.g)).next();!T.done;T=i.next())T=T.value,w.push({timestamp:T.timestamp,id:T.id,type:T.type,fromAdaptation:T.fromAdaptation,bandwidth:T.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:w}},i.addTextTrack=function(e,t,n,i,r,a,o){if(o=void 0!==o&&o,xe("addTextTrack","Please use an addTextTrackAsync."),this.l!=Uu&&this.l!=Fu)throw new le(1,7,7004);if(!i){var s=Za(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==Fu){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.jb().find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return zs(this),e;throw new le(1,2,2012)}if(1/0==(s=this.B.presentationTimeline.getDuration()))throw new le(1,4,4033);if(!Ii(Ti((e={id:this.ld++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ko(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.B.textStreams.push(e),zs(this),Sr(e)},i.Ce=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 P((function(T){switch(T.g){case 1:if(b.l!=Uu&&b.l!=Fu)throw new le(1,7,7004);if(i){T.v(2);break}if(s=Za(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]){T.v(3);break}return x(T,4),w(T,Qa(e,b.P,b.o.streaming.retryParameters),6);case 6:i=T.h,E(T,3);break;case 4:A(T);case 3:if(!i)throw new le(1,2,2011,s);case 2:if(b.l!=Fu){T.v(7);break}if("text/vtt"==i){T.v(8);break}return w(T,function(e,t,n){var i,r,a;return P((function(o){return 1==o.g?(i=ga,(r=da([e],n)).method="GET",w(o,t.request(i,r).promise,2)):(a=o.h,o.return(a.data))}))}(e,b.P,b.o.streaming.retryParameters),9);case 9:u=T.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),t=n.parseMedia(t,e),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);throw new le(2,2,2014,n)}(b,u,i),d=new Blob([c],{type:"text/vtt"}),e=er(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.jb(),p=h.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return zs(b),T.return(p);throw new le(1,2,2012);case 7:if(g=di,1/0==(m=b.B.presentationTimeline.getDuration()))throw new le(1,4,4033);if(v={id:b.ld++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ko(0,m,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:g.ba,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},y=Ti(v.mimeType,v.codecs),!Ii(y))throw new le(2,2,2014,i);return b.B.textStreams.push(v),zs(b),T.return(Sr(v))}}))},i.Md=function(e,t){this.kd.width=e,this.kd.height=t},i.Fd=function(){if(this.l==Uu){var e=this.i;if(e.J.g)e=!1;else if(e.j)e=!1;else{for(var t=l(e.g.values()),n=t.next();!n.done;n=t.next())(n=n.value).Yb&&(n.Yb=!1,Jo(e,n,.1));e=!0}}else e=!1;return e},i.Ve=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.B},i.We=function(){return this.tc},i.ue=function(e){this.qc=e},i.yc=function(e){var t=this;return P((function(n){if(1==n.g)return w(n,function(e,t){var n;return P((function(i){if(1==i.g)return n=e.i?e.i.h:null,w(i,fr(e.m,n,t,e.o.useMediaCapabilities),2);ru(t),T(i)}))}(t,e),2);Os(t,e),T(n)}))},B("shaka.Player",Is),Is.prototype.setVideoContainer=Is.prototype.ue,Is.prototype.getManifestParserFactory=Is.prototype.We,Is.prototype.getManifest=Is.prototype.Ve,Is.prototype.retryStreaming=Is.prototype.Fd,Is.prototype.setMaxHardwareResolution=Is.prototype.Md,Is.prototype.addTextTrackAsync=Is.prototype.Ce,Is.prototype.addTextTrack=Is.prototype.addTextTrack,Is.prototype.getStats=Is.prototype.getStats,Is.prototype.getBufferedInfo=Is.prototype.zc,Is.prototype.getPresentationStartTimeAsDate=Is.prototype.be,Is.prototype.getPlayheadTimeAsDate=Is.prototype.bf,Is.prototype.setTextTrackVisibility=Is.prototype.Kf,Is.prototype.isTextTrackVisible=Is.prototype.qd,Is.prototype.selectVariantsByLabel=Is.prototype.Ef,Is.prototype.selectTextLanguage=Is.prototype.Jd,Is.prototype.selectAudioLanguage=Is.prototype.Id,Is.prototype.getTextLanguages=Is.prototype.ff,Is.prototype.getAudioLanguages=Is.prototype.Oe,Is.prototype.getTextLanguagesAndRoles=Is.prototype.gf,Is.prototype.getAudioLanguagesAndRoles=Is.prototype.Pe,Is.prototype.selectVariantTrack=Is.prototype.qe,Is.prototype.selectTextTrack=Is.prototype.pe,Is.prototype.getThumbnails=Is.prototype.hf,Is.prototype.getImageTracks=Is.prototype.Se,Is.prototype.getTextTracks=Is.prototype.jb,Is.prototype.getVariantTracks=Is.prototype.Ec,Is.prototype.cancelTrickPlay=Is.prototype.Ge,Is.prototype.trickPlay=Is.prototype.Mf,Is.prototype.getPlaybackRate=Is.prototype.$e,Is.prototype.isBuffering=Is.prototype.pd,Is.prototype.getKeyStatuses=Is.prototype.Bc,Is.prototype.getExpiration=Is.prototype.Ub,Is.prototype.drmInfo=Is.prototype.drmInfo,Is.prototype.keySystem=Is.prototype.keySystem,Is.prototype.seekRange=Is.prototype.Hd,Is.prototype.isAudioOnly=Is.prototype.lf,Is.prototype.isInProgress=Is.prototype.mb,Is.prototype.isLive=Is.prototype.Z,Is.prototype.getAdManager=Is.prototype.ae,Is.prototype.getAssetUri=Is.prototype.md,Is.prototype.getNetworkingEngine=Is.prototype.Vb,Is.prototype.getMediaElement=Is.prototype.Ye,Is.prototype.getLoadMode=Is.prototype.Ue,Is.prototype.resetConfiguration=Is.prototype.Df,Is.prototype.getConfiguration=Is.prototype.getConfiguration,Is.prototype.configure=Is.prototype.configure,Is.prototype.load=Is.prototype.load,Is.prototype.unload=Is.prototype.Rd,Is.prototype.detach=Is.prototype.detach,Is.prototype.attach=Is.prototype.Qb,Is.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,P((function(o){if(1==o.g)return t={},e?w(o,function(){var e,t,n,i,r,a;return P((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 P((function(o){switch(o.g){case 1:return x(o,2),w(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}),w(o,t.createMediaKeys(),5);case 5:E(o,0);break;case 2:A(o),i.set(e,null),T(o)}}))},a=e.map((function(e){return r(e)})),w(o,Promise.all(a),2)):o.return(xa(i))}))}(),3):o.v(2);2!=o.g&&(t=o.h);var s={};if(Ve()){for(var u in eo)s[u]=!0;for(var c in to)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()?!!eo[d]:He(d);for(var f in u)s[f]=Ve()?!!to[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=Hu)i[a]=r[a]();return o.return(i)}))},Is.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"))},Is.setAdManagerFactory=function(e){Ku=e},Is.registerSupportPlugin=function(e,t){Hu[e]=t},Is.prototype.destroy=Is.prototype.destroy;var fu="abrstatuschanged",hu="adaptation",pu="buffering",gu="drmsessionupdate",mu="emsg",vu="error",yu="expirationupdated",bu="loaded",wu="loading",Tu="manifestparsed",xu="metadata",Su="onstatechange",Eu="onstateidle",Au="ratechange",ku="streaming",Iu="textchanged",Mu="texttrackvisibility",Cu="timelineregionadded",Du="timelineregionenter",Ru="timelineregionexit",Nu="trackschanged",Pu="unloading",Lu="variantchanged",ju={Tf:fu,Uf:hu,Vf:pu,Wf:gu,Yf:mu,Error:vu,Zf:yu,$f:"largegap",ag:bu,bg:wu,cg:Tu,Metadata:xu,dg:Su,eg:Eu,fg:Au,gg:"sessiondata",hg:ku,ig:Iu,jg:Mu,kg:Cu,lg:Du,mg:Ru,ng:Nu,og:Pu,pg:Lu},_u=0,Ou=1,Uu=2,Fu=3;Is.LoadMode={DESTROYED:_u,NOT_LOADED:Ou,MEDIA_SOURCE:Uu,SRC_EQUALS:Fu},Is.version="v3.1.6";var Bu=["3","1"];Ae=new function(e){this.g=e,this.i=Se,this.h=Ee}(new Te(Number(Bu[0]),Number(Bu[1])));var Vu=["output-restricted","internal-error"],Hu={},Ku=null;function Gu(){this.h=[],this.j=this.i=this.g=0}function qu(e,t){var n=this;this.i=e,this.g=t,this.j=!1,this.l=this.g.getVolume(),this.h=new _i,this.h.A(this.g,google.ima.AdEvent.Type.PAUSED,(function(){n.j=!0})),this.h.A(this.g,google.ima.AdEvent.Type.RESUMED,(function(){n.j=!1}))}function zu(t,n,i,r){var a=this;this.m=t,this.g=n,this.u=null,this.C=NaN,this.j=r,this.s=null,this.h=new _i,google.ima.settings.setLocale(i),(t=new google.ima.AdDisplayContainer(this.m,this.g)).initialize(),this.l=new google.ima.AdsLoader(t),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v3.1.6"),this.i=null,this.h.wa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){t.j(new na("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.C))),t.i=n.getAdsManager(t.g),t.j(new na("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.i)));var i=t.i.getCuePoints();if(i.length){for(var r=[],a=(i=l(i)).next();!a.done;a=i.next())r.push(new Zu(a.value));t.j(new na("ad-cue-points-changed",(new Map).set("cuepoints",r)))}!function(e){function t(t,n){var i=(new Map).set("originalEvent",t);e.j(new na(n,i))}e.h.A(e.i,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Xu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){Wu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.STARTED,(function(t){Wu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.A(e.i,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.A(e.i,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.A(e.i,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")})),e.h.A(e.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Yu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Yu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.A(e.i,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.A(e.i,google.ima.AdEvent.Type.PAUSED,(function(n){e.s.j=!0,t(n,"ad-paused")})),e.h.A(e.i,google.ima.AdEvent.Type.RESUMED,(function(n){e.s.j=!1,t(n,"ad-resumed")})),e.h.A(e.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(e){t(e,"ad-skip-state-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.A(e.i,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.A(e.i,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.A(e.i,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.A(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.A(e.i,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.A(e.i,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.A(e.i,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.i.init(t.g.offsetWidth,t.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.A(t.g,"loadeddata",(function(){t.i.resize(t.g.offsetWidth,t.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e&&(t.u=new ResizeObserver((function(){t.i.resize(t.g.offsetWidth,t.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.u.observe(t.g)),t.i.start()}catch(e){Yu(t,null)}}(a,t)})),this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Xu(a,e)})),this.g.onended=function(){a.l.contentComplete()}}function Xu(e,t){t.getError(),Yu(e,null),e.j(new na("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Wu(e,t){var n=t.getAd();e.s=new qu(n,e.i),n=(new Map).set("ad",e.s).set("sdkAdObject",n).set("originalEvent",t),e.j(new na("ad-started",n)),e.m.setAttribute("ad-active","true"),e.g.pause()}function Yu(e,t){e.j(new na("ad-stopped",(new Map).set("originalEvent",t))),e.m.removeAttribute("ad-active"),e.g.play()}function $u(e,t){this.i=e,this.h=null,this.g=t}function Ju(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.C=this.m=this.s=null,this.F="",this.h=new _i,(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 na("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i))),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.j(new na("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.I)));var n=t.getStreamData().url;e.l.resolve(n),e.l=null,e.H||e.h.A(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.A(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.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),r.m=new $u(e,r.g),r.C&&(r.m.h=r.C),r.j(new na("ad-started",(new Map).set("ad",r.m))),r.u.setAttribute("ad-active","true")})),this.h.A(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.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){r.C=e.getStreamData().adProgressData,r.m&&(r.m.h=r.C)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){r.j(new na("ad-first-quartile"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){r.j(new na("ad-midpoint"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){r.j(new na("ad-third-quartile"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){r.j(new na("ad-complete")),r.j(new na("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){r.j(new na("ad-skipped")),r.j(new na("ad-stopped"))})),this.h.A(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 na("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function Qu(){ra.call(this),this.g=this.h=null,this.j=new Gu,this.i=navigator.language}function Zu(e,t){this.start=e,this.end=void 0===t?null:t}function el(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof na){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 tl(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=qu.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},B("shaka.ads.ClientSideAd",qu),qu.prototype.release=qu.prototype.release,qu.prototype.getPositionInSequence=qu.prototype.getPositionInSequence,qu.prototype.getSequenceLength=qu.prototype.getSequenceLength,qu.prototype.setMuted=qu.prototype.setMuted,qu.prototype.resize=qu.prototype.resize,qu.prototype.isMuted=qu.prototype.isMuted,qu.prototype.setVolume=qu.prototype.setVolume,qu.prototype.getVolume=qu.prototype.getVolume,qu.prototype.play=qu.prototype.play,qu.prototype.pause=qu.prototype.pause,qu.prototype.skip=qu.prototype.skip,qu.prototype.canSkipNow=qu.prototype.canSkipNow,qu.prototype.getTimeUntilSkippable=qu.prototype.getTimeUntilSkippable,qu.prototype.isSkippable=qu.prototype.isSkippable,qu.prototype.isPaused=qu.prototype.isPaused,qu.prototype.getRemainingTime=qu.prototype.getRemainingTime,qu.prototype.getMinSuggestedDuration=qu.prototype.getMinSuggestedDuration,qu.prototype.getDuration=qu.prototype.getDuration,zu.prototype.stop=function(){this.i&&this.i.stop(),this.m&&us(this.m)},zu.prototype.release=function(){this.stop(),this.u&&this.u.disconnect(),this.h&&this.h.release(),this.i&&this.i.destroy(),this.l.destroy()},(i=$u.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},B("shaka.ads.ServerSideAd",$u),$u.prototype.release=$u.prototype.release,$u.prototype.getPositionInSequence=$u.prototype.getPositionInSequence,$u.prototype.getSequenceLength=$u.prototype.getSequenceLength,$u.prototype.setMuted=$u.prototype.setMuted,$u.prototype.resize=$u.prototype.resize,$u.prototype.isMuted=$u.prototype.isMuted,$u.prototype.setVolume=$u.prototype.setVolume,$u.prototype.getVolume=$u.prototype.getVolume,$u.prototype.play=$u.prototype.play,$u.prototype.pause=$u.prototype.pause,$u.prototype.skip=$u.prototype.skip,$u.prototype.canSkipNow=$u.prototype.canSkipNow,$u.prototype.getTimeUntilSkippable=$u.prototype.getTimeUntilSkippable,$u.prototype.isSkippable=$u.prototype.isSkippable,$u.prototype.isPaused=$u.prototype.isPaused,$u.prototype.getRemainingTime=$u.prototype.getRemainingTime,$u.prototype.getMinSuggestedDuration=$u.prototype.getMinSuggestedDuration,$u.prototype.getDuration=$u.prototype.getDuration,Ju.prototype.stop=function(){this.F="",this.s=null},Ju.prototype.release=function(){this.stop(),this.h&&this.h.release()},Ju.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.i.onTimedMetadata(t)}},m(Qu,ra),(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&&this.h.release(),this.h=new zu(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.release=function(){this.h&&(this.h.release(),this.h=null),this.g&&(this.g.release(),this.g=null),ra.prototype.release.call(this)},i.onAssetUnload=function(){this.h&&this.h.stop(),this.g&&this.g.stop(),this.dispatchEvent(new na("ad-stopped")),this.j=new Gu},i.requestClientSideAds=function(e){if(!this.h)throw new le(1,10,10001);var t=this.h;t.C=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&&this.g.release(),this.g=new Ju(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.6";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.6",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)},B("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.release=Qu.prototype.release,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",Ku=function(){return new Qu};var nl="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),il="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),rl=["loop","playbackRate"],al=["pause","play"],ol={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},sl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ul=[["getConfiguration","configure"]],ll=[["isTextTrackVisible","setTextTrackVisibility"]],cl="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),dl=["attach","detach","load","unload"];function fl(e,t,n,i,r,a){var o=this;this.L=e,this.j=new Be(t),this.ea=n,this.C=!1,this.u=i,this.I=r,this.U=a,this.h=this.m=!1,this.W="",this.s=null,this.F=function(){return vl(o)},this.H=function(e,t){var n=tl(t);switch(n.type){case"event":var i=n.targetName;n=ia(n.event),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.C&&(o.ea(),o.C=!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.O=0,this.i={},this.l=null,Sl.add(this)}function hl(e,t,n){xl=n,n.addUpdateListener(e.F),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.H),vl(e),bl(e,{type:"init",initState:t,appData:e.s}),e.l.resolve()}function pl(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 gl(e,t){var n=e.U();e.l=new hi,e.C=!0,hl(e,n,t)}function ml(e){var t=xl;t.removeUpdateListener(e.F),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.H)}function vl(e){var t=!!xl&&"connected"==xl.status;if(e.h&&!t){for(var n in e.I(),e.g)e.g[n]={};yl(e)}e.h=t,e.W=t?xl.receiver.friendlyName:"",e.j.hc()}function yl(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new le(1,7,7e3))}}function bl(e,t){var n=el(t),i=xl;try{i.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),Y)}catch(t){throw n=new le(2,8,8005,t),i=new na("error",(new Map).set("detail",n)),e.u("player",i),e.wb(),n}}(i=fl.prototype).destroy=function(){return Sl.delete(this),yl(this),xl&&ml(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.ua=function(){return this.h},i.Dd=function(){return this.W},i.init=function(){if(this.L.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.hc();var t=new chrome.cast.SessionRequest(this.L);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(Sl),n=t.next();!n.done;n=t.next())gl(n.value,e)}),(function(e){for(var t=l(Sl),n=t.next();!n.done;n=t.next())n=n.value,Tl="available"==e,n.j.hc()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),Tl&&this.j.V(wl),(t=xl)&&t.status!=chrome.cast.SessionStatus.STOPPED?gl(this,t):xl=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=El),e.__onGCastApiAvailable!=El&&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.Kd=function(e){this.s=e,this.h&&bl(this,{type:"appData",appData:this.s})},i.cast=function(e){var t=this;return P((function(n){if(!t.m)throw new le(1,8,8e3);if(!Tl)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 hl(t,e,n)}),(function(e){return pl(t,e)})),w(n,t.l,0)}))},i.wb=function(){if(this.h){if(yl(this),xl){ml(this);try{xl.stop((function(){}),(function(){}))}catch(e){}xl=null}vl(this)}},i.get=function(e,t){var n=this;if("video"==e){if(al.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===bc}))[0])&&(e=pc(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 yc(e){var t=e.getAttribute("schemeIdUri"),n=tc(e,"urn:mpeg:cenc:2013","default_KID"),i=ec(e,"urn:mpeg:cenc:2013","pssh").map(ic);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,oe:t,keyId:n,init:0(g=m||0))if(p){if(null==(p=ac(p,"t",dc)))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.N();if(o.reader.skip(4),1==d)throw new le(2,3,3006);s.push(new io(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 Ic(e){this.h=se(e),this.g=new ye(this.h,0)}function Mc(e){var t=Cc(e);if(7s()&&!n.length?null:n}))}return Promise.resolve(E)}(u,s,r,o,a)}};var c=null;i=null,e.ha.id&&e.K.id&&(i=e.ha.id+","+e.K.id,c=n[i]);var d=function(e,t,n){var i=e.X.start,r=e.X.duration,a=i-t.Xa;r=r?i+r:1/0;for(var o=[],s={},u=l(te(t.timeline)),c=u.next();!c.done;s={Vc:s.Vc,Yc:s.Yc,ad:s.ad,Sc:s.Sc,cd:s.cd,Tc:s.Tc},c=u.next()){var d=(c=c.value).item,f=d.start,h=d.Qf;d=d.end,s.ad=c.ga+t.Ib,s.cd=h+t.Sd,s.Yc=e.K.id,s.Sc=e.bandwidth||null,s.Vc=t.vd,s.Tc=e.K.Aa,o.push(new io(i+f,i+d,function(e){return function(){var t=Tc(e.Vc,e.Yc,e.ad,e.Sc||null,e.cd);return oi(e.Tc,[t]).map((function(e){return e.toString()}))}}(s),0,null,n,a,i,r))}return o}(u,s,o),f=e.X.start,h=e.X.duration?e.X.start+e.X.duration:1/0,p=1/0!=h;return c?(p&&new Ao(d).ab(f,h,!0),c.Bb(d,e.presentationTimeline.Va())):(c=new Ao(d),i&&e.fb&&(n[i]=c)),e.presentationTimeline.Db(d),p&&c.ab(f,h),{xb:function(){return Promise.resolve(c)}}}function Kc(e){return e.ec}function Gc(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function qc(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,x,S,E,A,k,I,M,C,D,R,N,L,j,_,O;return P((function(P){switch(P.g){case 1:if(i=di,function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).uc),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.uc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).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.width==s.width&&r.frameRate==s.frameRate&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.label==s.label&&ct(r.roles,s.roles)&&Sa(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.Qc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).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),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).imageStreams),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.codecs==s.codecs&&r.mimeType==s.mimeType&&(a=!0);a||n.push(r)}t.imageStreams=n}}(t),!n&&1==t.length){r=t[0],e.g=r.uc,e.h=r.Qc,e.j=r.textStreams,e.i=r.imageStreams,P.v(2);break}for(a=-1,o=l(te(t)),s=o.next();!s.done;s=o.next())u=s.value,c=u.ga,d=u.item,e.m.has(d.id)||(e.m.add(d.id),-1==a&&(a=c));if(-1==a)return P.return();for(f=t.map((function(e){return e.uc})),h=t.map((function(e){return e.Qc})),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(ld(i.ba));for(y=l(g),b=y.next();!b.done;b=y.next())b.value.push(ld(i.pc));return w(P,Xc(e.g,f,a,$c,Qc),3);case 3:return w(P,Xc(e.h,h,a,$c,Qc),4);case 4:return w(P,Xc(e.j,p,a,$c,Qc),5);case 5:return w(P,Xc(e.i,g,a,$c,Qc),2);case 2:if(x=0,S=[],e.h.length&&e.g.length)for(C=l(e.g),D=C.next();!D.done;D=C.next())for(R=D.value,N=l(e.h),L=N.next();!L.done;L=N.next())j=L.value,_=Va(R.drmInfos,j.drmInfos),R.drmInfos.length&&j.drmInfos.length&&!_.length||(O=x++,S.push({id:O,language:R.language,primary:R.primary,audio:R,video:j,bandwidth:(R.bandwidth||0)+(j.bandwidth||0),drmInfos:_,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(E=e.h.concat(e.g),A=l(E),k=A.next();!k.done;k=A.next())I=k.value,M=x++,S.push({id:M,language:I.language,primary:I.primary,audio:I.type==i.eb?I:null,video:I.type==i.Ra?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});e.l=S,T(P)}}))}function zc(e){var t,n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,E,A,k;return P((function(I){switch(I.g){case 1:if(t=di,1==e.length)return I.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.eb}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.Ra}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.ba}))})),a=e.map((function(e){return e.filter((function(e){return e.type==t.pc}))})),o=l(r),s=o.next();!s.done;s=o.next())s.value.push(ud(t.ba));for(u=l(a),c=u.next();!c.done;c=u.next())c.value.push(ud(t.pc));return w(I,Xc([],n,0,Jc,Zc),2);case 2:return d=I.h,w(I,Xc([],i,0,Jc,Zc),3);case 3:return f=I.h,w(I,Xc([],r,0,Jc,Zc),4);case 4:return h=I.h,w(I,Xc([],a,0,Jc,Zc),5);case 5:if(p=I.h,g=0,f.length&&d.length)for(b=l(d),T=b.next();!T.done;T=b.next())for(x=T.value,S=l(f),E=S.next();!E.done;E=S.next())A=E.value,k=g++,A.variantIds.push(k),x.variantIds.push(k);else for(m=f.concat(d),v=l(m),y=v.next();!y.done;y=v.next())y.value.variantIds=[g++];return I.return(f.concat(d).concat(h).concat(p))}}))}function Xc(e,t,n,i,r){var a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,E,A,k,I;return P((function(M){switch(M.g){case 1:for(a=di,o=[],s=l(te(t)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ga,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){M.v(4);break}return w(M,function(e,t,n,i,r){var a;return P((function(o){return 1==o.g?(a=ed(t,e))?w(o,Wc(a),2):o.return(!1):(Yc(e,a,n,i,r),o.return(!0))}))}(p.value,t,n,r,o),5);case 5:if(!M.h)throw new le(2,4,4037);p=h.next(),M.v(2);break;case 4:g=l(o),m=g.next();case 6:if(m.done){M.v(8);break}v=m.value,y=l(v),b=y.next();case 9:if(b.done){m=g.next(),M.v(6);break}return w(M,function(e,t,n,i,r){var a,o;return P((function(s){return 1==s.g?(a=n(e),(o=ed(t,a))?a.createSegmentIndex?w(s,Wc(o),2):s.v(2):s.return(null)):(Yc(a,o,0,i,r),s.return(a))}))}(b.value,t,i,r,o),12);case 12:(T=M.h)&&e.push(T),b=y.next(),M.v(9);break;case 8:for(x=l(o),m=x.next();!m.done;m=x.next())for(S=m.value,E={},A=l(S),b=A.next();!b.done;E={Za:E.Za},b=A.next())if(E.Za=b.value,k=E.Za.type==a.ba&&!E.Za.language,I=E.Za.type==a.pc&&!E.Za.tilesLayout,!k&&!I&&e.some(function(e){return function(t){return t.mimeType==e.Za.mimeType&&Si(t.codecs)==Si(e.Za.codecs)}}(E)))throw new le(2,4,4037);return M.return(e)}}))}function Wc(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 Yc(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.ga,o=o.item,a>=n){i(e,o);var s=!0;"audio"==e.type&&0==ar(e.language,o.language)&&(s=!1),s&&r[a].delete(o)}}}function $c(e){return(e=Object.assign({},e)).originalId=null,e.createSegmentIndex=function(){return Promise.resolve()},e.segmentIndex=new Mo,e.emsgSchemeIdUris=[],e.keyIds=new Set,e.closedCaptions=null,e.trickModeVideo=null,e}function Jc(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Qc(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=Va(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.j.push(t.segmentIndex),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=$c(t.trickModeVideo),e.trickModeVideo.segmentIndex=e.segmentIndex.clone()),Qc(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&Qc(e.trickModeVideo,t)}function Zc(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 ed(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){for(var a=t,o={audio:td,video:td,text:nd,image:id}[a.type],s={audio:rd,video:ad,text:od,image:sd}[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 td(e,t){var n;if(!(n=t.mimeType!=e.mimeType||Si(t.codecs)!=Si(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 pd}else{if(n>e)return pd;if(e-ne-t)return pd}return hd}function dd(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))e.j)&&(e.j=c),o=yd(e,t,n,{start:c,duration:g,node:d,ee:null==g||!f}),a.push(o),t.ha.id&&g&&(e.L[t.ha.id]=g),null==g){o=null;break}o=c+g}}return e.I=a.map((function(e){return e.id})),null!=r?{periods:a,duration:r,Yd:!1}:{periods:a,duration:o,Yd:!0}}(e,D,u,t),N=R.duration,L=R.periods,"static"!=b&&R.Yd||S.Ma(N||1/0),e.l&&!e.s&&e.D.isAutoLowLatencyMode()&&(e.D.enableLowLatencyMode(),e.s=e.D.isLowLatencyMode()),e.s?S.re(e.l):e.l&&X("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),S.wd(y||1),w(O,qc(e.g,L,D.fb),2);case 2:if(e.B){e.B.variants=e.g.l,e.B.textStreams=e.g.j.slice(),e.B.imageStreams=e.g.i,e.D.filter(e.B),O.v(3);break}if(e.B={presentationTimeline:S,variants:e.g.l,textStreams:e.g.j.slice(),imageStreams:e.g.i,offlineSessionIds:[],minBufferTime:f||0},!S.we()){O.v(3);break}return j=Zl(t,"UTCTiming"),w(O,function(e,t,n){var i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:i=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}})),r=e.o.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),a=l(i),o=a.next();case 2:if(o.done){f.v(4);break}switch(s=o.value,x(f,5),u=s.scheme,c=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return f.v(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return f.v(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),f.return(isNaN(d)?0:d-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":X("NTP UTCTiming scheme is not supported");break;default:X("Unrecognized scheme in UTCTiming element",u)}f.v(9);break;case 7:return w(f,xd(e,t,c,"HEAD"),10);case 10:return f.return(f.h);case 8:return w(f,xd(e,t,c,"GET"),11);case 11:return f.return(f.h);case 9:E(f,3);break;case 5:A(f);case 3:o=a.next(),f.v(2);break;case 4:return X("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),f.return(0)}}))}(e,u,j),5);case 5:if(_=O.h,!e.D)return O.return();S.se(_);case 3:e.D.makeTextStreamsForClosedCaptions(e.B),T(O)}}))}function yd(e,t,n,i){t.ha=Td(i.node,null,n),t.X=i,t.ha.vb=t.vb,t.ha.id||(t.ha.id="__shaka_period_"+i.start);var r=Zl(i.node,"EventStream");n=t.presentationTimeline.Va();for(var a=(r=l(r)).next();!a.done;a=r.next())Sd(e,i.start,i.duration,a.value,n);if(n=Zl(i.node,"AdaptationSet").map((function(n){return function(e,t,n){function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ma=Td(n,t.ha,null);var r,a=!1,o=Zl(n,"Role"),s=o.map((function(e){return e.getAttribute("value")})).filter(Me),u=void 0,d=t.ma.contentType==ci;d&&(u="subtitle");for(var f=(o=l(o)).next();!f.done;f=o.next()){var h=(f=f.value).getAttribute("schemeIdUri");if(null==h||"urn:mpeg:dash:role:2011"==h)switch(f=f.getAttribute("value"),f){case"main":a=!0;break;case"caption":case"subtitle":u=f}}h=Zl(n,"EssentialProperty"),o=null,f=!1;for(var p=(h=l(h)).next();!p.done;p=h.next()){var g=(p=p.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==g?o=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==g?r=i(parseInt(p.getAttribute("value"),10)):f=!0}for(h=l(h=Zl(n,"SupplementalProperty")),p=h.next();!p.done;p=h.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(p=p.value).getAttribute("schemeIdUri")&&(r=i(parseInt(p.getAttribute("value"),10)));h=Zl(n,"Accessibility");var m=new Map;for(h=l(h),p=h.next();!p.done;p=h.next())if(g=p.value,p=g.getAttribute("schemeIdUri"),g=g.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=g)for(var v=l(g=g.split(";")),y=v.next();!y.done;y=v.next()){var b=y.value,x=y=void 0;b.includes("=")?(y=(b=b.split("="))[0].startsWith("CC")?b[0]:"CC"+b[0],x=b[1]||"und"):(y="CC"+p,2==g.length?p+=2:p++,x=b),m.set(y,rr(x))}else m.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=g)for(g=l(g.split(";")),y=g.next();!y.done;y=g.next())y=y.value,b=v=void 0,y.includes("=")?(y=y.split("="),v="svc"+y[0],b=y[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,b=y),m.set(v,rr(b));else m.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=g&&(s.push(g),"captions"==g&&(u="caption"));if(f)return null;f=Zl(n,"ContentProtection");var S=mc(f,e.o.dash.ignoreDrmInfo,e.o.dash.keySystemsByURI),E=rr(n.getAttribute("lang")||"und"),A=n.getAttribute("label");if((f=Zl(n,"Label"))&&f.length&&(f=f[0],f.textContent&&(A=f.textContent)),f=Zl(n,"Representation"),n=f.map((function(n){return(n=function(e,t,n,i,r,a,o,s,u,l){if(t.K=Td(l,t.ma,null),e.l=Math.min(e.l,t.K.vb),!function(e){var t=e.dc?1:0;return t+=e.cb?1:0,t+=e.ec?1:0,0==t?e.contentType==ci||"application"==e.contentType:(1!=t&&(e.dc&&(e.cb=null),e.ec=null),!0)}(t.K))return null;var c=t.X.start;t.bandwidth=ac(l,"bandwidth",cc)||0;var d=t.K.contentType,f=d==ci||"application"==d;d="image"==d;try{var h=function(t,n,i){return function(e,t,n,i){var r,a,o,s,u;return P((function(l){return 1==l.g?(r=ga,a=Fo(t,n,i,e.o.retryParameters),o=e.D.networkingEngine,s=o.request(r,a),ua(e.i,s),w(l,s.promise,2)):(u=l.h,l.return(u.data))}))}(e,t,n,i)};if(t.K.dc)var p=jc(t,h);else if(t.K.cb)p=Bc(t,e.m);else if(t.K.ec)p=Hc(t,h,e.m,!!e.B,e.o.dash.initialSegmentLimit,e.L);else{var g=t.K.Aa,m=t.X.duration||0;p={xb:function(){return Promise.resolve(ko(c,m,g))}}}}catch(e){if((f||d)&&4002==e.code)return null;throw e}h=Zl(l,"ContentProtection"),h=function(e,t,n,i){var r=mc(e,n,i);if(t.$d)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==r.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=r.drmInfos),t.$d=!1;else if(0e.C||e.u.V(Math.max(3,e.C-t,K(e.H)))}function Td(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,yd:null,audioSamplingRate:null,vb:0},n=n||t.Aa;for(var i=Zl(e,"BaseURL"),r=i.map(ic),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=ac(e,"frameRate",hc)||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!=u||r(),3==u&&(u=a.aa(),a.skip(u)),1==a.N()>>8)return a.skip(3),0!=(n=a.aa()>>6)&&1!=n||r(),0==a.aa()&&r(),(1073741824*((14&(n=a.aa()))>>1)+((65534&(u=a.Gb()))<<14|(65534&a.Gb())>>1))/9e4;i()}else i();else i()}}(t,g.uri,g.data));case 4:throw new le(2,4,4030,t)}}))}function uf(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 lf(e,t){e.j=t,e.g&&e.g.fc(e.j==pf),e.j!=pf||e.s.stop()}function cf(e,t,n){if(!e.C)throw new le(2,7,7001);return t=e.D.networkingEngine.request(n,t),ua(e.C,t),t.promise}B("shaka.net.DataUriPlugin",Gd),Gd.parse=qd,ca("data",qd),(i=Xd.prototype).configure=function(e){this.o=e},i.start=function(e,t){var n,i,r=this;return P((function(a){return 1==a.g?(r.D=t,r.i=t.isLowLatencyMode(),w(a,cf(r,da([e],r.o.retryParameters),0),2)):3!=a.g?(n=a.h,r.L=n.uri,w(a,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,E,k,I,M,C,D,R,N,L,j,_,O,U,F,B,V;return P((function(H){switch(H.g){case 1:if(0!=(n=Bd(e.ea,t,e.L)).type)throw new le(2,4,4022);for(i=Rd(n.Y,"EXT-X-DEFINE"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value;i=Id(r,"NAME"),r=Id(r,"VALUE"),i&&r&&(e.u.has(i)||e.u.set(i,r))}}(e,i),r=Rd(n.Y,"EXT-X-MEDIA"),a=Rd(n.Y,"EXT-X-STREAM-INF"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value,a=Id(r,"AUDIO");i=Id(r,"VIDEO");var o=Id(r,"SUBTITLES");if(r=$d(e,r),o){var s=li(ci,r);e.l.set(o,s),lt(r,s)}a&&(o=ui("audio",r),e.l.set(a,o)),i&&(a=ui("video",r),e.l.set(i,a))}}(e,a),o=Rd(n.Y,"EXT-X-SESSION-DATA"),s=l(o),u=s.next();!u.done;u=s.next())c=u.value,d=Id(c,"DATA-ID"),f=Id(c,"URI"),h=Id(c,"LANGUAGE"),p=Id(c,"VALUE"),g=(new Map).set("id",d),f&&g.set("uri",oi([e.L],[f])[0]),h&&g.set("language",h),p&&g.set("value",p),m=new na("sessiondata",g),e.D&&e.D.onEvent(m);return w(H,function(e,t){var n;return P((function(i){return 1==i.g?(t=t.filter((function(e){var t=Id(e,"URI")||"";return"SUBTITLES"!=Id(e,"TYPE")&&""!=t})),t.length?w(i,Qd(e,t[0]),2):i.v(2)):(n=t.slice(1).map((function(t){return Qd(e,t)})),w(i,Promise.all(n),0))}))}(e,r),2);case 2:return function(e,t){for(var n=Nd(t,"CLOSED-CAPTIONS"),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value;i=Jd(r);var a=Md(r,"GROUP-ID");r=Md(r,"INSTREAM-ID"),e.I.get(a)||e.I.set(a,new Map),e.I.get(a).set(r,i)}}(e,r),w(H,function(e,t){var n,i,r;return P((function(a){return 1==a.g?(n=t.map((function(t){var n,i,r,a,o,s,u,c;return P((function(d){if(1==d.g)return n=Id(t,"FRAME-RATE"),i=Number(Id(t,"AVERAGE-BANDWIDTH"))||Number(Md(t,"BANDWIDTH")),r=Id(t,"RESOLUTION"),a=l(r?r.split("x"):[null,null]),o=a.next().value,s=a.next().value,u=Id(t,"VIDEO-RANGE"),w(d,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m;return P((function(v){if(1==v.g)return n=di,i=$d(e,t),r=Id(t,"AUDIO"),a=Id(t,"VIDEO"),s=(o=r||a)&&e.m.has(o)?e.m.get(o):[],u={audio:r?s:[],video:a?s:[]},d=!1,f=Md(t,"URI"),h=u.audio.find((function(e){return e&&e.Pc==f})),p=li(n.Ra,i),(g=li(n.eb,i))&&!p?c=n.eb:!s.length&&g&&p?(c=n.Ra,i=[[p,g].join()]):u.audio.length&&h?(c=n.eb,d=!0):c=u.video.length?n.eb:n.Ra,d?v.v(2):w(v,function(e,t,n,i){var r,a,o,s;return P((function(u){if(1==u.g){if(r=uf(Md(t,"URI"),e.u),e.h.has(r))return u.return(e.h.get(r));var l=Id(t,"CLOSED-CAPTIONS");return a="video"==i&&l&&"NONE"!=l?e.I.get(l):null,o=ui(i,n),w(u,Zd(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 T=b?b.stream:null,x=m?m.stream.drmInfos:null,S=b?b.stream.drmInfos:null;b=(b?b.Pc:"")+" - "+(m?m.Pc:""),y&&T&&x.length&&S.length&&!(0=n&&202!=n)return{uri:r||i,je: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 bf(){}function wf(e,t,n,i){var r=new Af;Ta(t.headers).forEach((function(e,t){r.append(t,e)}));var a=new Sf,o={Td:!1,ve:!1};if(e=function(e,t,n,i,r,a){var o,s,u,l,c,d,f,h,p,g,m,v;return P((function(y){switch(y.g){case 1:return o=xf,s=Ef,d=c=0,f=Date.now(),x(y,2),w(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 P((function(o){switch(o.g){case 1:return x(o,2),w(o,h.read(),4);case 4:n=o.h,E(o,3);break;case 2:return A(o),o.return();case 3:if(n.done){o.v(5);break}if(c+=n.value.byteLength,!a){o.v(5);break}return w(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()),T(o)}}))}t()}}),w(y,u.arrayBuffer(),5);case 5:l=y.h,E(y,3);break;case 2:if(m=A(y),i.Td)throw new le(1,1,7001,e,t);if(i.ve)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(yf(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),e=new $r(e,(function(){return o.Td=!0,a.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new Be((function(){o.ve=!0,a.abort()}));s.V(t/1e3),e.finally((function(){s.stop()}))}return e}function Tf(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}to.m3u8=function(){return new Xd},eo["application/x-mpegurl"]=function(){return new Xd},eo["application/vnd.apple.mpegurl"]=function(){return new Xd},B("shaka.net.HttpFetchPlugin",bf),bf.isSupported=Tf,bf.parse=wf;var xf=e.fetch,Sf=e.AbortController,Ef=e.ReadableStream,Af=e.Headers;function kf(){}function If(e,t,n,i){var r=new Mf,a=Date.now(),o=0,s=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=yf(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 w(c,r.updateManifestExpiration(n.key(),t),3);case 3:return k(c),w(c,i.destroy(),10);case 10:I(c,0);break;case 2:A(c),c.v(3)}}))},eo["application/x-offline-manifest"]=function(){return new ah},B("shaka.offline.OfflineScheme",oh),oh.plugin=sh,ca("offline",sh),(i=ph.prototype).destroy=function(){return this.J.destroy()},i.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=ms(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),bs(this.o,e)},i.getConfiguration=function(){var e=ys();return bs(e,this.o,ys()),e},i.Vb=function(){return this.P},i.store=function(e,t,n){var i=this,r=this.getConfiguration(),a=new Df(this.P);this.Cd.push(a),t=function(e,t,n,i,r,a){var o,s,u,c,d,f,h,p,g,m;return P((function(v){switch(v.g){case 1:return Th(),s=o=null,u=new Kf,d=c=null,x(v,2,3),w(v,i(),5);case 5:return o=v.h,w(v,function(e,t,n,i){var r,a,o,s,u;return P((function(l){if(1==l.g)return r=null,a=e.P,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),wh(e),w(l,n.start(t,o),2);if(3!=l.g)return s=l.h,wh(e),u=Sh(s),w(l,Promise.all(Z(u,(function(e){return e.createSegmentIndex()}))),3);if(wh(e),r)throw r;return l.return(s)}))}(e,t,o,r),6);case 6:if(f=v.h,wh(e),!(!f.presentationTimeline.Z()&&!f.presentationTimeline.mb()))throw new le(2,9,9005,t);return w(v,function(e,t,n,i){var r;return P((function(a){switch(a.g){case 1:return(r=new Ea({Cb:e.P,onError:n,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(i.drm),w(a,function(e,t,n,i){return e.qa=!0,e.C=[],e.F=n,ka(e,t,!!i)}(r,t.variants,i.offline.usePersistentLicense,i.useMediaCapabilities),2);case 2:return w(a,Ia(r),3);case 3:return w(a,Ma(r),4);case 4:return a.return(r)}}))}(e,f,(function(e){d=d||e}),r),7);case 7:if(s=v.h,wh(e),d)throw d;return w(v,e.yc(f,s,r),8);case 8:return w(v,u.init(),9);case 9:return wh(e),w(v,function(e){var t=null;if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ka:n,na:i},na: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,wh(e),w(v,function(e,t,n,i,r,a,o,s){var u,c,d,f,h,p,g,m,v,y;return P((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=dh(t),appMetadata:n}}(r,i,a),c=o.offline.progressCallback,function(e,t,n){e.ge=t,e.fe=n}(s,(function(e,t){u.size=t,c(u,e)}),(function(e,t){h&&o.offline.usePersistentLicense&&p==t&&Ca(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=Eh.get(g.keySystem)),S(b),v=m=function(e,t,n,i,r,a,o,s){for(var u=new fh,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=Sh(r),c=new Map,h=l(h),p=h.next();!p.done;p=h.next())p=p.value,g=bh(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.Ub(),streams:e,sessionIds:s?Pa(i):[],drmInfo:t,appMetadata:o}}(e,s,t,n,i,r,a,o),w(b,function(e){return P((function(t){return 1==t.g?w(t,Promise.all(e.g.values()),2):t.return(e.Pb.h)}))}(s),4);case 4:if(v.size=b.h,m.expiration=n.Ub(),y=Pa(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 k(b),w(b,s.destroy(),5);case 5:I(b,0)}}))}(e,c.na,s,f,t,n,r,a),11);case 11:if(h=v.h,wh(e),d)throw d;return w(v,c.na.addManifests([h]),12);case 12:return p=v.h,wh(e),g=new eh("manifest",c.path.Ka,c.path.na,p[0]),v.return(ch(g,h));case 3:return k(v),e.Nc=[],w(v,u.destroy(),13);case 13:if(!o){v.v(14);break}return w(v,o.stop(),14);case 14:if(!s){v.v(16);break}return w(v,s.destroy(),16);case 16:I(v,0);break;case 2:if(m=A(v),!c){v.v(18);break}return w(v,c.na.removeSegments(e.Nc,(function(){})),18);case 18:throw d||m}}))}(this,e,t||{},(function(){var t;return P((function(a){return 1==a.g?w(a,Ja(e,i.P,r.manifest.retryParameters,n||null),2):(t=a.h,a.return(Ce(t)))}))}),r,a);var o=new $r(t,(function(){return Rf(a)}));return o.finally((function(){lt(i.Cd,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.bc.push(n),t.finally((function(){lt(e.bc,n)}))}(this,o)},i.ef=function(){return xe("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported."),!1},i.yc=function(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,k,I,M,C,D,R,N,L;return P((function(P){switch(P.g){case 1:if(i={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return dr(e,t,n)}))}(e,n.restrictions,i),!n.useMediaCapabilities){gr(e),hr(e,t),P.v(2);break}return w(P,pr(e,n.offline.usePersistentLicense),2);case 2:for(r=[],a=n.preferredAudioChannelCount,lr(e,a),o=l(e.variants),s=o.next();!s.done;s=o.next())u=s.value,r.push(xr(u));for(c=l(e.textStreams),d=c.next();!d.done;d=c.next())f=d.value,r.push(Sr(f));for(h=l(e.imageStreams),p=h.next();!p.done;p=h.next())g=p.value,r.push(Er(g));return w(P,n.offline.trackSelectionCallback(r),4);case 4:for(m=P.h,v=e.presentationTimeline.getDuration(),y=0,b=l(m),S=b.next();!S.done;S=b.next())k=S.value,I=k.bandwidth*v/8,y+=I;return x(P,5),w(P,n.offline.downloadSizeCallback(y),7);case 7:if(!P.h)throw new le(2,9,9014);E(P,6);break;case 5:if((M=A(P))instanceof le)throw M;throw new le(2,9,9015);case 6:for(C=new Set,D=new Set,R=new Set,N=l(m),S=N.next();!S.done;S=N.next())"variant"==(L=S.value).type&&C.add(L.id),"text"==L.type&&D.add(L.id),"image"==L.type&&R.add(L.id);e.variants=e.variants.filter((function(e){return C.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return D.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return R.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),T(P)}}))},i.remove=function(e){return xh(this,function(e,t){var n,i,r,a,o,s;return P((function(u){switch(u.g){case 1:if(Th(),null==(n=th(t))||"manifest"!=n.g)throw new le(2,9,9004,t);return i=n,r=new Kf,S(u),w(u,r.init(),4);case 4:return w(u,Gf(r,i.Ka(),i.na()),5);case 5:return w(u,(a=u.h).getManifests([i.key()]),6);case 6:return o=u.h,s=o[0],w(u,Promise.all([vh(e,s,r),yh(a,i,s)]),2);case 2:return k(u),w(u,r.destroy(),8);case 8:I(u,0)}}))}(this,e))},i.Bf=function(){return xh(this,function(e){var t,n,i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:return Th(),t=e.P,n=e.o.drm,i=new Kf,r=!1,S(f),w(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 w(f,(u=s.value).getAll(),8);case 8:return c=f.h,w(f,uh(n,t,c),9);case 9:return d=f.h,w(f,u.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),f.v(5);break;case 2:return k(f),w(f,i.destroy(),11);case 11:I(f,3);break;case 3:return f.return(!r)}}))}(this))},i.list=function(){return xh(this,P((function(i){switch(i.g){case 1:return Th(),e=[],t=new Kf,S(i),w(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({Ka:n,na:i},e)}))}))}(t,(function(t,i){n=n.then((function(){return P((function(n){if(1==n.g)return w(n,i.getAllManifests(),2);n.h.forEach((function(n,i){var r=ch(new eh("manifest",t.Ka,t.na,i),n);e.push(r)})),T(n)}))}))})),w(i,n,2);case 2:return k(i),w(i,t.destroy(),6);case 6:I(i,3);break;case 3:return i.return(e)}})));var e,t,n},B("shaka.offline.Storage",ph),ph.deleteAll=function(){var e;return P((function(t){return 1==t.g?(e=new Kf,S(t),w(t,function(e){var t,n;return P((function(i){return 1==i.g?(t=Array.from(e.g.values()),(n=0=t?(Vh(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Vh()):(We("Tizen 2")||We("Tizen 3")||We("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Si(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;We("Web0S")||(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)})}()}function Vh(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],i=0;i=t.data.length)return e;e=[];for(var n={},i=(t=l(t.data)).next();!i.done;n={kc:n.kc},i=t.next())n.kc=i.value,e.some(function(e){return function(t){return ie(t,e.kc)}}(n))||e.push(n.kc);return rt.apply(Qe,c(e))}(e.initData)),this.dispatchEvent(t)}}function op(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 sp(e){var t=this.mediaKeys;return t&&t!=e&&lp(t,null),delete this.mediaKeys,(this.mediaKeys=e)?lp(e,this):Promise.resolve()}function up(e){this.g=new MSMediaKeys(e),this.h=new _i}function lp(e,t){if(e.h.ob(),!t)return Promise.resolve();e.h.A(t,"msneedkey",ap);try{return co(t,HTMLMediaElement.HAVE_METADATA,e.h,(function(){t.msSetMediaKeys(e.g)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function cp(e){ra.call(this),this.j=null,this.l=e,this.i=this.g=null,this.h=new _i,this.sessionId="",this.expiration=NaN,this.closed=new hi,this.keyStatuses=new fp}function dp(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new na("keystatuseschange"),e.dispatchEvent(n)}function fp(){this.size=0,this.g=void 0}function hp(){}function pp(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=gp,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mp,e.MediaKeys=vp,e.MediaKeySystemAccess=yp)}function gp(){return Promise.reject(Error("The key system specified is not supported."))}function mp(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function vp(){throw new TypeError("Illegal constructor.")}function yp(){throw this.keySystem="",new TypeError("Illegal constructor.")}function bp(){}function wp(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Pp="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xp,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Sp,e.MediaKeys=Ap,e.MediaKeySystemAccess=Ep}}function Tp(e){return Pp?Pp+e.charAt(0).toUpperCase()+e.slice(1):e}function xp(e,t){try{var n=new Ep(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Sp(e){var t=this.mediaKeys;return t&&t!=e&&kp(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&kp(e,this),Promise.resolve()}function Ep(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 Ap(e){this.l=e,this.g=null,this.h=new _i,this.i=[],this.j=new Map}function kp(e,t){e.g=t,e.h.ob();var n=Pp;t&&(e.h.A(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=ae(t.initData),e.g.dispatchEvent(n)})),e.h.A(t,n+"keymessage",(function(t){var n=Ip(e,t.sessionId);n&&(t=new na("message",t=(new Map).set("messageType",null==n.keyStatuses.g?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.h.A(t,n+"keyadded",(function(t){(t=Ip(e,t.sessionId))&&(Rp(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.h.A(t,n+"keyerror",(function(t){var n=Ip(e,t.sessionId);n&&n.handleError(t)})))}function Ip(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 Mp(e,t,n){ra.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 Np}function Cp(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=Tp("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Be((function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}})).V(.01)}return e.h}function Dp(e,t,n){if(e.g)e.g.then((function(){return Dp(e,t,n)})).catch((function(){return Dp(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var i=fe(n),r=JSON.parse(i);"oct"!=r.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=tt(r.keys[0].k),r=tt(r.keys[0].kid)}else i=oe(n),r=null;var a=Tp("addKey");try{e.j[a](e.i,i,r,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function Rp(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new na("keystatuseschange"),e.dispatchEvent(n)}function Np(){this.size=0,this.g=void 0}jh.originalMcap=Uh,kh(_h,-1),Ah.MediaSource=Fh,Fh.install=Bh,kh(Bh),Ah.Orientation=Hh,Hh.install=Kh,m(Gh,ra),Gh.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))},Gh.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},kh(Kh),Ah.PatchedMediaKeysApple=qh,qh.install=zh,$h.prototype.createMediaKeys=function(){var e=new Jh(this.keySystem);return Promise.resolve(e)},$h.prototype.getConfiguration=function(){return this.g},Jh.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Zh(this.g,e)},Jh.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Zh,ra),(i=Zh.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.A(this.j,"webkitkeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new na("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",ae(e.message))),n.dispatchEvent(e)})),this.h.A(i,"webkitkeyadded",(function(){n.i&&(ep(n,"usable"),n.i.resolve(),n.i=null)})),this.h.A(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:ep(n,"output-not-allowed");break;default:ep(n,"internal-error")}})),ep(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.ob()}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=tp.prototype).forEach=function(e){this.g&&e(this.g,Ya.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ya.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},kh(zh),Ah.PatchedMediaKeysMs=np,np.install=ip,op.prototype.createMediaKeys=function(){var e=new up(this.keySystem);return Promise.resolve(e)},op.prototype.getConfiguration=function(){return this.g},up.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new cp(this.g,e)},up.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(cp,ra),(i=cp.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.A(this.j,"mskeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new na("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",ae(e.message))),n.dispatchEvent(e)})),this.h.A(this.j,"mskeyadded",(function(){n.g?(dp(n,"usable"),n.g.resolve(),n.g=null):n.i&&(dp(n,"usable"),n.i.resolve(),n.i=null)})),this.h.A(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:dp(n,"output-not-allowed");break;default:dp(n,"internal-error")}})),dp(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.ob()}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=fp.prototype).forEach=function(e){this.g&&e(this.g,Ya.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ya.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},kh(ip),Ah.PatchedMediaKeysNop=hp,hp.install=pp,vp.prototype.createSession=function(){},vp.prototype.setServerCertificate=function(){},yp.prototype.getConfiguration=function(){},yp.prototype.createMediaKeys=function(){},kh(pp,-10),Ah.PatchedMediaKeysWebkit=bp,bp.install=wp,Ep.prototype.createMediaKeys=function(){var e=new Ap(this.g);return Promise.resolve(e)},Ep.prototype.getConfiguration=function(){return this.h},Ap.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 Mp(t,this.l,e),this.i.push(e),e},Ap.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Mp,ra),(i=Mp.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?Rp(this,"output-restricted"):Rp(this,1==t?"expired":"internal-error"))},i.generateRequest=function(e,t){return Cp(this,t,null)},i.load=function(e){return"persistent-license"==this.l?Cp(this,null,e):Promise.reject(Error("Not a persistent session."))},i.update=function(e){var t=new hi;return Dp(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=Tp("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=Np.prototype).forEach=function(e){this.g&&e(this.g,Ya.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ya.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var Pp="";function Lp(){}function jp(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Op,Object.defineProperty(t,"disablePictureInPicture",{get:Fp,set:Bp,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Up,document.addEventListener("webkitpresentationmodechanged",_p,!0))}}function _p(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 Op(){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 Up(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Fp(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Bp(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Vp(){}function Hp(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Kp)}function Kp(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function Gp(){}function qp(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function zp(){}function Xp(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Wp)}}function Wp(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Yp(){}function $p(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=Jp;else if(6==n)t=Qp;else{try{var i=!!Jp(1,2,"")}catch(e){i=!1}i&&(t=Jp)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function Jp(t,n,i){return new e.TextTrackCue(t,n,i)}function Qp(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function Zp(){}kh(wp),Ah.PiPWebkit=Lp,Lp.install=jp,kh(jp),Ah.StorageEstimate=Vp,Vp.install=Hp,kh(Hp),Ah.VideoPlayPromise=Gp,Gp.install=qp,kh(qp),Ah.VideoPlaybackQuality=zp,zp.install=Xp,kh(Xp),Ah.VTTCue=Yp,Yp.install=$p,kh($p),Zp.prototype.parseInit=function(){},Zp.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=eg.exec(a))){var o=tg.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},B("shaka.text.LrcTextParser",Zp),Zp.prototype.parseMedia=Zp.prototype.parseMedia,Zp.prototype.parseInit=Zp.prototype.parseInit;var eg=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,tg=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function ng(){}function ig(e,t,n,i,r,a,o,s,u,c,d){var f=e.parentNode;if(e.nodeType==Node.COMMENT_NODE)return null;if(e.nodeType==Node.TEXT_NODE){if(!d)return null;var h=document.createElement("span");h.textContent=e.textContent}else h=e;for(var p=null,g=l(Cg),m=g.next();!m.done&&!(p=lg(h,"backgroundImage",i,"#",m.value)[0]);m=g.next());if(g=d,("p"==e.nodeName||p)&&(d=!0),s="default"==(h.getAttribute("xml:space")||(s?"default":"preserve")),e=[],!(m=Array.from(h.childNodes).every((function(e){return e.nodeType==Node.TEXT_NODE}))))for(var v=l(h.childNodes),y=v.next();!y.done;y=v.next())(y=ig(y.value,t,n,i,r,a,o,s,u,h,d))&&e.push(y);i=null!=c,v=/\S/.test(h.textContent);var b=h.hasAttribute("begin")||h.hasAttribute("end")||h.hasAttribute("dur");if(!(b||v||"br"==h.tagName||0!=e.length||i&&!s))return null;for(v=(y=dg(h,n)).start,y=y.end;f&&f.nodeType==Node.ELEMENT_NODE&&"tt"!=f.tagName;)v=(y=cg(f,n,v,y)).start,y=y.end,f=f.parentNode;if(null==v&&(v=0),v+=t,y=null==y?1/0:y+t,!b&&0n.length)return a;var o=e;for(e=null;o&&!(e=r?tc(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 cg(e,t,n,i){return e=dg(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 dg(e,t){var n=fg(e.getAttribute("begin"),t),i=fg(e.getAttribute("end"),t),r=fg(e.getAttribute("dur"),t);return null==i&&null!=r&&(i=n+r),{start:n,end:i}}function fg(e,t){var n=null;if(bg.test(e)){n=bg.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(wg.test(e))n=hg(wg,e);else if(Tg.test(e))n=hg(Tg,e);else if(xg.test(e))n=xg.exec(e),n=Number(n[1])/t.frameRate;else if(Sg.test(e))n=Sg.exec(e),n=Number(n[1])/t.g;else if(Eg.test(e))n=hg(Eg,e);else if(e)throw new le(2,2,2001,"Could not parse cue time range in TTML");return n}function hg(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 pg(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 Zp},ng.prototype.parseInit=function(){},ng.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(!(a=o.getElementsByTagName("body")[0]))return[];var s=nc(o,Ig,"frameRate"),u=nc(o,Ig,"subFrameRate"),c=nc(o,Ig,"frameRateMultiplier"),d=nc(o,Ig,"tickRate"),f=nc(o,Ig,"cellResolution");if(n=o.getAttribute("xml:space")||"default",r=nc(o,Mg,"extent"),"default"!=n&&"preserve"!=n)throw new le(2,2,2005,"Invalid xml:space value: "+n);n="default"==n,s=new pg(s,u,c,d),f=f&&(f=/^(\d+) (\d+)$/.exec(f))?{columns:parseInt(f[1],10),rows:parseInt(f[2],10)}:null,u=(u=o.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(u):[],c=Array.from(o.getElementsByTagName("style")),d=[];for(var h=l(o=Array.from(o.getElementsByTagName("region"))),p=h.next();!p.done;p=h.next()){var g=p.value;p=new Ct;var m=g.getAttribute("xml:id");if(m){p.id=m;var v,y,b=null;r&&(b=gg.exec(r)||yg.exec(r)),m=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=og(g,c,"extent"))&&(null!=(v=(y=gg.exec(v))||yg.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?Dt:0,p.heightUnits=y||null!=b?Dt:0)),(g=og(g,c,"origin"))&&(null!=(v=(y=gg.exec(g))||yg.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?Dt:0))}else p=null;p&&d.push(p)}if(Zl(a,"p").length)throw new le(2,2,2001,"

can only be inside

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

in TTML");(a=ig(a,t.periodStart,s,u,c,o,d,n,f,null,!1))&&i.push(a)}return i},B("shaka.text.TtmlTextParser",ng),ng.prototype.parseMedia=ng.prototype.parseMedia,ng.prototype.parseInit=ng.prototype.parseInit;var gg=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,mg=/^(\d{1,2}(?:\.\d+)?|100)%$/,vg=/^(\d+px|\d+em|\d*\.?\d+c)$/,yg=/^(\d+)px (\d+)px$/,bg=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wg=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Tg=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,xg=/^(\d*(?:\.\d*)?)f$/,Sg=/^(\d*(?:\.\d*)?)t$/,Eg=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Ag={left:xt,center:"center",right:"end",start:xt,end:"end"},kg={left:"line-left",center:"center",right:"line-right"},Ig=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Mg=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Cg=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Dg(){this.s=new ng}function Rg(){}function Ng(e){for(var t=l(Object.entries(Et)),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(At))).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 Pg(e,t,n){0===n.size&&Ng(n),e=function(e){for(var t=[],n=-1,i="",r=0;r",r);if(a<=r)return e;a=e.substring(r+1,a);var o=t.pop();if(!a||!o)return e;if(o===a)i+="/"+a+">";else{if(!o.startsWith("c.")||"c"!==a)return e;i+="/"+o+">"}r+=a.length+1}else"<"===e[r]?n=r+1:">"===e[r]&&0"+e+"","span");if(i){var r=[];if(1==(i=i.childNodes).length){var a=i[0];if(a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE)return void(t.payload=e)}for(i=(e=l(i)).next();!i.done;i=e.next())jg(i.value,t,r,n);t.nestedCues=r}else t.payload=e}function Lg(e,t){return e&&0>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function Xg(e){return 3600*((e=Zg.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Ri["application/ttml+xml"]=function(){return new ng},Dg.prototype.parseInit=function(e){var t=!1;if((new De).box("moov",Re).box("trak",Re).box("mdia",Re).box("minf",Re).box("stbl",Re).T("stsd",Ne).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new le(2,2,2007)},Dg.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new De).box("mdat",Pe((function(e){i=!0,r=r.concat(n.s.parseMedia(e,t))}))).parse(e,!1),!i)throw new le(2,2,2007);return r},B("shaka.text.Mp4TtmlParser",Dg),Dg.prototype.parseMedia=Dg.prototype.parseMedia,Dg.prototype.parseInit=Dg.prototype.parseInit,Ri['application/mp4; codecs="stpp"']=function(){return new Dg},Ri['application/mp4; codecs="stpp.ttml"']=function(){return new Dg},Ri['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Dg},Ri['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Dg},Rg.prototype.parseInit=function(){},Rg.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=Og(new jd(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 jd(o);var s=new Ct;Ud(o),_d(o);for(var u=Ud(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"),_d(o),u=Ud(o)}a.push(s)}for(Ng(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