diff --git a/build/karma.conf.js b/build/karma.conf.js index bf380f57c..436eabe50 100644 --- a/build/karma.conf.js +++ b/build/karma.conf.js @@ -2,7 +2,7 @@ const webpackConfig = require('./webpack.karma.config'); const DOC_STATIC_ASSETS_VERSION = '1.7.0'; -const MEDIA_STATIC_ASSETS_VERSION = '0.127.0'; +const MEDIA_STATIC_ASSETS_VERSION = '1.8.0'; const MODEL3D_STATIC_ASSETS_VERSION = '1.4.1'; const SWF_STATIC_ASSETS_VERSION = '0.112.0'; const TEXT_STATIC_ASSETS_VERSION = '0.114.0'; diff --git a/src/lib/constants.js b/src/lib/constants.js index 4f5a3fd54..4fd0b29d0 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -84,7 +84,7 @@ export const X_REP_HINT_VIDEO_MP4 = '[mp4]'; // These should be updated to match the Preview version in package.json // whenever a file in that third party directory is updated export const DOC_STATIC_ASSETS_VERSION = '1.7.0'; -export const MEDIA_STATIC_ASSETS_VERSION = '0.127.0'; +export const MEDIA_STATIC_ASSETS_VERSION = '1.8.0'; export const MODEL3D_STATIC_ASSETS_VERSION = '1.4.1'; export const SWF_STATIC_ASSETS_VERSION = '0.112.0'; export const TEXT_STATIC_ASSETS_VERSION = '0.114.0'; diff --git a/src/third-party/media/1.8.0/shaka-player.compiled.js b/src/third-party/media/1.8.0/shaka-player.compiled.js new file mode 100644 index 000000000..fa366ff37 --- /dev/null +++ b/src/third-party/media/1.8.0/shaka-player.compiled.js @@ -0,0 +1,376 @@ +(function(){var g={}; +(function(window){var k,aa=this;aa.ye=!0;function n(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}function ba(a){var b=p;function c(){}c.prototype=b.prototype;a.De=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Ae=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};/* + + Copyright 2016 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +function ca(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function da(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function ea(a){return a.a/(1-Math.pow(a.c,a.b))};function fa(){this.c=new ca(2);this.f=new ca(5);this.a=0;this.b=5E5}fa.prototype.setDefaultEstimate=function(a){this.b=a};fa.prototype.getBandwidthEstimate=function(){return 128E3>this.a?this.b:Math.min(ea(this.c),ea(this.f))};function ga(){};function t(a,b,c,d){this.severity=a;this.category=b;this.code=c;this.data=Array.prototype.slice.call(arguments,3)}n("shaka.util.Error",t);t.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};t.Severity={RECOVERABLE:1,CRITICAL:2};t.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9}; +t.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,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,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,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,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,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_COULD_NOT_GUESS_MIME_TYPE:4021,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,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,INVALID_STREAMS_CHOSEN:5005,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,LOAD_INTERRUPTED:7E3,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,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007, +LOCAL_PLAYER_INSTANCE_REQUIRED:9008};var ha=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ia(a){var b;a instanceof ia?(ja(this,a.da),this.Ca=a.Ca,this.fa=a.fa,ka(this,a.Ka),this.Z=a.Z,la(this,ma(a.a)),this.ua=a.ua):a&&(b=String(a).match(ha))?(ja(this,b[1]||"",!0),this.Ca=na(b[2]||""),this.fa=na(b[3]||"",!0),ka(this,b[4]),this.Z=na(b[5]||"",!0),la(this,b[6]||"",!0),this.ua=na(b[7]||"")):this.a=new oa(null)}k=ia.prototype;k.da="";k.Ca="";k.fa="";k.Ka=null;k.Z="";k.ua=""; +k.toString=function(){var a=[],b=this.da;b&&a.push(pa(b,qa,!0),":");if(b=this.fa){a.push("//");var c=this.Ca;c&&a.push(pa(c,qa,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ka;null!=b&&a.push(":",String(b))}if(b=this.Z)this.fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(pa(b,"/"==b.charAt(0)?ra:sa,!0));(b=this.a.toString())&&a.push("?",b);(b=this.ua)&&a.push("#",pa(b,ta));return a.join("")}; +k.resolve=function(a){var b=new ia(this);"data"===b.da&&(b=new ia);var c=!!a.da;c?ja(b,a.da):c=!!a.Ca;c?b.Ca=a.Ca:c=!!a.fa;c?b.fa=a.fa:c=null!=a.Ka;var d=a.Z;if(c)ka(b,a.Ka);else if(c=!!a.Z){if("/"!=d.charAt(0))if(this.fa&&!this.Z)d="/"+d;else{var e=b.Z.lastIndexOf("/");-1!=e&&(d=b.Z.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=!d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;gb)throw Error("Bad port number "+b);a.Ka=b}else a.Ka=null}function la(a,b,c){b instanceof oa?a.a=b:(c||(b=pa(b,ua)),a.a=new oa(b))} +function na(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function pa(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,va),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function va(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var qa=/[#\/\?@]/g,sa=/[\#\?:]/g,ra=/[\#\?]/g,ua=/[\#\?@]/g,ta=/#/g;function oa(a){this.b=a||null}oa.prototype.a=null;oa.prototype.c=null; +oa.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e=a[b]}.bind(null,b);if(b[0]||b[2]){if(!b[1]&&!b[3])return Ta(a,!0);if(c(0)&&c(1)&&c(2)&&c(3))return E(a)}else return Ta(a,!1);throw new t(2,2,2003);}n("shaka.util.StringUtils.fromBytesAutoDetect",Ua); +function Va(a){a=unescape(encodeURIComponent(a));for(var b=new Uint8Array(a.length),c=0;cd||c&&1E3>d)&&!this.a[b].ka&&(this.a.splice(b,1),a.close());Xa(this.B)}};k.Ld=function(){function a(a,c){return"expired"==c}!Na(this.A)&&Qa(this.A,a)&&this.g(new t(2,6,6014));this.Da(this.A)}; +function rb(){var a=[],b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c=[{videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:b}],d={};"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(b){var e=navigator.requestMediaKeySystemAccess(b,c).then(function(a){var c=a.getConfiguration().sessionTypes,c= +c?0<=c.indexOf("persistent-license"):!1;0<=navigator.userAgent.indexOf("Tizen 3")&&(c=!1);d[b]={persistentState:c};return a.createMediaKeys()})["catch"](function(){d[b]=null});a.push(e)});return Promise.all(a).then(function(){return d})}k.rd=function(){for(var a=0;a=b?null:new VTTCue(a,b,c)}n("shaka.media.TextEngine.makeCue",yb);ub.prototype.m=function(){this.c&&zb(this,function(){return!0});this.c=this.f=null;return Promise.resolve()}; +function Ab(a,b,c,d){return Promise.resolve().then(function(){if(this.c)if(null==c||null==d)this.f.parseInit(b);else{for(var a=this.f.parseMedia(b,{periodStart:this.h,segmentStart:c,segmentEnd:d}),f=a.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:a.indexOf(c)-a.indexOf(b)}),g=0;g=this.g);++g)this.c.addCue(f[g]);null==this.b&&(this.b=c);this.a=Math.min(d,this.g)}}.bind(a))} +ub.prototype.remove=function(a,b){return Promise.resolve().then(function(){this.c&&(zb(this,function(c){return c.startTime>=b||c.endTime<=a?!1:!0}),null==this.b||b<=this.b||a>=this.a||(a<=this.b&&b>=this.a?this.b=this.a=null:a<=this.b&&bthis.b&&b>=this.a&&(this.a=a)))}.bind(this))};function zb(a,b){for(var c=a.c.cues,d=[],e=0;ea.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Cb(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)?!1:b>=a.start(0)&&b<=a.end(a.length-1)}function Db(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=a.length-1;0<=d&&a.end(d)>b;--d)c+=a.end(d)-Math.max(a.start(d),b);return c};function Eb(a,b,c){this.f=a;this.I=b;this.i=c;this.c={};this.a=null;this.b={};this.g=new C;this.h=!1} +function Fb(){var a={};'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.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="av1",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",video/mp2t; codecs="mp4a.40.2",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(b){a[b]=!!vb[b]|| +MediaSource.isTypeSupported(b);var c=b.split(";")[0];a[c]=a[c]||a[b]});return a}k=Eb.prototype;k.m=function(){this.h=!0;var a=[],b;for(b in this.b){var c=this.b[b],d=c[0];this.b[b]=c.slice(0,1);d&&a.push(d.p["catch"](xa));for(d=1;dc.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Jb(a,b){try{return a.c[b].buffered}catch(c){return null}} +function Kb(a,b,c,d,e){return"text"==b?Ab(a.a,c,d,e):Lb(a,b,a.ke.bind(a,b,c))}k.remove=function(a,b,c){return"text"==a?this.a.remove(b,c):Lb(this,a,this.rc.bind(this,a,b,c))};function Mb(a,b){return"text"==b?a.a.remove(0,Infinity):Lb(a,b,a.rc.bind(a,b,0,a.I.duration))}function Nb(a,b,c,d){if("text"==b)return a.a.h=c,null!=d&&(a.a.g=d),Promise.resolve();null==d&&(d=Infinity);return Promise.all([Lb(a,b,a.Fc.bind(a,b)),Lb(a,b,a.ae.bind(a,b,c)),Lb(a,b,a.Zd.bind(a,b,d))])} +k.endOfStream=function(a){return Ob(this,function(){a?this.I.endOfStream(a):this.I.endOfStream()}.bind(this))};k.qa=function(a){return Ob(this,function(){this.I.duration=a}.bind(this))};k.ba=function(){return this.I.duration};k.ke=function(a,b){this.c[a].appendBuffer(b)};k.rc=function(a,b,c){c<=b?this.Ja(a):this.c[a].remove(b,c)};k.Fc=function(a){var b=this.c[a].appendWindowEnd;this.c[a].abort();this.c[a].appendWindowEnd=b;this.Ja(a)};k.Oc=function(a){this.f.currentTime-=.001;this.Ja(a)}; +k.ae=function(a,b){this.c[a].timestampOffset=b;this.Ja(a)};k.Zd=function(a,b){this.c[a].appendWindowEnd=b+.04;this.Ja(a)};k.le=function(a){this.b[a][0].p.reject(new t(2,3,3014,this.f.error?this.f.error.code:0))};k.Ja=function(a){var b=this.b[a][0];b&&(b.p.resolve(),Pb(this,a))}; +function Lb(a,b,c){if(a.h)return Promise.reject();c={start:c,p:new A};a.b[b].push(c);if(1==a.b[b].length)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new t(2,3,3017,b)):c.p.reject(new t(2,3,3015,d)),Pb(a,b)}return c.p} +function Ob(a,b){if(a.h)return Promise.reject();var c=[],d;for(d in a.c){var e=new A,f={start:function(a){a.resolve()}.bind(null,e),p:e};a.b[d].push(f);c.push(e);1==a.b[d].length&&f.start()}return Promise.all(c).then(function(){var a;try{b()}catch(l){var c=Promise.reject(new t(2,3,3015,l))}for(a in this.c)Pb(this,a);return c}.bind(a),function(){return Promise.reject()}.bind(a))}function Pb(a,b){a.b[b].shift();var c=a.b[b][0];if(c)try{c.start()}catch(d){c.p.reject(new t(2,3,3015,d)),Pb(a,b)}};function Qb(a,b,c){return c==b||a>=Rb&&c==b.split("-")[0]||a>=Sb&&c.split("-")[0]==b.split("-")[0]?!0:!1}var Rb=1,Sb=2;function Tb(a){a=a.toLowerCase().split("-");var b=Ub[a[0]];b&&(a[0]=b);return a.join("-")} +var Ub={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 Vb(a,b,c){var d=a.video;return d&&(d.widthb.maxWidth||d.width>c.width||d.heightb.maxHeight||d.height>c.height||d.width*d.heightb.maxPixels)||a.bandwidthb.maxBandwidth?!1:!0}function Wb(a,b,c){var d=!1;a.variants.forEach(function(a){var e=a.allowedByApplication;a.allowedByApplication=Vb(a,b,c);e!=a.allowedByApplication&&(d=!0)});return d} +function Xb(a,b,c){var d=b.video,e=b.audio;for(b=0;bd.indexOf(b)||c&&(a.mimeType!=c.mimeType||a.codecs.split(".")[0]!=c.codecs.split(".")[0])?!1:!0} +function $b(a,b,c){var d=null;return ac(a.variants).map(function(a){var e;a.video&&a.audio?e=c==a.video.id&&b==a.audio.id:e=a.video&&c==a.video.id||a.audio&&b==a.audio.id;var g="";a.video&&(g+=a.video.codecs);a.audio&&(""!=g&&(g+=", "),g+=a.audio.codecs,d=a.audio.label);var h=a.audio?a.audio.codecs:null,l=a.video?a.video.codecs:null,m=null;a.video?m=a.video.mimeType:a.audio&&(m=a.audio.mimeType);var q=null;a.audio?q=a.audio.kind:a.video&&(q=a.video.kind);var r=Ha((a.audio?a.audio.roles:[]).concat(a.video? +a.video.roles:[]));return{id:a.id,active:e,type:"variant",bandwidth:a.bandwidth,language:a.language,label:d,kind:q||null,width:a.video?a.video.width:null,height:a.video?a.video.height:null,frameRate:a.video?a.video.frameRate:void 0,mimeType:m,codecs:g,audioCodec:h,videoCodec:l,primary:a.primary,roles:r,videoId:a.video?a.video.id:null,audioId:a.audio?a.audio.id:null}})} +function bc(a,b){return a.textStreams.map(function(a){return{id:a.id,active:b==a.id,type:"text",language:a.language,label:a.label,kind:a.kind,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles}})}function cc(a,b){for(var c=0;c=a.periods[c].startTime)return c;return 0}function lc(a,b){for(var c=0;c=g.bandwidth/.95&&e<=h&&(c=g)}(d=c)&&d.video&&(b.video=d.video);d&&d.audio&&(b.audio=d.audio)}-1b)){var d=8E3*b/a,e=a/1E3;c.a+=b;da(c.c,e,d);da(c.f,e,d)}if(null!=this.c&&this.b)a:{if(!this.j){if(!(128E3<=this.a.a))break a;this.j=!0}else if(8E3>Date.now()-this.c)break a;c=this.chooseStreams(["audio","video"]);this.a.getBandwidthEstimate();this.f(c)}}; +F.prototype.segmentDownloaded=F.prototype.segmentDownloaded;F.prototype.getBandwidthEstimate=function(){return this.a.getBandwidthEstimate()};F.prototype.getBandwidthEstimate=F.prototype.getBandwidthEstimate;F.prototype.setDefaultEstimate=function(a){this.a.setDefaultEstimate(a)};F.prototype.setDefaultEstimate=F.prototype.setDefaultEstimate;F.prototype.setRestrictions=function(a){this.i=a};F.prototype.setRestrictions=F.prototype.setRestrictions;F.prototype.setVariants=function(a){this.h=a}; +F.prototype.setVariants=F.prototype.setVariants;F.prototype.setTextStreams=function(a){this.g=a};F.prototype.setTextStreams=F.prototype.setTextStreams;function mc(a,b){return b.filter(function(b){return Vb(b,a,{width:Infinity,height:Infinity})}).sort(function(a,b){return a.bandwidth-b.bandwidth})};function G(a,b){var c=b||{},d;for(d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}G.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};G.prototype.stopImmediatePropagation=function(){this.a=!0};G.prototype.stopPropagation=function(){};var nc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),oc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),pc=["loop","playbackRate"],qc=["pause","play"],rc="adaptation buffering emsg error loading unloading texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged".split(" "),sc="drmInfo getAudioLanguages getConfiguration getExpiration getManifestUri getPlaybackRate getPlayheadTimeAsDate getTextLanguages getTextTracks getTracks getStats getVariantTracks isAudioOnly isBuffering isInProgress isLive isTextTrackVisible keySystem seekRange".split(" "), +tc=[["getConfiguration","configure"]],wc=[["isTextTrackVisible","setTextTrackVisibility"]],xc="addTextTrack cancelTrickPlay configure resetConfiguration selectAudioLanguage selectTextLanguage selectTextTrack selectTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),yc=["load","unload"]; +function zc(a){return JSON.stringify(a,function(a,c){if("manager"!=a&&"function"!=typeof c){if(c instanceof Event||c instanceof G){var b={},e;for(e in c){var f=c[e];f&&"object"==typeof f||e in Event||(b[e]=f)}return b}if(c instanceof TimeRanges)for(b={__type__:"TimeRanges",length:c.length,start:[],end:[]},e=0;ec?"-Infinity":"Infinity":c;return b}})} +function Ac(a){return JSON.parse(a,function(a,c){return"NaN"==c?NaN:"-Infinity"==c?-Infinity:"Infinity"==c?Infinity:c&&"object"==typeof c&&"TimeRanges"==c.__type__?Bc(c):c})}function Bc(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}};function Cc(a,b,c,d,e){this.K=a;this.l=b;this.B=c;this.H=d;this.v=e;this.c=this.j=this.h=!1;this.A="";this.a=this.i=null;this.b={video:{},player:{}};this.s=0;this.f={};this.g=null}k=Cc.prototype;k.m=function(){Dc(this);this.a&&(this.a.leave(function(){},function(){}),this.a=null);this.H=this.B=this.l=null;this.c=this.j=this.h=!1;this.g=this.f=this.b=this.i=null;return Promise.resolve()};k.X=function(){return this.c};k.Fb=function(){return this.A}; +k.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.l();var a=new chrome.cast.SessionRequest(this.K),a=new chrome.cast.ApiConfig(a,this.hd.bind(this),this.td.bind(this),"origin_scoped");chrome.cast.initialize(a,function(){},function(){})}else window.__onGCastApiAvailable=function(a){a&&this.init()}.bind(this)};k.Ib=function(a){this.i=a;this.c&&Ec(this,{type:"appData",appData:this.i})}; +k.cast=function(a){if(!this.h)return Promise.reject(new t(1,8,8E3));if(!this.j)return Promise.reject(new t(1,8,8001));if(this.c)return Promise.reject(new t(1,8,8002));this.g=new A;chrome.cast.requestSession(this.Bb.bind(this,a),this.dc.bind(this));return this.g};k.bb=function(){this.c&&(Dc(this),this.a&&(this.a.stop(function(){},function(){}),this.a=null))}; +k.get=function(a,b){if("video"==a){if(0<=qc.indexOf(b))return this.qc.bind(this,a,b)}else if("player"==a){if(0<=xc.indexOf(b))return this.qc.bind(this,a,b);if(0<=yc.indexOf(b))return this.Qd.bind(this,a,b);if(0<=sc.indexOf(b))return this.mc.bind(this,a,b)}return this.mc(a,b)};k.set=function(a,b,c){this.b[a][b]=c;Ec(this,{type:"set",targetName:a,property:b,value:c})}; +k.Bb=function(a,b){this.a=b;this.a.addUpdateListener(this.ec.bind(this));this.a.addMessageListener("urn:x-cast:com.google.shaka.v2",this.nd.bind(this));this.ec();Ec(this,{type:"init",initState:a,appData:this.i});this.g.resolve()};k.dc=function(a){var b=8003;switch(a.code){case "cancel":b=8004;break;case "timeout":b=8005;break;case "receiver_unavailable":b=8006}this.g.reject(new t(2,8,b,a))};k.mc=function(a,b){return this.b[a][b]}; +k.qc=function(a,b){Ec(this,{type:"call",targetName:a,methodName:b,args:Array.prototype.slice.call(arguments,2)})};k.Qd=function(a,b){var c=Array.prototype.slice.call(arguments,2),d=new A,e=this.s.toString();this.s++;this.f[e]=d;Ec(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e});return d};k.hd=function(a){var b=this.v();this.g=new A;this.Bb(b,a)};k.td=function(a){this.j="available"==a;this.l()}; +k.ec=function(){var a=this.a?"connected"==this.a.status:!1;if(this.c&&!a){this.H();for(var b in this.b)this.b[b]={};Dc(this)}this.A=(this.c=a)?this.a.receiver.friendlyName:"";this.l()};function Dc(a){for(var b in a.f){var c=a.f[b];delete a.f[b];c.reject(new t(1,7,7E3))}} +k.nd=function(a,b){var c=Ac(b);switch(c.type){case "event":var d=c.targetName,e=c.event;this.B(d,new G(e.type,e));break;case "update":e=c.update;for(d in e){var c=this.b[d]||{};for(f in e[d])c[f]=e[d][f]}break;case "asyncComplete":d=c.id;var f=c.error;c=this.f[d];delete this.f[d];if(c)if(f){d=new t(f.severity,f.category,f.code);for(e in f)d[e]=f[e];c.reject(d)}else c.resolve()}};function Ec(a,b){var c=zc(b);a.a.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},ga)};function p(){this.nb=new Ja;this.Va=this}p.prototype.addEventListener=function(a,b){this.nb.push(a,b)};p.prototype.removeEventListener=function(a,b){this.nb.remove(a,b)};p.prototype.dispatchEvent=function(a){for(var b=this.nb.get(a.type)||[],c=0;cu)if(v+1=u)break;u=Math.ceil((u-w)/K)-1}else{if(Infinity==m)break;else if(w/e>=m)break;u=Math.ceil((m*e-w)/K)-1}0this.J.byteLength&&fd();var b=this.J.buffer.slice(this.u,this.u+a);this.u+=a;return new Uint8Array(b)};N.prototype.readBytes=N.prototype.La; +N.prototype.G=function(a){this.u+a>this.J.byteLength&&fd();this.u+=a};N.prototype.skip=N.prototype.G;N.prototype.Db=function(){for(var a=this.u;this.ca()&&this.J.getUint8(this.u);)this.u+=1;a=this.J.buffer.slice(a,this.u);this.u+=1;return E(a)};N.prototype.readTerminatedString=N.prototype.Db;function fd(){throw new t(2,3,3E3);};function O(){this.b=[];this.a=[]}n("shaka.util.Mp4Parser",O);O.prototype.D=function(a,b){var c=gd(a);this.b[c]=0;this.a[c]=b;return this};O.prototype.box=O.prototype.D;O.prototype.aa=function(a,b){var c=gd(a);this.b[c]=1;this.a[c]=b;return this};O.prototype.fullBox=O.prototype.aa;O.prototype.parse=function(a){for(a=new N(new DataView(a),0);a.ca();)this.gb(0,a)};O.prototype.parse=O.prototype.parse; +O.prototype.gb=function(a,b){var c=b.u,d=b.C(),e=b.C();switch(d){case 0:d=b.J.byteLength-c;break;case 1:d=b.Qa()}var f=this.a[e];if(f){var g=null,h=null;1==this.b[e]&&(h=b.C(),g=h>>>24,h&=16777215);e=c+d-b.u;e=0>>31;var m=m&2147483647,q=d.o.C();d.o.G(4);if(1==g)throw new t(2,3,3006);e.push(new M(e.length,b/f,(b+q)/f,function(){return c},a,a+m-1));b+=q;a+=m}return e};function Q(a){this.a=a}n("shaka.media.SegmentIndex",Q);Q.prototype.m=function(){this.a=null;return Promise.resolve()};Q.prototype.destroy=Q.prototype.m;Q.prototype.find=function(a){for(var b=this.a.length-1;0<=b;--b){var c=this.a[b];if(a>=c.startTime&&aa||a>=this.a.length?null:this.a[a]}; +Q.prototype.get=Q.prototype.get;Q.prototype.xb=function(a){for(var b,c,d,e=[],f=b=0;bd.startTime||(.1a);++b);this.a.splice(0,b)};Q.prototype.evict=Q.prototype.qb;function ld(a,b){if(a.a.length){var c=a.a[a.a.length-1];c.startTime>b||(a.a[a.a.length-1]=new M(c.position,c.startTime,b,c.a,c.U,c.L))}};function md(a){this.b=a;this.a=new N(a,0);nd||(nd=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var nd;md.prototype.ca=function(){return this.a.ca()}; +function od(a){var b=pd(a);if(7=c&&!(b&1<<8-c);c++);if(8a||c&&a>=c?null:Math.floor(a/d)},getSegmentReference:function(a){var b=a*d;return 0>b||c&&b>=c?null:new M(a,b,b+d,function(){var c=$c(g,l,a+e,h,b*f);return z(m,[c])},0,null)}}} +function Hd(a,b){for(var c=[],d=0;da.l||(a.f=window.setTimeout(a.je.bind(a),1E3*Math.max(Math.max(3,a.l)-b,0)))} +function Td(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0};c=c||b.W;var d=J(a,"BaseURL").map(Nc),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=L(a,"frameRate",Uc)||b.frameRate,l=!!J(a,"InbandEventStream").length;e||(e=Wd(f,g));return{W:z(c,d),Ra:Mc(a,"SegmentBase")||b.Ra,pa:Mc(a,"SegmentList")||b.pa,Sa:Mc(a,"SegmentTemplate")||b.Sa,width:L(a,"width",Tc)||b.width,height:L(a,"height", +Tc)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,containsEmsgBoxes:l||b.containsEmsgBoxes,id:a.getAttribute("id")}}function Xd(a){var b=0+(a.Ra?1:0);b+=a.pa?1:0;b+=a.Sa?1:0;if(!b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Ra&&(a.pa=null),a.Sa=null);return!0} +function Yd(a,b,c,d){b=z(b,[c]);b=Ga(b,a.b.retryParameters);b.method=d;return a.a.networkingEngine.request(0,b).then(function(a){if("HEAD"==d){if(!a.headers||!a.headers.date)return 0;a=a.headers.date}else a=E(a.data);a=Date.parse(a);return isNaN(a)?0:a-Date.now()})} +function Rd(a,b,c,d){c=c.map(function(a){return{scheme:a.getAttribute("schemeIdUri"),value:a.getAttribute("value")}});var e=a.b.dash.clockSyncUri;d&&!c.length&&e&&c.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return wa(c,function(a){var c=a.value;switch(a.scheme){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Yd(this,b,c,"HEAD");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 Yd(this, +b,c,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return a=Date.parse(c),isNaN(a)?0:a-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Promise.reject();default:return Promise.reject()}}.bind(a))["catch"](function(){return 0})} +k.Gd=function(a,b,c){var d=c.getAttribute("schemeIdUri")||"",e=c.getAttribute("value")||"",f=L(c,"timescale",Tc)||1;J(c,"Event").forEach(function(c){var g=L(c,"presentationTime",Tc)||0,l=L(c,"duration",Tc)||0,g=g/f+a,l=g+l/f;null!=b&&(g=Math.min(g,a+b),l=Math.min(l,a+b));c={schemeIdUri:d,value:e,startTime:g,endTime:l,id:c.getAttribute("id")||"",eventElement:c};this.a.onTimelineRegionAdded(c)}.bind(this))}; +k.Sd=function(a,b,c){a=Ga(a,this.b.retryParameters);null!=b&&(a.headers.Range="bytes="+b+"-"+(null!=c?c:""));return this.a.networkingEngine.request(1,a).then(function(a){return a.data})};function Wd(a,b){return vb[Zb(a,b)]?"text":a.split("/")[0]}Jd.mpd=Md;Id["application/dash+xml"]=Md;function Zd(a,b,c,d){this.uri=a;this.type=b;this.$=c;this.segments=d||null}function $d(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=d||null}$d.prototype.toString=function(){function a(a){return a.name+'="'+a.value+'"'}return this.value?"#"+this.name+":"+this.value:0b.length||"data"!=b[0])throw new t(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new t(2,1,1004,a);var c=b[0],b=window.decodeURIComponent(b.slice(1).join(",")),c=c.split(";"),d=null;1c.length)return null;var d=null,e=a;for(a=null;e&&!(a=e.getAttribute(b))&&(e=e.parentNode,e instanceof Element););if(b=a)for(a=0;ag[0].indexOf("--\x3e")&&(l=g[0],g.splice(0,1));var m=new ge(g[0]),q=ff(m),r=he(m,/[ \t]+--\x3e[ \t]+/g),v=ff(m);if(null==q||!r||null==v)throw new t(2,2,2001);if(g=yb(q+h,v+h,g.slice(1).join("\n").trim())){he(m,/[ \t]+/gm);for(h=ie(m);h;)gf(g,h),he(m,/[ \t]+/gm),h=ie(m);null!=l&&(g.id=l);l=g}else l=null}l&&f.push(l)}return f}; +function gf(a,b){var c;if(c=/^align:(start|middle|center|end|left|right)$/.exec(b))a.align=c[1],"center"==c[1]&&"center"!=a.align&&(a.position="auto",a.align="middle");else if(c=/^vertical:(lr|rl)$/.exec(b))a.vertical=c[1];else if(c=/^size:([\d\.]+)%$/.exec(b))a.size=Number(c[1]);else if(c=/^position:([\d\.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(c[1]),c[2]&&(a.positionAlign=c[2]);else if(c=/^line:([\d\.]+)%(?:,(start|end|center))?$/.exec(b))a.snapToLines=!1,a.line= +Number(c[1]),c[2]&&(a.lineAlign=c[2]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.snapToLines=!0,a.line=Number(c[1]),c[2]&&(a.lineAlign=c[2])}function ff(a){a=he(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(!a)return null;var b=Number(a[2]),c=Number(a[3]);return 59a.ba()?a.ga():a.eb()}k.rb=function(){return this.g}; +function qf(a,b){null!=a.f&&(window.clearInterval(a.f),a.f=null);a.g=b;a.a.playbackRate=a.h||0>b?0:b;!a.h&&0>b&&(a.f=window.setInterval(function(){this.a.currentTime+=b/4}.bind(a),250))}k.Ab=function(){this.s=!0;this.ic()};k.sd=function(){var a=this.h||0>this.g?0:this.g;this.a.playbackRate&&this.a.playbackRate!=a&&qf(this,this.a.playbackRate)}; +k.gc=function(){var a=pf(this);.001>Math.abs(this.a.currentTime-a)?(D(this.b,this.a,"seeking",this.jc.bind(this)),D(this.b,this.a,"playing",this.hc.bind(this))):(Ma(this.b,this.a,"seeking",this.ud.bind(this)),this.a.currentTime=a)};k.ud=function(){D(this.b,this.a,"seeking",this.jc.bind(this));D(this.b,this.a,"playing",this.hc.bind(this))}; +k.ic=function(){if(this.a.readyState){this.a.readyState!=this.H&&(this.i=!1,this.H=this.a.readyState);var a=this.l.smallGapLimit,b=this.a.currentTime,c=this.a.buffered;if(bc.end(0)-c.start(0))){var d=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(d=.5);for(var e=0;eb&&(!e||c.end(e-1)-b<=d)){d=e;break a}}d=null}if(null==d){if(3>this.a.readyState&&0=c.start(d)&&b=this.c.presentationTimeline.eb())){var f=e-b,a=f<=a,g=!1;a||this.i||(this.i=!0,f=new G("largegap",{currentTime:b,gapSize:f}),f.cancelable=!0,this.K(f),this.l.jumpLargeGaps&&!f.defaultPrevented&&(g=!0));if(a||g)d&&c.end(d-1),sf(this,b,e)}}}}; +k.jc=function(){this.s=!1;var a=this.a.currentTime,b=rf(this,a);.001f?f:b=g||c(b)?b:d} +function sf(a,b,c){a.a.currentTime=c;var d=0,e=function(){!this.a||10<=d++||this.a.currentTime!=b||(this.a.currentTime=c,setTimeout(e,100))}.bind(a);setTimeout(e,100)}function nf(a,b){var c=a.c.presentationTimeline.ga();if(bc?c:b};function tf(a,b,c,d,e,f,g){this.a=a;this.I=b;this.g=c;this.A=d;this.l=e;this.h=f;this.B=g;this.c=[];this.j=new C;this.b=!1;this.i=-1;this.f=null;uf(this)}tf.prototype.m=function(){var a=this.j?this.j.m():Promise.resolve();this.j=null;vf(this);this.B=this.h=this.l=this.A=this.g=this.I=this.a=null;this.c=[];return a}; +tf.prototype.v=function(a){if(!this.c.some(function(b){return b.info.schemeIdUri==a.schemeIdUri&&b.info.startTime==a.startTime&&b.info.endTime==a.endTime})){var b={info:a,status:1};this.c.push(b);var c=new G("timelineregionadded",{detail:wf(a)});this.h(c);this.s(!0,b)}};function wf(a){var b=Da(a);b.eventElement=a.eventElement;return b} +tf.prototype.s=function(a,b){var c=b.info.startTime>this.a.currentTime?1:b.info.endTime=d||this.a.ended||e;this.b?(c=1*Math.max(this.g.minBufferTime||0,this.A.rebufferingGoal),(b||a>=c)&&0!=this.b&&(this.b=!1,this.l(!1))):!b&&.5>a&&1!=this.b&&(this.b=!0,this.l(!0));this.c.forEach(this.s.bind(this,!1))};function xf(a,b){this.a=b;this.b=a;this.g=null;this.i=1;this.s=Promise.resolve();this.h=[];this.j={};this.c={};this.f=this.l=this.v=!1}k=xf.prototype;k.m=function(){for(var a in this.c)yf(this.c[a]);this.g=this.c=this.j=this.h=this.s=this.b=this.a=null;this.f=!0;return Promise.resolve()};k.configure=function(a){this.g=a};k.init=function(){var a=this.a.cc(this.b.periods[kc(this.b,of(this.a.Pa))]);return Na(a)?Promise.reject(new t(2,5,5005)):zf(this,a).then(function(){this.a&&this.a.kd&&this.a.kd()}.bind(this))}; +function T(a){return a.b.periods[kc(a.b,of(a.a.Pa))]}function Af(a){var b=a.c.video||a.c.audio;return b?a.b.periods[b.xa]:null}function Bf(a){return Pa(a.c,function(a){return a.oa||a.stream})}function Cf(a,b){var c={};c.text=b;return zf(a,c)}function Df(a,b){var c=a.c.video;if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;if(e){var f=c.oa;f||(Ef(a,"video",e,!1),c.oa=d)}}else if(f=c.oa)c.oa=null,Ef(a,"video",f,!0)}} +function Ef(a,b,c,d){var e=a.c[b];if(!e&&"text"==b&&a.g.ignoreTextStreamFailures)Cf(a,c);else if(e){var f=lc(a.b,c);d&&f!=e.xa?Ff(a):(e.oa&&(c.trickModeVideo?(e.oa=c,c=c.trickModeVideo):e.oa=null),(f=a.h[f])&&f.Ma&&(f=a.j[c.id])&&f.Ma&&e.stream!=c&&("text"==b&&Gb(a.a.M,Zb(c.mimeType,c.codecs)),e.stream=c,e.fb=!0,d&&(e.ta?e.lb=!0:e.ya?(e.sa=!0,e.lb=!0):(yf(e),Gf(a,e,!0)))))}} +function Hf(a){var b=of(a.a.Pa);Object.keys(a.c).every(function(a){var c=this.a.M;"text"==a?(a=c.a,a=b>=a.b&&bb?a.a.M.qa(b):a.a.M.qa(Math.pow(2,32))}k.me=function(a){if(!this.f&&!a.ya&&null!=a.ra&&!a.ta)if(a.ra=null,a.sa)Gf(this,a,a.lb);else{try{var b=Mf(this,a);null!=b&&(If(this,a,b),a.tb=!1)}catch(c){this.a.onError(c);return}b=Oa(this.c);Nf(this,a);b.every(function(a){return a.endOfStream})&&this.a.M.endOfStream().then(function(){this.b.presentationTimeline.qa(this.a.M.ba())}.bind(this))}}; +function Mf(a,b){var c=of(a.a.Pa),d=b.Ga&&b.ha?a.b.periods[lc(a.b,b.Ga)].startTime+b.ha.endTime:Math.max(c,b.sc),e=lc(a.b,b.stream),f=kc(a.b,d);var g=a.a.M;var h=b.type;"text"==h?(g=g.a,g=null==g.a||g.a=a.b.presentationTimeline.ba())return b.endOfStream=!0,null;b.endOfStream=!1;b.xa=f;if(f!=e)return null;if(g>=h)return.5;d=a.a.M;f=b.type;d="text"==f?d.a.a:Bb(Jb(d, +f));b.ha&&b.stream==b.Ga?(f=b.ha.position+1,d=Of(a,b,e,f)):(f=b.ha?b.stream.findSegmentPosition(Math.max(0,a.b.periods[lc(a.b,b.Ga)].startTime+b.ha.endTime-a.b.periods[e].startTime)):b.stream.findSegmentPosition(Math.max(0,(d||c)-a.b.periods[e].startTime)),null==f?d=null:(g=null,null==d&&(g=Of(a,b,e,Math.max(0,f-1))),d=g||Of(a,b,e,f)));if(!d)return 1;b.sc=0;Pf(a,b,c,e,d);return null} +function Of(a,b,c,d){c=a.b.periods[c];b=b.stream.getSegmentReference(d);if(!b)return null;a=a.b.presentationTimeline;d=a.va();return c.startTime+b.endTimed?null:b} +function Pf(a,b,c,d,e){var f=a.b.periods[d],g=b.stream,h=a.b.periods[d+1],l=null,l=h?h.startTime:a.b.presentationTimeline.ba();d=Qf(a,b,d,l);b.ya=!0;b.fb=!1;h=Rf(a,e);Promise.all([d,h]).then(function(a){if(!this.f&&!this.l)return Sf(this,b,c,f,g,e,a[1])}.bind(a)).then(function(){this.f||this.l||(b.ya=!1,b.Gb=!1,b.sa||this.a.Ab(),If(this,b,0),Tf(this,g))}.bind(a))["catch"](function(a){this.f||this.l||(b.ya=!1,this.b.presentationTimeline.Y()&&this.g.infiniteRetriesForLiveStreams&&(1001==a.code||1002== +a.code||1003==a.code)?"text"==b.type&&this.g.ignoreTextStreamFailures&&1001==a.code?delete this.c.text:(a.severity=1,this.a.onError(a),If(this,b,4)):3017==a.code?Uf(this,b,a):"text"==b.type&&this.g.ignoreTextStreamFailures?delete this.c.text:(b.tb=!0,a.severity=2,this.a.onError(a)))}.bind(a))}function Uf(a,b,c){if(!Oa(a.c).some(function(a){return a!=b&&a.Gb})){var d=Math.round(100*a.i);if(20=c?Promise.resolve():a.a.M.remove(b.type,d,d+c).then(function(){}.bind(a))}function Tf(a,b){if(!a.v&&(a.v=Oa(a.c).every(function(a){return"text"==a.type?!0:!a.sa&&!a.ta&&a.ha}),a.v)){var c=lc(a.b,b);a.h[c]||Lf(a,c).then(function(){this.a.bc()}.bind(a))["catch"](xa);for(c=0;c=b.status&&202!=b.status)b.responseURL&&(a=b.responseURL),c({uri:a,data:b.response,headers:e,fromCache:!!e["x-shaka-from-cache"]}); +else{var f=null;try{f=Ua(b.response)}catch(m){}d(new t(401==b.status||403==b.status?2:1,1,1001,a,b.status,f,e))}};e.onerror=function(){d(new t(1,1,1002,a))};e.ontimeout=function(){d(new t(1,1,1003,a))};for(var f in b.headers)e.setRequestHeader(f,b.headers[f]);e.send(b.body)})}n("shaka.net.HttpPlugin",Xf);Ea.http=Xf;Ea.https=Xf;function Yf(){this.a=null;this.b=[];this.c={}}k=Yf.prototype;k.init=function(a,b){return Zf(this,a,b).then(function(){var b=Object.keys(a);return Promise.all(b.map(function(a){return $f(this,a).then(function(b){this.c[a]=b}.bind(this))}.bind(this)))}.bind(this))};k.m=function(){return Promise.all(this.b.map(function(a){try{a.transaction.abort()}catch(b){}return a.N["catch"](xa)})).then(function(){this.a&&(this.a.close(),this.a=null)}.bind(this))}; +k.get=function(a,b){var c;return ag(this,a,"readonly",function(a){c=a.get(b)}).then(function(){return c.result})};k.forEach=function(a,b){return ag(this,a,"readonly",function(a){a.openCursor().onsuccess=function(a){if(a=a.target.result)b(a.value),a["continue"]()}})};function bg(a,b,c){return ag(a,b,"readwrite",function(a){a.put(c)})}k.remove=function(a,b){return ag(this,a,"readwrite",function(a){a["delete"](b)})}; +function cg(a,b,c){return ag(a,"segment","readwrite",function(a){for(var d=0;d=a.length)return Promise.resolve();var d=a[b++];return pg(this,d).then(c)}.bind(this);return c()}.bind(a));a.b={};a.i=Promise.all(c).then(function(){return bg(this.j,"manifest",b)}.bind(a)).then(function(){this.l=[]}.bind(a)); +return a.i} +function pg(a,b){var c=Ga(b.uris,a.A);if(b.U||null!=b.L)c.headers.Range="bytes="+b.U+"-"+(null==b.L?"":b.L);var d;return a.v.request(1,c).then(function(a){if(!this.a)return Promise.reject(new t(2,9,9002));d=a.data.byteLength;this.l.push(b.Hb.key);b.Hb.data=a.data;return bg(this.j,"segment",b.Hb)}.bind(a)).then(function(){if(!this.a)return Promise.reject(new t(2,9,9002));null==b.L?(this.a.size+=d,this.f+=b.Rb):this.h+=d;var a=(this.h+this.f)/(this.c+this.g),c=fg(this.a);this.s.progressCallback(c,a)}.bind(a))} +;function qg(){this.a=-1}k=qg.prototype;k.configure=function(){};k.start=function(a){var b=/^offline:([0-9]+)$/.exec(a);if(!b)return Promise.reject(new t(2,1,9004,a));var c=Number(b[1]),d=lg();this.a=c;return d?d.init(eg).then(function(){return d.get("manifest",c)}).then(function(a){if(!a)throw new t(2,9,9003,c);return rg(a)}).then(function(a){return d.m().then(function(){return a})},function(a){return d.m().then(function(){throw a;})}):Promise.reject(new t(2,9,9E3))};k.stop=function(){return Promise.resolve()}; +k.update=function(){};k.onExpirationUpdated=function(a,b){var c=lg();c.init(eg).then(function(){return c.get("manifest",this.a)}.bind(this)).then(function(d){if(d&&!(0>d.sessionIds.indexOf(a))&&(void 0==d.expiration||d.expiration>b))return d.expiration=b,bg(c,"manifest",d)})["catch"](function(){}).then(function(){return c.m()})}; +function rg(a){var b=new R(null,0);b.qa(a.duration);var c=a.drmInfo?[a.drmInfo]:[];return{presentationTimeline:b,minBufferTime:10,offlineSessionIds:a.sessionIds,periods:a.periods.map(function(a){return gg(a,c,b)})}}Id["application/x-offline-manifest"]=qg;function sg(a){if(/^offline:([0-9]+)$/.exec(a)){var b={uri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Promise.resolve(b)}if(b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a)){var c=Number(b[1]),d=lg();return d?d.init(eg).then(function(){return d.get("segment",c)}).then(function(b){return d.m().then(function(){if(!b)throw new t(2,9,9003,c);return{uri:a,data:b.data,headers:{}}})}):Promise.reject(new t(2,9,9E3))}return Promise.reject(new t(2,1,9004,a))} +n("shaka.offline.OfflineScheme",sg);Ea.offline=sg;function tg(){this.a=Promise.resolve();this.b=this.c=this.f=!1;this.i=new Promise(function(a){this.g=a}.bind(this))}tg.prototype.then=function(a){this.a=this.a.then(a).then(function(a){return this.b?(this.g(),Promise.reject(this.h)):Promise.resolve(a)}.bind(this));return this};function ug(a){a.f||(a.a=a.a.then(function(a){this.c=!0;return Promise.resolve(a)}.bind(a),function(a){this.c=!0;return this.b?(this.g(),Promise.reject(this.h)):Promise.reject(a)}.bind(a)));a.f=!0;return a.a} +tg.prototype.cancel=function(a){if(this.c)return Promise.resolve();this.b=!0;this.h=a;return this.i};function U(a,b){p.call(this);this.O=!1;this.f=a;this.A=null;this.l=new C;this.Qb=new F;this.$a=this.c=this.h=this.a=this.v=this.g=this.Ya=this.la=this.I=this.j=this.s=null;this.Ec=1E9;this.Xa=[];this.ma=!1;this.ab=!0;this.na=this.K=null;this.H={};this.Za=[];this.B={};this.b=vg(this);this.ob={width:Infinity,height:Infinity};this.i=wg();this.Wa=0;this.V=this.b.preferredAudioLanguage;this.Da=this.b.preferredTextLanguage;this.mb=this.Ua="";b&&b(this);this.s=new B(this.fe.bind(this));this.Ya=xg(this); +for(var c=0;cthis.Xa.indexOf(a.id)}.bind(this))};U.prototype.getTextTracks=U.prototype.Yb; +U.prototype.uc=function(a){if(this.a&&(a=dc(T(this.a),a))){Ig(this,a,!1);var b={};b.text=a;Jg(this,b,!0)}};U.prototype.selectTextTrack=U.prototype.uc; +U.prototype.vc=function(a,b){if(this.a){var c={},d=cc(T(this.a),a),e=Bf(this.a);if(d){if(!d.allowedByApplication||!d.allowedByKeySystem)return;d.audio&&(Kg(this,d.audio),d.audio!=e.audio&&(c.audio=d.audio));d.video&&(Kg(this,d.video),d.video!=e.video&&(c.video=d.video))}Oa(c).forEach(function(a){Ig(this,a,!1)}.bind(this));(d=e.text)&&(c.text=d);Jg(this,c,b)}};U.prototype.selectVariantTrack=U.prototype.vc; +U.prototype.Pc=function(){return this.a?ac(T(this.a).variants).map(function(a){return a.language}).filter(za):[]};U.prototype.getAudioLanguages=U.prototype.Pc;U.prototype.Yc=function(){return this.a?T(this.a).textStreams.map(function(a){return a.language}).filter(za):[]};U.prototype.getTextLanguages=U.prototype.Yc;U.prototype.Wd=function(a,b){if(this.a){var c=T(this.a);this.V=a;this.Ua=b||"";Gg(this,c)}};U.prototype.selectAudioLanguage=U.prototype.Wd; +U.prototype.Xd=function(a,b){if(this.a){var c=T(this.a);this.Da=a;this.mb=b||"";Gg(this,c)}};U.prototype.selectTextLanguage=U.prototype.Xd;U.prototype.cd=function(){return"showing"==this.A.mode};U.prototype.isTextTrackVisible=U.prototype.cd;U.prototype.$d=function(a){this.A.mode=a?"showing":"hidden";Lg(this)};U.prototype.setTextTrackVisibility=U.prototype.$d;U.prototype.Uc=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f+1E3*this.f.currentTime):null}; +U.prototype.getPlayheadTimeAsDate=U.prototype.Uc; +U.prototype.getStats=function(){Mg(this);this.Ta();var a=null,b=null,c=this.f&&this.f.getVideoPlaybackQuality?this.f.getVideoPlaybackQuality():{};this.g&&this.c&&(a=kc(this.c,of(this.g)),b=this.B[a],b=jc(b.audio,b.video,this.c.periods[a].variants),a=b.video||{});a||(a={});b||(b={});return{width:a.width||0,height:a.height||0,streamBandwidth:b.bandwidth||0,decodedFrames:Number(c.totalVideoFrames),droppedFrames:Number(c.droppedVideoFrames),estimatedBandwidth:this.b.abr.manager.getBandwidthEstimate(),loadLatency:this.i.loadLatency, +playTime:this.i.playTime,bufferingTime:this.i.bufferingTime,switchHistory:Da(this.i.switchHistory),stateHistory:Da(this.i.stateHistory)}};U.prototype.getStats=U.prototype.getStats; +U.prototype.addTextTrack=function(a,b,c,d,e,f){if(!this.a)return Promise.reject();for(var g=T(this.a),h,l=0;lac(a.variants).length;if(!b)throw new t(2,4,4011);if(a)throw new t(2,4,4012);}; +function Jg(a,b,c){for(var d in b){var e=b[d],f=c||!1;"text"==d&&(f=!0);a.ab?a.H[d]={stream:e,Lc:f}:Ef(a.a,d,e,f)}}function Mg(a){if(a.c){var b=Date.now()/1E3;a.ma?a.i.bufferingTime+=b-a.Wa:a.i.playTime+=b-a.Wa;a.Wa=b}} +function Bg(a,b){function c(a,b){if(!a)return null;var c=a.findSegmentPosition(b-e.startTime);return null==c?null:(c=a.getSegmentReference(c))?c.startTime+e.startTime:null}var d=Bf(a.a),e=T(a.a),f=c(d.video,b),d=c(d.audio,b);return null!=f&&null!=d?Math.max(f,d):null!=f?f:null!=d?d:b}k.fe=function(a,b){this.b.abr.manager.segmentDownloaded(a,b)};k.Ac=function(a){Mg(this);this.ma=a;this.Ta();if(this.g){var b=this.g;a!=b.h&&(b.h=a,qf(b,b.g))}this.dispatchEvent(new G("buffering",{buffering:a}))}; +k.be=function(){Cg(this)};k.Ta=function(){if(!this.O){var a=this.ma?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing";var b=Date.now()/1E3;if(this.i.stateHistory.length){var c=this.i.stateHistory[this.i.stateHistory.length-1];c.duration=b-c.timestamp;if(a==c.state)return}this.i.stateHistory.push({timestamp:b,state:a,duration:0})}};k.ee=function(){if(this.v){var a=this.v;a.c.forEach(a.s.bind(a,!0))}this.a&&Hf(this.a)}; +function Ng(a,b,c,d,e){if(!c||1>c.length)return a.za(new t(2,4,4012)),{};a.b.abr.manager.setVariants(c);a.b.abr.manager.setTextStreams(d);var f=[];e&&(f=["video","audio"],b.textStreams.length&&f.push("text"));e=Bf(a.a);var g=Af(a.a);if(b=ic(e.audio,e.video,g?g.variants:b.variants)){b.allowedByApplication&&b.allowedByKeySystem||(f.push("audio"),f.push("video"));c=c.map(function(a){return[a.video,a.audio]}).reduce(x,[]);c.push.apply(c,d);c=c.filter(y).filter(za);for(var h in e)-1==c.indexOf(e[h])&& +f.push(h)}f=f.filter(za);if(0b&&(b+=Math.pow(2,32)),b=b.toString(16));this.za(new t(2,3,3016,a,b,this.f.error.message))}}}; +k.de=function(a){var b=["output-restricted","internal-error"],c=T(this.a),d=!1,e=1==Object.keys(a).length&&"00"==Object.keys(a)[0];c.variants.forEach(function(c){var f=[];c.audio&&f.push(c.audio);c.video&&f.push(c.video);f.forEach(function(f){var g=c.allowedByKeySystem;f.keyId&&(f=a[e?"00":f.keyId],c.allowedByKeySystem=!!f&&0>b.indexOf(f));g!=c.allowedByKeySystem&&(d=!0)})});var f=Bf(this.a);(f=ic(f.audio,f.video,c.variants))&&!f.allowedByKeySystem&&Gg(this,c);d&&Cg(this)}; +k.ce=function(a,b){if(this.h&&this.h.onExpirationUpdated)this.h.onExpirationUpdated(a,b);this.dispatchEvent(new G("expirationupdated"))};function V(a){if(!a||a.constructor!=U)throw new t(2,9,9008);this.a=lg();this.f=a;this.i=Og(this);this.b=null;this.v=!1;this.j=null;this.g=-1;this.l=0;this.c=null;this.h=new mg(this.a,a.s,a.getConfiguration().streaming.retryParameters,this.i)}n("shaka.offline.Storage",V);function Pg(){return!!window.indexedDB}V.support=Pg;V.prototype.m=function(){var a=this.a,b=this.h?this.h.m()["catch"](function(){}).then(function(){if(a)return a.m()}):Promise.resolve();this.i=this.f=this.h=this.a=null;return b}; +V.prototype.destroy=V.prototype.m;V.prototype.configure=function(a){Ca(this.i,a,Og(this),{},"")};V.prototype.configure=V.prototype.configure; +V.prototype.ne=function(a,b,c){function d(a){f=a}if(this.v)return Promise.reject(new t(2,9,9006));this.v=!0;var e,f=null;return Qg(this).then(function(){W(this);return Rg(this,a,d,c)}.bind(this)).then(function(c){W(this);this.c=c.manifest;this.b=c.Mc;if(this.c.presentationTimeline.Y()||this.c.presentationTimeline.wa())throw new t(2,9,9005,a);this.c.periods.forEach(this.s.bind(this));this.g=this.a.c.manifest++;this.l=0;c=this.c.periods.map(this.B.bind(this));var d=this.b.b,f=kb(this.b);if(d){if(!f.length)throw new t(2, +9,9007,a);d.initData=[]}e={key:this.g,originalManifestUri:a,duration:this.l,size:0,expiration:this.b.cb(),periods:c,sessionIds:f,drmInfo:d,appMetadata:b};return og(this.h,e)}.bind(this)).then(function(){W(this);if(f)throw f;return Sg(this)}.bind(this)).then(function(){return fg(e)}.bind(this))["catch"](function(a){return Sg(this)["catch"](xa).then(function(){throw a;})}.bind(this))};V.prototype.store=V.prototype.ne; +V.prototype.remove=function(a){function b(a){6013!=a.code&&(e=a)}var c=a.offlineUri,d=/^offline:([0-9]+)$/.exec(c);if(!d)return Promise.reject(new t(2,9,9004,c));var e=null,f,g,h=Number(d[1]);return Qg(this).then(function(){W(this);return this.a.get("manifest",h)}.bind(this)).then(function(a){W(this);if(!a)throw new t(2,9,9003,c);f=a;a=rg(f);g=new cb(this.f.s,b,function(){},function(){});g.configure(this.f.getConfiguration().drm);return g.init(a,!0)}.bind(this)).then(function(){return hb(g,f.sessionIds)}.bind(this)).then(function(){return g.m()}.bind(this)).then(function(){W(this); +if(e)throw e;var b=f.periods.map(function(a){return a.streams.map(function(a){var b=a.segments.map(function(a){a=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a.uri);return Number(a[1])});a.initSegmentUri&&(a=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a.initSegmentUri),b.push(Number(a[1])));return b}).reduce(x,[])}).reduce(x,[]),c=0,d=b.length,g=this.i.progressCallback;return cg(this.a,b,function(){c++;g(a,c/d)})}.bind(this)).then(function(){W(this);this.i.progressCallback(a,1);return this.a.remove("manifest", +h)}.bind(this))};V.prototype.remove=V.prototype.remove;V.prototype.list=function(){var a=[];return Qg(this).then(function(){W(this);return this.a.forEach("manifest",function(b){a.push(fg(b))})}.bind(this)).then(function(){return a})};V.prototype.list=V.prototype.list; +function Rg(a,b,c,d){function e(){}var f=a.f.s,g=a.f.getConfiguration(),h,l,m;return Ld(b,f,g.manifest.retryParameters,d).then(function(a){W(this);m=new a;m.configure(g.manifest);return m.start(b,{networkingEngine:f,filterPeriod:this.s.bind(this),onTimelineRegionAdded:function(){},onEvent:function(){},onError:c})}.bind(a)).then(function(a){W(this);h=a;l=new cb(f,c,e,function(){});l.configure(g.drm);return l.init(h,!0)}.bind(a)).then(function(){W(this);return Tg(h)}.bind(a)).then(function(){W(this); +return gb(l)}.bind(a)).then(function(){W(this);return m.stop()}.bind(a)).then(function(){W(this);return{manifest:h,Mc:l}}.bind(a))["catch"](function(a){if(m)return m.stop().then(function(){throw a;});throw a;})} +V.prototype.A=function(a){for(var b=[],c=Tb(this.f.getConfiguration().preferredAudioLanguage),d=[0,Rb,Sb],e=a.filter(function(a){return"variant"==a.type}),d=d.map(function(a){return e.filter(function(b){b=Tb(b.language);return Qb(a,c,b)})}),f,g=0;g=a.height});h.length&&(h.sort(function(a, +b){return b.height-a.height}),f=h.filter(function(a){return a.height==h[0].height}));f.sort(function(a,b){return a.bandwidth-b.bandwidth});f.length&&b.push(f[Math.floor(f.length/2)]);b.push.apply(b,a.filter(function(a){return"text"==a.type}));return b};function Og(a){return{trackSelectionCallback:a.A.bind(a),progressCallback:function(a,c){if(a||c)return null}}}function Qg(a){return a.a?a.a.a?Promise.resolve():a.a.init(eg):Promise.reject(new t(2,9,9E3))} +V.prototype.s=function(a){var b={};if(this.j){var c=this.j.filter(function(a){return"variant"==a.type}),d=null;c.length&&(d=cc(a,c[0]));d&&(d.video&&(b.video=d.video),d.audio&&(b.audio=d.audio))}Xb(this.b,b,a);Wb(a,this.f.getConfiguration().restrictions,{width:Infinity,height:Infinity})};function Sg(a){var b=a.b?a.b.m():Promise.resolve();a.b=null;a.c=null;a.v=!1;a.j=null;a.g=-1;return b} +function Tg(a){var b=a.periods.map(function(a){return a.variants}).reduce(x,[]).map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}).reduce(x,[]).filter(za);a=a.periods.map(function(a){return a.textStreams}).reduce(x,[]);b.push.apply(b,a);return Promise.all(b.map(function(a){return a.createSegmentIndex()}))} +V.prototype.B=function(a){var b,c,d=$b(a,null,null),e=bc(a,null),d=this.i.trackSelectionCallback(d.concat(e));this.j||(this.j=d,this.c.periods.forEach(this.s.bind(this)));for(e=d.length-1;0navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==Yg||(Xg=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Yg)});X(function(){if(4503599627370497!=Math.round(4503599627370497)){var a=Math.round;Math.round=function(b){var c=b;4503599627370496>=b&&(c=a(b));return c}}});function Zg(a){this.f=[];this.b=[];this.a=[];(new O).aa("pssh",this.c.bind(this)).parse(a.buffer)}Zg.prototype.c=function(a){if(!(1=d.a.length)a=c;else{var e=[];for(a=0;aa.indexOf("Apple")||(0<=b.indexOf("Version/8")?window.MediaSource=null:0<=b.indexOf("Version/9")?Ch():0<=b.indexOf("Version/10")&&(Ch(),Dh()))}});function Z(a){this.c=[];this.b=[];this.Ba=Gh;if(a)try{a(this.ia.bind(this),this.a.bind(this))}catch(b){this.a(b)}}var Gh=0;function Hh(a){var b=new Z;b.ia(void 0);return b.then(function(){return a})}function Ih(a){var b=new Z;b.a(a);return b}function Jh(a){function b(a,b,c){a.Ba==Gh&&(e[b]=c,d++,d==e.length&&a.ia(e))}var c=new Z;if(!a.length)return c.ia([]),c;for(var d=0,e=Array(a.length),f=c.a.bind(c),g=0;g