lcny-admin-mobile-vue/dist/build/h5/static/js/pages-index-monitor.5701aea...

188 lines
1.6 MiB
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-monitor"],{"0158":function(e,t,i){"use strict";i.r(t);var n=i("0247"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},"0235":function(e,t,i){"use strict";i.d(t,"i",(function(){return l})),i.d(t,"h",(function(){return u})),i.d(t,"d",(function(){return c})),i.d(t,"f",(function(){return h})),i.d(t,"e",(function(){return p})),i.d(t,"c",(function(){return f})),i.d(t,"g",(function(){return v})),i.d(t,"a",(function(){return m})),i.d(t,"b",(function(){return g}));var n=i("be09"),r=i.n(n),a={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},s=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){var n=("00"+Number(t).toString(16)).slice(-2),r=("00"+Number(i).toString(16)).slice(-2);return"avc1."+n+"00"+r})):e},u=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),s.forEach((function(n){var r=a[n].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=n;var s=e.substring(0,r[1].length),o=e.replace(s,"");i.push({type:s,details:o,mediaType:n})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},c=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return u(r.playlists[0].attributes.CODECS)}return null},h=function(e){return void 0===e&&(e=""),a.audio.test(e.trim().toLowerCase())},d=function(e){return void 0===e&&(e=""),a.text.test(e.trim().toLowerCase())},p=function(e){if(e&&"string"===typeof e){var t=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===t.length&&h(t[0])?i="audio":1===t.length&&d(t[0])&&(i="application");var n="mp4";return t.every((function(e){return a.mp4.test(e)}))?n="mp4":t.every((function(e){return a.webm.test(e)}))?n="webm":t.every((function(e){return a.ogg.test(e)}))&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}},f=function(e){return void 0===e&&(e=""),r.a.MediaSource&&r.a.MediaSource.isTypeSupported&&r.a.MediaSource.isTypeSupported(p(e))||!1},v=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++){var i=o[t];if(a["muxer"+i].test(e))return!0}return!1}))},m="mp4a.40.2",g="avc1.4d400d"},"0247":function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("a9e3"),i("c975"),i("d3b7"),i("ac1f");t.default={name:"u-button",props:{hairLine:{type:Boolean,default:!0},type:{type:String,default:"default"},size:{type:String,default:"default"},shape:{type:String,default:"square"},plain:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},openType:{type:String,default:""},formType:{type:String,default:""},appParameter:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1},lang:{type:String,default:"en"},sessionFrom:{type:String,default:""},sendMessageTitle:{type:String,default:""},sendMessagePath:{type:String,default:""},sendMessageImg:{type:String,default:""},showMessageCard:{type:Boolean,default:!1},hoverBgColor:{type:String,default:""},rippleBgColor:{type:String,default:""},ripple:{type:Boolean,default:!1},hoverClass:{type:String,default:""},customStyle:{type:Object,default:function(){return{}}},dataName:{type:String,default:""},throttleTime:{type:[String,Number],default:1e3},hoverStartTime:{type:[String,Number],default:20},hoverStayTime:{type:[String,Number],default:150}},computed:{getHoverClass:function(){if(this.loading||this.disabled||this.ripple||this.hoverClass)return"";var e="";return e=this.plain?"u-"+this.type+"-plain-hover":"u-"+this.type+"-hover",e},showHairLineBorder:function(){return["primary","success","error","warning"].indexOf(this.type)>=0&&!this.plain?"":"u-hairline-border"}},data:function(){return{rippleTop:0,rippleLeft:0,fields:{},waveActive:!1}},methods:{click:function(e){var t=this;this.$u.throttle((function(){!0!==t.loading&&!0!==t.disabled&&(t.ripple&&(t.waveActive=!1,t.$nextTick((function(){this.getWaveQuery(e)}))),t.$emit("click",e))}),this.throttleTime)},getWaveQuery:function(e){var t=this;this.getElQuery().then((function(i){var n=i[0];if(n.width&&n.width&&(n.targetWidth=n.height>n.width?n.height:n.width,n.targetWidth)){t.fields=n;var r="",a="";r=e.touches[0].clientX,a=e.touches[0].clientY,t.rippleTop=a-n.top-n.targetWidth/2,t.rippleLeft=r-n.left-n.targetWidth/2,t.$nextTick((function(){t.waveActive=!0}))}}))},getElQuery:function(){var e=this;return new Promise((function(t){var i="";i=uni.createSelectorQuery().in(e),i.select(".u-btn").boundingClientRect(),i.exec((function(e){t(e)}))}))},getphonenumber:function(e){this.$emit("getphonenumber",e)},getuserinfo:function(e){this.$emit("getuserinfo",e)},error:function(e){this.$emit("error",e)},opensetting:function(e){this.$emit("opensetting",e)},launchapp:function(e){this.$emit("launchapp",e)}}}},"0696":function(e,t,i){"use strict";var n=i("8866"),r=i.n(n);r.a},"095a":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return s}));var n=i("be09"),r=i.n(n),a=function(t){return r.a.atob?r.a.atob(t):e.from(t,"base64").toString("binary")};function s(e){for(var t=a(e),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i}}).call(this,i("b639").Buffer)},"0a96":function(e,t,i){var n=i("e68a").getUint64,r=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===i.version?(i.earliestPresentationTime=t.getUint32(r),i.firstOffset=t.getUint32(r+4),r+=8):(i.earliestPresentationTime=n(e.subarray(r)),i.firstOffset=n(e.subarray(r+8)),r+=16),r+=2;var a=t.getUint16(r);for(r+=2;a>0;r+=12,a--)i.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return i};e.exports=r},"0c01":function(e,t,i){"use strict";var n=i("d136"),r=i.n(n),a=i("be09"),s=i.n(a),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=s.a.location&&s.a.location.href||"");var i="function"===typeof s.a.URL,n=/^\/\//.test(e),a=!s.a.location&&!/\/\//i.test(e);if(i?e=new s.a.URL(e,s.a.location||o):/\/\//i.test(e)||(e=r.a.buildAbsoluteURL(s.a.location&&s.a.location.href||"",e)),i){var l=new URL(t,e);return a?l.href.slice(o.length):n?l.href.slice(l.protocol.length):l.href}return r.a.buildAbsoluteURL(e,t)};t["a"]=l},"0c1c":function(e,t,i){"use strict";e.exports=function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}},"0c42":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-switch[data-v-0d3821ba]{position:relative;display:inline-block;box-sizing:initial;width:2em;height:1em;background-color:#fff;border:1px solid rgba(0,0,0,.1);border-radius:1em;transition:background-color .3s;font-size:%?50?%}.u-switch__node[data-v-0d3821ba]{display:flex;flex-direction:row;align-items:center;justify-content:center;position:absolute;top:0;left:0;border-radius:100%;z-index:1;background-color:#fff;background-color:#fff;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05),-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:-webkit-transform cubic-bezier(.3,1.05,.4,1.05);transition:transform cubic-bezier(.3,1.05,.4,1.05);transition:transform cubic-bezier(.3,1.05,.4,1.05),-webkit-transform cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05)}.u-switch__loading[data-v-0d3821ba]{display:flex;flex-direction:row;align-items:center;justify-content:center}.u-switch--on[data-v-0d3821ba]{background-color:#1989fa}.u-switch--on .u-switch__node[data-v-0d3821ba]{-webkit-transform:translateX(100%);transform:translateX(100%)}.u-switch--disabled[data-v-0d3821ba]{opacity:.4}',""]),e.exports=t},"0de0":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return/mp4a\.\d+.\d+/i.test(e)},r=function(e){return/avc1\.[\da-f]+/i.test(e)},a=function(e){var t={type:"",parameters:{}},i=e.trim().split(";");return t.type=i.shift().trim(),i.forEach((function(e){var i=e.trim().split("=");if(i.length>1){var n=i[0].replace(/"/g,"").trim(),r=i[1].replace(/"/g,"").trim();t.parameters[n]=r}})),t},s=function(e){return e.map((function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){var n=("00"+Number(t).toString(16)).slice(-2),r=("00"+Number(i).toString(16)).slice(-2);return"avc1."+n+"00"+r}))}))};t["default"]={isAudioCodec:n,parseContentType:a,isVideoCodec:r,translateLegacyCodecs:s},e.exports=t["default"]},"0ea2":function(e,t,i){"use strict";var n,r,a,s=i("4329"),o=i("4e69"),l=i("ae75"),u=i("256f").TimestampRolloverStream,c=i("ae75"),h=188,d=71;n=function(){var e=new Uint8Array(h),t=0;n.prototype.init.call(this),this.push=function(i){var n,r=0,a=h;t?(n=new Uint8Array(i.byteLength+t),n.set(e.subarray(0,t)),n.set(i,t),t=0):n=i;while(a<n.byteLength)n[r]!==d||n[a]!==d?(r++,a++):(this.trigger("data",n.subarray(r,a)),r+=h,a+=h);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.byteLength-r)},this.flush=function(){t===h&&e[0]===d&&(this.trigger("data",e),t=0),this.trigger("done")}},n.prototype=new s,r=function(){var e,t,i,n;r.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var r=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,r,a,s;if(1&e[5]){n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=(15&e[1])<<8|e[2],r=3+i-4,a=(15&e[10])<<8|e[11],s=12+a;while(s<r){var o=e[s],u=(31&e[s+1])<<8|e[s+2];o===l.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=u:o===l.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=u:o===l.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][u]=o),s+=5+((15&e[s+3])<<8|e[s+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid){i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);while(this.packetsWaitingForPmt.length)this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=l.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=l.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},r.prototype=new s,r.STREAM_TYPES={h264:27,adts:15},a=function(){var e=this,t={data:[],size:0},i={data:[],size:0},n={data:[],size:0},r=function(e,t){var i;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])},s=function(t,i,n){var a,s=new Uint8Array(t.size),o={type:i},l=0,u=0,c=!1;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,l=0;l<t.data.length;l++)a=t.data[l],s.set(a.data,u),u+=a.data.byteLength;r(s,o),c="video"===i||o.packetLength<=t.size,(n||c)&&(t.size=0,t.data.length=0),c&&e.trigger("data",o)}};a.prototype.init.call(this),this.push=function(r){({pat:function(){},pes:function(){var e,a;switch(r.streamType){case l.H264_STREAM_TYPE:case c.H264_STREAM_TYPE:e=t,a="video";break;case l.ADTS_STREAM_TYPE:e=i,a="audio";break;case l.METADATA_STREAM_TYPE:e=n,a="timed-metadata";break;default:return}r.payloadUnitStartIndicator&&s(e,a,!0),e.data.push(r),e.size+=r.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},i=r.programMapTable;null!==i.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.video,codec:"avc",type:"video"}),null!==i.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[r.type]()},this.flush=function(){s(t,"video"),s(i,"audio"),s(n,"timed-metadata"),this.trigger("done")}},a.prototype=new s;var p={PAT_PID:0,MP2T_PACKET_LENGTH:h,TransportPacketStream:n,TransportParseStream:r,ElementaryStream:a,TimestampRolloverStream:u,CaptionStream:o.CaptionStream,Cea608Stream:o.Cea608Stream,MetadataStream:i("5bc0")};for(var f in l)l.hasOwnProperty(f)&&(p[f]=l[f]);e.exports=p},1:function(e,t){},1029:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var n={uLoading:i("1bfa").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-switch",class:[1==e.value?"u-switch--on":"",e.disabled?"u-switch--disabled":""],style:[e.switchStyle],on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onClick.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"u-switch__node node-class",style:{width:e.$u.addUnit(this.size),height:e.$u.addUnit(this.size)}},[i("u-loading",{staticClass:"u-switch__loading",attrs:{show:e.loading,size:.6*e.size,color:e.loadingColor}})],1)],1)},a=[]},"10eb":function(e,t,i){"use strict";function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,i("d9e2"),i("d401")},1283:function(e,t){var i={"":!0,up:!0};function n(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function r(e){return"number"===typeof e&&e>=0&&e<=100}function a(){var e=100,t=3,i=0,a=100,s=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=n(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t}}})}e.exports=a},"12c6":function(e,t,i){
/**
* @license
* Video.js 6.13.0 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/master/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
*/
function n(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var r=n(i("ea7c")),a=n(i("4742")),s=n(i("1b8d")),o=n(i("8c10")),l=n(i("eec7")),u=n(i("bec7")),c="6.13.0",h=r.navigator&&r.navigator.userAgent||"",d=/AppleWebKit\/([\d.]+)/i.exec(h),p=d?parseFloat(d.pop()):null,f=/iPad/i.test(h),v=/iPhone/i.test(h)&&!f,m=/iPod/i.test(h),g=v||f||m,y=function(){var e=h.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),b=/Android/i.test(h),_=function(){var e=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),T=b&&/webkit/i.test(h)&&_<2.3,S=b&&_<5&&p<537,w=/Firefox/i.test(h),E=/Edge/i.test(h),k=!E&&(/Chrome/i.test(h)||/CriOS/i.test(h)),C=function(){var e=h.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),x=/MSIE\s8\.0/.test(h),A=function(){var e=/MSIE\s(\d+)\.\d/.exec(h),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(t=11),t}(),I=/Safari/i.test(h)&&!k&&!b&&!E,O=(I||g)&&!k,j=ie()&&("ontouchstart"in r||r.navigator.maxTouchPoints||r.DocumentTouch&&r.document instanceof r.DocumentTouch),L=ie()&&"backgroundSize"in r.document.createElement("video").style,P=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:v,IS_IPOD:m,IS_IOS:g,IOS_VERSION:y,IS_ANDROID:b,ANDROID_VERSION:_,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:S,IS_FIREFOX:w,IS_EDGE:E,IS_CHROME:k,CHROME_VERSION:C,IS_IE8:x,IE_VERSION:A,IS_SAFARI:I,IS_ANY_SAFARI:O,TOUCH_ENABLED:j,BACKGROUND_SIZE_SUPPORTED:L}),D="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},M=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},N=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},B=function(e,t){return e.raw=t,e},U=Object.prototype.toString,F=function(e){return z(e)?Object.keys(e):[]};function V(e,t){F(e).forEach((function(i){return t(e[i],i)}))}function H(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return F(e).reduce((function(i,n){return t(i,e[n],n)}),i)}function q(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[e].concat(i)):(i.forEach((function(t){t&&V(t,(function(t,i){e[i]=t}))})),e)}function z(e){return!!e&&"object"===("undefined"===typeof e?"undefined":D(e))}function G(e){return z(e)&&"[object Object]"===U.call(e)&&e.constructor===Object}var W=[],$=function(e,t){return function(i,n,a,s){var o=t.levels[n],l=new RegExp("^("+o+")$");if("log"!==i&&a.unshift(i.toUpperCase()+":"),a.unshift(e+":"),W&&W.push([].concat(a)),r.console){var u=r.console[i];u||"debug"!==i||(u=r.console.info||r.console.log),u&&o&&l.test(i)&&(s&&(a=a.map((function(e){if(z(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)})).join(" ")),u.apply?u[Array.isArray(a)?"apply":"call"](r.console,a):u(a))}}};function X(e){var t="info",i=void 0,n=function e(){for(var n=e.stringify||A&&A<11,r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];i("log",t,a,n)};return i=$(e,n),n.createLogger=function(t){return X(e+": "+t)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t},n.level=function(e){if("string"===typeof e){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');t=e}return t},n.history=function(){return W?[].concat(W):[]},n.history.filter=function(e){return(W||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},n.history.clear=function(){W&&(W.length=0)},n.history.disable=function(){null!==W&&(W.length=0,W=null)},n.history.enable=function(){null===W&&(W=[])},n.error=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return i("error",t,n)},n.warn=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return i("warn",t,n)},n.debug=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return i("debug",t,n)},n}var Y=X("VIDEOJS"),K=Y.createLogger;function Q(e,t){if(!e||!t)return"";if("function"===typeof r.getComputedStyle){var i=r.getComputedStyle(e);return i?i[t]:""}return e.currentStyle[t]||""}var J=B(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);function Z(e){return"string"===typeof e&&/\S/.test(e)}function ee(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function te(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function ie(){return a===r.document&&"undefined"!==typeof a.createElement}function ne(e){return z(e)&&1===e.nodeType}function re(){try{return r.parent!==r.self}catch(e){return!0}}function ae(e){return function(t,i){if(!Z(t))return a[e](null);Z(i)&&(i=a.querySelector(i));var n=ne(i)?i:a;return n[e]&&n[e](t)}}function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],r=a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Y.warn(s(J,e,i)),r.setAttribute(e,i)):"textContent"===e?oe(r,i):r[e]=i})),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&Ce(r,n),r}function oe(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function le(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ue(e,t){return ee(t),e.classList?e.classList.contains(t):te(t).test(e.className)}function ce(e,t){return e.classList?e.classList.add(t):ue(e,t)||(e.className=(e.className+" "+t).trim()),e}function he(e,t){return e.classList?e.classList.remove(t):(ee(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function de(e,t,i){var n=ue(e,t);if("function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=!n),i!==n)return i?ce(e,t):he(e,t),e}function pe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i];null===n||"undefined"===typeof n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function fe(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var a=n[r].name,s=n[r].value;"boolean"!==typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function ve(e,t){return e.getAttribute(t)}function me(e,t,i){e.setAttribute(t,i)}function ge(e,t){e.removeAttribute(t)}function ye(){a.body.focus(),a.onselectstart=function(){return!1}}function be(){a.onselectstart=function(){return!0}}function _e(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(Q(e,"height"))),i.width||(i.width=parseFloat(Q(e,"width"))),i}}function Te(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=a.documentElement,n=a.body,s=i.clientLeft||n.clientLeft||0,o=r.pageXOffset||n.scrollLeft,l=t.left+o-s,u=i.clientTop||n.clientTop||0,c=r.pageYOffset||n.scrollTop,h=t.top+c-u;return{left:Math.round(l),top:Math.round(h)}}function Se(e,t){var i={},n=Te(e),r=e.offsetWidth,a=e.offsetHeight,s=n.top,o=n.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-l+a)/a)),i.x=Math.max(0,Math.min(1,(u-o)/r)),i}function we(e){return z(e)&&3===e.nodeType}function Ee(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function ke(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"===typeof e&&(e=e()),ne(e)||we(e)?e:"string"===typeof e&&/\S/.test(e)?a.createTextNode(e):void 0})).filter((function(e){return e}))}function Ce(e,t){return ke(t).forEach((function(t){return e.appendChild(t)})),e}function xe(e,t){return Ce(Ee(e),t)}function Ae(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(9===A||0===e.button&&1===e.buttons))}var Ie=ae("querySelector"),Oe=ae("querySelectorAll"),je=(Object.freeze||Object)({isReal:ie,isEl:ne,isInFrame:re,createEl:se,textContent:oe,prependTo:le,hasClass:ue,addClass:ce,removeClass:he,toggleClass:de,setAttributes:pe,getAttributes:fe,getAttribute:ve,setAttribute:me,removeAttribute:ge,blockTextSelection:ye,unblockTextSelection:be,getBoundingClientRect:_e,findPosition:Te,getPointerPosition:Se,isTextNode:we,emptyEl:Ee,normalizeContent:ke,appendContent:Ce,insertContent:xe,isSingleLeftClick:Ae,$:Ie,$$:Oe}),Le=1;function Pe(){return Le++}var De={},Re="vdata"+(new Date).getTime();function Me(e){var t=e[Re];return t||(t=e[Re]=Pe()),De[t]||(De[t]={}),De[t]}function Ne(e){var t=e[Re];return!!t&&!!Object.getOwnPropertyNames(De[t]).length}function Be(e){var t=e[Re];if(t){delete De[t];try{delete e[Re]}catch(i){e.removeAttribute?e.removeAttribute(Re):e[Re]=null}}}function Ue(e,t){var i=Me(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Be(e)}function Fe(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function Ve(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||r.event;for(var s in e={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(e[s]=n[s]));if(e.target||(e.target=e.srcElement||a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=a.documentElement,l=a.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var He=!1;(function(){try{var e=Object.defineProperty({},"passive",{get:function(){He=!0}});r.addEventListener("test",null,e),r.removeEventListener("test",null,e)}catch(t){}})();var qe=["touchstart","touchmove"];function ze(e,t,i){if(Array.isArray(t))return Fe(ze,e,t,i);var n=Me(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=Pe()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=Ve(t);var r=n.handlers[t.type];if(r)for(var a=r.slice(0),s=0,o=a.length;s<o;s++){if(t.isImmediatePropagationStopped())break;try{a[s].call(e,t,i)}catch(l){Y.error(l)}}}}),1===n.handlers[t].length)if(e.addEventListener){var r=!1;He&&qe.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function Ge(e,t,i){if(Ne(e)){var n=Me(e);if(n.handlers){if(Array.isArray(t))return Fe(Ge,e,t,i);var r=function(e,t){n.handlers[t]=[],Ue(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);Ue(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function We(e,t,i){var n=Ne(e)?Me(e):{},r=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Ve(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)We.call(null,r,t,i);else if(!r&&!t.defaultPrevented){var a=Me(t.target);t.target[t.type]&&(a.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function $e(e,t,i){if(Array.isArray(t))return Fe($e,e,t,i);var n=function n(){Ge(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||Pe(),ze(e,t,n)}var Xe=(Object.freeze||Object)({fixEvent:Ve,on:ze,off:Ge,trigger:We,one:$e}),Ye=!1,Ke=void 0,Qe=function(){if(ie()&&!1!==Ke.options.autoSetup){var e=a.getElementsByTagName("video"),t=a.getElementsByTagName("audio"),i=a.getElementsByTagName("video-js"),n=[];if(e&&e.length>0)for(var r=0,s=e.length;r<s;r++)n.push(e[r]);if(t&&t.length>0)for(var o=0,l=t.length;o<l;o++)n.push(t[o]);if(i&&i.length>0)for(var u=0,c=i.length;u<c;u++)n.push(i[u]);if(n&&n.length>0)for(var h=0,d=n.length;h<d;h++){var p=n[h];if(!p||!p.getAttribute){Je(1);break}if(void 0===p.player){var f=p.getAttribute("data-setup");null!==f&&Ke(p)}}else Ye||Je(1)}};function Je(e,t){t&&(Ke=t),r.setTimeout(Qe,e)}ie()&&"complete"===a.readyState?Ye=!0:$e(r,"load",(function(){Ye=!0}));var Ze=function(e){var t=a.createElement("style");return t.className=e,t},et=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},tt=function(e,t,i){t.guid||(t.guid=Pe());var n=function(){return t.apply(e,arguments)};return n.guid=i?i+"_"+t.guid:t.guid,n},it=function(e,t){var i=Date.now(),n=function(){var n=Date.now();n-i>=t&&(e.apply(void 0,arguments),i=n)};return n},nt=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r,a=void 0,s=function(){n.clearTimeout(a),a=null},o=function(){var r=this,s=arguments,o=function(){a=null,o=null,i||e.apply(r,s)};!a&&i&&e.apply(r,s),n.clearTimeout(a),a=n.setTimeout(o,t)};return o.cancel=s,o},rt=function(){};rt.prototype.allowedEvents_={},rt.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ze(this,e,t),this.addEventListener=i},rt.prototype.addEventListener=rt.prototype.on,rt.prototype.off=function(e,t){Ge(this,e,t)},rt.prototype.removeEventListener=rt.prototype.off,rt.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},$e(this,e,t),this.addEventListener=i},rt.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=Ve(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),We(this,e)},rt.prototype.dispatchEvent=rt.prototype.trigger;var at=function(e){return e instanceof rt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"===typeof e[t]}))},st=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},ot=function(e){if(!e.nodeName&&!at(e))throw new Error("Invalid target; must be a DOM node or evented object.")},lt=function(e){if(!st(e))throw new Error("Invalid event type; must be a non-empty string or array.")},ut=function(e){if("function"!==typeof e)throw new Error("Invalid listener; must be a function.")},ct=function(e,t){var i=t.length<3||t[0]===e||t[0]===e.eventBusEl_,n=void 0,r=void 0,a=void 0;return i?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],a=t[1]):(n=t[0],r=t[1],a=t[2]),ot(n),lt(r),ut(a),a=tt(e,a),{isTargetingSelf:i,target:n,type:r,listener:a}},ht=function(e,t,i,n){ot(e),e.nodeName?Xe[t](e,i,n):e[t](i,n)},dt={on:function(){for(var e=this,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=ct(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(ht(s,"on",o,l),!a){var u=function(){return e.off(s,o,l)};u.guid=l.guid;var c=function(){return e.off("dispose",u)};c.guid=l.guid,ht(this,"on","dispose",u),ht(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=ct(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(a)ht(s,"one",o,l);else{var u=function t(){for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];e.off(s,o,t),l.apply(null,n)};u.guid=l.guid,ht(s,"one",o,u)}},off:function(e,t,i){if(!e||st(e))Ge(this.eventBusEl_,e,t);else{var n=e,r=t;ot(n),lt(r),ut(i),i=tt(this,i),this.off("dispose",i),n.nodeName?(Ge(n,r,i),Ge(n,"dispose",i)):at(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){return We(this.eventBusEl_,e,t)}};function pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=se("span",{className:"vjs-event-bus"});return q(e,dt),e.on("dispose",(function(){e.off(),r.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ft={state:{},setState:function(e){var t=this;"function"===typeof e&&(e=e());var i=void 0;return V(e,(function(e,n){t.state[n]!==e&&(i=i||{},i[n]={from:t.state[n],to:e}),t.state[n]=e})),i&&at(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function vt(e,t){return q(e,ft),e.state=q({},e.state,t),"function"===typeof e.handleStateChanged&&at(e)&&e.on("statechanged",e.handleStateChanged),e}function mt(e){return"string"!==typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function gt(e,t){return mt(e)===mt(t)}function yt(){for(var e={},t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((function(t){t&&V(t,(function(t,i){G(t)?(G(e[i])||(e[i]={}),e[i]=yt(e[i],t)):e[i]=t}))})),e}var bt=function(){function e(t,i,n){if(R(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=yt({},this.options_),i=this.options_=yt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){var r=t&&t.id&&t.id()||"no_player";this.id_=r+"_component_"+Pe()}this.name_=i.name||null,i.el?this.el_=i.el:!1!==i.createEl&&(this.el_=this.createEl()),!1!==i.evented&&pt(this,{eventBusKey:this.el_?"el_":null}),vt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==i.initChildren&&this.initChildren(),this.ready(n),!1!==i.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Be(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return Y.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=yt(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,i){return se(e,t,i)},e.prototype.localize=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],s=n&&n.split("-")[0],o=r&&r[s],l=i;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var n=t[i-1],r=n;return"undefined"===typeof n&&(r=e),r}))),l},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=mt(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,a=void 0;if("string"===typeof t){a=mt(t);var s=i.componentClass||a;i.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!==typeof o)return null;r=new o(this.player_||this,i)}else r=t;if(this.children_.splice(n,0,r),"function"===typeof r.id&&(this.childIndex_[r.id()]=r),a=a||r.name&&mt(r.name()),a&&(this.childNameIndex_[a]=r),"function"===typeof r.el&&r.el()){var l=this.contentEl().children,u=l[n]||null;this.contentEl().insertBefore(r.el(),u)}return r},e.prototype.removeChild=function(e){if("string"===typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,i=this.options_.children;if(i){var n=this.options_,r=function(e){var i=e.name,r=e.opts;if(void 0!==n[i]&&(r=n[i]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(i,r);a&&(t[i]=a)}},a=void 0,s=e.getComponent("Tech");a=Array.isArray(i)?i:Object.keys(i),a.concat(Object.keys(this.options_).filter((function(e){return!a.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((function(e){var n=void 0,r=void 0;return"string"===typeof e?(n=e,r=i[n]||t.options_[n]||{}):(n=e.name,r=e),{name:n,opts:r}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||mt(t.name));return i&&!s.isTech(i)})).forEach(r)}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return Ie(e,t||this.contentEl())},e.prototype.$$=function(e,t){return Oe(e,t||this.contentEl())},e.prototype.hasClass=function(e){return ue(this.el_,e)},e.prototype.addClass=function(e){ce(this.el_,e)},e.prototype.removeClass=function(e){he(this.el_,e)},e.prototype.toggleClass=function(e,t){de(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return ve(this.el_,e)},e.prototype.setAttribute=function(e,t){me(this.el_,e,t)},e.prototype.removeAttribute=function(e){ge(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+mt(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"===typeof r.getComputedStyle){var i=r.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(t=parseFloat(t),0===t){var n="offset"+mt(e);t=this.el_[n]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,i=10,n=200,r=void 0;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=(new Date).getTime(),r=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)r=!1;else if(t){var n=e.touches[0].pageX-t.pageX,a=e.touches[0].pageY-t.pageY,s=Math.sqrt(n*n+a*a);s>i&&(r=!1)}}));var a=function(){r=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",(function(i){if(t=null,!0===r){var a=(new Date).getTime()-e;a<n&&(i.preventDefault(),this.trigger("tap"))}}))},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=tt(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}},e.prototype.setTimeout=function(e,t){var i,n,a=this;return e=tt(this,e),i=r.setTimeout((function(){a.off("dispose",n),e()}),t),n=function(){return a.clearTimeout(i)},n.guid="vjs-timeout-"+i,this.on("dispose",n),i},e.prototype.clearTimeout=function(e){r.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){var i=this;e=tt(this,e);var n=r.setInterval(e,t),a=function(){return i.clearInterval(n)};return a.guid="vjs-interval-"+n,this.on("dispose",a),n},e.prototype.clearInterval=function(e){r.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.prototype.requestAnimationFrame=function(e){var t,i,n=this;return this.supportsRaf_?(e=tt(this,e),t=r.requestAnimationFrame((function(){n.off("dispose",i),e()})),i=function(){return n.cancelAnimationFrame(t)},i.guid="vjs-raf-"+t,this.on("dispose",i),t):this.setTimeout(e,1e3/60)},e.prototype.cancelAnimationFrame=function(e){if(this.supportsRaf_){r.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},e.registerComponent=function(t,i){if("string"!==typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var n=e.getComponent("Tech"),r=n&&n.isTech(i),a=e===i||e.prototype.isPrototypeOf(i.prototype);if(r||!a){var s=void 0;throw s=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+s+".")}t=mt(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,i},e.getComponent=function(t){if(t)return t=mt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();function _t(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}function Tt(e,t,i,n){return _t(e,n,i.length-1),i[n][t]}function St(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Tt.bind(null,"start",0,e),end:Tt.bind(null,"end",1,e)}}function wt(e,t){return Array.isArray(e)?St(e):void 0===e||void 0===t?St():St([[e,t]])}function Et(e,t){var i=0,n=void 0,r=void 0;if(!t)return 0;e&&e.length||(e=wt(0,0));for(var a=0;a<e.length;a++)n=e.start(a),r=e.end(a),r>t&&(r=t),i+=r-n;return i/t}bt.prototype.supportsRaf_="function"===typeof r.requestAnimationFrame&&"function"===typeof r.cancelAnimationFrame,bt.registerComponent("Component",bt);for(var kt={},Ct=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],xt=Ct[0],At=void 0,It=0;It<Ct.length;It++)if(Ct[It][1]in a){At=Ct[It];break}if(At)for(var Ot=0;Ot<At.length;Ot++)kt[xt[Ot]]=At[Ot];function jt(e){if(e instanceof jt)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:z(e)&&("number"===typeof e.code&&(this.code=e.code),q(this,e)),this.message||(this.message=jt.defaultMessages[this.code]||"")}jt.prototype.code=0,jt.prototype.message="",jt.prototype.status=null,jt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],jt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Lt=0;Lt<jt.errorTypes.length;Lt++)jt[jt.errorTypes[Lt]]=Lt,jt.prototype[jt.errorTypes[Lt]]=Lt;function Pt(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function Dt(e){Pt(e)&&e.then(null,(function(e){}))}var Rt=function(e){var t=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,i,n){return e[i]&&(t[i]=e[i]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))});return t},Mt=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,(function(e){return e.track})),n=Array.prototype.map.call(t,(function(e){var t=Rt(e.track);return e.src&&(t.src=e.src),t}));return n.concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(Rt))},Nt=function(e,t){return e.forEach((function(e){var i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return i.addCue(e)}))})),t.textTracks()},Bt={textTracksToJson:Mt,jsonToTextTracks:Nt,trackToJson_:Rt},Ut="vjs-modal-dialog",Ft=27,Vt=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=se("div",{className:Ut+"-content"},{role:"document"}),r.descEl_=se("p",{className:Ut+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),oe(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return Ut+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){e.which===Ft&&this.closeable()&&this.close()},t.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},t.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",tt(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.prototype.opened=function(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",tt(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.prototype.closeable=function(e){if("boolean"===typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},t.prototype.fill=function(){this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),xe(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},t.prototype.empty=function(){this.trigger("beforemodalempty"),Ee(this.contentEl()),this.trigger("modalempty")},t.prototype.content=function(e){return"undefined"!==typeof e&&(this.content_=e),this.content_},t.prototype.conditionalFocus_=function(){var e=a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(a,"keydown",this.handleKeyDown))},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(a,"keydown",this.handleKeyDown)},t.prototype.handleKeyDown=function(e){if(9===e.which){for(var t=this.focusableEls_(),i=this.el_.querySelector(":focus"),n=void 0,r=0;r<t.length;r++)if(i===t[r]){n=r;break}a.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}},t.prototype.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof r.HTMLAnchorElement||e instanceof r.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r.HTMLInputElement||e instanceof r.HTMLSelectElement||e instanceof r.HTMLTextAreaElement||e instanceof r.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r.HTMLIFrameElement||e instanceof r.HTMLObjectElement||e instanceof r.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(bt);Vt.prototype.options_={pauseOnOpen:!0,temporary:!0},bt.registerComponent("ModalDialog",Vt);var Ht=function(e){function t(){var i,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;R(this,t);var s=N(this,e.call(this));if(!r&&(r=s,x))for(var o in r=a.createElement("custom"),t.prototype)"constructor"!==o&&(r[o]=t.prototype[o]);r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var l=0;l<n.length;l++)r.addTrack(n[l]);return i=r,N(s,i)}return M(t,e),t.prototype.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},t.prototype.removeTrack=function(e){for(var t=void 0,i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(rt);for(var qt in Ht.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Ht.prototype.allowedEvents_)Ht.prototype["on"+qt]=null;var zt=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},Gt=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);for(var s=void 0,o=r.length-1;o>=0;o--)if(r[o].enabled){zt(r,r[o]);break}if(x){for(var l in s=a.createElement("custom"),Ht.prototype)"constructor"!==l&&(s[l]=Ht.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=N(this,e.call(this,r,s)),s=i,s.changing_=!1,n=s,N(i,n)}return M(t,e),t.prototype.addTrack=function(t){var i=this;t.enabled&&zt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){i.changing_||(i.changing_=!0,zt(i,t),i.changing_=!1,i.trigger("change"))}))},t}(Ht),Wt=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)},$t=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);for(var s=void 0,o=r.length-1;o>=0;o--)if(r[o].selected){Wt(r,r[o]);break}if(x){for(var l in s=a.createElement("custom"),Ht.prototype)"constructor"!==l&&(s[l]=Ht.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=N(this,e.call(this,r,s)),s=i,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n=s,N(i,n)}return M(t,e),t.prototype.addTrack=function(t){var i=this;t.selected&&Wt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",(function(){i.changing_||(i.changing_=!0,Wt(i,t),i.changing_=!1,i.trigger("change"))}))},t}(Ht),Xt=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);var s=void 0;if(x){for(var o in s=a.createElement("custom"),Ht.prototype)"constructor"!==o&&(s[o]=Ht.prototype[o]);for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l])}return i=N(this,e.call(this,r,s)),s=i,n=s,N(i,n)}return M(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",tt(this,(function(){this.trigger("change")})));var i=["metadata","chapters"];-1===i.indexOf(t.kind)&&t.addEventListener("modechange",tt(this,(function(){this.trigger("selectedlanguagechange")})))},t}(Ht),Yt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,e);var i=this;if(x)for(var n in i=a.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);i.trackElements_=[],Object.defineProperty(i,"length",{get:function(){return this.trackElements_.length}});for(var r=0,s=t.length;r<s;r++)i.addTrackElement_(t[r]);if(x)return i}return e.prototype.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},e.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},e.prototype.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}(),Kt=function(){function e(t){R(this,e);var i=this;if(x)for(var n in i=a.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);if(e.prototype.setCues_.call(i,t),Object.defineProperty(i,"length",{get:function(){return this.length_}}),x)return i}return e.prototype.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)},e.prototype.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),Qt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Jt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Zt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ei={disabled:"disabled",hidden:"hidden",showing:"showing"},ti=function(e){function t(){var i,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var r=N(this,e.call(this)),s=r;if(x)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l={id:n.id||"vjs_track_"+Pe(),kind:n.kind||"",label:n.label||"",language:n.language||""},u=function(e){Object.defineProperty(s,e,{get:function(){return l[e]},set:function(){}})};for(var c in l)u(c);return i=s,N(r,i)}return M(t,e),t}(rt),ii=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=a.createElement("a");i.href=e;var n=""===i.host&&"file:"!==i.protocol,s=void 0;n&&(s=a.createElement("div"),s.innerHTML='<a href="'+e+'"></a>',i=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(s));for(var o={},l=0;l<t.length;l++)o[t[l]]=i[t[l]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=r.location.protocol),n&&a.body.removeChild(s),o},ni=function(e){if(!e.match(/^https?:\/\//)){var t=a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},ri=function(e){if("string"===typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ai=function(e){var t=r.location,i=ii(e),n=":"===i.protocol?t.protocol:i.protocol,a=n+i.host!==t.protocol+t.host;return a},si=(Object.freeze||Object)({parseUrl:ii,getAbsoluteURL:ni,getFileExtension:ri,isCrossOrigin:ai}),oi=function(e,t){var i=new r.WebVTT.Parser(r,r.vttjs,r.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(r.console&&r.console.groupCollapsed&&r.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach((function(e){return Y.error(e)})),r.console&&r.console.groupEnd&&r.console.groupEnd()),i.flush()},li=function(e,t){var i={uri:e},n=ai(e);n&&(i.cors=n),l(i,tt(this,(function(e,i,n){if(e)return Y.error(e,i);if(t.loaded_=!0,"function"!==typeof r.WebVTT){if(t.tech_){var a=function(){return oi(n,t)};t.tech_.on("vttjsloaded",a),t.tech_.on("vttjserror",(function(){Y.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",a)}))}}else oi(n,t)})))},ui=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(R(this,t),!r.tech)throw new Error("A tech was not provided.");var a=yt(r,{kind:Zt[r.kind]||"subtitles",language:r.language||r.srclang||""}),s=ei[a.mode]||"disabled",o=a["default"];"metadata"!==a.kind&&"chapters"!==a.kind||(s="hidden");var l=(i=N(this,e.call(this,a)),i);if(l.tech_=a.tech,x)for(var u in t.prototype)"constructor"!==u&&(l[u]=t.prototype[u]);l.cues_=[],l.activeCues_=[];var c=new Kt(l.cues_),h=new Kt(l.activeCues_),d=!1,p=tt(l,(function(){this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",p)}),!0),Object.defineProperty(l,"default",{get:function(){return o},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(e){var t=this;ei[e]&&(s=e,"disabled"!==s?this.tech_.ready((function(){t.tech_.on("timeupdate",p)}),!0):this.tech_.off("timeupdate",p),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?c:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(d=!1,t.length!==this.activeCues_.length)d=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(d=!0);return this.activeCues_=t,h.setCues_(this.activeCues_),h},set:function(){}}),a.src?(l.src=a.src,li(a.src,l)):l.loaded_=!0,n=l,N(i,n)}return M(t,e),t.prototype.addCue=function(e){var t=e;if(r.vttjs&&!(e instanceof r.vttjs.VTTCue)){for(var i in t=new r.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),a=0;a<n.length;a++)n[a]!==this&&n[a].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(e){var t=this.cues_.length;while(t--){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(ti);ui.prototype.allowedEvents_={cuechange:"cuechange"};var ci=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var a=yt(r,{kind:Jt[r.kind]||""}),s=(i=N(this,e.call(this,a)),i),o=!1;if(x)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),a.enabled&&(s.enabled=a.enabled),s.loaded_=!0,n=s,N(i,n)}return M(t,e),t}(ti),hi=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var a=yt(r,{kind:Qt[r.kind]||""}),s=(i=N(this,e.call(this,a)),i),o=!1;if(x)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),a.selected&&(s.selected=a.selected),n=s,N(i,n)}return M(t,e),t}(ti),di=0,pi=1,fi=2,vi=3,mi=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var n=N(this,e.call(this)),r=void 0,s=n;if(x)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l,u=new ui(i);return s.kind=u.kind,s.src=u.src,s.srclang=u.language,s.label=u.label,s["default"]=u["default"],Object.defineProperty(s,"readyState",{get:function(){return r}}),Object.defineProperty(s,"track",{get:function(){return u}}),r=di,u.addEventListener("loadeddata",(function(){r=fi,s.trigger({type:"load",target:s})})),x?(l=s,N(n,l)):n}return M(t,e),t}(rt);mi.prototype.allowedEvents_={load:"load"},mi.NONE=di,mi.LOADING=pi,mi.LOADED=fi,mi.ERROR=vi;var gi={audio:{ListClass:Gt,TrackClass:ci,capitalName:"Audio"},video:{ListClass:$t,TrackClass:hi,capitalName:"Video"},text:{ListClass:Xt,TrackClass:ui,capitalName:"Text"}};Object.keys(gi).forEach((function(e){gi[e].getterName=e+"Tracks",gi[e].privateName=e+"Tracks_"}));var yi={remoteText:{ListClass:Xt,TrackClass:ui,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Yt,TrackClass:mi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},bi=yt(gi,yi);function _i(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var s=new bi.text.TrackClass(r);return a.addTrack(s),s}yi.names=Object.keys(yi),gi.names=Object.keys(gi),bi.names=[].concat(yi.names).concat(gi.names);var Ti=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};R(this,t),i.reportTouchActivity=!1;var r=N(this,e.call(this,null,i,n));return r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),bi.names.forEach((function(e){var t=bi[e];i&&i[t.getterName]&&(r[t.privateName]=i[t.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===i["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===i.nativeCaptions||!1===i.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new bi.text.ListClass,r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return M(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(tt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return wt(0,0)},t.prototype.bufferedPercent=function(){return Et(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(gi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach((function(e){var i=t[e+"Tracks"]()||[],n=i.length;while(n--){var r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}}))},t.prototype.cleanupAutoTextTracks=function(){var e=this.autoRemoteTextTracks_||[],t=e.length;while(t--){var i=e[t];this.removeRemoteTextTrack(i)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new jt(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?wt(0,0):wt()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;gi.names.forEach((function(t){var i=gi[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",(function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!r.WebVTT)if(a.body.contains(this.el())){if(!this.options_["vtt.js"]&&G(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),r.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var i=t[e];i.removeEventListener("cuechange",a),"showing"===i.mode&&i.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",r),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++){var o=t[e];o.removeEventListener("cuechange",a)}}))},t.prototype.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return _i(this,e,t,i)},t.prototype.createRemoteTextTrack=function(e){var t=yt(e,{tech:this});return new yi.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],n=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Y.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==i&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(n.track)})),n},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=mt(e),t.techs_[e]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return e=mt(e),t.techs_&&t.techs_[e]?t.techs_[e]:r&&r.videojs&&r.videojs[e]?(Y.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r.videojs[e]):void 0},t}(bt);bi.names.forEach((function(e){var t=bi[e];Ti.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Ti.prototype.featuresVolumeControl=!0,Ti.prototype.featuresMuteControl=!0,Ti.prototype.featuresFullscreenResize=!1,Ti.prototype.featuresPlaybackRate=!1,Ti.prototype.featuresProgressEvents=!1,Ti.prototype.featuresSourceset=!1,Ti.prototype.featuresTimeupdateEvents=!1,Ti.prototype.featuresNativeTextTracks=!1,Ti.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var i=e.sourceHandlers||[],n=void 0,r=0;r<i.length;r++)if(n=i[r].canPlayType(t),n)return n;return""},e.selectSourceHandler=function(t,i){for(var n=e.sourceHandlers||[],r=void 0,a=0;a<n.length;a++)if(r=n[a].canHandleSource(t,i),r)return n[a];return null},e.canPlaySource=function(t,i){var n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""};var t=["seekable","seeking","duration"];t.forEach((function(e){var t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:Y.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},bt.registerComponent("Tech",Ti),Ti.registerTech("Tech",Ti),Ti.defaultTechOrder_=[];var Si={},wi={},Ei={};function ki(e,t){Si[e]=Si[e]||[],Si[e].push(t)}function Ci(e,t,i){e.setTimeout((function(){return Bi(t,Si[t.type],i,e)}),1)}function xi(e,t){e.forEach((function(e){return e.setTech&&e.setTech(t)}))}function Ai(e,t,i){return e.reduceRight(Di(i),t[i]())}function Ii(e,t,i,n){return t[i](e.reduce(Di(i),n))}function Oi(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r="call"+mt(i),a=e.reduce(Di(r),n),s=a===Ei,o=s?null:t[i](a);return Ri(e,i,o,s),o}var ji={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Li={setCurrentTime:1},Pi={play:1,pause:1};function Di(e){return function(t,i){return t===Ei?Ei:i[e]?i[e](t):t}}function Ri(e,t,i,n){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](n,i)}}function Mi(e){wi[e.id()]=null}function Ni(e,t){var i=wi[e.id()],n=null;if(void 0===i||null===i)return n=t(e),wi[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var a=i[r],s=a[0],o=a[1];s===t&&(n=o)}return null===n&&(n=t(e),i.push([t,n])),n}function Bi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments[2],n=arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=t[0],o=t.slice(1);if("string"===typeof s)Bi(e,Si[s],i,n,r,a);else if(s){var l=Ni(n,s);if(!l.setSource)return r.push(l),Bi(e,o,i,n,r,a);l.setSource(q({},e),(function(t,s){if(t)return Bi(e,o,i,n,r,a);r.push(l),Bi(s,e.type===s.type?o:Si[s.type],i,n,r,a)}))}else o.length?Bi(e,o,i,n,r,a):a?i(e,r):Bi(e,Si["*"],i,n,r,!0)}var Ui={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Fi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=ri(e),i=Ui[t.toLowerCase()];return i||""},Vi=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter((function(e){return e.src===t}));if(i.length)return i[0].type;for(var n=e.$$("source"),r=0;r<n.length;r++){var a=n[r];if(a.type&&a.src&&a.src===t)return a.type}return Fi(t)},Hi=function e(t){if(Array.isArray(t)){var i=[];t.forEach((function(t){t=e(t),Array.isArray(t)?i=i.concat(t):z(t)&&i.push(t)})),t=i}else t="string"===typeof t&&t.trim()?[qi({src:t})]:z(t)&&"string"===typeof t.src&&t.src&&t.src.trim()?[qi(t)]:[];return t};function qi(e){var t=Fi(e.src);return!e.type&&t&&(e.type=t),e}var zi=function(e){function t(i,n,r){R(this,t);var a=yt({createEl:!1},n),s=N(this,e.call(this,i,a,r));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)i.src(n.playerOptions.sources);else for(var o=0,l=n.playerOptions.techOrder;o<l.length;o++){var u=mt(l[o]),c=Ti.getTech(u);if(u||(c=bt.getComponent(u)),c&&c.isSupported()){i.loadTech_(u);break}}return s}return M(t,e),t}(bt);bt.registerComponent("MediaLoader",zi);var Gi=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.emitTapEvents(),r.enable(),r}return M(t,e),t.prototype.createEl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=q({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&Y.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=q({role:"button"},n),this.tabIndex_=i.tabIndex;var r=e.prototype.createEl.call(this,t,i,n);return this.createControlTextEl(r),r},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=se("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,oe(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){ze(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){Ge(a,"keydown",tt(this,this.handleKeyPress))},t}(bt);bt.registerComponent("ClickableComponent",Gi);var Wi=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.update(),i.on("posterchange",tt(r,r.update)),r}return M(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=se("div",{className:"vjs-poster",tabIndex:-1});return L||(this.fallbackImg_=se("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?Dt(this.player_.play()):this.player_.pause())},t}(Gi);bt.registerComponent("PosterImage",Wi);var $i="#222",Xi="#ccc",Yi={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Ki(e,t){var i=void 0;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Qi(e,t,i){try{e.style[t]=i}catch(n){return}}var Ji=function(e){function t(i,n,a){R(this,t);var s=N(this,e.call(this,i,n,a)),o=tt(s,s.updateDisplay);return i.on("loadstart",tt(s,s.toggleDisplay)),i.on("texttrackchange",o),i.on("loadstart",tt(s,s.preselectTrack)),i.ready(tt(s,(function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",o),i.on("playerresize",o),r.addEventListener&&r.addEventListener("orientationchange",o),i.on("dispose",(function(){return r.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}}))),s}return M(t,e),t.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage,n=void 0,r=void 0,a=void 0,s=0;s<t.length;s++){var o=t[s];i&&i.enabled&&i.language===o.language?o.kind===i.kind?a=o:a||(a=o):i&&!i.enabled?(a=null,n=null,r=null):o["default"]&&("descriptions"!==o.kind||n?o.kind in e&&!r&&(r=o):n=o)}a?a.mode="showing":r?r.mode="showing":n&&(n.mode="showing")},t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"===typeof r.WebVTT&&r.WebVTT.processCues(r,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();var t=null,i=null,n=e.length;while(n--){var r=e[n];"showing"===r.mode&&("descriptions"===r.kind?t=r:i=r)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},t.prototype.updateForTrack=function(e){if("function"===typeof r.WebVTT&&e.activeCues){for(var t=[],i=0;i<e.activeCues.length;i++)t.push(e.activeCues[i]);if(r.WebVTT.processCues(r,t,this.el_),this.player_.textTrackSettings){var n=this.player_.textTrackSettings.getValues(),a=t.length;while(a--){var s=t[a];if(s){var o=s.displayState;if(n.color&&(o.firstChild.style.color=n.color),n.textOpacity&&Qi(o.firstChild,"color",Ki(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(o.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Qi(o.firstChild,"backgroundColor",Ki(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Qi(o,"backgroundColor",Ki(n.windowColor,n.windowOpacity)):o.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px "+$i+", 2px 2px 4px "+$i+", 2px 2px 5px "+$i:"raised"===n.edgeStyle?o.firstChild.style.textShadow="1px 1px "+$i+", 2px 2px "+$i+", 3px 3px "+$i:"depressed"===n.edgeStyle?o.firstChild.style.textShadow="1px 1px "+Xi+", 0 1px "+Xi+", -1px -1px "+$i+", 0 -1px "+$i:"uniform"===n.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px "+$i+", 0 0 4px "+$i+", 0 0 4px "+$i+", 0 0 4px "+$i)),n.fontPercent&&1!==n.fontPercent){var l=r.parseFloat(o.style.fontSize);o.style.fontSize=l*n.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Yi[n.fontFamily])}}}}},t}(bt);bt.registerComponent("TextTrackDisplay",Ji);var Zi=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),i=this.localize(t?"Audio Player":"Video Player"),n=se("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},t}(bt);bt.registerComponent("LoadingSpinner",Zi);var en=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=q({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),i=q({type:"button"},i);var n=bt.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return Y.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),bt.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(Gi);bt.registerComponent("Button",en);var tn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)Dt(t);else{var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var r=function(){return n.focus()};Pt(t)?t.then(r,(function(){})):this.setTimeout(r,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(en);tn.prototype.controlText_="Play Video",bt.registerComponent("BigPlayButton",tn);var nn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.controlText(n&&n.controlText||r.localize("Close")),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(en);bt.registerComponent("CloseButton",nn);var rn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"play",r.handlePlay),r.on(i,"pause",r.handlePause),r.on(i,"ended",r.handleEnded),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(en);rn.prototype.controlText_="Play",bt.registerComponent("PlayToggle",rn);var an=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),r=r>0||s>0?r+":":"",n=((r||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,r+n+i},sn=an;function on(e){sn=e}function ln(){sn=an}var un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return sn(e,t)},cn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.throttledUpdateContent=it(tt(r,r.updateContent),25),r.on(i,"timeupdate",r.throttledUpdateContent),r}return M(t,e),t.prototype.createEl=function(t){var i=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=se("span",{className:i+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return un(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(bt);cn.prototype.labelText_="Time",cn.prototype.controlText_="Time",bt.registerComponent("TimeDisplay",cn);var hn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"ended",r.handleEnded),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(cn);hn.prototype.labelText_="Current Time",hn.prototype.controlText_="Current Time",bt.registerComponent("CurrentTimeDisplay",hn);var dn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"durationchange",r.updateContent),r.on(i,"loadedmetadata",r.throttledUpdateContent),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(cn);dn.prototype.labelText_="Duration",dn.prototype.controlText_="Duration",bt.registerComponent("DurationDisplay",dn);var pn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(bt);bt.registerComponent("TimeDivider",pn);var fn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"durationchange",r.throttledUpdateContent),r.on(i,"ended",r.handleEnded),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(cn);fn.prototype.labelText_="Remaining Time",fn.prototype.controlText_="Remaining Time",bt.registerComponent("RemainingTimeDisplay",fn);var vn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}return M(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=se("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(bt);bt.registerComponent("LiveDisplay",vn);var mn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}return M(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.className=i.className+" vjs-slider",i=q({tabIndex:0},i),n=q({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||k||e.preventDefault(),ye(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;be(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!==typeof e||e!==e||e<0||e===1/0)&&(e=0);var i=(100*e).toFixed(2)+"%",n=t.el().style;return this.vertical()?n.height=i:n.width=i,e}}},t.prototype.calculateDistance=function(e){var t=Se(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(bt);bt.registerComponent("Slider",mn);var gn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.partEls_=[],r.on(i,"progress",r.update),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),i=this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,a=function(e,t){var i=e/t||0;return 100*(i>=1?1:i)+"%"};this.el_.style.width=a(n,i);for(var s=0;s<t.length;s++){var o=t.start(s),l=t.end(s),u=r[s];u||(u=this.el_.appendChild(se()),r[s]=u),u.style.left=a(o,n),u.style.width=a(l-o,n)}for(var c=r.length;c>t.length;c--)this.el_.removeChild(r[c-1]);r.length=t.length},t}(bt);bt.registerComponent("LoadProgressBar",gn);var yn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,i){var n=_e(this.el_),r=_e(this.player_.el()),a=e.width*t;if(r&&n){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),l=n.width/2;s<l?l+=l-s:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),this.el_.style.right="-"+l+"px",oe(this.el_,i)}},t}(bt);bt.registerComponent("TimeTooltip",yn);var bn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),r=un(n,i.player_.duration()),a=i.getChild("timeTooltip");a&&a.update(e,t,r)}))},t}(bt);bn.prototype.options_={children:[]},A&&!(A>8)||g||b||bn.prototype.options_.children.push("timeTooltip"),bt.registerComponent("PlayProgressBar",bn);var _n=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.update=it(tt(r,r.update),25),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.duration(),r=un(t*n,n);i.el_.style.left=e.width*t+"px",i.getChild("timeTooltip").update(e,t,r)}))},t}(bt);_n.prototype.options_={children:["timeTooltip"]},bt.registerComponent("MouseTimeDisplay",_n);var Tn=5,Sn=30,wn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.setEventHandlers_(),r}return M(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=it(tt(this,this.update),Sn),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),Sn)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[un(e,i),un(i,i)],"{1} of {2}")),this.bar.update(_e(this.el_),t)},t.prototype.update=function(t){var i=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),i),i},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Ae(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Ae(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Dt(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+Tn)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-Tn)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(mn);wn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},A&&!(A>8)||g||b||wn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),wn.prototype.playerEvent="timeupdate",bt.registerComponent("SeekBar",wn);var En=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.handleMouseMove=it(tt(r,r.handleMouseMove),25),r.throttledHandleMouseSeek=it(tt(r,r.handleMouseSeek),25),r.enable(),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("mouseTimeDisplay"),n=t.el(),r=_e(n),a=Se(n,e).x;a>1?a=1:a<0&&(a=0),i&&i.update(r,a)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(bt);En.prototype.options_={children:["seekBar"]},bt.registerComponent("ProgressControl",En);var kn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"fullscreenchange",r.handleFullscreenChange),!1===a[kt.fullscreenEnabled]&&r.disable(),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(en);kn.prototype.controlText_="Fullscreen",bt.registerComponent("FullscreenToggle",kn);var Cn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},xn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(bt);bt.registerComponent("VolumeLevel",xn);var An=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on("slideractive",r.updateLastVolume_),r.on(i,"volumechange",r.updateARIAAttributes),i.ready((function(){return r.updateARIAAttributes()})),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Ae(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Ae(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(mn);An.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},An.prototype.playerEvent="volumechange",bt.registerComponent("VolumeBar",An);var In=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t),n.vertical=n.vertical||!1,("undefined"===typeof n.volumeBar||G(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var r=N(this,e.call(this,i,n));return Cn(r,i),r.throttledHandleMouseMove=it(tt(r,r.handleMouseMove),25),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}return M(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(bt);In.prototype.options_={children:["volumeBar"]},bt.registerComponent("VolumeControl",In);var On=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},jn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return On(r,i),r.on(i,["loadstart","volumechange"],r.update),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;g&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)he(this.el_,"vjs-vol-"+i);ce(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(en);jn.prototype.controlText_="Mute",bt.registerComponent("MuteToggle",jn);var Ln=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t),"undefined"!==typeof n.inline?n.inline=n.inline:n.inline=!0,("undefined"===typeof n.volumeControl||G(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var r=N(this,e.call(this,i,n));return r.on(i,["loadstart"],r.volumePanelState_),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}return M(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(bt);Ln.prototype.options_={children:["muteToggle","volumeControl"]},bt.registerComponent("VolumePanel",Ln);var Pn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyPress),r}return M(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",tt(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=se(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),ze(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),i=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(bt);bt.registerComponent("Menu",Pn);var Dn=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t);var r=N(this,e.call(this,i,n));r.menuButton_=new en(i,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var a=en.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+a,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"focus",r.handleFocus),r.on(r.menuButton_,"blur",r.handleBlur),r.on("keydown",r.handleSubmenuKeyPress),r}return M(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new Pn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=se("li",{className:"vjs-menu-title",innerHTML:mt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),le(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";!0===this.options_.inline?t+="-inline":t+="-popup";var i=en.prototype.buildCSSClass();return"vjs-menu-button "+t+" "+i+" "+e.prototype.buildCSSClass.call(this)},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",tt(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){ze(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleBlur=function(){Ge(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),g&&re())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(bt);bt.registerComponent("MenuButton",Dn);var Rn=function(e){function t(i,n){R(this,t);var r=n.tracks,a=N(this,e.call(this,i,n));if(a.items.length<=1&&a.hide(),!r)return N(a);var s=tt(a,a.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),a.player_.on("ready",s),a.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s)})),a}return M(t,e),t}(Dn);bt.registerComponent("TrackButton",Rn);var Mn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}return M(t,e),t.prototype.createEl=function(t,i,n){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",q({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Gi);bt.registerComponent("MenuItem",Mn);var Nn=function(e){function t(i,n){R(this,t);var s=n.track,o=i.textTracks();n.label=s.label||s.language||"Unknown",n.selected="showing"===s.mode;var l=N(this,e.call(this,i,n));l.track=s;var u=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];l.handleTracksChange.apply(l,t)},c=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];l.handleSelectedLanguageChange.apply(l,t)};if(i.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",c),l.on("dispose",(function(){i.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange){var h=void 0;l.on(["tap","click"],(function(){if("object"!==D(r.Event))try{h=new r.Event("change")}catch(e){}h||(h=a.createEvent("Event"),h.initEvent("change",!0,!0)),o.dispatchEvent(h)}))}return l.handleTracksChange(),l}return M(t,e),t.prototype.handleClick=function(t){var i=this.track.kind,n=this.track.kinds,r=this.player_.textTracks();if(n||(n=[i]),e.prototype.handleClick.call(this,t),r)for(var a=0;a<r.length;a++){var s=r[a];s===this.track&&n.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Mn);bt.registerComponent("TextTrackMenuItem",Nn);var Bn=function(e){function t(i,n){return R(this,t),n.track={player:i,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,N(this,e.call(this,i,n))}return M(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Nn);bt.registerComponent("OffTextTrackMenuItem",Bn);var Un=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(this,t),n.tracks=i.textTracks(),N(this,e.call(this,i,n))}return M(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nn,i=void 0;this.label_&&(i=this.label_+" off"),e.push(new Bn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var a=n[r];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Rn);bt.registerComponent("TextTrackButton",Un);var Fn=function(e){function t(i,n){R(this,t);var r=n.track,a=n.cue,s=i.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime;var o=N(this,e.call(this,i,n));return o.track=r,o.cue=a,r.addEventListener("cuechange",tt(o,o.update)),o}return M(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},t}(Mn);bt.registerComponent("ChaptersTrackMenuItem",Fn);var Vn=function(e){function t(i,n,r){return R(this,t),N(this,e.call(this,i,n,r))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(mt(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],a=new Fn(this.player_,{track:this.track_,cue:r});e.push(a)}return e},t}(Un);Vn.prototype.kind_="chapters",Vn.prototype.controlText_="Chapters",bt.registerComponent("ChaptersButton",Vn);var Hn=function(e){function t(i,n,r){R(this,t);var a=N(this,e.call(this,i,n,r)),s=i.textTracks(),o=tt(a,a.handleTracksChange);return s.addEventListener("change",o),a.on("dispose",(function(){s.removeEventListener("change",o)})),a}return M(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var a=t[n];if(a.kind!==this.kind_&&"showing"===a.mode){i=!0;break}}i?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Un);Hn.prototype.kind_="descriptions",Hn.prototype.controlText_="Descriptions",bt.registerComponent("DescriptionsButton",Hn);var qn=function(e){function t(i,n,r){return R(this,t),N(this,e.call(this,i,n,r))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Un);qn.prototype.kind_="subtitles",qn.prototype.controlText_="Subtitles",bt.registerComponent("SubtitlesButton",qn);var zn=function(e){function t(i,n){R(this,t),n.track={player:i,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem";var r=N(this,e.call(this,i,n));return r.addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return M(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Nn);bt.registerComponent("CaptionSettingsMenuItem",zn);var Gn=function(e){function t(i,n,r){return R(this,t),N(this,e.call(this,i,n,r))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new zn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Un);Gn.prototype.kind_="captions",Gn.prototype.controlText_="Captions",bt.registerComponent("CaptionsButton",Gn);var Wn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(t,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),r+="</span>";var a=e.prototype.createEl.call(this,t,q({innerHTML:r},i),n);return a},t}(Nn);bt.registerComponent("SubsCapsMenuItem",Wn);var $n=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t);var r=N(this,e.call(this,i,n));return r.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(mt(r.label_)),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new zn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Wn),t},t}(Un);$n.prototype.kinds_=["captions","subtitles"],$n.prototype.controlText_="Subtitles",bt.registerComponent("SubsCapsButton",$n);var Xn=function(e){function t(i,n){R(this,t);var r=n.track,a=i.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled;var s=N(this,e.call(this,i,n));s.track=r,s.addClass("vjs-"+r.kind+"-menu-item");var o=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.handleTracksChange.apply(s,t)};return a.addEventListener("change",o),s.on("dispose",(function(){a.removeEventListener("change",o)})),s}return M(t,e),t.prototype.createEl=function(t,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);"main-desc"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),r+="</span>";var a=e.prototype.createEl.call(this,t,q({innerHTML:r},i),n);return a},t.prototype.handleClick=function(t){var i=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var n=0;n<i.length;n++){var r=i[n];r.enabled=r===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Mn);bt.registerComponent("AudioTrackMenuItem",Xn);var Yn=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(this,t),n.tracks=i.audioTracks(),N(this,e.call(this,i,n))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new Xn(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},t}(Rn);Yn.prototype.controlText_="Audio Track",bt.registerComponent("AudioTrackButton",Yn);var Kn=function(e){function t(i,n){R(this,t);var r=n.rate,a=parseFloat(r,10);n.label=r,n.selected=1===a,n.selectable=!0,n.multiSelectable=!1;var s=N(this,e.call(this,i,n));return s.label=r,s.rate=a,s.on(i,"ratechange",s.update),s}return M(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Mn);Kn.prototype.contentElType="button",bt.registerComponent("PlaybackRateMenuItem",Kn);var Qn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.updateVisibility(),r.updateLabel(),r.on(i,"loadstart",r.updateVisibility),r.on(i,"ratechange",r.updateLabel),r}return M(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=se("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.prototype.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createMenu=function(){var e=new Pn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;i>=0;i--)e.addChild(new Kn(this.player(),{rate:t[i]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>t){n=i[r];break}this.player().playbackRate(n)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Dn);Qn.prototype.controlText_="Playback Rate",bt.registerComponent("PlaybackRateMenuButton",Qn);var Jn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(bt);bt.registerComponent("Spacer",Jn);var Zn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Jn);bt.registerComponent("CustomControlSpacer",Zn);var er=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(bt);er.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},bt.registerComponent("ControlBar",er);var tr=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"error",r.open),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Vt);tr.prototype.options_=yt(Vt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),bt.registerComponent("ErrorDisplay",tr);var ir="vjs-text-track-settings",nr=["#000","Black"],rr=["#00F","Blue"],ar=["#0FF","Cyan"],sr=["#0F0","Green"],or=["#F0F","Magenta"],lr=["#F00","Red"],ur=["#FFF","White"],cr=["#FF0","Yellow"],hr=["1","Opaque"],dr=["0.5","Semi-Transparent"],pr=["0","Transparent"],fr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[nr,ur,lr,sr,rr,cr,or,ar]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[hr,dr,pr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ur,nr,lr,sr,rr,cr,or,ar]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[hr,dr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[pr,dr,hr]}};function vr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function mr(e,t){var i=e.options[e.options.selectedIndex].value;return vr(i,t)}function gr(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(vr(e.options[n].value,i)===t){e.selectedIndex=n;break}}fr.windowColor.options=fr.backgroundColor.options;var yr=function(e){function t(i,n){R(this,t),n.temporary=!1;var r=N(this,e.call(this,i,n));return r.updateDisplay=tt(r,r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=se("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),V(fr,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}return M(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",r=fr[e],a=r.id.replace("%s",this.id_),s=[i,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map((function(e){var i=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+i+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+i+'">',t.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElColors_=function(){return se("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return se("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return se("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return H(fr,(function(t,i,n){var r=mr(e.$(i.selector),i.parser);return void 0!==r&&(t[n]=r),t}),{})},t.prototype.setValues=function(e){var t=this;V(fr,(function(i,n){gr(t.$(i.selector),e[n],i.parser)}))},t.prototype.setDefaults=function(){var e=this;V(fr,(function(t){var i=t.hasOwnProperty("default")?t["default"]:0;e.$(t.selector).selectedIndex=i}))},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(r.localStorage.getItem(ir))}catch(t){Y.warn(t)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?r.localStorage.setItem(ir,JSON.stringify(e)):r.localStorage.removeItem(ir)}catch(t){Y.warn(t)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(a,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},t}(Vt);bt.registerComponent("TextTrackSettings",yr);var br=function(e){function t(i,n){R(this,t);var a=n.ResizeObserver||r.ResizeObserver;null===n.ResizeObserver&&(a=!1);var s=yt({createEl:!a},n),o=N(this,e.call(this,i,s));return o.ResizeObserver=n.ResizeObserver||r.ResizeObserver,o.loadListener_=null,o.resizeObserver_=null,o.debouncedHandler_=nt((function(){o.resizeHandler()}),100,!1,o),a?(o.resizeObserver_=new o.ResizeObserver(o.debouncedHandler_),o.resizeObserver_.observe(i.el())):(o.loadListener_=function(){o.el_&&o.el_.contentWindow&&ze(o.el_.contentWindow,"resize",o.debouncedHandler_)},o.one("load",o.loadListener_)),o}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},t.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&Ge(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},t}(bt);bt.registerComponent("ResizeManager",br);var _r=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var i=e.$$("source"),n=[],r="";if(!i.length)return!1;for(var a=0;a<i.length;a++){var s=i[a].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},Tr={};x||(Tr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;var i=a.createDocumentFragment();while(t.childNodes.length)i.appendChild(t.childNodes[0]);return this.innerText="",r.Element.prototype.appendChild.call(this,i),this.innerHTML}}));var Sr=function(e,t){for(var i={},n=0;n<e.length;n++)if(i=Object.getOwnPropertyDescriptor(e[n],t),i&&i.set&&i.get)break;return i.enumerable=!0,i.configurable=!0,i},wr=function(e){return Sr([e.el(),r.HTMLMediaElement.prototype,r.Element.prototype,Tr],"innerHTML")},Er=function(e){var t=e.el();if(!t.resetSourceWatch_){var i={},n=wr(e),r=function(i){return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=i.apply(t,r);return _r(e),s}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(i[e]=t[e],t[e]=r(i[e]))})),Object.defineProperty(t,"innerHTML",yt(n,{set:r(n.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(i).forEach((function(e){t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)}},kr={};x||(kr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?ni(r.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return r.Element.prototype.setAttribute.call(this,"src",e),e}}));var Cr=function(e){return Sr([e.el(),r.HTMLMediaElement.prototype,kr],"src")},xr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var i=Cr(e),n=t.setAttribute,r=t.load;Object.defineProperty(t,"src",yt(i,{set:function(n){var r=i.set.call(t,n);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(i,r){var a=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),a},t.load=function(){var i=r.call(t);return _r(e)||(e.triggerSourceset(""),Er(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):_r(e)||Er(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=r,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Ar=B(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),Ir=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n)),a=i.source,o=!1;if(a&&(r.el_.currentSrc!==a.src||i.tag&&3===i.tag.initNetworkState_)?r.setSource(a):r.handleLateInit_(r.el_),i.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){var l=r.el_.childNodes,u=l.length,c=[];while(u--){var h=l[u],d=h.nodeName.toLowerCase();"track"===d&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(h),r.remoteTextTracks().addTrack(h.track),r.textTracks().addTrack(h.track),o||r.el_.hasAttribute("crossorigin")||!ai(h.src)||(o=!0)):c.push(h))}for(var p=0;p<c.length;p++)r.el_.removeChild(c[p])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Y.warn(s(Ar)),r.restoreMetadataTracksInIOSNativePlayer_(),(j||v||S)&&!0===i.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}return M(t,e),t.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},t.prototype.setupSourcesetHandling_=function(){xr(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,i=function(){t=[];for(var i=0;i<e.length;i++){var n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",(function(){return e.removeEventListener("change",i)}));var n=function i(){for(var n=0;n<t.length;n++){var r=t[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))},t.prototype.proxyNativeTracks_=function(){var e=this;gi.names.forEach((function(t){var i=gi[t],n=e.el()[i.getterName],r=e[i.getterName]();if(e["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){var a={change:function(e){r.trigger({type:"change",target:r,currentTarget:r,srcElement:r})},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<r.length;t++){for(var i=!1,a=0;a<n.length;a++)if(n[a]===r[t]){i=!0;break}i||e.push(r[t])}while(e.length)r.removeTrack(e.shift())};Object.keys(a).forEach((function(t){var i=a[t];n.addEventListener(t,i),e.on("dispose",(function(e){return n.removeEventListener(t,i)}))})),e.on("loadstart",s),e.on("dispose",(function(t){return e.off("loadstart",s)}))}}))},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=a.createElement("video");var n=this.options_.tag&&fe(this.options_.tag),r=yt({},n);j&&!0===this.options_.nativeControlsForTouch||delete r.controls,pe(e,q(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&me(e,"preload",this.options_.preload);for(var s=["loop","muted","playsinline","autoplay"],o=0;o<s.length;o++){var l=s[o],u=this.options_[l];"undefined"!==typeof u&&(u?me(e,l,l):ge(e,l),e[l]=u)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(t){Y(t,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&b&&k&&0===this.el_.currentTime){var t=function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"===typeof this.el_.webkitEnterFullScreen){var e=r.navigator&&r.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,i,n):e.prototype.addTextTrack.call(this,t,i,n)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var i=a.createElement("track");return t.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t["default"]&&(i["default"]=t["default"]),t.id&&(i.id=t.id),t.src&&(i.src=t.src),i},t.prototype.addRemoteTextTrack=function(t,i){var n=e.prototype.addRemoteTextTrack.call(this,t,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks){var i=this.$$("track"),n=i.length;while(n--)t!==i[n]&&t!==i[n].track||this.el().removeChild(i[n])}},t.prototype.getVideoPlaybackQuality=function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r.performance&&"function"===typeof r.performance.now?e.creationTime=r.performance.now():r.performance&&r.performance.timing&&"number"===typeof r.performance.timing.navigationStart&&(e.creationTime=r.Date.now()-r.performance.timing.navigationStart),e},t}(Ti);if(ie()){Ir.TEST_VID=a.createElement("video");var Or=a.createElement("track");Or.kind="captions",Or.srclang="en",Or.label="English",Ir.TEST_VID.appendChild(Or)}Ir.isSupported=function(){try{Ir.TEST_VID.volume=.5}catch(e){return!1}return!(!Ir.TEST_VID||!Ir.TEST_VID.canPlayType)},Ir.canPlayType=function(e){return Ir.TEST_VID.canPlayType(e)},Ir.canPlaySource=function(e,t){return Ir.canPlayType(e.type)},Ir.canControlVolume=function(){try{var e=Ir.TEST_VID.volume;return Ir.TEST_VID.volume=e/2+.1,e!==Ir.TEST_VID.volume}catch(t){return!1}},Ir.canMuteVolume=function(){try{var e=Ir.TEST_VID.muted;return Ir.TEST_VID.muted=!e,Ir.TEST_VID.muted?me(Ir.TEST_VID,"muted","muted"):ge(Ir.TEST_VID,"muted","muted"),e!==Ir.TEST_VID.muted}catch(t){return!1}},Ir.canControlPlaybackRate=function(){if(b&&k&&C<58)return!1;try{var e=Ir.TEST_VID.playbackRate;return Ir.TEST_VID.playbackRate=e/2+.1,e!==Ir.TEST_VID.playbackRate}catch(t){return!1}},Ir.canOverrideAttributes=function(){if(x)return!1;try{var e=function(){};Object.defineProperty(a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(t){return!1}return!0},Ir.supportsNativeTextTracks=function(){return O||g&&k},Ir.supportsNativeVideoTracks=function(){return!(!Ir.TEST_VID||!Ir.TEST_VID.videoTracks)},Ir.supportsNativeAudioTracks=function(){return!(!Ir.TEST_VID||!Ir.TEST_VID.audioTracks)},Ir.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Ir.prototype.featuresVolumeControl=Ir.canControlVolume(),Ir.prototype.featuresMuteControl=Ir.canMuteVolume(),Ir.prototype.featuresPlaybackRate=Ir.canControlPlaybackRate(),Ir.prototype.featuresSourceset=Ir.canOverrideAttributes(),Ir.prototype.movingMediaElementInDOM=!g,Ir.prototype.featuresFullscreenResize=!0,Ir.prototype.featuresProgressEvents=!0,Ir.prototype.featuresTimeupdateEvents=!0,Ir.prototype.featuresNativeTextTracks=Ir.supportsNativeTextTracks(),Ir.prototype.featuresNativeVideoTracks=Ir.supportsNativeVideoTracks(),Ir.prototype.featuresNativeAudioTracks=Ir.supportsNativeAudioTracks();var jr=Ir.TEST_VID&&Ir.TEST_VID.constructor.prototype.canPlayType,Lr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Pr=/^video\/mp4/i;Ir.patchCanPlayType=function(){_>=4&&!w&&!k?Ir.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Lr.test(e)?"maybe":jr.call(this,e)}:T&&(Ir.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Pr.test(e)?"maybe":jr.call(this,e)})},Ir.unpatchCanPlayType=function(){var e=Ir.TEST_VID.constructor.prototype.canPlayType;return Ir.TEST_VID.constructor.prototype.canPlayType=jr,e},Ir.patchCanPlayType(),Ir.disposeMediaElement=function(e){if(e){e.parentNode&&e.parentNode.removeChild(e);while(e.hasChildNodes())e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},Ir.resetMediaElement=function(e){if(e){var t=e.querySelectorAll("source"),i=t.length;while(i--)e.removeChild(t[i]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ir.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ir.prototype["set"+mt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){Ir.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){Ir.prototype["set"+mt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ir.prototype[e]=function(){return this.el_[e]()}})),Ti.withSourceHandlers(Ir),Ir.nativeSourceHandler={},Ir.nativeSourceHandler.canPlayType=function(e){try{return Ir.TEST_VID.canPlayType(e)}catch(t){return""}},Ir.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ir.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=ri(e.src);return Ir.nativeSourceHandler.canPlayType("video/"+i)}return""},Ir.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Ir.nativeSourceHandler.dispose=function(){},Ir.registerSourceHandler(Ir.nativeSourceHandler),Ti.registerTech("Html5",Ir);var Dr=B(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),Rr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Mr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Nr=["tiny","xsmall","small","medium","large","xlarge","huge"],Br={};Nr.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Br[e]="vjs-layout-"+t}));var Ur={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Fr=function(e){function t(i,n,r){if(R(this,t),i.id=i.id||n.id||"vjs_video_"+Pe(),n=q(t.getTagSettings(i),n),n.initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"===typeof i.closest){var a=i.closest("[lang]");a&&a.getAttribute&&(n.language=a.getAttribute("lang"))}else{var s=i;while(s&&1===s.nodeType){if(fe(s).hasOwnProperty("lang")){n.language=s.getAttribute("lang");break}s=s.parentNode}}var o=N(this,e.call(this,null,n,r));if(o.log=K(o.id_),o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,!o.options_||!o.options_.techOrder||!o.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(o.tag=i,o.tagAttributes=i&&fe(i),o.language(o.options_.language),n.languages){var l={};Object.getOwnPropertyNames(n.languages).forEach((function(e){l[e.toLowerCase()]=n.languages[e]})),o.languages_=l}else o.languages_=t.prototype.options_.languages;o.cache_={},o.poster_=n.poster||"",o.controls_=!!n.controls,o.cache_.lastVolume=1,i.controls=!1,i.removeAttribute("controls"),i.hasAttribute("autoplay")?o.options_.autoplay=!0:o.autoplay(o.options_.autoplay),o.scrubbing_=!1,o.el_=o.createEl(),o.cache_.lastPlaybackRate=o.defaultPlaybackRate(),pt(o,{eventBusKey:"el_"});var u=yt(o.options_);if(n.plugins){var h=n.plugins;Object.keys(h).forEach((function(e){if("function"!==typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](h[e])}),o)}o.options_.playerOptions=u,o.middleware_=[],o.initChildren(),o.isAudio("audio"===i.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),g||o.addClass("vjs-workinghover"),t.players[o.id_]=o;var d=c.split(".")[0];return o.addClass("vjs-v"+d),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("fullscreenchange",o.handleFullscreenChange_),o.on("stageclick",o.handleStageClick_),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o.changingSrc_=!1,o.playWaitingForReady_=!1,o.playOnLoadstart_=null,o}return M(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Mi(this),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,i=void 0,n=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();n?i=this.el_=t.parentNode:s||(i=this.el_=e.prototype.createEl.call(this,"div"));var o=fe(t);if(s){i=this.el_=t,t=this.tag=a.createElement("video");while(i.children.length)t.appendChild(i.firstChild);ue(i,"video-js")||ce(i,"video-js"),i.appendChild(t),n=this.playerElIngest_=i,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(e){"undefined"!==typeof i[e]&&(t[e]=i[e])}))}if(t.setAttribute("tabindex","-1"),o.tabindex="-1",A&&(t.setAttribute("role","application"),o.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){"class"===e?(i.className+=" "+o[e],s&&(t.className+=" "+o[e])):(i.setAttribute(e,o[e]),s&&t.setAttribute(e,o[e]))})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=i.player=this,this.addClass("vjs-paused"),!0!==r.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Ze("vjs-styles-dimensions");var l=Ie(".vjs-styles-defaults"),u=Ie("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=t.getElementsByTagName("a"),h=0;h<c.length;h++){var d=c.item(h);ce(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!n&&t.parentNode.insertBefore(i,t),le(t,i),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_=i,i},t.prototype.width=function(e){return this.dimension("width",e)},t.prototype.height=function(e){return this.dimension("height",e)},t.prototype.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?Y.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},t.prototype.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,e?(this.addClass("vjs-fluid"),this.fill(!1)):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},t.prototype.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0!==r.VIDEOJS_NO_DYNAMIC_STYLE){var e=void 0,t=void 0,i=void 0,n=void 0;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var a=i.split(":"),s=a[1]/a[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*s,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),et(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*s+"%;\n }\n ")}else{var o="number"===typeof this.width_?this.width_:this.options_.width,l="number"===typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),l>=0&&(u.height=l))}},t.prototype.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=mt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Ti.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var a="string"!==typeof this.autoplay()&&this.autoplay(),s={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};bi.names.forEach((function(e){var t=bi[e];s[t.getterName]=i[t.privateName]})),q(s,this.options_[n]),q(s,this.options_[r]),q(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var o=Ti.getTech(e);if(!o)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new o(s),this.tech_.ready(tt(this,this.handleTechReady_),!0),Bt.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Rr.forEach((function(e){i.on(i.tech_,e,i["handleTech"+mt(e)+"_"])})),Object.keys(Mr).forEach((function(e){i.on(i.tech_,e,(function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Mr[e]+"_"].bind(i),event:t}):i["handleTech"+Mr[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||le(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;bi.names.forEach((function(t){var i=bi[t];e[i.privateName]=e[i.getterName]()})),this.textTracksJson_=Bt.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.prototype.tech=function(e){return void 0===e&&Y.warn(s(Dr)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},t.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){Y("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},t.prototype.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"===typeof e){var i=function(){var e=t.muted();t.muted(!0);var i=t.play();if(i&&i.then&&i["catch"])return i["catch"]((function(i){t.muted(e)}))},n=void 0;if("any"===e?(n=this.play(),n&&n.then&&n["catch"]&&n["catch"]((function(){return i()}))):n="muted"===e?i():this.play(),n&&n.then&&n["catch"])return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})}))["catch"]((function(i){t.trigger({type:"autoplay-failure",autoplay:e})}))}},t.prototype.updateSourceCaches_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,i="";"string"!==typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=Vi(this,t)),this.cache_.source=yt({},e,{src:t,type:i});for(var n=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var l=fe(a[o]);r.push(l),l.src&&l.src===t&&s.push(l.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},t.prototype.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var i=function(e){return t.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=function(){}),i(r),!e.src){var a=function e(i){if("sourceset"!==i.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}t.tech_.off(["sourceset","loadstart"],e)};this.tech_.one(["sourceset","loadstart"],a)}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},t.prototype.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Y.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){Ae(e)&&this.controls_&&(this.paused()?Dt(this.play()):this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready((function(){if(e in Li)return Ii(this.middleware_,this.tech_,e,t);if(e in Pi)return Oi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw Y(i),i}}),!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in ji)return Ai(this.middleware_,this.tech_,e);if(e in Pi)return Oi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Y("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Y("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Y(t),t}}},t.prototype.play=function(){var e=this,t=this.options_.Promise||r.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},t.prototype.play_=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dt;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){e.playWaitingForReady_=!1,t(e.play())}))}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||wt(0,0)},t.prototype.scrubbing=function(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){return"undefined"!==typeof e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=wt(0,0)),e},t.prototype.bufferedPercent=function(){return Et(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return i>t&&(i=t),i},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},t.prototype.requestFullscreen=function(){var e=kt;this.isFullscreen(!0),e.requestFullscreen?(ze(a,e.fullscreenchange,tt(this,(function t(i){this.isFullscreen(a[e.fullscreenElement]),!1===this.isFullscreen()&&Ge(a,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=kt;this.isFullscreen(!1),e.requestFullscreen?a[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=a.documentElement.style.overflow,ze(a,"keydown",tt(this,this.fullWindowOnEscKey)),a.documentElement.style.overflow="hidden",ce(a.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,Ge(a,"keydown",this.fullWindowOnEscKey),a.documentElement.style.overflow=this.docOrigOverflow,he(a.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],a=Ti.getTech(r);if(a||(a=bt.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e),t))return t}else Y.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t=this,i=this.options_.techOrder.map((function(e){return[e,Ti.getTech(e)]})).filter((function(e){var t=e[0],i=e[1];return i?i.isSupported():(Y.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(e,t,i){var n=void 0;return e.some((function(e){return t.some((function(t){if(n=i(e,t),n)return!0}))})),n},r=void 0,a=function(e){return function(t,i){return e(i,t)}},s=function(e,i){var n=e[0],r=e[1];if(r.canPlaySource(i,t.options_[n.toLowerCase()]))return{source:i,tech:n}};return r=this.options_.sourceOrder?n(e,i,a(s)):n(i,e,s),r||!1},t.prototype.src=function(e){var t=this;if("undefined"===typeof e)return this.cache_.src||"";var i=Hi(e);i.length?(this.changingSrc_=!0,this.cache_.sources=i,this.updateSourceCaches_(i[0]),Ci(this,i[0],(function(e,n){t.middleware_=n,t.cache_.sources=i,t.updateSourceCaches_(e);var r=t.src_(e);if(r)return i.length>1?t.src(i.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());xi(n,t.tech_)}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},t.prototype.src_=function(e){var t=this,i=this.selectSource([e]);return!i||(gt(i.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){t.changingSrc_=!1})),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"===typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new jt(e),this.addClass("vjs-error"),Y.error("(CODE:"+this.error_.code+" "+jt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,i=void 0,n=tt(this,this.reportUserActivity),r=function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())},a=function(){n(),this.clearInterval(e),e=this.setInterval(n,250)},s=function(t){n(),this.clearInterval(e)};this.on("mousedown",a),this.on("mousemove",r),this.on("mouseup",s),this.on("keydown",n),this.on("keyup",n);var o=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.prototype.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track,i=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(i)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return yt(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=yt(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];n=yt(n),n.player=void 0,e.tracks[i]=n}return e},t.prototype.createModal=function(e,t){var i=this;t=t||{},t.content=e||"";var n=new Vt(this,t);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open(),n},t.prototype.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Nr.length;i++){var n=Nr[i],r=this.breakpoints_[n];if(t<=r){if(e===n)return;e&&this.removeClass(Br[e]),this.addClass(Br[n]),this.breakpoint_=n;break}}},t.prototype.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},t.prototype.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=q({},Ur,e),this.updateCurrentBreakpoint_()),q(this.breakpoints_)},t.prototype.responsive=function(e){if(void 0===e)return this.responsive_;e=Boolean(e);var t=this.responsive_;return e!==t?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},t.prototype.currentBreakpoint=function(){return this.breakpoint_},t.prototype.currentBreakpointClass=function(){return Br[this.breakpoint_]||""},t.getTagSettings=function(e){var t={sources:[],tracks:[]},i=fe(e),n=i["data-setup"];if(ue(e,"vjs-fill")&&(i.fill=!0),ue(e,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=o(n||"{}"),a=r[0],s=r[1];a&&Y.error(a),q(i,s)}if(q(t,i),e.hasChildNodes())for(var l=e.childNodes,u=0,c=l.length;u<c;u++){var h=l[u],d=h.nodeName.toLowerCase();"source"===d?t.sources.push(fe(h)):"track"===d&&t.tracks.push(fe(h))}return t},t.prototype.flexNotSupported_=function(){var e=a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(bt);bi.names.forEach((function(e){var t=bi[e];Fr.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Fr.players={};var Vr=r.navigator;Fr.prototype.options_={techOrder:Ti.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Vr&&(Vr.languages&&Vr.languages[0]||Vr.userLanguage||Vr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},x||Fr.prototype.options_.children.push("resizeManager"),["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Fr.prototype[e]=function(){return this.techGet_(e)}})),Rr.forEach((function(e){Fr.prototype["handleTech"+mt(e)+"_"]=function(){return this.trigger(e)}})),bt.registerComponent("Player",Fr);var Hr="plugin",qr="activePlugins_",zr={},Gr=function(e){return zr.hasOwnProperty(e)},Wr=function(e){return Gr(e)?zr[e]:void 0},$r=function(e,t){e[qr]=e[qr]||{},e[qr][t]=!0},Xr=function(e,t,i){var n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},Yr=function(e,t){var i=function(){Xr(this,{name:e,plugin:t,instance:null},!0);var i=t.apply(this,arguments);return $r(this,e),Xr(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i},Kr=function(e,t){return t.prototype.name=e,function(){Xr(this,{name:e,plugin:t,instance:null},!0);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var a=new(Function.prototype.bind.apply(t,[null].concat([this].concat(n))));return this[e]=function(){return a},Xr(this,a.getEventHash()),a}},Qr=function(){function e(t){if(R(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,pt(this),delete this.trigger,vt(this,this.constructor.defaultState),$r(t,this.name),this.dispose=tt(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return We(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[qr][e]=!1,this.player=this.state=null,t[e]=Kr(e,zr[e])},e.isBasic=function(t){var i="string"===typeof t?Wr(t):t;return"function"===typeof i&&!e.prototype.isPrototypeOf(i.prototype)},e.registerPlugin=function(t,i){if("string"!==typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+("undefined"===typeof t?"undefined":D(t))+".");if(Gr(t))Y.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Fr.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!==typeof i)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+("undefined"===typeof i?"undefined":D(i))+".");return zr[t]=i,t!==Hr&&(e.isBasic(i)?Fr.prototype[t]=Yr(t,i):Fr.prototype[t]=Kr(t,i)),i},e.deregisterPlugin=function(e){if(e===Hr)throw new Error("Cannot de-register base plugin.");Gr(e)&&(delete zr[e],delete Fr.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(zr),t=void 0;return e.forEach((function(e){var i=Wr(e);i&&(t=t||{},t[e]=i)})),t},e.getPluginVersion=function(e){var t=Wr(e);return t&&t.VERSION||""},e}();Qr.getPlugin=Wr,Qr.BASE_PLUGIN_NAME=Hr,Qr.registerPlugin(Hr,Qr),Fr.prototype.usingPlugin=function(e){return!!this[qr]&&!0===this[qr][e]},Fr.prototype.hasPlugin=function(e){return!!Gr(e)};var Jr=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":D(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)},Zr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function(){e.apply(this,arguments)},n={};for(var r in"object"===("undefined"===typeof t?"undefined":D(t))?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"===typeof t&&(i=t),Jr(i,e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i};"undefined"===typeof HTMLVideoElement&&ie()&&(a.createElement("video"),a.createElement("audio"),a.createElement("track"),a.createElement("video-js"));var ea=function(e){return 0===e.indexOf("#")?e.slice(1):e};function ta(e,t,i){var n=ta.getPlayer(e);if(n)return t&&Y.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var r="string"===typeof e?Ie("#"+ea(e)):e;if(!ne(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");a.body.contains(r)||Y.warn("The element supplied is not included in the DOM"),t=t||{},ta.hooks("beforesetup").forEach((function(e){var i=e(r,yt(t));z(i)&&!Array.isArray(i)?t=yt(t,i):Y.error("please return an object in beforesetup hooks")}));var s=bt.getComponent("Player");return n=new s(r,t,i),ta.hooks("setup").forEach((function(e){return e(n)})),n}if(ta.hooks_={},ta.hooks=function(e,t){return ta.hooks_[e]=ta.hooks_[e]||[],t&&(ta.hooks_[e]=ta.hooks_[e].concat(t)),ta.hooks_[e]},ta.hook=function(e,t){ta.hooks(e,t)},ta.hookOnce=function(e,t){ta.hooks(e,[].concat(t).map((function(t){var i=function i(){return ta.removeHook(e,i),t.apply(void 0,arguments)};return i})))},ta.removeHook=function(e,t){var i=ta.hooks(e).indexOf(t);return!(i<=-1)&&(ta.hooks_[e]=ta.hooks_[e].slice(),ta.hooks_[e].splice(i,1),!0)},!0!==r.VIDEOJS_NO_DYNAMIC_STYLE&&ie()){var ia=Ie(".vjs-styles-defaults");if(!ia){ia=Ze("vjs-styles-defaults");var na=Ie("head");na&&na.insertBefore(ia,na.firstChild),et(ia,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Je(1,ta),ta.VERSION=c,ta.options=Fr.prototype.options_,ta.getPlayers=function(){return Fr.players},ta.getPlayer=function(e){var t=Fr.players,i=void 0;if("string"===typeof e){var n=ea(e),r=t[n];if(r)return r;i=Ie("#"+n)}else i=e;if(ne(i)){var a=i,s=a.player,o=a.playerId;if(s||t[o])return s||t[o]}},ta.getAllPlayers=function(){return Object.keys(Fr.players).map((function(e){return Fr.players[e]})).filter(Boolean)},ta.players=Fr.players,ta.getComponent=bt.getComponent,ta.registerComponent=function(e,t){Ti.isTech(t)&&Y.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),bt.registerComponent.call(bt,e,t)},ta.getTech=Ti.getTech,ta.registerTech=Ti.registerTech,ta.use=ki,!x&&Object.defineProperty?(Object.defineProperty(ta,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ta.middleware,"TERMINATOR",{value:Ei,writeable:!1,enumerable:!0})):ta.middleware={TERMINATOR:Ei},ta.browser=P,ta.TOUCH_ENABLED=j,ta.extend=Zr,ta.mergeOptions=yt,ta.bind=tt,ta.registerPlugin=Qr.registerPlugin,ta.deregisterPlugin=Qr.deregisterPlugin,ta.plugin=function(e,t){return Y.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Qr.registerPlugin(e,t)},ta.getPlugins=Qr.getPlugins,ta.getPlugin=Qr.getPlugin,ta.getPluginVersion=Qr.getPluginVersion,ta.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),ta.options.languages=yt(ta.options.languages,(i={},i[e]=t,i)),ta.options.languages[e]},ta.log=Y,ta.createLogger=K,ta.createTimeRange=ta.createTimeRanges=wt,ta.formatTime=un,ta.setFormatTime=on,ta.resetFormatTime=ln,ta.parseUrl=ii,ta.isCrossOrigin=ai,ta.EventTarget=rt,ta.on=ze,ta.one=$e,ta.off=Ge,ta.trigger=We,ta.xhr=l,ta.TextTrack=ui,ta.AudioTrack=ci,ta.VideoTrack=hi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){ta[e]=function(){return Y.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),je[e].apply(null,arguments)}})),ta.computedStyle=Q,ta.dom=je,ta.url=si,e.exports=ta},"140c":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("e475"),a=n(r),s={errorInterval:30,getSource:function(e){var t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_;return e(i)}},o=function e(t,i){var n=0,r=0,o=a["default"].mergeOptions(s,i);t.ready((function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var l=function(){r&&t.currentTime(r)},u=function(e){null!==e&&void 0!==e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",l),t.src(e),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},c=function(){if(Date.now()-n<1e3*o.errorInterval)t.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(o.getSource&&"function"===typeof o.getSource)return n=Date.now(),o.getSource.call(t,u);a["default"].log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},h=function e(){t.off("loadedmetadata",l),t.off("error",c),t.off("dispose",e)},d=function(i){h(),e(t,i)};t.on("error",c),t.on("dispose",h),t.reloadSourceOnError=d},l=function(e){o(this,e)};t["default"]=l,e.exports=t["default"]},"14b8":function(e,t){var i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function n(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function r(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function a(){this.values=i(null)}function s(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if("string"===typeof r[a]){var s=r[a].split(i);if(2===s.length){var o=s[0],l=s[1];t(o,l)}}}function o(e,t,i){var o=e;function l(){var t=r(e);if(null===t)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(e,t){var n=new a;s(e,(function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];n.integer(e,s),n.percent(e,s)&&n.set("snapToLines",!1),n.alt(e,s,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),n.percent(e,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","middle","end","left","right"]);break}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical",""),t.line=n.get("line","auto"),t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100),t.align=n.get("align","middle"),t.position=n.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=n.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=l(),c(),"--\x3e"!==e.substr(0,3))throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),c(),t.endTime=l(),c(),u(e,t)}n.prototype=i(Error.prototype),n.prototype.constructor=n,n.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},a.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100))&&(this.set(e,t),!0)}};var l={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"","&rlm;":"","&nbsp;":" "},u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},c={v:"title",lang:"lang"},h={rt:"ruby"};function d(e,t){function i(){if(!t)return null;function e(e){return t=t.substr(e.length),e}var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function n(e){return l[e]}function a(e){while(y=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))e=e.replace(y[0],n);return e}function s(e,t){return!h[t.localName]||h[t.localName]===e.localName}function o(t,i){var n=u[t];if(!n)return null;var r=e.document.createElement(n);r.localName=n;var a=c[t];return a&&i&&(r[a]=i.trim()),r}var d,p=e.document.createElement("div"),f=p,v=[];while(null!==(d=i()))if("<"!==d[0])f.appendChild(e.document.createTextNode(a(d)));else{if("/"===d[1]){v.length&&v[v.length-1]===d.substr(2).replace(">","")&&(v.pop(),f=f.parentNode);continue}var m,g=r(d.substr(1,d.length-2));if(g){m=e.document.createProcessingInstruction("timestamp",g),f.appendChild(m);continue}var y=d.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(m=o(y[1],y[3]),!m)continue;if(!s(f,m))continue;y[2]&&(m.className=y[2].substr(1).replace("."," ")),v.push(y[1]),f.appendChild(m),f=m}return p}var p=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function f(e){for(var t=0;t<p.length;t++){var i=p[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function v(e){var t,i=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?(e.length=0,n[0]):i}return"ruby"===t.tagName?a(e):t.childNodes?(r(e,t),a(e)):void 0}r(i,e);while(n=a(i))for(var s=0;s<n.length;s++)if(t=n.charCodeAt(s),f(t))return"rtl";return"ltr"}function m(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}function g(){}function y(e,t,i){var n=/MSIE\s8\.0/.test(navigator.userAgent),r="rgba(255, 255, 255, 1)",a="rgba(0, 0, 0, 0.8)";n&&(r="rgb(255, 255, 255)",a="rgb(0, 0, 0)"),g.call(this),this.cue=t,this.cueDiv=d(e,t.text);var s={color:r,backgroundColor:a,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};n||(s.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",s.unicodeBidi="plaintext"),this.applyStyles(s,this.cueDiv),this.div=e.document.createElement("div"),s={textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},n||(s.direction=v(this.cueDiv),s.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(s),this.div.appendChild(this.cueDiv);var o=0;switch(t.positionAlign){case"start":o=t.position;break;case"middle":o=t.position-t.size/2;break;case"end":o=t.position-t.size;break}""===t.vertical?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function b(e){var t,i,n,r,a=/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight,a&&!this.lineHeight&&(this.lineHeight=13)}function _(e,t,i,n){function r(e,t){for(var r,a=new b(e),s=1,o=0;o<t.length;o++){while(e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n))e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);s>l&&(r=new b(e),s=l),e=new b(a)}return r||a}var a=new b(t),s=t.cue,o=m(s),l=[];if(s.snapToLines){var u;switch(s.vertical){case"":l=["+y","-y"],u="height";break;case"rl":l=["+x","-x"],u="width";break;case"lr":l=["-x","+x"],u="width";break}var c=a.lineHeight,h=c*Math.round(o),d=i[u]+c,p=l[0];Math.abs(h)>d&&(h=h<0?-1:1,h*=Math.ceil(d/c)*c),o<0&&(h+=""===s.vertical?i.height:i.width,l=l.reverse()),a.move(p,h)}else{var f=a.lineHeight/i.height*100;switch(s.lineAlign){case"middle":o-=f/2;break;case"end":o-=f;break}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],a=new b(t)}var v=r(a,l);t.move(v.toCSSCompatValues(i))}function T(){}g.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},g.prototype.formatStyle=function(e,t){return 0===e?0:e+t},y.prototype=i(g.prototype),y.prototype.constructor=y,b.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t;break}},b.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},b.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},b.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},b.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},b.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),n=t*i;return n/(this.height*this.width)},b.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},b.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var r={left:e.left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i};return r},T.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},T.convertCueToDOMTree=function(e,t){return e&&t?d(e,t):null};var S=.05,w="sans-serif",E="1.5%";T.processCues=function(e,t,i){if(!e||!t||!i)return null;while(i.firstChild)i.removeChild(i.firstChild);var n=e.document.createElement("div");function r(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin=E,i.appendChild(n),r(t)){var a=[],s=b.getSimpleBoxPosition(n),o=Math.round(s.height*S*100)/100,l={font:o+"px "+w};(function(){for(var i,r,o=0;o<t.length;o++)r=t[o],i=new y(e,r,l),n.appendChild(i.div),_(e,i,s,a),r.displayState=i.div,a.push(b.getSimpleBoxPosition(i))})()}else for(var u=0;u<t.length;u++)n.appendChild(t[u].displayState)},T.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},T.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof n))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){var e=t.buffer,i=0;while(i<e.length&&"\r"!==e[i]&&"\n"!==e[i])++i;var n=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),n}function l(e){var i=new a;if(s(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var r=new a;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(e+"X",r.get("x")),i.set(e+"Y",r.get("y"));break;case"scroll":i.alt(e,t,["up"]);break}}),/=/,/\s/),i.has("id")){var n=new(t.vttjs.VTTRegion||t.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),t.onregion&&t.onregion(n),t.regionList.push({id:i.get("id"),region:n})}}function u(e){var i=new a;s(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",r(t));break}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}function c(e){e.match(/X-TIMESTAMP-MAP/)?s(e,(function(e,t){switch(e){case"X-TIMESTAMP-MAP":u(t);break}}),/=/):s(e,(function(e,t){switch(e){case"Region":l(t);break}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var h;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;h=i();var d=h.match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new n(n.Errors.BadSignature);t.state="HEADER"}var p=!1;while(t.buffer){if(!/\r\n|\n/.test(t.buffer))return this;switch(p?p=!1:h=i(),t.state){case"HEADER":/:/.test(h)?c(h):h||(t.state="ID");continue;case"NOTE":h||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(h)){t.state="NOTE";break}if(!h)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===h.indexOf("--\x3e")){t.cue.id=h;continue}case"CUE":try{o(h,t.cue,t.regionList)}catch(v){t.reportOrThrowError(v),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var f=-1!==h.indexOf("--\x3e");if(!h||f&&(p=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=h;continue;case"BADCUE":h||(t.state="ID");continue}}}catch(v){t.reportOrThrowError(v),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new n(n.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=T},"194a":function(e,t,i){"use strict";var n,r,a,s,o,l,u,c,h,d,p,f,v,m,g,y,b,_,T,S,w,E,k,C,x,A,I,O,j,L,P,D,R,M,N,B,U=Math.pow(2,32)-1;(function(){var e;if(k={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in k)k.hasOwnProperty(e)&&(k[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),A=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),I=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),j={video:I,audio:O},D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),M=R,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=R,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),n=function(e){var t,i,n,r=[],a=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);t=r.length;while(t--)a+=r[t].byteLength;for(i=new Uint8Array(a+8),n=new DataView(i.buffer,i.byteOffset,i.byteLength),n.setUint32(0,i.byteLength),i.set(e,4),t=0,a=8;t<r.length;t++)i.set(r[t],a),a+=r[t].byteLength;return i},r=function(){return n(k.dinf,n(k.dref,D))},a=function(e){return n(k.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},s=function(){return n(k.ftyp,C,x,C,A)},y=function(e){return n(k.hdlr,j[e])},o=function(e){return n(k.mdat,e)},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(k.mdhd,t)},m=function(e){return n(k.mdia,g(e),y(e.type),u(e))},l=function(e){return n(k.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},u=function(e){return n(k.minf,"video"===e.type?n(k.vmhd,L):n(k.smhd,P),r(),_(e))},c=function(e,t){var i=[],r=t.length;while(r--)i[r]=S(t[r]);return n.apply(null,[k.moof,l(e)].concat(i))},h=function(e){var t=e.length,i=[];while(t--)i[t]=f(e[t]);return n.apply(null,[k.moov,p(4294967295)].concat(i).concat(d(e)))},d=function(e){var t=e.length,i=[];while(t--)i[t]=w(e[t]);return n.apply(null,[k.mvex].concat(i))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(k.mvhd,t)},b=function(e){var t,i,r=e.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)t=r[i].flags,a[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return n(k.sdtp,a)},_=function(e){return n(k.stbl,T(e),n(k.stts,B),n(k.stsc,M),n(k.stsz,N),n(k.stco,R))},function(){var e,t;T=function(i){return n(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?e(i):t(i))},e=function(e){var t,i=e.sps||[],r=e.pps||[],a=[],s=[];for(t=0;t<i.length;t++)a.push((65280&i[t].byteLength)>>>8),a.push(255&i[t].byteLength),a=a.concat(Array.prototype.slice.call(i[t]));for(t=0;t<r.length;t++)s.push((65280&r[t].byteLength)>>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));return n(k.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(k.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length]).concat(a).concat([r.length]).concat(s))),n(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},t=function(e){return n(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))}}(),v=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(k.tkhd,t)},S=function(e){var t,i,r,a,s,o,l;return t=n(k.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/(U+1)),l=Math.floor(e.baseMediaDecodeTime%(U+1)),i=n(k.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l>>>24&255,l>>>16&255,l>>>8&255,255&l])),s=92,"audio"===e.type?(r=E(e,s),n(k.traf,t,i,r)):(a=b(e),r=E(e,a.length+s),n(k.traf,t,i,r,a))},f=function(e){return e.duration=e.duration||4294967295,n(k.trak,v(e),m(e))},w=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(k.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,a,s,o;for(a=e.samples||[],t+=20+16*a.length,r=i(a,t),o=0;o<a.length;o++)s=a[o],r=r.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);return n(k.trun,new Uint8Array(r))},e=function(e,t){var r,a,s,o;for(a=e.samples||[],t+=20+8*a.length,r=i(a,t),o=0;o<a.length;o++)s=a[o],r=r.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);return n(k.trun,new Uint8Array(r))},E=function(i,n){return"audio"===i.type?e(i,n):t(i,n)}}(),e.exports={ftyp:s,mdat:o,moof:c,moov:h,initSegment:function(e){var t,i=s(),n=h(e);return t=new Uint8Array(i.byteLength+n.byteLength),t.set(i),t.set(n,i.byteLength),t}}},"1b5c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i("ed7b"),o=r(s),l=i("de2e"),u=r(l),c=i("50a6"),h=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},d=function(e,t,i){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new o["default"](Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),l=void 0,u=void 0,c=void 0,d=void 0,p=void 0,f=void 0,v=void 0,m=void 0,g=void 0;for(l=i[0],u=i[1],c=i[2],d=i[3],g=0;g<n.length;g+=4)p=h(n[g]),f=h(n[g+1]),v=h(n[g+2]),m=h(n[g+3]),r.decrypt(p,f,v,m,s,g),s[g]=h(s[g]^l),s[g+1]=h(s[g+1]^u),s[g+2]=h(s[g+2]^c),s[g+3]=h(s[g+3]^d),l=p,u=f,c=v,d=m;return a};t.decrypt=d;var p=function(){function e(t,i,n,r){a(this,e);var s=e.STEP,o=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),d=0;for(this.asyncStream_=new u["default"],this.asyncStream_.push(this.decryptChunk_(o.subarray(d,d+s),i,n,l)),d=s;d<o.length;d+=s)n=new Uint32Array([h(o[d-4]),h(o[d-3]),h(o[d-2]),h(o[d-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(d,d+s),i,n,l));this.asyncStream_.push((function(){r(null,(0,c.unpad)(l))}))}return n(e,[{key:"decryptChunk_",value:function(e,t,i,n){return function(){var r=d(e,t,i);n.set(r,e.byteOffset)}}}],[{key:"STEP",get:function(){return 32e3}}]),e}();t.Decrypter=p,t["default"]={Decrypter:p,decrypt:d}},"1b8d":function(e,t){function i(e){return e.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(var t="",n=0;n<arguments.length;n++)t+=i(e[n])+(arguments[n+1]||"");return t}},"1c05":function(e,t,i){"use strict";var n=i("4329"),r=function(e){this.numberOfTracks=0,this.metadataStream=e.metadataStream,this.videoTags=[],this.audioTags=[],this.videoTrack=null,this.audioTrack=null,this.pendingCaptions=[],this.pendingMetadata=[],this.pendingTracks=0,this.processedTracks=0,r.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):("video"===e.track.type&&(this.videoTrack=e.track,this.videoTags=e.tags,this.pendingTracks++),void("audio"===e.track.type&&(this.audioTrack=e.track,this.audioTags=e.tags,this.pendingTracks++)))}};r.prototype=new n,r.prototype.flush=function(e){var t,i,n,r,a={tags:{},captions:[],captionStreams:{},metadata:[]};if(this.pendingTracks<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(0===this.pendingTracks&&(this.processedTracks++,this.processedTracks<this.numberOfTracks))return}if(this.processedTracks+=this.pendingTracks,this.pendingTracks=0,!(this.processedTracks<this.numberOfTracks)){for(this.videoTrack?r=this.videoTrack.timelineStartInfo.pts:this.audioTrack&&(r=this.audioTrack.timelineStartInfo.pts),a.tags.videoTags=this.videoTags,a.tags.audioTags=this.audioTags,n=0;n<this.pendingCaptions.length;n++)i=this.pendingCaptions[n],i.startTime=i.startPts-r,i.startTime/=9e4,i.endTime=i.endPts-r,i.endTime/=9e4,a.captionStreams[i.stream]=!0,a.captions.push(i);for(n=0;n<this.pendingMetadata.length;n++)t=this.pendingMetadata[n],t.cueTime=t.pts-r,t.cueTime/=9e4,a.metadata.push(t);a.metadata.dispatchType=this.metadataStream.dispatchType,this.videoTrack=null,this.audioTrack=null,this.videoTags=[],this.audioTags=[],this.pendingCaptions.length=0,this.pendingMetadata.length=0,this.pendingTracks=0,this.processedTracks=0,this.trigger("data",a),this.trigger("done")}},e.exports=r},"1d05":function(e,t,i){"use strict";var n=i("e96b"),r=i.n(n);r.a},"1d2d":function(e,t,i){var n=i("78a2");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("67bd0954",n,!0,{sourceMap:!1,shadowMode:!1})},"1da8":function(e,t,i){"use strict";var n=i("5ac2"),r=i.n(n);r.a},"1fb5":function(e,t,i){"use strict";t.byteLength=c,t.toByteArray=d,t.fromByteArray=v;for(var n=[],r=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o<l;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var n=i===t?0:4-i%4;return[i,n]}function c(e){var t=u(e),i=t[0],n=t[1];return 3*(i+n)/4-n}function h(e,t,i){return 3*(t+i)/4-i}function d(e){var t,i,n=u(e),s=n[0],o=n[1],l=new a(h(e,s,o)),c=0,d=o>0?s-4:s;for(i=0;i<d;i+=4)t=r[e.charCodeAt(i)]<<18|r[e.charCodeAt(i+1)]<<12|r[e.charCodeAt(i+2)]<<6|r[e.charCodeAt(i+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===o&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,l[c++]=255&t),1===o&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l}function p(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function f(e,t,i){for(var n,r=[],a=t;a<i;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(p(n));return r.join("")}function v(e){for(var t,i=e.length,r=i%3,a=[],s=16383,o=0,l=i-r;o<l;o+=s)a.push(f(e,o,o+s>l?l:o+s));return 1===r?(t=e[i-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===r&&(t=(e[i-2]<<8)+e[i-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},2:function(e,t){},"210b":function(e,t,i){var n=i("e1c8");t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=i("b074").DOMParser},"230d":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("e475"),a=n(r),s=i("8c57"),o=n(s),l=function(){},u=function(e){var t=e["default"]?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},c=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)};t.stopLoaders=c;var h=function(e,t){t.activePlaylistLoader=e,e.load()};t.startLoaders=h;var d=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),l=a.activePlaylistLoader;c(n,a),o&&(o.playlistLoader?(n.resyncLoader(),h(o.playlistLoader,a)):l&&r.resetEverything())}};t.onGroupChanged=d;var p=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),l=a.activePlaylistLoader;c(n,a),o&&(o.playlistLoader?l!==o.playlistLoader?(n.track&&n.track(s),n.resetEverything(),h(o.playlistLoader,a)):h(o.playlistLoader,a):r.resetEverything())}};t.onTrackChanged=p;var f={AUDIO:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;c(i,n);var s=n.activeTrack(),o=n.activeGroup(),l=(o.filter((function(e){return e["default"]}))[0]||o[0]).id,u=n.tracks[l];if(s!==u){for(var h in a["default"].log.warn("Problem encountered loading the alternate audio track.Switching back to default."),n.tracks)n.tracks[h].enabled=n.tracks[h]===u;n.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e];a["default"].log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),c(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}};t.onError=f;var v={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),r),n.paused()||a.load()})),t.on("error",f[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),r),n.paused()||a.load()})),t.on("error",f[e](e,i))}};t.setupListeners=v;var m={AUDIO:function(e,t){var i=t.mode,n=t.hls,r=t.segmentLoaders[e],s=t.requestOptions,l=t.master.mediaGroups,c=t.mediaTypes[e],h=c.groups,d=c.tracks;for(var p in l[e]&&0!==Object.keys(l[e]).length&&"html5"===i||(l[e]={main:{default:{default:!0}}}),l[e])for(var m in h[p]||(h[p]=[]),l[e][p]){var g=l[e][p][m],y=void 0;if(y=g.resolvedUri?new o["default"](g.resolvedUri,n,s):null,g=a["default"].mergeOptions({id:m,playlistLoader:y},g),v[e](e,g.playlistLoader,t),h[p].push(g),"undefined"===typeof d[m]){var b=new a["default"].AudioTrack({id:m,kind:u(g),enabled:!1,language:g.language,default:g["default"],label:m});d[m]=b}}r.on("error",f[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,n=t.hls,r=t.segmentLoaders[e],s=t.requestOptions,l=t.master.mediaGroups,u=t.mediaTypes[e],c=u.groups,h=u.tracks;for(var d in l[e])for(var p in c[d]||(c[d]=[]),l[e][d])if(!l[e][d][p].forced){var m=l[e][d][p];if(m=a["default"].mergeOptions({id:p,playlistLoader:new o["default"](m.resolvedUri,n,s)},m),v[e](e,m.playlistLoader,t),c[d].push(m),"undefined"===typeof h[p]){var g=i.addRemoteTextTrack({id:p,kind:"subtitles",enabled:!1,language:m.language,label:p},!1).track;h[p]=g}}r.on("error",f[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,o=r.tracks;for(var l in n[e])for(var u in s[l]||(s[l]=[]),n[e][l]){var c=n[e][l][u];if(c.instreamId.match(/CC\d/)&&(s[l].push(a["default"].mergeOptions({id:u},c)),"undefined"===typeof o[u])){var h=i.addRemoteTextTrack({id:c.instreamId,kind:"captions",enabled:!1,language:c.language,label:u},!1).track;o[u]=h}}}};t.initialize=m;var g=function(e,t){return function(i){var n=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=n.media();if(!a)return null;var s=null;return a.attributes[e]&&(s=r[a.attributes[e]]),s=s||r.main,"undefined"===typeof i?s:null===i?null:s.filter((function(e){return e.id===i.id}))[0]||null}};t.activeGroup=g;var y={AUDIO:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if("showing"===i[n].mode)return i[n];return null}}};t.activeTrack=y;var b=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){m[t](t,e)}));var t=e.mediaTypes,i=e.masterPlaylistLoader,n=e.tech,r=e.hls;["AUDIO","SUBTITLES"].forEach((function(i){t[i].activeGroup=g(i,e),t[i].activeTrack=y[i](i,e),t[i].onGroupChanged=d(i,e),t[i].onTrackChanged=p(i,e)}));var a=t.AUDIO.activeGroup(),s=(a.filter((function(e){return e["default"]}))[0]||a[0]).id;t.AUDIO.tracks[s].enabled=!0,t.AUDIO.onTrackChanged(),i.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))}));var o=function(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})};for(var l in n.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(function(){n.audioTracks().removeEventListener("change",o),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),n.clearTracks("audio"),t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[l])};t.setupMediaGroups=b;var _=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:l,activeTrack:l,onGroupChanged:l,onTrackChanged:l}})),e};t.createMediaTypes=_},"256f":function(e,t,i){"use strict";var n=i("4329"),r=8589934592,a=4294967296,s=function(e,t){var i=1;e>t&&(i=-1);while(Math.abs(t-e)>a)e+=i*r;return e},o=function(e){var t,i;o.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(void 0===i&&(i=e.dts),e.dts=s(e.dts,i),e.pts=s(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.discontinuity=function(){i=void 0,t=void 0}};o.prototype=new n,e.exports={TimestampRolloverStream:o,handleRollover:s}},"269f":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("12c6"),u=a(l),c=i("9417"),h=a(c),d=i("4ea2"),p=a(d),f=i("ba2d"),v=i("78d8"),m=a(v),g=i("5c9d"),y=a(g),b=i("0de0"),_=function(){var e=void 0;try{e="5c9d"}catch(t){}return e},T=function(e,t){var i=e.addSourceBuffer(t),n=Object.create(null);n.updating=!1,n.realBuffer_=i;var r=function(e){"function"===typeof i[e]?n[e]=function(){return i[e].apply(i,arguments)}:"undefined"===typeof n[e]&&Object.defineProperty(n,e,{get:function(){return i[e]},set:function(t){return i[e]=t}})};for(var a in i)r(a);return n},S=function(e,t,i){if(!t||!e.length)return[];var n=Math.ceil(9e4*(t.currentTime()-i+3)),r=void 0;for(r=0;r<e.length;r++)if(e[r].pts>n)break;return e.slice(r)};t.gopsSafeToAlignWith=S;var w=function(e,t,i){if(!t.length)return e;if(i)return t.slice();var n=t[0].pts,r=0;for(r;r<e.length;r++)if(e[r].pts>=n)break;return e.slice(0,r).concat(t)};t.updateGopBuffer=w;var E=function(e,t,i,n){var r=Math.ceil(9e4*(t-n)),a=Math.ceil(9e4*(i-n)),s=e.slice(),o=e.length;while(o--)if(e[o].pts<=a)break;if(-1===o)return s;var l=o+1;while(l--)if(e[l].pts<=r)break;return l=Math.max(l,0),s.splice(l,o-l+1),s};t.removeGopBuffer=E;var k=function(e){function t(e,i){var n=this;s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,u["default"].EventTarget),this.timestampOffset_=0,this.pendingBuffers_=[],this.bufferUpdating_=!1,this.mediaSource_=e,this.codecs_=i,this.audioCodec_=null,this.videoCodec_=null,this.audioDisabled_=!1,this.appendAudioInitSegment_=!0,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=u["default"].browser.IE_VERSION>=11;var a={remux:!1,alignGopsAtEnd:this.safeAppend_};this.codecs_.forEach((function(e){(0,b.isAudioCodec)(e)?n.audioCodec_=e:(0,b.isVideoCodec)(e)&&(n.videoCodec_=e)})),this.transmuxer_=(0,m["default"])(y["default"],_()),this.transmuxer_.postMessage({action:"init",options:a}),this.transmuxer_.onmessage=function(e){return"data"===e.data.action?n.data_(e):"done"===e.data.action?n.done_(e):"gopInfo"===e.data.action?n.appendGopInfo_(e):void 0},Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"===typeof e&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(this,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(this,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(this,"buffered",{get:function(){var e=null,t=null,i=0,n=[],r=[];if(!this.videoBuffer_&&!this.audioBuffer_)return u["default"].createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_)return this.videoBuffer_.buffered;if(this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&0===this.audioBuffer_.buffered.length)return u["default"].createTimeRange();var a=this.videoBuffer_.buffered,s=this.audioBuffer_.buffered,o=a.length;while(o--)n.push({time:a.start(o),type:"start"}),n.push({time:a.end(o),type:"end"});o=s.length;while(o--)n.push({time:s.start(o),type:"start"}),n.push({time:s.end(o),type:"end"});for(n.sort((function(e,t){return e.time-t.time})),o=0;o<n.length;o++)"start"===n[o].type?(i++,2===i&&(e=n[o].time)):"end"===n[o].type&&(i--,1===i&&(t=n[o].time)),null!==e&&null!==t&&(r.push([e,t]),e=null,t=null);return u["default"].createTimeRanges(r)}})}return o(t,e),n(t,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),(0,h["default"])(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"createRealSourceBuffers_",value:function(){var e=this,t=["audio","video"];t.forEach((function(i){if(e[i+"Codec_"]&&!e[i+"Buffer_"]){var n=null;if(e.mediaSource_[i+"Buffer_"])n=e.mediaSource_[i+"Buffer_"],n.updating=!1;else{var r=i+"Codec_",a=i+'/mp4;codecs="'+e[r]+'"';n=T(e.mediaSource_.nativeMediaSource_,a),e.mediaSource_[i+"Buffer_"]=n}e[i+"Buffer_"]=n,["update","updatestart","updateend"].forEach((function(r){n.addEventListener(r,(function(){if("audio"!==i||!e.audioDisabled_){"updateend"===r&&(e[i+"Buffer_"].updating=!1);var n=t.every((function(t){return!("audio"!==t||!e.audioDisabled_)||(i===t||!e[t+"Buffer_"]||!e[t+"Buffer_"].updating)}));return n?e.trigger(r):void 0}}))}))}}))}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:S(this.gopBuffer_,this.mediaSource_.player_,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=w(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=E(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),(0,p["default"])(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)(0,p["default"])(e,t,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};e=this.pendingBuffers_.reduce((function(e,t){var i=t.type,n=t.data,r=t.initSegment;return e[i].segments.push(n),e[i].bytes+=n.byteLength,e[i].initSegment=r,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[i].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e}),e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_),(0,f.addTextTrackData)(this,e.captions,e.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var i=0,n=void 0;if(e.bytes){n=new Uint8Array(e.bytes),e.segments.forEach((function(e){n.set(e,i),i+=e.byteLength}));try{t.updating=!0,t.appendBuffer(n)}catch(r){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:r.message,originalError:r})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),t}(u["default"].EventTarget);t["default"]=k},2806:function(e,t,i){"use strict";var n,r,a,s;n=function(e,t){var i,a,s,o,l,u=[];if(!t.length)return null;for(i=0;i<e.byteLength;)a=e[i]<<24,a|=e[i+1]<<16,a|=e[i+2]<<8,a|=e[i+3],s=r(e.subarray(i+4,i+8)),o=a>1?i+a:e.byteLength,s===t[0]&&(1===t.length?u.push(e.subarray(i+8,o)):(l=n(e.subarray(i+8,o),t.slice(1)),l.length&&(u=u.concat(l)))),i=o;return u},r=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3]),t},a=function(e){var t={},i=n(e,["moov","trak"]);return i.reduce((function(e,t){var i,r,a,s,o;return i=n(t,["tkhd"])[0],i?(r=i[0],a=0===r?12:20,s=i[a]<<24|i[a+1]<<16|i[a+2]<<8|i[a+3],o=n(t,["mdia","mdhd"])[0],o?(r=o[0],a=0===r?12:20,e[s]=o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3],e):null):null}),t)},s=function(e,t){var i,r,a;return i=n(t,["moof","traf"]),r=[].concat.apply([],i.map((function(t){return n(t,["tfhd"]).map((function(i){var r,a,s;return r=i[4]<<24|i[5]<<16|i[6]<<8|i[7],a=e[r]||9e4,s=n(t,["tfdt"]).map((function(e){var t,i;return t=e[0],i=e[4]<<24|e[5]<<16|e[6]<<8|e[7],1===t&&(i*=Math.pow(2,32),i+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),i}))[0],s=s||1/0,s/a}))}))),a=Math.min.apply(null,r),isFinite(a)?a:0},e.exports={parseType:r,timescale:a,startTime:s}},"28e5":function(e,t,i){e.exports={generator:i("194a"),Transmuxer:i("300a").Transmuxer,AudioSegmentStream:i("300a").AudioSegmentStream,VideoSegmentStream:i("300a").VideoSegmentStream}},"2b8c":function(e,t,i){var n=i("be09"),r=e.exports={WebVTT:i("d02c"),VTTCue:i("b03c"),VTTRegion:i("f97d")};n.vttjs=r,n.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=a,n.VTTRegion=s},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},"2fdb":function(e,t){var i={"":!0,up:!0};function n(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function r(e){return"number"===typeof e&&e>=0&&e<=100}function a(){var e=100,t=3,i=0,a=100,s=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=n(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t}}})}e.exports=a},3:function(e,t){},"300a":function(e,t,i){"use strict";var n,r,a,s,o,l,u,c,h,d,p,f=i("4329"),v=i("194a"),m=i("0ea2"),g=i("4fcf"),y=i("631a").H264Stream,b=i("9d56"),_=i("7e10"),T=i("36c6"),S=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],w=["width","height","profileIdc","levelIdc","profileCompatibility"],E=9e4;o=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}},l=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},d=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},p=function(e){var t,i,n=0;for(t=0;t<e.length;t++)i=e[t],n+=i.data.byteLength;return n},r=function(e){var t=[],i=0,n=0,a=0,s=1/0;r.prototype.init.call(this),this.push=function(i){u(e,i),e&&S.forEach((function(t){e[t]=i[t]})),t.push(i)},this.setEarliestDts=function(t){n=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var n,r,a,s;0!==t.length?(n=this.trimAdtsFramesByEarliestDts_(t),e.baseMediaDecodeTime=h(e),this.prefixWithSilence_(e,n),e.samples=this.generateSampleTable_(n),a=v.mdat(this.concatenateFrameData_(n)),t=[],r=v.moof(i,[e]),s=new Uint8Array(r.byteLength+a.byteLength),i++,s.set(r),s.set(a,r.byteLength),c(e),this.trigger("data",{track:e,boxes:s}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(e,t){var i,n,r,o=0,l=0,u=0,c=0;if(t.length&&(i=T.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(E/(e.samplerate/1024)),a&&s&&(l=i-Math.max(a,s),u=Math.floor(l/o),c=u*o),!(u<1||c>E/2))){for(n=_[e.samplerate],n||(n=t[0].data),r=0;r<u;r++)t.splice(r,0,{data:n});e.baseMediaDecodeTime-=Math.floor(T.videoTsToAudioTs(c,e.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(t){return e.minSegmentDts>=n?t:(e.minSegmentDts=1/0,t.filter((function(t){return t.dts>=n&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)})))},this.generateSampleTable_=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},this.concatenateFrameData_=function(e){var t,i,n=0,r=new Uint8Array(p(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r}},r.prototype=new f,n=function(e,t){var i,r,a=0,s=[],l=[];t=t||{},n.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){u(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],w.forEach((function(t){e[t]=i[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){var i,n,r,o,d,p;while(s.length){if("access_unit_delimiter_rbsp"===s[0].nalUnitType)break;s.shift()}if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=this.groupNalsIntoFrames_(s),r=this.groupFramesIntoGops_(i),r[0][0].keyFrame||(n=this.getGopForFusion_(s[0],e),n?(r.unshift(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.pts=n.pts,r.dts=n.dts,r.duration+=n.duration):r=this.extendFirstKeyFrame_(r)),l.length){var f;if(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r),!f)return this.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");c(e),r=f}u(e,r),e.samples=this.generateSampleTable_(r),d=v.mdat(this.concatenateNalData_(r)),e.baseMediaDecodeTime=h(e),this.trigger("processedGopsInfo",r.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),this.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),o=v.moof(a,[e]),p=new Uint8Array(o.byteLength+d.byteLength),a++,p.set(o),p.set(d,o.byteLength),this.trigger("data",{track:e,boxes:p}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){c(e),i=void 0,r=void 0},this.getGopForFusion_=function(t){var i,n,r,a,s,o=45e3,l=1e4,u=1/0;for(s=0;s<this.gopCache_.length;s++)a=this.gopCache_[s],r=a.gop,e.pps&&d(e.pps[0],a.pps[0])&&e.sps&&d(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration,i>=-l&&i<=o&&(!n||u>i)&&(n=a,u=i)));return n?n.gop:null},this.extendFirstKeyFrame_=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},this.groupNalsIntoFrames_=function(e){var t,i,n=[],r=[];for(n.byteLength=0,t=0;t<e.length;t++)i=e[t],"access_unit_delimiter_rbsp"===i.nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.push(n)),n=[i],n.byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.push(n),r},this.groupFramesIntoGops_=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)i=e[t],i.keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),n=[i],n.nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},this.generateSampleTable_=function(e,t){var i,n,r,a,s,l=t||0,u=[];for(i=0;i<e.length;i++)for(a=e[i],n=0;n<a.length;n++)s=a[n],r=o(),r.dataOffset=l,r.compositionTimeOffset=s.pts-s.dts,r.duration=s.duration,r.size=4*s.length,r.size+=s.byteLength,s.keyFrame&&(r.flags.dependsOn=2),l+=r.size,u.push(r);return u},this.concatenateNalData_=function(e){var t,i,n,r,a,s,o=0,l=e.byteLength,u=e.nalCount,c=l+4*u,h=new Uint8Array(c),d=new DataView(h.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],d.setUint32(o,s.data.byteLength),o+=4,h.set(s.data,o),o+=s.data.byteLength;return h},this.alignGopsAtStart_=function(e){var t,i,n,r,a,s,o,u;a=e.byteLength,s=e.nalCount,o=e.duration,t=i=0;while(t<l.length&&i<e.length){if(n=l[t],r=e[i],n.pts===r.pts)break;r.pts>n.pts?t++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration)}return 0===i?e:i===e.length?null:(u=e.slice(i),u.byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,n,r,a,s,o;t=l.length-1,i=e.length-1,a=null,s=!1;while(t>=0&&i>=0){if(n=l[t],r=e[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?t--:(t===l.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(o=s?i:a,0===o)return e;var u=e.slice(o),c=u.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){l=e}},n.prototype=new f,u=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},c=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},h=function(e){var t,i,n=e.minSegmentDts-e.timelineStartInfo.dts;return t=e.timelineStartInfo.baseMediaDecodeTime,t+=n,t=Math.max(0,t),"audio"===e.type&&(i=e.samplerate/E,t*=i,t=Math.floor(t)),t},s=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,s.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}},s.prototype=new f,s.prototype.flush=function(e){var t,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,w.forEach((function(e){s.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,S.forEach((function(e){s.info[e]=this.audioTrack[e]}),this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=v.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)t=this.pendingCaptions[r],t.startTime=t.startPts-o,t.startTime/=9e4,t.endTime=t.endPts-o,t.endTime/=9e4,s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)i=this.pendingMetadata[r],i.cueTime=i.pts-o,i.cueTime/=9e4,s.metadata.push(i);s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},a=function(e){var t,i,o=this,u=!0;a.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new m.MetadataStream,t.aacStream=new b,t.audioTimestampRolloverStream=new m.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new m.TimestampRolloverStream("timed-metadata"),t.adtsStream=new g,t.coalesceStream=new s(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",(function(e){t.aacStream.setTimestamp(e.timeStamp)})),t.aacStream.on("data",(function(e){"timed-metadata"!==e.type||t.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:o.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new r(i),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))})),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var a={};this.transmuxPipeline_=a,a.type="ts",a.metadataStream=new m.MetadataStream,a.packetStream=new m.TransportPacketStream,a.parseStream=new m.TransportParseStream,a.elementaryStream=new m.ElementaryStream,a.videoTimestampRolloverStream=new m.TimestampRolloverStream("video"),a.audioTimestampRolloverStream=new m.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new m.TimestampRolloverStream("timed-metadata"),a.adtsStream=new g,a.h264Stream=new y,a.captionStream=new m.CaptionStream,a.coalesceStream=new s(e,a.metadataStream),a.headOfPipeline=a.packetStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream),a.elementaryStream.pipe(a.videoTimestampRolloverStream).pipe(a.h264Stream),a.elementaryStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.elementaryStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.h264Stream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",(function(s){var l;if("metadata"===s.type){l=s.tracks.length;while(l--)t||"video"!==s.tracks[l].type?i||"audio"!==s.tracks[l].type||(i=s.tracks[l],i.timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime):(t=s.tracks[l],t.timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime);t&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new n(t,e),a.videoSegmentStream.on("timelineStartInfo",(function(e){i&&(i.timelineStartInfo=e,a.audioSegmentStream.setEarliestDts(e.dts))})),a.videoSegmentStream.on("processedGopsInfo",o.trigger.bind(o,"gopInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),a.h264Stream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),i&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new r(i),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream))}})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var n=this.transmuxPipeline_;this.baseMediaDecodeTime=e,i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,c(i),i.timelineStartInfo.baseMediaDecodeTime=e,n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[],n.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,c(t),n.captionStream.reset(),t.timelineStartInfo.baseMediaDecodeTime=e),n.timedMetadataTimestampRolloverStream&&n.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(u){var t=l(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),u=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){u=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},a.prototype=new f,e.exports={Transmuxer:a,VideoSegmentStream:n,AudioSegmentStream:r,AUDIO_PROPERTIES:S,VIDEO_PROPERTIES:w}},3232:function(e,t,i){var n=i("b6ac");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("9f080248",n,!0,{sourceMap:!1,shadowMode:!1})},3240:function(e,t,i){"use strict";var n;n=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),i=new DataView(a.buffer).getUint32(0),n=8*s,t-=s},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,r=Math.floor(e/8),e-=8*r,t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),a=i>>>32-r;return n-=r,n>0?i<<=r:t>0&&this.loadWord(),r=e-r,r>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(0!==(i&2147483648>>>e))return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},e.exports=n},"32b9":function(e,t,i){"use strict";i.r(t);var n=i("a09d"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},3317:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,r=/^application\/dash\+xml/i,a=function(e){return n.test(e)?"hls":r.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},3586:function(e,t,i){"use strict";var n=i("fd9b"),r=i.n(n);r.a},3603:function(e,t,i){"use strict";var n=i("be09"),r=i("a559"),a=i("8362");c.httpHandler=i("8c00");
/**
* @license
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
* Copyright (c) 2014 David Björklund
* Available under the MIT license
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
*/
var s=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),n=e.slice(0,i).trim().toLowerCase(),r=e.slice(i+1).trim();"undefined"===typeof t[n]?t[n]=r:Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]})),t):t};function o(e,t){for(var i=0;i<e.length;i++)t(e[i])}function l(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function u(e,t,i){var n=e;return a(t)?(i=t,"string"===typeof e&&(n={uri:e})):n=r({},t,{uri:e}),n.callback=i,n}function c(e,t,i){return t=u(e,t,i),h(t)}function h(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,n,r){t||(t=!0,e.callback(i,n,r))};function n(){4===p.readyState&&setTimeout(o,0)}function r(){var e=void 0;if(e=p.response?p.response:p.responseText||d(p),_)try{e=JSON.parse(e)}catch(t){}return e}function a(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!h){var t;clearTimeout(f),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var n=T,a=null;return 0!==t?(n={body:r(),statusCode:t,method:m,headers:{},url:v,rawRequest:p},p.getAllResponseHeaders&&(n.headers=s(p.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),i(a,n,n.body)}}var u,h,p=e.xhr||null;p||(p=e.cors||e.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var f,v=p.url=e.uri||e.url,m=p.method=e.method||"GET",g=e.body||e.data,y=p.headers=e.headers||{},b=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:m,url:v,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,y["accept"]||y["Accept"]||(y["Accept"]="application/json"),"GET"!==m&&"HEAD"!==m&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),g=JSON.stringify(!0===e.json?g:e.json))),p.onreadystatechange=n,p.onload=o,p.onerror=a,p.onprogress=function(){},p.onabort=function(){h=!0},p.ontimeout=a,p.open(m,v,!b,e.username,e.password),b||(p.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout((function(){if(!h){h=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),p.setRequestHeader)for(u in y)y.hasOwnProperty(u)&&p.setRequestHeader(u,y[u]);else if(e.headers&&!l(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(g||null),p}function d(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(i){}return null}function p(){}e.exports=c,e.exports.default=c,c.XMLHttpRequest=n.XMLHttpRequest||p,c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:n.XDomainRequest,o(["get","put","post","patch","head","delete"],(function(e){c["delete"===e?"del":e]=function(t,i,n){return i=u(t,i,n),i.method=e.toUpperCase(),h(i)}}))},"369f":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-subsection[data-v-4f88e97c]{display:flex;flex-direction:row;align-items:center;overflow:hidden;position:relative}.u-item[data-v-4f88e97c]{flex:1;text-align:center;font-size:%?26?%;height:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#303133;padding:0 %?6?%}.u-item-bg[data-v-4f88e97c]{background-color:#2979ff;position:absolute;z-index:-1}.u-none-border-right[data-v-4f88e97c]{border-right:none!important}.u-item-first[data-v-4f88e97c]{border-top-left-radius:%?8?%;border-bottom-left-radius:%?8?%}.u-item-last[data-v-4f88e97c]{border-top-right-radius:%?8?%;border-bottom-right-radius:%?8?%}.u-item-text[data-v-4f88e97c]{transition:all .35s;color:#303133;display:flex;flex-direction:row;align-items:center;position:relative;z-index:3}',""]),e.exports=t},"36c6":function(e,t){var i,n,r,a,s,o,l=9e4;i=function(e){return e*l},n=function(e,t){return e*t},r=function(e){return e/l},a=function(e,t){return e/t},s=function(e,t){return i(a(e,t))},o=function(e,t){return n(r(e),t)},e.exports={secondsToVideoTs:i,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:s,videoTsToAudioTs:o}},"3ba2":function(e,t,i){"use strict";i.r(t);var n=i("c35d"),r=i("d081");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("1da8");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"4f88e97c",null,!1,n["a"],s);t["default"]=l.exports},4053:function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(i("b680"));function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e))return(0,n.default)(e)}},"40f3":function(e,t,i){"use strict";var n=i("3232"),r=i.n(n);r.a},4105:function(e,t,i){"use strict";i.r(t);var n=[{label:"北京市",value:"11"},{label:"天津市",value:"12"},{label:"河北省",value:"13"},{label:"山西省",value:"14"},{label:"内蒙古自治区",value:"15"},{label:"辽宁省",value:"21"},{label:"吉林省",value:"22"},{label:"黑龙江省",value:"23"},{label:"上海市",value:"31"},{label:"江苏省",value:"32"},{label:"浙江省",value:"33"},{label:"安徽省",value:"34"},{label:"福建省",value:"35"},{label:"江西省",value:"36"},{label:"山东省",value:"37"},{label:"河南省",value:"41"},{label:"湖北省",value:"42"},{label:"湖南省",value:"43"},{label:"广东省",value:"44"},{label:"广西壮族自治区",value:"45"},{label:"海南省",value:"46"},{label:"重庆市",value:"50"},{label:"四川省",value:"51"},{label:"贵州省",value:"52"},{label:"云南省",value:"53"},{label:"西藏自治区",value:"54"},{label:"陕西省",value:"61"},{label:"甘肃省",value:"62"},{label:"青海省",value:"63"},{label:"宁夏回族自治区",value:"64"},{label:"新疆维吾尔自治区",value:"65"},{label:"台湾",value:"66"},{label:"香港",value:"67"},{label:"澳门",value:"68"}];t["default"]=n},"423e":function(e,t,i){"use strict";var n=i("ae75"),r=function(e){var t=31&e[1];return t<<=8,t|=e[2],t},a=function(e){return!!(64&e[1])},s=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},o=function(e,t){var i=r(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},l=function(e){var t=a(e),i=4+s(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},u=function(e){var t={},i=a(e),n=4+s(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r,o,l;r=(15&e[n+1])<<8|e[n+2],o=3+r-4,l=(15&e[n+10])<<8|e[n+11];var u=12+l;while(u<o){var c=n+u;t[(31&e[c+1])<<8|e[c+2]]=e[c],u+=5+((15&e[c+3])<<8|e[c+4])}return t}},c=function(e,t){var i=r(e),a=t[i];switch(a){case n.H264_STREAM_TYPE:return"video";case n.ADTS_STREAM_TYPE:return"audio";case n.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},h=function(e){var t=a(e);if(!t)return null;var i=4+s(e);if(i>=e.byteLength)return null;var n,r=null;return n=e[i+7],192&n&&(r={},r.pts=(14&e[i+9])<<27|(255&e[i+10])<<20|(254&e[i+11])<<12|(255&e[i+12])<<5|(254&e[i+13])>>>3,r.pts*=4,r.pts+=(6&e[i+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[i+14])<<27|(255&e[i+15])<<20|(254&e[i+16])<<12|(255&e[i+17])<<5|(254&e[i+18])>>>3,r.dts*=4,r.dts+=(6&e[i+18])>>>1)),r},d=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},p=function(e){for(var t,i=4+s(e),n=e.subarray(i),r=0,a=0,o=!1;a<n.byteLength-3;a++)if(1===n[a+2]){r=a+5;break}while(r<n.byteLength)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}a+3!==r-2&&(t=d(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(o=!0));do{r++}while(1!==n[r]&&r<n.length);a=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}t=d(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(o=!0),a=r-2,r+=3;break;default:r+=3;break}return n=n.subarray(a),r-=a,a=0,n&&n.byteLength>3&&(t=d(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(o=!0)),o};e.exports={parseType:o,parsePat:l,parsePmt:u,parsePayloadUnitStartIndicator:a,parsePesType:c,parsePesTime:h,videoPacketContainsKeyFrame:p}},"42ba":function(e,t,i){var n=i("5eb0");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("5086f70d",n,!0,{sourceMap:!1,shadowMode:!1})},4329:function(e,t,i){"use strict";var n=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,a;if(i=e[t],i)if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(a=[],n=arguments.length,n=1;n<arguments.length;++n)a.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,a)}},this.dispose=function(){e={}}}};n.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),e},n.prototype.push=function(e){this.trigger("data",e)},n.prototype.flush=function(e){this.trigger("done",e)},e.exports=n},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=i("df7c")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"466b":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a=i("fc85"),s=h(a),o=i("ddac"),l=h(o),u=i("59a0"),c=h(u);function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function f(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=function(e){function t(){d(this,t);var e=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.lineStream=new l["default"],e.parseStream=new c["default"],e.lineStream.pipe(e.parseStream);var i=e,r=[],a={},s=void 0,o=void 0,u=function(){},h={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f=0;return e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},e.parseStream.on("data",(function(e){var t=void 0,l=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&(a.byterange=t,t.offset=e.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!==typeof e.attributes.IV&&(o.iv=e.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):o=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,f=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||h,e.attributes?(a.attributes||(a.attributes={}),n(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{},t=i[e.attributes["GROUP-ID"]],l={default:/yes/i.test(e.attributes.DEFAULT)},l["default"]?l.autoselect=!0:l.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(l.language=e.attributes.LANGUAGE),e.attributes.URI&&(l.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(l.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(l.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(l.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time":function(){this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||u).call(i)},uri:function(){a.uri=e.uri,r.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),o&&(a.key=o),a.timeline=f,s&&(a.map=s),a={}},comment:function(){}})[e.type].call(i)})),e}return f(t,e),r(t,[{key:"push",value:function(e){this.lineStream.push(e)}},{key:"end",value:function(){this.lineStream.push("\n")}}]),t}(s["default"]);t["default"]=v},"46af":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("e475"),a=n(r),s=function(){var e=function e(t,i){t=(0,r.mergeOptions)({timeout:45e3},t);var n=e.beforeRequest||a["default"].Hls.xhr.beforeRequest;if(n&&"function"===typeof n){var s=n(t);s&&(t=s)}var o=(0,r.xhr)(t,(function(e,t){var n=o.response;!e&&n&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=n.byteLength||n.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),e&&"ETIMEDOUT"===e.code&&(o.timedout=!0),e||o.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(o&&(n||o.responseText)))),i(e,o)})),l=o.abort;return o.abort=function(){return o.aborted=!0,l.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o};return e};t["default"]=s,e.exports=t["default"]},4742:function(e,t,i){(function(t){var n,r="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},a=i(3);"undefined"!==typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"],n||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=n}).call(this,i("c8ba"))},"4d20":function(e,t,i){(function(t){var n,r="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},a=i(2);"undefined"!==typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"],n||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=n}).call(this,i("c8ba"))},"4e4e":function(e,t){var i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function n(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function r(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function a(){this.values=i(null)}function s(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if("string"===typeof r[a]){var s=r[a].split(i);if(2===s.length){var o=s[0],l=s[1];t(o,l)}}}function o(e,t,i){var o=e;function l(){var t=r(e);if(null===t)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(e,t){var n=new a;s(e,(function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];n.integer(e,s),n.percent(e,s)&&n.set("snapToLines",!1),n.alt(e,s,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),n.percent(e,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","middle","end","left","right"]);break}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical",""),t.line=n.get("line","auto"),t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100),t.align=n.get("align","middle"),t.position=n.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=n.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=l(),c(),"--\x3e"!==e.substr(0,3))throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),c(),t.endTime=l(),c(),u(e,t)}n.prototype=i(Error.prototype),n.prototype.constructor=n,n.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},a.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100))&&(this.set(e,t),!0)}};var l={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"","&rlm;":"","&nbsp;":" "},u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},c={v:"title",lang:"lang"},h={rt:"ruby"};function d(e,t){function i(){if(!t)return null;function e(e){return t=t.substr(e.length),e}var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function n(e){return l[e]}function a(e){while(y=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))e=e.replace(y[0],n);return e}function s(e,t){return!h[t.localName]||h[t.localName]===e.localName}function o(t,i){var n=u[t];if(!n)return null;var r=e.document.createElement(n);r.localName=n;var a=c[t];return a&&i&&(r[a]=i.trim()),r}var d,p=e.document.createElement("div"),f=p,v=[];while(null!==(d=i()))if("<"!==d[0])f.appendChild(e.document.createTextNode(a(d)));else{if("/"===d[1]){v.length&&v[v.length-1]===d.substr(2).replace(">","")&&(v.pop(),f=f.parentNode);continue}var m,g=r(d.substr(1,d.length-2));if(g){m=e.document.createProcessingInstruction("timestamp",g),f.appendChild(m);continue}var y=d.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(m=o(y[1],y[3]),!m)continue;if(!s(f,m))continue;y[2]&&(m.className=y[2].substr(1).replace("."," ")),v.push(y[1]),f.appendChild(m),f=m}return p}var p=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function f(e){for(var t=0;t<p.length;t++){var i=p[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function v(e){var t,i=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?(e.length=0,n[0]):i}return"ruby"===t.tagName?a(e):t.childNodes?(r(e,t),a(e)):void 0}r(i,e);while(n=a(i))for(var s=0;s<n.length;s++)if(t=n.charCodeAt(s),f(t))return"rtl";return"ltr"}function m(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}function g(){}function y(e,t,i){var n=/MSIE\s8\.0/.test(navigator.userAgent),r="rgba(255, 255, 255, 1)",a="rgba(0, 0, 0, 0.8)";n&&(r="rgb(255, 255, 255)",a="rgb(0, 0, 0)"),g.call(this),this.cue=t,this.cueDiv=d(e,t.text);var s={color:r,backgroundColor:a,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};n||(s.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",s.unicodeBidi="plaintext"),this.applyStyles(s,this.cueDiv),this.div=e.document.createElement("div"),s={textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},n||(s.direction=v(this.cueDiv),s.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(s),this.div.appendChild(this.cueDiv);var o=0;switch(t.positionAlign){case"start":o=t.position;break;case"middle":o=t.position-t.size/2;break;case"end":o=t.position-t.size;break}""===t.vertical?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function b(e){var t,i,n,r,a=/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight,a&&!this.lineHeight&&(this.lineHeight=13)}function _(e,t,i,n){function r(e,t){for(var r,a=new b(e),s=1,o=0;o<t.length;o++){while(e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n))e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);s>l&&(r=new b(e),s=l),e=new b(a)}return r||a}var a=new b(t),s=t.cue,o=m(s),l=[];if(s.snapToLines){var u;switch(s.vertical){case"":l=["+y","-y"],u="height";break;case"rl":l=["+x","-x"],u="width";break;case"lr":l=["-x","+x"],u="width";break}var c=a.lineHeight,h=c*Math.round(o),d=i[u]+c,p=l[0];Math.abs(h)>d&&(h=h<0?-1:1,h*=Math.ceil(d/c)*c),o<0&&(h+=""===s.vertical?i.height:i.width,l=l.reverse()),a.move(p,h)}else{var f=a.lineHeight/i.height*100;switch(s.lineAlign){case"middle":o-=f/2;break;case"end":o-=f;break}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],a=new b(t)}var v=r(a,l);t.move(v.toCSSCompatValues(i))}function T(){}g.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},g.prototype.formatStyle=function(e,t){return 0===e?0:e+t},y.prototype=i(g.prototype),y.prototype.constructor=y,b.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t;break}},b.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},b.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},b.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},b.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},b.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),n=t*i;return n/(this.height*this.width)},b.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},b.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var r={left:e.left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i};return r},T.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},T.convertCueToDOMTree=function(e,t){return e&&t?d(e,t):null};var S=.05,w="sans-serif",E="1.5%";T.processCues=function(e,t,i){if(!e||!t||!i)return null;while(i.firstChild)i.removeChild(i.firstChild);var n=e.document.createElement("div");function r(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin=E,i.appendChild(n),r(t)){var a=[],s=b.getSimpleBoxPosition(n),o=Math.round(s.height*S*100)/100,l={font:o+"px "+w};(function(){for(var i,r,o=0;o<t.length;o++)r=t[o],i=new y(e,r,l),n.appendChild(i.div),_(e,i,s,a),r.displayState=i.div,a.push(b.getSimpleBoxPosition(i))})()}else for(var u=0;u<t.length;u++)n.appendChild(t[u].displayState)},T.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},T.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof n))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){var e=t.buffer,i=0;while(i<e.length&&"\r"!==e[i]&&"\n"!==e[i])++i;var n=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),n}function l(e){var i=new a;if(s(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var r=new a;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(e+"X",r.get("x")),i.set(e+"Y",r.get("y"));break;case"scroll":i.alt(e,t,["up"]);break}}),/=/,/\s/),i.has("id")){var n=new(t.vttjs.VTTRegion||t.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),t.onregion&&t.onregion(n),t.regionList.push({id:i.get("id"),region:n})}}function u(e){var i=new a;s(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",r(t));break}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}function c(e){e.match(/X-TIMESTAMP-MAP/)?s(e,(function(e,t){switch(e){case"X-TIMESTAMP-MAP":u(t);break}}),/=/):s(e,(function(e,t){switch(e){case"Region":l(t);break}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var h;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;h=i();var d=h.match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new n(n.Errors.BadSignature);t.state="HEADER"}var p=!1;while(t.buffer){if(!/\r\n|\n/.test(t.buffer))return this;switch(p?p=!1:h=i(),t.state){case"HEADER":/:/.test(h)?c(h):h||(t.state="ID");continue;case"NOTE":h||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(h)){t.state="NOTE";break}if(!h)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===h.indexOf("--\x3e")){t.cue.id=h;continue}case"CUE":try{o(h,t.cue,t.regionList)}catch(v){t.reportOrThrowError(v),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var f=-1!==h.indexOf("--\x3e");if(!h||f&&(p=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=h;continue;case"BADCUE":h||(t.state="ID");continue}}}catch(v){t.reportOrThrowError(v),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new n(n.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=T},"4e69":function(e,t,i){"use strict";var n=4,r=128,a=i("4329"),s=function(e){var t=0,i={payloadType:-1,payloadSize:0},a=0,s=0;while(t<e.byteLength){if(e[t]===r)break;while(255===e[t])a+=255,t++;a+=e[t++];while(255===e[t])s+=255,t++;if(s+=e[t++],!i.payload&&a===n){i.payloadType=a,i.payloadSize=s,i.payload=e.subarray(t,t+s);break}t+=s,a=0,s=0}return i},o=function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},l=function(e,t){var i,n,r,a,s=[];if(!(64&t[0]))return s;for(n=31&t[0],i=0;i<n;i++)r=3*i,a={type:3&t[r+2],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));return s},u=function(){u.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new v(0,0),new v(0,1),new v(1,0),new v(1,1)],this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))}),this)};u.prototype=new a,u.prototype.push=function(e){var t,i;"sei_rbsp"===e.nalUnitType&&(t=s(e.escapedRBSP),t.payloadType===n&&(i=o(t),i&&(e.dts<this.latestDts_?this.ignoreNextEqualDts_=!0:e.dts===this.latestDts_&&this.ignoreNextEqualDts_?this.ignoreNextEqualDts_=!1:(this.captionPackets_=this.captionPackets_.concat(l(e.pts,i)),this.latestDts_=e.dts))))},u.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2&&this.dispatchCea608Packet(e)}),this),this.captionPackets_.length=0,this.ccStreams_.forEach((function(e){e.flush()}),this)):this.ccStreams_.forEach((function(e){e.flush()}),this)},u.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},u.prototype.dispatchCea608Packet=function(e){this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},u.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},u.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)};var c={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},h=function(e){return null===e?"":(e=c[e]||e,String.fromCharCode(e))},d=14,p=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],f=function(){var e=[],t=d+1;while(t--)e.push("");return e},v=function(e,t){v.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a;if(t=32639&e.ccData,t!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.topRow_=d-1,this.mode_="rollUp";else if(t===this.ROLL_UP_3_ROWS_)this.topRow_=d-2,this.mode_="rollUp";else if(t===this.ROLL_UP_4_ROWS_)this.topRow_=d-3,this.mode_="rollUp";else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[d]=this.nonDisplayed_[d].slice(0,-1):this.displayed_[d]=this.displayed_[d].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=f();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=f();else if(t===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(n,r))n=(3&n)<<8,a=h(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[d]=this.displayed_[d].slice(0,-1),n=(3&n)<<8,a=h(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&r)&&this.addFormatting(e.pts,["i"]),1===(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=p.indexOf(7968&t);s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14===(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=h(n),a+=h(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};v.prototype=new a,v.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){return e.trim()})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},v.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=f(),this.nonDisplayed_=f(),this.lastControlCode_=null,this.column_=0,this.row_=d,this.formatting_=[]},v.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},v.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},v.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},v.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},v.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},v.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},v.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},v.prototype.isNormalChar=function(e){return e>=32&&e<=127},v.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},v.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},v.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},v.prototype.rollUp=function(e,t){var i=this.displayed_[d];i+=t,this.displayed_[d]=i},v.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.topRow_;e<d;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[d]=""},v.prototype.paintOn=function(){},e.exports={CaptionStream:u,Cea608Stream:v}},"4ea1c":function(e,t,i){"use strict";var n=i("42ba"),r=i.n(n);r.a},"4ea2":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,i){var n=void 0,r=void 0;if(i&&i.cues){n=i.cues.length;while(n--)r=i.cues[n],r.startTime<=t&&r.endTime>=e&&i.removeCue(r)}};t["default"]=n,e.exports=t["default"]},"4fcf":function(e,t,i){"use strict";var n,r=i("4329"),a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];n=function(){var e;n.prototype.init.call(this),this.push=function(t){var i,n,r,s,o,l,u=0,c=0;if("audio"===t.type){e?(s=e,e=new Uint8Array(s.byteLength+t.data.byteLength),e.set(s),e.set(t.data,s.byteLength)):e=t.data;while(u+5<e.length)if(255===e[u]&&240===(246&e[u+1])){if(n=2*(1&~e[u+1]),i=(3&e[u+3])<<11|e[u+4]<<3|(224&e[u+5])>>5,o=1024*(1+(3&e[u+6])),l=9e4*o/a[(60&e[u+2])>>>2],r=u+i,e.byteLength<r)return;if(this.trigger("data",{pts:t.pts+c*l,dts:t.dts+c*l,sampleCount:o,audioobjecttype:1+(e[u+2]>>>6&3),channelcount:(1&e[u+2])<<2|(192&e[u+3])>>>6,samplerate:a[(60&e[u+2])>>>2],samplingfrequencyindex:(60&e[u+2])>>>2,samplesize:16,data:e.subarray(u+7+n,r)}),e.byteLength===r)return void(e=void 0);c++,e=e.subarray(r)}else u++}},this.flush=function(){this.trigger("done")}},n.prototype=new r,e.exports=n},"50a6":function(e,t,i){"use strict";t.pad=i("6941"),t.unpad=i("0c1c")},"51f3":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-datetime-picker[data-v-16807617]{position:relative;z-index:999}.u-picker-view[data-v-16807617]{height:100%;box-sizing:border-box}.u-picker-header[data-v-16807617]{width:100%;height:%?90?%;padding:0 %?40?%;display:flex;flex-direction:row;justify-content:space-between;align-items:center;box-sizing:border-box;font-size:%?30?%;background:#fff;position:relative}.u-picker-header[data-v-16807617]::after{content:"";position:absolute;border-bottom:%?1?% solid #eaeef1;-webkit-transform:scaleY(.5);transform:scaleY(.5);bottom:0;right:0;left:0}.u-picker__title[data-v-16807617]{color:#606266}.u-picker-body[data-v-16807617]{width:100%;height:%?500?%;overflow:hidden;background-color:#fff}.u-column-item[data-v-16807617]{display:flex;flex-direction:row;align-items:center;justify-content:center;font-size:%?32?%;color:#303133;padding:0 %?8?%}.u-text[data-v-16807617]{font-size:%?24?%;padding-left:%?8?%}.u-btn-picker[data-v-16807617]{padding:%?16?%;box-sizing:border-box;text-align:center;text-decoration:none}.u-opacity[data-v-16807617]{opacity:.5}.u-btn-picker--primary[data-v-16807617]{color:#2979ff}.u-btn-picker--tips[data-v-16807617]{color:#909399}',""]),e.exports=t},5316:function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.monitor-page[data-v-5467c718]{background-color:#fafafa}.utab-section[data-v-5467c718]{padding:%?30?%}.content-box[data-v-5467c718]{padding:%?30?%}.video_ul .video_li[data-v-5467c718]{background-color:#fff;width:100%;padding:0 %?12?%;margin-bottom:%?30?%}.video_ul .video_li .video_cd[data-v-5467c718]{width:100%;height:%?400?%;padding-top:%?20?%}.video_ul .video_li .bottom-box[data-v-5467c718]{padding-top:%?30?%;padding-bottom:%?30?%;padding-left:%?20?%;padding-right:%?20?%}.video_ul .video_li .bottom-box .row[data-v-5467c718]{display:flex;align-items:center;margin-bottom:%?12?%}.video_ul .video_li .address[data-v-5467c718]{font-size:%?28?%}',""]),e.exports=t},"53a8":function(e,t){e.exports=n;var i=Object.prototype.hasOwnProperty;function n(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)i.call(n,r)&&(e[r]=n[r])}return e}},5496:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("f7fd"),u=a(l),c=i("e475"),h=a(c),d=i("be09"),p=a(d),f=i("4ea2"),v=a(f),m=i("f24e"),g=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),y=function(e){return String.fromCharCode.apply(null,e)},b=function(e){function t(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,i),this.mediaSource_=null,this.subtitlesTrack_=null}return o(t,e),n(t,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return h["default"].createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return h["default"].createTimeRanges([[t,i]])}},{key:"initSegment",value:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(!e)return null;var i=(0,m.initSegmentId)(e),n=this.initSegments_[i];if(t&&!n&&e.bytes){var r=g.byteLength+e.bytes.byteLength,a=new Uint8Array(r);a.set(e.bytes),a.set(g,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return n||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(e,t){(0,v["default"])(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t),t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){var i=function(){e.state="READY",e.paused()||e.monitorBuffer_()};return this.syncController_.one("timestampoffset",i),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){while(e&&e.segment.empty)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t=this.pendingSegment_,i=t.segment;if("function"!==typeof p["default"].WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var n=function(){var t=function(){e.handleSegment_()};return e.state="WAITING_ON_VTTJS",e.subtitlesTrack_.tech_.one("vttjsloaded",t),e.subtitlesTrack_.tech_.one("vttjserror",(function(){e.subtitlesTrack_.tech_.off("vttjsloaded",t),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")})),{v:void 0}}();if("object"===typeof n)return n.v}i.requested=!0;try{this.parseVTTCues_(t)}catch(r){return this.error({message:r.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");t.byteLength=t.bytes.byteLength,this.mediaSecondsLoaded+=i.duration,t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime),t.cues.forEach((function(t){e.subtitlesTrack_.addCue(t)})),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,i=!1;"function"===typeof p["default"].TextDecoder?t=new p["default"].TextDecoder("utf8"):(t=p["default"].WebVTT.StringDecoder(),i=!0);var n=new p["default"].WebVTT.Parser(p["default"],p["default"].vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=function(t){return e.timestampmap=t},n.onparsingerror=function(e){h["default"].log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var r=e.segment.map.bytes;i&&(r=y(r)),n.parse(r)}var a=e.bytes;i&&(a=y(a)),n.parse(a),n.flush()}},{key:"updateTimeMapping_",value:function(e,t,i){var n=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,a=r.MPEGTS/9e4-r.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!i.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(s,o-n.duration)}}}else n.empty=!0}}]),t}(u["default"]);t["default"]=b,e.exports=t["default"]},"56c8":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},e.exports=t["default"]},"57db":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("56c8"),a=n(r),s=i("d61a"),o=n(s),l=i("6066"),u=function(e,t){var i=void 0;return e?(i=window.getComputedStyle(e),i?i[t]:""):""},c=function(e,t){var i=e.slice();e.sort((function(e,n){var r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r}))},h=function(e,t){var i=void 0,n=void 0;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||window.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||window.Number.MAX_VALUE,i-n};t.comparePlaylistBandwidth=h;var d=function(e,t){var i=void 0,n=void 0;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||window.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||window.Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n};t.comparePlaylistResolution=d;var p=function(e,t,i,n){var r=e.playlists.map((function(e){var t=void 0,i=void 0,n=void 0;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,n=e.attributes.BANDWIDTH,n=n||window.Number.MAX_VALUE,{bandwidth:n,width:t,height:i,playlist:e}}));c(r,(function(e,t){return e.bandwidth-t.bandwidth})),r=r.filter((function(e){return!o["default"].isIncompatible(e.playlist)}));var s=r.filter((function(e){return o["default"].isEnabled(e.playlist)}));s.length||(s=r.filter((function(e){return!o["default"].isDisabled(e.playlist)})));var l=s.filter((function(e){return e.bandwidth*a["default"].BANDWIDTH_VARIANCE<t})),u=l[l.length-1],h=l.filter((function(e){return e.bandwidth===u.bandwidth}))[0],d=l.filter((function(e){return e.width&&e.height}));c(d,(function(e,t){return e.width-t.width}));var p=d.filter((function(e){return e.width===i&&e.height===n}));u=p[p.length-1];var f=p.filter((function(e){return e.bandwidth===u.bandwidth}))[0],v=void 0,m=void 0,g=void 0;f||(v=d.filter((function(e){return e.width>i||e.height>n})),m=v.filter((function(e){return e.width===v[0].width&&e.height===v[0].height})),u=m[m.length-1],g=m.filter((function(e){return e.bandwidth===u.bandwidth}))[0]);var y=g||f||h||s[0]||r[0];return y?y.playlist:null};t.simpleSelector=p;var f=function(){return p(this.playlists.master,this.systemBandwidth,parseInt(u(this.tech_.el(),"width"),10),parseInt(u(this.tech_.el(),"height"),10))};t.lastBandwidthSelector=f;var v=function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,p(this.playlists.master,t,parseInt(u(this.tech_.el(),"width"),10),parseInt(u(this.tech_.el(),"height"),10))}};t.movingAverageBandwidthSelector=v;var m=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,l=e.currentTimeline,u=e.syncController,d=t.playlists.filter((function(e){return!o["default"].isIncompatible(e)})),p=d.filter(o["default"].isEnabled);p.length||(p=d.filter((function(e){return!o["default"].isDisabled(e)})));var f=p.filter(o["default"].hasAttribute.bind(null,"BANDWIDTH")),v=f.map((function(e){var t=u.getSyncPoint(e,r,l,i),c=t?1:2,h=o["default"].estimateSegmentRequestTime(a,n,e),d=h*c-s;return{playlist:e,rebufferingImpact:d}})),m=v.filter((function(e){return e.rebufferingImpact<=0}));return c(m,(function(e,t){return h(t.playlist,e.playlist)})),m.length?m[0]:(c(v,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),v[0]||null)};t.minRebufferMaxBandwidthSelector=m;var g=function(){var e=this.playlists.master.playlists.filter(o["default"].isEnabled);c(e,(function(e,t){return h(e,t)}));var t=e.filter((function(e){return(0,l.parseCodecs)(e.attributes.CODECS).videoCodec}));return t[0]||null};t.lowestBitrateCompatibleVariantSelector=g},"59a0":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)if(i.push(s.value),t&&i.length===t)break}catch(l){r=!0,a=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw a}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a=i("fc85"),s=o(a);function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(){var e="[^=]*",t='"[^"]*"|[^,]*',i="(?:"+e+")=(?:"+t+")";return new RegExp("(?:^|,)("+i+")")},d=function(e){var t=e.split(h()),i={},n=t.length,r=void 0;while(n--)""!==t[n]&&(r=/([^=]*)=(.*)/.exec(t[n]).slice(1),r[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),i[r[0]]=r[1]);return i},p=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return c(t,e),r(t,[{key:"push",value:function(e){var t=void 0,i=void 0;if(e=e.replace(/^[\u0000\s]+|[\u0000\s]+$/g,""),0!==e.length)if("#"===e[0])if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"totalduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void this.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"byterange"},t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),void this.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e),t)return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e),t){if(i={type:"tag",tagType:"map"},t[1]){var r=d(t[1]);if(r.URI&&(i.uri=r.URI),r.BYTERANGE){var a=r.BYTERANGE.split("@"),s=n(a,2),o=s[0],l=s[1];i.byterange={},o&&(i.byterange.length=parseInt(o,10)),l&&(i.byterange.offset=parseInt(l,10))}}this.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e),t){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=d(t[1]),i.attributes.RESOLUTION){var u=i.attributes.RESOLUTION.split("x"),c={};u[0]&&(c.width=parseInt(u[0],10)),u[1]&&(c.height=parseInt(u[1],10)),i.attributes.RESOLUTION=c}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e),t)return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=d(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e),t)return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e),t)return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=d(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);this.trigger("data",{type:"tag",data:e.slice(4)})}}}else this.trigger("data",{type:"comment",text:e.slice(1)});else this.trigger("data",{type:"uri",uri:e})}}]),t}(s["default"]);t["default"]=p},"5ac2":function(e,t,i){var n=i("369f");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("2ab73798",n,!0,{sourceMap:!1,shadowMode:!1})},"5ba9":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var n={uSubsection:i("3ba2").default,uDropdown:i("20b3").default,uDropdownItem:i("0dcd").default,uIcon:i("f86b").default,uButton:i("d9ad").default,videoFlvH5:i("7a91").default,uSwitch:i("89f2").default,uLoadmore:i("eb64").default,uEmpty:i("7516").default,uPicker:i("665d").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"monitor-page bg-page"},[i("v-uni-view",{staticClass:"utab-section"},[i("u-subsection",{attrs:{list:e.list,current:e.current},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.sectionChange.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"secreen-section",staticStyle:{"background-color":"#fff"}},[0==e.current?i("u-dropdown",{ref:"uDropdown",staticClass:"dropdown-box"},[i("u-dropdown-item",{attrs:{title:"基地",height:"700rpx",options:e.deviceAddressList},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)}},model:{value:e.addressValue,callback:function(t){e.addressValue=t},expression:"addressValue"}}),i("u-dropdown-item",{attrs:{title:"检测点",height:"700rpx",options:e.options2},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change2.apply(void 0,arguments)}},model:{value:e.device_id,callback:function(t){e.device_id=t},expression:"device_id"}}),i("u-dropdown-item",{attrs:{title:"全部",options:e.options3},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change3.apply(void 0,arguments)}},model:{value:e.is_recommend,callback:function(t){e.is_recommend=t},expression:"is_recommend"}})],1):e._e(),1==e.current?i("u-dropdown",{ref:"uDropdown2",staticClass:"dropdown-box",on:{open:function(t){arguments[0]=t=e.$handleEvent(t),e.openDropDown.apply(void 0,arguments)}}},[i("u-dropdown-item",{attrs:{title:"基地",height:"700rpx",options:e.deviceAddressList2},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)}},model:{value:e.addressValue2,callback:function(t){e.addressValue2=t},expression:"addressValue2"}}),i("u-dropdown-item",{attrs:{title:"检测点",height:"700rpx",options:e.options4},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change4.apply(void 0,arguments)}},model:{value:e.device_id2,callback:function(t){e.device_id2=t},expression:"device_id2"}}),1==e.current?i("u-dropdown-item",{attrs:{title:"日期"}},[i("v-uni-view",{staticClass:"slot-content",staticStyle:{"background-color":"#ffffff"}},[i("v-uni-view",{staticClass:"select-date u-border-bottom",staticStyle:{"margin-bottom":"0"}},[i("v-uni-view",{staticClass:"name",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerTimeFn("start")}}},[i("u-icon",{attrs:{name:"calendar",color:"#333",size:"32"}}),i("v-uni-text",{staticStyle:{"margin-left":"6rpx"}},[e._v("开始时间:")])],1),i("v-uni-view",{staticClass:"time_box"},[e.start_date_c?i("v-uni-view",{staticClass:"tile_val",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerTimeFn("start")}}},[e._v(e._s(e.start_date_c))]):i("v-uni-view",{staticClass:"tip_txt",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerTimeFn("start")}}},[e._v("请选择开始时间")]),e.start_date_c?i("v-uni-view",{staticClass:"delete_btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.deleteDateFn("start")}}},[i("u-icon",{attrs:{name:"close-circle",color:"#333",size:"34"}})],1):e._e()],1)],1),i("v-uni-view",{staticClass:"select-date u-border-bottom",staticStyle:{"margin-bottom":"0"}},[i("v-uni-view",{staticClass:"name",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerTimeFn("end")}}},[i("u-icon",{attrs:{name:"calendar",color:"#333",size:"32"}}),i("v-uni-text",{staticStyle:{"margin-left":"6rpx"}},[e._v("结束时间:")])],1),i("v-uni-view",{staticClass:"time_box"},[e.end_date_c?i("v-uni-view",{staticClass:"tile_val",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerTimeFn("end")}}},[e._v(e._s(e.end_date_c))]):i("v-uni-view",{staticClass:"tip_txt",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerTimeFn("end")}}},[e._v("请选择结束时间")]),e.end_date_c?i("v-uni-view",{staticClass:"delete_btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.deleteDateFn("end")}}},[i("u-icon",{attrs:{name:"close-circle",color:"#333",size:"34"}})],1):e._e()],1)],1),e.selectedTimeTip?i("v-uni-view",{staticClass:"select-date u-border-bottom"},[i("v-uni-view",{staticClass:"tip_err_text"},[e._v("请选择开始时间和结束时间,查询视频")])],1):e._e(),i("v-uni-view",{staticClass:"btn_group"},[i("u-button",{staticClass:"btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.resetSecreen()}}},[e._v("重置")]),i("u-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.selectedDateConform()}}},[e._v("查询")])],1)],1)],1):e._e()],1):e._e()],1),0==e.current&&e.addressName?i("v-uni-view",{staticClass:"secreen-show-box mt20"},[i("v-uni-view",{staticClass:"label_t"},[e._v("当前位置:")]),i("v-uni-view",{staticClass:"info"},[e._v(e._s(e.addressName)+"-"+e._s(e.device_id?e.device_id:"全部")+"-"+e._s(e.is_recommend?"推荐":"全部"))])],1):e._e(),1==e.current&&e.q_start_time?i("v-uni-view",{staticClass:"secreen-show-box mt20"},[i("v-uni-view",{staticClass:"label_t"},[e._v("查询:")]),i("v-uni-view",{staticClass:"info"},[i("v-uni-view",[e._v(e._s(e.addressName2)+"-"+e._s(e.device_id2))]),i("v-uni-view",[e._v(e._s(e.q_start_time)+" 到 "+e._s(e.q_end_time))])],1)],1):e._e(),i("v-uni-view",{staticClass:"content-box"},[i("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:0==e.current,expression:"current == 0"}],staticClass:"video_ul"},[e._l(e.videoList,(function(t,n){return i("v-uni-view",{key:n,staticClass:"video_li"},[i("v-uni-view",{staticClass:"video_cd"},["m3u8"==t.video_type?i("videoM3u8H5",{attrs:{url:t.video_url,id:"m_"+n+"_refsM3u8"}}):i("video-flv-h5",{attrs:{url:t.video_url}})],1),i("v-uni-view",{staticClass:"bottom-box"},[i("v-uni-view",{staticClass:"row flex-row"},[i("v-uni-view",{staticClass:"lab"},[e._v("推荐:")]),i("u-switch",{attrs:{size:"30"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.changeRecommend(t,n)}},model:{value:t.bl_recommend,callback:function(i){e.$set(t,"bl_recommend",i)},expression:"video.bl_recommend"}})],1),i("v-uni-view",{staticClass:"address"},[e._v(e._s(t.base_name)+"-"+e._s(t.monitoring_point))])],1)],1)})),i("u-loadmore",{attrs:{status:e.loading}})],2),i("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:1==e.current,expression:"current == 1"}],staticClass:"video_ul"},[e._l(e.videoList2,(function(t,n){return i("v-uni-view",{key:n,staticClass:"video_li"},[i("v-uni-view",{staticClass:"video_cd"},["m3u8"==t.video_type?i("videoM3u8H5",{attrs:{url:t.video_url,id:"m_"+n+"_refsM3u82"}}):i("video-flv-h5",{attrs:{url:t.video_url}})],1),i("v-uni-view",{staticClass:"bottom-box"},[i("v-uni-view",{staticClass:"address"},[e._v(e._s(t.base_name)+"-"+e._s(t.monitoring_point))])],1)],1)})),e.loading2?i("u-loadmore",{attrs:{status:e.loading2}}):e._e(),e.videoList2&&e.videoList2.length?e._e():i("u-empty",{attrs:{text:"请选择要查看的视频的日期",mode:"history","margin-top":"100"}})],2)],1),i("u-picker",{attrs:{mode:"time",params:e.pickerParams,"default-time":e.defaultTime},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange.apply(void 0,arguments)}},model:{value:e.pickerShow,callback:function(t){e.pickerShow=t},expression:"pickerShow"}})],1)},a=[]},"5bc0":function(e,t,i){"use strict";var n,r=i("4329"),a=i("ae75"),s=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},o=function(e,t,i){return decodeURIComponent(s(e,t,i))},l=function(e,t,i){return unescape(s(e,t,i))},u=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},c={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=o(e.data,1,t),e.value=o(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=o(e.data,1,t),e.url=o(e.data,t+1,e.data.length);break}},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=l(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};n=function(e){var t,i={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,s=[],o=0;if(n.prototype.init.call(this),this.dispatchType=a.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,a,l,h,d;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=0,s.length=0),0===s.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))i.debug&&console.log("Skipping unrecognized metadata packet");else if(s.push(e),o+=e.data.byteLength,1===s.length&&(r=u(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:s[0].pts,dts:s[0].dts},h=0;h<r;)t.data.set(s[0].data.subarray(0,r-h),h),h+=s[0].data.byteLength,o-=s[0].data.byteLength,s.shift();n=10,64&t.data[5]&&(n+=4,n+=u(t.data.subarray(10,14)),r-=u(t.data.subarray(16,20)));do{if(a=u(t.data.subarray(n+4,n+8)),a<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if(d=String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),l={id:d,data:t.data.subarray(n+10,n+a+10)},l.key=l.id,c[l.id]&&(c[l.id](l),"com.apple.streaming.transportStreamTimestamp"===l.owner)){var p=l.data,f=(1&p[3])<<30|p[4]<<22|p[5]<<14|p[6]<<6|p[7]>>>2;f*=4,f+=3&p[7],l.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=l.timeStamp,t.dts=l.timeStamp),this.trigger("timestamp",l)}t.frames.push(l),n+=10,n+=a}while(n<r);this.trigger("data",t)}}},n.prototype=new r,e.exports=n},"5c9d":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i("be09"),o=r(s),l=i("28e5"),u=r(l),c=function(e){e.on("data",(function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};var i=e.data;e.data=i.buffer,o["default"].postMessage({action:"data",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])})),e.captionStream&&e.captionStream.on("data",(function(e){o["default"].postMessage({action:"caption",data:e})})),e.on("done",(function(e){o["default"].postMessage({action:"done"})})),e.on("gopInfo",(function(e){o["default"].postMessage({action:"gopInfo",gopInfo:e})}))},h=function(){function e(t){a(this,e),this.options=t||{},this.init()}return n(e,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new u["default"].Transmuxer(this.options),c(this.transmuxer)}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(e){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}]),e}(),d=function(e){e.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new h(e.data.options):(this.messageHandlers||(this.messageHandlers=new h),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}};t["default"]=function(e){return new d(e)},e.exports=t["default"]},"5eb0":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-btn[data-v-4ed92bb2]::after{border:none}.u-btn[data-v-4ed92bb2]{position:relative;border:0;display:inline-flex;overflow:visible;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer;padding:0 %?40?%;z-index:1;box-sizing:border-box;transition:all .15s}.u-btn--bold-border[data-v-4ed92bb2]{border:1px solid #fff}.u-btn--default[data-v-4ed92bb2]{color:#606266;border-color:#c0c4cc;background-color:#fff}.u-btn--primary[data-v-4ed92bb2]{color:#fff;border-color:#2979ff;background-color:#2979ff}.u-btn--success[data-v-4ed92bb2]{color:#fff;border-color:#19be6b;background-color:#19be6b}.u-btn--error[data-v-4ed92bb2]{color:#fff;border-color:#fa3534;background-color:#fa3534}.u-btn--warning[data-v-4ed92bb2]{color:#fff;border-color:#f90;background-color:#f90}.u-btn--default--disabled[data-v-4ed92bb2]{color:#fff;border-color:#e4e7ed;background-color:#fff}.u-btn--primary--disabled[data-v-4ed92bb2]{color:#fff!important;border-color:#a0cfff!important;background-color:#a0cfff!important}.u-btn--success--disabled[data-v-4ed92bb2]{color:#fff!important;border-color:#71d5a1!important;background-color:#71d5a1!important}.u-btn--error--disabled[data-v-4ed92bb2]{color:#fff!important;border-color:#fab6b6!important;background-color:#fab6b6!important}.u-btn--warning--disabled[data-v-4ed92bb2]{color:#fff!important;border-color:#fcbd71!important;background-color:#fcbd71!important}.u-btn--primary--plain[data-v-4ed92bb2]{color:#2979ff!important;border-color:#a0cfff!important;background-color:#ecf5ff!important}.u-btn--success--plain[data-v-4ed92bb2]{color:#19be6b!important;border-color:#71d5a1!important;background-color:#dbf1e1!important}.u-btn--error--plain[data-v-4ed92bb2]{color:#fa3534!important;border-color:#fab6b6!important;background-color:#fef0f0!important}.u-btn--warning--plain[data-v-4ed92bb2]{color:#f90!important;border-color:#fcbd71!important;background-color:#fdf6ec!important}.u-hairline-border[data-v-4ed92bb2]:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:0 0;transform-origin:0 0;left:0;top:0;width:199.8%;height:199.7%;-webkit-transform:scale(.5);transform:scale(.5);border:1px solid currentColor;z-index:1}.u-wave-ripple[data-v-4ed92bb2]{z-index:0;position:absolute;border-radius:100%;background-clip:padding-box;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1;-webkit-transform-origin:center;transform-origin:center}.u-wave-ripple.u-wave-active[data-v-4ed92bb2]{opacity:0;-webkit-transform:scale(2);transform:scale(2);transition:opacity 1s linear,-webkit-transform .4s linear;transition:opacity 1s linear,transform .4s linear;transition:opacity 1s linear,transform .4s linear,-webkit-transform .4s linear}.u-round-circle[data-v-4ed92bb2]{border-radius:%?100?%}.u-round-circle[data-v-4ed92bb2]::after{border-radius:%?100?%}.u-loading[data-v-4ed92bb2]::after{background-color:hsla(0,0%,100%,.35)}.u-size-default[data-v-4ed92bb2]{font-size:%?30?%;height:%?80?%;line-height:%?80?%}.u-size-medium[data-v-4ed92bb2]{display:inline-flex;width:auto;font-size:%?26?%;height:%?70?%;line-height:%?70?%;padding:0 %?80?%}.u-size-mini[data-v-4ed92bb2]{display:inline-flex;width:auto;font-size:%?22?%;padding-top:1px;height:%?50?%;line-height:%?50?%;padding:0 %?20?%}.u-primary-plain-hover[data-v-4ed92bb2]{color:#fff!important;background:#2b85e4!important}.u-default-plain-hover[data-v-4ed92bb2]{color:#2b85e4!important;background:#ecf5ff!important}.u-success-plain-hover[data-v-4ed92bb2]{color:#fff!important;background:#18b566!important}.u-warning-plain-hover[data-v-4ed92bb2]{color:#fff!important;background:#f29100!important}.u-error-plain-hover[data-v-4ed92bb2]{color:#fff!important;background:#dd6161!important}.u-info-plain-hover[data-v-4ed92bb2]{color:#fff!important;background:#82848a!important}.u-default-hover[data-v-4ed92bb2]{color:#2b85e4!important;border-color:#2b85e4!important;background-color:#ecf5ff!important}.u-primary-hover[data-v-4ed92bb2]{background:#2b85e4!important;color:#fff}.u-success-hover[data-v-4ed92bb2]{background:#18b566!important;color:#fff}.u-info-hover[data-v-4ed92bb2]{background:#82848a!important;color:#fff}.u-warning-hover[data-v-4ed92bb2]{background:#f29100!important;color:#fff}.u-error-hover[data-v-4ed92bb2]{background:#dd6161!important;color:#fff}',""]),e.exports=t},"600f":function(e,t,i){"use strict";i.r(t);var n=i("9d17"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},6066:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t={codecCount:0},i=void 0;return t.codecCount=e.split(",").length,t.codecCount=t.codecCount||2,i=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(e),i&&(t.videoCodec=i[2],t.videoObjectTypeIndicator=i[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),t.audioProfile=t.audioProfile&&t.audioProfile[2],t};t.parseCodecs=n},"60ae":function(e,t,i){"use strict";i.r(t);var n=[[[{label:"东城区",value:"110101"},{label:"西城区",value:"110102"},{label:"朝阳区",value:"110105"},{label:"丰台区",value:"110106"},{label:"石景山区",value:"110107"},{label:"海淀区",value:"110108"},{label:"门头沟区",value:"110109"},{label:"房山区",value:"110111"},{label:"通州区",value:"110112"},{label:"顺义区",value:"110113"},{label:"昌平区",value:"110114"},{label:"大兴区",value:"110115"},{label:"怀柔区",value:"110116"},{label:"平谷区",value:"110117"},{label:"密云区",value:"110118"},{label:"延庆区",value:"110119"}]],[[{label:"和平区",value:"120101"},{label:"河东区",value:"120102"},{label:"河西区",value:"120103"},{label:"南开区",value:"120104"},{label:"河北区",value:"120105"},{label:"红桥区",value:"120106"},{label:"东丽区",value:"120110"},{label:"西青区",value:"120111"},{label:"津南区",value:"120112"},{label:"北辰区",value:"120113"},{label:"武清区",value:"120114"},{label:"宝坻区",value:"120115"},{label:"滨海新区",value:"120116"},{label:"宁河区",value:"120117"},{label:"静海区",value:"120118"},{label:"蓟州区",value:"120119"}]],[[{label:"长安区",value:"130102"},{label:"桥西区",value:"130104"},{label:"新华区",value:"130105"},{label:"井陉矿区",value:"130107"},{label:"裕华区",value:"130108"},{label:"藁城区",value:"130109"},{label:"鹿泉区",value:"130110"},{label:"栾城区",value:"130111"},{label:"井陉县",value:"130121"},{label:"正定县",value:"130123"},{label:"行唐县",value:"130125"},{label:"灵寿县",value:"130126"},{label:"高邑县",value:"130127"},{label:"深泽县",value:"130128"},{label:"赞皇县",value:"130129"},{label:"无极县",value:"130130"},{label:"平山县",value:"130131"},{label:"元氏县",value:"130132"},{label:"赵县",value:"130133"},{label:"石家庄高新技术产业开发区",value:"130171"},{label:"石家庄循环化工园区",value:"130172"},{label:"辛集市",value:"130181"},{label:"晋州市",value:"130183"},{label:"新乐市",value:"130184"}],[{label:"路南区",value:"130202"},{label:"路北区",value:"130203"},{label:"古冶区",value:"130204"},{label:"开平区",value:"130205"},{label:"丰南区",value:"130207"},{label:"丰润区",value:"130208"},{label:"曹妃甸区",value:"130209"},{label:"滦县",value:"130223"},{label:"滦南县",value:"130224"},{label:"乐亭县",value:"130225"},{label:"迁西县",value:"130227"},{label:"玉田县",value:"130229"},{label:"唐山市芦台经济技术开发区",value:"130271"},{label:"唐山市汉沽管理区",value:"130272"},{label:"唐山高新技术产业开发区",value:"130273"},{label:"河北唐山海港经济开发区",value:"130274"},{label:"遵化市",value:"130281"},{label:"迁安市",value:"130283"}],[{label:"海港区",value:"130302"},{label:"山海关区",value:"130303"},{label:"北戴河区",value:"130304"},{label:"抚宁区",value:"130306"},{label:"青龙满族自治县",value:"130321"},{label:"昌黎县",value:"130322"},{label:"卢龙县",value:"130324"},{label:"秦皇岛市经济技术开发区",value:"130371"},{label:"北戴河新区",value:"130372"}],[{label:"邯山区",value:"130402"},{label:"丛台区",value:"130403"},{label:"复兴区",value:"130404"},{label:"峰峰矿区",value:"130406"},{label:"肥乡区",value:"130407"},{label:"永年区",value:"130408"},{label:"临漳县",value:"130423"},{label:"成安县",value:"130424"},{label:"大名县",value:"130425"},{label:"涉县",value:"130426"},{label:"磁县",value:"130427"},{label:"邱县",value:"130430"},{label:"鸡泽县",value:"130431"},{label:"广平县",value:"130432"},{label:"馆陶县",value:"130433"},{label:"魏县",value:"130434"},{label:"曲周县",value:"130435"},{label:"邯郸经济技术开发区",value:"130471"},{label:"邯郸冀南新区",value:"130473"},{label:"武安市",value:"130481"}],[{label:"桥东区",value:"130502"},{label:"桥西区",value:"130503"},{label:"邢台县",value:"130521"},{label:"临城县",value:"130522"},{label:"内丘县",value:"130523"},{label:"柏乡县",value:"130524"},{label:"隆尧县",value:"130525"},{label:"任县",value:"130526"},{label:"南和县",value:"130527"},{label:"宁晋县",value:"130528"},{label:"巨鹿县",value:"130529"},{label:"新河县",value:"130530"},{label:"广宗县",value:"130531"},{label:"平乡县",value:"130532"},{label:"威县",value:"130533"},{label:"清河县",value:"130534"},{label:"临西县",value:"130535"},{label:"河北邢台经济开发区",value:"130571"},{label:"南宫市",value:"130581"},{label:"沙河市",value:"130582"}],[{label:"竞秀区",value:"130602"},{label:"莲池区",value:"130606"},{label:"满城区",value:"130607"},{label:"清苑区",value:"130608"},{label:"徐水区",value:"130609"},{label:"涞水县",value:"130623"},{label:"阜平县",value:"130624"},{label:"定兴县",value:"130626"},{label:"唐县",value:"130627"},{label:"高阳县",value:"130628"},{label:"容城县",value:"130629"},{label:"涞源县",value:"130630"},{label:"望都县",value:"130631"},{label:"安新县",value:"130632"},{label:"易县",value:"130633"},{label:"曲阳县",value:"130634"},{label:"蠡县",value:"130635"},{label:"顺平县",value:"130636"},{label:"博野县",value:"130637"},{label:"雄县",value:"130638"},{label:"保定高新技术产业开发区",value:"130671"},{label:"保定白沟新城",value:"130672"},{label:"涿州市",value:"130681"},{label:"定州市",value:"130682"},{label:"安国市",value:"130683"},{label:"高碑店市",value:"130684"}],[{label:"桥东区",value:"130702"},{label:"桥西区",value:"130703"},{label:"宣化区",value:"130705"},{label:"下花园区",value:"130706"},{label:"万全区",value:"130708"},{label:"崇礼区",value:"130709"},{label:"张北县",value:"130722"},{label:"康保县",value:"130723"},{label:"沽源县",value:"130724"},{label:"尚义县",value:"130725"},{label:"蔚县",value:"130726"},{label:"阳原县",value:"130727"},{label:"怀安县",value:"130728"},{label:"怀来县",value:"130730"},{label:"涿鹿县",value:"130731"},{label:"赤城县",value:"130732"},{label:"张家口市高新技术产业开发区",value:"130771"},{label:"张家口市察北管理区",value:"130772"},{label:"张家口市塞北管理区",value:"130773"}],[{label:"双桥区",value:"130802"},{label:"双滦区",value:"130803"},{label:"鹰手营子矿区",value:"130804"},{label:"承德县",value:"130821"},{label:"兴隆县",value:"130822"},{label:"滦平县",value:"130824"},{label:"隆化县",value:"130825"},{label:"丰宁满族自治县",value:"130826"},{label:"宽城满族自治县",value:"130827"},{label:"围场满族蒙古族自治县",value:"130828"},{label:"承德高新技术产业开发区",value:"130871"},{label:"平泉市",value:"130881"}],[{label:"新华区",value:"130902"},{label:"运河区",value:"130903"},{label:"沧县",value:"130921"},{label:"青县",value:"130922"},{label:"东光县",value:"130923"},{label:"海兴县",value:"130924"},{label:"盐山县",value:"130925"},{label:"肃宁县",value:"130926"},{label:"南皮县",value:"130927"},{label:"吴桥县",value:"130928"},{label:"献县",value:"130929"},{label:"孟村回族自治县",value:"130930"},{label:"河北沧州经济开发区",value:"130971"},{label:"沧州高新技术产业开发区",value:"130972"},{label:"沧州渤海新区",value:"130973"},{label:"泊头市",value:"130981"},{label:"任丘市",value:"130982"},{label:"黄骅市",value:"130983"},{label:"河间市",value:"130984"}],[{label:"安次区",value:"131002"},{label:"广阳区",value:"131003"},{label:"固安县",value:"131022"},{label:"永清县",value:"131023"},{label:"香河县",value:"131024"},{label:"大城县",value:"131025"},{label:"文安县",value:"131026"},{label:"大厂回族自治县",value:"131028"},{label:"廊坊经济技术开发区",value:"131071"},{label:"霸州市",value:"131081"},{label:"三河市",value:"131082"}],[{label:"桃城区",value:"131102"},{label:"冀州区",value:"131103"},{label:"枣强县",value:"131121"},{label:"武邑县",value:"131122"},{label:"武强县",value:"131123"},{label:"饶阳县",value:"131124"},{label:"安平县",value:"131125"},{label:"故城县",value:"131126"},{label:"景县",value:"131127"},{label:"阜城县",value:"131128"},{label:"河北衡水经济开发区",value:"131171"},{label:"衡水滨湖新区",value:"131172"},{label:"深州市",value:"131182"}]],[[{label:"小店区",value:"140105"},{label:"迎泽区",value:"140106"},{label:"杏花岭区",value:"140107"},{label:"尖草坪区",value:"140108"},{label:"万柏林区",value:"140109"},{label:"晋源区",value:"140110"},{label:"清徐县",value:"140121"},{label:"阳曲县",value:"140122"},{label:"娄烦县",value:"140123"},{label:"山西转型综合改革示范区",value:"140171"},{label:"古交市",value:"140181"}],[{label:"城区",value:"140202"},{label:"矿区",value:"140203"},{label:"南郊区",value:"140211"},{label:"新荣区",value:"140212"},{label:"阳高县",value:"140221"},{label:"天镇县",value:"140222"},{label:"广灵县",value:"140223"},{label:"灵丘县",value:"140224"},{label:"浑源县",value:"140225"},{label:"左云县",value:"140226"},{label:"大同县",value:"140227"},{label:"山西大同经济开发区",value:"140271"}],[{label:"城区",value:"140302"},{label:"矿区",value:"140303"},{label:"郊区",value:"140311"},{label:"平定县",value:"140321"},{label:"盂县",value:"140322"},{label:"山西阳泉经济开发区",value:"140371"}],[{label:"城区",value:"140402"},{label:"郊区",value:"140411"},{label:"长治县",value:"140421"},{label:"襄垣县",value:"140423"},{label:"屯留县",value:"140424"},{label:"平顺县",value:"140425"},{label:"黎城县",value:"140426"},{label:"壶关县",value:"140427"},{label:"长子县",value:"140428"},{label:"武乡县",value:"140429"},{label:"沁县",value:"140430"},{label:"沁源县",value:"140431"},{label:"山西长治高新技术产业园区",value:"140471"},{label:"潞城市",value:"140481"}],[{label:"城区",value:"140502"},{label:"沁水县",value:"140521"},{label:"阳城县",value:"140522"},{label:"陵川县",value:"140524"},{label:"泽州县",value:"140525"},{label:"高平市",value:"140581"}],[{label:"朔城区",value:"140602"},{label:"平鲁区",value:"140603"},{label:"山阴县",value:"140621"},{label:"应县",value:"140622"},{label:"右玉县",value:"140623"},{label:"怀仁县",value:"140624"},{label:"山西朔州经济开发区",value:"140671"}],[{label:"榆次区",value:"140702"},{label:"榆社县",value:"140721"},{label:"左权县",value:"140722"},{label:"和顺县",value:"140723"},{label:"昔阳县",value:"140724"},{label:"寿阳县",value:"140725"},{label:"太谷县",value:"140726"},{label:"祁县",value:"140727"},{label:"平遥县",value:"140728"},{label:"灵石县",value:"140729"},{label:"介休市",value:"140781"}],[{label:"盐湖区",value:"140802"},{label:"临猗县",value:"140821"},{label:"万荣县",value:"140822"},{label:"闻喜县",value:"140823"},{label:"稷山县",value:"140824"},{label:"新绛县",value:"140825"},{label:"绛县",value:"140826"},{label:"垣曲县",value:"140827"},{label:"夏县",value:"140828"},{label:"平陆县",value:"140829"},{label:"芮城县",value:"140830"},{label:"永济市",value:"140881"},{label:"河津市",value:"140882"}],[{label:"忻府区",value:"140902"},{label:"定襄县",value:"140921"},{label:"五台县",value:"140922"},{label:"代县",value:"140923"},{label:"繁峙县",value:"140924"},{label:"宁武县",value:"140925"},{label:"静乐县",value:"140926"},{label:"神池县",value:"140927"},{label:"五寨县",value:"140928"},{label:"岢岚县",value:"140929"},{label:"河曲县",value:"140930"},{label:"保德县",value:"140931"},{label:"偏关县",value:"140932"},{label:"五台山风景名胜区",value:"140971"},{label:"原平市",value:"140981"}],[{label:"尧都区",value:"141002"},{label:"曲沃县",value:"141021"},{label:"翼城县",value:"141022"},{label:"襄汾县",value:"141023"},{label:"洪洞县",value:"141024"},{label:"古县",value:"141025"},{label:"安泽县",value:"141026"},{label:"浮山县",value:"141027"},{label:"吉县",value:"141028"},{label:"乡宁县",value:"141029"},{label:"大宁县",value:"141030"},{label:"隰县",value:"141031"},{label:"永和县",value:"141032"},{label:"蒲县",value:"141033"},{label:"汾西县",value:"141034"},{label:"侯马市",value:"141081"},{label:"霍州市",value:"141082"}],[{label:"离石区",value:"141102"},{label:"文水县",value:"141121"},{label:"交城县",value:"141122"},{label:"兴县",value:"141123"},{label:"临县",value:"141124"},{label:"柳林县",value:"141125"},{label:"石楼县",value:"141126"},{label:"岚县",value:"141127"},{label:"方山县",value:"141128"},{label:"中阳县",value:"141129"},{label:"交口县",value:"141130"},{label:"孝义市",value:"141181"},{label:"汾阳市",value:"141182"}]],[[{label:"新城区",value:"150102"},{label:"回民区",value:"150103"},{label:"玉泉区",value:"150104"},{label:"赛罕区",value:"150105"},{label:"土默特左旗",value:"150121"},{label:"托克托县",value:"150122"},{label:"和林格尔县",value:"150123"},{label:"清水河县",value:"150124"},{label:"武川县",value:"150125"},{label:"呼和浩特金海工业园区",value:"150171"},{label:"呼和浩特经济技术开发区",value:"150172"}],[{label:"东河区",value:"150202"},{label:"昆都仑区",value:"150203"},{label:"青山区",value:"150204"},{label:"石拐区",value:"150205"},{label:"白云鄂博矿区",value:"150206"},{label:"九原区",value:"150207"},{label:"土默特右旗",value:"150221"},{label:"固阳县",value:"150222"},{label:"达尔罕茂明安联合旗",value:"150223"},{label:"包头稀土高新技术产业开发区",value:"150271"}],[{label:"海勃湾区",value:"150302"},{label:"海南区",value:"150303"},{label:"乌达区",value:"150304"}],[{label:"红山区",value:"150402"},{label:"元宝山区",value:"150403"},{label:"松山区",value:"150404"},{label:"阿鲁科尔沁旗",value:"150421"},{label:"巴林左旗",value:"150422"},{label:"巴林右旗",value:"150423"},{label:"林西县",value:"150424"},{label:"克什克腾旗",value:"150425"},{label:"翁牛特旗",value:"150426"},{label:"喀喇沁旗",value:"150428"},{label:"宁城县",value:"150429"},{label:"敖汉旗",value:"150430"}],[{label:"科尔沁区",value:"150502"},{label:"科尔沁左翼中旗",value:"150521"},{label:"科尔沁左翼后旗",value:"150522"},{label:"开鲁县",value:"150523"},{label:"库伦旗",value:"150524"},{label:"奈曼旗",value:"150525"},{label:"扎鲁特旗",value:"150526"},{label:"通辽经济技术开发区",value:"150571"},{label:"霍林郭勒市",value:"150581"}],[{label:"东胜区",value:"150602"},{label:"康巴什区",value:"150603"},{label:"达拉特旗",value:"150621"},{label:"准格尔旗",value:"150622"},{label:"鄂托克前旗",value:"150623"},{label:"鄂托克旗",value:"150624"},{label:"杭锦旗",value:"150625"},{label:"乌审旗",value:"150626"},{label:"伊金霍洛旗",value:"150627"}],[{label:"海拉尔区",value:"150702"},{label:"扎赉诺尔区",value:"150703"},{label:"阿荣旗",value:"150721"},{label:"莫力达瓦达斡尔族自治旗",value:"150722"},{label:"鄂伦春自治旗",value:"150723"},{label:"鄂温克族自治旗",value:"150724"},{label:"陈巴尔虎旗",value:"150725"},{label:"新巴尔虎左旗",value:"150726"},{label:"新巴尔虎右旗",value:"150727"},{label:"满洲里市",value:"150781"},{label:"牙克石市",value:"150782"},{label:"扎兰屯市",value:"150783"},{label:"额尔古纳市",value:"150784"},{label:"根河市",value:"150785"}],[{label:"临河区",value:"150802"},{label:"五原县",value:"150821"},{label:"磴口县",value:"150822"},{label:"乌拉特前旗",value:"150823"},{label:"乌拉特中旗",value:"150824"},{label:"乌拉特后旗",value:"150825"},{label:"杭锦后旗",value:"150826"}],[{label:"集宁区",value:"150902"},{label:"卓资县",value:"150921"},{label:"化德县",value:"150922"},{label:"商都县",value:"150923"},{label:"兴和县",value:"150924"},{label:"凉城县",value:"150925"},{label:"察哈尔右翼前旗",value:"150926"},{label:"察哈尔右翼中旗",value:"150927"},{label:"察哈尔右翼后旗",value:"150928"},{label:"四子王旗",value:"150929"},{label:"丰镇市",value:"150981"}],[{label:"乌兰浩特市",value:"152201"},{label:"阿尔山市",value:"152202"},{label:"科尔沁右翼前旗",value:"152221"},{label:"科尔沁右翼中旗",value:"152222"},{label:"扎赉特旗",value:"152223"},{label:"突泉县",value:"152224"}],[{label:"二连浩特市",value:"152501"},{label:"锡林浩特市",value:"152502"},{label:"阿巴嘎旗",value:"152522"},{label:"苏尼特左旗",value:"152523"},{label:"苏尼特右旗",value:"152524"},{label:"东乌珠穆沁旗",value:"152525"},{label:"西乌珠穆沁旗",value:"152526"},{label:"太仆寺旗",value:"152527"},{label:"镶黄旗",value:"152528"},{label:"正镶白旗",value:"152529"},{label:"正蓝旗",value:"152530"},{label:"多伦县",value:"152531"},{label:"乌拉盖管委会",value:"152571"}],[{label:"阿拉善左旗",value:"152921"},{label:"阿拉善右旗",value:"152922"},{label:"额济纳旗",value:"152923"},{label:"内蒙古阿拉善经济开发区",value:"152971"}]],[[{label:"和平区",value:"210102"},{label:"沈河区",value:"210103"},{label:"大东区",value:"210104"},{label:"皇姑区",value:"210105"},{label:"铁西区",value:"210106"},{label:"苏家屯区",value:"210111"},{label:"浑南区",value:"210112"},{label:"沈北新区",value:"210113"},{label:"于洪区",value:"210114"},{label:"辽中区",value:"210115"},{label:"康平县",value:"210123"},{label:"法库县",value:"210124"},{label:"新民市",value:"210181"}],[{label:"中山区",value:"210202"},{label:"西岗区",value:"210203"},{label:"沙河口区",value:"210204"},{label:"甘井子区",value:"210211"},{label:"旅顺口区",value:"210212"},{label:"金州区",value:"210213"},{label:"普兰店区",value:"210214"},{label:"长海县",value:"210224"},{label:"瓦房店市",value:"210281"},{label:"庄河市",value:"210283"}],[{label:"铁东区",value:"210302"},{label:"铁西区",value:"210303"},{label:"立山区",value:"210304"},{label:"千山区",value:"210311"},{label:"台安县",value:"210321"},{label:"岫岩满族自治县",value:"210323"},{label:"海城市",value:"210381"}],[{label:"新抚区",value:"210402"},{label:"东洲区",value:"210403"},{label:"望花区",value:"210404"},{label:"顺城区",value:"210411"},{label:"抚顺县",value:"210421"},{label:"新宾满族自治县",value:"210422"},{label:"清原满族自治县",value:"210423"}],[{label:"平山区",value:"210502"},{label:"溪湖区",value:"210503"},{label:"明山区",value:"210504"},{label:"南芬区",value:"210505"},{label:"本溪满族自治县",value:"210521"},{label:"桓仁满族自治县",value:"210522"}],[{label:"元宝区",value:"210602"},{label:"振兴区",value:"210603"},{label:"振安区",value:"210604"},{label:"宽甸满族自治县",value:"210624"},{label:"东港市",value:"210681"},{label:"凤城市",value:"210682"}],[{label:"古塔区",value:"210702"},{label:"凌河区",value:"210703"},{label:"太和区",value:"210711"},{label:"黑山县",value:"210726"},{label:"义县",value:"210727"},{label:"凌海市",value:"210781"},{label:"北镇市",value:"210782"}],[{label:"站前区",value:"210802"},{label:"西市区",value:"210803"},{label:"鲅鱼圈区",value:"210804"},{label:"老边区",value:"210811"},{label:"盖州市",value:"210881"},{label:"大石桥市",value:"210882"}],[{label:"海州区",value:"210902"},{label:"新邱区",value:"210903"},{label:"太平区",value:"210904"},{label:"清河门区",value:"210905"},{label:"细河区",value:"210911"},{label:"阜新蒙古族自治县",value:"210921"},{label:"彰武县",value:"210922"}],[{label:"白塔区",value:"211002"},{label:"文圣区",value:"211003"},{label:"宏伟区",value:"211004"},{label:"弓长岭区",value:"211005"},{label:"太子河区",value:"211011"},{label:"辽阳县",value:"211021"},{label:"灯塔市",value:"211081"}],[{label:"双台子区",value:"211102"},{label:"兴隆台区",value:"211103"},{label:"大洼区",value:"211104"},{label:"盘山县",value:"211122"}],[{label:"银州区",value:"211202"},{label:"清河区",value:"211204"},{label:"铁岭县",value:"211221"},{label:"西丰县",value:"211223"},{label:"昌图县",value:"211224"},{label:"调兵山市",value:"211281"},{label:"开原市",value:"211282"}],[{label:"双塔区",value:"211302"},{label:"龙城区",value:"211303"},{label:"朝阳县",value:"211321"},{label:"建平县",value:"211322"},{label:"喀喇沁左翼蒙古族自治县",value:"211324"},{label:"北票市",value:"211381"},{label:"凌源市",value:"211382"}],[{label:"连山区",value:"211402"},{label:"龙港区",value:"211403"},{label:"南票区",value:"211404"},{label:"绥中县",value:"211421"},{label:"建昌县",value:"211422"},{label:"兴城市",value:"211481"}]],[[{label:"南关区",value:"220102"},{label:"宽城区",value:"220103"},{label:"朝阳区",value:"220104"},{label:"二道区",value:"220105"},{label:"绿园区",value:"220106"},{label:"双阳区",value:"220112"},{label:"九台区",value:"220113"},{label:"农安县",value:"220122"},{label:"长春经济技术开发区",value:"220171"},{label:"长春净月高新技术产业开发区",value:"220172"},{label:"长春高新技术产业开发区",value:"220173"},{label:"长春汽车经济技术开发区",value:"220174"},{label:"榆树市",value:"220182"},{label:"德惠市",value:"220183"}],[{label:"昌邑区",value:"220202"},{label:"龙潭区",value:"220203"},{label:"船营区",value:"220204"},{label:"丰满区",value:"220211"},{label:"永吉县",value:"220221"},{label:"吉林经济开发区",value:"220271"},{label:"吉林高新技术产业开发区",value:"220272"},{label:"吉林中国新加坡食品区",value:"220273"},{label:"蛟河市",value:"220281"},{label:"桦甸市",value:"220282"},{label:"舒兰市",value:"220283"},{label:"磐石市",value:"220284"}],[{label:"铁西区",value:"220302"},{label:"铁东区",value:"220303"},{label:"梨树县",value:"220322"},{label:"伊通满族自治县",value:"220323"},{label:"公主岭市",value:"220381"},{label:"双辽市",value:"220382"}],[{label:"龙山区",value:"220402"},{label:"西安区",value:"220403"},{label:"东丰县",value:"220421"},{label:"东辽县",value:"220422"}],[{label:"东昌区",value:"220502"},{label:"二道江区",value:"220503"},{label:"通化县",value:"220521"},{label:"辉南县",value:"220523"},{label:"柳河县",value:"220524"},{label:"梅河口市",value:"220581"},{label:"集安市",value:"220582"}],[{label:"浑江区",value:"220602"},{label:"江源区",value:"220605"},{label:"抚松县",value:"220621"},{label:"靖宇县",value:"220622"},{label:"长白朝鲜族自治县",value:"220623"},{label:"临江市",value:"220681"}],[{label:"宁江区",value:"220702"},{label:"前郭尔罗斯蒙古族自治县",value:"220721"},{label:"长岭县",value:"220722"},{label:"乾安县",value:"220723"},{label:"吉林松原经济开发区",value:"220771"},{label:"扶余市",value:"220781"}],[{label:"洮北区",value:"220802"},{label:"镇赉县",value:"220821"},{label:"通榆县",value:"220822"},{label:"吉林白城经济开发区",value:"220871"},{label:"洮南市",value:"220881"},{label:"大安市",value:"220882"}],[{label:"延吉市",value:"222401"},{label:"图们市",value:"222402"},{label:"敦化市",value:"222403"},{label:"珲春市",value:"222404"},{label:"龙井市",value:"222405"},{label:"和龙市",value:"222406"},{label:"汪清县",value:"222424"},{label:"安图县",value:"222426"}]],[[{label:"道里区",value:"230102"},{label:"南岗区",value:"230103"},{label:"道外区",value:"230104"},{label:"平房区",value:"230108"},{label:"松北区",value:"230109"},{label:"香坊区",value:"230110"},{label:"呼兰区",value:"230111"},{label:"阿城区",value:"230112"},{label:"双城区",value:"230113"},{label:"依兰县",value:"230123"},{label:"方正县",value:"230124"},{label:"宾县",value:"230125"},{label:"巴彦县",value:"230126"},{label:"木兰县",value:"230127"},{label:"通河县",value:"230128"},{label:"延寿县",value:"230129"},{label:"尚志市",value:"230183"},{label:"五常市",value:"230184"}],[{label:"龙沙区",value:"230202"},{label:"建华区",value:"230203"},{label:"铁锋区",value:"230204"},{label:"昂昂溪区",value:"230205"},{label:"富拉尔基区",value:"230206"},{label:"碾子山区",value:"230207"},{label:"梅里斯达斡尔族区",value:"230208"},{label:"龙江县",value:"230221"},{label:"依安县",value:"230223"},{label:"泰来县",value:"230224"},{label:"甘南县",value:"230225"},{label:"富裕县",value:"230227"},{label:"克山县",value:"230229"},{label:"克东县",value:"230230"},{label:"拜泉县",value:"230231"},{label:"讷河市",value:"230281"}],[{label:"鸡冠区",value:"230302"},{label:"恒山区",value:"230303"},{label:"滴道区",value:"230304"},{label:"梨树区",value:"230305"},{label:"城子河区",value:"230306"},{label:"麻山区",value:"230307"},{label:"鸡东县",value:"230321"},{label:"虎林市",value:"230381"},{label:"密山市",value:"230382"}],[{label:"向阳区",value:"230402"},{label:"工农区",value:"230403"},{label:"南山区",value:"230404"},{label:"兴安区",value:"230405"},{label:"东山区",value:"230406"},{label:"兴山区",value:"230407"},{label:"萝北县",value:"230421"},{label:"绥滨县",value:"230422"}],[{label:"尖山区",value:"230502"},{label:"岭东区",value:"230503"},{label:"四方台区",value:"230505"},{label:"宝山区",value:"230506"},{label:"集贤县",value:"230521"},{label:"友谊县",value:"230522"},{label:"宝清县",value:"230523"},{label:"饶河县",value:"230524"}],[{label:"萨尔图区",value:"230602"},{label:"龙凤区",value:"230603"},{label:"让胡路区",value:"230604"},{label:"红岗区",value:"230605"},{label:"大同区",value:"230606"},{label:"肇州县",value:"230621"},{label:"肇源县",value:"230622"},{label:"林甸县",value:"230623"},{label:"杜尔伯特蒙古族自治县",value:"230624"},{label:"大庆高新技术产业开发区",value:"230671"}],[{label:"伊春区",value:"230702"},{label:"南岔区",value:"230703"},{label:"友好区",value:"230704"},{label:"西林区",value:"230705"},{label:"翠峦区",value:"230706"},{label:"新青区",value:"230707"},{label:"美溪区",value:"230708"},{label:"金山屯区",value:"230709"},{label:"五营区",value:"230710"},{label:"乌马河区",value:"230711"},{label:"汤旺河区",value:"230712"},{label:"带岭区",value:"230713"},{label:"乌伊岭区",value:"230714"},{label:"红星区",value:"230715"},{label:"上甘岭区",value:"230716"},{label:"嘉荫县",value:"230722"},{label:"铁力市",value:"230781"}],[{label:"向阳区",value:"230803"},{label:"前进区",value:"230804"},{label:"东风区",value:"230805"},{label:"郊区",value:"230811"},{label:"桦南县",value:"230822"},{label:"桦川县",value:"230826"},{label:"汤原县",value:"230828"},{label:"同江市",value:"230881"},{label:"富锦市",value:"230882"},{label:"抚远市",value:"230883"}],[{label:"新兴区",value:"230902"},{label:"桃山区",value:"230903"},{label:"茄子河区",value:"230904"},{label:"勃利县",value:"230921"}],[{label:"东安区",value:"231002"},{label:"阳明区",value:"231003"},{label:"爱民区",value:"231004"},{label:"西安区",value:"231005"},{label:"林口县",value:"231025"},{label:"牡丹江经济技术开发区",value:"231071"},{label:"绥芬河市",value:"231081"},{label:"海林市",value:"231083"},{label:"宁安市",value:"231084"},{label:"穆棱市",value:"231085"},{label:"东宁市",value:"231086"}],[{label:"爱辉区",value:"231102"},{label:"嫩江县",value:"231121"},{label:"逊克县",value:"231123"},{label:"孙吴县",value:"231124"},{label:"北安市",value:"231181"},{label:"五大连池市",value:"231182"}],[{label:"北林区",value:"231202"},{label:"望奎县",value:"231221"},{label:"兰西县",value:"231222"},{label:"青冈县",value:"231223"},{label:"庆安县",value:"231224"},{label:"明水县",value:"231225"},{label:"绥棱县",value:"231226"},{label:"安达市",value:"231281"},{label:"肇东市",value:"231282"},{label:"海伦市",value:"231283"}],[{label:"加格达奇区",value:"232701"},{label:"松岭区",value:"232702"},{label:"新林区",value:"232703"},{label:"呼中区",value:"232704"},{label:"呼玛县",value:"232721"},{label:"塔河县",value:"232722"},{label:"漠河县",value:"232723"}]],[[{label:"黄浦区",value:"310101"},{label:"徐汇区",value:"310104"},{label:"长宁区",value:"310105"},{label:"静安区",value:"310106"},{label:"普陀区",value:"310107"},{label:"虹口区",value:"310109"},{label:"杨浦区",value:"310110"},{label:"闵行区",value:"310112"},{label:"宝山区",value:"310113"},{label:"嘉定区",value:"310114"},{label:"浦东新区",value:"310115"},{label:"金山区",value:"310116"},{label:"松江区",value:"310117"},{label:"青浦区",value:"310118"},{label:"奉贤区",value:"310120"},{label:"崇明区",value:"310151"}]],[[{label:"玄武区",value:"320102"},{label:"秦淮区",value:"320104"},{label:"建邺区",value:"320105"},{label:"鼓楼区",value:"320106"},{label:"浦口区",value:"320111"},{label:"栖霞区",value:"320113"},{label:"雨花台区",value:"320114"},{label:"江宁区",value:"320115"},{label:"六合区",value:"320116"},{label:"溧水区",value:"320117"},{label:"高淳区",value:"320118"}],[{label:"锡山区",value:"320205"},{label:"惠山区",value:"320206"},{label:"滨湖区",value:"320211"},{label:"梁溪区",value:"320213"},{label:"新吴区",value:"320214"},{label:"江阴市",value:"320281"},{label:"宜兴市",value:"320282"}],[{label:"鼓楼区",value:"320302"},{label:"云龙区",value:"320303"},{label:"贾汪区",value:"320305"},{label:"泉山区",value:"320311"},{label:"铜山区",value:"320312"},{label:"丰县",value:"320321"},{label:"沛县",value:"320322"},{label:"睢宁县",value:"320324"},{label:"徐州经济技术开发区",value:"320371"},{label:"新沂市",value:"320381"},{label:"邳州市",value:"320382"}],[{label:"天宁区",value:"320402"},{label:"钟楼区",value:"320404"},{label:"新北区",value:"320411"},{label:"武进区",value:"320412"},{label:"金坛区",value:"320413"},{label:"溧阳市",value:"320481"}],[{label:"虎丘区",value:"320505"},{label:"吴中区",value:"320506"},{label:"相城区",value:"320507"},{label:"姑苏区",value:"320508"},{label:"吴江区",value:"320509"},{label:"苏州工业园区",value:"320571"},{label:"常熟市",value:"320581"},{label:"张家港市",value:"320582"},{label:"昆山市",value:"320583"},{label:"太仓市",value:"320585"}],[{label:"崇川区",value:"320602"},{label:"港闸区",value:"320611"},{label:"通州区",value:"320612"},{label:"海安县",value:"320621"},{label:"如东县",value:"320623"},{label:"南通经济技术开发区",value:"320671"},{label:"启东市",value:"320681"},{label:"如皋市",value:"320682"},{label:"海门市",value:"320684"}],[{label:"连云区",value:"320703"},{label:"海州区",value:"320706"},{label:"赣榆区",value:"320707"},{label:"东海县",value:"320722"},{label:"灌云县",value:"320723"},{label:"灌南县",value:"320724"},{label:"连云港经济技术开发区",value:"320771"},{label:"连云港高新技术产业开发区",value:"320772"}],[{label:"淮安区",value:"320803"},{label:"淮阴区",value:"320804"},{label:"清江浦区",value:"320812"},{label:"洪泽区",value:"320813"},{label:"涟水县",value:"320826"},{label:"盱眙县",value:"320830"},{label:"金湖县",value:"320831"},{label:"淮安经济技术开发区",value:"320871"}],[{label:"亭湖区",value:"320902"},{label:"盐都区",value:"320903"},{label:"大丰区",value:"320904"},{label:"响水县",value:"320921"},{label:"滨海县",value:"320922"},{label:"阜宁县",value:"320923"},{label:"射阳县",value:"320924"},{label:"建湖县",value:"320925"},{label:"盐城经济技术开发区",value:"320971"},{label:"东台市",value:"320981"}],[{label:"广陵区",value:"321002"},{label:"邗江区",value:"321003"},{label:"江都区",value:"321012"},{label:"宝应县",value:"321023"},{label:"扬州经济技术开发区",value:"321071"},{label:"仪征市",value:"321081"},{label:"高邮市",value:"321084"}],[{label:"京口区",value:"321102"},{label:"润州区",value:"321111"},{label:"丹徒区",value:"321112"},{label:"镇江新区",value:"321171"},{label:"丹阳市",value:"321181"},{label:"扬中市",value:"321182"},{label:"句容市",value:"321183"}],[{label:"海陵区",value:"321202"},{label:"高港区",value:"321203"},{label:"姜堰区",value:"321204"},{label:"泰州医药高新技术产业开发区",value:"321271"},{label:"兴化市",value:"321281"},{label:"靖江市",value:"321282"},{label:"泰兴市",value:"321283"}],[{label:"宿城区",value:"321302"},{label:"宿豫区",value:"321311"},{label:"沭阳县",value:"321322"},{label:"泗阳县",value:"321323"},{label:"泗洪县",value:"321324"},{label:"宿迁经济技术开发区",value:"321371"}]],[[{label:"上城区",value:"330102"},{label:"下城区",value:"330103"},{label:"江干区",value:"330104"},{label:"拱墅区",value:"330105"},{label:"西湖区",value:"330106"},{label:"滨江区",value:"330108"},{label:"萧山区",value:"330109"},{label:"余杭区",value:"330110"},{label:"富阳区",value:"330111"},{label:"临安区",value:"330112"},{label:"桐庐县",value:"330122"},{label:"淳安县",value:"330127"},{label:"建德市",value:"330182"}],[{label:"海曙区",value:"330203"},{label:"江北区",value:"330205"},{label:"北仑区",value:"330206"},{label:"镇海区",value:"330211"},{label:"鄞州区",value:"330212"},{label:"奉化区",value:"330213"},{label:"象山县",value:"330225"},{label:"宁海县",value:"330226"},{label:"余姚市",value:"330281"},{label:"慈溪市",value:"330282"}],[{label:"鹿城区",value:"330302"},{label:"龙湾区",value:"330303"},{label:"瓯海区",value:"330304"},{label:"洞头区",value:"330305"},{label:"永嘉县",value:"330324"},{label:"平阳县",value:"330326"},{label:"苍南县",value:"330327"},{label:"文成县",value:"330328"},{label:"泰顺县",value:"330329"},{label:"温州经济技术开发区",value:"330371"},{label:"瑞安市",value:"330381"},{label:"乐清市",value:"330382"}],[{label:"南湖区",value:"330402"},{label:"秀洲区",value:"330411"},{label:"嘉善县",value:"330421"},{label:"海盐县",value:"330424"},{label:"海宁市",value:"330481"},{label:"平湖市",value:"330482"},{label:"桐乡市",value:"330483"}],[{label:"吴兴区",value:"330502"},{label:"南浔区",value:"330503"},{label:"德清县",value:"330521"},{label:"长兴县",value:"330522"},{label:"安吉县",value:"330523"}],[{label:"越城区",value:"330602"},{label:"柯桥区",value:"330603"},{label:"上虞区",value:"330604"},{label:"新昌县",value:"330624"},{label:"诸暨市",value:"330681"},{label:"嵊州市",value:"330683"}],[{label:"婺城区",value:"330702"},{label:"金东区",value:"330703"},{label:"武义县",value:"330723"},{label:"浦江县",value:"330726"},{label:"磐安县",value:"330727"},{label:"兰溪市",value:"330781"},{label:"义乌市",value:"330782"},{label:"东阳市",value:"330783"},{label:"永康市",value:"330784"}],[{label:"柯城区",value:"330802"},{label:"衢江区",value:"330803"},{label:"常山县",value:"330822"},{label:"开化县",value:"330824"},{label:"龙游县",value:"330825"},{label:"江山市",value:"330881"}],[{label:"定海区",value:"330902"},{label:"普陀区",value:"330903"},{label:"岱山县",value:"330921"},{label:"嵊泗县",value:"330922"}],[{label:"椒江区",value:"331002"},{label:"黄岩区",value:"331003"},{label:"路桥区",value:"331004"},{label:"三门县",value:"331022"},{label:"天台县",value:"331023"},{label:"仙居县",value:"331024"},{label:"温岭市",value:"331081"},{label:"临海市",value:"331082"},{label:"玉环市",value:"331083"}],[{label:"莲都区",value:"331102"},{label:"青田县",value:"331121"},{label:"缙云县",value:"331122"},{label:"遂昌县",value:"331123"},{label:"松阳县",value:"331124"},{label:"云和县",value:"331125"},{label:"庆元县",value:"331126"},{label:"景宁畲族自治县",value:"331127"},{label:"龙泉市",value:"331181"}]],[[{label:"瑶海区",value:"340102"},{label:"庐阳区",value:"340103"},{label:"蜀山区",value:"340104"},{label:"包河区",value:"340111"},{label:"长丰县",value:"340121"},{label:"肥东县",value:"340122"},{label:"肥西县",value:"340123"},{label:"庐江县",value:"340124"},{label:"合肥高新技术产业开发区",value:"340171"},{label:"合肥经济技术开发区",value:"340172"},{label:"合肥新站高新技术产业开发区",value:"340173"},{label:"巢湖市",value:"340181"}],[{label:"镜湖区",value:"340202"},{label:"弋江区",value:"340203"},{label:"鸠江区",value:"340207"},{label:"三山区",value:"340208"},{label:"芜湖县",value:"340221"},{label:"繁昌县",value:"340222"},{label:"南陵县",value:"340223"},{label:"无为县",value:"340225"},{label:"芜湖经济技术开发区",value:"340271"},{label:"安徽芜湖长江大桥经济开发区",value:"340272"}],[{label:"龙子湖区",value:"340302"},{label:"蚌山区",value:"340303"},{label:"禹会区",value:"340304"},{label:"淮上区",value:"340311"},{label:"怀远县",value:"340321"},{label:"五河县",value:"340322"},{label:"固镇县",value:"340323"},{label:"蚌埠市高新技术开发区",value:"340371"},{label:"蚌埠市经济开发区",value:"340372"}],[{label:"大通区",value:"340402"},{label:"田家庵区",value:"340403"},{label:"谢家集区",value:"340404"},{label:"八公山区",value:"340405"},{label:"潘集区",value:"340406"},{label:"凤台县",value:"340421"},{label:"寿县",value:"340422"}],[{label:"花山区",value:"340503"},{label:"雨山区",value:"340504"},{label:"博望区",value:"340506"},{label:"当涂县",value:"340521"},{label:"含山县",value:"340522"},{label:"和县",value:"340523"}],[{label:"杜集区",value:"340602"},{label:"相山区",value:"340603"},{label:"烈山区",value:"340604"},{label:"濉溪县",value:"340621"}],[{label:"铜官区",value:"340705"},{label:"义安区",value:"340706"},{label:"郊区",value:"340711"},{label:"枞阳县",value:"340722"}],[{label:"迎江区",value:"340802"},{label:"大观区",value:"340803"},{label:"宜秀区",value:"340811"},{label:"怀宁县",value:"340822"},{label:"潜山县",value:"340824"},{label:"太湖县",value:"340825"},{label:"宿松县",value:"340826"},{label:"望江县",value:"340827"},{label:"岳西县",value:"340828"},{label:"安徽安庆经济开发区",value:"340871"},{label:"桐城市",value:"340881"}],[{label:"屯溪区",value:"341002"},{label:"黄山区",value:"341003"},{label:"徽州区",value:"341004"},{label:"歙县",value:"341021"},{label:"休宁县",value:"341022"},{label:"黟县",value:"341023"},{label:"祁门县",value:"341024"}],[{label:"琅琊区",value:"341102"},{label:"南谯区",value:"341103"},{label:"来安县",value:"341122"},{label:"全椒县",value:"341124"},{label:"定远县",value:"341125"},{label:"凤阳县",value:"341126"},{label:"苏滁现代产业园",value:"341171"},{label:"滁州经济技术开发区",value:"341172"},{label:"天长市",value:"341181"},{label:"明光市",value:"341182"}],[{label:"颍州区",value:"341202"},{label:"颍东区",value:"341203"},{label:"颍泉区",value:"341204"},{label:"临泉县",value:"341221"},{label:"太和县",value:"341222"},{label:"阜南县",value:"341225"},{label:"颍上县",value:"341226"},{label:"阜阳合肥现代产业园区",value:"341271"},{label:"阜阳经济技术开发区",value:"341272"},{label:"界首市",value:"341282"}],[{label:"埇桥区",value:"341302"},{label:"砀山县",value:"341321"},{label:"萧县",value:"341322"},{label:"灵璧县",value:"341323"},{label:"泗县",value:"341324"},{label:"宿州马鞍山现代产业园区",value:"341371"},{label:"宿州经济技术开发区",value:"341372"}],[{label:"金安区",value:"341502"},{label:"裕安区",value:"341503"},{label:"叶集区",value:"341504"},{label:"霍邱县",value:"341522"},{label:"舒城县",value:"341523"},{label:"金寨县",value:"341524"},{label:"霍山县",value:"341525"}],[{label:"谯城区",value:"341602"},{label:"涡阳县",value:"341621"},{label:"蒙城县",value:"341622"},{label:"利辛县",value:"341623"}],[{label:"贵池区",value:"341702"},{label:"东至县",value:"341721"},{label:"石台县",value:"341722"},{label:"青阳县",value:"341723"}],[{label:"宣州区",value:"341802"},{label:"郎溪县",value:"341821"},{label:"广德县",value:"341822"},{label:"泾县",value:"341823"},{label:"绩溪县",value:"341824"},{label:"旌德县",value:"341825"},{label:"宣城市经济开发区",value:"341871"},{label:"宁国市",value:"341881"}]],[[{label:"鼓楼区",value:"350102"},{label:"台江区",value:"350103"},{label:"仓山区",value:"350104"},{label:"马尾区",value:"350105"},{label:"晋安区",value:"350111"},{label:"闽侯县",value:"350121"},{label:"连江县",value:"350122"},{label:"罗源县",value:"350123"},{label:"闽清县",value:"350124"},{label:"永泰县",value:"350125"},{label:"平潭县",value:"350128"},{label:"福清市",value:"350181"},{label:"长乐市",value:"350182"}],[{label:"思明区",value:"350203"},{label:"海沧区",value:"350205"},{label:"湖里区",value:"350206"},{label:"集美区",value:"350211"},{label:"同安区",value:"350212"},{label:"翔安区",value:"350213"}],[{label:"城厢区",value:"350302"},{label:"涵江区",value:"350303"},{label:"荔城区",value:"350304"},{label:"秀屿区",value:"350305"},{label:"仙游县",value:"350322"}],[{label:"梅列区",value:"350402"},{label:"三元区",value:"350403"},{label:"明溪县",value:"350421"},{label:"清流县",value:"350423"},{label:"宁化县",value:"350424"},{label:"大田县",value:"350425"},{label:"尤溪县",value:"350426"},{label:"沙县",value:"350427"},{label:"将乐县",value:"350428"},{label:"泰宁县",value:"350429"},{label:"建宁县",value:"350430"},{label:"永安市",value:"350481"}],[{label:"鲤城区",value:"350502"},{label:"丰泽区",value:"350503"},{label:"洛江区",value:"350504"},{label:"泉港区",value:"350505"},{label:"惠安县",value:"350521"},{label:"安溪县",value:"350524"},{label:"永春县",value:"350525"},{label:"德化县",value:"350526"},{label:"金门县",value:"350527"},{label:"石狮市",value:"350581"},{label:"晋江市",value:"350582"},{label:"南安市",value:"350583"}],[{label:"芗城区",value:"350602"},{label:"龙文区",value:"350603"},{label:"云霄县",value:"350622"},{label:"漳浦县",value:"350623"},{label:"诏安县",value:"350624"},{label:"长泰县",value:"350625"},{label:"东山县",value:"350626"},{label:"南靖县",value:"350627"},{label:"平和县",value:"350628"},{label:"华安县",value:"350629"},{label:"龙海市",value:"350681"}],[{label:"延平区",value:"350702"},{label:"建阳区",value:"350703"},{label:"顺昌县",value:"350721"},{label:"浦城县",value:"350722"},{label:"光泽县",value:"350723"},{label:"松溪县",value:"350724"},{label:"政和县",value:"350725"},{label:"邵武市",value:"350781"},{label:"武夷山市",value:"350782"},{label:"建瓯市",value:"350783"}],[{label:"新罗区",value:"350802"},{label:"永定区",value:"350803"},{label:"长汀县",value:"350821"},{label:"上杭县",value:"350823"},{label:"武平县",value:"350824"},{label:"连城县",value:"350825"},{label:"漳平市",value:"350881"}],[{label:"蕉城区",value:"350902"},{label:"霞浦县",value:"350921"},{label:"古田县",value:"350922"},{label:"屏南县",value:"350923"},{label:"寿宁县",value:"350924"},{label:"周宁县",value:"350925"},{label:"柘荣县",value:"350926"},{label:"福安市",value:"350981"},{label:"福鼎市",value:"350982"}]],[[{label:"东湖区",value:"360102"},{label:"西湖区",value:"360103"},{label:"青云谱区",value:"360104"},{label:"湾里区",value:"360105"},{label:"青山湖区",value:"360111"},{label:"新建区",value:"360112"},{label:"南昌县",value:"360121"},{label:"安义县",value:"360123"},{label:"进贤县",value:"360124"}],[{label:"昌江区",value:"360202"},{label:"珠山区",value:"360203"},{label:"浮梁县",value:"360222"},{label:"乐平市",value:"360281"}],[{label:"安源区",value:"360302"},{label:"湘东区",value:"360313"},{label:"莲花县",value:"360321"},{label:"上栗县",value:"360322"},{label:"芦溪县",value:"360323"}],[{label:"濂溪区",value:"360402"},{label:"浔阳区",value:"360403"},{label:"柴桑区",value:"360404"},{label:"武宁县",value:"360423"},{label:"修水县",value:"360424"},{label:"永修县",value:"360425"},{label:"德安县",value:"360426"},{label:"都昌县",value:"360428"},{label:"湖口县",value:"360429"},{label:"彭泽县",value:"360430"},{label:"瑞昌市",value:"360481"},{label:"共青城市",value:"360482"},{label:"庐山市",value:"360483"}],[{label:"渝水区",value:"360502"},{label:"分宜县",value:"360521"}],[{label:"月湖区",value:"360602"},{label:"余江县",value:"360622"},{label:"贵溪市",value:"360681"}],[{label:"章贡区",value:"360702"},{label:"南康区",value:"360703"},{label:"赣县区",value:"360704"},{label:"信丰县",value:"360722"},{label:"大余县",value:"360723"},{label:"上犹县",value:"360724"},{label:"崇义县",value:"360725"},{label:"安远县",value:"360726"},{label:"龙南县",value:"360727"},{label:"定南县",value:"360728"},{label:"全南县",value:"360729"},{label:"宁都县",value:"360730"},{label:"于都县",value:"360731"},{label:"兴国县",value:"360732"},{label:"会昌县",value:"360733"},{label:"寻乌县",value:"360734"},{label:"石城县",value:"360735"},{label:"瑞金市",value:"360781"}],[{label:"吉州区",value:"360802"},{label:"青原区",value:"360803"},{label:"吉安县",value:"360821"},{label:"吉水县",value:"360822"},{label:"峡江县",value:"360823"},{label:"新干县",value:"360824"},{label:"永丰县",value:"360825"},{label:"泰和县",value:"360826"},{label:"遂川县",value:"360827"},{label:"万安县",value:"360828"},{label:"安福县",value:"360829"},{label:"永新县",value:"360830"},{label:"井冈山市",value:"360881"}],[{label:"袁州区",value:"360902"},{label:"奉新县",value:"360921"},{label:"万载县",value:"360922"},{label:"上高县",value:"360923"},{label:"宜丰县",value:"360924"},{label:"靖安县",value:"360925"},{label:"铜鼓县",value:"360926"},{label:"丰城市",value:"360981"},{label:"樟树市",value:"360982"},{label:"高安市",value:"360983"}],[{label:"临川区",value:"361002"},{label:"东乡区",value:"361003"},{label:"南城县",value:"361021"},{label:"黎川县",value:"361022"},{label:"南丰县",value:"361023"},{label:"崇仁县",value:"361024"},{label:"乐安县",value:"361025"},{label:"宜黄县",value:"361026"},{label:"金溪县",value:"361027"},{label:"资溪县",value:"361028"},{label:"广昌县",value:"361030"}],[{label:"信州区",value:"361102"},{label:"广丰区",value:"361103"},{label:"上饶县",value:"361121"},{label:"玉山县",value:"361123"},{label:"铅山县",value:"361124"},{label:"横峰县",value:"361125"},{label:"弋阳县",value:"361126"},{label:"余干县",value:"361127"},{label:"鄱阳县",value:"361128"},{label:"万年县",value:"361129"},{label:"婺源县",value:"361130"},{label:"德兴市",value:"361181"}]],[[{label:"历下区",value:"370102"},{label:"市中区",value:"370103"},{label:"槐荫区",value:"370104"},{label:"天桥区",value:"370105"},{label:"历城区",value:"370112"},{label:"长清区",value:"370113"},{label:"章丘区",value:"370114"},{label:"平阴县",value:"370124"},{label:"济阳县",value:"370125"},{label:"商河县",value:"370126"},{label:"济南高新技术产业开发区",value:"370171"}],[{label:"市南区",value:"370202"},{label:"市北区",value:"370203"},{label:"黄岛区",value:"370211"},{label:"崂山区",value:"370212"},{label:"李沧区",value:"370213"},{label:"城阳区",value:"370214"},{label:"即墨区",value:"370215"},{label:"青岛高新技术产业开发区",value:"370271"},{label:"胶州市",value:"370281"},{label:"平度市",value:"370283"},{label:"莱西市",value:"370285"}],[{label:"淄川区",value:"370302"},{label:"张店区",value:"370303"},{label:"博山区",value:"370304"},{label:"临淄区",value:"370305"},{label:"周村区",value:"370306"},{label:"桓台县",value:"370321"},{label:"高青县",value:"370322"},{label:"沂源县",value:"370323"}],[{label:"市中区",value:"370402"},{label:"薛城区",value:"370403"},{label:"峄城区",value:"370404"},{label:"台儿庄区",value:"370405"},{label:"山亭区",value:"370406"},{label:"滕州市",value:"370481"}],[{label:"东营区",value:"370502"},{label:"河口区",value:"370503"},{label:"垦利区",value:"370505"},{label:"利津县",value:"370522"},{label:"广饶县",value:"370523"},{label:"东营经济技术开发区",value:"370571"},{label:"东营港经济开发区",value:"370572"}],[{label:"芝罘区",value:"370602"},{label:"福山区",value:"370611"},{label:"牟平区",value:"370612"},{label:"莱山区",value:"370613"},{label:"长岛县",value:"370634"},{label:"烟台高新技术产业开发区",value:"370671"},{label:"烟台经济技术开发区",value:"370672"},{label:"龙口市",value:"370681"},{label:"莱阳市",value:"370682"},{label:"莱州市",value:"370683"},{label:"蓬莱市",value:"370684"},{label:"招远市",value:"370685"},{label:"栖霞市",value:"370686"},{label:"海阳市",value:"370687"}],[{label:"潍城区",value:"370702"},{label:"寒亭区",value:"370703"},{label:"坊子区",value:"370704"},{label:"奎文区",value:"370705"},{label:"临朐县",value:"370724"},{label:"昌乐县",value:"370725"},{label:"潍坊滨海经济技术开发区",value:"370772"},{label:"青州市",value:"370781"},{label:"诸城市",value:"370782"},{label:"寿光市",value:"370783"},{label:"安丘市",value:"370784"},{label:"高密市",value:"370785"},{label:"昌邑市",value:"370786"}],[{label:"任城区",value:"370811"},{label:"兖州区",value:"370812"},{label:"微山县",value:"370826"},{label:"鱼台县",value:"370827"},{label:"金乡县",value:"370828"},{label:"嘉祥县",value:"370829"},{label:"汶上县",value:"370830"},{label:"泗水县",value:"370831"},{label:"梁山县",value:"370832"},{label:"济宁高新技术产业开发区",value:"370871"},{label:"曲阜市",value:"370881"},{label:"邹城市",value:"370883"}],[{label:"泰山区",value:"370902"},{label:"岱岳区",value:"370911"},{label:"宁阳县",value:"370921"},{label:"东平县",value:"370923"},{label:"新泰市",value:"370982"},{label:"肥城市",value:"370983"}],[{label:"环翠区",value:"371002"},{label:"文登区",value:"371003"},{label:"威海火炬高技术产业开发区",value:"371071"},{label:"威海经济技术开发区",value:"371072"},{label:"威海临港经济技术开发区",value:"371073"},{label:"荣成市",value:"371082"},{label:"乳山市",value:"371083"}],[{label:"东港区",value:"371102"},{label:"岚山区",value:"371103"},{label:"五莲县",value:"371121"},{label:"莒县",value:"371122"},{label:"日照经济技术开发区",value:"371171"},{label:"日照国际海洋城",value:"371172"}],[{label:"莱城区",value:"371202"},{label:"钢城区",value:"371203"}],[{label:"兰山区",value:"371302"},{label:"罗庄区",value:"371311"},{label:"河东区",value:"371312"},{label:"沂南县",value:"371321"},{label:"郯城县",value:"371322"},{label:"沂水县",value:"371323"},{label:"兰陵县",value:"371324"},{label:"费县",value:"371325"},{label:"平邑县",value:"371326"},{label:"莒南县",value:"371327"},{label:"蒙阴县",value:"371328"},{label:"临沭县",value:"371329"},{label:"临沂高新技术产业开发区",value:"371371"},{label:"临沂经济技术开发区",value:"371372"},{label:"临沂临港经济开发区",value:"371373"}],[{label:"德城区",value:"371402"},{label:"陵城区",value:"371403"},{label:"宁津县",value:"371422"},{label:"庆云县",value:"371423"},{label:"临邑县",value:"371424"},{label:"齐河县",value:"371425"},{label:"平原县",value:"371426"},{label:"夏津县",value:"371427"},{label:"武城县",value:"371428"},{label:"德州经济技术开发区",value:"371471"},{label:"德州运河经济开发区",value:"371472"},{label:"乐陵市",value:"371481"},{label:"禹城市",value:"371482"}],[{label:"东昌府区",value:"371502"},{label:"阳谷县",value:"371521"},{label:"莘县",value:"371522"},{label:"茌平县",value:"371523"},{label:"东阿县",value:"371524"},{label:"冠县",value:"371525"},{label:"高唐县",value:"371526"},{label:"临清市",value:"371581"}],[{label:"滨城区",value:"371602"},{label:"沾化区",value:"371603"},{label:"惠民县",value:"371621"},{label:"阳信县",value:"371622"},{label:"无棣县",value:"371623"},{label:"博兴县",value:"371625"},{label:"邹平县",value:"371626"}],[{label:"牡丹区",value:"371702"},{label:"定陶区",value:"371703"},{label:"曹县",value:"371721"},{label:"单县",value:"371722"},{label:"成武县",value:"371723"},{label:"巨野县",value:"371724"},{label:"郓城县",value:"371725"},{label:"鄄城县",value:"371726"},{label:"东明县",value:"371728"},{label:"菏泽经济技术开发区",value:"371771"},{label:"菏泽高新技术开发区",value:"371772"}]],[[{label:"中原区",value:"410102"},{label:"二七区",value:"410103"},{label:"管城回族区",value:"410104"},{label:"金水区",value:"410105"},{label:"上街区",value:"410106"},{label:"惠济区",value:"410108"},{label:"中牟县",value:"410122"},{label:"郑州经济技术开发区",value:"410171"},{label:"郑州高新技术产业开发区",value:"410172"},{label:"郑州航空港经济综合实验区",value:"410173"},{label:"巩义市",value:"410181"},{label:"荥阳市",value:"410182"},{label:"新密市",value:"410183"},{label:"新郑市",value:"410184"},{label:"登封市",value:"410185"}],[{label:"龙亭区",value:"410202"},{label:"顺河回族区",value:"410203"},{label:"鼓楼区",value:"410204"},{label:"禹王台区",value:"410205"},{label:"祥符区",value:"410212"},{label:"杞县",value:"410221"},{label:"通许县",value:"410222"},{label:"尉氏县",value:"410223"},{label:"兰考县",value:"410225"}],[{label:"老城区",value:"410302"},{label:"西工区",value:"410303"},{label:"瀍河回族区",value:"410304"},{label:"涧西区",value:"410305"},{label:"吉利区",value:"410306"},{label:"洛龙区",value:"410311"},{label:"孟津县",value:"410322"},{label:"新安县",value:"410323"},{label:"栾川县",value:"410324"},{label:"嵩县",value:"410325"},{label:"汝阳县",value:"410326"},{label:"宜阳县",value:"410327"},{label:"洛宁县",value:"410328"},{label:"伊川县",value:"410329"},{label:"洛阳高新技术产业开发区",value:"410371"},{label:"偃师市",value:"410381"}],[{label:"新华区",value:"410402"},{label:"卫东区",value:"410403"},{label:"石龙区",value:"410404"},{label:"湛河区",value:"410411"},{label:"宝丰县",value:"410421"},{label:"叶县",value:"410422"},{label:"鲁山县",value:"410423"},{label:"郏县",value:"410425"},{label:"平顶山高新技术产业开发区",value:"410471"},{label:"平顶山市新城区",value:"410472"},{label:"舞钢市",value:"410481"},{label:"汝州市",value:"410482"}],[{label:"文峰区",value:"410502"},{label:"北关区",value:"410503"},{label:"殷都区",value:"410505"},{label:"龙安区",value:"410506"},{label:"安阳县",value:"410522"},{label:"汤阴县",value:"410523"},{label:"滑县",value:"410526"},{label:"内黄县",value:"410527"},{label:"安阳高新技术产业开发区",value:"410571"},{label:"林州市",value:"410581"}],[{label:"鹤山区",value:"410602"},{label:"山城区",value:"410603"},{label:"淇滨区",value:"410611"},{label:"浚县",value:"410621"},{label:"淇县",value:"410622"},{label:"鹤壁经济技术开发区",value:"410671"}],[{label:"红旗区",value:"410702"},{label:"卫滨区",value:"410703"},{label:"凤泉区",value:"410704"},{label:"牧野区",value:"410711"},{label:"新乡县",value:"410721"},{label:"获嘉县",value:"410724"},{label:"原阳县",value:"410725"},{label:"延津县",value:"410726"},{label:"封丘县",value:"410727"},{label:"长垣县",value:"410728"},{label:"新乡高新技术产业开发区",value:"410771"},{label:"新乡经济技术开发区",value:"410772"},{label:"新乡市平原城乡一体化示范区",value:"410773"},{label:"卫辉市",value:"410781"},{label:"辉县市",value:"410782"}],[{label:"解放区",value:"410802"},{label:"中站区",value:"410803"},{label:"马村区",value:"410804"},{label:"山阳区",value:"410811"},{label:"修武县",value:"410821"},{label:"博爱县",value:"410822"},{label:"武陟县",value:"410823"},{label:"温县",value:"410825"},{label:"焦作城乡一体化示范区",value:"410871"},{label:"沁阳市",value:"410882"},{label:"孟州市",value:"410883"}],[{label:"华龙区",value:"410902"},{label:"清丰县",value:"410922"},{label:"南乐县",value:"410923"},{label:"范县",value:"410926"},{label:"台前县",value:"410927"},{label:"濮阳县",value:"410928"},{label:"河南濮阳工业园区",value:"410971"},{label:"濮阳经济技术开发区",value:"410972"}],[{label:"魏都区",value:"411002"},{label:"建安区",value:"411003"},{label:"鄢陵县",value:"411024"},{label:"襄城县",value:"411025"},{label:"许昌经济技术开发区",value:"411071"},{label:"禹州市",value:"411081"},{label:"长葛市",value:"411082"}],[{label:"源汇区",value:"411102"},{label:"郾城区",value:"411103"},{label:"召陵区",value:"411104"},{label:"舞阳县",value:"411121"},{label:"临颍县",value:"411122"},{label:"漯河经济技术开发区",value:"411171"}],[{label:"湖滨区",value:"411202"},{label:"陕州区",value:"411203"},{label:"渑池县",value:"411221"},{label:"卢氏县",value:"411224"},{label:"河南三门峡经济开发区",value:"411271"},{label:"义马市",value:"411281"},{label:"灵宝市",value:"411282"}],[{label:"宛城区",value:"411302"},{label:"卧龙区",value:"411303"},{label:"南召县",value:"411321"},{label:"方城县",value:"411322"},{label:"西峡县",value:"411323"},{label:"镇平县",value:"411324"},{label:"内乡县",value:"411325"},{label:"淅川县",value:"411326"},{label:"社旗县",value:"411327"},{label:"唐河县",value:"411328"},{label:"新野县",value:"411329"},{label:"桐柏县",value:"411330"},{label:"南阳高新技术产业开发区",value:"411371"},{label:"南阳市城乡一体化示范区",value:"411372"},{label:"邓州市",value:"411381"}],[{label:"梁园区",value:"411402"},{label:"睢阳区",value:"411403"},{label:"民权县",value:"411421"},{label:"睢县",value:"411422"},{label:"宁陵县",value:"411423"},{label:"柘城县",value:"411424"},{label:"虞城县",value:"411425"},{label:"夏邑县",value:"411426"},{label:"豫东综合物流产业聚集区",value:"411471"},{label:"河南商丘经济开发区",value:"411472"},{label:"永城市",value:"411481"}],[{label:"浉河区",value:"411502"},{label:"平桥区",value:"411503"},{label:"罗山县",value:"411521"},{label:"光山县",value:"411522"},{label:"新县",value:"411523"},{label:"商城县",value:"411524"},{label:"固始县",value:"411525"},{label:"潢川县",value:"411526"},{label:"淮滨县",value:"411527"},{label:"息县",value:"411528"},{label:"信阳高新技术产业开发区",value:"411571"}],[{label:"川汇区",value:"411602"},{label:"扶沟县",value:"411621"},{label:"西华县",value:"411622"},{label:"商水县",value:"411623"},{label:"沈丘县",value:"411624"},{label:"郸城县",value:"411625"},{label:"淮阳县",value:"411626"},{label:"太康县",value:"411627"},{label:"鹿邑县",value:"411628"},{label:"河南周口经济开发区",value:"411671"},{label:"项城市",value:"411681"}],[{label:"驿城区",value:"411702"},{label:"西平县",value:"411721"},{label:"上蔡县",value:"411722"},{label:"平舆县",value:"411723"},{label:"正阳县",value:"411724"},{label:"确山县",value:"411725"},{label:"泌阳县",value:"411726"},{label:"汝南县",value:"411727"},{label:"遂平县",value:"411728"},{label:"新蔡县",value:"411729"},{label:"河南驻马店经济开发区",value:"411771"}],[{label:"济源市",value:"419001"}]],[[{label:"江岸区",value:"420102"},{label:"江汉区",value:"420103"},{label:"硚口区",value:"420104"},{label:"汉阳区",value:"420105"},{label:"武昌区",value:"420106"},{label:"青山区",value:"420107"},{label:"洪山区",value:"420111"},{label:"东西湖区",value:"420112"},{label:"汉南区",value:"420113"},{label:"蔡甸区",value:"420114"},{label:"江夏区",value:"420115"},{label:"黄陂区",value:"420116"},{label:"新洲区",value:"420117"}],[{label:"黄石港区",value:"420202"},{label:"西塞山区",value:"420203"},{label:"下陆区",value:"420204"},{label:"铁山区",value:"420205"},{label:"阳新县",value:"420222"},{label:"大冶市",value:"420281"}],[{label:"茅箭区",value:"420302"},{label:"张湾区",value:"420303"},{label:"郧阳区",value:"420304"},{label:"郧西县",value:"420322"},{label:"竹山县",value:"420323"},{label:"竹溪县",value:"420324"},{label:"房县",value:"420325"},{label:"丹江口市",value:"420381"}],[{label:"西陵区",value:"420502"},{label:"伍家岗区",value:"420503"},{label:"点军区",value:"420504"},{label:"猇亭区",value:"420505"},{label:"夷陵区",value:"420506"},{label:"远安县",value:"420525"},{label:"兴山县",value:"420526"},{label:"秭归县",value:"420527"},{label:"长阳土家族自治县",value:"420528"},{label:"五峰土家族自治县",value:"420529"},{label:"宜都市",value:"420581"},{label:"当阳市",value:"420582"},{label:"枝江市",value:"420583"}],[{label:"襄城区",value:"420602"},{label:"樊城区",value:"420606"},{label:"襄州区",value:"420607"},{label:"南漳县",value:"420624"},{label:"谷城县",value:"420625"},{label:"保康县",value:"420626"},{label:"老河口市",value:"420682"},{label:"枣阳市",value:"420683"},{label:"宜城市",value:"420684"}],[{label:"梁子湖区",value:"420702"},{label:"华容区",value:"420703"},{label:"鄂城区",value:"420704"}],[{label:"东宝区",value:"420802"},{label:"掇刀区",value:"420804"},{label:"京山县",value:"420821"},{label:"沙洋县",value:"420822"},{label:"钟祥市",value:"420881"}],[{label:"孝南区",value:"420902"},{label:"孝昌县",value:"420921"},{label:"大悟县",value:"420922"},{label:"云梦县",value:"420923"},{label:"应城市",value:"420981"},{label:"安陆市",value:"420982"},{label:"汉川市",value:"420984"}],[{label:"沙市区",value:"421002"},{label:"荆州区",value:"421003"},{label:"公安县",value:"421022"},{label:"监利县",value:"421023"},{label:"江陵县",value:"421024"},{label:"荆州经济技术开发区",value:"421071"},{label:"石首市",value:"421081"},{label:"洪湖市",value:"421083"},{label:"松滋市",value:"421087"}],[{label:"黄州区",value:"421102"},{label:"团风县",value:"421121"},{label:"红安县",value:"421122"},{label:"罗田县",value:"421123"},{label:"英山县",value:"421124"},{label:"浠水县",value:"421125"},{label:"蕲春县",value:"421126"},{label:"黄梅县",value:"421127"},{label:"龙感湖管理区",value:"421171"},{label:"麻城市",value:"421181"},{label:"武穴市",value:"421182"}],[{label:"咸安区",value:"421202"},{label:"嘉鱼县",value:"421221"},{label:"通城县",value:"421222"},{label:"崇阳县",value:"421223"},{label:"通山县",value:"421224"},{label:"赤壁市",value:"421281"}],[{label:"曾都区",value:"421303"},{label:"随县",value:"421321"},{label:"广水市",value:"421381"}],[{label:"恩施市",value:"422801"},{label:"利川市",value:"422802"},{label:"建始县",value:"422822"},{label:"巴东县",value:"422823"},{label:"宣恩县",value:"422825"},{label:"咸丰县",value:"422826"},{label:"来凤县",value:"422827"},{label:"鹤峰县",value:"422828"}],[{label:"仙桃市",value:"429004"},{label:"潜江市",value:"429005"},{label:"天门市",value:"429006"},{label:"神农架林区",value:"429021"}]],[[{label:"芙蓉区",value:"430102"},{label:"天心区",value:"430103"},{label:"岳麓区",value:"430104"},{label:"开福区",value:"430105"},{label:"雨花区",value:"430111"},{label:"望城区",value:"430112"},{label:"长沙县",value:"430121"},{label:"浏阳市",value:"430181"},{label:"宁乡市",value:"430182"}],[{label:"荷塘区",value:"430202"},{label:"芦淞区",value:"430203"},{label:"石峰区",value:"430204"},{label:"天元区",value:"430211"},{label:"株洲县",value:"430221"},{label:"攸县",value:"430223"},{label:"茶陵县",value:"430224"},{label:"炎陵县",value:"430225"},{label:"云龙示范区",value:"430271"},{label:"醴陵市",value:"430281"}],[{label:"雨湖区",value:"430302"},{label:"岳塘区",value:"430304"},{label:"湘潭县",value:"430321"},{label:"湖南湘潭高新技术产业园区",value:"430371"},{label:"湘潭昭山示范区",value:"430372"},{label:"湘潭九华示范区",value:"430373"},{label:"湘乡市",value:"430381"},{label:"韶山市",value:"430382"}],[{label:"珠晖区",value:"430405"},{label:"雁峰区",value:"430406"},{label:"石鼓区",value:"430407"},{label:"蒸湘区",value:"430408"},{label:"南岳区",value:"430412"},{label:"衡阳县",value:"430421"},{label:"衡南县",value:"430422"},{label:"衡山县",value:"430423"},{label:"衡东县",value:"430424"},{label:"祁东县",value:"430426"},{label:"衡阳综合保税区",value:"430471"},{label:"湖南衡阳高新技术产业园区",value:"430472"},{label:"湖南衡阳松木经济开发区",value:"430473"},{label:"耒阳市",value:"430481"},{label:"常宁市",value:"430482"}],[{label:"双清区",value:"430502"},{label:"大祥区",value:"430503"},{label:"北塔区",value:"430511"},{label:"邵东县",value:"430521"},{label:"新邵县",value:"430522"},{label:"邵阳县",value:"430523"},{label:"隆回县",value:"430524"},{label:"洞口县",value:"430525"},{label:"绥宁县",value:"430527"},{label:"新宁县",value:"430528"},{label:"城步苗族自治县",value:"430529"},{label:"武冈市",value:"430581"}],[{label:"岳阳楼区",value:"430602"},{label:"云溪区",value:"430603"},{label:"君山区",value:"430611"},{label:"岳阳县",value:"430621"},{label:"华容县",value:"430623"},{label:"湘阴县",value:"430624"},{label:"平江县",value:"430626"},{label:"岳阳市屈原管理区",value:"430671"},{label:"汨罗市",value:"430681"},{label:"临湘市",value:"430682"}],[{label:"武陵区",value:"430702"},{label:"鼎城区",value:"430703"},{label:"安乡县",value:"430721"},{label:"汉寿县",value:"430722"},{label:"澧县",value:"430723"},{label:"临澧县",value:"430724"},{label:"桃源县",value:"430725"},{label:"石门县",value:"430726"},{label:"常德市西洞庭管理区",value:"430771"},{label:"津市市",value:"430781"}],[{label:"永定区",value:"430802"},{label:"武陵源区",value:"430811"},{label:"慈利县",value:"430821"},{label:"桑植县",value:"430822"}],[{label:"资阳区",value:"430902"},{label:"赫山区",value:"430903"},{label:"南县",value:"430921"},{label:"桃江县",value:"430922"},{label:"安化县",value:"430923"},{label:"益阳市大通湖管理区",value:"430971"},{label:"湖南益阳高新技术产业园区",value:"430972"},{label:"沅江市",value:"430981"}],[{label:"北湖区",value:"431002"},{label:"苏仙区",value:"431003"},{label:"桂阳县",value:"431021"},{label:"宜章县",value:"431022"},{label:"永兴县",value:"431023"},{label:"嘉禾县",value:"431024"},{label:"临武县",value:"431025"},{label:"汝城县",value:"431026"},{label:"桂东县",value:"431027"},{label:"安仁县",value:"431028"},{label:"资兴市",value:"431081"}],[{label:"零陵区",value:"431102"},{label:"冷水滩区",value:"431103"},{label:"祁阳县",value:"431121"},{label:"东安县",value:"431122"},{label:"双牌县",value:"431123"},{label:"道县",value:"431124"},{label:"江永县",value:"431125"},{label:"宁远县",value:"431126"},{label:"蓝山县",value:"431127"},{label:"新田县",value:"431128"},{label:"江华瑶族自治县",value:"431129"},{label:"永州经济技术开发区",value:"431171"},{label:"永州市金洞管理区",value:"431172"},{label:"永州市回龙圩管理区",value:"431173"}],[{label:"鹤城区",value:"431202"},{label:"中方县",value:"431221"},{label:"沅陵县",value:"431222"},{label:"辰溪县",value:"431223"},{label:"溆浦县",value:"431224"},{label:"会同县",value:"431225"},{label:"麻阳苗族自治县",value:"431226"},{label:"新晃侗族自治县",value:"431227"},{label:"芷江侗族自治县",value:"431228"},{label:"靖州苗族侗族自治县",value:"431229"},{label:"通道侗族自治县",value:"431230"},{label:"怀化市洪江管理区",value:"431271"},{label:"洪江市",value:"431281"}],[{label:"娄星区",value:"431302"},{label:"双峰县",value:"431321"},{label:"新化县",value:"431322"},{label:"冷水江市",value:"431381"},{label:"涟源市",value:"431382"}],[{label:"吉首市",value:"433101"},{label:"泸溪县",value:"433122"},{label:"凤凰县",value:"433123"},{label:"花垣县",value:"433124"},{label:"保靖县",value:"433125"},{label:"古丈县",value:"433126"},{label:"永顺县",value:"433127"},{label:"龙山县",value:"433130"},{label:"湖南吉首经济开发区",value:"433172"},{label:"湖南永顺经济开发区",value:"433173"}]],[[{label:"荔湾区",value:"440103"},{label:"越秀区",value:"440104"},{label:"海珠区",value:"440105"},{label:"天河区",value:"440106"},{label:"白云区",value:"440111"},{label:"黄埔区",value:"440112"},{label:"番禺区",value:"440113"},{label:"花都区",value:"440114"},{label:"南沙区",value:"440115"},{label:"从化区",value:"440117"},{label:"增城区",value:"440118"}],[{label:"武江区",value:"440203"},{label:"浈江区",value:"440204"},{label:"曲江区",value:"440205"},{label:"始兴县",value:"440222"},{label:"仁化县",value:"440224"},{label:"翁源县",value:"440229"},{label:"乳源瑶族自治县",value:"440232"},{label:"新丰县",value:"440233"},{label:"乐昌市",value:"440281"},{label:"南雄市",value:"440282"}],[{label:"罗湖区",value:"440303"},{label:"福田区",value:"440304"},{label:"南山区",value:"440305"},{label:"宝安区",value:"440306"},{label:"龙岗区",value:"440307"},{label:"盐田区",value:"440308"},{label:"龙华区",value:"440309"},{label:"坪山区",value:"440310"}],[{label:"香洲区",value:"440402"},{label:"斗门区",value:"440403"},{label:"金湾区",value:"440404"}],[{label:"龙湖区",value:"440507"},{label:"金平区",value:"440511"},{label:"濠江区",value:"440512"},{label:"潮阳区",value:"440513"},{label:"潮南区",value:"440514"},{label:"澄海区",value:"440515"},{label:"南澳县",value:"440523"}],[{label:"禅城区",value:"440604"},{label:"南海区",value:"440605"},{label:"顺德区",value:"440606"},{label:"三水区",value:"440607"},{label:"高明区",value:"440608"}],[{label:"蓬江区",value:"440703"},{label:"江海区",value:"440704"},{label:"新会区",value:"440705"},{label:"台山市",value:"440781"},{label:"开平市",value:"440783"},{label:"鹤山市",value:"440784"},{label:"恩平市",value:"440785"}],[{label:"赤坎区",value:"440802"},{label:"霞山区",value:"440803"},{label:"坡头区",value:"440804"},{label:"麻章区",value:"440811"},{label:"遂溪县",value:"440823"},{label:"徐闻县",value:"440825"},{label:"廉江市",value:"440881"},{label:"雷州市",value:"440882"},{label:"吴川市",value:"440883"}],[{label:"茂南区",value:"440902"},{label:"电白区",value:"440904"},{label:"高州市",value:"440981"},{label:"化州市",value:"440982"},{label:"信宜市",value:"440983"}],[{label:"端州区",value:"441202"},{label:"鼎湖区",value:"441203"},{label:"高要区",value:"441204"},{label:"广宁县",value:"441223"},{label:"怀集县",value:"441224"},{label:"封开县",value:"441225"},{label:"德庆县",value:"441226"},{label:"四会市",value:"441284"}],[{label:"惠城区",value:"441302"},{label:"惠阳区",value:"441303"},{label:"博罗县",value:"441322"},{label:"惠东县",value:"441323"},{label:"龙门县",value:"441324"}],[{label:"梅江区",value:"441402"},{label:"梅县区",value:"441403"},{label:"大埔县",value:"441422"},{label:"丰顺县",value:"441423"},{label:"五华县",value:"441424"},{label:"平远县",value:"441426"},{label:"蕉岭县",value:"441427"},{label:"兴宁市",value:"441481"}],[{label:"城区",value:"441502"},{label:"海丰县",value:"441521"},{label:"陆河县",value:"441523"},{label:"陆丰市",value:"441581"}],[{label:"源城区",value:"441602"},{label:"紫金县",value:"441621"},{label:"龙川县",value:"441622"},{label:"连平县",value:"441623"},{label:"和平县",value:"441624"},{label:"东源县",value:"441625"}],[{label:"江城区",value:"441702"},{label:"阳东区",value:"441704"},{label:"阳西县",value:"441721"},{label:"阳春市",value:"441781"}],[{label:"清城区",value:"441802"},{label:"清新区",value:"441803"},{label:"佛冈县",value:"441821"},{label:"阳山县",value:"441823"},{label:"连山壮族瑶族自治县",value:"441825"},{label:"连南瑶族自治县",value:"441826"},{label:"英德市",value:"441881"},{label:"连州市",value:"441882"}],[{label:"东莞市",value:"441900"}],[{label:"中山市",value:"442000"}],[{label:"湘桥区",value:"445102"},{label:"潮安区",value:"445103"},{label:"饶平县",value:"445122"}],[{label:"榕城区",value:"445202"},{label:"揭东区",value:"445203"},{label:"揭西县",value:"445222"},{label:"惠来县",value:"445224"},{label:"普宁市",value:"445281"}],[{label:"云城区",value:"445302"},{label:"云安区",value:"445303"},{label:"新兴县",value:"445321"},{label:"郁南县",value:"445322"},{label:"罗定市",value:"445381"}]],[[{label:"兴宁区",value:"450102"},{label:"青秀区",value:"450103"},{label:"江南区",value:"450105"},{label:"西乡塘区",value:"450107"},{label:"良庆区",value:"450108"},{label:"邕宁区",value:"450109"},{label:"武鸣区",value:"450110"},{label:"隆安县",value:"450123"},{label:"马山县",value:"450124"},{label:"上林县",value:"450125"},{label:"宾阳县",value:"450126"},{label:"横县",value:"450127"}],[{label:"城中区",value:"450202"},{label:"鱼峰区",value:"450203"},{label:"柳南区",value:"450204"},{label:"柳北区",value:"450205"},{label:"柳江区",value:"450206"},{label:"柳城县",value:"450222"},{label:"鹿寨县",value:"450223"},{label:"融安县",value:"450224"},{label:"融水苗族自治县",value:"450225"},{label:"三江侗族自治县",value:"450226"}],[{label:"秀峰区",value:"450302"},{label:"叠彩区",value:"450303"},{label:"象山区",value:"450304"},{label:"七星区",value:"450305"},{label:"雁山区",value:"450311"},{label:"临桂区",value:"450312"},{label:"阳朔县",value:"450321"},{label:"灵川县",value:"450323"},{label:"全州县",value:"450324"},{label:"兴安县",value:"450325"},{label:"永福县",value:"450326"},{label:"灌阳县",value:"450327"},{label:"龙胜各族自治县",value:"450328"},{label:"资源县",value:"450329"},{label:"平乐县",value:"450330"},{label:"荔浦县",value:"450331"},{label:"恭城瑶族自治县",value:"450332"}],[{label:"万秀区",value:"450403"},{label:"长洲区",value:"450405"},{label:"龙圩区",value:"450406"},{label:"苍梧县",value:"450421"},{label:"藤县",value:"450422"},{label:"蒙山县",value:"450423"},{label:"岑溪市",value:"450481"}],[{label:"海城区",value:"450502"},{label:"银海区",value:"450503"},{label:"铁山港区",value:"450512"},{label:"合浦县",value:"450521"}],[{label:"港口区",value:"450602"},{label:"防城区",value:"450603"},{label:"上思县",value:"450621"},{label:"东兴市",value:"450681"}],[{label:"钦南区",value:"450702"},{label:"钦北区",value:"450703"},{label:"灵山县",value:"450721"},{label:"浦北县",value:"450722"}],[{label:"港北区",value:"450802"},{label:"港南区",value:"450803"},{label:"覃塘区",value:"450804"},{label:"平南县",value:"450821"},{label:"桂平市",value:"450881"}],[{label:"玉州区",value:"450902"},{label:"福绵区",value:"450903"},{label:"容县",value:"450921"},{label:"陆川县",value:"450922"},{label:"博白县",value:"450923"},{label:"兴业县",value:"450924"},{label:"北流市",value:"450981"}],[{label:"右江区",value:"451002"},{label:"田阳县",value:"451021"},{label:"田东县",value:"451022"},{label:"平果县",value:"451023"},{label:"德保县",value:"451024"},{label:"那坡县",value:"451026"},{label:"凌云县",value:"451027"},{label:"乐业县",value:"451028"},{label:"田林县",value:"451029"},{label:"西林县",value:"451030"},{label:"隆林各族自治县",value:"451031"},{label:"靖西市",value:"451081"}],[{label:"八步区",value:"451102"},{label:"平桂区",value:"451103"},{label:"昭平县",value:"451121"},{label:"钟山县",value:"451122"},{label:"富川瑶族自治县",value:"451123"}],[{label:"金城江区",value:"451202"},{label:"宜州区",value:"451203"},{label:"南丹县",value:"451221"},{label:"天峨县",value:"451222"},{label:"凤山县",value:"451223"},{label:"东兰县",value:"451224"},{label:"罗城仫佬族自治县",value:"451225"},{label:"环江毛南族自治县",value:"451226"},{label:"巴马瑶族自治县",value:"451227"},{label:"都安瑶族自治县",value:"451228"},{label:"大化瑶族自治县",value:"451229"}],[{label:"兴宾区",value:"451302"},{label:"忻城县",value:"451321"},{label:"象州县",value:"451322"},{label:"武宣县",value:"451323"},{label:"金秀瑶族自治县",value:"451324"},{label:"合山市",value:"451381"}],[{label:"江州区",value:"451402"},{label:"扶绥县",value:"451421"},{label:"宁明县",value:"451422"},{label:"龙州县",value:"451423"},{label:"大新县",value:"451424"},{label:"天等县",value:"451425"},{label:"凭祥市",value:"451481"}]],[[{label:"秀英区",value:"460105"},{label:"龙华区",value:"460106"},{label:"琼山区",value:"460107"},{label:"美兰区",value:"460108"}],[{label:"海棠区",value:"460202"},{label:"吉阳区",value:"460203"},{label:"天涯区",value:"460204"},{label:"崖州区",value:"460205"}],[{label:"西沙群岛",value:"460321"},{label:"南沙群岛",value:"460322"},{label:"中沙群岛的岛礁及其海域",value:"460323"}],[{label:"儋州市",value:"460400"}],[{label:"五指山市",value:"469001"},{label:"琼海市",value:"469002"},{label:"文昌市",value:"469005"},{label:"万宁市",value:"469006"},{label:"东方市",value:"469007"},{label:"定安县",value:"469021"},{label:"屯昌县",value:"469022"},{label:"澄迈县",value:"469023"},{label:"临高县",value:"469024"},{label:"白沙黎族自治县",value:"469025"},{label:"昌江黎族自治县",value:"469026"},{label:"乐东黎族自治县",value:"469027"},{label:"陵水黎族自治县",value:"469028"},{label:"保亭黎族苗族自治县",value:"469029"},{label:"琼中黎族苗族自治县",value:"469030"}]],[[{label:"万州区",value:"500101"},{label:"涪陵区",value:"500102"},{label:"渝中区",value:"500103"},{label:"大渡口区",value:"500104"},{label:"江北区",value:"500105"},{label:"沙坪坝区",value:"500106"},{label:"九龙坡区",value:"500107"},{label:"南岸区",value:"500108"},{label:"北碚区",value:"500109"},{label:"綦江区",value:"500110"},{label:"大足区",value:"500111"},{label:"渝北区",value:"500112"},{label:"巴南区",value:"500113"},{label:"黔江区",value:"500114"},{label:"长寿区",value:"500115"},{label:"江津区",value:"500116"},{label:"合川区",value:"500117"},{label:"永川区",value:"500118"},{label:"南川区",value:"500119"},{label:"璧山区",value:"500120"},{label:"铜梁区",value:"500151"},{label:"潼南区",value:"500152"},{label:"荣昌区",value:"500153"},{label:"开州区",value:"500154"},{label:"梁平区",value:"500155"},{label:"武隆区",value:"500156"}],[{label:"城口县",value:"500229"},{label:"丰都县",value:"500230"},{label:"垫江县",value:"500231"},{label:"忠县",value:"500233"},{label:"云阳县",value:"500235"},{label:"奉节县",value:"500236"},{label:"巫山县",value:"500237"},{label:"巫溪县",value:"500238"},{label:"石柱土家族自治县",value:"500240"},{label:"秀山土家族苗族自治县",value:"500241"},{label:"酉阳土家族苗族自治县",value:"500242"},{label:"彭水苗族土家族自治县",value:"500243"}]],[[{label:"锦江区",value:"510104"},{label:"青羊区",value:"510105"},{label:"金牛区",value:"510106"},{label:"武侯区",value:"510107"},{label:"成华区",value:"510108"},{label:"龙泉驿区",value:"510112"},{label:"青白江区",value:"510113"},{label:"新都区",value:"510114"},{label:"温江区",value:"510115"},{label:"双流区",value:"510116"},{label:"郫都区",value:"510117"},{label:"金堂县",value:"510121"},{label:"大邑县",value:"510129"},{label:"蒲江县",value:"510131"},{label:"新津县",value:"510132"},{label:"都江堰市",value:"510181"},{label:"彭州市",value:"510182"},{label:"邛崃市",value:"510183"},{label:"崇州市",value:"510184"},{label:"简阳市",value:"510185"}],[{label:"自流井区",value:"510302"},{label:"贡井区",value:"510303"},{label:"大安区",value:"510304"},{label:"沿滩区",value:"510311"},{label:"荣县",value:"510321"},{label:"富顺县",value:"510322"}],[{label:"东区",value:"510402"},{label:"西区",value:"510403"},{label:"仁和区",value:"510411"},{label:"米易县",value:"510421"},{label:"盐边县",value:"510422"}],[{label:"江阳区",value:"510502"},{label:"纳溪区",value:"510503"},{label:"龙马潭区",value:"510504"},{label:"泸县",value:"510521"},{label:"合江县",value:"510522"},{label:"叙永县",value:"510524"},{label:"古蔺县",value:"510525"}],[{label:"旌阳区",value:"510603"},{label:"罗江区",value:"510604"},{label:"中江县",value:"510623"},{label:"广汉市",value:"510681"},{label:"什邡市",value:"510682"},{label:"绵竹市",value:"510683"}],[{label:"涪城区",value:"510703"},{label:"游仙区",value:"510704"},{label:"安州区",value:"510705"},{label:"三台县",value:"510722"},{label:"盐亭县",value:"510723"},{label:"梓潼县",value:"510725"},{label:"北川羌族自治县",value:"510726"},{label:"平武县",value:"510727"},{label:"江油市",value:"510781"}],[{label:"利州区",value:"510802"},{label:"昭化区",value:"510811"},{label:"朝天区",value:"510812"},{label:"旺苍县",value:"510821"},{label:"青川县",value:"510822"},{label:"剑阁县",value:"510823"},{label:"苍溪县",value:"510824"}],[{label:"船山区",value:"510903"},{label:"安居区",value:"510904"},{label:"蓬溪县",value:"510921"},{label:"射洪县",value:"510922"},{label:"大英县",value:"510923"}],[{label:"市中区",value:"511002"},{label:"东兴区",value:"511011"},{label:"威远县",value:"511024"},{label:"资中县",value:"511025"},{label:"内江经济开发区",value:"511071"},{label:"隆昌市",value:"511083"}],[{label:"市中区",value:"511102"},{label:"沙湾区",value:"511111"},{label:"五通桥区",value:"511112"},{label:"金口河区",value:"511113"},{label:"犍为县",value:"511123"},{label:"井研县",value:"511124"},{label:"夹江县",value:"511126"},{label:"沐川县",value:"511129"},{label:"峨边彝族自治县",value:"511132"},{label:"马边彝族自治县",value:"511133"},{label:"峨眉山市",value:"511181"}],[{label:"顺庆区",value:"511302"},{label:"高坪区",value:"511303"},{label:"嘉陵区",value:"511304"},{label:"南部县",value:"511321"},{label:"营山县",value:"511322"},{label:"蓬安县",value:"511323"},{label:"仪陇县",value:"511324"},{label:"西充县",value:"511325"},{label:"阆中市",value:"511381"}],[{label:"东坡区",value:"511402"},{label:"彭山区",value:"511403"},{label:"仁寿县",value:"511421"},{label:"洪雅县",value:"511423"},{label:"丹棱县",value:"511424"},{label:"青神县",value:"511425"}],[{label:"翠屏区",value:"511502"},{label:"南溪区",value:"511503"},{label:"宜宾县",value:"511521"},{label:"江安县",value:"511523"},{label:"长宁县",value:"511524"},{label:"高县",value:"511525"},{label:"珙县",value:"511526"},{label:"筠连县",value:"511527"},{label:"兴文县",value:"511528"},{label:"屏山县",value:"511529"}],[{label:"广安区",value:"511602"},{label:"前锋区",value:"511603"},{label:"岳池县",value:"511621"},{label:"武胜县",value:"511622"},{label:"邻水县",value:"511623"},{label:"华蓥市",value:"511681"}],[{label:"通川区",value:"511702"},{label:"达川区",value:"511703"},{label:"宣汉县",value:"511722"},{label:"开江县",value:"511723"},{label:"大竹县",value:"511724"},{label:"渠县",value:"511725"},{label:"达州经济开发区",value:"511771"},{label:"万源市",value:"511781"}],[{label:"雨城区",value:"511802"},{label:"名山区",value:"511803"},{label:"荥经县",value:"511822"},{label:"汉源县",value:"511823"},{label:"石棉县",value:"511824"},{label:"天全县",value:"511825"},{label:"芦山县",value:"511826"},{label:"宝兴县",value:"511827"}],[{label:"巴州区",value:"511902"},{label:"恩阳区",value:"511903"},{label:"通江县",value:"511921"},{label:"南江县",value:"511922"},{label:"平昌县",value:"511923"},{label:"巴中经济开发区",value:"511971"}],[{label:"雁江区",value:"512002"},{label:"安岳县",value:"512021"},{label:"乐至县",value:"512022"}],[{label:"马尔康市",value:"513201"},{label:"汶川县",value:"513221"},{label:"理县",value:"513222"},{label:"茂县",value:"513223"},{label:"松潘县",value:"513224"},{label:"九寨沟县",value:"513225"},{label:"金川县",value:"513226"},{label:"小金县",value:"513227"},{label:"黑水县",value:"513228"},{label:"壤塘县",value:"513230"},{label:"阿坝县",value:"513231"},{label:"若尔盖县",value:"513232"},{label:"红原县",value:"513233"}],[{label:"康定市",value:"513301"},{label:"泸定县",value:"513322"},{label:"丹巴县",value:"513323"},{label:"九龙县",value:"513324"},{label:"雅江县",value:"513325"},{label:"道孚县",value:"513326"},{label:"炉霍县",value:"513327"},{label:"甘孜县",value:"513328"},{label:"新龙县",value:"513329"},{label:"德格县",value:"513330"},{label:"白玉县",value:"513331"},{label:"石渠县",value:"513332"},{label:"色达县",value:"513333"},{label:"理塘县",value:"513334"},{label:"巴塘县",value:"513335"},{label:"乡城县",value:"513336"},{label:"稻城县",value:"513337"},{label:"得荣县",value:"513338"}],[{label:"西昌市",value:"513401"},{label:"木里藏族自治县",value:"513422"},{label:"盐源县",value:"513423"},{label:"德昌县",value:"513424"},{label:"会理县",value:"513425"},{label:"会东县",value:"513426"},{label:"宁南县",value:"513427"},{label:"普格县",value:"513428"},{label:"布拖县",value:"513429"},{label:"金阳县",value:"513430"},{label:"昭觉县",value:"513431"},{label:"喜德县",value:"513432"},{label:"冕宁县",value:"513433"},{label:"越西县",value:"513434"},{label:"甘洛县",value:"513435"},{label:"美姑县",value:"513436"},{label:"雷波县",value:"513437"}]],[[{label:"南明区",value:"520102"},{label:"云岩区",value:"520103"},{label:"花溪区",value:"520111"},{label:"乌当区",value:"520112"},{label:"白云区",value:"520113"},{label:"观山湖区",value:"520115"},{label:"开阳县",value:"520121"},{label:"息烽县",value:"520122"},{label:"修文县",value:"520123"},{label:"清镇市",value:"520181"}],[{label:"钟山区",value:"520201"},{label:"六枝特区",value:"520203"},{label:"水城县",value:"520221"},{label:"盘州市",value:"520281"}],[{label:"红花岗区",value:"520302"},{label:"汇川区",value:"520303"},{label:"播州区",value:"520304"},{label:"桐梓县",value:"520322"},{label:"绥阳县",value:"520323"},{label:"正安县",value:"520324"},{label:"道真仡佬族苗族自治县",value:"520325"},{label:"务川仡佬族苗族自治县",value:"520326"},{label:"凤冈县",value:"520327"},{label:"湄潭县",value:"520328"},{label:"余庆县",value:"520329"},{label:"习水县",value:"520330"},{label:"赤水市",value:"520381"},{label:"仁怀市",value:"520382"}],[{label:"西秀区",value:"520402"},{label:"平坝区",value:"520403"},{label:"普定县",value:"520422"},{label:"镇宁布依族苗族自治县",value:"520423"},{label:"关岭布依族苗族自治县",value:"520424"},{label:"紫云苗族布依族自治县",value:"520425"}],[{label:"七星关区",value:"520502"},{label:"大方县",value:"520521"},{label:"黔西县",value:"520522"},{label:"金沙县",value:"520523"},{label:"织金县",value:"520524"},{label:"纳雍县",value:"520525"},{label:"威宁彝族回族苗族自治县",value:"520526"},{label:"赫章县",value:"520527"}],[{label:"碧江区",value:"520602"},{label:"万山区",value:"520603"},{label:"江口县",value:"520621"},{label:"玉屏侗族自治县",value:"520622"},{label:"石阡县",value:"520623"},{label:"思南县",value:"520624"},{label:"印江土家族苗族自治县",value:"520625"},{label:"德江县",value:"520626"},{label:"沿河土家族自治县",value:"520627"},{label:"松桃苗族自治县",value:"520628"}],[{label:"兴义市",value:"522301"},{label:"兴仁县",value:"522322"},{label:"普安县",value:"522323"},{label:"晴隆县",value:"522324"},{label:"贞丰县",value:"522325"},{label:"望谟县",value:"522326"},{label:"册亨县",value:"522327"},{label:"安龙县",value:"522328"}],[{label:"凯里市",value:"522601"},{label:"黄平县",value:"522622"},{label:"施秉县",value:"522623"},{label:"三穗县",value:"522624"},{label:"镇远县",value:"522625"},{label:"岑巩县",value:"522626"},{label:"天柱县",value:"522627"},{label:"锦屏县",value:"522628"},{label:"剑河县",value:"522629"},{label:"台江县",value:"522630"},{label:"黎平县",value:"522631"},{label:"榕江县",value:"522632"},{label:"从江县",value:"522633"},{label:"雷山县",value:"522634"},{label:"麻江县",value:"522635"},{label:"丹寨县",value:"522636"}],[{label:"都匀市",value:"522701"},{label:"福泉市",value:"522702"},{label:"荔波县",value:"522722"},{label:"贵定县",value:"522723"},{label:"瓮安县",value:"522725"},{label:"独山县",value:"522726"},{label:"平塘县",value:"522727"},{label:"罗甸县",value:"522728"},{label:"长顺县",value:"522729"},{label:"龙里县",value:"522730"},{label:"惠水县",value:"522731"},{label:"三都水族自治县",value:"522732"}]],[[{label:"五华区",value:"530102"},{label:"盘龙区",value:"530103"},{label:"官渡区",value:"530111"},{label:"西山区",value:"530112"},{label:"东川区",value:"530113"},{label:"呈贡区",value:"530114"},{label:"晋宁区",value:"530115"},{label:"富民县",value:"530124"},{label:"宜良县",value:"530125"},{label:"石林彝族自治县",value:"530126"},{label:"嵩明县",value:"530127"},{label:"禄劝彝族苗族自治县",value:"530128"},{label:"寻甸回族彝族自治县",value:"530129"},{label:"安宁市",value:"530181"}],[{label:"麒麟区",value:"530302"},{label:"沾益区",value:"530303"},{label:"马龙县",value:"530321"},{label:"陆良县",value:"530322"},{label:"师宗县",value:"530323"},{label:"罗平县",value:"530324"},{label:"富源县",value:"530325"},{label:"会泽县",value:"530326"},{label:"宣威市",value:"530381"}],[{label:"红塔区",value:"530402"},{label:"江川区",value:"530403"},{label:"澄江县",value:"530422"},{label:"通海县",value:"530423"},{label:"华宁县",value:"530424"},{label:"易门县",value:"530425"},{label:"峨山彝族自治县",value:"530426"},{label:"新平彝族傣族自治县",value:"530427"},{label:"元江哈尼族彝族傣族自治县",value:"530428"}],[{label:"隆阳区",value:"530502"},{label:"施甸县",value:"530521"},{label:"龙陵县",value:"530523"},{label:"昌宁县",value:"530524"},{label:"腾冲市",value:"530581"}],[{label:"昭阳区",value:"530602"},{label:"鲁甸县",value:"530621"},{label:"巧家县",value:"530622"},{label:"盐津县",value:"530623"},{label:"大关县",value:"530624"},{label:"永善县",value:"530625"},{label:"绥江县",value:"530626"},{label:"镇雄县",value:"530627"},{label:"彝良县",value:"530628"},{label:"威信县",value:"530629"},{label:"水富县",value:"530630"}],[{label:"古城区",value:"530702"},{label:"玉龙纳西族自治县",value:"530721"},{label:"永胜县",value:"530722"},{label:"华坪县",value:"530723"},{label:"宁蒗彝族自治县",value:"530724"}],[{label:"思茅区",value:"530802"},{label:"宁洱哈尼族彝族自治县",value:"530821"},{label:"墨江哈尼族自治县",value:"530822"},{label:"景东彝族自治县",value:"530823"},{label:"景谷傣族彝族自治县",value:"530824"},{label:"镇沅彝族哈尼族拉祜族自治县",value:"530825"},{label:"江城哈尼族彝族自治县",value:"530826"},{label:"孟连傣族拉祜族佤族自治县",value:"530827"},{label:"澜沧拉祜族自治县",value:"530828"},{label:"西盟佤族自治县",value:"530829"}],[{label:"临翔区",value:"530902"},{label:"凤庆县",value:"530921"},{label:"云县",value:"530922"},{label:"永德县",value:"530923"},{label:"镇康县",value:"530924"},{label:"双江拉祜族佤族布朗族傣族自治县",value:"530925"},{label:"耿马傣族佤族自治县",value:"530926"},{label:"沧源佤族自治县",value:"530927"}],[{label:"楚雄市",value:"532301"},{label:"双柏县",value:"532322"},{label:"牟定县",value:"532323"},{label:"南华县",value:"532324"},{label:"姚安县",value:"532325"},{label:"大姚县",value:"532326"},{label:"永仁县",value:"532327"},{label:"元谋县",value:"532328"},{label:"武定县",value:"532329"},{label:"禄丰县",value:"532331"}],[{label:"个旧市",value:"532501"},{label:"开远市",value:"532502"},{label:"蒙自市",value:"532503"},{label:"弥勒市",value:"532504"},{label:"屏边苗族自治县",value:"532523"},{label:"建水县",value:"532524"},{label:"石屏县",value:"532525"},{label:"泸西县",value:"532527"},{label:"元阳县",value:"532528"},{label:"红河县",value:"532529"},{label:"金平苗族瑶族傣族自治县",value:"532530"},{label:"绿春县",value:"532531"},{label:"河口瑶族自治县",value:"532532"}],[{label:"文山市",value:"532601"},{label:"砚山县",value:"532622"},{label:"西畴县",value:"532623"},{label:"麻栗坡县",value:"532624"},{label:"马关县",value:"532625"},{label:"丘北县",value:"532626"},{label:"广南县",value:"532627"},{label:"富宁县",value:"532628"}],[{label:"景洪市",value:"532801"},{label:"勐海县",value:"532822"},{label:"勐腊县",value:"532823"}],[{label:"大理市",value:"532901"},{label:"漾濞彝族自治县",value:"532922"},{label:"祥云县",value:"532923"},{label:"宾川县",value:"532924"},{label:"弥渡县",value:"532925"},{label:"南涧彝族自治县",value:"532926"},{label:"巍山彝族回族自治县",value:"532927"},{label:"永平县",value:"532928"},{label:"云龙县",value:"532929"},{label:"洱源县",value:"532930"},{label:"剑川县",value:"532931"},{label:"鹤庆县",value:"532932"}],[{label:"瑞丽市",value:"533102"},{label:"芒市",value:"533103"},{label:"梁河县",value:"533122"},{label:"盈江县",value:"533123"},{label:"陇川县",value:"533124"}],[{label:"泸水市",value:"533301"},{label:"福贡县",value:"533323"},{label:"贡山独龙族怒族自治县",value:"533324"},{label:"兰坪白族普米族自治县",value:"533325"}],[{label:"香格里拉市",value:"533401"},{label:"德钦县",value:"533422"},{label:"维西傈僳族自治县",value:"533423"}]],[[{label:"城关区",value:"540102"},{label:"堆龙德庆区",value:"540103"},{label:"林周县",value:"540121"},{label:"当雄县",value:"540122"},{label:"尼木县",value:"540123"},{label:"曲水县",value:"540124"},{label:"达孜县",value:"540126"},{label:"墨竹工卡县",value:"540127"},{label:"格尔木藏青工业园区",value:"540171"},{label:"拉萨经济技术开发区",value:"540172"},{label:"西藏文化旅游创意园区",value:"540173"},{label:"达孜工业园区",value:"540174"}],[{label:"桑珠孜区",value:"540202"},{label:"南木林县",value:"540221"},{label:"江孜县",value:"540222"},{label:"定日县",value:"540223"},{label:"萨迦县",value:"540224"},{label:"拉孜县",value:"540225"},{label:"昂仁县",value:"540226"},{label:"谢通门县",value:"540227"},{label:"白朗县",value:"540228"},{label:"仁布县",value:"540229"},{label:"康马县",value:"540230"},{label:"定结县",value:"540231"},{label:"仲巴县",value:"540232"},{label:"亚东县",value:"540233"},{label:"吉隆县",value:"540234"},{label:"聂拉木县",value:"540235"},{label:"萨嘎县",value:"540236"},{label:"岗巴县",value:"540237"}],[{label:"卡若区",value:"540302"},{label:"江达县",value:"540321"},{label:"贡觉县",value:"540322"},{label:"类乌齐县",value:"540323"},{label:"丁青县",value:"540324"},{label:"察雅县",value:"540325"},{label:"八宿县",value:"540326"},{label:"左贡县",value:"540327"},{label:"芒康县",value:"540328"},{label:"洛隆县",value:"540329"},{label:"边坝县",value:"540330"}],[{label:"巴宜区",value:"540402"},{label:"工布江达县",value:"540421"},{label:"米林县",value:"540422"},{label:"墨脱县",value:"540423"},{label:"波密县",value:"540424"},{label:"察隅县",value:"540425"},{label:"朗县",value:"540426"}],[{label:"乃东区",value:"540502"},{label:"扎囊县",value:"540521"},{label:"贡嘎县",value:"540522"},{label:"桑日县",value:"540523"},{label:"琼结县",value:"540524"},{label:"曲松县",value:"540525"},{label:"措美县",value:"540526"},{label:"洛扎县",value:"540527"},{label:"加查县",value:"540528"},{label:"隆子县",value:"540529"},{label:"错那县",value:"540530"},{label:"浪卡子县",value:"540531"}],[{label:"那曲县",value:"542421"},{label:"嘉黎县",value:"542422"},{label:"比如县",value:"542423"},{label:"聂荣县",value:"542424"},{label:"安多县",value:"542425"},{label:"申扎县",value:"542426"},{label:"索县",value:"542427"},{label:"班戈县",value:"542428"},{label:"巴青县",value:"542429"},{label:"尼玛县",value:"542430"},{label:"双湖县",value:"542431"}],[{label:"普兰县",value:"542521"},{label:"札达县",value:"542522"},{label:"噶尔县",value:"542523"},{label:"日土县",value:"542524"},{label:"革吉县",value:"542525"},{label:"改则县",value:"542526"},{label:"措勤县",value:"542527"}]],[[{label:"新城区",value:"610102"},{label:"碑林区",value:"610103"},{label:"莲湖区",value:"610104"},{label:"灞桥区",value:"610111"},{label:"未央区",value:"610112"},{label:"雁塔区",value:"610113"},{label:"阎良区",value:"610114"},{label:"临潼区",value:"610115"},{label:"长安区",value:"610116"},{label:"高陵区",value:"610117"},{label:"鄠邑区",value:"610118"},{label:"蓝田县",value:"610122"},{label:"周至县",value:"610124"}],[{label:"王益区",value:"610202"},{label:"印台区",value:"610203"},{label:"耀州区",value:"610204"},{label:"宜君县",value:"610222"}],[{label:"渭滨区",value:"610302"},{label:"金台区",value:"610303"},{label:"陈仓区",value:"610304"},{label:"凤翔县",value:"610322"},{label:"岐山县",value:"610323"},{label:"扶风县",value:"610324"},{label:"眉县",value:"610326"},{label:"陇县",value:"610327"},{label:"千阳县",value:"610328"},{label:"麟游县",value:"610329"},{label:"凤县",value:"610330"},{label:"太白县",value:"610331"}],[{label:"秦都区",value:"610402"},{label:"杨陵区",value:"610403"},{label:"渭城区",value:"610404"},{label:"三原县",value:"610422"},{label:"泾阳县",value:"610423"},{label:"乾县",value:"610424"},{label:"礼泉县",value:"610425"},{label:"永寿县",value:"610426"},{label:"彬县",value:"610427"},{label:"长武县",value:"610428"},{label:"旬邑县",value:"610429"},{label:"淳化县",value:"610430"},{label:"武功县",value:"610431"},{label:"兴平市",value:"610481"}],[{label:"临渭区",value:"610502"},{label:"华州区",value:"610503"},{label:"潼关县",value:"610522"},{label:"大荔县",value:"610523"},{label:"合阳县",value:"610524"},{label:"澄城县",value:"610525"},{label:"蒲城县",value:"610526"},{label:"白水县",value:"610527"},{label:"富平县",value:"610528"},{label:"韩城市",value:"610581"},{label:"华阴市",value:"610582"}],[{label:"宝塔区",value:"610602"},{label:"安塞区",value:"610603"},{label:"延长县",value:"610621"},{label:"延川县",value:"610622"},{label:"子长县",value:"610623"},{label:"志丹县",value:"610625"},{label:"吴起县",value:"610626"},{label:"甘泉县",value:"610627"},{label:"富县",value:"610628"},{label:"洛川县",value:"610629"},{label:"宜川县",value:"610630"},{label:"黄龙县",value:"610631"},{label:"黄陵县",value:"610632"}],[{label:"汉台区",value:"610702"},{label:"南郑区",value:"610703"},{label:"城固县",value:"610722"},{label:"洋县",value:"610723"},{label:"西乡县",value:"610724"},{label:"勉县",value:"610725"},{label:"宁强县",value:"610726"},{label:"略阳县",value:"610727"},{label:"镇巴县",value:"610728"},{label:"留坝县",value:"610729"},{label:"佛坪县",value:"610730"}],[{label:"榆阳区",value:"610802"},{label:"横山区",value:"610803"},{label:"府谷县",value:"610822"},{label:"靖边县",value:"610824"},{label:"定边县",value:"610825"},{label:"绥德县",value:"610826"},{label:"米脂县",value:"610827"},{label:"佳县",value:"610828"},{label:"吴堡县",value:"610829"},{label:"清涧县",value:"610830"},{label:"子洲县",value:"610831"},{label:"神木市",value:"610881"}],[{label:"汉滨区",value:"610902"},{label:"汉阴县",value:"610921"},{label:"石泉县",value:"610922"},{label:"宁陕县",value:"610923"},{label:"紫阳县",value:"610924"},{label:"岚皋县",value:"610925"},{label:"平利县",value:"610926"},{label:"镇坪县",value:"610927"},{label:"旬阳县",value:"610928"},{label:"白河县",value:"610929"}],[{label:"商州区",value:"611002"},{label:"洛南县",value:"611021"},{label:"丹凤县",value:"611022"},{label:"商南县",value:"611023"},{label:"山阳县",value:"611024"},{label:"镇安县",value:"611025"},{label:"柞水县",value:"611026"}]],[[{label:"城关区",value:"620102"},{label:"七里河区",value:"620103"},{label:"西固区",value:"620104"},{label:"安宁区",value:"620105"},{label:"红古区",value:"620111"},{label:"永登县",value:"620121"},{label:"皋兰县",value:"620122"},{label:"榆中县",value:"620123"},{label:"兰州新区",value:"620171"}],[{label:"嘉峪关市",value:"620201"}],[{label:"金川区",value:"620302"},{label:"永昌县",value:"620321"}],[{label:"白银区",value:"620402"},{label:"平川区",value:"620403"},{label:"靖远县",value:"620421"},{label:"会宁县",value:"620422"},{label:"景泰县",value:"620423"}],[{label:"秦州区",value:"620502"},{label:"麦积区",value:"620503"},{label:"清水县",value:"620521"},{label:"秦安县",value:"620522"},{label:"甘谷县",value:"620523"},{label:"武山县",value:"620524"},{label:"张家川回族自治县",value:"620525"}],[{label:"凉州区",value:"620602"},{label:"民勤县",value:"620621"},{label:"古浪县",value:"620622"},{label:"天祝藏族自治县",value:"620623"}],[{label:"甘州区",value:"620702"},{label:"肃南裕固族自治县",value:"620721"},{label:"民乐县",value:"620722"},{label:"临泽县",value:"620723"},{label:"高台县",value:"620724"},{label:"山丹县",value:"620725"}],[{label:"崆峒区",value:"620802"},{label:"泾川县",value:"620821"},{label:"灵台县",value:"620822"},{label:"崇信县",value:"620823"},{label:"华亭县",value:"620824"},{label:"庄浪县",value:"620825"},{label:"静宁县",value:"620826"},{label:"平凉工业园区",value:"620871"}],[{label:"肃州区",value:"620902"},{label:"金塔县",value:"620921"},{label:"瓜州县",value:"620922"},{label:"肃北蒙古族自治县",value:"620923"},{label:"阿克塞哈萨克族自治县",value:"620924"},{label:"玉门市",value:"620981"},{label:"敦煌市",value:"620982"}],[{label:"西峰区",value:"621002"},{label:"庆城县",value:"621021"},{label:"环县",value:"621022"},{label:"华池县",value:"621023"},{label:"合水县",value:"621024"},{label:"正宁县",value:"621025"},{label:"宁县",value:"621026"},{label:"镇原县",value:"621027"}],[{label:"安定区",value:"621102"},{label:"通渭县",value:"621121"},{label:"陇西县",value:"621122"},{label:"渭源县",value:"621123"},{label:"临洮县",value:"621124"},{label:"漳县",value:"621125"},{label:"岷县",value:"621126"}],[{label:"武都区",value:"621202"},{label:"成县",value:"621221"},{label:"文县",value:"621222"},{label:"宕昌县",value:"621223"},{label:"康县",value:"621224"},{label:"西和县",value:"621225"},{label:"礼县",value:"621226"},{label:"徽县",value:"621227"},{label:"两当县",value:"621228"}],[{label:"临夏市",value:"622901"},{label:"临夏县",value:"622921"},{label:"康乐县",value:"622922"},{label:"永靖县",value:"622923"},{label:"广河县",value:"622924"},{label:"和政县",value:"622925"},{label:"东乡族自治县",value:"622926"},{label:"积石山保安族东乡族撒拉族自治县",value:"622927"}],[{label:"合作市",value:"623001"},{label:"临潭县",value:"623021"},{label:"卓尼县",value:"623022"},{label:"舟曲县",value:"623023"},{label:"迭部县",value:"623024"},{label:"玛曲县",value:"623025"},{label:"碌曲县",value:"623026"},{label:"夏河县",value:"623027"}]],[[{label:"城东区",value:"630102"},{label:"城中区",value:"630103"},{label:"城西区",value:"630104"},{label:"城北区",value:"630105"},{label:"大通回族土族自治县",value:"630121"},{label:"湟中县",value:"630122"},{label:"湟源县",value:"630123"}],[{label:"乐都区",value:"630202"},{label:"平安区",value:"630203"},{label:"民和回族土族自治县",value:"630222"},{label:"互助土族自治县",value:"630223"},{label:"化隆回族自治县",value:"630224"},{label:"循化撒拉族自治县",value:"630225"}],[{label:"门源回族自治县",value:"632221"},{label:"祁连县",value:"632222"},{label:"海晏县",value:"632223"},{label:"刚察县",value:"632224"}],[{label:"同仁县",value:"632321"},{label:"尖扎县",value:"632322"},{label:"泽库县",value:"632323"},{label:"河南蒙古族自治县",value:"632324"}],[{label:"共和县",value:"632521"},{label:"同德县",value:"632522"},{label:"贵德县",value:"632523"},{label:"兴海县",value:"632524"},{label:"贵南县",value:"632525"}],[{label:"玛沁县",value:"632621"},{label:"班玛县",value:"632622"},{label:"甘德县",value:"632623"},{label:"达日县",value:"632624"},{label:"久治县",value:"632625"},{label:"玛多县",value:"632626"}],[{label:"玉树市",value:"632701"},{label:"杂多县",value:"632722"},{label:"称多县",value:"632723"},{label:"治多县",value:"632724"},{label:"囊谦县",value:"632725"},{label:"曲麻莱县",value:"632726"}],[{label:"格尔木市",value:"632801"},{label:"德令哈市",value:"632802"},{label:"乌兰县",value:"632821"},{label:"都兰县",value:"632822"},{label:"天峻县",value:"632823"},{label:"大柴旦行政委员会",value:"632857"},{label:"冷湖行政委员会",value:"632858"},{label:"茫崖行政委员会",value:"632859"}]],[[{label:"兴庆区",value:"640104"},{label:"西夏区",value:"640105"},{label:"金凤区",value:"640106"},{label:"永宁县",value:"640121"},{label:"贺兰县",value:"640122"},{label:"灵武市",value:"640181"}],[{label:"大武口区",value:"640202"},{label:"惠农区",value:"640205"},{label:"平罗县",value:"640221"}],[{label:"利通区",value:"640302"},{label:"红寺堡区",value:"640303"},{label:"盐池县",value:"640323"},{label:"同心县",value:"640324"},{label:"青铜峡市",value:"640381"}],[{label:"原州区",value:"640402"},{label:"西吉县",value:"640422"},{label:"隆德县",value:"640423"},{label:"泾源县",value:"640424"},{label:"彭阳县",value:"640425"}],[{label:"沙坡头区",value:"640502"},{label:"中宁县",value:"640521"},{label:"海原县",value:"640522"}]],[[{label:"天山区",value:"650102"},{label:"沙依巴克区",value:"650103"},{label:"新市区",value:"650104"},{label:"水磨沟区",value:"650105"},{label:"头屯河区",value:"650106"},{label:"达坂城区",value:"650107"},{label:"米东区",value:"650109"},{label:"乌鲁木齐县",value:"650121"},{label:"乌鲁木齐经济技术开发区",value:"650171"},{label:"乌鲁木齐高新技术产业开发区",value:"650172"}],[{label:"独山子区",value:"650202"},{label:"克拉玛依区",value:"650203"},{label:"白碱滩区",value:"650204"},{label:"乌尔禾区",value:"650205"}],[{label:"高昌区",value:"650402"},{label:"鄯善县",value:"650421"},{label:"托克逊县",value:"650422"}],[{label:"伊州区",value:"650502"},{label:"巴里坤哈萨克自治县",value:"650521"},{label:"伊吾县",value:"650522"}],[{label:"昌吉市",value:"652301"},{label:"阜康市",value:"652302"},{label:"呼图壁县",value:"652323"},{label:"玛纳斯县",value:"652324"},{label:"奇台县",value:"652325"},{label:"吉木萨尔县",value:"652327"},{label:"木垒哈萨克自治县",value:"652328"}],[{label:"博乐市",value:"652701"},{label:"阿拉山口市",value:"652702"},{label:"精河县",value:"652722"},{label:"温泉县",value:"652723"}],[{label:"库尔勒市",value:"652801"},{label:"轮台县",value:"652822"},{label:"尉犁县",value:"652823"},{label:"若羌县",value:"652824"},{label:"且末县",value:"652825"},{label:"焉耆回族自治县",value:"652826"},{label:"和静县",value:"652827"},{label:"和硕县",value:"652828"},{label:"博湖县",value:"652829"},{label:"库尔勒经济技术开发区",value:"652871"}],[{label:"阿克苏市",value:"652901"},{label:"温宿县",value:"652922"},{label:"库车县",value:"652923"},{label:"沙雅县",value:"652924"},{label:"新和县",value:"652925"},{label:"拜城县",value:"652926"},{label:"乌什县",value:"652927"},{label:"阿瓦提县",value:"652928"},{label:"柯坪县",value:"652929"}],[{label:"阿图什市",value:"653001"},{label:"阿克陶县",value:"653022"},{label:"阿合奇县",value:"653023"},{label:"乌恰县",value:"653024"}],[{label:"喀什市",value:"653101"},{label:"疏附县",value:"653121"},{label:"疏勒县",value:"653122"},{label:"英吉沙县",value:"653123"},{label:"泽普县",value:"653124"},{label:"莎车县",value:"653125"},{label:"叶城县",value:"653126"},{label:"麦盖提县",value:"653127"},{label:"岳普湖县",value:"653128"},{label:"伽师县",value:"653129"},{label:"巴楚县",value:"653130"},{label:"塔什库尔干塔吉克自治县",value:"653131"}],[{label:"和田市",value:"653201"},{label:"和田县",value:"653221"},{label:"墨玉县",value:"653222"},{label:"皮山县",value:"653223"},{label:"洛浦县",value:"653224"},{label:"策勒县",value:"653225"},{label:"于田县",value:"653226"},{label:"民丰县",value:"653227"}],[{label:"伊宁市",value:"654002"},{label:"奎屯市",value:"654003"},{label:"霍尔果斯市",value:"654004"},{label:"伊宁县",value:"654021"},{label:"察布查尔锡伯自治县",value:"654022"},{label:"霍城县",value:"654023"},{label:"巩留县",value:"654024"},{label:"新源县",value:"654025"},{label:"昭苏县",value:"654026"},{label:"特克斯县",value:"654027"},{label:"尼勒克县",value:"654028"}],[{label:"塔城市",value:"654201"},{label:"乌苏市",value:"654202"},{label:"额敏县",value:"654221"},{label:"沙湾县",value:"654223"},{label:"托里县",value:"654224"},{label:"裕民县",value:"654225"},{label:"和布克赛尔蒙古自治县",value:"654226"}],[{label:"阿勒泰市",value:"654301"},{label:"布尔津县",value:"654321"},{label:"富蕴县",value:"654322"},{label:"福海县",value:"654323"},{label:"哈巴河县",value:"654324"},{label:"青河县",value:"654325"},{label:"吉木乃县",value:"654326"}],[{label:"石河子市",value:"659001"},{label:"阿拉尔市",value:"659002"},{label:"图木舒克市",value:"659003"},{label:"五家渠市",value:"659004"},{label:"铁门关市",value:"659006"}]],[[{label:"台北",value:"660101"}],[{label:"高雄",value:"660201"}],[{label:"基隆",value:"660301"}],[{label:"台中",value:"660401"}],[{label:"台南",value:"660501"}],[{label:"新竹",value:"660601"}],[{label:"嘉义",value:"660701"}],[{label:"宜兰",value:"660801"}],[{label:"桃园",value:"660901"}],[{label:"苗栗",value:"661001"}],[{label:"彰化",value:"661101"}],[{label:"南投",value:"661201"}],[{label:"云林",value:"661301"}],[{label:"屏东",value:"661401"}],[{label:"台东",value:"661501"}],[{label:"花莲",value:"661601"}],[{label:"澎湖",value:"661701"}]],[[{label:"香港岛",value:"670101"}],[{label:"九龙",value:"670201"}],[{label:"新界",value:"670301"}]],[[{label:"澳门半岛",value:"680101"}],[{label:"氹仔岛",value:"680201"}],[{label:"路环岛",value:"680301"}],[{label:"路氹城",value:"680401"}]]];t["default"]=n},"631a":function(e,t,i){"use strict";var n,r,a,s=i("4329"),o=i("3240");r=function(){var e,t,i=0;r.prototype.init.call(this),this.push=function(n){var r;for(t?(r=new Uint8Array(t.byteLength+n.data.byteLength),r.set(t),r.set(n.data,t.byteLength),t=r):t=n.data;i<t.byteLength-3;i++)if(1===t[i+2]){e=i+5;break}while(e<t.byteLength)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<t.length);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3;break}t=t.subarray(i),e-=i,i=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")}},r.prototype=new s,a={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},n=function(){var e,t,i,s,l,u,c,h=new r;n.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,h.push(e))},h.on("data",(function(n){var r={trackId:t,pts:i,dts:s,data:n};switch(31&n[0]){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=l(n.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=l(n.subarray(1)),r.config=u(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp";break;default:break}e.trigger("data",r)})),h.on("done",(function(){e.trigger("done")})),this.flush=function(){h.flush()},c=function(e,t){var i,n,r=8,a=8;for(i=0;i<e;i++)0!==a&&(n=t.readExpGolomb(),a=(r+n+256)%256),r=0===a?r:a},l=function(e){var t,i,n=e.byteLength,r=[],a=1;while(a<n-2)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},u=function(e){var t,i,n,r,s,l,u,h,d,p,f,v,m,g,y=0,b=0,_=0,T=0,S=1;if(t=new o(e),i=t.readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),a[i]&&(s=t.readUnsignedExpGolomb(),3===s&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(f=3!==s?8:12,g=0;g<f;g++)t.readBoolean()&&c(g<6?16:64,t);if(t.skipUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),0===l)t.readUnsignedExpGolomb();else if(1===l)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),g=0;g<u;g++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),h=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),p=t.readBits(1),0===p&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(y=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb(),_=t.readUnsignedExpGolomb(),T=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(m=t.readUnsignedByte(),m){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()];break}v&&(S=v[0]/v[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(h+1)-2*y-2*b)*S),height:(2-p)*(d+1)*16-2*_-2*T}}},n.prototype=new s,e.exports={H264Stream:n,NalByteStream:r}},6444:function(e,t){var i=function(e){return e.replace(/^\s+|\s+$/g,"")},n=function(e){return"[object Array]"===Object.prototype.toString.call(e)};e.exports=function(e){if(!e)return{};for(var t={},r=i(e).split("\n"),a=0;a<r.length;a++){var s=r[a],o=s.indexOf(":"),l=i(s.slice(0,o)).toLowerCase(),u=i(s.slice(o+1));"undefined"===typeof t[l]?t[l]=u:n(t[l])?t[l].push(u):t[l]=[t[l],u]}return t}},6506:function(e,t,i){"use strict";var n=i("9a2f"),r=i.n(n);r.a},"665d":function(e,t,i){"use strict";i.r(t);var n=i("71fc"),r=i("6d87");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("0696");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"16807617",null,!1,n["a"],s);t["default"]=l.exports},"672d":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("be09"),u=a(l),c=i("12c6"),h=a(c),d=i("6d5a"),p=a(d),f=i("4ea2"),v=a(f),m=i("9417"),g=a(m),y=i("ba2d"),b=i("a64c"),_=a(b),T=i("78d8"),S=a(T),w=i("e206"),E=a(w),k=function(){var e=void 0;try{e="a64c"}catch(t){}return e},C=function(e){u["default"].setTimeout(e,E["default"].TIME_BETWEEN_CHUNKS)},x=function(){return Math.random().toString(36).slice(2,8)},A=function(e,t){("number"!==typeof t||t<0)&&(t=0);var i=Math.pow(10,t);return Math.round(e*i)/i},I=function(e){function t(e){var i=this;s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var n=void 0;this.chunkSize_=E["default"].BYTES_PER_CHUNK,this.buffer_=[],this.bufferSize_=0,this.basePtsOffset_=NaN,this.mediaSource_=e,this.audioBufferEnd_=NaN,this.videoBufferEnd_=NaN,this.updating=!1,this.timestampOffset_=0,n=u["default"].btoa(String.fromCharCode.apply(null,Array.prototype.slice.call(p["default"].getFlvHeader())));var a=this.mediaSource_.player_.id().replace(/[^a-zA-Z0-9]/g,"_");this.flashEncodedHeaderName_="vjs_flashEncodedHeader_"+a+x(),this.flashEncodedDataName_="vjs_flashEncodedData_"+a+x(),u["default"][this.flashEncodedHeaderName_]=function(){return delete u["default"][i.flashEncodedHeaderName_],n},this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_),this.transmuxer_=(0,S["default"])(_["default"],k()),this.transmuxer_.postMessage({action:"init",options:{}}),this.transmuxer_.onmessage=function(e){"data"===e.data.action&&i.receiveBuffer_(e.data.segment)},this.one("updateend",(function(){i.mediaSource_.tech_.trigger("loadedmetadata")})),Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"===typeof e&&e>=0&&(this.timestampOffset_=e,this.mediaSource_.swfObj.vjs_discontinuity(),this.basePtsOffset_=NaN,this.audioBufferEnd_=NaN,this.videoBufferEnd_=NaN,this.transmuxer_.postMessage({action:"reset"}))}}),Object.defineProperty(this,"buffered",{get:function(){if(!this.mediaSource_||!this.mediaSource_.swfObj||!("vjs_getProperty"in this.mediaSource_.swfObj))return h["default"].createTimeRange();var e=this.mediaSource_.swfObj.vjs_getProperty("buffered");return e&&e.length&&(e[0][0]=A(e[0][0],3),e[0][1]=A(e[0][1],3)),h["default"].createTimeRanges(e)}}),this.mediaSource_.player_.on("seeked",(function(){if((0,v["default"])(0,1/0,i.metadataTrack_),i.inbandTextTracks_)for(var e in i.inbandTextTracks_)(0,v["default"])(0,1/0,i.inbandTextTracks_[e])}));var o=this.onHlsReset_.bind(this);this.mediaSource_.player_.tech_.on("hls-reset",o),this.mediaSource_.player_.tech_.hls.on("dispose",(function(){i.transmuxer_.terminate(),i.mediaSource_.player_.tech_.off("hls-reset",o)}))}return o(t,e),n(t,[{key:"appendBuffer",value:function(e){var t=void 0;if(this.updating)throw t=new Error("SourceBuffer.append() cannot be called while an update is in progress"),t.name="InvalidStateError",t.code=11,t;this.updating=!0,this.mediaSource_.readyState="open",this.trigger({type:"update"}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"abort",value:function(){this.buffer_=[],this.bufferSize_=0,this.mediaSource_.swfObj.vjs_abort(),this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"remove",value:function(e,t){if((0,v["default"])(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)(0,v["default"])(e,t,this.inbandTextTracks_[i]);this.trigger({type:"update"}),this.trigger({type:"updateend"})}},{key:"receiveBuffer_",value:function(e){var t=this;(0,g["default"])(this,this.mediaSource_,e),(0,y.addTextTrackData)(this,e.captions,e.metadata),C((function(){var i=t.convertTagsToData_(e);0===t.buffer_.length&&C(t.processBuffer_.bind(t)),i&&(t.buffer_.push(i),t.bufferSize_+=i.byteLength)}))}},{key:"processBuffer_",value:function(){var e=this,t=E["default"].BYTES_PER_CHUNK;if(this.buffer_.length){var i=this.buffer_[0].subarray(0,t);i.byteLength<t||this.buffer_[0].byteLength===t?this.buffer_.shift():this.buffer_[0]=this.buffer_[0].subarray(t),this.bufferSize_-=i.byteLength;for(var n=[],r=i.byteLength,a=0;a<r;a++)n.push(String.fromCharCode(i[a]));var s=u["default"].btoa(n.join(""));u["default"][this.flashEncodedDataName_]=function(){return C(e.processBuffer_.bind(e)),delete u["default"][e.flashEncodedDataName_],s},this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_)}else!1!==this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"convertTagsToData_",value:function(e){var t=0,i=this.mediaSource_.tech_,n=0,r=void 0,a=e.tags.videoTags,s=e.tags.audioTags;if(isNaN(this.basePtsOffset_)&&(a.length||s.length)){var o=a[0]||{pts:1/0},l=s[0]||{pts:1/0};this.basePtsOffset_=Math.min(l.pts,o.pts)}i.seeking()&&(this.videoBufferEnd_=NaN,this.audioBufferEnd_=NaN),isNaN(this.videoBufferEnd_)?(i.buffered().length&&(n=i.buffered().end(0)-this.timestampOffset),i.seeking()&&(n=Math.max(n,i.currentTime()-this.timestampOffset)),n*=1e3,n+=this.basePtsOffset_):n=this.videoBufferEnd_+.1;var u=a.length;if(u&&a[u-1].pts>=n){while(--u){var c=a[u];if(!(c.pts>n)&&(c.keyFrame||c.metaDataTag))break}while(u){var h=a[u-1];if(!h.metaDataTag)break;u--}}var d=a.slice(u),p=void 0;p=isNaN(this.audioBufferEnd_)?n:this.audioBufferEnd_+.1,d.length&&(p=Math.min(p,d[0].pts)),u=0;while(u<s.length){if(s[u].pts>=p)break;u++}var f=s.slice(u);f.length&&(this.audioBufferEnd_=f[f.length-1].pts),d.length&&(this.videoBufferEnd_=d[d.length-1].pts);var v=this.getOrderedTags_(d,f);if(0!==v.length){if(v[0].pts<n&&i.seeking()){var m=1/30,g=i.currentTime(),y=(n-v[0].pts)/1e3,b=g-y;b<m&&(b=0);try{this.mediaSource_.swfObj.vjs_adjustCurrentTime(b)}catch(S){}}for(var _=0;_<v.length;_++)t+=v[_].bytes.byteLength;r=new Uint8Array(t);_=0;for(var T=0;_<v.length;_++)r.set(v[_].bytes,T),T+=v[_].bytes.byteLength;return r}}},{key:"getOrderedTags_",value:function(e,t){var i=void 0,n=[];while(e.length||t.length)i=e.length?t.length&&t[0].dts<e[0].dts?t.shift():e.shift():t.shift(),n.push(i);return n}},{key:"onHlsReset_",value:function(){this.transmuxer_.postMessage({action:"resetCaptions"})}}]),t}(h["default"].EventTarget);t["default"]=I,e.exports=t["default"]},6941:function(e,t,i){"use strict";var n;e.exports=function(e){var t=n[e.byteLength%16||0],i=new Uint8Array(e.byteLength+t.length);return i.set(e),i.set(t,e.byteLength),i},n=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]]},"699f":function(e,t){var i,n,r,a,s,o,l,u=9e4;i=function(e){return e*u},n=function(e,t){return e*t},r=function(e){return e/u},a=function(e,t){return e/t},s=function(e,t){return i(a(e,t))},o=function(e,t){return n(r(e),t)},l=function(e,t,i){return r(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:i,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:s,videoTsToAudioTs:o,metadataTsToSeconds:l}},"6a7c":function(e,t,i){"use strict";i.d(t,"a",(function(){return I})),i.d(t,"b",(function(){return O}));var n,r=i("b8a5"),a=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(r["h"])(e):e}),s=function(e){return Array.isArray(e)?e.map((function(e){return a(e)})):[a(e)]},o=function(e){e=Object(r["k"])(e);var t=[],i=0;while(e.length>i){var a=e[i],s=0,o=0;o++;var l=e[o];o++;while(128&l)s=(127&l)<<7,l=e[o],o++;s+=127&l;for(var u=0;u<n.length;u++){var c=n[u],h=c.id,d=c.parser;if(a===h){t.push(d(e.subarray(o,o+s)));break}}i+=s+o}return t};n=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=Object(r["c"])(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(e.subarray(t.size))||[],t}},{id:4,parser:function(e){var t={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:o(e.subarray(13))};return t}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var l=function e(t,i,n){void 0===n&&(n=!1),i=s(i),t=Object(r["k"])(t);var a=[];if(!i.length)return a;var o=0;while(o<t.length){var l=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,u=t.subarray(o+4,o+8);if(0===l)break;var c=o+l;if(c>t.length){if(n)break;c=t.length}var h=t.subarray(o+8,c);Object(r["a"])(u,i[0])&&(1===i.length?a.push(h):a.push.apply(a,e(h,i.slice(1),n))),o=c}return a},u={EBML:Object(r["k"])([26,69,223,163]),DocType:Object(r["k"])([66,130]),Segment:Object(r["k"])([24,83,128,103]),SegmentInfo:Object(r["k"])([21,73,169,102]),Tracks:Object(r["k"])([22,84,174,107]),Track:Object(r["k"])([174]),TrackNumber:Object(r["k"])([215]),DefaultDuration:Object(r["k"])([35,227,131]),TrackEntry:Object(r["k"])([174]),TrackType:Object(r["k"])([131]),FlagDefault:Object(r["k"])([136]),CodecID:Object(r["k"])([134]),CodecPrivate:Object(r["k"])([99,162]),VideoTrack:Object(r["k"])([224]),AudioTrack:Object(r["k"])([225]),Cluster:Object(r["k"])([31,67,182,117]),Timestamp:Object(r["k"])([231]),TimestampScale:Object(r["k"])([42,215,177]),BlockGroup:Object(r["k"])([160]),BlockDuration:Object(r["k"])([155]),Block:Object(r["k"])([161]),SimpleBlock:Object(r["k"])([163])},c=[128,64,32,16,8,4,2,1],h=function(e){for(var t=1,i=0;i<c.length;i++){if(e&c[i])break;t++}return t},d=function(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1);var a=h(e[t]),s=e.subarray(t,t+a);return i&&(s=Array.prototype.slice.call(e,t,t+a),s[0]^=c[a-1]),{length:a,value:Object(r["b"])(s,{signed:n}),bytes:s}},p=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(r["f"])(t):t},f=function(e){return Array.isArray(e)?e.map((function(e){return p(e)})):[p(e)]},v=function e(t,i,n){if(n>=i.length)return i.length;var a=d(i,n,!1);if(Object(r["a"])(t.bytes,a.bytes))return n;var s=d(i,n+a.length);return e(t,i,n+s.length+s.value+a.length)},m=function e(t,i){i=f(i),t=Object(r["k"])(t);var n=[];if(!i.length)return n;var a=0;while(a<t.length){var s=d(t,a,!1),o=d(t,a+s.length),l=a+s.length+o.length;127===o.value&&(o.value=v(s,t,l),o.value!==t.length&&(o.value-=l));var u=l+o.value>t.length?t.length:l+o.value,c=t.subarray(l,u);Object(r["a"])(i[0],s.bytes)&&(1===i.length?n.push(c):n=n.concat(e(c,i.slice(1))));var h=s.length+o.length+c.length;a+=h}return n},g=i("8ff6"),y=Object(r["k"])([0,0,0,1]),b=Object(r["k"])([0,0,1]),_=Object(r["k"])([0,0,3]),T=function(e){var t=[],i=1;while(i<e.length-2)Object(r["a"])(e.subarray(i,i+3),_)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var n=e.length-t.length,a=new Uint8Array(n),s=0;for(i=0;i<n;s++,i++)s===t[0]&&(s++,t.shift()),a[i]=e[s];return a},S=function(e,t,i,n){void 0===n&&(n=1/0),e=Object(r["k"])(e),i=[].concat(i);var a,s=0,o=0;while(s<e.length&&(o<n||a)){var l=void 0;if(Object(r["a"])(e.subarray(s),y)?l=4:Object(r["a"])(e.subarray(s),b)&&(l=3),l){if(o++,a)return T(e.subarray(a,s));var u=void 0;"h264"===t?u=31&e[s+l]:"h265"===t&&(u=e[s+l]>>1&63),-1!==i.indexOf(u)&&(a=s+l),s+=l+("h264"===t?1:2)}else s++}return e.subarray(0,0)},w=function(e,t,i){return S(e,"h264",t,i)},E=function(e,t,i){return S(e,"h265",t,i)},k={webm:Object(r["k"])([119,101,98,109]),matroska:Object(r["k"])([109,97,116,114,111,115,107,97]),flac:Object(r["k"])([102,76,97,67]),ogg:Object(r["k"])([79,103,103,83]),ac3:Object(r["k"])([11,119]),riff:Object(r["k"])([82,73,70,70]),avi:Object(r["k"])([65,86,73]),wav:Object(r["k"])([87,65,86,69]),"3gp":Object(r["k"])([102,116,121,112,51,103]),mp4:Object(r["k"])([102,116,121,112]),fmp4:Object(r["k"])([115,116,121,112]),mov:Object(r["k"])([102,116,121,112,113,116]),moov:Object(r["k"])([109,111,111,118]),moof:Object(r["k"])([109,111,111,102])},C={aac:function(e){var t=Object(g["a"])(e);return Object(r["a"])(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(g["a"])(e);return Object(r["a"])(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=m(e,[u.EBML,u.DocType])[0];return Object(r["a"])(t,k.webm)},mkv:function(e){var t=m(e,[u.EBML,u.DocType])[0];return Object(r["a"])(t,k.matroska)},mp4:function(e){return!C["3gp"](e)&&!C.mov(e)&&(!(!Object(r["a"])(e,k.mp4,{offset:4})&&!Object(r["a"])(e,k.fmp4,{offset:4}))||(!(!Object(r["a"])(e,k.moof,{offset:4})&&!Object(r["a"])(e,k.moov,{offset:4}))||void 0))},mov:function(e){return Object(r["a"])(e,k.mov,{offset:4})},"3gp":function(e){return Object(r["a"])(e,k["3gp"],{offset:4})},ac3:function(e){var t=Object(g["a"])(e);return Object(r["a"])(e,k.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];var t=0;while(t+188<e.length&&t<188){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(g["a"])(e);return Object(r["a"])(e,k.flac,{offset:t})},ogg:function(e){return Object(r["a"])(e,k.ogg)},avi:function(e){return Object(r["a"])(e,k.riff)&&Object(r["a"])(e,k.avi,{offset:8})},wav:function(e){return Object(r["a"])(e,k.riff)&&Object(r["a"])(e,k.wav,{offset:8})},h264:function(e){return w(e,7,3).length},h265:function(e){return E(e,[32,33],3).length}},x=Object.keys(C).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);x.forEach((function(e){var t=C[e];C[e]=function(e){return t(Object(r["k"])(e))}}));var A=C,I=function(e){e=Object(r["k"])(e);for(var t=0;t<x.length;t++){var i=x[t];if(A[i](e))return i}return""},O=function(e){return l(e,["moof"]).length>0}},"6be2":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("d136"),a=n(r),s=i("be09"),o=n(s),l=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=a["default"].buildAbsoluteURL(o["default"].location.href,e)),a["default"].buildAbsoluteURL(e,t))};t["default"]=l,e.exports=t["default"]},"6d5a":function(e,t,i){e.exports={tag:i("d7ba"),Transmuxer:i("847a"),getFlvHeader:i("b046")}},"6d67":function(e,t){var i="auto",n={"":!0,lr:!0,rl:!0},r={start:!0,middle:!0,end:!0,left:!0,right:!0};function a(e){if("string"!==typeof e)return!1;var t=n[e.toLowerCase()];return!!t&&e.toLowerCase()}function s(e){if("string"!==typeof e)return!1;var t=r[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function l(e,t,n){var r=this,l=/MSIE\s8\.0/.test(navigator.userAgent),u={};l?r=document.createElement("custom"):u.enumerable=!0,r.hasBeenReset=!1;var c="",h=!1,d=e,p=t,f=n,v=null,m="",g=!0,y="auto",b="start",_=50,T="middle",S=50,w="middle";if(Object.defineProperty(r,"id",o({},u,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(r,"pauseOnExit",o({},u,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(r,"startTime",o({},u,{get:function(){return d},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",o({},u,{get:function(){return p},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",o({},u,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",o({},u,{get:function(){return v},set:function(e){v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",o({},u,{get:function(){return m},set:function(e){var t=a(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",o({},u,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",o({},u,{get:function(){return y},set:function(e){if("number"!==typeof e&&e!==i)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",o({},u,{get:function(){return b},set:function(e){var t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",o({},u,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",o({},u,{get:function(){return T},set:function(e){var t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",o({},u,{get:function(){return S},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",o({},u,{get:function(){return w},set:function(e){var t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),r.displayState=void 0,l)return r}l.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=l},"6d87":function(e,t,i){"use strict";i.r(t);var n=i("b3ab"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},"6e1b":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i("e475"),o=r(s),l=function(){},u=function(){function e(t,i){var n=this;a(this,e);var r=function(){n.sourceBuffer_=t.addSourceBuffer(i),n.onUpdateendCallback_=function(){var e=n.pendingCallback_;n.pendingCallback_=null,e&&e(),n.runCallback_()},n.sourceBuffer_.addEventListener("updateend",n.onUpdateendCallback_),n.runCallback_()};this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,"closed"===t.readyState?t.addEventListener("sourceopen",r):r()}return n(e,[{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_((function(){t.sourceBuffer_.abort()}),e)}},{key:"appendBuffer",value:function(e,t){var i=this;this.processedAppend_=!0,this.queueCallback_((function(){i.sourceBuffer_.appendBuffer(e)}),t)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:o["default"].createTimeRanges()}},{key:"remove",value:function(e,t){var i=this;this.processedAppend_&&this.queueCallback_((function(){i.sourceBuffer_.remove(e,t)}),l)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(e){var t=this;return"undefined"!==typeof e&&(this.queueCallback_((function(){t.sourceBuffer_.timestampOffset=e})),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),e}();t["default"]=u,e.exports=t["default"]},"71fc":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var n={uPopup:i("df25").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("u-popup",{attrs:{maskCloseAble:e.maskCloseAble,mode:"bottom",popup:!1,length:"auto",safeAreaInsetBottom:e.safeAreaInsetBottom,"z-index":e.uZIndex},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},[i("v-uni-view",{staticClass:"u-datetime-picker"},[i("v-uni-view",{staticClass:"u-picker-header",on:{touchmove:function(t){t.stopPropagation(),t.preventDefault(),arguments[0]=t=e.$handleEvent(t)}}},[i("v-uni-view",{staticClass:"u-btn-picker u-btn-picker--tips",style:{color:e.cancelColor},attrs:{"hover-class":"u-opacity","hover-stay-time":150},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.getResult("cancel")}}},[e._v(e._s(e.cancelText))]),i("v-uni-view",{staticClass:"u-picker__title"},[e._v(e._s(e.title))]),i("v-uni-view",{staticClass:"u-btn-picker u-btn-picker--primary",style:{color:e.moving?e.cancelColor:e.confirmColor},attrs:{"hover-class":"u-opacity","hover-stay-time":150},on:{touchmove:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t)},click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.getResult("confirm")}}},[e._v(e._s(e.confirmText))])],1),i("v-uni-view",{staticClass:"u-picker-body"},["region"==e.mode?i("v-uni-picker-view",{staticClass:"u-picker-view",attrs:{value:e.valueArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)},pickstart:function(t){arguments[0]=t=e.$handleEvent(t),e.pickstart.apply(void 0,arguments)},pickend:function(t){arguments[0]=t=e.$handleEvent(t),e.pickend.apply(void 0,arguments)}}},[!e.reset&&e.params.province?i("v-uni-picker-view-column",e._l(e.provinces,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[i("v-uni-view",{staticClass:"u-line-1"},[e._v(e._s(t.label))])],1)})),1):e._e(),!e.reset&&e.params.city?i("v-uni-picker-view-column",e._l(e.citys,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[i("v-uni-view",{staticClass:"u-line-1"},[e._v(e._s(t.label))])],1)})),1):e._e(),!e.reset&&e.params.area?i("v-uni-picker-view-column",e._l(e.areas,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[i("v-uni-view",{staticClass:"u-line-1"},[e._v(e._s(t.label))])],1)})),1):e._e()],1):"time"==e.mode?i("v-uni-picker-view",{staticClass:"u-picker-view",attrs:{value:e.valueArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)},pickstart:function(t){arguments[0]=t=e.$handleEvent(t),e.pickstart.apply(void 0,arguments)},pickend:function(t){arguments[0]=t=e.$handleEvent(t),e.pickend.apply(void 0,arguments)}}},[!e.reset&&e.params.year?i("v-uni-picker-view-column",e._l(e.years,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[e._v(e._s(t)),e.showTimeTag?i("v-uni-text",{staticClass:"u-text"},[e._v("年")]):e._e()],1)})),1):e._e(),!e.reset&&e.params.month?i("v-uni-picker-view-column",e._l(e.months,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[e._v(e._s(e.formatNumber(t))),e.showTimeTag?i("v-uni-text",{staticClass:"u-text"},[e._v("月")]):e._e()],1)})),1):e._e(),!e.reset&&e.params.day?i("v-uni-picker-view-column",e._l(e.days,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[e._v(e._s(e.formatNumber(t))),e.showTimeTag?i("v-uni-text",{staticClass:"u-text"},[e._v("日")]):e._e()],1)})),1):e._e(),!e.reset&&e.params.hour?i("v-uni-picker-view-column",e._l(e.hours,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[e._v(e._s(e.formatNumber(t))),e.showTimeTag?i("v-uni-text",{staticClass:"u-text"},[e._v("时")]):e._e()],1)})),1):e._e(),!e.reset&&e.params.minute?i("v-uni-picker-view-column",e._l(e.minutes,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[e._v(e._s(e.formatNumber(t))),e.showTimeTag?i("v-uni-text",{staticClass:"u-text"},[e._v("分")]):e._e()],1)})),1):e._e(),!e.reset&&e.params.second?i("v-uni-picker-view-column",e._l(e.seconds,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[e._v(e._s(e.formatNumber(t))),e.showTimeTag?i("v-uni-text",{staticClass:"u-text"},[e._v("秒")]):e._e()],1)})),1):e._e()],1):"selector"==e.mode?i("v-uni-picker-view",{staticClass:"u-picker-view",attrs:{value:e.valueArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)},pickstart:function(t){arguments[0]=t=e.$handleEvent(t),e.pickstart.apply(void 0,arguments)},pickend:function(t){arguments[0]=t=e.$handleEvent(t),e.pickend.apply(void 0,arguments)}}},[e.reset?e._e():i("v-uni-picker-view-column",e._l(e.range,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[i("v-uni-view",{staticClass:"u-line-1"},[e._v(e._s(e.getItemValue(t,"selector")))])],1)})),1)],1):"multiSelector"==e.mode?i("v-uni-picker-view",{staticClass:"u-picker-view",attrs:{value:e.valueArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)},pickstart:function(t){arguments[0]=t=e.$handleEvent(t),e.pickstart.apply(void 0,arguments)},pickend:function(t){arguments[0]=t=e.$handleEvent(t),e.pickend.apply(void 0,arguments)}}},e._l(e.range,(function(t,n){return e.reset?e._e():i("v-uni-picker-view-column",{key:n},e._l(t,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-column-item"},[i("v-uni-view",{staticClass:"u-line-1"},[e._v(e._s(e.getItemValue(t,"multiSelector")))])],1)})),1)})),1):e._e()],1)],1)],1)},a=[]},7205:function(e,t,i){"use strict";i.r(t);var n=i("b48b"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},7516:function(e,t,i){"use strict";i.r(t);var n=i("98df"),r=i("8c25");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("af37");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"1009c249",null,!1,n["a"],s);t["default"]=l.exports},"78a2":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-empty[data-v-1009c249]{display:flex;flex-direction:row;flex-direction:column;justify-content:center;align-items:center;height:100%}.u-image[data-v-1009c249]{margin-bottom:%?20?%}.u-slot-wrap[data-v-1009c249]{display:flex;flex-direction:row;justify-content:center;align-items:center;margin-top:%?20?%}',""]),e.exports=t},"78d8":function(e,t,i){var n=arguments[3],r=arguments[4],a=arguments[5],s=JSON.stringify,o=!1,l=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=entryModule)};"undefined"===typeof n&&(o=!0,n=l,r=i.m);var u=function(e){for(var t,i=Object.keys(a),o=0;o<i.length;o++){var l=i[o],u=a[l].exports;if(u===e||u&&u.default===e){t=l;break}}if(!t){t=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var c={};for(o=0;o<i.length;o++){l=i[o];c[l]=l}r[t]=["function(require,module,exports){"+e+"(self); }",c]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),d={};return d[t]=t,r[h]=["function(require,module,exports){var f = require("+s(t)+");(f.default ? f.default : f)(self);}",d],"("+n+")({"+Object.keys(r).map((function(e){return s(e)+":["+r[e][0]+","+s(r[e][1])+"]"})).join(",")+"},{},["+s(h)+"])"},c=function(e,t){var a,o="string"===typeof t;a=o?{}:[],Object.keys(r).forEach((function(e){r[e]&&(a[e]=r[e].toString())}));var l,u=i(t);if(!u||u!==e&&u.default!==e){var c=a[t];a[t]=c.substring(0,c.length-1)+"\n"+e.name+"();\n}"}if(o){t=s(t);var h=Object.keys(a).map((function(e){return s(e)+":"+a[e]}));l="{"+h.join(",")+"}"}else l="["+a.join(",")+"]";return"var fn = ("+n.toString().replace("entryModule",t)+")("+l+');\n(typeof fn === "function") && fn(self);'};e.exports=function(e,t){var i;i=o?c(e,t):u(e);var n=new Blob([i],{type:"text/javascript"}),r=window.URL||window.webkitURL||window.mozURL||window.msURL,a=r.createObjectURL(n),s=new Worker(a);return s.objectURL=a,s}},"78f4":function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-button",{staticClass:"u-btn u-line-1 u-fix-ios-appearance",class:["u-size-"+e.size,e.plain?"u-btn--"+e.type+"--plain":"",e.loading?"u-loading":"","circle"==e.shape?"u-round-circle":"",e.hairLine?e.showHairLineBorder:"u-btn--bold-border","u-btn--"+e.type,e.disabled?"u-btn--"+e.type+"--disabled":""],style:[e.customStyle,{overflow:e.ripple?"hidden":"visible"}],attrs:{id:"u-wave-btn","hover-start-time":Number(e.hoverStartTime),"hover-stay-time":Number(e.hoverStayTime),disabled:e.disabled,"form-type":e.formType,"open-type":e.openType,"app-parameter":e.appParameter,"hover-stop-propagation":e.hoverStopPropagation,"send-message-title":e.sendMessageTitle,"send-message-path":"sendMessagePath",lang:e.lang,"data-name":e.dataName,"session-from":e.sessionFrom,"send-message-img":e.sendMessageImg,"show-message-card":e.showMessageCard,"hover-class":e.getHoverClass,loading:e.loading},on:{getphonenumber:function(t){arguments[0]=t=e.$handleEvent(t),e.getphonenumber.apply(void 0,arguments)},getuserinfo:function(t){arguments[0]=t=e.$handleEvent(t),e.getuserinfo.apply(void 0,arguments)},error:function(t){arguments[0]=t=e.$handleEvent(t),e.error.apply(void 0,arguments)},opensetting:function(t){arguments[0]=t=e.$handleEvent(t),e.opensetting.apply(void 0,arguments)},launchapp:function(t){arguments[0]=t=e.$handleEvent(t),e.launchapp.apply(void 0,arguments)},click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.click(t)}}},[e._t("default"),e.ripple?i("v-uni-view",{staticClass:"u-wave-ripple",class:[e.waveActive?"u-wave-active":""],style:{top:e.rippleTop+"px",left:e.rippleLeft+"px",width:e.fields.targetWidth+"px",height:e.fields.targetWidth+"px","background-color":e.rippleBgColor||"rgba(0, 0, 0, 0.15)"}}):e._e()],2)},a=[]},"7a91":function(e,t,i){"use strict";i.r(t);var n=i("e017"),r=i("32b9");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("40f3");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"6e6da03a",null,!1,n["a"],s);t["default"]=l.exports},"7b0c":function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{ref:"videos",staticClass:"video-js",staticStyle:{width:"100%",height:"100%"}})},a=[]},"7e10":function(e,t){var i=[33,16,5,32,164,27],n=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],r=function(e){var t=[];while(e--)t.push(0);return t},a=function(e){return Object.keys(e).reduce((function(t,i){return t[i]=new Uint8Array(e[i].reduce((function(e,t){return e.concat(t)}),[])),t}),{})},s={96e3:[i,[227,64],r(154),[56]],88200:[i,[231],r(170),[56]],64e3:[i,[248,192],r(240),[56]],48e3:[i,[255,192],r(268),[55,148,128],r(54),[112]],44100:[i,[255,192],r(268),[55,163,128],r(84),[112]],32e3:[i,[255,192],r(268),[55,234],r(226),[112]],24e3:[i,[255,192],r(268),[55,255,128],r(268),[111,112],r(126),[224]],16e3:[i,[255,192],r(268),[55,255,128],r(268),[111,255],r(269),[223,108],r(195),[1,192]],12e3:[n,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,253,128],r(259),[56]],11025:[n,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,255,192],r(268),[55,175,128],r(108),[112]],8e3:[n,r(268),[3,121,16],r(47),[7]]};e.exports=a(s)},"80eb":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("be09"),a=n(r),s=i("92b0"),o=n(s),l=i("9f7a"),u=n(l),c=i("12c6"),h=n(c),d=0,p={mode:"auto"};h["default"].mediaSources={};var f=function(e,t){var i=h["default"].mediaSources[e];if(!i)throw new Error("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:t})},v=function(){return!!a["default"].MediaSource&&!!a["default"].MediaSource.isTypeSupported&&a["default"].MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},m=function(e){var t=h["default"].mergeOptions(p,e);if(this.MediaSource={open:f,supportsNativeMediaSources:v},"html5"===t.mode||"auto"===t.mode&&v())return new u["default"];if(h["default"].getTech("Flash"))return new o["default"];throw new Error("Cannot use Flash or Html5 to create a MediaSource for this video")};t.MediaSource=m,m.open=f,m.supportsNativeMediaSources=v;var g={createObjectURL:function(e){var t="blob:vjs-media-source/",i=void 0;return e instanceof u["default"]?(i=a["default"].URL.createObjectURL(e.nativeMediaSource_),e.url_=i,i):e instanceof o["default"]?(i=t+d,d++,h["default"].mediaSources[i]=e,i):(i=a["default"].URL.createObjectURL(e),e.url_=i,i)}};t.URL=g,h["default"].MediaSource=m,h["default"].URL=g},"81bc":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("e475"),a=n(r),s=i("f24e"),o={FAILURE:2,TIMEOUT:-101,ABORTED:-102};t.REQUEST_ERRORS=o;var l=function(e){var t=void 0,i=void 0;return i=e.offset+e.length-1,t=e.offset,"bytes="+t+"-"+i},u=function(e){var t={};return e.byterange&&(t.Range=l(e.byterange)),t},c=function(e){e.forEach((function(e){e.abort()}))},h=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}},d=function(e){var t=e.target,i=Date.now()-t.requestTime,n={bandwidth:1/0,bytesReceived:0,roundTripTime:i||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},p=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:o.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:o.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:o.FAILURE,xhr:t}:null},f=function(e,t){return function(i,n){var r=n.response,a=p(i,n);if(a)return t(a,e);if(16!==r.byteLength)return t({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:o.FAILURE,xhr:n},e);var s=new DataView(r);return e.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),t(null,e)}},v=function(e,t){return function(i,n){var r=n.response,a=p(i,n);return a?t(a,e):0===r.byteLength?t({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:o.FAILURE,xhr:n},e):(e.map.bytes=new Uint8Array(n.response),t(null,e))}},m=function(e,t){return function(i,n){var r=n.response,a=p(i,n);return a?t(a,e):0===r.byteLength?t({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:o.FAILURE,xhr:n},e):(e.stats=h(n),e.key?e.encryptedBytes=new Uint8Array(n.response):e.bytes=new Uint8Array(n.response),t(null,e))}},g=function(e,t,i){var n=function n(r){if(r.data.source===t.requestId){e.removeEventListener("message",n);var a=r.data.decrypted;return t.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength),i(null,t)}};e.addEventListener("message",n),e.postMessage((0,s.createTransferableMessage)({source:t.requestId,encrypted:t.encryptedBytes,key:t.key.bytes,iv:t.key.iv}),[t.encryptedBytes.buffer,t.key.bytes.buffer])},y=function(e){return e.reduce((function(e,t){return t.code>e.code?t:e}))},b=function(e,t,i){var n=[],r=0;return function(a,s){if(a&&(c(e),n.push(a)),r+=1,r===e.length){if(s.endOfAllRequests=Date.now(),n.length>0){var o=y(n);return i(o,s)}return s.encryptedBytes?g(t,s,i):i(null,s)}}},_=function(e,t){return function(i){return e.stats=a["default"].mergeOptions(e.stats,d(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)}},T=function(e,t,i,n,r,s){var o=[],l=b(o,i,s);if(n.key){var h=a["default"].mergeOptions(t,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),d=f(n,l),p=e(h,d);o.push(p)}if(n.map&&!n.map.bytes){var g=a["default"].mergeOptions(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:u(n.map)}),y=v(n,l),T=e(g,y);o.push(T)}var S=a["default"].mergeOptions(t,{uri:n.resolvedUri,responseType:"arraybuffer",headers:u(n)}),w=m(n,l),E=e(S,w);return E.addEventListener("progress",_(n,r)),o.push(E),function(){return c(o)}};t.mediaSegmentRequest=T},8352:function(e,t,i){var n=i("be09"),r=e.exports={WebVTT:i("14b8"),VTTCue:i("6d67"),VTTRegion:i("1283")};n.vttjs=r,n.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=a,n.VTTRegion=s},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},8362:function(e,t){e.exports=n;var i=Object.prototype.toString;function n(e){if(!e)return!1;var t=i.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}},"847a":function(e,t,i){"use strict";var n,r,a,s,o,l,u=i("4329"),c=i("d7ba"),h=i("0ea2"),d=i("4fcf"),p=i("631a").H264Stream,f=i("1c05"),v=i("ae54");s=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts?e.timelineStartInfo.pts=t.pts:e.timelineStartInfo.pts=Math.min(e.timelineStartInfo.pts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts?e.timelineStartInfo.dts=t.dts:e.timelineStartInfo.dts=Math.min(e.timelineStartInfo.dts,t.dts))},o=function(e,t){var i=new c(c.METADATA_TAG);return i.dts=t,i.pts=t,i.writeMetaDataDouble("videocodecid",7),i.writeMetaDataDouble("width",e.width),i.writeMetaDataDouble("height",e.height),i},l=function(e,t){var i,n=new c(c.VIDEO_TAG,!0);for(n.dts=t,n.pts=t,n.writeByte(1),n.writeByte(e.profileIdc),n.writeByte(e.profileCompatibility),n.writeByte(e.levelIdc),n.writeByte(255),n.writeByte(225),n.writeShort(e.sps[0].length),n.writeBytes(e.sps[0]),n.writeByte(e.pps.length),i=0;i<e.pps.length;++i)n.writeShort(e.pps[i].length),n.writeBytes(e.pps[i]);return n},a=function(e){var t,i=[],n=[];a.prototype.init.call(this),this.push=function(t){s(e,t),e&&(e.audioobjecttype=t.audioobjecttype,e.channelcount=t.channelcount,e.samplerate=t.samplerate,e.samplingfrequencyindex=t.samplingfrequencyindex,e.samplesize=t.samplesize,e.extraData=e.audioobjecttype<<11|e.samplingfrequencyindex<<7|e.channelcount<<3),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),i.push(t)},this.flush=function(){var r,a,s,o=new v;if(0!==i.length){s=-1/0;while(i.length)r=i.shift(),n.length&&r.pts>=n[0]&&(s=n.shift(),this.writeMetaDataTags(o,s)),(e.extraData!==t||r.pts-s>=1e3)&&(this.writeMetaDataTags(o,r.pts),t=e.extraData,s=r.pts),a=new c(c.AUDIO_TAG),a.pts=r.pts,a.dts=r.dts,a.writeBytes(r.data),o.push(a.finalize());n.length=0,t=null,this.trigger("data",{track:e,tags:o.list}),this.trigger("done","AudioSegmentStream")}else this.trigger("done","AudioSegmentStream")},this.writeMetaDataTags=function(t,i){var n;n=new c(c.METADATA_TAG),n.pts=i,n.dts=i,n.writeMetaDataDouble("audiocodecid",10),n.writeMetaDataBoolean("stereo",2===e.channelcount),n.writeMetaDataDouble("audiosamplerate",e.samplerate),n.writeMetaDataDouble("audiosamplesize",16),t.push(n.finalize()),n=new c(c.AUDIO_TAG,!0),n.pts=i,n.dts=i,n.view.setUint16(n.position,e.extraData),n.position+=2,n.length=Math.max(n.length,n.position),t.push(n.finalize())},this.onVideoKeyFrame=function(e){n.push(e)}},a.prototype=new u,r=function(e){var t,i,n=[];r.prototype.init.call(this),this.finishFrame=function(n,r){if(r){if(t&&e&&e.newMetadata&&(r.keyFrame||0===n.length)){var a=o(t,r.dts).finalize(),s=l(e,r.dts).finalize();a.metaDataTag=s.metaDataTag=!0,n.push(a),n.push(s),e.newMetadata=!1,this.trigger("keyframe",r.dts)}r.endNalUnit(),n.push(r.finalize()),i=null}},this.push=function(t){s(e,t),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),n.push(t)},this.flush=function(){var r,a=new v;while(n.length){if("access_unit_delimiter_rbsp"===n[0].nalUnitType)break;n.shift()}if(0!==n.length){while(n.length)r=n.shift(),"seq_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,t=r.config,e.width=t.width,e.height=t.height,e.sps=[r.data],e.profileIdc=t.profileIdc,e.levelIdc=t.levelIdc,e.profileCompatibility=t.profileCompatibility,i.endNalUnit()):"pic_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,e.pps=[r.data],i.endNalUnit()):"access_unit_delimiter_rbsp"===r.nalUnitType?(i&&this.finishFrame(a,i),i=new c(c.VIDEO_TAG),i.pts=r.pts,i.dts=r.dts):("slice_layer_without_partitioning_rbsp_idr"===r.nalUnitType&&(i.keyFrame=!0),i.endNalUnit()),i.startNalUnit(),i.writeBytes(r.data);i&&this.finishFrame(a,i),this.trigger("data",{track:e,tags:a.list}),this.trigger("done","VideoSegmentStream")}else this.trigger("done","VideoSegmentStream")}},r.prototype=new u,n=function(e){var t,i,s,o,l,u,c,v,m,g,y,b,_=this;n.prototype.init.call(this),e=e||{},this.metadataStream=new h.MetadataStream,e.metadataStream=this.metadataStream,t=new h.TransportPacketStream,i=new h.TransportParseStream,s=new h.ElementaryStream,o=new h.TimestampRolloverStream("video"),l=new h.TimestampRolloverStream("audio"),u=new h.TimestampRolloverStream("timed-metadata"),c=new d,v=new p,b=new f(e),t.pipe(i).pipe(s),s.pipe(o).pipe(v),s.pipe(l).pipe(c),s.pipe(u).pipe(this.metadataStream).pipe(b),y=new h.CaptionStream,v.pipe(y).pipe(b),s.on("data",(function(e){var t,i,n;if("metadata"===e.type){t=e.tracks.length;while(t--)"video"===e.tracks[t].type?i=e.tracks[t]:"audio"===e.tracks[t].type&&(n=e.tracks[t]);i&&!m&&(b.numberOfTracks++,m=new r(i),v.pipe(m).pipe(b)),n&&!g&&(b.numberOfTracks++,g=new a(n),c.pipe(g).pipe(b),m&&m.on("keyframe",g.onVideoKeyFrame))}})),this.push=function(e){t.push(e)},this.flush=function(){t.flush()},this.resetCaptions=function(){y.reset()},b.on("data",(function(e){_.trigger("data",e)})),b.on("done",(function(){_.trigger("done")}))},n.prototype=new u,e.exports=n},8484:function(e,t,i){"use strict";i.d(t,"a",(function(){return I})),i.d(t,"b",(function(){return B})),i.d(t,"c",(function(){return Le})),i.d(t,"d",(function(){return Pe}));var n=i("d136"),r=i.n(n),a=i("be09"),s=i.n(a),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=s.a.location&&s.a.location.href||"");var i="function"===typeof s.a.URL,n=/^\/\//.test(e),a=!s.a.location&&!/\/\//i.test(e);if(i?e=new s.a.URL(e,s.a.location||o):/\/\//i.test(e)||(e=r.a.buildAbsoluteURL(s.a.location&&s.a.location.href||"",e)),i){var l=new URL(t,e);return a?l.href.slice(o.length):n?l.href.slice(l.protocol.length):l.href}return r.a.buildAbsoluteURL(e,t)},u=l,c=function(e,t,i){t.forEach((function(t){for(var n in e.mediaGroups[t])for(var r in e.mediaGroups[t][n]){var a=e.mediaGroups[t][n][r];i(a,t,n,r)}}))},h=i("ffdf"),d=i("210b");const p=e=>!!e&&"object"===typeof e,f=(...e)=>e.reduce((e,t)=>("object"!==typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):p(e[i])&&p(t[i])?e[i]=f(e[i],t[i]):e[i]=t[i]}),e),{}),v=e=>Object.keys(e).map(t=>e[t]),m=(e,t)=>{const i=[];for(let n=e;n<t;n++)i.push(n);return i},g=e=>e.reduce((e,t)=>e.concat(t),[]),y=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t},b=(e,t)=>e.reduce((e,i,n)=>(i[t]&&e.push(n),e),[]),_=(e,t)=>v(e.reduce((e,i)=>(i.forEach(i=>{e[t(i)]=i}),e),{}));var T={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const S=({baseUrl:e="",source:t="",range:i="",indexRange:n=""})=>{const r={uri:t,resolvedUri:u(e||"",t)};if(i||n){const e=i||n,t=e.split("-");let a,o=s.a.BigInt?s.a.BigInt(t[0]):parseInt(t[0],10),l=s.a.BigInt?s.a.BigInt(t[1]):parseInt(t[1],10);o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&"bigint"===typeof l&&(l=Number(l)),a="bigint"===typeof l||"bigint"===typeof o?s.a.BigInt(l)-s.a.BigInt(o)+s.a.BigInt(1):l-o+1,"bigint"===typeof a&&a<Number.MAX_SAFE_INTEGER&&(a=Number(a)),r.byterange={length:a,offset:o}}return r},w=e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?s.a.BigInt(e.offset)+s.a.BigInt(e.length)-s.a.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`},E=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),k={static(e){const{duration:t,timescale:i=1,sourceDuration:n,periodDuration:r}=e,a=E(e.endNumber),s=t/i;return"number"===typeof a?{start:0,end:a}:"number"===typeof r?{start:0,end:r/s}:{start:0,end:n/s}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:n,timescale:r=1,duration:a,periodStart:s=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,u=E(e.endNumber),c=(t+i)/1e3,h=n+s,d=c+o,p=d-h,f=Math.ceil(p*r/a),v=Math.floor((c-h-l)*r/a),m=Math.floor((c-h)*r/a);return{start:Math.max(0,v),end:"number"===typeof u?u:Math.min(f,m)}}},C=e=>t=>{const{duration:i,timescale:n=1,periodStart:r,startNumber:a=1}=e;return{number:a+t,duration:i/n,timeline:r,time:t*i}},x=e=>{const{type:t,duration:i,timescale:n=1,periodDuration:r,sourceDuration:a}=e,{start:s,end:o}=k[t](e),l=m(s,o).map(C(e));if("static"===t){const e=l.length-1,t="number"===typeof r?r:a;l[e].duration=t-i/n*e}return l},A=e=>{const{baseUrl:t,initialization:i={},sourceDuration:n,indexRange:r="",periodStart:a,presentationTime:s,number:o=0,duration:l}=e;if(!t)throw new Error(T.NO_BASE_URL);const u=S({baseUrl:t,source:i.sourceURL,range:i.range}),c=S({baseUrl:t,source:t,indexRange:r});if(c.map=u,l){const t=x(e);t.length&&(c.duration=t[0].duration,c.timeline=t[0].timeline)}else n&&(c.duration=n,c.timeline=a);return c.presentationTime=s||a,c.number=o,[c]},I=(e,t,i)=>{const n=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,a=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,u=t.timescale,c=t.references.filter(e=>1!==e.referenceType),h=[],d=e.endList?"static":"dynamic",p=e.sidx.timeline;let f,v=p,m=e.mediaSequence||0;f="bigint"===typeof t.firstOffset?s.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let g=0;g<c.length;g++){const e=t.references[g],o=e.referencedSize,l=e.subsegmentDuration;let c;c="bigint"===typeof f?f+s.a.BigInt(o)-s.a.BigInt(1):f+o-1;const y=`${f}-${c}`,b={baseUrl:i,timescale:u,timeline:a,periodStart:p,presentationTime:v,number:m,duration:l,sourceDuration:r,indexRange:y,type:d},_=A(b)[0];n&&(_.map=n),h.push(_),f+="bigint"===typeof f?s.a.BigInt(o):o,v+=l/u,m++}return e.segments=h,e},O=["AUDIO","SUBTITLES"],j=1/60,L=e=>_(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),P=(e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null},D=e=>{let t=[];return c(e,O,(e,i,n,r)=>{t=t.concat(e.playlists||[])}),t},R=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},M=({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const n=P(e,t.attributes.NAME);if(!n)return;if(t.sidx)return;const r=t.segments[0],a=n.segments.findIndex((function(e){return Math.abs(e.presentationTime-r.presentationTime)<j}));if(-1===a)return R({playlist:t,mediaSequence:n.mediaSequence+n.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!n.segments.length&&t.timeline>n.timeline||n.segments.length&&t.timeline>n.segments[n.segments.length-1].timeline)&&t.discontinuitySequence--);const s=n.segments[a];s.discontinuity&&!r.discontinuity&&(r.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),R({playlist:t,mediaSequence:n.segments[a].number})})},N=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(D(e)),n=t.playlists.concat(D(t));return t.timelineStarts=L([e.timelineStarts,t.timelineStarts]),M({oldPlaylists:i,newPlaylists:n,timelineStarts:t.timelineStarts}),t},B=e=>e&&e.uri+"-"+w(e.byterange),U=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach(e=>{const t=v(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>(e.discontinuityStarts=b(e.segments||[],"discontinuity"),e))},F=(e,t)=>{const i=B(e.sidx),n=i&&t[i]&&t[i].sidx;return n&&I(e,n,e.sidx.resolvedUri),e},V=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=F(e[i],t);return e},H=({attributes:e,segments:t,sidx:i,mediaSequence:n,discontinuitySequence:r,discontinuityStarts:a},s)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:r,discontinuityStarts:a,timelineStarts:e.timelineStarts,mediaSequence:n,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),s&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},q=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:r})=>{"undefined"===typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const a={NAME:e.id,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1};e.codecs&&(a.CODECS=e.codecs);const s={attributes:a,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:n,discontinuitySequence:r,mediaSequence:i,segments:t};return e.serviceLocation&&(s.attributes.serviceLocation=e.serviceLocation),s},z=(e,t={},i=!1)=>{let n;const r=e.reduce((e,r)=>{const a=r.attributes.role&&r.attributes.role.value||"",s=r.attributes.lang||"";let o=r.attributes.label||"main";if(s&&!r.attributes.label){const e=a?` (${a})`:"";o=`${r.attributes.lang}${e}`}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""});const l=F(H(r,i),t);return e[o].playlists.push(l),"undefined"===typeof n&&"main"===a&&(n=r,n.default=!0),e},{});if(!n){const e=Object.keys(r)[0];r[e].default=!0}return r},G=(e,t={})=>e.reduce((e,i)=>{const n=i.attributes.label||i.attributes.lang||"text";return e[n]||(e[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(F(q(i),t)),e},{}),W=e=>e.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:n}=t;e[n]={autoselect:!1,default:!1,instreamId:i,language:n},t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])}),e):e,{}),$=({attributes:e,segments:t,sidx:i,discontinuityStarts:n})=>{const r={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:n,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(r.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(r.contentProtection=e.contentProtection),e.serviceLocation&&(r.attributes.serviceLocation=e.serviceLocation),i&&(r.sidx=i),r},X=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,Y=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,K=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,Q=(e,t)=>{e.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=t.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach((e,t)=>{e.number=t})})},J=e=>e?Object.keys(e).reduce((t,i)=>{const n=e[i];return t.concat(n.playlists)},[]):[],Z=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:n={},previousManifest:r,eventStream:a})=>{if(!e.length)return{};const{sourceDuration:s,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:u}=e[0].attributes,c=U(e.filter(X)).map($),h=U(e.filter(Y)),d=U(e.filter(K)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},["CLOSED-CAPTIONS"]:{},SUBTITLES:{}},uri:"",duration:s,playlists:V(c,n)};u>=0&&(f.minimumUpdatePeriod=1e3*u),t&&(f.locations=t),i&&(f.contentSteering=i),"dynamic"===o&&(f.suggestedPresentationDelay=l),a&&a.length>0&&(f.eventStream=a);const v=0===f.playlists.length,m=h.length?z(h,n,v):null,g=d.length?G(d,n):null,y=c.concat(J(m),J(g)),b=y.map(({timelineStarts:e})=>e);return f.timelineStarts=L(b),Q(y,f.timelineStarts),m&&(f.mediaGroups.AUDIO.audio=m),g&&(f.mediaGroups.SUBTITLES.subs=g),p.length&&(f.mediaGroups["CLOSED-CAPTIONS"].cc=W(p)),r?N({oldManifest:r,newManifest:f}):f},ee=(e,t,i)=>{const{NOW:n,clientOffset:r,availabilityStartTime:a,timescale:s=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,u=(n+r)/1e3,c=a+o,h=u+l,d=h-c;return Math.ceil((d*s-t)/i)},te=(e,t)=>{const{type:i,minimumUpdatePeriod:n=0,media:r="",sourceDuration:a,timescale:s=1,startNumber:o=1,periodStart:l}=e,u=[];let c=-1;for(let h=0;h<t.length;h++){const d=t[h],p=d.d,f=d.r||0,v=d.t||0;let m;if(c<0&&(c=v),v&&v>c&&(c=v),f<0){const o=h+1;m=o===t.length?"dynamic"===i&&n>0&&r.indexOf("$Number$")>0?ee(e,c,p):(a*s-c)/p:(t[o].t-c)/p}else m=f+1;const g=o+u.length+m;let y=o+u.length;while(y<g)u.push({number:y,duration:p/s,time:c,timeline:l}),c+=p,y++}return u},ie=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ne=e=>(t,i,n,r)=>{if("$$"===t)return"$";if("undefined"===typeof e[i])return t;const a=""+e[i];return"RepresentationID"===i?a:(r=n?parseInt(r,10):1,a.length>=r?a:`${new Array(r-a.length+1).join("0")}${a}`)},re=(e,t)=>e.replace(ie,ne(t)),ae=(e,t)=>e.duration||t?e.duration?x(e):te(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],se=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,r=S({baseUrl:e.baseUrl,source:re(n.sourceURL,i),range:n.range}),a=ae(e,t);return a.map(t=>{i.Number=t.number,i.Time=t.time;const n=re(e.media||"",i),a=e.timescale||1,s=e.presentationTimeOffset||0,o=e.periodStart+(t.time-s)/a,l={uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:u(e.baseUrl||"",n),map:r,number:t.number,presentationTime:o};return l})},oe=(e,t)=>{const{baseUrl:i,initialization:n={}}=e,r=S({baseUrl:i,source:n.sourceURL,range:n.range}),a=S({baseUrl:i,source:t.media,range:t.mediaRange});return a.map=r,a},le=(e,t)=>{const{duration:i,segmentUrls:n=[],periodStart:r}=e;if(!i&&!t||i&&t)throw new Error(T.SEGMENT_TIME_UNSPECIFIED);const a=n.map(t=>oe(e,t));let s;i&&(s=x(e)),t&&(s=te(e,t));const o=s.map((t,i)=>{if(a[i]){const n=a[i],s=e.timescale||1,o=e.presentationTimeOffset||0;return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n.presentationTime=r+(t.time-o)/s,n}}).filter(e=>e);return o},ue=({attributes:e,segmentInfo:t})=>{let i,n;t.template?(n=se,i=f(e,t.template)):t.base?(n=A,i=f(e,t.base)):t.list&&(n=le,i=f(e,t.list));const r={attributes:e};if(!n)return r;const a=n(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else a.length?i.duration=a.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return r.attributes=i,r.segments=a,t.base&&i.indexRange&&(r.sidx=a[0],r.segments=[]),r},ce=e=>e.map(ue),he=(e,t)=>y(e.childNodes).filter(({tagName:e})=>e===t),de=e=>e.textContent.trim(),pe=e=>parseFloat(e.split("/").reduce((e,t)=>e/t)),fe=e=>{const t=31536e3,i=2592e3,n=86400,r=3600,a=60,s=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,o=s.exec(e);if(!o)return 0;const[l,u,c,h,d,p]=o.slice(1);return parseFloat(l||0)*t+parseFloat(u||0)*i+parseFloat(c||0)*n+parseFloat(h||0)*r+parseFloat(d||0)*a+parseFloat(p||0)},ve=e=>{const t=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return t.test(e)&&(e+="Z"),Date.parse(e)},me={mediaPresentationDuration(e){return fe(e)},availabilityStartTime(e){return ve(e)/1e3},minimumUpdatePeriod(e){return fe(e)},suggestedPresentationDelay(e){return fe(e)},type(e){return e},timeShiftBufferDepth(e){return fe(e)},start(e){return fe(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return pe(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){const t=parseInt(e,10);return isNaN(t)?fe(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},ge=e=>e&&e.attributes?y(e.attributes).reduce((e,t)=>{const i=me[t.name]||me.DEFAULT;return e[t.name]=i(t.value),e},{}):{},ye={"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:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},be=(e,t)=>t.length?g(e.map((function(e){return t.map((function(t){const i=de(t),n=u(e.baseUrl,i),r=f(ge(t),{baseUrl:n});return n!==i&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,_e=e=>{const t=he(e,"SegmentTemplate")[0],i=he(e,"SegmentList")[0],n=i&&he(i,"SegmentURL").map(e=>f({tag:"SegmentURL"},ge(e))),r=he(e,"SegmentBase")[0],a=i||t,s=a&&he(a,"SegmentTimeline")[0],o=i||r||t,l=o&&he(o,"Initialization")[0],u=t&&ge(t);u&&l?u.initialization=l&&ge(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});const c={template:u,segmentTimeline:s&&he(s,"S").map(e=>ge(e)),list:i&&f(ge(i),{segmentUrls:n,initialization:ge(l)}),base:r&&f(ge(r),{initialization:ge(l)})};return Object.keys(c).forEach(e=>{c[e]||delete c[e]}),c},Te=(e,t,i)=>n=>{const r=he(n,"BaseURL"),a=be(t,r),s=f(e,ge(n)),o=_e(n);return a.map(e=>({segmentInfo:f(i,o),attributes:f(s,e)}))},Se=e=>e.reduce((e,t)=>{const i=ge(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const n=ye[i.schemeIdUri];if(n){e[n]={attributes:i};const r=he(t,"cenc:pssh")[0];if(r){const t=de(r);e[n].pssh=t&&Object(h["a"])(t)}}return e},{}),we=e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})}if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,n=""]=e.split("=");t.channel=i,t.language=e,n.split(",").forEach(e=>{const[i,n]=e.split(":");"lang"===i?t.language=n:"er"===i?t.easyReader=Number(n):"war"===i?t.aspectRatio=Number(n):"3D"===i&&(t["3D"]=Number(n))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})}},Ee=e=>g(he(e.node,"EventStream").map(t=>{const i=ge(t),n=i.schemeIdUri;return he(t,"Event").map(t=>{const r=ge(t),a=r.presentationTime||0,s=i.timescale||1,o=r.duration||0,l=a/s+e.attributes.start;return{schemeIdUri:n,value:i.value,id:r.id,start:l,end:l+o/s,messageData:de(t)||r.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),ke=(e,t,i)=>n=>{const r=ge(n),a=be(t,he(n,"BaseURL")),s=he(n,"Role")[0],o={role:ge(s)};let l=f(e,r,o);const u=he(n,"Accessibility")[0],c=we(ge(u));c&&(l=f(l,{captionServices:c}));const h=he(n,"Label")[0];if(h&&h.childNodes.length){const e=h.childNodes[0].nodeValue.trim();l=f(l,{label:e})}const d=Se(he(n,"ContentProtection"));Object.keys(d).length&&(l=f(l,{contentProtection:d}));const p=_e(n),v=he(n,"Representation"),m=f(i,p);return g(v.map(Te(l,a,m)))},Ce=(e,t)=>(i,n)=>{const r=be(t,he(i.node,"BaseURL")),a=f(e,{periodStart:i.attributes.start});"number"===typeof i.attributes.duration&&(a.periodDuration=i.attributes.duration);const s=he(i.node,"AdaptationSet"),o=_e(i.node);return g(s.map(ke(a,r,o)))},xe=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=f({serverURL:de(e[0])},ge(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},Ae=({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"===typeof e.start?e.start:t&&"number"===typeof t.start&&"number"===typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,Ie=(e,t={})=>{const{manifestUri:i="",NOW:n=Date.now(),clientOffset:r=0,eventHandler:a=function(){}}=t,s=he(e,"Period");if(!s.length)throw new Error(T.INVALID_NUMBER_OF_PERIOD);const o=he(e,"Location"),l=ge(e),u=be([{baseUrl:i}],he(e,"BaseURL")),c=he(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=n,l.clientOffset=r,o.length&&(l.locations=o.map(de));const h=[];return s.forEach((e,t)=>{const i=ge(e),n=h[t-1];i.start=Ae({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:l.type}),h.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:xe(c,a),representationInfo:g(h.map(Ce(l,u))),eventStream:g(h.map(Ee))}},Oe=e=>{if(""===e)throw new Error(T.DASH_EMPTY_MANIFEST);const t=new d["DOMParser"];let i,n;try{i=t.parseFromString(e,"application/xml"),n=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(r){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(T.DASH_INVALID_XML);return n},je=e=>{const t=he(e,"UTCTiming")[0];if(!t)return null;const i=ge(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(T.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},Le=(e,t={})=>{const i=Ie(Oe(e),t),n=ce(i.representationInfo);return Z({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},Pe=e=>je(Oe(e))},"849d":function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("a9e3");t.default={name:"u-switch",props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:[Number,String],default:50},activeColor:{type:String,default:"#2979ff"},inactiveColor:{type:String,default:"#ffffff"},value:{type:Boolean,default:!1},vibrateShort:{type:Boolean,default:!1},activeValue:{type:[Number,String,Boolean],default:!0},inactiveValue:{type:[Number,String,Boolean],default:!1}},data:function(){return{}},computed:{switchStyle:function(){var e={};return e.fontSize=this.size+"rpx",e.backgroundColor=this.value?this.activeColor:this.inactiveColor,e},loadingColor:function(){return this.value?this.activeColor:null}},methods:{onClick:function(){var e=this;this.disabled||this.loading||(this.vibrateShort&&uni.vibrateShort(),this.$emit("input",!this.value),this.$nextTick((function(){e.$emit("change",e.value?e.activeValue:e.inactiveValue)})))}}}},8866:function(e,t,i){var n=i("51f3");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("90164b66",n,!0,{sourceMap:!1,shadowMode:!1})},"89a7":function(e,t,i){"use strict";function n(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"===typeof i.find)return i.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];if(t.call(void 0,r,n,e))return r}}function r(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}function a(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}var s=r({HTML:"text/html",isHTML:function(e){return e===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=a,t.find=n,t.freeze=r,t.MIME_TYPE=s,t.NAMESPACE=o},"89f2":function(e,t,i){"use strict";i.r(t);var n=i("1029"),r=i("be8c");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("1d05");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"0d3821ba",null,!1,n["a"],s);t["default"]=l.exports},"8c00":function(e,t,i){"use strict";var n=i("be09"),r=function(e,t){return void 0===t&&(t=!1),function(i,r,s){if(i)e(i);else if(r.statusCode>=400&&r.statusCode<=599){var o=s;if(t)if(n.TextDecoder){var l=a(r.headers&&r.headers["content-type"]);try{o=new TextDecoder(l).decode(s)}catch(u){}}else o=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:o})}else e(null,s)}};function a(e){return void 0===e&&(e=""),e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),n=i[0],r=i[1];return"charset"===n.trim()?r.trim():e}),"utf-8")}e.exports=r},"8c10":function(e,t){function i(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(r){n=r}return[n,i]}e.exports=i},"8c25":function(e,t,i){"use strict";i.r(t);var n=i("ed4d"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},"8c57":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("6be2"),u=a(l),c=i("e475"),h=i("c795"),d=a(h),p=i("be09"),f=a(p),v=function(e,t,i){var n=t.slice();i=i||0;for(var r=Math.min(e.length,t.length+i),a=i;a<r;a++)n[a-i]=(0,c.mergeOptions)(e[a],n[a-i]);return n};t.updateSegments=v;var m=function(e,t){e.resolvedUri||(e.resolvedUri=(0,u["default"])(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=(0,u["default"])(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=(0,u["default"])(t,e.map.uri))};t.resolveSegmentUris=m;var g=function(e,t){var i=(0,c.mergeOptions)(e,{}),n=i.playlists.filter((function(e){return e.uri===t.uri}))[0];if(!n)return null;if(n.segments&&t.segments&&n.segments.length===t.segments.length&&n.mediaSequence===t.mediaSequence)return null;var r=(0,c.mergeOptions)(n,t);n.segments&&(r.segments=v(n.segments,t.segments,t.mediaSequence-n.mediaSequence)),r.segments.forEach((function(e){m(e,r.resolvedUri)}));for(var a=0;a<i.playlists.length;a++)i.playlists[a].uri===t.uri&&(i.playlists[a]=r);return i.playlists[t.uri]=r,i};t.updateMaster=g;var y=function(e){var t=e.playlists.length;while(t--){var i=e.playlists[t];e.playlists[i.uri]=i,i.resolvedUri=(0,u["default"])(e.uri,i.uri),i.attributes||(i.attributes={},c.log.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}};t.setupMediaPlaylists=y;var b=function(e){["AUDIO","SUBTITLES"].forEach((function(t){for(var i in e.mediaGroups[t])for(var n in e.mediaGroups[t][i]){var r=e.mediaGroups[t][i][n];r.uri&&(r.resolvedUri=(0,u["default"])(e.uri,r.uri))}}))};t.resolveMediaGroupUris=b;var _=function(e,t){var i=e.segments[e.segments.length-1],n=void 0;return n=t&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10),n};t.refreshDelay=_;var T=function(e){function t(e,i,n){var a=this;if(s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),n=n||{},this.srcUrl=e,this.hls_=i,this.withCredentials=!!n.withCredentials,this.handleManifestRedirects=!!n.handleManifestRedirects,!this.srcUrl)throw new Error("A non-empty playlist URL is required");this.state="HAVE_NOTHING",this.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===a.state&&(a.state="HAVE_CURRENT_METADATA",a.request=a.hls_.xhr({uri:(0,u["default"])(a.master.uri,a.media().uri),withCredentials:a.withCredentials},(function(e,t){if(a.request)return e?a.playlistRequestError(a.request,a.media().uri,"HAVE_METADATA"):void a.haveMetadata(a.request,a.media().uri)})))}))}return o(t,e),n(t,[{key:"playlistRequestError",value:function(e,t,i){this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+t,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){var i=this;this.request=null,this.state="HAVE_METADATA";var n=new d["default"].Parser;n.push(e.responseText),n.end(),n.manifest.uri=t,n.manifest.attributes=n.manifest.attributes||{};var r=g(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(f["default"].clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=f["default"].setTimeout((function(){i.trigger("mediaupdatetimeout")}),_(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),f["default"].clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"===typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var n=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(n){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(n,r){if(t.request){if(e.resolvedUri=t.resolveManifestRedirect(e.resolvedUri,r),n)return t.playlistRequestError(t.request,e.uri,i);t.haveMetadata(r,e.uri),"HAVE_MASTER"===i?t.trigger("loadedmetadata"):t.trigger("mediachange")}}))}}},{key:"resolveManifestRedirect",value:function(e,t){return this.handleManifestRedirects&&t.responseURL&&e!==t.responseURL?t.responseURL:e}},{key:"pause",value:function(){this.stopRequest(),f["default"].clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;f["default"].clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=f["default"].setTimeout((function(){return t.load()}),n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(t,i){if(e.request){if(e.request=null,t)return e.error={status:i.status,message:"HLS playlist request error at URL: "+e.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");var n=new d["default"].Parser;return n.push(i.responseText),n.end(),e.state="HAVE_MASTER",e.srcUrl=e.resolveManifestRedirect(e.srcUrl,i),n.manifest.uri=e.srcUrl,n.manifest.playlists?(e.master=n.manifest,y(e.master),b(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(n.manifest.playlists[0]))):(e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:f["default"].location.href,playlists:[{uri:e.srcUrl,resolvedUri:e.srcUrl,attributes:{}}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.haveMetadata(i,e.srcUrl),e.trigger("loadedmetadata"))}}))}}]),t}(c.EventTarget);t["default"]=T},"8ff6":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("b8a5"),r=Object(n["k"])([73,68,51]),a=function(e,t){void 0===t&&(t=0),e=Object(n["k"])(e);var i=e[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],a=(16&i)>>4;return a?r+20:r+10},s=function e(t,i){return void 0===i&&(i=0),t=Object(n["k"])(t),t.length-i<10||!Object(n["a"])(t,r,{offset:i})?i:(i+=a(t,i),e(t,i))}},9152:function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,i,n,r){var a,s,o=8*r-n-1,l=(1<<o)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,p=e[t+h];for(h+=d,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+h],h+=d,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),a-=u}return(p?-1:1)*s*Math.pow(2,a-n)},t.write=function(e,t,i,n,r,a){var s,o,l,u=8*a-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+h>=1?d/l:d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=c?(o=0,s=c):s+h>=1?(o=(t*l-1)*Math.pow(2,r),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[i+p]=255&o,p+=f,o/=256,r-=8);for(s=s<<r|o,u+=r;u>0;e[i+p]=255&s,p+=f,s/=256,u-=8);e[i+p-f]|=128*v}},"91c5":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("8c57"),u=a(l),c=i("d61a"),h=i("f7fd"),d=a(h),p=i("5496"),f=a(p),v=i("d3ae"),m=a(v),g=i("e475"),y=a(g),b=i("ed4db"),_=a(b),T=i("c7ca"),S=a(T),w=i("0de0"),E=i("78d8"),k=a(E),C=i("a254"),x=a(C),A=i("56c8"),I=a(A),O=i("6066"),j=i("230d"),L=120,P=void 0,D={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},R=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],M=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},N=function(){var e=void 0;try{e="a254"}catch(t){}return e},B=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return(0,w.translateLegacyCodecs)([e])[0]}))};t.mapLegacyAvcCodecs_=B;var U=function(e,t,i){return e+"/"+t+'; codecs="'+i.filter((function(e){return!!e})).join(", ")+'"'},F=function(e){return e.segments&&e.segments.length&&e.segments[0].map?"mp4":"mp2t"},V=function(e){var t=e.attributes||{};return t.CODECS?(0,O.parseCodecs)(t.CODECS):D},H=function(e,t){var i=F(t),n=V(t),r=t.attributes||{},a=!0,s=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&r.AUDIO){var o=e.mediaGroups.AUDIO[r.AUDIO];if(o)for(var l in s=!0,a=!1,o)if(!o[l].uri){a=!0;break}}s&&!n.audioProfile&&(y["default"].log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),n.audioProfile=D.audioProfile);var u={};n.videoCodec&&(u.video=""+n.videoCodec+n.videoObjectTypeIndicator),n.audioProfile&&(u.audio="mp4a.40."+n.audioProfile);var c=U("audio",i,[u.audio]),h=U("video",i,[u.video]),d=U("video",i,[u.video,u.audio]);return s?!a&&u.video?[h,c]:[d,c]:u.video?[d]:[c]};t.mimeTypesForPlaylist_=H;var q=function(e){function t(e){var i=this;s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var n=e.url,a=e.handleManifestRedirects,o=e.withCredentials,l=e.mode,c=e.tech,h=e.bandwidth,p=e.externHls,v=e.useCueTags,m=e.blacklistDuration,g=e.enableLowInitialPlaylist;if(!n)throw new Error("A non-empty playlist URL is required");P=p,this.tech_=c,this.hls_=c.hls,this.mode_=l,this.useCueTags_=v,this.blacklistDuration=m,this.enableLowInitialPlaylist=g,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:o,handleManifestRedirects:a,timeout:null},this.mediaTypes_=(0,j.createMediaTypes)(),this.mediaSource=new y["default"].MediaSource({mode:l}),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_.bind(this)),this.seekable_=y["default"].createTimeRanges(),this.hasPlayed_=function(){return!1},this.syncController_=new S["default"](e),this.segmentMetadataTrack_=c.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=(0,k["default"])(x["default"],N());var b={hls:this.hls_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.mediaSource.duration},hasPlayed:function(){return i.hasPlayed_()},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:h,syncController:this.syncController_,decrypter:this.decrypter_};this.masterPlaylistLoader_=new u["default"](n,this.hls_,this.requestOptions_),this.setupMasterPlaylistLoaderListeners_(),this.mainSegmentLoader_=new d["default"](y["default"].mergeOptions(b,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new d["default"](y["default"].mergeOptions(b,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new f["default"](y["default"].mergeOptions(b,{loaderType:"vtt"}),e),this.setupSegmentLoaderListeners_(),R.forEach((function(e){i[e+"_"]=M.bind(i,e)})),this.masterPlaylistLoader_.load()}return o(t,e),n(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),i=1.5*e.masterPlaylistLoader_.targetDuration*1e3;(0,c.isLowestEnabledRendition)(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),(0,j.setupMediaGroups)({segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,mode:e.mode_,hls:e.hls_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t);try{e.setupSourceBuffers_()}catch(n){return y["default"].log.warn("Failed to create SourceBuffers",n),e.mediaSource.endOfStream("decode")}e.setupFirstPlay(),e.trigger("selectedinitialmedia")})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t=e.masterPlaylistLoader_.media();if(!t){var i=void 0;return e.enableLowInitialPlaylist&&(i=e.selectInitialPlaylist()),i||(i=e.selectPlaylist()),e.initialMedia_=i,void e.masterPlaylistLoader_.media(e.initialMedia_)}e.useCueTags_&&e.updateAdCues_(t),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.updateDuration(),e.tech_.paused()||e.mainSegmentLoader_.load(),t.endList||function(){var t=function(){var t=e.seekable();0!==t.length&&e.mediaSource.addSeekableRange_(t.start(0),t.end(0))};e.duration()!==1/0?function(){var i=function i(){e.duration()===1/0?t():e.tech_.one("durationchange",i)};e.tech_.one("durationchange",i)}():t()}()})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),i=1.5*e.masterPlaylistLoader_.targetDuration*1e3;(0,c.isLowestEnabledRendition)(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media(),i=e.stuckAtPlaylistEnd_(t);i&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))}},{key:"triggerPresenceUsage_",value:function(e,t){var i=e.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var a in i.AUDIO)for(var s in i.AUDIO[a]){var o=i.AUDIO[a][s];o.uri||(n=!1)}n&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),P.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),P.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),r.length&&Object.keys(i.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist(),i=e.masterPlaylistLoader_.media(),n=e.tech_.buffered(),r=n.length?n.end(n.length-1)-e.tech_.currentTime():0,a=e.bufferLowWaterLine();(!i.endList||e.duration()<I["default"].MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<i.attributes.BANDWIDTH||r>=a)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("ended",(function(){e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},L)})),this.mainSegmentLoader_.on("reseteverything",(function(){e.tech_.trigger("hls-reset")})),this.mainSegmentLoader_.on("segmenttimemapping",(function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})})),this.audioSegmentLoader_.on("ended",(function(){e.onEndOfStream()}))}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"fastQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_())return!1;if(!t.endList){var i=function(){var t=e.seekable();return t.length?y["default"].browser.IE_VERSION&&"html5"===e.mode_&&0===e.tech_.readyState()?(e.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(t.end(0)),e.hasPlayed_=function(){return!0}})),{v:!1}):(e.trigger("firstplay"),void e.tech_.setCurrentTime(t.end(0))):{v:!1}}();if("object"===typeof i)return i.v}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(t){return y["default"].log.warn("Failed to create Source Buffers",t),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=e&&this.audioSegmentLoader_.ended_),e&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(e){var t=this.seekable();if(!t.length)return!1;var i=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===i)return!1;var n=P.Playlist.playlistEnd(e,i),r=this.tech_.currentTime(),a=this.tech_.buffered();if(!a.length)return n-r<=m["default"].SAFE_TIME_DELTA;var s=a.end(a.length-1);return s-r<=m["default"].SAFE_TIME_DELTA&&n-s<=m["default"].SAFE_TIME_DELTA}},{key:"blacklistCurrentPlaylist",value:function(e,t){void 0===e&&(e={});var i=void 0,n=void 0;if(i=e.playlist||this.masterPlaylistLoader_.media(),t=t||e.blacklistDuration||this.blacklistDuration,!i){this.error=e;try{return this.mediaSource.endOfStream("network")}catch(a){return this.trigger("error")}}var r=1===this.masterPlaylistLoader_.master.playlists.filter(c.isEnabled).length;return r?(y["default"].log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(r)):(i.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),n=this.selectPlaylist(),y["default"].log.warn("Problem encountered with the current HLS playlist."+(e.message?" "+e.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(n))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){var t=m["default"].findRange(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length&&"flash"!==this.mode_?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:P.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0,t=void 0;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var n=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(null!==n&&(e=P.Playlist.seekable(i,n),0!==e.length)){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),n=this.syncController_.getExpiredTime(i,this.mediaSource.duration),null===n)return;if(t=P.Playlist.seekable(i,n),0===t.length)return}t?t.start(0)>e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=y["default"].createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)<e.end(0)?t.end(0):e.end(0)]]):this.seekable_=e,this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var e=this,t=this.mediaSource.duration,i=P.Playlist.duration(this.masterPlaylistLoader_.media()),n=this.tech_.buffered(),r=function t(){e.mediaSource.duration=i,e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};n.length>0&&(i=Math.max(i,n.end(n.length-1))),t!==i&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var i=e.mediaTypes_[t].groups;for(var n in i)i[n].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e=this.masterPlaylistLoader_.media(),t=void 0;if(e&&"open"===this.mediaSource.readyState){if(t=H(this.masterPlaylistLoader_.master,e),t.length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(t[0]),t[1]&&this.audioSegmentLoader_.mimeType(t[1]),this.excludeIncompatibleVariants_(e)}}},{key:"excludeIncompatibleVariants_",value:function(e){var t=this.masterPlaylistLoader_.master,i=2,n=null,r=void 0;e.attributes.CODECS&&(r=(0,O.parseCodecs)(e.attributes.CODECS),n=r.videoCodec,i=r.codecCount),t.playlists.forEach((function(e){var t={codecCount:2,videoCodec:null};if(e.attributes.CODECS){var r=e.attributes.CODECS;t=(0,O.parseCodecs)(r),window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+B(r)+'"')&&(e.excludeUntil=1/0)}t.codecCount!==i&&(e.excludeUntil=1/0),t.videoCodec!==n&&(e.excludeUntil=1/0)}))}},{key:"updateAdCues_",value:function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),_["default"].updateAdCues(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=I["default"].GOAL_BUFFER_LENGTH,i=I["default"].GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,I["default"].MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=I["default"].BUFFER_LOW_WATER_LINE,i=I["default"].BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,I["default"].MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,n)}}]),t}(y["default"].EventTarget);t.MasterPlaylistController=q},"92b0":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("ef34"),u=a(l),c=i("12c6"),h=a(c),d=i("672d"),p=a(d),f=i("e206"),v=a(f),m=i("0de0"),g=function(e){function t(){var e=this;s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.sourceBuffers=[],this.readyState="closed",this.on(["sourceopen","webkitsourceopen"],(function(t){e.swfObj=u["default"].getElementById(t.swfId),e.player_=(0,h["default"])(e.swfObj.parentNode),e.tech_=e.swfObj.tech,e.readyState="open",e.tech_.on("seeking",(function(){var t=e.sourceBuffers.length;while(t--)e.sourceBuffers[t].abort()})),e.swfObj&&e.swfObj.vjs_load()}))}return o(t,e),n(t,[{key:"addSeekableRange_",value:function(){}},{key:"addSourceBuffer",value:function(e){var t=(0,m.parseContentType)(e),i=void 0;if("video/mp2t"!==t.type&&"audio/mp2t"!==t.type)throw new Error("NotSupportedError (Video.js)");return i=new p["default"](this),this.sourceBuffers.push(i),i}},{key:"endOfStream",value:function(e){"network"===e?this.tech_.error(2):"decode"===e&&this.tech_.error(3),"ended"!==this.readyState&&(this.readyState="ended",this.swfObj.vjs_endOfStream())}}]),t}(h["default"].EventTarget);t["default"]=g;try{Object.defineProperty(g.prototype,"duration",{get:function(){return this.swfObj?this.swfObj.vjs_getProperty("duration"):NaN},set:function(e){var t=void 0,i=this.swfObj.vjs_getProperty("duration");if(this.swfObj.vjs_setProperty("duration",e),e<i)for(t=0;t<this.sourceBuffers.length;t++)this.sourceBuffers[t].remove(e,i);return e}})}catch(b){g.prototype.duration=NaN}for(var y in v["default"])g[y]=v["default"][y];e.exports=t["default"]},9417:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,i){var n=t.player_;if(i.captions&&i.captions.length)for(var r in e.inbandTextTracks_||(e.inbandTextTracks_={}),i.captionStreams)if(!e.inbandTextTracks_[r]){n.tech_.trigger({type:"usage",name:"hls-608"});var a=n.textTracks().getTrackById(r);e.inbandTextTracks_[r]=a||n.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}i.metadata&&i.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)};t["default"]=n,e.exports=t["default"]},"98df":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var n={uIcon:i("f86b").default},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.show?i("v-uni-view",{staticClass:"u-empty",style:{marginTop:e.marginTop+"rpx"}},[i("u-icon",{attrs:{name:e.src?e.src:"empty-"+e.mode,"custom-style":e.iconStyle,label:e.text?e.text:e.icons[e.mode],"label-pos":"bottom","label-color":e.color,"label-size":e.fontSize,size:e.iconSize,color:e.iconColor,"margin-top":"14"}}),i("v-uni-view",{staticClass:"u-slot-wrap"},[e._t("bottom")],2)],1):e._e()},a=[]},9946:function(e,t,i){"use strict";var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},a=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},s=function(e,t,i){return unescape(a(e,t,i))},o=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],n=e[t+5],r=(16&n)>>4;return r?i+20:i+10},l=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3,r=6144&e[t+3];return r|n|i},u=function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240===(240&e[t+1])?"audio":null},c=function(e){var t=0;while(t+5<e.length){if(255===e[t]&&240===(246&e[t+1]))return n[(60&e[t+2])>>>2];t++}return null},h=function(e){var t,i,n,a;t=10,64&e[5]&&(t+=4,t+=r(e.subarray(10,14)));do{if(i=r(e.subarray(t+4,t+8)),i<1)return null;if(a=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]),"PRIV"===a){n=e.subarray(t+10,t+i+10);for(var o=0;o<n.byteLength;o++)if(0===n[o]){var l=s(n,0,o);if("com.apple.streaming.transportStreamTimestamp"===l){var u=n.subarray(o+1),c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;return c*=4,c+=3&u[7],c}break}}t+=10,t+=i}while(t<e.byteLength);return null};e.exports={parseId3TagSize:o,parseAdtsSize:l,parseType:u,parseSampleRate:c,parseAacTimestamp:h}},"9a2f":function(e,t,i){var n=i("bc52");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("01d6d0c9",n,!0,{sourceMap:!1,shadowMode:!1})},"9b40":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'.vjs-svg-icon{display:inline-block;background-repeat:no-repeat;background-position:50%;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-svg-icon:hover,\n.vjs-control:focus .vjs-svg-icon{-webkit-filter:drop-shadow(0 0 .25em #fff);filter:drop-shadow(0 0 .25em #fff)}.vjs-modal-dialog .vjs-modal-dialog-content, .video-js .vjs-modal-dialog, .vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1gUV5auc6urCmxEGrq6VRD6ATQP5dHPKK8GRIyoKApoEBUDAiGzGmdUfKNRM4qLZrUZdGKcGN/GZJKd0SyOWTbfbmZ2NxqzM5IxRtNZd78vwYlJdtREoO7sudVNq6PmmxmKqrqPU+eee173P80Bh39Cu9DOEY4DHZBK3i20D/QRLcfxbE5sEVtwLpZzclw4ibFIkSCJUcZ4MBpMnnzwuKNsGWBL5i3qy6kO2dVpvUpKbkAP9fq62rdeGJ+TM/7C1nbIutfuWrWk5ci4zMxxR1qW/N+9JsmCGXj9VKWhFx/6tr/nz78INDm2C9yPF/fDcxLuyKxLBZ1ZBz2QTi+RSkiH5RrDQJ/GgGQadX9m0YSURs7GpSG905Zsk41uj14yul1OtieZ7QUk5GRG/YiS7PYYPSAZNRed9sq3+bOpz00rKb7pe/ZEZvbALxZAHT3AFoH8GXP3rt67QFn40kt8W13FjLTDb48c+fSi5/7h0P4dL5yz7DPtbmgmYxfQA9RL2+EOfTcvdp+1vmuBpvOll1As1S6ak0IvJzC7sKWJFtJgBd2uWcg+0Zyg7dzQfhcjXRgXGZRf5/a4A58IDU777Nl252AUk4m2ByRRjqTNqIDCEJeAnU3iCFwrkrNwXEzg4yFevBwypzxkcX+AIfk3VEKl3XmWbT8788SzvpvFJaiOezL6QyuSr9VNf97csNu0z3LuhR0wATUxZAfVBwVOy+nQFhxYdWaXlXe4HC4zWGWzzsrLDtmhI9pOWOHv7PTT7XybH1Z0+v2d5Abd3kmG+TsH23CS/KwTxx/JkzEwx6jcQOUc42LLwHJ/J93uZ9ygh3HuZGwqsY9dWDHQ58dxNqyqKRQTYdxwTubiOSs3FiMDkq0WSZQgCT0GBDOg2lxOAd1FlPVGs4AKBAcYHHaP2wPkHaivmLF5zYqnIZrvcHx5gN4k/6tchNW1DtdgNL2KrxEkS/kfnIHoVnp1VjmjpTf5r0lTzLj0mdS28tX+XGorU364eMPmnWVl8J36nlKGw3CZhjEiuMw8h8mKvhGD+4/lElBWjAhLJMg6fTw4zPZ8cOmcGQBm2Qxml1nAm13CpYGq1JKUlJJUzQn1PTAO0mgv6VMMpA/DuRfSWEu4lDIxdbAtdWIKvnn2Vk766CWfz9fpY0sH/UpdP50rfszaVpdVRmvIejEdLMk45s4Bu0EWHjeOySmFyZSiMahvZdNSn29peoI/YexYfKQTLeurTXXwEVLeSfInTWHkkMaeUx7sBvOCSTSj3AlcKjfueyS36tCrXDlgRtF0etFq9jhc1kfKuBT/OwMr0F4UUTTh1AN0g20+H/ScPcsIEsYu9d/zN5PmjprPtNwI1ZZcDK6iC97Mcjp2y2aX36f+QbpGHrgRuHlXJ+Zf6PFRL2uQSp8vxHeF2IoRb8Rd2rhMzsNxSRmEuKK4JFnkojhMcx6jzqHzGMGFcW+MhBj0bhf6cowN+45I4LHvwT6fteu7M42wGRI/pxcg6/MZdEvt1U1XaulHFXuLmqov/MukvRVL35/b3ODM1+4aPjtzeK7zmUkV2h3DN54HaQ9GzJvxHRb6Ks2gB81fwqraT+A7GvZJrRLRofU6G0urNL+zFw3v0FaVDFxsKEZW56F31r6ip6vOL+FCObBPuIMRiXld9RaMdLzRIOGhPey2T9vA/35DmZPK9IWaT9d/WgOGMieYqJ/dzjLIhZU118gbysxrNUGefxD6UO/hyNNllpFTOIbx32kSFQctnweV5PxTMHLjRqiAN+fQE9gL+Xy5WB6MOS4GJJuYbDUHhcKDhHGRbLzOpjsjdM1+iwAZLGeieehACX2hhI7SjK/ZUTNrvVje31TxJiFBGYViWFkCn9PMeX9fS6qVbzfCj4fOCTzDnuWy2c4xA7mdNkA3RS9FH2VeqzdCBlixxbzXjvkHU1I8BOYFb1pZvPIHSSIj4svT8xpzcxtXN+ZKyjdDvbz08niiF3PqV9Tn5NST8vg48MTaY8E5xqSSIsWoWHo+LtAzxdH/GDUyp37CBEYfso04F/NlMTcDJUTpECLY0HFGQHImE8xsEUdgnrQlixIvGhJA1BvxpDHGxEMBYFeNOHcBJlSjwe2JcSfbBEsGOPPBHg/6SBBOCsLLw0SpUxod0Z1bFMfLkbQ3UiZxEyd0Dx8t+SRBu18Q9msFbI4e3p1THEfkSEh7kEJ5orR10qTWDvbgPWn5aWvCYyOAjwgXyjJi34uMjo58L25cmRAeQZWI2PA1QQLsPESAH8WGFwZZ4SPoR73BHPzIPMJj9AreBzKUmrH4todT18ANvi1oc3YGjUT/0j+ExUwq8PI9BLaCQIpvewwYu2evAG/Vo/5avPdY7o+BemLLXw3y+AdkzP9bpIxB1wm5EYq8fesHbPEPtm6HrHvtx4jcGPR8fDDpkZBefIjB46QnlUNRltv4Z/pO/J6dxEjhYAtmoMeq+GozvUVvNYOW3m6GCIhoprcfr97B8AcIQYsfD8ljUvGNjvkrpj0ETA48ZMIxCeqsRIsQALE0gi2GB+glSOfbOjW3GSBM9yPq8/rpJXrJDz0BPxV6xdN4uiCGDQed3WhgFkBUZEFsmeyyBpzXrm7UGTBZG8Lh5aubFufk5eUsbrrFGr7McYdbltxa0nKYqRKbQjvikXYkTGM0f2xuyM3Ly21oXnWfvf6I1BmZwfh7EWWIYsg2nHhsDhOnczhJcmI6eBAmy3jZ3RiJmKQR/JA99FcwsfaVbNDDyi1rL9NPj9hfo61wjM6BjzOLijLpeTgk/pL+ip6tfYWupzeOgPny2tcUu9J/9mhxJlgyi985NFRbvCVewXUNXLJaW0RxZqtRYtnfYdcYomXQWdnJHQA3jiEEkeTQWcWxdDP9IvvVWvo2TK553XEMEq+s69/QDU1Q7p0zxwsm9qS379whr8NI2PJqLUyGyfNeX3eFfnJU2U+uHR9cVV1IqgurqwuV44XVp0h2qN55X5XJwtk59yP0IZuHrqBOBIuIYhkcoT6Kx79Pu2HS/IPZIMOqLWs/pteOOk4NPgEb6QAIdAPsyZk5Mwd+wVaHMexJv719W7xCu2l37UG6lvYdBcvHa08p89741zd63phTRGqL5ggo6SlvdbWXzCqsPq78NnSu7wnKy2HNZbVoRCI7UJEOyRj+sPE002tOOY7Qa5fXboFWkLNeqYUSZRocp9XwSUZxcQZ9Hw6LV2pOoVmvHQEDbGIENEG5i6bLgMSM4n8+FNLTtAds99DaWEvgcf4o5SyYe9x+kF6/tGoTPAdRmS/XQIEy//QxKC2oqioAI3tS5auvxCtzT6y6RK8fhChYcwCJaMJhxc0vqSxQ/qmgsrKAlBZUHlauheTpvd9uj5DnLzJct6qfq5fXbYHVIGcfrIVJihbaVLu1wW7Vbs8zK0A8e9Jvb91S9cVMjPrazD6gpfeZTXzYbCFMcppVRsGMpp55OWgx1/3JeAxW1Y7AORgM/m3rWrsdLkQVmEVSU16cX/e7uvkvpqRiQsG06XJ0t64Tf+l0nG1dt025gyOIZlvq5u9KSU1N2TW/rsWnnMRPyTDkctbhvIcNvYIXWyLzdwYLoYesUbaQG4iK2cWO2gdpeUYLqDD0MUTOPhDIGnZEs58yArR86FznuWEsU4YDi2x26dA4klkn8Qa6vhk2QUfX4Jxm/ngX9r7ogn1dmlmwqZmuhxtdg9XN/DEcUgqb+9hMyNansfaQET2mcROCmGEMVqxm5u+h6kN2MOwgqykV2wH9yQG9DvVFU38Pogaf4FVuE62KI/oJ02RDdWW2w5dqQwU/8+N1q1DlvsL863u61KLE7x/o8w0VJQM/Y/SQ3unIrqxueEa1BqT5VFNsO7p39/UC771a77RowpaKe9nvJQIT1Pog5LGx8XblBKmCNGTf3xMogAQvPnz9PYKX/08sVDTG1OKUlOLUgS/UaZtm1NAaYTsl7i9ZQ+L6O4Rl0OGa577LuWvc+C+x96/vYh0lLBuM+7XwI/dTLtdT7v4d6rRTWDnku0IBrqFnZ5bVIqKP8lasJlithWnaLhTsr8qFJBulF/70p4undou36HeTJ5+jv1fCybeQ8nH3+Xv6aENczmOFlab+hqMDg1rLOt12A+tiUFrYDwQ6c3RUJp601nzegTNX6WlYAI2zSUV945F6zU56ZmZVQaWspWcIADxJ9GmljQUnL2p2Dpr5T8H+5KJFu+vqBq8qvyHRzStLHPEO5SPYCV9nZe0yZT2RcH0oHvegSzNEJ0oGWU8iQWM12dgPEugngVceGIwZgPFp0BiT1a0a3R5Rcot7ihfA1J/20v96jX7zmTX9s583H0kwx6WnLd09cXrR9LGroOa9sHNbdyz8wcKk5lqhaVFJZNwmqtw884MXNdvJujpBa3xzuSaZH9sxa06Z7x+HJSduPbdYHv/DgmEhfbehvlmGN7JUkcG78GDM12CeyFFTPNqVeNxC1gzjz+c2nVo63Xxs8rKJWXoBJM0tmEbfGm4qzpoOH3xpzQfyxLzW1gnE9NHo6tol1eMEic4ZVPrjnVi0kqAe2sQ2bgqupScaq8WGlUWgWHI51SKJl/UYT6zccNsCSkBtiVZLsiefuFSDYT3Fi8Zk7EUnmjTRYtsFeuDDJS05MW79M3mr3mla+d8dzac31KTPmBYfFiYSUef48PhPjm9ryZsSGZZkdNvzq0Y9rdNcwDq5Dg5C3QW+7UN64IKptvS3tvHbvu5c9pv1Exau21rc9LIpwpQwUjTq8576yeVDz5+4WZ1nXT43wV60rPLJbDp/UksNrP3iQ2SA63Pst058gOYDbhRnRUw8l/sRt4HbxPzO4WYpInCpuVgSbVh6JXuwnnJngKTTCwaPWmG5Xbhpm1U0Yt3FyBGpGYemPM77p2TD904JjgJ2QFpFLeYpGx8X15Qx1Zk31p5ki9ZLUuXE0lmuJlcakJMVLeFS1iIvrB8drY0aloilakqCZwzwRORtxlgwxS4IThggJd4TDxoiaAIT80fFPGrCPPru+puFn504P/ybr4ihA/6dKASLshEJic7xE8tmzu3KzA7TABBe8y5fNbWo3ilQn/SuFKM16b2l5bOeayqfGhYmhIulU+fVNDdWVv4NMzX10MBHyPR5uhWUu8D9P1VnIMt4nGNgZGBgAOJ/1bf64vltvjJwszOAwAOlmqvINEc/WJyDgQlEAQA+dgnjAHicY2BkYGBnAAGOPgaG//85+hkYGVCBPgBGJwNkAAAAeJxjYGBgYB/EmKMPtxwAhg4B0gAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAe4CLgKKAtAC/ANiA4wDqAPgBDAEsATaBQgFWgXABggGLgZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format("woff");font-weight:400;font-style:normal}.vjs-icon-play, .video-js .vjs-play-control .vjs-icon-placeholder, .video-js .vjs-big-play-button .vjs-icon-placeholder:before{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play:before, .video-js .vjs-play-control .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before{content:"\\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\\f102"}.vjs-icon-pause, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pause:before, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before{content:"\\f103"}.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before{content:"\\f104"}.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before{content:"\\f105"}.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before{content:"\\f106"}.vjs-icon-volume-high, .video-js .vjs-mute-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-high:before, .video-js .vjs-mute-control .vjs-icon-placeholder:before{content:"\\f107"}.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before{content:"\\f108"}.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before{content:"\\f109"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\\f10a"}.vjs-icon-subtitles, .video-js .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-subtitles-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-subtitles:before, .video-js .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before{content:"\\f10b"}.vjs-icon-captions, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-captions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-captions:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-captions-button .vjs-icon-placeholder:before{content:"\\f10c"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\\f10d"}.vjs-icon-chapters, .video-js .vjs-chapters-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-chapters:before, .video-js .vjs-chapters-button .vjs-icon-placeholder:before{content:"\\f10e"}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:"\\f10f"}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:"\\f110"}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:"\\f111"}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:"\\f112"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\\f113"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\\f114"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\\f115"}.vjs-icon-circle, .vjs-seek-to-live-control .vjs-icon-placeholder, .video-js .vjs-volume-level, .video-js .vjs-play-progress{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before, .video-js .vjs-volume-level:before, .video-js .vjs-play-progress:before{content:"\\f116"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\\f117"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\\f118"}.vjs-icon-cancel, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before{content:"\\f119"}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:"\\f11a"}.vjs-icon-replay, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay:before, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before{content:"\\f11b"}.vjs-icon-replay-5, .video-js .vjs-skip-backward-5 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-5:before, .video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before{content:"\\f11c"}.vjs-icon-replay-10, .video-js .vjs-skip-backward-10 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-10:before, .video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before{content:"\\f11d"}.vjs-icon-replay-30, .video-js .vjs-skip-backward-30 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-30:before, .video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before{content:"\\f11e"}.vjs-icon-forward-5, .video-js .vjs-skip-forward-5 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-5:before, .video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before{content:"\\f11f"}.vjs-icon-forward-10, .video-js .vjs-skip-forward-10 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-10:before, .video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before{content:"\\f120"}.vjs-icon-forward-30, .video-js .vjs-skip-forward-30 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-30:before, .video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before{content:"\\f121"}.vjs-icon-audio, .video-js .vjs-audio-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio:before, .video-js .vjs-audio-button .vjs-icon-placeholder:before{content:"\\f122"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\\f123"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\\f124"}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:"\\f125"}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:"\\f126"}.vjs-icon-picture-in-picture-enter, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-enter:before, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:"\\f127"}.vjs-icon-picture-in-picture-exit, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-exit:before, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:"\\f128"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\\f129"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\\f12a"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\\f12b"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\\f12c"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\\f12d"}.vjs-icon-audio-description, .video-js .vjs-descriptions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio-description:before, .video-js .vjs-descriptions-button .vjs-icon-placeholder:before{content:"\\f12e"}.video-js{display:inline-block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:none}.video-js *,\n.video-js *:before,\n.video-js *:after{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-fluid,\n.video-js.vjs-16-9,\n.video-js.vjs-4-3,\n.video-js.vjs-9-16,\n.video-js.vjs-1-1{width:100%;max-width:100%}.video-js.vjs-fluid:not(.vjs-audio-only-mode),\n.video-js.vjs-16-9:not(.vjs-audio-only-mode),\n.video-js.vjs-4-3:not(.vjs-audio-only-mode),\n.video-js.vjs-9-16:not(.vjs-audio-only-mode),\n.video-js.vjs-1-1:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,\nbody.vjs-pip-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen,\nbody.vjs-pip-window .video-js{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),\nbody.vjs-pip-window .video-js{width:100%!important;height:100%!important;padding-top:0!important;display:block}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{position:absolute;bottom:10%;font-size:2em;background-color:rgba(0,0,0,.7);padding:.5em;text-align:center;width:100%}.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,\n.vjs-layout-x-small.vjs-pip-container .vjs-pip-text,\n.vjs-layout-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,\n.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-button .vjs-svg-icon{width:1em;height:1em;position:absolute;top:50%;left:50%;line-height:1;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.video-js:hover .vjs-big-play-button,\n.video-js .vjs-big-play-button:focus{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,\n.vjs-has-started .vjs-big-play-button,\n.vjs-using-native-controls .vjs-big-play-button,\n.vjs-error .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js uni-button{background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog > *{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content > *{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;justify-content:center;list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li.vjs-menu-item:focus,\n.vjs-menu li.vjs-menu-item:hover,\n.js-focus-visible .vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.vjs-menu li.vjs-selected,\n.vjs-menu li.vjs-selected:focus,\n.vjs-menu li.vjs-selected:hover,\n.js-focus-visible .vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-selected .vjs-svg-icon,\n.vjs-menu li.vjs-selected:focus .vjs-svg-icon,\n.vjs-menu li.vjs-selected:hover .vjs-svg-icon,\n.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.video-js .vjs-menu *:not(.vjs-selected):focus:not(:focus-visible),\n.js-focus-visible .vjs-menu *:not(.vjs-selected):focus:not(.focus-visible){background:none}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em 0;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu,\n.vjs-menu-button-popup .vjs-menu.vjs-lock-showing{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline:hover,\n.video-js .vjs-menu-button-inline:focus,\n.video-js .vjs-menu-button-inline.vjs-slider-active{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline:hover .vjs-menu,\n.vjs-menu-button-inline:focus .vjs-menu,\n.vjs-menu-button-inline.vjs-slider-active .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js:not(.vjs-controls-disabled, .vjs-using-native-controls, .vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-has-started .vjs-control-bar,\n.vjs-audio-only-mode .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,\n.vjs-using-native-controls .vjs-control-bar,\n.vjs-error .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,\n.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button > .vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button > .vjs-icon-placeholder{display:block}.vjs-button > .vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus:before,\n.video-js .vjs-control:hover:before,\n.video-js .vjs-control:focus{text-shadow:0 0 1em #fff}.video-js *:not(.vjs-visible-text) > .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-play-progress,\n.video-js .vjs-progress-holder .vjs-load-progress,\n.video-js .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{position:absolute;top:-.35em;right:-.4em;width:.9em;height:.9em;pointer-events:none;line-height:.15em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-time-tooltip,\n.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em 0 .45em;\n /* iOS Safari */-webkit-touch-callout:none;\n /* Safari, and Chrome 53 */-webkit-user-select:none;\n /* Non-prefixed version, currently supported by Chrome and Opera */-moz-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, .video-js .vjs-volume-panel:active .vjs-volume-control, .video-js .vjs-volume-panel:focus .vjs-volume-control, .video-js .vjs-volume-panel .vjs-volume-control:active, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{position:absolute;width:.9em;height:.9em;pointer-events:none;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-volume-tooltip,\n.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip,\n.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,\n.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,\n.vjs-has-started.vjs-audio-poster-mode .vjs-poster,\n.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.video-js:not(.vjs-live) .vjs-live-control,\n.video-js.vjs-liveui .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,\n.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{width:1em;height:1em;pointer-events:none;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control,\n.vjs-live .vjs-time-divider,\n.video-js .vjs-current-time,\n.video-js .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,\n.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}uni-video::-webkit-media-text-track-display{-webkit-transform:translateY(-3em);transform:translateY(-3em)}.video-js.vjs-controls-disabled uni-video::-webkit-media-text-track-display,\n.video-js.vjs-user-inactive.vjs-playing uni-video::-webkit-media-text-track-display{-webkit-transform:translateY(-1.5em);transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,\n.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,\n.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate > .vjs-menu-button,\n.vjs-playback-rate .vjs-playback-rate-value{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:.85;text-align:left;border:.6em solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:5em;height:5em;border-radius:50%;visibility:hidden}.vjs-seeking .vjs-loading-spinner,\n.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:before,\n.vjs-loading-spinner:after{content:"";position:absolute;margin:-.6em;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:before,\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:after{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-svg-icon{width:1.5em;height:1.5em}.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\\f10c";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder,\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \\f12e";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,\n.video-js.vjs-layout-small .vjs-time-divider,\n.video-js.vjs-layout-small .vjs-duration,\n.video-js.vjs-layout-small .vjs-remaining-time,\n.video-js.vjs-layout-small .vjs-playback-rate,\n.video-js.vjs-layout-small .vjs-volume-control,\n.video-js.vjs-layout-x-small .vjs-current-time,\n.video-js.vjs-layout-x-small .vjs-time-divider,\n.video-js.vjs-layout-x-small .vjs-duration,\n.video-js.vjs-layout-x-small .vjs-remaining-time,\n.video-js.vjs-layout-x-small .vjs-playback-rate,\n.video-js.vjs-layout-x-small .vjs-volume-control,\n.video-js.vjs-layout-tiny .vjs-current-time,\n.video-js.vjs-layout-tiny .vjs-time-divider,\n.video-js.vjs-layout-tiny .vjs-duration,\n.video-js.vjs-layout-tiny .vjs-remaining-time,\n.video-js.vjs-layout-tiny .vjs-playback-rate,\n.video-js.vjs-layout-tiny .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover{width:auto;width:auto}.video-js.vjs-layout-x-small .vjs-progress-control, .video-js.vjs-layout-tiny .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,\n.vjs-text-track-settings .vjs-track-settings-font,\n.vjs-text-track-settings .vjs-track-settings-controls{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,\n .vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,\n .vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting > select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span > select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:1.2em}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls uni-button:focus,\n.vjs-track-settings-controls uni-button:active{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}.vjs-track-settings-controls uni-button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls uni-button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9),rgba(0,0,0,.7) 60%,transparent);font-size:1.2em;line-height:1.5;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-title,\n.vjs-title-bar-description{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-skip-forward-10{cursor:pointer}.video-js .vjs-skip-forward-30{cursor:pointer}.video-js .vjs-skip-backward-5{cursor:pointer}.video-js .vjs-skip-backward-10{cursor:pointer}.video-js .vjs-skip-backward-30{cursor:pointer}@media print{.video-js > *:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js *:focus:not(.focus-visible){outline:none}.video-js *:focus:not(:focus-visible){outline:none}',""]),e.exports=t},"9d17":function(e,t,i){"use strict";i("7a82");var n=i("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("54f8")),a=n(i("f07e")),s=n(i("c964"));i("4de4"),i("d3b7"),i("99af"),i("d401"),i("0eb6"),i("b7ef"),i("8bd4"),i("b64b"),i("e9c4"),i("3c65"),i("14d9");var o=n(i("7a91")),l=n(i("d3b0")),u=n(i("7710")),c=new u.default;t.default={components:{videoFlvH5:o.default,videoM3u8H5:l.default},data:function(){return{list:[{name:"监控"},{name:"视频"}],current:0,q_start_time:"",q_end_time:"",deviceAddressList:[],addressName:"",addressValue:"",device_id:"",options2:[],start_date_c:"",end_date_c:"",device_type:1,is_recommend:0,options3:[{label:"全部",value:0},{label:"推荐",value:1}],per_page:4,page:1,pickerParams:{year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!1},defaultTime:"",pickerShow:!1,ctimeType:"",addressValue2:"",addressName2:"",device_id2:"",options4:[],websocket:{},videoList:[],videoList2:[],per_page2:4,page2:1,loading:"loading",loading2:"",selectedTimeTip:!1}},onLoad:function(){this.queryWebsocketIp()},methods:{sectionChange:function(e){this.current=e},change:function(e){console.log(e);var t=this.deviceAddressList.filter((function(t){return t.value==e}));console.log(t),0==this.current?this.addressName=t[0].name:this.addressName2=t[0].name,""==e?(this.addressName="全部",this.queryDevices()):this.queryAddressDevicePoints(e)},change2:function(e){console.log(e),this.queryDevices()},change3:function(e){this.queryDevices()},change4:function(e){},pickerTimeFn:function(e){this.ctimeType=e,this.pickerShow=!0},pickerChange:function(e){console.log(e,"日期范围");var t="".concat(e.year,"-").concat(e.month,"-").concat(e.day," ").concat(e.hour,":").concat(e.minute);"start"==this.ctimeType?this.start_date_c=t:"end"==this.ctimeType&&(this.end_date_c=t),console.log(t,"日期范围")},deleteDateFn:function(e){"start"==e?this.start_date_c="":"end"==e&&(this.end_date_c="")},resetSecreen:function(){this.start_date_c="",this.end_date_c=""},selectedDateConform:function(){this.start_date_c&&this.end_date_c?(this.selectedTimeTip=!1,this.q_start_time=this.start_date_c,this.q_end_time=this.end_date_c,this.queryDevices2(),this.$refs.uDropdown2.close()):this.selectedTimeTip=!0},openDropDown:function(e){console.log(e,"openDropDown"),this.selectedTimeTip=!1,2==e&&(this.start_date_c=this.q_start_time,this.end_date_c=this.q_end_time)},changeRecommend:function(e,t){console.log(e,t);var i=this.videoList[t].id;this.recommendId(i)},recommendId:function(e){this.$http.put("/api/devices-update-recommend/".concat(e)).then((function(e){var t=e.data;console.log(t,"recommendId===")})).catch((function(e){}))},queryWebsocketIp:function(){var e=this;return(0,s.default)((0,a.default)().mark((function t(){var i,n,r;return(0,a.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i={_t:(new Date).getTime()},t.next=3,e.$http.get("/api/ffmpeg-websocket-ip",{params:i});case 3:n=t.sent,r=n.data;try{console.log(r,"queryWebsocketIp"),200==r.code&&(e.websocket=r.data)}catch(a){}e.queryDeviceBasics("init");case 7:case"end":return t.stop()}}),t)})))()},queryDevices:function(e){var t=this;"more"!=e&&(this.loading="loadmore",this.page=1);var i={type:this.device_type,status:1,per_page:this.per_page,page:this.page++,_t:(new Date).getTime()};this.addressValue&&(i["base"]=this.addressValue),this.device_id&&(i["point"]=this.device_id),this.is_recommend&&(i["is_recommend"]=this.is_recommend),this.loading="loading",this.$http.get("/api/devices",{params:i}).then(function(){var i=(0,s.default)((0,a.default)().mark((function i(n){var s,o,l,u,h,d,p,f,v,m,g,y,b;return(0,a.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(s=n.data,t.loading="loadmore","more"!=e&&(t.videoList=[]),console.log(s,"监测视频"),200!=s.code){i.next=36;break}o=s.data,l=(0,r.default)(o),i.prev=7,l.s();case 9:if((u=l.n()).done){i.next=25;break}if(h=u.value,d=h.extends.rtsp_url,p=t.websocket,f=p.ip,v=p.port,d&&(h.video_url="ws://".concat(f,":").concat(v,"/rtsp?url=").concat(window.btoa(d))),h.supplier,m=h.extends,g=h.sn,"device-supplier-biang"!=h.supplier.id){i.next=22;break}return i.next=18,c.get("https://yun.bigdata5s.com/api/open-api/open/getSeedingLive",{params:{username:m.username,password:m.password,equipmentCode:g,channelNo:m.passage}});case 18:y=i.sent,b=y.data,h.video_url=b.data,h.video_type="m3u8";case 22:h.bl_recommend=1==h.is_recommend;case 23:i.next=9;break;case 25:i.next=30;break;case 27:i.prev=27,i.t0=i["catch"](7),l.e(i.t0);case 30:return i.prev=30,l.f(),i.finish(30);case 33:t.videoList=t.videoList.concat(o),s.meta.current_page>=s.meta.last_page&&(t.loading="nomore"),console.log(t.videoList,s);case 36:case"end":return i.stop()}}),i,null,[[7,27,30,33]])})));return function(e){return i.apply(this,arguments)}}()).catch((function(){t.loading="loadmore"}))},queryDevices2:function(e){var t=this;"more"!=e&&(this.loading2="loadmore",this.page2=1);var i={type:this.device_type,status:1,per_page:this.per_page2,page:this.page2++,_t:(new Date).getTime()};this.addressValue2&&(i["base"]=this.addressValue2),this.device_id&&(i["point"]=this.device_id2),this.q_start_time&&(i["start_time"]=this.q_start_time,i["end_time"]=this.q_end_time),this.loading2="loading",this.$http.get("/api/devices",{params:i}).then((function(n){var a=n.data;if(t.loading2="loadmore","more"!=e&&(t.videoList2=[]),console.log(a,"监测视频"),200==a.code){var s,o=a.data,l=(0,r.default)(o);try{for(l.s();!(s=l.n()).done;){var u=s.value,c=u.extends.rtsp_url;if(c){var h=u.extends,d=h.username,p=h.password,f=h.ip,v=h.passage,m=h.port,g=t.$u.timeFormat(i["start_time"],"yyyy_mm_dd_hh_MM_ss"),y=t.$u.timeFormat(i["end_time"],"yyyy_mm_dd_hh_MM_ss"),b="rtsp://".concat(d,":").concat(p,"@").concat(f,":").concat(m,"/cam/playback?channel=").concat(v,"&subtype=0"),_="".concat(b,"&starttime=").concat(g,"&endtime=").concat(y);u.video_url="ws://".concat(t.websocket.ip,":").concat(t.websocket.port,"/rtsp?url=").concat(window.btoa(_),"}"),console.log(_,u.video_url,"视频url")}}}catch(T){l.e(T)}finally{l.f()}t.videoList2=t.videoList2.concat(o),a.meta.current_page>=a.meta.last_page&&(t.loading2="nomore")}})).catch((function(){t.loading2="loadmore"}))},queryDeviceBasics:function(e){var t=this,i={device_type:this.device_type,_t:(new Date).getTime()};this.$http.get("/api/agricultural-device-basic",{params:i}).then((function(i){var n=i.data;if(console.log(n),200==n.code){var a,s=n.data,o=(0,r.default)(s);try{for(o.s();!(a=o.n()).done;){var l=a.value;l["label"]=l.name,l["value"]=l.id}}catch(u){o.e(u)}finally{o.f()}t.deviceAddressList=JSON.parse(JSON.stringify(s)),t.deviceAddressList2=s,t.addressValue=s[0].id,t.addressName=s[0].name,t.addressValue2=s[0].id,t.addressName2=s[0].name,t.deviceAddressList.unshift({label:"全部",value:""}),t.queryAddressDevicePoints(s[0].id,e)}})).catch((function(){}))},queryAddressDevicePoints:function(e,t){var i=this,n={device_type:this.device_type,agricultural_basic:e,_t:(new Date).getTime()};this.$http.get("/api/agricultural-device-point/".concat(e),{params:n}).then((function(e){var n=e.data;if(console.log(n),200==n.code){var r=n.data,a=[];for(var s in r){var o={};o["label"]=r[s],o["value"]=r[s],a.push(o)}console.log(t,"初始查询"),console.log(i.options2,i.device_id,"this.options2"),0==i.current?(i.options2=JSON.parse(JSON.stringify(a)),i.device_id=a[0].value,i.options2.unshift({label:"全部",value:""}),i.queryDevices()):(i.options4=a,i.device_id2=a[0].value),"init"==t&&(i.options4=a,i.device_id2=a[0].value)}})).catch((function(){}))}},onReachBottom:function(){0==this.current?"loadmore"==this.loading&&this.queryDevices("more"):"loadmore"==this.loading2&&this.queryDevices2("more")}}},"9d56":function(e,t,i){"use strict";var n,r=i("4329");n=function(){var e=new Uint8Array,t=0;n.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.parseId3TagSize=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],n=e[t+5],r=(16&n)>>4;return r?i+20:i+10},this.parseAdtsSize=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3,r=6144&e[t+3];return r|n|i},this.push=function(i){var n,r,a,s,o=0,l=0;e.length?(s=e.length,e=new Uint8Array(i.byteLength+s),e.set(e.subarray(0,s)),e.set(i,s)):e=i;while(e.length-l>=3)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(!0&e[l]&&240===(240&e[l+1])){if(e.length-l<7)break;if(o=this.parseAdtsSize(e,l),o>e.length)break;a={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",a),l+=o}else l++;else{if(e.length-l<10)break;if(o=this.parseId3TagSize(e,l),o>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array}},n.prototype=new r,e.exports=n},"9f7a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("be09"),u=a(l),c=i("ef34"),h=a(c),d=i("12c6"),p=a(d),f=i("269f"),v=a(f),m=i("ba2d"),g=i("0de0"),y=function(e){function t(){var e=this;s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var i=void 0;for(i in this.nativeMediaSource_=new u["default"].MediaSource,this.nativeMediaSource_)i in t.prototype||"function"!==typeof this.nativeMediaSource_[i]||(this[i]=this.nativeMediaSource_[i].bind(this.nativeMediaSource_));this.duration_=NaN,Object.defineProperty(this,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(e){this.duration_=e,e===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(this,"seekable",{get:function(){return this.duration_===1/0?p["default"].createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(this,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(this,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),this.sourceBuffers=[],this.activeSourceBuffers_=[],this.updateActiveSourceBuffers_=function(){if(e.activeSourceBuffers_.length=0,1===e.sourceBuffers.length){var t=e.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void e.activeSourceBuffers_.push(t)}for(var i=!1,n=!0,r=0;r<e.player_.audioTracks().length;r++){var a=e.player_.audioTracks()[r];if(a.enabled&&"main"!==a.kind){i=!0,n=!1;break}}e.sourceBuffers.forEach((function(t){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=i;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,n=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=n,n))return;e.activeSourceBuffers_.push(t)}))},this.onPlayerMediachange_=function(){e.sourceBuffers.forEach((function(e){e.appendAudioInitSegment_=!0}))},this.onHlsReset_=function(){e.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})}))},this.onHlsSegmentTimeMapping_=function(t){e.sourceBuffers.forEach((function(e){return e.timeMapping_=t.mapping}))},["sourceopen","sourceclose","sourceended"].forEach((function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))}),this),this.on("sourceopen",(function(t){var i=h["default"].querySelector('[src="'+e.url_+'"]');i&&(e.player_=(0,p["default"])(i.parentNode),e.player_.tech_.on("hls-reset",e.onHlsReset_),e.player_.tech_.on("hls-segment-time-mapping",e.onHlsSegmentTimeMapping_),e.player_.audioTracks&&e.player_.audioTracks()&&(e.player_.audioTracks().on("change",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("addtrack",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("removetrack",e.updateActiveSourceBuffers_)),e.player_.on("mediachange",e.onPlayerMediachange_))})),this.on("sourceended",(function(t){for(var i=(0,m.durationOfVideo)(e.duration),n=0;n<e.sourceBuffers.length;n++){var r=e.sourceBuffers[n],a=r.metadataTrack_&&r.metadataTrack_.cues;a&&a.length&&(a[a.length-1].endTime=i)}})),this.on("sourceclose",(function(e){this.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.terminate()})),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&(this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}))}return o(t,e),n(t,[{key:"addSeekableRange_",value:function(e,t){var i=void 0;if(this.duration!==1/0)throw i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity"),i.name="InvalidStateError",i.code=11,i;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,i=(0,g.parseContentType)(e);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];i.parameters&&i.parameters.codecs&&(n=i.parameters.codecs.split(","),n=(0,g.translateLegacyCodecs)(n),n=n.filter((function(e){return(0,g.isAudioCodec)(e)||(0,g.isVideoCodec)(e)}))),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),t=new v["default"](this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}}]),t}(p["default"].EventTarget);t["default"]=y,e.exports=t["default"]},a09d:function(e,t,i){"use strict";i("7a82");var n=i("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("fc78"));t.default={props:{url:{type:String,default:null}},data:function(){return{player:null}},mounted:function(){this.videoPlayer()},beforeDestroy:function(){this.destroyVideos()},methods:{destroyVideos:function(){var e,t,i,n;this.player&&(null===(e=this.player)||void 0===e||e.pause(),null===(t=this.player)||void 0===t||t.unload(),null===(i=this.player)||void 0===i||i.detachMediaElement(),null===(n=this.player)||void 0===n||n.destroy(),this.player=null,this.$refs.myPlayer.innerHTML="")},videoPlayer:function(){if(this.url&&r.default.isSupported()){var e=document.createElement("video");e.enableProgressGesture=!0,e.controls=!0,e.showCenterPlayBtn=!0,e.showPlayBtn=!0,e.showFullscreenBtn=!0,e.x5VideoPlayerType="h5-page",e.x5VideoPlayerFullscreen="false",e.autoplay=!0,e.style="width: 100%;height:100%";var t=this.$refs.myPlayer;t.appendChild(e);var i=r.default.createPlayer({type:"flv",isLive:!0,url:this.url});i.attachMediaElement(e),i.load(),i.play(),this.player=i}}},watch:{url:function(){this.destroyVideos(),this.videoPlayer()}}}},a151:function(e,t,i){"use strict";var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("ef34"),u=a(l),c=i("8c57"),h=a(c),d=i("d61a"),p=a(d),f=i("46af"),v=a(f),m=i("b658"),g=i("f24e"),y=a(g),b=i("80eb"),_=i("c795"),T=a(_),S=i("e475"),w=a(S),E=i("91c5"),k=i("56c8"),C=a(k),x=i("e044"),A=a(x),I=i("be09"),O=a(I),j=i("f631"),L=a(j),P=i("140c"),D=a(P),R=i("57db"),M={PlaylistLoader:h["default"],Playlist:p["default"],Decrypter:m.Decrypter,AsyncStream:m.AsyncStream,decrypt:m.decrypt,utils:y["default"],STANDARD_PLAYLIST_SELECTOR:R.lastBandwidthSelector,INITIAL_PLAYLIST_SELECTOR:R.lowestBitrateCompatibleVariantSelector,comparePlaylistBandwidth:R.comparePlaylistBandwidth,comparePlaylistResolution:R.comparePlaylistResolution,xhr:(0,v["default"])()},N=4194304;["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach((function(e){Object.defineProperty(M,e,{get:function(){return w["default"].log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),C["default"][e]},set:function(t){w["default"].log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!==typeof t||t<0?w["default"].log.warn("value of Hls."+e+" must be greater than or equal to 0"):C["default"][e]=t}})}));var B=function(e,t){for(var i=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.uri){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})},U=function(e,t){t.representations().forEach((function(t){e.addQualityLevel(t)})),B(e,t.playlists)};M.canPlaySource=function(){return w["default"].log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},M.supportsNativeHls=function(){var e=u["default"].createElement("video");if(!w["default"].getTech("Html5").isSupported())return!1;var t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),M.isSupported=function(){return w["default"].log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var F=w["default"].getComponent("Component"),V=function(e){function t(e,i,n){var a=this;if(s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,i,n.hls),i.options_&&i.options_.playerId){var o=(0,w["default"])(i.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return w["default"].log.warn("player.hls is deprecated. Use player.tech_.hls instead."),i.trigger({type:"usage",name:"hls-player-access"}),a}})}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");this.on(u["default"],["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=u["default"].fullscreenElement||u["default"].webkitFullscreenElement||u["default"].mozFullScreenElement||u["default"].msFullscreenElement;t&&t.contains(a.tech_.el())&&a.masterPlaylistController_.fastQualityChange_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}return o(t,e),n(t,[{key:"setOptions_",value:function(){var e=this;this.options_.withCredentials=this.options_.withCredentials||!1,"number"!==typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=N),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===N,["withCredentials","bandwidth","handleManifestRedirects"].forEach((function(t){"undefined"!==typeof e.source_[t]&&(e.options_[t]=e.source_[t])})),this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(e){var t=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=M,this.masterPlaylistController_=new E.MasterPlaylistController(this.options_),this.playbackWatcher_=new L["default"](w["default"].mergeOptions(this.options_,{seekable:function(){return t.seekable()}})),this.masterPlaylistController_.on("error",(function(){var e=w["default"].players[t.tech_.options_.playerId];e.error(t.masterPlaylistController_.error)})),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):M.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=M.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=void 0;t=this.throughput>0?1/this.throughput:0;var i=Math.floor(1/(e+t));return i},set:function(){w["default"].log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return t.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return t.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return t.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return t.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return t.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return t.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return t.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return t.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",(function(){(0,A["default"])(t)})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.tech_.ready((function(){return t.setupQualityLevels_()})),this.tech_.el()&&this.tech_.src(w["default"].URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=w["default"].players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){U(e.qualityLevels_,e)})),this.playlists.on("mediachange",(function(){B(e.qualityLevels_,e.playlists)})))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),r(Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}}]),t}(F),H=function e(t){return{canHandleSource:function(i){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=w["default"].mergeOptions(w["default"].options,n);return(!r.hls||!r.hls.mode||r.hls.mode===t)&&e.canPlayType(i.type,r)},handleSource:function(e,i){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=w["default"].mergeOptions(w["default"].options,n,{hls:{mode:t}});return"flash"===t&&i.setTimeout((function(){i.trigger("loadstart")}),1),i.hls=new V(e,i,r),i.hls.xhr=(0,v["default"])(),i.hls.src(e.src),i.hls},canPlayType:function(t){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=w["default"].mergeOptions(w["default"].options,i);return e.canPlayType(t,n)?"maybe":""}}};H.canPlayType=function(e,t){if(w["default"].browser.IE_VERSION&&w["default"].browser.IE_VERSION<=10)return!1;var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;return!(!t.hls.overrideNative&&M.supportsNativeHls)&&i.test(e)},"undefined"!==typeof w["default"].MediaSource&&"undefined"!==typeof w["default"].URL||(w["default"].MediaSource=b.MediaSource,w["default"].URL=b.URL);var q=w["default"].getTech("Flash");b.MediaSource.supportsNativeMediaSources()&&w["default"].getTech("Html5").registerSourceHandler(H("html5"),0),O["default"].Uint8Array&&q&&q.registerSourceHandler(H("flash")),w["default"].HlsHandler=V,w["default"].HlsSourceHandler=H,w["default"].Hls=M,w["default"].use||w["default"].registerComponent("Hls",M),w["default"].m3u8=T["default"],w["default"].options.hls=w["default"].options.hls||{},w["default"].registerPlugin?w["default"].registerPlugin("reloadSourceOnError",D["default"]):w["default"].plugin("reloadSourceOnError",D["default"]),e.exports={Hls:M,HlsHandler:V,HlsSourceHandler:H}},a254:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("be09"),a=n(r),s=i("b658"),o=i("f24e"),l=function(e){e.onmessage=function(e){var t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new s.Decrypter(i,n,r,(function(e,i){a["default"].postMessage((0,o.createTransferableMessage)({source:t.source,decrypted:i}),[i.buffer])}))}};t["default"]=function(e){return new l(e)},e.exports=t["default"]},a559:function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports["default"]=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},a59e:function(e,t,i){(function(t){var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=i}).call(this,i("c8ba"))},a64c:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i("be09"),o=r(s),l=i("6d5a"),u=r(l),c=function(e){e.on("data",(function(e){o["default"].postMessage({action:"data",segment:e})})),e.on("done",(function(e){o["default"].postMessage({action:"done"})}))},h=function(){function e(t){a(this,e),this.options=t||{},this.init()}return n(e,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new u["default"].Transmuxer(this.options),c(this.transmuxer)}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"flush",value:function(){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}}]),e}(),d=function(e){e.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new h(e.data.options):(this.messageHandlers||(this.messageHandlers=new h),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}};t["default"]=function(e){return new d(e)},e.exports=t["default"]},a9e0:function(e,t,i){"use strict";function n(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,i("a4d3"),i("e01a"),i("d3b7"),i("d28b"),i("3ca3"),i("ddb0"),i("a630")},ae54:function(e,t,i){"use strict";var n=function(){var e=this;this.list=[],this.push=function(e){this.list.push({bytes:e.bytes,dts:e.dts,pts:e.pts,keyFrame:e.keyFrame,metaDataTag:e.metaDataTag})},Object.defineProperty(this,"length",{get:function(){return e.list.length}})};e.exports=n},ae75:function(e,t,i){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},af37:function(e,t,i){"use strict";var n=i("1d2d"),r=i.n(n);r.a},b03c:function(e,t){var i="auto",n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function a(e){if("string"!==typeof e)return!1;var t=n[e.toLowerCase()];return!!t&&e.toLowerCase()}function s(e){if("string"!==typeof e)return!1;var t=r[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e,t,n){this.hasBeenReset=!1;var r="",o=!1,l=e,u=t,c=n,h=null,d="",p=!0,f="auto",v="start",m="auto",g="auto",y=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");l=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var t=a(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!==typeof e&&e!==i)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return v},set:function(e){var t=s(e);t?(v=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=s(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=s(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},b046:function(e,t,i){"use strict";var n=i("d7ba"),r=function(e,t,i){var r,a,s,o=new Uint8Array(9),l=new DataView(o.buffer);return e=e||0,t=void 0===t||t,i=void 0===i||i,l.setUint8(0,70),l.setUint8(1,76),l.setUint8(2,86),l.setUint8(3,1),l.setUint8(4,(t?4:0)|(i?1:0)),l.setUint32(5,o.byteLength),e<=0?(a=new Uint8Array(o.byteLength+4),a.set(o),a.set([0,0,0,0],o.byteLength),a):(r=new n(n.METADATA_TAG),r.pts=r.dts=0,r.writeMetaDataDouble("duration",e),s=r.finalize().length,a=new Uint8Array(o.byteLength+s),a.set(o),a.set(l.byteLength,s),a)};e.exports=r},b074:function(e,t,i){var n=i("89a7"),r=i("e1c8"),a=i("b30f"),s=i("e003"),o=r.DOMImplementation,l=n.NAMESPACE,u=s.ParseError,c=s.XMLReader;function h(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function d(e){this.options=e||{locator:{}}}function p(e,t,i){if(!e){if(t instanceof f)return t;e=t}var n={},r=e instanceof Function;function a(t){var a=e[t];!a&&r&&(a=2==e.length?function(i){e(t,i)}:e),n[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(i))}||function(){}}return i=i||{},a("warning"),a("error"),a("fatalError"),n}function f(){this.cdata=!1}function v(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var i=this.options,n=new c,r=i.domBuilder||new f,s=i.errorHandler,o=i.locator,u=i.xmlns||{},d=/\/x?html?$/.test(t),v=d?a.HTML_ENTITIES:a.XML_ENTITIES;o&&r.setDocumentLocator(o),n.errorHandler=p(s,r,o),n.domBuilder=i.domBuilder||r,d&&(u[""]=l.HTML),u.xml=u.xml||l.XML;var m=i.normalizeLineEndings||h;return e&&"string"===typeof e?n.parse(m(e),u,v):n.errorHandler.error("invalid doc source"),r.doc},f.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,a=r.createElementNS(e,i||t),s=n.length;y(this,a),this.currentElement=a,this.locator&&v(this.locator,a);for(var o=0;o<s;o++){e=n.getURI(o);var l=n.getValue(o),u=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&v(n.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&v(this.locator,i),y(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=g.apply(this,arguments),e){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&v(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&v(this.locator,n),y(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&v(this.locator,r),y(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new u(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){f.prototype[e]=function(){return null}})),t.__DOMHandler=f,t.normalizeLineEndings=h,t.DOMParser=d},b30f:function(e,t,i){"use strict";var n=i("89a7").freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"",dd:"",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:"",emsp13:"",emsp14:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"",escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",ExponentialE:"",exponentiale:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",Fscr:"",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"",hfr:"𝔥",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",Lscr:"",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"",midast:"*",midcir:"⫰",middot:"·",minus:"",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",Or:"⩔",or:"",orarr:"↻",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",Popf:"",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"",rationals:"",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",Rscr:"",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",Tilde:"",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"",vee:"",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),t.entityMap=t.HTML_ENTITIES},b3ab:function(e,t,i){"use strict";i("7a82");var n=i("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("d0ff")),a=n(i("0122"));i("a9e3"),i("99af"),i("fb6a"),i("d3b7"),i("ddb0"),i("c975"),i("ac1f"),i("5319"),i("14d9"),i("a434"),i("d81d");var s=n(i("4105")),o=n(i("efe2")),l=n(i("60ae"));t.default={name:"u-picker",props:{params:{type:Object,default:function(){return{year:!0,month:!0,day:!0,hour:!1,minute:!1,second:!1,province:!0,city:!0,area:!0,timestamp:!0}}},range:{type:Array,default:function(){return[]}},defaultSelector:{type:Array,default:function(){return[0]}},rangeKey:{type:String,default:""},mode:{type:String,default:"time"},startYear:{type:[String,Number],default:1950},endYear:{type:[String,Number],default:2050},cancelColor:{type:String,default:"#606266"},confirmColor:{type:String,default:"#2979ff"},defaultTime:{type:String,default:""},defaultRegion:{type:Array,default:function(){return[]}},showTimeTag:{type:Boolean,default:!0},areaCode:{type:Array,default:function(){return[]}},safeAreaInsetBottom:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!0},value:{type:Boolean,default:!1},zIndex:{type:[String,Number],default:0},title:{type:String,default:""},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"}},data:function(){return{years:[],months:[],days:[],hours:[],minutes:[],seconds:[],year:0,month:0,day:0,hour:0,minute:0,second:0,reset:!1,startDate:"",endDate:"",valueArr:[],provinces:s.default,citys:o.default[0],areas:l.default[0][0],province:0,city:0,area:0,moving:!1}},mounted:function(){this.init()},computed:{propsChange:function(){return"".concat(this.mode,"-").concat(this.defaultTime,"-").concat(this.startYear,"-").concat(this.endYear,"-").concat(this.defaultRegion,"-").concat(this.areaCode)},regionChange:function(){return"".concat(this.province,"-").concat(this.city)},yearAndMonth:function(){return"".concat(this.year,"-").concat(this.month)},uZIndex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},watch:{propsChange:function(){var e=this;this.reset=!0,setTimeout((function(){return e.init()}),10)},regionChange:function(e){this.citys=o.default[this.province],this.areas=l.default[this.province][this.city]},yearAndMonth:function(e){this.params.year&&this.setDays()},value:function(e){var t=this;e&&(this.reset=!0,setTimeout((function(){return t.init()}),10))}},methods:{pickstart:function(){},pickend:function(){},getItemValue:function(e,t){if(this.mode==t)return"object"==(0,a.default)(e)?e[this.rangeKey]:e},formatNumber:function(e){return+e<10?"0"+e:String(e)},generateArray:function(e,t){return e=Number(e),t=Number(t),t=t>e?t:e,(0,r.default)(Array(t+1).keys()).slice(e)},getIndex:function(e,t){var i=e.indexOf(t);return~i?i:0},initTimeValue:function(){var e=this.defaultTime.replace(/\-/g,"/");e=e&&-1==e.indexOf("/")?"2020/01/01 ".concat(e):e;var t=null;t=e?new Date(e):new Date,this.year=t.getFullYear(),this.month=Number(t.getMonth())+1,this.day=t.getDate(),this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds()},init:function(){this.valueArr=[],this.reset=!1,"time"==this.mode?(this.initTimeValue(),this.params.year&&(this.valueArr.push(0),this.setYears()),this.params.month&&(this.valueArr.push(0),this.setMonths()),this.params.day&&(this.valueArr.push(0),this.setDays()),this.params.hour&&(this.valueArr.push(0),this.setHours()),this.params.minute&&(this.valueArr.push(0),this.setMinutes()),this.params.second&&(this.valueArr.push(0),this.setSeconds())):"region"==this.mode?(this.params.province&&(this.valueArr.push(0),this.setProvinces()),this.params.city&&(this.valueArr.push(0),this.setCitys()),this.params.area&&(this.valueArr.push(0),this.setAreas())):"selector"==this.mode?this.valueArr=this.defaultSelector:"multiSelector"==this.mode&&(this.valueArr=this.defaultSelector,this.multiSelectorValue=this.defaultSelector),this.$forceUpdate()},setYears:function(){this.years=this.generateArray(this.startYear,this.endYear),this.valueArr.splice(this.valueArr.length-1,1,this.getIndex(this.years,this.year))},setMonths:function(){this.months=this.generateArray(1,12),this.valueArr.splice(this.valueArr.length-1,1,this.getIndex(this.months,this.month))},setDays:function(){var e=new Date(this.year,this.month,0).getDate();this.days=this.generateArray(1,e);var t=0;t=this.params.year&&this.params.month?2:this.params.month||this.params.year?1:0,this.day>this.days.length&&(this.day=this.days.length),this.valueArr.splice(t,1,this.getIndex(this.days,this.day))},setHours:function(){this.hours=this.generateArray(0,23),this.valueArr.splice(this.valueArr.length-1,1,this.getIndex(this.hours,this.hour))},setMinutes:function(){this.minutes=this.generateArray(0,59),this.valueArr.splice(this.valueArr.length-1,1,this.getIndex(this.minutes,this.minute))},setSeconds:function(){this.seconds=this.generateArray(0,59),this.valueArr.splice(this.valueArr.length-1,1,this.getIndex(this.seconds,this.second))},setProvinces:function(){if(this.params.province){var e="",t=!1;this.areaCode.length?(e=this.areaCode[0],t=!0):e=this.defaultRegion.length?this.defaultRegion[0]:0,s.default.map((function(i,n){(t?i.value==e:i.label==e)&&(e=n)})),this.province=e,this.provinces=s.default,this.valueArr.splice(0,1,this.province)}},setCitys:function(){if(this.params.city){var e="",t=!1;this.areaCode.length?(e=this.areaCode[1],t=!0):e=this.defaultRegion.length?this.defaultRegion[1]:0,o.default[this.province].map((function(i,n){(t?i.value==e:i.label==e)&&(e=n)})),this.city=e,this.citys=o.default[this.province],this.valueArr.splice(1,1,this.city)}},setAreas:function(){if(this.params.area){var e="",t=!1;this.areaCode.length?(e=this.areaCode[2],t=!0):e=this.defaultRegion.length?this.defaultRegion[2]:0,l.default[this.province][this.city].map((function(i,n){(t?i.value==e:i.label==e)&&(e=n)})),this.area=e,this.areas=l.default[this.province][this.city],this.valueArr.splice(2,1,this.area)}},close:function(){this.$emit("input",!1)},change:function(e){this.valueArr=e.detail.value;var t=0;if("time"==this.mode)this.params.year&&(this.year=this.years[this.valueArr[t++]]),this.params.month&&(this.month=this.months[this.valueArr[t++]]),this.params.day&&(this.day=this.days[this.valueArr[t++]]),this.params.hour&&(this.hour=this.hours[this.valueArr[t++]]),this.params.minute&&(this.minute=this.minutes[this.valueArr[t++]]),this.params.second&&(this.second=this.seconds[this.valueArr[t++]]);else if("region"==this.mode)this.params.province&&(this.province=this.valueArr[t++]),this.params.city&&(this.city=this.valueArr[t++]),this.params.area&&(this.area=this.valueArr[t++]);else if("multiSelector"==this.mode){var i=null;this.defaultSelector.map((function(t,n){t!=e.detail.value[n]&&(i=n)})),null!=i&&this.$emit("columnchange",{column:i,index:e.detail.value[i]})}},getResult:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t={};"time"==this.mode?(this.params.year&&(t.year=this.formatNumber(this.year||0)),this.params.month&&(t.month=this.formatNumber(this.month||0)),this.params.day&&(t.day=this.formatNumber(this.day||0)),this.params.hour&&(t.hour=this.formatNumber(this.hour||0)),this.params.minute&&(t.minute=this.formatNumber(this.minute||0)),this.params.second&&(t.second=this.formatNumber(this.second||0)),this.params.timestamp&&(t.timestamp=this.getTimestamp())):"region"==this.mode?(this.params.province&&(t.province=s.default[this.province]),this.params.city&&(t.city=o.default[this.province][this.city]),this.params.area&&(t.area=l.default[this.province][this.city][this.area])):("selector"==this.mode||"multiSelector"==this.mode)&&(t=this.valueArr),e&&this.$emit(e,t),this.close()},getTimestamp:function(){var e=this.year+"/"+this.month+"/"+this.day+" "+this.hour+":"+this.minute+":"+this.second;return new Date(e).getTime()/1e3}}}},b48b:function(e,t,i){"use strict";i("7a82");var n=i("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("f0e2"));i("a151"),i("fda2");t.default={props:{url:{type:String,default:""},id:{type:String,default:"videoRefI"}},data:function(){return{player:null}},mounted:function(){this.initVideo()},beforeDestroy:function(){var e;null===(e=this.player)||void 0===e||e.dispose()},methods:{initVideo:function(){var e=document.createElement("video");e.id=this.id,e.style="width: 100%; height: 100%;",e.controls=!0,e.preload="auto",e.setAttribute("playsinline",!0),e.setAttribute("webkit-playsinline",!0),e.setAttribute("x5-video-player-type","h5");var t=document.createElement("source");t.src=this.url,e.appendChild(t),this.$refs.videos.appendChild(e);(0,r.default)(this.id,{playbackRates:[.7,1,1.5,2],autoDisable:!0,preload:"none",language:"zh-CN",fluid:!0,muted:!0,aspectRatio:"16:9",controls:!1,autoplay:!0,loop:!0,screenshot:!0,controlBar:{volumePanel:{inline:!1},timeDivider:!0,durationDisplay:!0,progressControl:!0,remainingTimeDisplay:!0,fullscreenToggle:!0,pictureInPictureToggle:!0}},(function(){this.on("error",(function(e){console.log("请求数据时遇到错误",e)})),this.on("stalled",(function(e){console.log("网速失速",e)}))}))}}}},b639:function(e,t,i){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=i("1fb5"),r=i("9152"),a=i("e3db");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=u.prototype):(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,i){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(e,t,i);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,i)}function c(e,t,i,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?m(e,t,i,n):"string"===typeof t?f(e,t,i):g(e,t)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t,i,n){return h(t),t<=0?l(e,t):void 0!==i?"string"===typeof n?l(e,t).fill(i,n):l(e,t).fill(i):l(e,t)}function p(e,t){if(h(t),e=l(e,t<0?0:0|y(t)),!u.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function f(e,t,i){if("string"===typeof i&&""!==i||(i="utf8"),!u.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|_(t,i);e=l(e,n);var r=e.write(t,i);return r!==n&&(e=e.slice(0,r)),e}function v(e,t){var i=t.length<0?0:0|y(t.length);e=l(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function m(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n),u.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=u.prototype):e=v(e,t),e}function g(e,t){if(u.isBuffer(t)){var i=0|y(t.length);return e=l(e,i),0===e.length?e:(t.copy(e,0,0,i),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):v(e,t);if("Buffer"===t.type&&a(t.data))return v(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),u.alloc(+e)}function _(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Z(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function T(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return N(this,t,i);case"utf8":case"utf-8":return L(this,t,i);case"ascii":return R(this,t,i);case"latin1":case"binary":return M(this,t,i);case"base64":return j(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function S(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function w(e,t,i,n,r){if(0===e.length)return-1;if("string"===typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:E(e,t,i,n,r);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):E(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function E(e,t,i,n,r){var a,s=1,o=e.length,l=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var c=-1;for(a=i;a<o;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*s}else-1!==c&&(a-=a-c),c=-1}else for(i+l>o&&(i=o-l),a=i;a>=0;a--){for(var h=!0,d=0;d<l;d++)if(u(e,a+d)!==u(t,d)){h=!1;break}if(h)return a}return-1}function k(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n),n>r&&(n=r)):n=r;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;s<n;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[i+s]=o}return s}function C(e,t,i,n){return ee(K(t,e.length-i),e,i,n)}function x(e,t,i,n){return ee(Q(t),e,i,n)}function A(e,t,i,n){return x(e,t,i,n)}function I(e,t,i,n){return ee(Z(t),e,i,n)}function O(e,t,i,n){return ee(J(t,e.length-i),e,i,n)}function j(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function L(e,t,i){i=Math.min(e.length,i);var n=[],r=t;while(r<i){var a,s,o,l,u=e[r],c=null,h=u>239?4:u>223?3:u>191?2:1;if(r+h<=i)switch(h){case 1:u<128&&(c=u);break;case 2:a=e[r+1],128===(192&a)&&(l=(31&u)<<6|63&a,l>127&&(c=l));break;case 3:a=e[r+1],s=e[r+2],128===(192&a)&&128===(192&s)&&(l=(15&u)<<12|(63&a)<<6|63&s,l>2047&&(l<55296||l>57343)&&(c=l));break;case 4:a=e[r+1],s=e[r+2],o=e[r+3],128===(192&a)&&128===(192&s)&&128===(192&o)&&(l=(15&u)<<18|(63&a)<<12|(63&s)<<6|63&o,l>65535&&l<1114112&&(c=l))}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=h}return D(n)}t.Buffer=u,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,i){return c(null,e,t,i)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,i){return d(null,e,t,i)},u.allocUnsafe=function(e){return p(null,e)},u.allocUnsafeSlow=function(e){return p(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,a=Math.min(i,n);r<a;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=u.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var s=e[i];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,r),r+=s.length}return n},u.byteLength=_,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)S(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?L(this,0,e):T.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,i,n,r){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,r>>>=0,this===e)return 0;for(var a=r-n,s=i-t,o=Math.min(a,s),l=this.slice(n,r),c=e.slice(t,i),h=0;h<o;++h)if(l[h]!==c[h]){a=l[h],s=c[h];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},u.prototype.indexOf=function(e,t,i){return w(this,e,t,i,!0)},u.prototype.lastIndexOf=function(e,t,i){return w(this,e,t,i,!1)},u.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"===typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return k(this,e,t,i);case"utf8":case"utf-8":return C(this,e,t,i);case"ascii":return x(this,e,t,i);case"latin1":case"binary":return A(this,e,t,i);case"base64":return I(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function D(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var i="",n=0;while(n<t)i+=String.fromCharCode.apply(String,e.slice(n,n+=P));return i}function R(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function M(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function N(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",a=t;a<i;++a)r+=Y(e[a]);return r}function B(e,t,i){for(var n=e.slice(t,i),r="",a=0;a<n.length;a+=2)r+=String.fromCharCode(n[a]+256*n[a+1]);return r}function U(e,t,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,i,n,r,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function V(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-i,2);r<a;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function H(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-i,4);r<a;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function q(e,t,i,n,r,a){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function z(e,t,i,n,a){return a||q(e,t,i,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,i,n,23,4),i+4}function G(e,t,i,n,a){return a||q(e,t,i,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,i,n,52,8),i+8}u.prototype.slice=function(e,t){var i,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=u.prototype;else{var r=t-e;i=new u(r,void 0);for(var a=0;a<r;++a)i[a]=this[a+e]}return i},u.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||U(e,t,this.length);var n=this[e],r=1,a=0;while(++a<t&&(r*=256))n+=this[e+a]*r;return n},u.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||U(e,t,this.length);var n=this[e+--t],r=1;while(t>0&&(r*=256))n+=this[e+--t]*r;return n},u.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||U(e,t,this.length);var n=this[e],r=1,a=0;while(++a<t&&(r*=256))n+=this[e+a]*r;return r*=128,n>=r&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||U(e,t,this.length);var n=t,r=1,a=this[e+--n];while(n>0&&(r*=256))a+=this[e+--n]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),r.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),r.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),r.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),r.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,i,n){if(e=+e,t|=0,i|=0,!n){var r=Math.pow(2,8*i)-1;F(this,e,t,i,r,0)}var a=1,s=0;this[t]=255&e;while(++s<i&&(a*=256))this[t+s]=e/a&255;return t+i},u.prototype.writeUIntBE=function(e,t,i,n){if(e=+e,t|=0,i|=0,!n){var r=Math.pow(2,8*i)-1;F(this,e,t,i,r,0)}var a=i-1,s=1;this[t+a]=255&e;while(--a>=0&&(s*=256))this[t+a]=e/s&255;return t+i},u.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):H(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);F(this,e,t,i,r-1,-r)}var a=0,s=1,o=0;this[t]=255&e;while(++a<i&&(s*=256))e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+i},u.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);F(this,e,t,i,r-1,-r)}var a=i-1,s=1,o=0;this[t+a]=255&e;while(--a>=0&&(s*=256))e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+i},u.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):H(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,i){return z(this,e,t,!0,i)},u.prototype.writeFloatBE=function(e,t,i){return z(this,e,t,!1,i)},u.prototype.writeDoubleLE=function(e,t,i){return G(this,e,t,!0,i)},u.prototype.writeDoubleBE=function(e,t,i){return G(this,e,t,!1,i)},u.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r,a=n-i;if(this===e&&i<t&&t<n)for(r=a-1;r>=0;--r)e[r+t]=this[r+i];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},u.prototype.fill=function(e,t,i,n){if("string"===typeof e){if("string"===typeof t?(n=t,t=0,i=this.length):"string"===typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(a=t;a<i;++a)this[a]=e;else{var s=u.isBuffer(e)?e:K(new u(e,n).toString()),o=s.length;for(a=0;a<i-t;++a)this[a+t]=s[a%o]}return this};var W=/[^+\/0-9A-Za-z-_]/g;function $(e){if(e=X(e).replace(W,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function X(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){var i;t=t||1/0;for(var n=e.length,r=null,a=[],s=0;s<n;++s){if(i=e.charCodeAt(s),i>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function Q(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function J(e,t){for(var i,n,r,a=[],s=0;s<e.length;++s){if((t-=2)<0)break;i=e.charCodeAt(s),n=i>>8,r=i%256,a.push(r),a.push(n)}return a}function Z(e){return n.toByteArray($(e))}function ee(e,t,i,n){for(var r=0;r<n;++r){if(r+i>=t.length||r>=e.length)break;t[r+i]=e[r]}return r}function te(e){return e!==e}}).call(this,i("c8ba"))},b658:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("1b5c"),a=i("de2e"),s=n(a);t["default"]={decrypt:r.decrypt,Decrypter:r.Decrypter,AsyncStream:s["default"]},e.exports=t["default"]},b6ac:function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.video_flv_h5[data-v-6e6da03a]{width:100%;height:100%}.video_flv_h5 .video_h5[data-v-6e6da03a]{width:100%;height:100%}',""]),e.exports=t},b8a5:function(e,t,i){"use strict";i.d(t,"g",(function(){return l})),i.d(t,"e",(function(){return u})),i.d(t,"k",(function(){return h})),i.d(t,"j",(function(){return d})),i.d(t,"i",(function(){return p})),i.d(t,"b",(function(){return m})),i.d(t,"f",(function(){return g})),i.d(t,"c",(function(){return y})),i.d(t,"h",(function(){return b})),i.d(t,"d",(function(){return _})),i.d(t,"a",(function(){return T}));var n=i("be09"),r=i.n(n),a=function(e,t){var i="";while(t--)i+=e;return i},s=function(e){return e.toString(2).length},o=function(e){return Math.ceil(s(e)/8)},l=function(e,t,i){return void 0===i&&(i=" "),(a(i,t)+e.toString()).slice(-t)},u=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},c=function(e){return u(e)},h=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||c(e)||e instanceof ArrayBuffer||(e="number"!==typeof e||"number"===typeof e&&e!==e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},d=function(e){e=h(e);for(var t="",i=0;i<e.length;i++)t+=l(e[i].toString(16),2,"0");return t},p=function(e){e=h(e);for(var t="",i=0;i<e.length;i++)t+=l(e[i].toString(2),8,"0");return t},f=r.a.BigInt||Number,v=[f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000")],m=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var i=void 0===t?{}:t,n=i.signed,r=void 0!==n&&n,a=i.le,s=void 0!==a&&a;e=h(e);var o=s?"reduce":"reduceRight",l=e[o]?e[o]:Array.prototype[o],u=l.call(e,(function(t,i,n){var r=s?n:Math.abs(n+1-e.length);return t+f(i)*v[r]}),f(0));if(r){var c=v[e.length]/f(2)-f(1);u=f(u),u>c&&(u-=c,u-=c,u-=f(2))}return Number(u)}),g=function(e,t){var i=void 0===t?{}:t,n=i.le,r=void 0!==n&&n;("bigint"!==typeof e&&"number"!==typeof e||"number"===typeof e&&e!==e)&&(e=0),e=f(e);for(var a=o(e),s=new Uint8Array(new ArrayBuffer(a)),l=0;l<a;l++){var u=r?l:Math.abs(l+1-s.length);s[u]=Number(e/v[l]&f(255)),e<0&&(s[u]=Math.abs(~s[u]),s[u]-=0===l?1:2)}return s},y=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,h(e));try{return decodeURIComponent(escape(t))}catch(i){}return t},b=function(e,t){if("string"!==typeof e&&e&&"function"===typeof e.toString&&(e=e.toString()),"string"!==typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},_=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!==typeof e})),t.length<=1)return h(t[0]);var n=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(n),a=0;return t.forEach((function(e){e=h(e),r.set(e,a),a+=e.byteLength})),r},T=function(e,t,i){var n=void 0===i?{}:i,r=n.offset,a=void 0===r?0:r,s=n.mask,o=void 0===s?[]:s;e=h(e),t=h(t);var l=t.every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&l.call(t,(function(t,i){var n=o[i]?o[i]&e[a+i]:e[a+i];return t===n}))}},ba2d:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("be09"),a=n(r),s=i("12c6"),o=n(s),l=function(e){Object.defineProperties(e.frame,{id:{get:function(){return o["default"].log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return o["default"].log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return o["default"].log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})},u=function(e){var t=void 0;return t=isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e,t},c=function(e,t,i){var n=a["default"].WebKitDataCue||a["default"].VTTCue;t&&t.forEach((function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new n(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))}),e),i&&function(){var t=u(e.mediaSource_.duration);i.forEach((function(e){var t=e.cueTime+this.timestampOffset;e.frames.forEach((function(e){var i=new n(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,l(i),this.metadataTrack_.addCue(i)}),this)}),e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length&&function(){for(var i=e.metadataTrack_.cues,n=[],r=0;r<i.length;r++)i[r]&&n.push(i[r]);var a=n.reduce((function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),s=Object.keys(a).sort((function(e,t){return Number(e)-Number(t)}));s.forEach((function(e,i){var n=a[e],r=Number(s[i+1])||t;n.forEach((function(e){e.endTime=r}))}))}()}()};t["default"]={addTextTrackData:c,durationOfVideo:u},e.exports=t["default"]},bc52:function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.myvideo[data-v-16e50696]{height:100%;width:100%}.myvideo uni-video[data-v-16e50696]{height:100%;width:100%}',""]),e.exports=t},be09:function(e,t,i){(function(t){var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=i}).call(this,i("c8ba"))},be8c:function(e,t,i){"use strict";i.r(t);var n=i("849d"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},bec7:function(e,t,i){var n=i("be09"),r=e.exports={WebVTT:i("4e4e"),VTTCue:i("ea3c"),VTTRegion:i("2fdb")};n.vttjs=r,n.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=a,n.VTTRegion=s},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},c35d:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-subsection",style:[e.subsectionStyle]},[e._l(e.listInfo,(function(t,n){return i("v-uni-view",{key:n,staticClass:"u-item u-line-1",class:[e.noBorderRight(n),"u-item-"+n],style:[e.itemStyle(n)],on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.click(n)}}},[i("v-uni-view",{staticClass:"u-item-text u-line-1",style:[e.textStyle(n)]},[e._v(e._s(t.name))])],1)})),i("v-uni-view",{staticClass:"u-item-bg",style:[e.itemBarStyle]})],2)},a=[]},c795:function(e,t,i){"use strict";var n=i("ddac"),r=u(n),a=i("59a0"),s=u(a),o=i("466b"),l=u(o);function u(e){return e&&e.__esModule?e:{default:e}}e.exports={LineStream:r["default"],ParseStream:s["default"],Parser:l["default"]}},c7ca:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("2806"),u=a(l),c=i("dc3e"),h=i("d61a"),d=i("e475"),p=a(d),f=[{name:"VOD",run:function(e,t,i,n,r){if(i!==1/0){var a={time:0,segmentIndex:0};return a}return null}},{name:"ProgramDateTime",run:function(e,t,i,n,r){if(e.datetimeToDisplayTime&&t.dateTimeObject){var a=t.dateTimeObject.getTime()/1e3,s=a+e.datetimeToDisplayTime,o={time:s,segmentIndex:0};return o}return null}},{name:"Segment",run:function(e,t,i,n,r){var a=t.segments||[],s=null,o=null;r=r||0;for(var l=0;l<a.length;l++){var u=a[l];if(u.timeline===n&&"undefined"!==typeof u.start){var c=Math.abs(r-u.start);if(null!==o&&o<c)break;(!s||null===o||o>=c)&&(o=c,s={time:u.start,segmentIndex:l})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],u=t.discontinuitySequence+o+1,c=e.discontinuities[u];if(c){var h=Math.abs(r-c.time);if(null!==s&&s<h)break;(!a||null===s||s>=h)&&(s=h,a={time:c.time,segmentIndex:l})}}return a}},{name:"Playlist",run:function(e,t,i,n,r){if(t.syncInfo){var a={time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence};return a}return null}}];t.syncPointStrategies=f;var v=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.inspectCache_=void 0,this.timelines=[],this.discontinuities=[],this.datetimeToDisplayTime=null,e.debug&&(this.logger_=p["default"].log.bind(p["default"],"sync-controller ->"))}return o(t,e),n(t,[{key:"getSyncPoint",value:function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+(0,h.sumDurations)(e,n.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,i,n){for(var r=[],a=0;a<f.length;a++){var s=f[a],o=s.run(this,e,t,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}),this.logger_("syncPoint found via <"+s.name+">:",o))}return r}},{key:"selectSyncPoint_",value:function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<n&&(n=s,i=e[a].syncPoint,r=e[a].strategy)}return this.logger_("syncPoint with strategy <"+r+"> chosen: ",i),i}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var i=t.mediaSequence-e.mediaSequence,n=i-1;n>=0;n--){var r=e.segments[n];if(r&&"undefined"!==typeof r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist sync:",t.syncInfo),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.dateTimeObject){var t=e.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,i=e.playlist,n=void 0;return n=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e),n&&this.calculateSegmentTimeMapping_(e,n)&&(this.saveDiscontinuitySyncInfo_(e),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:t.start})),n}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,i=u["default"].timescale(t.map.bytes),n=u["default"].startTime(i,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=n),{start:n,end:n+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=(0,c.inspect)(e.bytes,this.inspectCache_),i=void 0,n=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,n=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,n=t.audio[1].dtsTime),{start:i,end:n,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var i=e.segment,n=this.timelines[e.timeline];if(null!==e.timestampOffset)this.logger_("tsO:",e.timestampOffset),n={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=n,this.trigger("timestampoffset"),i.start=e.startOfSegment,i.end=t.end+n.mapping;else{if(!n)return!1;i.start=t.start+n.mapping,i.end=t.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts.length)for(var n=0;n<t.discontinuityStarts.length;n++){var r=t.discontinuityStarts[n],a=t.discontinuitySequence+n+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var l=void 0;l=s<0?i.start-(0,h.sumDurations)(t,e.mediaIndex,r):i.end+(0,h.sumDurations)(t,e.mediaIndex+1,r),this.discontinuities[a]={time:l,accuracy:o}}}}},{key:"logger_",value:function(){}}]),t}(p["default"].EventTarget);t["default"]=v},d02c:function(e,t,i){var n=i("ef34"),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function s(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=r(null)}function l(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if("string"===typeof r[a]){var s=r[a].split(i);if(2===s.length){var o=s[0].trim(),l=s[1].trim();t(o,l)}}}function u(e,t,i){var n=e;function r(){var t=s(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(e,t){var n=new o;l(e,(function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];n.integer(e,s),n.percent(e,s)&&n.set("snapToLines",!1),n.alt(e,s,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),n.percent(e,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"]);break}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(r){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(r){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(r){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=r(),c(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),c(),t.endTime=r(),c(),u(e,t)}a.prototype=r(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100))&&(this.set(e,t),!0)}};var c=n.createElement&&n.createElement("textarea"),h={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function v(e,t){function i(){if(!t)return null;function e(e){return t=t.substr(e.length),e}var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function n(e){return c.innerHTML=e,e=c.textContent,c.textContent="",e}function r(e,t){return!f[t.localName]||f[t.localName]===e.localName}function a(t,i){var n=h[t];if(!n)return null;var r=e.document.createElement(n),a=p[t];return a&&i&&(r[a]=i.trim()),r}var o,l=e.document.createElement("div"),u=l,v=[];while(null!==(o=i()))if("<"!==o[0])u.appendChild(e.document.createTextNode(n(o)));else{if("/"===o[1]){v.length&&v[v.length-1]===o.substr(2).replace(">","")&&(v.pop(),u=u.parentNode);continue}var m,g=s(o.substr(1,o.length-2));if(g){m=e.document.createProcessingInstruction("timestamp",g),u.appendChild(m);continue}var y=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(m=a(y[1],y[3]),!m)continue;if(!r(u,m))continue;if(y[2]){var b=y[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(d.hasOwnProperty(i)){var n=t?"background-color":"color",r=d[i];m.style[n]=r}})),m.className=b.join(" ")}v.push(y[1]),u.appendChild(m),u=m}return l}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function g(e){for(var t=0;t<m.length;t++){var i=m[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function y(e){var t,i=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?(e.length=0,n[0]):i}return"ruby"===t.tagName?a(e):t.childNodes?(r(e,t),a(e)):void 0}r(i,e);while(n=a(i))for(var s=0;s<n.length;s++)if(t=n.charCodeAt(s),g(t))return"rtl";return"ltr"}function b(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}function _(){}function T(e,t,i){_.call(this),this.cue=t,this.cueDiv=v(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":case"line-left":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":case"line-right":r=t.position-t.size;break}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function S(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,i,n){function r(e,t){for(var r,a=new S(e),s=1,o=0;o<t.length;o++){while(e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n))e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);s>l&&(r=new S(e),s=l),e=new S(a)}return r||a}var a=new S(t),s=t.cue,o=b(s),l=[];if(s.snapToLines){var u;switch(s.vertical){case"":l=["+y","-y"],u="height";break;case"rl":l=["+x","-x"],u="width";break;case"lr":l=["-x","+x"],u="width";break}var c=a.lineHeight,h=c*Math.round(o),d=i[u]+c,p=l[0];Math.abs(h)>d&&(h=h<0?-1:1,h*=Math.ceil(d/c)*c),o<0&&(h+=""===s.vertical?i.height:i.width,l=l.reverse()),a.move(p,h)}else{var f=a.lineHeight/i.height*100;switch(s.lineAlign){case"center":o-=f/2;break;case"end":o-=f;break}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],a=new S(t)}var v=r(a,l);t.move(v.toCSSCompatValues(i))}function E(){}_.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},T.prototype=r(_.prototype),T.prototype.constructor=T,S.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t;break}},S.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},S.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},S.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},S.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},S.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),n=t*i;return n/(this.height*this.width)},S.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},S.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var r={left:e.left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i};return r},E.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},E.convertCueToDOMTree=function(e,t){return e&&t?v(e,t):null};var k=.05,C="sans-serif",x="1.5%";E.processCues=function(e,t,i){if(!e||!t||!i)return null;while(i.firstChild)i.removeChild(i.firstChild);var n=e.document.createElement("div");function r(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin=x,i.appendChild(n),r(t)){var a=[],s=S.getSimpleBoxPosition(n),o=Math.round(s.height*k*100)/100,l={font:o+"px "+C};(function(){for(var i,r,o=0;o<t.length;o++)r=t[o],i=new T(e,r,l),n.appendChild(i.div),w(e,i,s,a),r.displayState=i.div,a.push(S.getSimpleBoxPosition(i))})()}else for(var u=0;u<t.length;u++)n.appendChild(t[u].displayState)},E.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},E.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){var e=t.buffer,i=0;while(i<e.length&&"\r"!==e[i]&&"\n"!==e[i])++i;var n=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),n}function n(e){var i=new o;if(l(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var r=new o;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(e+"X",r.get("x")),i.set(e+"Y",r.get("y"));break;case"scroll":i.alt(e,t,["up"]);break}}),/=/,/\s/),i.has("id")){var n=new(t.vttjs.VTTRegion||t.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),t.onregion&&t.onregion(n),t.regionList.push({id:i.get("id"),region:n})}}function r(e){var i=new o;l(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",s(t));break}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}function c(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,t){switch(e){case"X-TIMESTAMP-MAP":r(t);break}}),/=/):l(e,(function(e,t){switch(e){case"Region":n(t);break}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var h;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;h=i();var d=h.match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new a(a.Errors.BadSignature);t.state="HEADER"}var p=!1;while(t.buffer){if(!/\r\n|\n/.test(t.buffer))return this;switch(p?p=!1:h=i(),t.state){case"HEADER":/:/.test(h)?c(h):h||(t.state="ID");continue;case"NOTE":h||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(h)){t.state="NOTE";break}if(!h)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(v){t.cue.align="middle"}if(t.state="CUE",-1===h.indexOf("--\x3e")){t.cue.id=h;continue}case"CUE":try{u(h,t.cue,t.regionList)}catch(v){t.reportOrThrowError(v),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var f=-1!==h.indexOf("--\x3e");if(!h||f&&(p=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=h.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":h||(t.state="ID");continue}}}catch(v){t.reportOrThrowError(v),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=E},d081:function(e,t,i){"use strict";i.r(t);var n=i("dd1d"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=r.a},d0ff:function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=o(i("4053")),r=o(i("a9e0")),a=o(i("dde1")),s=o(i("10eb"));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){return(0,n.default)(e)||(0,r.default)(e)||(0,a.default)(e)||(0,s.default)()}},d136:function(e,t,i){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),t=t.trim(),!t){if(!i.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=n.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,h=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(h)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=i.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){e=e.split("").reverse().join("").replace(r,"");while(e.length!==(e=e.replace(a,"")).length);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=s})()},d3ae:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)if(i.push(s.value),t&&i.length===t)break}catch(l){r=!0,a=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw a}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function r(e){return e&&e.__esModule?e:{default:e}}var a=i("e475"),s=r(a),o=1/30,l=3*o,u=function(e,t){var i=n(t,2),r=i[0],a=i[1];return Math.min(Math.max(r,e),a)},c=function(e,t){var i=[],n=void 0;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return s["default"].createTimeRanges(i)},h=function(e,t){return c(e,(function(e,i){return e-o<=t&&i+o>=t}))},d=function(e,t){return c(e,(function(e){return e-o>=t}))},p=function(e){if(e.length<2)return s["default"].createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return s["default"].createTimeRanges(t)},f=function(e,t){var i=void 0,n=void 0,r=void 0,a=[],s=[],o=function(e){return e[0]<=r&&e[1]>=r};if(e)for(i=0;i<e.length;i++)n=e.start(i),r=e.end(i),s.push([n,r]);if(t)for(i=0;i<t.length;i++)n=t.start(i),r=t.end(i),s.some(o)||a.push(r);return 1!==a.length?null:a[0]},v=function(e,t){var i=null,n=null,r=0,a=[],o=[];if(!e||!e.length||!t||!t.length)return s["default"].createTimeRange();var l=e.length;while(l--)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});l=t.length;while(l--)a.push({time:t.start(l),type:"start"}),a.push({time:t.end(l),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),l=0;l<a.length;l++)"start"===a[l].type?(r++,2===r&&(i=a[l].time)):"end"===a[l].type&&(r--,1===r&&(n=a[l].time)),null!==i&&null!==n&&(o.push([i,n]),i=null,n=null);return s["default"].createTimeRanges(o)},m=function(e,t,i,n){var r=t.end(0)-t.start(0),a=e.end(0)-e.start(0),s=r-a,o=v(e,n),l=v(t,n),u=0,c=0,h=o.length;while(h--)u+=o.end(h)-o.start(h),o.start(h)===i&&(u+=s);h=l.length;while(h--)c+=l.end(h)-l.start(h);return Math.max(u,c)/r*100},g=function(e,t,i,n){var r=e+t,a=s["default"].createTimeRanges([[e,r]]),o=s["default"].createTimeRanges([[u(e,[i,r]),r]]);if(o.start(0)===o.end(0))return 0;var l=m(o,a,i,n);return isNaN(l)||l===1/0||l===-1/0?0:l},y=function(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},b=function(e,t){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2],n=e.length?e.end(e.length-1):0;return(n-t)/i};t["default"]={findRange:h,findNextRange:d,findGaps:p,findSoleUncommonTimeRangesEnd:f,getSegmentBufferedPercent:g,TIME_FUDGE_FACTOR:o,SAFE_TIME_DELTA:l,printableRange:y,timeUntilRebuffer:b},e.exports=t["default"]},d3b0:function(e,t,i){"use strict";i.r(t);var n=i("7b0c"),r=i("7205");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("6506");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"16e50696",null,!1,n["a"],s);t["default"]=l.exports},d61a:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i("e475"),a=i("be09"),s=n(a),o=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if("undefined"!==typeof r.start)return{result:r.start,precise:!0};if("undefined"!==typeof r.end)return{result:r.end-r.duration,precise:!0}}while(n--){if(r=e.segments[n],"undefined"!==typeof r.end)return{result:i+r.end,precise:!0};if(i+=r.duration,"undefined"!==typeof r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}},l=function(e,t){for(var i=0,n=void 0,r=t-e.mediaSequence;r<e.segments.length;r++){if(n=e.segments[r],"undefined"!==typeof n.start)return{result:n.start-i,precise:!0};if(i+=n.duration,"undefined"!==typeof n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}},u=function(e,t,i){var n=void 0,r=void 0;return"undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(n=o(e,t),n.precise?n.result:(r=l(e,t),r.precise?r.result:n.result+i))},c=function(e,t,i){if(!e)return 0;if("number"!==typeof i&&(i=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return s["default"].Infinity}return u(e,t,i)};t.duration=c;var h=function(e,t,i){var n=0;if(t>i){var r=[i,t];t=r[0],i=r[1]}if(t<0){for(var a=t;a<Math.min(0,i);a++)n+=e.targetDuration;t=0}for(a=t;a<i;a++)n+=e.segments[a].duration;return n};t.sumDurations=h;var d=function(e){if(!e.segments.length)return 0;var t=e.segments.length-1,i=e.segments[t].duration||e.targetDuration,n=i+2*e.targetDuration;while(t--)if(i+=e.segments[t].duration,i>=n)break;return Math.max(0,t)};t.safeLiveIndex=d;var p=function(e,t,i){if(!e||!e.segments)return null;if(e.endList)return c(e);if(null===t)return null;t=t||0;var n=i?d(e):e.segments.length;return u(e,e.mediaSequence+n,t)};t.playlistEnd=p;var f=function(e,t){var i=!0,n=t||0,a=p(e,t,i);return null===a?(0,r.createTimeRange)():(0,r.createTimeRange)(n,a)};t.seekable=f;var v=function(e){return e-Math.floor(e)===0},m=function(e,t){if(v(t))return t+.1*e;for(var i=t.toString().split(".")[1].length,n=1;n<=i;n++){var r=Math.pow(10,n),a=t*r;if(v(a)||n===i)return(a+e)/r}},g=m.bind(null,1),y=m.bind(null,-1),b=function(e,t,i,n){var r=void 0,a=void 0,s=e.segments.length,o=t-n;if(o<0){if(i>0)for(r=i-1;r>=0;r--)if(a=e.segments[r],o+=y(a.duration),o>0)return{mediaIndex:r,startTime:n-h(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if(o-=e.targetDuration,o<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;r<s;r++)if(a=e.segments[r],o-=g(a.duration),o<0)return{mediaIndex:r,startTime:n+h(e,i,r)};return{mediaIndex:s-1,startTime:t}};t.getMediaInfoForTime=b;var _=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()};t.isBlacklisted=_;var T=function(e){return e.excludeUntil&&e.excludeUntil===1/0};t.isIncompatible=T;var S=function(e){var t=_(e);return!e.disabled&&!t};t.isEnabled=S;var w=function(e){return e.disabled};t.isDisabled=w;var E=function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1};t.isAes=E;var k=function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1};t.isFmp4=k;var C=function(e,t){return t.attributes&&t.attributes[e]};t.hasAttribute=C;var x=function(e,t,i){var n=arguments.length<=3||void 0===arguments[3]?0:arguments[3];if(!C("BANDWIDTH",i))return NaN;var r=e*i.attributes.BANDWIDTH;return(r-8*n)/t};t.estimateSegmentRequestTime=x;var A=function(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!S(e)&&(e.attributes.BANDWIDTH||0)<i})).length};t.isLowestEnabledRendition=A,t["default"]={duration:c,seekable:f,safeLiveIndex:d,getMediaInfoForTime:b,isEnabled:S,isDisabled:w,isBlacklisted:_,isIncompatible:T,playlistEnd:p,isAes:E,isFmp4:k,hasAttribute:C,estimateSegmentRequestTime:x,isLowestEnabledRendition:A}},d7ba:function(e,t,i){"use strict";var n;n=function(e,t){var i,r=0,a=16384,s=function(e,t){var i,n=e.position+t;n<e.bytes.byteLength||(i=new Uint8Array(2*n),i.set(e.bytes.subarray(0,e.position),0),e.bytes=i,e.view=new DataView(e.bytes.buffer))},o=n.widthBytes||new Uint8Array("width".length),l=n.heightBytes||new Uint8Array("height".length),u=n.videocodecidBytes||new Uint8Array("videocodecid".length);if(!n.widthBytes){for(i=0;i<"width".length;i++)o[i]="width".charCodeAt(i);for(i=0;i<"height".length;i++)l[i]="height".charCodeAt(i);for(i=0;i<"videocodecid".length;i++)u[i]="videocodecid".charCodeAt(i);n.widthBytes=o,n.heightBytes=l,n.videocodecidBytes=u}switch(this.keyFrame=!1,e){case n.VIDEO_TAG:this.length=16,a*=6;break;case n.AUDIO_TAG:this.length=13,this.keyFrame=!0;break;case n.METADATA_TAG:this.length=29,this.keyFrame=!0;break;default:throw new Error("Unknown FLV tag type")}this.bytes=new Uint8Array(a),this.view=new DataView(this.bytes.buffer),this.bytes[0]=e,this.position=this.length,this.keyFrame=t,this.pts=0,this.dts=0,this.writeBytes=function(e,t,i){var n,r=t||0;i=i||e.byteLength,n=r+i,s(this,i),this.bytes.set(e.subarray(r,n),this.position),this.position+=i,this.length=Math.max(this.length,this.position)},this.writeByte=function(e){s(this,1),this.bytes[this.position]=e,this.position++,this.length=Math.max(this.length,this.position)},this.writeShort=function(e){s(this,2),this.view.setUint16(this.position,e),this.position+=2,this.length=Math.max(this.length,this.position)},this.negIndex=function(e){return this.bytes[this.length-e]},this.nalUnitSize=function(){return 0===r?0:this.length-(r+4)},this.startNalUnit=function(){if(r>0)throw new Error("Attempted to create new NAL wihout closing the old one");r=this.length,this.length+=4,this.position=this.length},this.endNalUnit=function(e){var t,i;this.length===r+4?this.length-=4:r>0&&(t=r+4,i=this.length-t,this.position=r,this.view.setUint32(this.position,i),this.position=this.length,e&&e.push(this.bytes.subarray(t,t+i))),r=0},this.writeMetaDataDouble=function(e,t){var i;if(s(this,2+e.length+9),this.view.setUint16(this.position,e.length),this.position+=2,"width"===e)this.bytes.set(o,this.position),this.position+=5;else if("height"===e)this.bytes.set(l,this.position),this.position+=6;else if("videocodecid"===e)this.bytes.set(u,this.position),this.position+=12;else for(i=0;i<e.length;i++)this.bytes[this.position]=e.charCodeAt(i),this.position++;this.position++,this.view.setFloat64(this.position,t),this.position+=8,this.length=Math.max(this.length,this.position),++r},this.writeMetaDataBoolean=function(e,t){var i;for(s(this,2),this.view.setUint16(this.position,e.length),this.position+=2,i=0;i<e.length;i++)s(this,1),this.bytes[this.position]=e.charCodeAt(i),this.position++;s(this,2),this.view.setUint8(this.position,1),this.position++,this.view.setUint8(this.position,t?1:0),this.position++,this.length=Math.max(this.length,this.position),++r},this.finalize=function(){var e,i;switch(this.bytes[0]){case n.VIDEO_TAG:this.bytes[11]=7|(this.keyFrame||t?16:32),this.bytes[12]=t?0:1,e=this.pts-this.dts,this.bytes[13]=(16711680&e)>>>16,this.bytes[14]=(65280&e)>>>8,this.bytes[15]=(255&e)>>>0;break;case n.AUDIO_TAG:this.bytes[11]=175,this.bytes[12]=t?0:1;break;case n.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,r),this.position=this.length,this.bytes.set([0,0,9],this.position),this.position+=3,this.length=this.position;break}return i=this.length-11,this.bytes[1]=(16711680&i)>>>16,this.bytes[2]=(65280&i)>>>8,this.bytes[3]=(255&i)>>>0,this.bytes[4]=(16711680&this.dts)>>>16,this.bytes[5]=(65280&this.dts)>>>8,this.bytes[6]=(255&this.dts)>>>0,this.bytes[7]=(4278190080&this.dts)>>>24,this.bytes[8]=0,this.bytes[9]=0,this.bytes[10]=0,s(this,4),this.view.setUint32(this.length,this.length),this.length+=4,this.position+=4,this.bytes=this.bytes.subarray(0,this.length),this.frameTime=n.frameTime(this.bytes),this}},n.AUDIO_TAG=8,n.VIDEO_TAG=9,n.METADATA_TAG=18,n.isAudioFrame=function(e){return n.AUDIO_TAG===e[0]},n.isVideoFrame=function(e){return n.VIDEO_TAG===e[0]},n.isMetaData=function(e){return n.METADATA_TAG===e[0]},n.isKeyFrame=function(e){return n.isVideoFrame(e)?23===e[11]:!!n.isAudioFrame(e)||!!n.isMetaData(e)},n.frameTime=function(e){var t=e[4]<<16;return t|=e[5]<<8,t|=e[6]<<0,t|=e[7]<<24,t},e.exports=n},d9ad:function(e,t,i){"use strict";i.r(t);var n=i("78f4"),r=i("0158");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("4ea1c");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"4ed92bb2",null,!1,n["a"],s);t["default"]=l.exports},db19:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),r=i("a559"),a=i.n(r),s=i("095a");
/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */
class o extends n{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const l=String.fromCharCode(9),u=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},c=function(){const e="[^=]*",t='"[^"]*"|[^,]*',i="(?:"+e+")=(?:"+t+")";return new RegExp("(?:^|,)("+i+")")},h=function(e){const t={};if(!e)return t;const i=e.split(c());let n,r=i.length;while(r--)""!==i[r]&&(n=/([^=]*)=(.*)/.exec(i[r]).slice(1),n[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),t[n[0]]=n[1]);return t};class d extends n{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(e=e.trim(),0===e.length)return;if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});const n=this.tagMappers.reduce((t,i)=>{const n=i(e);return n===e?t:t.concat([n])},[e]);n.forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void this.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=a()(u(t[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:"tag",tagType:"map"},t[1]){const e=h(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=u(e.BYTERANGE))}this.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=h(t[1]),i.attributes.RESOLUTION){const e=i.attributes.RESOLUTION.split("x"),t={};e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),i.attributes.RESOLUTION=t}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=h(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=h(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=h(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-IN:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"skip"},i.attributes=h(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(l)),void this.trigger("data",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part"},i.attributes=h(t[1]),["DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=u(i.attributes.BYTERANGE)),void this.trigger("data",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"server-control"},i.attributes=h(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part-inf"},i.attributes=h(t[1]),["PART-TARGET"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"preload-hint"},i.attributes=h(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger("data",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"rendition-report"},i.attributes=h(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger("data",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:"tag",tagType:"daterange"},i.attributes=h(t[1]),["ID","CLASS"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),["START-DATE","END-DATE"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),["DURATION","PLANNED-DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["END-ON-NEXT"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const n=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),r=/^\d+(\.\d+)?$/.test(i.attributes[t]);i.attributes[t]=n?i.attributes[t].toString(16):r?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger("data",i)}else t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t?this.trigger("data",{type:"tag",tagType:"independent-segments"}):this.trigger("data",{type:"tag",data:e.slice(4)})}}}else this.trigger("data",{type:"comment",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:n}){"function"!==typeof i&&(i=e=>e),this.customParsers.push(r=>{const a=e.exec(r);if(a)return this.trigger("data",{type:"custom",data:i(r),customType:t,segment:n}),!0})}addTagMapper({expression:e,map:t}){const i=i=>e.test(i)?t(i):i;this.tagMappers.push(i)}}const p=e=>e.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),f=function(e){const t={};return Object.keys(e).forEach((function(i){t[p(i)]=e[i]})),t},v=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:n}=e;if(!t)return;const r="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=i&&3*i,l=n&&2*n;i&&!t.hasOwnProperty(a)&&(t[a]=o,this.trigger("info",{message:`${r} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[a]<o&&(this.trigger("warn",{message:`${r} clamping HOLD-BACK (${t[a]}) to targetDuration * 3 (${o})`}),t[a]=o),n&&!t.hasOwnProperty(s)&&(t[s]=3*n,this.trigger("info",{message:`${r} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[s]}).`})),n&&t[s]<l&&(this.trigger("warn",{message:`${r} clamping PART-HOLD-BACK (${t[s]}) to partTargetDuration * 2 (${l}).`}),t[s]=l)};class m extends n{constructor(){super(),this.lineStream=new o,this.parseStream=new d,this.lineStream.pipe(this.parseStream);const e=this,t=[];let i,n,r={},l=!1;const u=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let p=0;this.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};let m=0,g=0;const y={};this.on("end",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&i&&(r.map=i),!r.key&&n&&(r.key=n),r.timeline||"number"!==typeof p||(r.timeline=p),this.manifest.preloadSegment=r)}),this.parseStream.on("data",(function(o){let d,b;({tag(){({version(){o.version&&(this.manifest.version=o.version)},"allow-cache"(){this.manifest.allowCache=o.allowed,"allowed"in o||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const e={};"length"in o&&(r.byterange=e,e.length=o.length,"offset"in o||(o.offset=m)),"offset"in o&&(r.byterange=e,e.offset=o.offset),m=e.offset+e.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),o.duration>0&&(r.duration=o.duration),0===o.duration&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=t},key(){if(o.attributes)if("NONE"!==o.attributes.METHOD)if(o.attributes.URI){if("com.apple.streamingkeydelivery"===o.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:o.attributes});if("com.microsoft.playready"===o.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:o.attributes.URI});if(o.attributes.KEYFORMAT===h){const e=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];return-1===e.indexOf(o.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===o.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==o.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):o.attributes.KEYID&&"0x"===o.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:o.attributes.KEYFORMAT,keyId:o.attributes.KEYID.substring(2)},pssh:Object(s["a"])(o.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}o.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:o.attributes.METHOD||"AES-128",uri:o.attributes.URI},"undefined"!==typeof o.attributes.IV&&(n.iv=o.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(o.number)?this.manifest.mediaSequence=o.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+o.number})},"discontinuity-sequence"(){isFinite(o.number)?(this.manifest.discontinuitySequence=o.number,p=o.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+o.number})},"playlist-type"(){/VOD|EVENT/.test(o.playlistType)?this.manifest.playlistType=o.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+o.playlist})},map(){i={},o.uri&&(i.uri=o.uri),o.byterange&&(i.byterange=o.byterange),n&&(i.key=n)},"stream-inf"(){this.manifest.playlists=t,this.manifest.mediaGroups=this.manifest.mediaGroups||c,o.attributes?(r.attributes||(r.attributes={}),a()(r.attributes,o.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,!(o.attributes&&o.attributes.TYPE&&o.attributes["GROUP-ID"]&&o.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const e=this.manifest.mediaGroups[o.attributes.TYPE];e[o.attributes["GROUP-ID"]]=e[o.attributes["GROUP-ID"]]||{},d=e[o.attributes["GROUP-ID"]],b={default:/yes/i.test(o.attributes.DEFAULT)},b.default?b.autoselect=!0:b.autoselect=/yes/i.test(o.attributes.AUTOSELECT),o.attributes.LANGUAGE&&(b.language=o.attributes.LANGUAGE),o.attributes.URI&&(b.uri=o.attributes.URI),o.attributes["INSTREAM-ID"]&&(b.instreamId=o.attributes["INSTREAM-ID"]),o.attributes.CHARACTERISTICS&&(b.characteristics=o.attributes.CHARACTERISTICS),o.attributes.FORCED&&(b.forced=/yes/i.test(o.attributes.FORCED)),d[o.attributes.NAME]=b},discontinuity(){p+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(t.length)},"program-date-time"(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=o.dateTimeString,this.manifest.dateTimeObject=o.dateTimeObject),r.dateTimeString=o.dateTimeString,r.dateTimeObject=o.dateTimeObject},targetduration(){!isFinite(o.duration)||o.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+o.duration}):(this.manifest.targetDuration=o.duration,v.call(this,this.manifest))},start(){o.attributes&&!isNaN(o.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:o.attributes["TIME-OFFSET"],precise:o.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){r.cueOut=o.data},"cue-out-cont"(){r.cueOutCont=o.data},"cue-in"(){r.cueIn=o.data},skip(){this.manifest.skip=f(o.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",o.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const e=this.manifest.segments.length,t=f(o.attributes);r.parts=r.parts||[],r.parts.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=g),g=t.byterange.offset+t.byterange.length);const i=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${i} for segment #${e}`,o.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},"server-control"(){const e=this.manifest.serverControl=f(o.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),v.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const e=this.manifest.segments.length,t=f(o.attributes),i=t.type&&"PART"===t.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=i?g:0,i&&(g=t.byterange.offset+t.byterange.length)));const n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${e}`,o.attributes,["TYPE","URI"]),t.type)for(let a=0;a<r.preloadHints.length-1;a++){const i=r.preloadHints[a];i.type&&(i.type===t.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${e} has the same TYPE ${t.type} as preload hint #${a}`}))}},"rendition-report"(){const e=f(o.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(e);const t=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];l&&i.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+t,o.attributes,i)},"part-inf"(){this.manifest.partInf=f(o.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",o.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),v.call(this,this.manifest)},daterange(){this.manifest.daterange=this.manifest.daterange||[],this.manifest.daterange.push(f(o.attributes));const e=this.manifest.daterange.length-1;this.warnOnMissingAttributes_("#EXT-X-DATERANGE #"+e,o.attributes,["ID","START-DATE"]);const t=this.manifest.daterange[e];t.endDate&&t.startDate&&new Date(t.endDate)<new Date(t.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),t.duration&&t.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),t.plannedDuration&&t.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const i=!!t.endOnNext;if(i&&!t.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),i&&(t.duration||t.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),t.duration&&t.endDate){const i=t.startDate,n=i.setSeconds(i.getSeconds()+t.duration);this.manifest.daterange[e].endDate=new Date(n)}if(t&&!this.manifest.dateTimeString&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),y[t.id]){for(const n in y[t.id])if(y[t.id][n]!==t[n]){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values"});break}}else y[t.id]=t},"independent-segments"(){this.manifest.independentSegments=!0}}[o.tagType]||u).call(e)},uri(){r.uri=o.uri,t.push(r),this.manifest.targetDuration&&!("duration"in r)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=p,i&&(r.map=i),g=0,r={}},comment(){},custom(){o.segment?(r.custom=r.custom||{},r.custom[o.customType]=o.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[o.customType]=o.data)}})[o.type].call(e)}))}warnOnMissingAttributes_(e,t,i){const n=[];i.forEach((function(e){t.hasOwnProperty(e)||n.push(e)})),n.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${n.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push("\n"),this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}},dc3e:function(e,t,i){"use strict";var n=i("ae75"),r=i("256f").handleRollover,a={};a.ts=i("423e"),a.aac=i("9946");var s=9e4,o=188,l=71,u=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},c=function(e,t){var i,n,r=0,s=o;while(s<e.byteLength)if(e[r]!==l||e[s]!==l)r++,s++;else{switch(i=e.subarray(r,s),n=a.ts.parseType(i,t.pid),n){case"pat":t.pid||(t.pid=a.ts.parsePat(i));break;case"pmt":t.table||(t.table=a.ts.parsePmt(i));break;default:break}if(t.pid&&t.table)return;r+=o,s+=o}},h=function(e,t,i){var n,r,s,u,c,h=0,d=o,p=!1;while(d<e.byteLength)if(e[h]!==l||e[d]!==l)h++,d++;else{switch(n=e.subarray(h,d),r=a.ts.parseType(n,t.pid),r){case"pes":s=a.ts.parsePesType(n,t.table),u=a.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&u&&(c=a.ts.parsePesTime(n),c&&(c.type="audio",i.audio.push(c),p=!0));break;default:break}if(p)break;h+=o,d+=o}d=e.byteLength,h=d-o,p=!1;while(h>=0)if(e[h]!==l||e[d]!==l)h--,d--;else{switch(n=e.subarray(h,d),r=a.ts.parseType(n,t.pid),r){case"pes":s=a.ts.parsePesType(n,t.table),u=a.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&u&&(c=a.ts.parsePesTime(n),c&&(c.type="audio",i.audio.push(c),p=!0));break;default:break}if(p)break;h-=o,d-=o}},d=function(e,t,i){var n,r,s,u,c,h,d,p,f=0,v=o,m=!1,g={data:[],size:0};while(v<e.byteLength)if(e[f]!==l||e[v]!==l)f++,v++;else{switch(n=e.subarray(f,v),r=a.ts.parseType(n,t.pid),r){case"pes":if(s=a.ts.parsePesType(n,t.table),u=a.ts.parsePayloadUnitStartIndicator(n),"video"===s&&(u&&!m&&(c=a.ts.parsePesTime(n),c&&(c.type="video",i.video.push(c),m=!0)),!i.firstKeyFrame)){if(u&&0!==g.size){h=new Uint8Array(g.size),d=0;while(g.data.length)p=g.data.shift(),h.set(p,d),d+=p.byteLength;a.ts.videoPacketContainsKeyFrame(h)&&(i.firstKeyFrame=a.ts.parsePesTime(h),i.firstKeyFrame.type="video"),g.size=0}g.data.push(n),g.size+=n.byteLength}break;default:break}if(m&&i.firstKeyFrame)break;f+=o,v+=o}v=e.byteLength,f=v-o,m=!1;while(f>=0)if(e[f]!==l||e[v]!==l)f--,v--;else{switch(n=e.subarray(f,v),r=a.ts.parseType(n,t.pid),r){case"pes":s=a.ts.parsePesType(n,t.table),u=a.ts.parsePayloadUnitStartIndicator(n),"video"===s&&u&&(c=a.ts.parsePesTime(n),c&&(c.type="video",i.video.push(c),m=!0));break;default:break}if(m)break;f-=o,v-=o}},p=function(e,t){if(e.audio&&e.audio.length){var i=t;"undefined"===typeof i&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=r(e.dts,i),e.pts=r(e.pts,i),e.dtsTime=e.dts/s,e.ptsTime=e.pts/s}))}if(e.video&&e.video.length){var n=t;if("undefined"===typeof n&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=r(e.dts,n),e.pts=r(e.pts,n),e.dtsTime=e.dts/s,e.ptsTime=e.pts/s})),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=r(a.dts,n),a.pts=r(a.pts,n),a.dtsTime=a.dts/s,a.ptsTime=a.dts/s}}},f=function(e){var t,i=!1,n=0,r=null,o=null,l=0,u=0;while(e.length-u>=3){var c=a.aac.parseType(e,u);switch(c){case"timed-metadata":if(e.length-u<10){i=!0;break}if(l=a.aac.parseId3TagSize(e,u),l>e.length){i=!0;break}null===o&&(t=e.subarray(u,u+l),o=a.aac.parseAacTimestamp(t)),u+=l;break;case"audio":if(e.length-u<7){i=!0;break}if(l=a.aac.parseAdtsSize(e,u),l>e.length){i=!0;break}null===r&&(t=e.subarray(u,u+l),r=a.aac.parseSampleRate(t)),n++,u+=l;break;default:u++;break}if(i)return null}if(null===r||null===o)return null;var h=s/r,d={audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*n*h,pts:o+1024*n*h}]};return d},v=function(e){var t={pid:null,table:null},i={};for(var r in c(e,t),t.table)if(t.table.hasOwnProperty(r)){var a=t.table[r];switch(a){case n.H264_STREAM_TYPE:i.video=[],d(e,t,i),0===i.video.length&&delete i.video;break;case n.ADTS_STREAM_TYPE:i.audio=[],h(e,t,i),0===i.audio.length&&delete i.audio;break;default:break}}return i},m=function(e,t){var i,n=u(e);return i=n?f(e):v(e),i&&(i.audio||i.video)?(p(i,t),i):null};e.exports={inspect:m}},dd1d:function(e,t,i){"use strict";i("7a82");var n=i("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("0122"));i("a9e3"),i("d81d"),i("99af"),i("ac1f");t.default={name:"u-subsection",props:{list:{type:Array,default:function(){return[]}},current:{type:[Number,String],default:0},activeColor:{type:String,default:"#303133"},inactiveColor:{type:String,default:"#606266"},mode:{type:String,default:"button"},fontSize:{type:[Number,String],default:28},animation:{type:Boolean,default:!0},height:{type:[Number,String],default:70},bold:{type:Boolean,default:!0},bgColor:{type:String,default:"#eeeeef"},buttonColor:{type:String,default:"#ffffff"},vibrateShort:{type:Boolean,default:!1}},data:function(){return{listInfo:[],itemBgStyle:{width:0,left:0,backgroundColor:"#ffffff",height:"100%",transition:""},currentIndex:this.current,buttonPadding:3,borderRadius:5,firstTimeVibrateShort:!0}},watch:{current:{immediate:!0,handler:function(e){this.currentIndex=e,this.changeSectionStatus(e)}}},created:function(){this.listInfo=this.list.map((function(e,t){if("object"!=(0,r.default)(e)){var i={width:0,name:e};return i}return e.width=0,e}))},computed:{noBorderRight:function(){var e=this;return function(t){if("subsection"==e.mode){var i="";return t<e.list.length-1&&(i+=" u-none-border-right"),0==t&&(i+=" u-item-first"),t==e.list.length-1&&(i+=" u-item-last"),i}}},textStyle:function(){var e=this;return function(t){var i={};return"subsection"==e.mode?t==e.currentIndex?i.color="#ffffff":i.color=e.activeColor:t==e.currentIndex?i.color=e.activeColor:i.color=e.inactiveColor,t==e.currentIndex&&e.bold&&(i.fontWeight="bold"),i.fontSize=e.fontSize+"rpx",i}},itemStyle:function(){var e=this;return function(t){var i={};return"subsection"==e.mode&&(i.borderColor=e.activeColor,i.borderWidth="1px",i.borderStyle="solid"),i}},subsectionStyle:function(){var e={};return e.height=uni.upx2px(this.height)+"px","button"==this.mode&&(e.backgroundColor=this.bgColor,e.padding="".concat(this.buttonPadding,"px"),e.borderRadius="".concat(this.borderRadius,"px")),e},itemBarStyle:function(){var e={};return e.backgroundColor=this.activeColor,e.zIndex=1,"button"==this.mode&&(e.backgroundColor=this.buttonColor,e.borderRadius="".concat(this.borderRadius,"px"),e.bottom="".concat(this.buttonPadding,"px"),e.height=uni.upx2px(this.height)-2*this.buttonPadding+"px",e.zIndex=0),Object.assign(this.itemBgStyle,e)}},mounted:function(){var e=this;setTimeout((function(){e.getTabsInfo()}),10)},methods:{changeSectionStatus:function(e){var t=this;"subsection"==this.mode&&(e==this.list.length-1&&(this.itemBgStyle.borderRadius="0 ".concat(this.buttonPadding,"px ").concat(this.buttonPadding,"px 0")),0==e&&(this.itemBgStyle.borderRadius="".concat(this.buttonPadding,"px 0 0 ").concat(this.buttonPadding,"px")),e>0&&e<this.list.length-1&&(this.itemBgStyle.borderRadius="0")),setTimeout((function(){t.itemBgLeft()}),10),this.vibrateShort&&this.firstTimeVibrateShort,this.firstTimeVibrateShort=!1},click:function(e){e!=this.currentIndex&&(this.currentIndex=e,this.changeSectionStatus(e),this.$emit("change",Number(e)))},getTabsInfo:function(){for(var e=this,t=uni.createSelectorQuery().in(this),i=0;i<this.list.length;i++)t.select(".u-item-"+i).boundingClientRect();t.exec((function(t){t.length||setTimeout((function(){e.getTabsInfo()}),10),t.map((function(t,i){e.listInfo[i].width=t.width})),("subsection"==e.mode||"button"==e.mode)&&(e.itemBgStyle.width=e.listInfo[0].width+"px"),e.itemBgLeft()}))},itemBgLeft:function(){var e=this;this.animation?this.itemBgStyle.transition="all 0.35s":this.itemBgStyle.transition="all 0s";var t=0;this.listInfo.map((function(i,n){n<e.currentIndex&&(t+=i.width)})),"subsection"==this.mode?this.itemBgStyle.left=t+"px":"button"==this.mode&&(this.itemBgStyle.left=t+this.buttonPadding+"px")}}}},ddac:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=i("fc85"),a=s(r);function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){o(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.buffer="",e}return u(t,e),n(t,[{key:"push",value:function(e){var t=void 0;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}]),t}(a["default"]);t["default"]=c},de2e:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("e9b0"),u=a(l),c=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,u["default"]),this.jobs=[],this.delay=1,this.timeout_=null}return o(t,e),n(t,[{key:"processJob_",value:function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}},{key:"push",value:function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},df33:function(e,t){function i(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"===typeof e)return s[e];var i=String(e),a=n[i.toLowerCase()];if(a)return a;a=r[i.toLowerCase()];return a||(1===i.length?i.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&"object"===typeof e){var i=e.which||e.keyCode||e.charCode;if(null===i||void 0===i)return!1;if("string"===typeof t){var a=n[t.toLowerCase()];if(a)return a===i;a=r[t.toLowerCase()];if(a)return a===i}else if("number"===typeof t)return t===i;return!1}},t=e.exports=i;var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
/*!
* Programatically add the following
*/
for(a=97;a<123;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)n[a-48]=a;for(a=1;a<13;a++)n["f"+a]=a+111;for(a=0;a<10;a++)n["numpad "+a]=a+96;var s=t.names=t.title={};for(a in n)s[n[a]]=a;for(var o in r)n[o]=r[o]},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function n(e){"string"!==typeof e&&(e+="");var t,i=0,n=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){i=t+1;break}}else-1===n&&(r=!1,n=t+1);return-1===n?"":e.slice(i,n)}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],n=0;n<e.length;n++)t(e[n],n,e)&&i.push(e[n]);return i}t.resolve=function(){for(var t="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return t=i(r(t.split("/"),(function(e){return!!e})),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===a(e,-1);return e=i(r(e.split("/"),(function(e){return!!e})),!n).join("/"),e||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function n(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var i=e.length-1;i>=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var r=n(e.split("/")),a=n(i.split("/")),s=Math.min(r.length,a.length),o=s,l=0;l<s;l++)if(r[l]!==a[l]){o=l;break}var u=[];for(l=o;l<r.length;l++)u.push("..");return u=u.concat(a.slice(o)),u.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,n=-1,r=!0,a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),47===t){if(!r){n=a;break}}else r=!1;return-1===n?i?"/":".":i&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var i=n(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,n=-1,r=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===n&&(r=!1,n=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){i=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===i+1?"":e.slice(t,n)};var a="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e003:function(e,t,i){var n=i("89a7").NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+r.source+a.source+"*(?::"+r.source+a.source+"*)?$"),o=0,l=1,u=2,c=3,h=4,d=5,p=6,f=7;function v(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,v)}function m(){}function g(e,t,i,r,a){function s(e){if(e>65535){e-=65536;var t=55296+(e>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?s(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function l(t){if(t>g){var i=e.substring(g,t).replace(/&#?\w+;/g,o);p&&u(g),r.characters(i,0,t-g),g=t}}function u(t,i){while(t>=h&&(i=d.exec(e)))c=i.index,h=c+i[0].length,p.lineNumber++;p.columnNumber=t-c+1}var c=0,h=0,d=/.*(?:\r\n?|\n)|.*$/g,p=r.locator,f=[{currentNSMap:t}],m={},g=0;while(1){try{var w=e.indexOf("<",g);if(w<0){if(!e.substr(g).match(/^\s*$/)){var x=r.doc,A=x.createTextNode(e.substr(g));x.appendChild(A),r.currentElement=A}return}switch(w>g&&l(w),e.charAt(w+1)){case"/":var I=e.indexOf(">",w+3),O=e.substring(w+2,I).replace(/[ \t\n\r]+$/g,""),j=f.pop();I<0?(O=e.substring(w+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+j.tagName),I=w+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),a.error("end tag name: "+O+" maybe not complete"),I=w+1+O.length);var L=j.localNSMap,P=j.tagName==O,D=P||j.tagName&&j.tagName.toLowerCase()==O.toLowerCase();if(D){if(r.endElement(j.uri,j.localName,O),L)for(var R in L)Object.prototype.hasOwnProperty.call(L,R)&&r.endPrefixMapping(R);P||a.fatalError("end tag name: "+O+" is not match the current start tagName:"+j.tagName)}else f.push(j);I++;break;case"?":p&&u(w),I=k(e,w,r);break;case"!":p&&u(w),I=E(e,w,r,a);break;default:p&&u(w);var M=new C,N=f[f.length-1].currentNSMap,B=(I=b(e,w,M,N,o,a),M.length);if(!M.closed&&S(e,I,M.tagName,m)&&(M.closed=!0,i.nbsp||a.warning("unclosed xml attribute")),p&&B){for(var U=y(p,{}),F=0;F<B;F++){var V=M[F];u(V.offset),V.locator=y(p,{})}r.locator=U,_(M,r,N)&&f.push(M),r.locator=p}else _(M,r,N)&&f.push(M);n.isHTML(M.uri)&&!M.closed?I=T(e,I,M.tagName,o,r):I++}}catch(H){if(H instanceof v)throw H;a.error("element parse error: "+H),I=-1}I>g?g=I:l(Math.max(w,g)+1)}}function y(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function b(e,t,i,r,a,s){function v(e,t,n){i.attributeNames.hasOwnProperty(e)&&s.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),n)}var m,g=++t,y=o;while(1){var b=e.charAt(g);switch(b){case"=":if(y===l)m=e.slice(t,g),y=c;else{if(y!==u)throw new Error("attribute equal must after attrName");y=c}break;case"'":case'"':if(y===c||y===l){if(y===l&&(s.warning('attribute value must after "="'),m=e.slice(t,g)),t=g+1,g=e.indexOf(b,t),!(g>0))throw new Error("attribute value no end '"+b+"' match");_=e.slice(t,g),v(m,_,t-1),y=d}else{if(y!=h)throw new Error('attribute value must after "="');_=e.slice(t,g),v(m,_,t),s.warning('attribute "'+m+'" missed start quot('+b+")!!"),t=g+1,y=d}break;case"/":switch(y){case o:i.setTagName(e.slice(t,g));case d:case p:case f:y=f,i.closed=!0;case h:case l:break;case u:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),y==o&&i.setTagName(e.slice(t,g)),g;case">":switch(y){case o:i.setTagName(e.slice(t,g));case d:case p:case f:break;case h:case l:_=e.slice(t,g),"/"===_.slice(-1)&&(i.closed=!0,_=_.slice(0,-1));case u:y===u&&(_=m),y==h?(s.warning('attribute "'+_+'" missed quot(")!'),v(m,_,t)):(n.isHTML(r[""])&&_.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+_+'" missed value!! "'+_+'" instead!!'),v(_,_,t));break;case c:throw new Error("attribute value missed!!")}return g;case"€":b=" ";default:if(b<=" ")switch(y){case o:i.setTagName(e.slice(t,g)),y=p;break;case l:m=e.slice(t,g),y=u;break;case h:var _=e.slice(t,g);s.warning('attribute "'+_+'" missed quot(")!!'),v(m,_,t);case d:y=p;break}else switch(y){case u:i.tagName;n.isHTML(r[""])&&m.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+m+'" missed value!! "'+m+'" instead2!!'),v(m,m,t),t=g,y=l;break;case d:s.warning('attribute space is required"'+m+'"!!');case p:y=l,t=g;break;case c:y=h,t=g;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}g++}}function _(e,t,i){var r=e.tagName,a=null,s=e.length;while(s--){var o=e[s],l=o.qName,u=o.value,c=l.indexOf(":");if(c>0)var h=o.prefix=l.slice(0,c),d=l.slice(c+1),p="xmlns"===h&&d;else d=l,h=null,p="xmlns"===l&&"";o.localName=d,!1!==p&&(null==a&&(a={},w(i,i={})),i[p]=a[p]=u,o.uri=n.XMLNS,t.startPrefixMapping(p,u))}s=e.length;while(s--){o=e[s];h=o.prefix;h&&("xml"===h&&(o.uri=n.XML),"xmlns"!==h&&(o.uri=i[h||""]))}c=r.indexOf(":");c>0?(h=e.prefix=r.slice(0,c),d=e.localName=r.slice(c+1)):(h=null,d=e.localName=r);var f=e.uri=i[h||""];if(t.startElement(f,d,r,e),!e.closed)return e.currentNSMap=i,e.localNSMap=a,!0;if(t.endElement(f,d,r),a)for(h in a)Object.prototype.hasOwnProperty.call(a,h)&&t.endPrefixMapping(h)}function T(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("</"+i+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(i)?(r.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,n),r.characters(s,0,s.length),a)}return t+1}function S(e,t,i,n){var r=n[i];return null==r&&(r=e.lastIndexOf("</"+i+">"),r<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function w(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function E(e,t,i,n){var r=e.charAt(t+2);switch(r){case"-":if("-"===e.charAt(t+3)){var a=e.indexOf("--\x3e",t+4);return a>t?(i.comment(e,t+4,a-t-4),a+3):(n.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){a=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,a-t-9),i.endCDATA(),a+3}var s=x(e,t),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var l=s[1][0],u=!1,c=!1;o>3&&(/^public$/i.test(s[2][0])?(u=s[3][0],c=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(c=s[3][0]));var h=s[o-1];return i.startDTD(l,u,c),i.endDTD(),h.index+h[0].length}}return-1}function k(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function C(){this.attributeNames={}}function x(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);while(i=r.exec(e))if(n.push(i),i[1])return n}v.prototype=new Error,v.prototype.name=v.name,m.prototype={parse:function(e,t,i){var n=this.domBuilder;n.startDocument(),w(t,t={}),g(e,t,i,n,this.errorHandler),n.endDocument()}},C.prototype={setTagName:function(e){if(!s.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!s.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=m,t.ParseError=v},e017:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"video_flv_h5"},[i("div",{ref:"myPlayer",staticClass:"video_h5"})])},a=[]},e044:function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=i("d61a"),a=function(e,t,i){return function(n){var a=e.master.playlists[t],s=(0,r.isIncompatible)(a),o=(0,r.isEnabled)(a);return"undefined"===typeof n?o:(n?delete a.disabled:a.disabled=!0,n===o||s||(i(),n?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),n)}},s=function e(t,i,r){n(this,e);var s=t.masterPlaylistController_.fastQualityChange_.bind(t.masterPlaylistController_);if(i.attributes.RESOLUTION){var o=i.attributes.RESOLUTION;this.width=o.width,this.height=o.height}this.bandwidth=i.attributes.BANDWIDTH,this.id=r,this.enabled=a(t.playlists,i.uri,s)},o=function(e){var t=e.playlists;e.representations=function(){return t.master.playlists.filter((function(e){return!(0,r.isIncompatible)(e)})).map((function(t,i){return new s(e,t,t.uri)}))}};t["default"]=o,e.exports=t["default"]},e1c8:function(e,t,i){var n=i("89a7"),r=n.find,a=n.NAMESPACE;function s(e){return""!==e}function o(e){return e?e.split(/[\t\n\f\r ]+/).filter(s):[]}function l(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function u(e){if(!e)return[];var t=o(e);return Object.keys(t.reduce(l,{}))}function c(e){return function(t){return e&&-1!==e.indexOf(t)}}function h(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function d(e,t){var i=e.prototype;if(!(i instanceof t)){function n(){}n.prototype=t.prototype,n=new n,h(i,n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var p={},f=p.ELEMENT_NODE=1,v=p.ATTRIBUTE_NODE=2,m=p.TEXT_NODE=3,g=p.CDATA_SECTION_NODE=4,y=p.ENTITY_REFERENCE_NODE=5,b=p.ENTITY_NODE=6,_=p.PROCESSING_INSTRUCTION_NODE=7,T=p.COMMENT_NODE=8,S=p.DOCUMENT_NODE=9,w=p.DOCUMENT_TYPE_NODE=10,E=p.DOCUMENT_FRAGMENT_NODE=11,k=p.NOTATION_NODE=12,C={},x={},A=(C.INDEX_SIZE_ERR=(x[1]="Index size error",1),C.DOMSTRING_SIZE_ERR=(x[2]="DOMString size error",2),C.HIERARCHY_REQUEST_ERR=(x[3]="Hierarchy request error",3)),I=(C.WRONG_DOCUMENT_ERR=(x[4]="Wrong document",4),C.INVALID_CHARACTER_ERR=(x[5]="Invalid character",5),C.NO_DATA_ALLOWED_ERR=(x[6]="No data allowed",6),C.NO_MODIFICATION_ALLOWED_ERR=(x[7]="No modification allowed",7),C.NOT_FOUND_ERR=(x[8]="Not found",8)),O=(C.NOT_SUPPORTED_ERR=(x[9]="Not supported",9),C.INUSE_ATTRIBUTE_ERR=(x[10]="Attribute in use",10));C.INVALID_STATE_ERR=(x[11]="Invalid state",11),C.SYNTAX_ERR=(x[12]="Syntax error",12),C.INVALID_MODIFICATION_ERR=(x[13]="Invalid modification",13),C.NAMESPACE_ERR=(x[14]="Invalid namespace",14),C.INVALID_ACCESS_ERR=(x[15]="Invalid access",15);function j(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,x[e]),this.message=x[e],Error.captureStackTrace&&Error.captureStackTrace(this,j);return i.code=e,t&&(this.message=this.message+": "+t),i}function L(){}function P(e,t){this._node=e,this._refresh=t,D(this)}function D(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(ke(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var n=i.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];h(i,e),e._inc=t}}function R(){}function M(e,t){var i=e.length;while(i--)if(e[i]===t)return i}function N(e,t,i,n){if(n?t[M(t,n)]=i:t[t.length++]=i,e){i.ownerElement=e;var r=e.ownerDocument;r&&(n&&G(r,e,n),z(r,e,i))}}function B(e,t,i){var n=M(t,i);if(!(n>=0))throw new j(I,new Error(e.tagName+"@"+i));var r=t.length-1;while(n<r)t[n]=t[++n];if(t.length=r,e){var a=e.ownerDocument;a&&(G(a,e,i),i.ownerElement=null)}}function U(){}function F(){}function V(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function H(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(H(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function z(e,t,i){e&&e._inc++;var n=i.namespaceURI;n===a.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}function G(e,t,i,n){e&&e._inc++;var r=i.namespaceURI;r===a.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function W(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{var r=t.firstChild,a=0;while(r)n[a++]=r,r=r.nextSibling;n.length=a,delete n[n.length]}}}function $(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,W(e.ownerDocument,e),t}function X(e){return e&&(e.nodeType===F.DOCUMENT_NODE||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.ELEMENT_NODE)}function Y(e){return e&&(Q(e)||J(e)||K(e)||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.COMMENT_NODE||e.nodeType===F.PROCESSING_INSTRUCTION_NODE)}function K(e){return e&&e.nodeType===F.DOCUMENT_TYPE_NODE}function Q(e){return e&&e.nodeType===F.ELEMENT_NODE}function J(e){return e&&e.nodeType===F.TEXT_NODE}function Z(e,t){var i=e.childNodes||[];if(r(i,Q)||K(t))return!1;var n=r(i,K);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function ee(e,t){var i=e.childNodes||[];function n(e){return Q(e)&&e!==t}if(r(i,n))return!1;var a=r(i,K);return!(t&&a&&i.indexOf(a)>i.indexOf(t))}function te(e,t,i){if(!X(e))throw new j(A,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new j(I,"child not in parent");if(!Y(t)||K(t)&&e.nodeType!==F.DOCUMENT_NODE)throw new j(A,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function ie(e,t,i){var n=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var s=a.filter(Q);if(s.length>1||r(a,J))throw new j(A,"More than one element or text in fragment");if(1===s.length&&!Z(e,i))throw new j(A,"Element in fragment can not be inserted before doctype")}if(Q(t)&&!Z(e,i))throw new j(A,"Only one element can be added and only after doctype");if(K(t)){if(r(n,K))throw new j(A,"Only one doctype is allowed");var o=r(n,Q);if(i&&n.indexOf(o)<n.indexOf(i))throw new j(A,"Doctype can only be inserted before an element");if(!i&&o)throw new j(A,"Doctype can not be appended since element is present")}}function ne(e,t,i){var n=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var s=a.filter(Q);if(s.length>1||r(a,J))throw new j(A,"More than one element or text in fragment");if(1===s.length&&!ee(e,i))throw new j(A,"Element in fragment can not be inserted before doctype")}if(Q(t)&&!ee(e,i))throw new j(A,"Only one element can be added and only after doctype");if(K(t)){function o(e){return K(e)&&e!==i}if(r(n,o))throw new j(A,"Only one doctype is allowed");var l=r(n,Q);if(i&&n.indexOf(l)<n.indexOf(i))throw new j(A,"Doctype can only be inserted before an element")}}function re(e,t,i,n){te(e,t,i),e.nodeType===F.DOCUMENT_NODE&&(n||ie)(e,t,i);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===E){var a=t.firstChild;if(null==a)return t;var s=t.lastChild}else a=s=t;var o=i?i.previousSibling:e.lastChild;a.previousSibling=o,s.nextSibling=i,o?o.nextSibling=a:e.firstChild=a,null==i?e.lastChild=s:i.previousSibling=s;do{a.parentNode=e}while(a!==s&&(a=a.nextSibling));return W(e.ownerDocument||e,e),t.nodeType==E&&(t.firstChild=t.lastChild=null),t}function ae(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,W(e.ownerDocument,e,t),t}function se(){this._nsMap={}}function oe(){}function le(){}function ue(){}function ce(){}function he(){}function de(){}function pe(){}function fe(){}function ve(){}function me(){}function ge(){}function ye(){}function be(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,a=n.namespaceURI;if(a&&null==r){r=n.lookupPrefix(a);if(null==r)var s=[{namespace:a,prefix:null}]}return Se(this,i,e,t,s),i.join("")}function _e(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===n&&r===a.XML||r===a.XMLNS)return!1;var s=i.length;while(s--){var o=i[s];if(o.prefix===n)return o.namespace!==r}return!0}function Te(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,V),'"')}function Se(e,t,i,n,r){if(r||(r=[]),n){if(e=n(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case f:var s=e.attributes,o=s.length,l=e.firstChild,u=e.tagName;i=a.isHTML(e.namespaceURI)||i;var c=u;if(!i&&!e.prefix&&e.namespaceURI){for(var h,d=0;d<s.length;d++)if("xmlns"===s.item(d).name){h=s.item(d).value;break}if(!h)for(var p=r.length-1;p>=0;p--){var b=r[p];if(""===b.prefix&&b.namespace===e.namespaceURI){h=b.namespace;break}}if(h!==e.namespaceURI)for(p=r.length-1;p>=0;p--){b=r[p];if(b.namespace===e.namespaceURI){b.prefix&&(c=b.prefix+":"+u);break}}}t.push("<",c);for(var k=0;k<o;k++){var C=s.item(k);"xmlns"==C.prefix?r.push({prefix:C.localName,namespace:C.value}):"xmlns"==C.nodeName&&r.push({prefix:"",namespace:C.value})}for(k=0;k<o;k++){C=s.item(k);if(_e(C,i,r)){var x=C.prefix||"",A=C.namespaceURI;Te(t,x?"xmlns:"+x:"xmlns",A),r.push({prefix:x,namespace:A})}Se(C,t,i,n,r)}if(u===c&&_e(e,i,r)){x=e.prefix||"",A=e.namespaceURI;Te(t,x?"xmlns:"+x:"xmlns",A),r.push({prefix:x,namespace:A})}if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),i&&/^script$/i.test(u))while(l)l.data?t.push(l.data):Se(l,t,i,n,r.slice()),l=l.nextSibling;else while(l)Se(l,t,i,n,r.slice()),l=l.nextSibling;t.push("</",c,">")}else t.push("/>");return;case S:case E:l=e.firstChild;while(l)Se(l,t,i,n,r.slice()),l=l.nextSibling;return;case v:return Te(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,V));case g:return t.push("<![CDATA[",e.data,"]]>");case T:return t.push("\x3c!--",e.data,"--\x3e");case w:var I=e.publicId,O=e.systemId;if(t.push("<!DOCTYPE ",e.name),I)t.push(" PUBLIC ",I),O&&"."!=O&&t.push(" ",O),t.push(">");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var j=e.internalSubset;j&&t.push(" [",j,"]"),t.push(">")}return;case _:return t.push("<?",e.target," ",e.data,"?>");case y:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function we(e,t,i){var n;switch(t.nodeType){case f:n=t.cloneNode(!1),n.ownerDocument=e;case E:break;case v:i=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i){var r=t.firstChild;while(r)n.appendChild(we(e,r,i)),r=r.nextSibling}return n}function Ee(e,t,i){var n=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=t[r];"object"!=typeof a&&a!=n[r]&&(n[r]=a)}switch(t.childNodes&&(n.childNodes=new L),n.ownerDocument=e,n.nodeType){case f:var s=t.attributes,o=n.attributes=new R,l=s.length;o._ownerElement=n;for(var u=0;u<l;u++)n.setAttributeNode(Ee(e,s.item(u),!0));break;case v:i=!0}if(i){var c=t.firstChild;while(c)n.appendChild(Ee(e,c,i)),c=c.nextSibling}return n}function ke(e,t,i){e[t]=i}j.prototype=Error.prototype,h(C,j),L.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)Se(this[n],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},P.prototype.item=function(e){return D(this),this[e]||null},d(P,L),R.prototype={length:0,item:L.prototype.item,getNamedItem:function(e){var t=this.length;while(t--){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new j(O);var i=this.getNamedItem(e.nodeName);return N(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new j(O);return t=this.getNamedItemNS(e.namespaceURI,e.localName),N(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return B(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return B(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){var i=this.length;while(i--){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},U.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var n=new q;if(n.implementation=this,n.childNodes=new L,n.doctype=i||null,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new de;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},F.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return re(this,e,t)},replaceChild:function(e,t){re(this,e,t,ne),t&&this.removeChild(t)},removeChild:function(e){return $(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Ee(this.ownerDocument||this,this,e)},normalize:function(){var e=this.firstChild;while(e){var t=e.nextSibling;t&&t.nodeType==m&&e.nodeType==m?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){var t=this;while(t){var i=t._nsMap;if(i)for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&i[n]===e)return n;t=t.nodeType==v?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){var t=this;while(t){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==v?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},h(p,F),h(p,F.prototype),q.prototype={nodeName:"#document",nodeType:S,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==E){var i=e.firstChild;while(i){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return re(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===f&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),$(this,e)},replaceChild:function(e,t){re(this,e,t,ne),e.ownerDocument=this,t&&this.removeChild(t),Q(e)&&(this.documentElement=e)},importNode:function(e,t){return we(this,e,t)},getElementById:function(e){var t=null;return H(this.documentElement,(function(i){if(i.nodeType==f&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=u(e);return new P(this,(function(i){var n=[];return t.length>0&&H(i.documentElement,(function(r){if(r!==i&&r.nodeType===f){var a=r.getAttribute("class");if(a){var s=e===a;if(!s){var o=u(a);s=t.every(c(o))}s&&n.push(r)}}})),n}))},createElement:function(e){var t=new se;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new L;var i=t.attributes=new R;return i._ownerElement=t,t},createDocumentFragment:function(){var e=new me;return e.ownerDocument=this,e.childNodes=new L,e},createTextNode:function(e){var t=new ue;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ce;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new he;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new ge;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new oe;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ve;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new se,n=t.split(":"),r=i.attributes=new R;return i.childNodes=new L,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i,i},createAttributeNS:function(e,t){var i=new oe,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},d(q,F),se.prototype={nodeType:f,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===E?this.insertBefore(e,null):ae(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,(function(t){var i=[];return H(t,(function(n){n===t||n.nodeType!=f||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new P(this,(function(i){var n=[];return H(i,(function(r){r===i||r.nodeType!==f||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},q.prototype.getElementsByTagName=se.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=se.prototype.getElementsByTagNameNS,d(se,F),oe.prototype.nodeType=v,d(oe,F),le.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(x[A])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){var n=this.data.substring(0,e),r=this.data.substring(e+t);i=n+i+r,this.nodeValue=this.data=i,this.length=i.length}},d(le,F),ue.prototype={nodeName:"#text",nodeType:m,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},d(ue,le),ce.prototype={nodeName:"#comment",nodeType:T},d(ce,le),he.prototype={nodeName:"#cdata-section",nodeType:g},d(he,le),de.prototype.nodeType=w,d(de,F),pe.prototype.nodeType=k,d(pe,F),fe.prototype.nodeType=b,d(fe,F),ve.prototype.nodeType=y,d(ve,F),me.prototype.nodeName="#document-fragment",me.prototype.nodeType=E,d(me,F),ge.prototype.nodeType=_,d(ge,F),ye.prototype.serializeToString=function(e,t,i){return be.call(e,t,i)},F.prototype.toString=be;try{if(Object.defineProperty){function Ce(e){switch(e.nodeType){case f:case E:var t=[];e=e.firstChild;while(e)7!==e.nodeType&&8!==e.nodeType&&t.push(Ce(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(P.prototype,"length",{get:function(){return D(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return Ce(this)},set:function(e){switch(this.nodeType){case f:case E:while(this.firstChild)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ke=function(e,t,i){e["$$"+t]=i}}}catch(xe){}t.DocumentType=de,t.DOMException=j,t.DOMImplementation=U,t.Element=se,t.Node=F,t.NodeList=L,t.XMLSerializer=ye},e206:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:32768};t["default"]=n,e.exports=t["default"]},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e475:function(e,t,i){
/**
* @license
* Video.js 6.13.0 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/master/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
*/
function n(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var r=n(i("a59e")),a=n(i("4d20")),s=n(i("1b8d")),o=n(i("8c10")),l=n(i("eec7")),u=n(i("8352")),c="6.13.0",h=r.navigator&&r.navigator.userAgent||"",d=/AppleWebKit\/([\d.]+)/i.exec(h),p=d?parseFloat(d.pop()):null,f=/iPad/i.test(h),v=/iPhone/i.test(h)&&!f,m=/iPod/i.test(h),g=v||f||m,y=function(){var e=h.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),b=/Android/i.test(h),_=function(){var e=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),T=b&&/webkit/i.test(h)&&_<2.3,S=b&&_<5&&p<537,w=/Firefox/i.test(h),E=/Edge/i.test(h),k=!E&&(/Chrome/i.test(h)||/CriOS/i.test(h)),C=function(){var e=h.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),x=/MSIE\s8\.0/.test(h),A=function(){var e=/MSIE\s(\d+)\.\d/.exec(h),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(t=11),t}(),I=/Safari/i.test(h)&&!k&&!b&&!E,O=(I||g)&&!k,j=ie()&&("ontouchstart"in r||r.navigator.maxTouchPoints||r.DocumentTouch&&r.document instanceof r.DocumentTouch),L=ie()&&"backgroundSize"in r.document.createElement("video").style,P=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:v,IS_IPOD:m,IS_IOS:g,IOS_VERSION:y,IS_ANDROID:b,ANDROID_VERSION:_,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:S,IS_FIREFOX:w,IS_EDGE:E,IS_CHROME:k,CHROME_VERSION:C,IS_IE8:x,IE_VERSION:A,IS_SAFARI:I,IS_ANY_SAFARI:O,TOUCH_ENABLED:j,BACKGROUND_SIZE_SUPPORTED:L}),D="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},M=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},N=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},B=function(e,t){return e.raw=t,e},U=Object.prototype.toString,F=function(e){return z(e)?Object.keys(e):[]};function V(e,t){F(e).forEach((function(i){return t(e[i],i)}))}function H(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return F(e).reduce((function(i,n){return t(i,e[n],n)}),i)}function q(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[e].concat(i)):(i.forEach((function(t){t&&V(t,(function(t,i){e[i]=t}))})),e)}function z(e){return!!e&&"object"===("undefined"===typeof e?"undefined":D(e))}function G(e){return z(e)&&"[object Object]"===U.call(e)&&e.constructor===Object}var W=[],$=function(e,t){return function(i,n,a,s){var o=t.levels[n],l=new RegExp("^("+o+")$");if("log"!==i&&a.unshift(i.toUpperCase()+":"),a.unshift(e+":"),W&&W.push([].concat(a)),r.console){var u=r.console[i];u||"debug"!==i||(u=r.console.info||r.console.log),u&&o&&l.test(i)&&(s&&(a=a.map((function(e){if(z(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)})).join(" ")),u.apply?u[Array.isArray(a)?"apply":"call"](r.console,a):u(a))}}};function X(e){var t="info",i=void 0,n=function e(){for(var n=e.stringify||A&&A<11,r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];i("log",t,a,n)};return i=$(e,n),n.createLogger=function(t){return X(e+": "+t)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t},n.level=function(e){if("string"===typeof e){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');t=e}return t},n.history=function(){return W?[].concat(W):[]},n.history.filter=function(e){return(W||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},n.history.clear=function(){W&&(W.length=0)},n.history.disable=function(){null!==W&&(W.length=0,W=null)},n.history.enable=function(){null===W&&(W=[])},n.error=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return i("error",t,n)},n.warn=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return i("warn",t,n)},n.debug=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return i("debug",t,n)},n}var Y=X("VIDEOJS"),K=Y.createLogger;function Q(e,t){if(!e||!t)return"";if("function"===typeof r.getComputedStyle){var i=r.getComputedStyle(e);return i?i[t]:""}return e.currentStyle[t]||""}var J=B(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);function Z(e){return"string"===typeof e&&/\S/.test(e)}function ee(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function te(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function ie(){return a===r.document&&"undefined"!==typeof a.createElement}function ne(e){return z(e)&&1===e.nodeType}function re(){try{return r.parent!==r.self}catch(e){return!0}}function ae(e){return function(t,i){if(!Z(t))return a[e](null);Z(i)&&(i=a.querySelector(i));var n=ne(i)?i:a;return n[e]&&n[e](t)}}function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],r=a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Y.warn(s(J,e,i)),r.setAttribute(e,i)):"textContent"===e?oe(r,i):r[e]=i})),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&Ce(r,n),r}function oe(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function le(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ue(e,t){return ee(t),e.classList?e.classList.contains(t):te(t).test(e.className)}function ce(e,t){return e.classList?e.classList.add(t):ue(e,t)||(e.className=(e.className+" "+t).trim()),e}function he(e,t){return e.classList?e.classList.remove(t):(ee(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function de(e,t,i){var n=ue(e,t);if("function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=!n),i!==n)return i?ce(e,t):he(e,t),e}function pe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i];null===n||"undefined"===typeof n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function fe(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var a=n[r].name,s=n[r].value;"boolean"!==typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function ve(e,t){return e.getAttribute(t)}function me(e,t,i){e.setAttribute(t,i)}function ge(e,t){e.removeAttribute(t)}function ye(){a.body.focus(),a.onselectstart=function(){return!1}}function be(){a.onselectstart=function(){return!0}}function _e(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(Q(e,"height"))),i.width||(i.width=parseFloat(Q(e,"width"))),i}}function Te(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=a.documentElement,n=a.body,s=i.clientLeft||n.clientLeft||0,o=r.pageXOffset||n.scrollLeft,l=t.left+o-s,u=i.clientTop||n.clientTop||0,c=r.pageYOffset||n.scrollTop,h=t.top+c-u;return{left:Math.round(l),top:Math.round(h)}}function Se(e,t){var i={},n=Te(e),r=e.offsetWidth,a=e.offsetHeight,s=n.top,o=n.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-l+a)/a)),i.x=Math.max(0,Math.min(1,(u-o)/r)),i}function we(e){return z(e)&&3===e.nodeType}function Ee(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function ke(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"===typeof e&&(e=e()),ne(e)||we(e)?e:"string"===typeof e&&/\S/.test(e)?a.createTextNode(e):void 0})).filter((function(e){return e}))}function Ce(e,t){return ke(t).forEach((function(t){return e.appendChild(t)})),e}function xe(e,t){return Ce(Ee(e),t)}function Ae(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(9===A||0===e.button&&1===e.buttons))}var Ie=ae("querySelector"),Oe=ae("querySelectorAll"),je=(Object.freeze||Object)({isReal:ie,isEl:ne,isInFrame:re,createEl:se,textContent:oe,prependTo:le,hasClass:ue,addClass:ce,removeClass:he,toggleClass:de,setAttributes:pe,getAttributes:fe,getAttribute:ve,setAttribute:me,removeAttribute:ge,blockTextSelection:ye,unblockTextSelection:be,getBoundingClientRect:_e,findPosition:Te,getPointerPosition:Se,isTextNode:we,emptyEl:Ee,normalizeContent:ke,appendContent:Ce,insertContent:xe,isSingleLeftClick:Ae,$:Ie,$$:Oe}),Le=1;function Pe(){return Le++}var De={},Re="vdata"+(new Date).getTime();function Me(e){var t=e[Re];return t||(t=e[Re]=Pe()),De[t]||(De[t]={}),De[t]}function Ne(e){var t=e[Re];return!!t&&!!Object.getOwnPropertyNames(De[t]).length}function Be(e){var t=e[Re];if(t){delete De[t];try{delete e[Re]}catch(i){e.removeAttribute?e.removeAttribute(Re):e[Re]=null}}}function Ue(e,t){var i=Me(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Be(e)}function Fe(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function Ve(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||r.event;for(var s in e={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(e[s]=n[s]));if(e.target||(e.target=e.srcElement||a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=a.documentElement,l=a.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var He=!1;(function(){try{var e=Object.defineProperty({},"passive",{get:function(){He=!0}});r.addEventListener("test",null,e),r.removeEventListener("test",null,e)}catch(t){}})();var qe=["touchstart","touchmove"];function ze(e,t,i){if(Array.isArray(t))return Fe(ze,e,t,i);var n=Me(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=Pe()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=Ve(t);var r=n.handlers[t.type];if(r)for(var a=r.slice(0),s=0,o=a.length;s<o;s++){if(t.isImmediatePropagationStopped())break;try{a[s].call(e,t,i)}catch(l){Y.error(l)}}}}),1===n.handlers[t].length)if(e.addEventListener){var r=!1;He&&qe.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function Ge(e,t,i){if(Ne(e)){var n=Me(e);if(n.handlers){if(Array.isArray(t))return Fe(Ge,e,t,i);var r=function(e,t){n.handlers[t]=[],Ue(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);Ue(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function We(e,t,i){var n=Ne(e)?Me(e):{},r=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Ve(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)We.call(null,r,t,i);else if(!r&&!t.defaultPrevented){var a=Me(t.target);t.target[t.type]&&(a.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function $e(e,t,i){if(Array.isArray(t))return Fe($e,e,t,i);var n=function n(){Ge(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||Pe(),ze(e,t,n)}var Xe=(Object.freeze||Object)({fixEvent:Ve,on:ze,off:Ge,trigger:We,one:$e}),Ye=!1,Ke=void 0,Qe=function(){if(ie()&&!1!==Ke.options.autoSetup){var e=a.getElementsByTagName("video"),t=a.getElementsByTagName("audio"),i=a.getElementsByTagName("video-js"),n=[];if(e&&e.length>0)for(var r=0,s=e.length;r<s;r++)n.push(e[r]);if(t&&t.length>0)for(var o=0,l=t.length;o<l;o++)n.push(t[o]);if(i&&i.length>0)for(var u=0,c=i.length;u<c;u++)n.push(i[u]);if(n&&n.length>0)for(var h=0,d=n.length;h<d;h++){var p=n[h];if(!p||!p.getAttribute){Je(1);break}if(void 0===p.player){var f=p.getAttribute("data-setup");null!==f&&Ke(p)}}else Ye||Je(1)}};function Je(e,t){t&&(Ke=t),r.setTimeout(Qe,e)}ie()&&"complete"===a.readyState?Ye=!0:$e(r,"load",(function(){Ye=!0}));var Ze=function(e){var t=a.createElement("style");return t.className=e,t},et=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},tt=function(e,t,i){t.guid||(t.guid=Pe());var n=function(){return t.apply(e,arguments)};return n.guid=i?i+"_"+t.guid:t.guid,n},it=function(e,t){var i=Date.now(),n=function(){var n=Date.now();n-i>=t&&(e.apply(void 0,arguments),i=n)};return n},nt=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r,a=void 0,s=function(){n.clearTimeout(a),a=null},o=function(){var r=this,s=arguments,o=function(){a=null,o=null,i||e.apply(r,s)};!a&&i&&e.apply(r,s),n.clearTimeout(a),a=n.setTimeout(o,t)};return o.cancel=s,o},rt=function(){};rt.prototype.allowedEvents_={},rt.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ze(this,e,t),this.addEventListener=i},rt.prototype.addEventListener=rt.prototype.on,rt.prototype.off=function(e,t){Ge(this,e,t)},rt.prototype.removeEventListener=rt.prototype.off,rt.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},$e(this,e,t),this.addEventListener=i},rt.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=Ve(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),We(this,e)},rt.prototype.dispatchEvent=rt.prototype.trigger;var at=function(e){return e instanceof rt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"===typeof e[t]}))},st=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},ot=function(e){if(!e.nodeName&&!at(e))throw new Error("Invalid target; must be a DOM node or evented object.")},lt=function(e){if(!st(e))throw new Error("Invalid event type; must be a non-empty string or array.")},ut=function(e){if("function"!==typeof e)throw new Error("Invalid listener; must be a function.")},ct=function(e,t){var i=t.length<3||t[0]===e||t[0]===e.eventBusEl_,n=void 0,r=void 0,a=void 0;return i?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],a=t[1]):(n=t[0],r=t[1],a=t[2]),ot(n),lt(r),ut(a),a=tt(e,a),{isTargetingSelf:i,target:n,type:r,listener:a}},ht=function(e,t,i,n){ot(e),e.nodeName?Xe[t](e,i,n):e[t](i,n)},dt={on:function(){for(var e=this,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=ct(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(ht(s,"on",o,l),!a){var u=function(){return e.off(s,o,l)};u.guid=l.guid;var c=function(){return e.off("dispose",u)};c.guid=l.guid,ht(this,"on","dispose",u),ht(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=ct(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(a)ht(s,"one",o,l);else{var u=function t(){for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];e.off(s,o,t),l.apply(null,n)};u.guid=l.guid,ht(s,"one",o,u)}},off:function(e,t,i){if(!e||st(e))Ge(this.eventBusEl_,e,t);else{var n=e,r=t;ot(n),lt(r),ut(i),i=tt(this,i),this.off("dispose",i),n.nodeName?(Ge(n,r,i),Ge(n,"dispose",i)):at(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){return We(this.eventBusEl_,e,t)}};function pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=se("span",{className:"vjs-event-bus"});return q(e,dt),e.on("dispose",(function(){e.off(),r.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ft={state:{},setState:function(e){var t=this;"function"===typeof e&&(e=e());var i=void 0;return V(e,(function(e,n){t.state[n]!==e&&(i=i||{},i[n]={from:t.state[n],to:e}),t.state[n]=e})),i&&at(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function vt(e,t){return q(e,ft),e.state=q({},e.state,t),"function"===typeof e.handleStateChanged&&at(e)&&e.on("statechanged",e.handleStateChanged),e}function mt(e){return"string"!==typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function gt(e,t){return mt(e)===mt(t)}function yt(){for(var e={},t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((function(t){t&&V(t,(function(t,i){G(t)?(G(e[i])||(e[i]={}),e[i]=yt(e[i],t)):e[i]=t}))})),e}var bt=function(){function e(t,i,n){if(R(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=yt({},this.options_),i=this.options_=yt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){var r=t&&t.id&&t.id()||"no_player";this.id_=r+"_component_"+Pe()}this.name_=i.name||null,i.el?this.el_=i.el:!1!==i.createEl&&(this.el_=this.createEl()),!1!==i.evented&&pt(this,{eventBusKey:this.el_?"el_":null}),vt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==i.initChildren&&this.initChildren(),this.ready(n),!1!==i.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Be(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return Y.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=yt(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,i){return se(e,t,i)},e.prototype.localize=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],s=n&&n.split("-")[0],o=r&&r[s],l=i;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var n=t[i-1],r=n;return"undefined"===typeof n&&(r=e),r}))),l},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=mt(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,a=void 0;if("string"===typeof t){a=mt(t);var s=i.componentClass||a;i.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!==typeof o)return null;r=new o(this.player_||this,i)}else r=t;if(this.children_.splice(n,0,r),"function"===typeof r.id&&(this.childIndex_[r.id()]=r),a=a||r.name&&mt(r.name()),a&&(this.childNameIndex_[a]=r),"function"===typeof r.el&&r.el()){var l=this.contentEl().children,u=l[n]||null;this.contentEl().insertBefore(r.el(),u)}return r},e.prototype.removeChild=function(e){if("string"===typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,i=this.options_.children;if(i){var n=this.options_,r=function(e){var i=e.name,r=e.opts;if(void 0!==n[i]&&(r=n[i]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(i,r);a&&(t[i]=a)}},a=void 0,s=e.getComponent("Tech");a=Array.isArray(i)?i:Object.keys(i),a.concat(Object.keys(this.options_).filter((function(e){return!a.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((function(e){var n=void 0,r=void 0;return"string"===typeof e?(n=e,r=i[n]||t.options_[n]||{}):(n=e.name,r=e),{name:n,opts:r}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||mt(t.name));return i&&!s.isTech(i)})).forEach(r)}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return Ie(e,t||this.contentEl())},e.prototype.$$=function(e,t){return Oe(e,t||this.contentEl())},e.prototype.hasClass=function(e){return ue(this.el_,e)},e.prototype.addClass=function(e){ce(this.el_,e)},e.prototype.removeClass=function(e){he(this.el_,e)},e.prototype.toggleClass=function(e,t){de(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return ve(this.el_,e)},e.prototype.setAttribute=function(e,t){me(this.el_,e,t)},e.prototype.removeAttribute=function(e){ge(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+mt(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"===typeof r.getComputedStyle){var i=r.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(t=parseFloat(t),0===t){var n="offset"+mt(e);t=this.el_[n]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,i=10,n=200,r=void 0;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=(new Date).getTime(),r=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)r=!1;else if(t){var n=e.touches[0].pageX-t.pageX,a=e.touches[0].pageY-t.pageY,s=Math.sqrt(n*n+a*a);s>i&&(r=!1)}}));var a=function(){r=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",(function(i){if(t=null,!0===r){var a=(new Date).getTime()-e;a<n&&(i.preventDefault(),this.trigger("tap"))}}))},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=tt(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}},e.prototype.setTimeout=function(e,t){var i,n,a=this;return e=tt(this,e),i=r.setTimeout((function(){a.off("dispose",n),e()}),t),n=function(){return a.clearTimeout(i)},n.guid="vjs-timeout-"+i,this.on("dispose",n),i},e.prototype.clearTimeout=function(e){r.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){var i=this;e=tt(this,e);var n=r.setInterval(e,t),a=function(){return i.clearInterval(n)};return a.guid="vjs-interval-"+n,this.on("dispose",a),n},e.prototype.clearInterval=function(e){r.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.prototype.requestAnimationFrame=function(e){var t,i,n=this;return this.supportsRaf_?(e=tt(this,e),t=r.requestAnimationFrame((function(){n.off("dispose",i),e()})),i=function(){return n.cancelAnimationFrame(t)},i.guid="vjs-raf-"+t,this.on("dispose",i),t):this.setTimeout(e,1e3/60)},e.prototype.cancelAnimationFrame=function(e){if(this.supportsRaf_){r.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},e.registerComponent=function(t,i){if("string"!==typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var n=e.getComponent("Tech"),r=n&&n.isTech(i),a=e===i||e.prototype.isPrototypeOf(i.prototype);if(r||!a){var s=void 0;throw s=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+s+".")}t=mt(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,i},e.getComponent=function(t){if(t)return t=mt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();function _t(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}function Tt(e,t,i,n){return _t(e,n,i.length-1),i[n][t]}function St(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Tt.bind(null,"start",0,e),end:Tt.bind(null,"end",1,e)}}function wt(e,t){return Array.isArray(e)?St(e):void 0===e||void 0===t?St():St([[e,t]])}function Et(e,t){var i=0,n=void 0,r=void 0;if(!t)return 0;e&&e.length||(e=wt(0,0));for(var a=0;a<e.length;a++)n=e.start(a),r=e.end(a),r>t&&(r=t),i+=r-n;return i/t}bt.prototype.supportsRaf_="function"===typeof r.requestAnimationFrame&&"function"===typeof r.cancelAnimationFrame,bt.registerComponent("Component",bt);for(var kt={},Ct=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],xt=Ct[0],At=void 0,It=0;It<Ct.length;It++)if(Ct[It][1]in a){At=Ct[It];break}if(At)for(var Ot=0;Ot<At.length;Ot++)kt[xt[Ot]]=At[Ot];function jt(e){if(e instanceof jt)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:z(e)&&("number"===typeof e.code&&(this.code=e.code),q(this,e)),this.message||(this.message=jt.defaultMessages[this.code]||"")}jt.prototype.code=0,jt.prototype.message="",jt.prototype.status=null,jt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],jt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Lt=0;Lt<jt.errorTypes.length;Lt++)jt[jt.errorTypes[Lt]]=Lt,jt.prototype[jt.errorTypes[Lt]]=Lt;function Pt(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function Dt(e){Pt(e)&&e.then(null,(function(e){}))}var Rt=function(e){var t=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,i,n){return e[i]&&(t[i]=e[i]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))});return t},Mt=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,(function(e){return e.track})),n=Array.prototype.map.call(t,(function(e){var t=Rt(e.track);return e.src&&(t.src=e.src),t}));return n.concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(Rt))},Nt=function(e,t){return e.forEach((function(e){var i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return i.addCue(e)}))})),t.textTracks()},Bt={textTracksToJson:Mt,jsonToTextTracks:Nt,trackToJson_:Rt},Ut="vjs-modal-dialog",Ft=27,Vt=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=se("div",{className:Ut+"-content"},{role:"document"}),r.descEl_=se("p",{className:Ut+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),oe(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return Ut+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){e.which===Ft&&this.closeable()&&this.close()},t.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},t.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",tt(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.prototype.opened=function(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",tt(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.prototype.closeable=function(e){if("boolean"===typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},t.prototype.fill=function(){this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),xe(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},t.prototype.empty=function(){this.trigger("beforemodalempty"),Ee(this.contentEl()),this.trigger("modalempty")},t.prototype.content=function(e){return"undefined"!==typeof e&&(this.content_=e),this.content_},t.prototype.conditionalFocus_=function(){var e=a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(a,"keydown",this.handleKeyDown))},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(a,"keydown",this.handleKeyDown)},t.prototype.handleKeyDown=function(e){if(9===e.which){for(var t=this.focusableEls_(),i=this.el_.querySelector(":focus"),n=void 0,r=0;r<t.length;r++)if(i===t[r]){n=r;break}a.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}},t.prototype.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof r.HTMLAnchorElement||e instanceof r.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r.HTMLInputElement||e instanceof r.HTMLSelectElement||e instanceof r.HTMLTextAreaElement||e instanceof r.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r.HTMLIFrameElement||e instanceof r.HTMLObjectElement||e instanceof r.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(bt);Vt.prototype.options_={pauseOnOpen:!0,temporary:!0},bt.registerComponent("ModalDialog",Vt);var Ht=function(e){function t(){var i,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;R(this,t);var s=N(this,e.call(this));if(!r&&(r=s,x))for(var o in r=a.createElement("custom"),t.prototype)"constructor"!==o&&(r[o]=t.prototype[o]);r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var l=0;l<n.length;l++)r.addTrack(n[l]);return i=r,N(s,i)}return M(t,e),t.prototype.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},t.prototype.removeTrack=function(e){for(var t=void 0,i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(rt);for(var qt in Ht.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Ht.prototype.allowedEvents_)Ht.prototype["on"+qt]=null;var zt=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},Gt=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);for(var s=void 0,o=r.length-1;o>=0;o--)if(r[o].enabled){zt(r,r[o]);break}if(x){for(var l in s=a.createElement("custom"),Ht.prototype)"constructor"!==l&&(s[l]=Ht.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=N(this,e.call(this,r,s)),s=i,s.changing_=!1,n=s,N(i,n)}return M(t,e),t.prototype.addTrack=function(t){var i=this;t.enabled&&zt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){i.changing_||(i.changing_=!0,zt(i,t),i.changing_=!1,i.trigger("change"))}))},t}(Ht),Wt=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)},$t=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);for(var s=void 0,o=r.length-1;o>=0;o--)if(r[o].selected){Wt(r,r[o]);break}if(x){for(var l in s=a.createElement("custom"),Ht.prototype)"constructor"!==l&&(s[l]=Ht.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=N(this,e.call(this,r,s)),s=i,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n=s,N(i,n)}return M(t,e),t.prototype.addTrack=function(t){var i=this;t.selected&&Wt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",(function(){i.changing_||(i.changing_=!0,Wt(i,t),i.changing_=!1,i.trigger("change"))}))},t}(Ht),Xt=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);var s=void 0;if(x){for(var o in s=a.createElement("custom"),Ht.prototype)"constructor"!==o&&(s[o]=Ht.prototype[o]);for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l])}return i=N(this,e.call(this,r,s)),s=i,n=s,N(i,n)}return M(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",tt(this,(function(){this.trigger("change")})));var i=["metadata","chapters"];-1===i.indexOf(t.kind)&&t.addEventListener("modechange",tt(this,(function(){this.trigger("selectedlanguagechange")})))},t}(Ht),Yt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,e);var i=this;if(x)for(var n in i=a.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);i.trackElements_=[],Object.defineProperty(i,"length",{get:function(){return this.trackElements_.length}});for(var r=0,s=t.length;r<s;r++)i.addTrackElement_(t[r]);if(x)return i}return e.prototype.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},e.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},e.prototype.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}(),Kt=function(){function e(t){R(this,e);var i=this;if(x)for(var n in i=a.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);if(e.prototype.setCues_.call(i,t),Object.defineProperty(i,"length",{get:function(){return this.length_}}),x)return i}return e.prototype.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)},e.prototype.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),Qt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Jt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Zt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ei={disabled:"disabled",hidden:"hidden",showing:"showing"},ti=function(e){function t(){var i,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var r=N(this,e.call(this)),s=r;if(x)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l={id:n.id||"vjs_track_"+Pe(),kind:n.kind||"",label:n.label||"",language:n.language||""},u=function(e){Object.defineProperty(s,e,{get:function(){return l[e]},set:function(){}})};for(var c in l)u(c);return i=s,N(r,i)}return M(t,e),t}(rt),ii=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=a.createElement("a");i.href=e;var n=""===i.host&&"file:"!==i.protocol,s=void 0;n&&(s=a.createElement("div"),s.innerHTML='<a href="'+e+'"></a>',i=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(s));for(var o={},l=0;l<t.length;l++)o[t[l]]=i[t[l]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=r.location.protocol),n&&a.body.removeChild(s),o},ni=function(e){if(!e.match(/^https?:\/\//)){var t=a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},ri=function(e){if("string"===typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ai=function(e){var t=r.location,i=ii(e),n=":"===i.protocol?t.protocol:i.protocol,a=n+i.host!==t.protocol+t.host;return a},si=(Object.freeze||Object)({parseUrl:ii,getAbsoluteURL:ni,getFileExtension:ri,isCrossOrigin:ai}),oi=function(e,t){var i=new r.WebVTT.Parser(r,r.vttjs,r.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(r.console&&r.console.groupCollapsed&&r.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach((function(e){return Y.error(e)})),r.console&&r.console.groupEnd&&r.console.groupEnd()),i.flush()},li=function(e,t){var i={uri:e},n=ai(e);n&&(i.cors=n),l(i,tt(this,(function(e,i,n){if(e)return Y.error(e,i);if(t.loaded_=!0,"function"!==typeof r.WebVTT){if(t.tech_){var a=function(){return oi(n,t)};t.tech_.on("vttjsloaded",a),t.tech_.on("vttjserror",(function(){Y.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",a)}))}}else oi(n,t)})))},ui=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(R(this,t),!r.tech)throw new Error("A tech was not provided.");var a=yt(r,{kind:Zt[r.kind]||"subtitles",language:r.language||r.srclang||""}),s=ei[a.mode]||"disabled",o=a["default"];"metadata"!==a.kind&&"chapters"!==a.kind||(s="hidden");var l=(i=N(this,e.call(this,a)),i);if(l.tech_=a.tech,x)for(var u in t.prototype)"constructor"!==u&&(l[u]=t.prototype[u]);l.cues_=[],l.activeCues_=[];var c=new Kt(l.cues_),h=new Kt(l.activeCues_),d=!1,p=tt(l,(function(){this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",p)}),!0),Object.defineProperty(l,"default",{get:function(){return o},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(e){var t=this;ei[e]&&(s=e,"disabled"!==s?this.tech_.ready((function(){t.tech_.on("timeupdate",p)}),!0):this.tech_.off("timeupdate",p),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?c:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(d=!1,t.length!==this.activeCues_.length)d=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(d=!0);return this.activeCues_=t,h.setCues_(this.activeCues_),h},set:function(){}}),a.src?(l.src=a.src,li(a.src,l)):l.loaded_=!0,n=l,N(i,n)}return M(t,e),t.prototype.addCue=function(e){var t=e;if(r.vttjs&&!(e instanceof r.vttjs.VTTCue)){for(var i in t=new r.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),a=0;a<n.length;a++)n[a]!==this&&n[a].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(e){var t=this.cues_.length;while(t--){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(ti);ui.prototype.allowedEvents_={cuechange:"cuechange"};var ci=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var a=yt(r,{kind:Jt[r.kind]||""}),s=(i=N(this,e.call(this,a)),i),o=!1;if(x)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),a.enabled&&(s.enabled=a.enabled),s.loaded_=!0,n=s,N(i,n)}return M(t,e),t}(ti),hi=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var a=yt(r,{kind:Qt[r.kind]||""}),s=(i=N(this,e.call(this,a)),i),o=!1;if(x)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),a.selected&&(s.selected=a.selected),n=s,N(i,n)}return M(t,e),t}(ti),di=0,pi=1,fi=2,vi=3,mi=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var n=N(this,e.call(this)),r=void 0,s=n;if(x)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l,u=new ui(i);return s.kind=u.kind,s.src=u.src,s.srclang=u.language,s.label=u.label,s["default"]=u["default"],Object.defineProperty(s,"readyState",{get:function(){return r}}),Object.defineProperty(s,"track",{get:function(){return u}}),r=di,u.addEventListener("loadeddata",(function(){r=fi,s.trigger({type:"load",target:s})})),x?(l=s,N(n,l)):n}return M(t,e),t}(rt);mi.prototype.allowedEvents_={load:"load"},mi.NONE=di,mi.LOADING=pi,mi.LOADED=fi,mi.ERROR=vi;var gi={audio:{ListClass:Gt,TrackClass:ci,capitalName:"Audio"},video:{ListClass:$t,TrackClass:hi,capitalName:"Video"},text:{ListClass:Xt,TrackClass:ui,capitalName:"Text"}};Object.keys(gi).forEach((function(e){gi[e].getterName=e+"Tracks",gi[e].privateName=e+"Tracks_"}));var yi={remoteText:{ListClass:Xt,TrackClass:ui,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Yt,TrackClass:mi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},bi=yt(gi,yi);function _i(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var s=new bi.text.TrackClass(r);return a.addTrack(s),s}yi.names=Object.keys(yi),gi.names=Object.keys(gi),bi.names=[].concat(yi.names).concat(gi.names);var Ti=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};R(this,t),i.reportTouchActivity=!1;var r=N(this,e.call(this,null,i,n));return r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),bi.names.forEach((function(e){var t=bi[e];i&&i[t.getterName]&&(r[t.privateName]=i[t.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===i["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===i.nativeCaptions||!1===i.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new bi.text.ListClass,r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return M(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(tt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return wt(0,0)},t.prototype.bufferedPercent=function(){return Et(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(gi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach((function(e){var i=t[e+"Tracks"]()||[],n=i.length;while(n--){var r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}}))},t.prototype.cleanupAutoTextTracks=function(){var e=this.autoRemoteTextTracks_||[],t=e.length;while(t--){var i=e[t];this.removeRemoteTextTrack(i)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new jt(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?wt(0,0):wt()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;gi.names.forEach((function(t){var i=gi[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",(function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!r.WebVTT)if(a.body.contains(this.el())){if(!this.options_["vtt.js"]&&G(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),r.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var i=t[e];i.removeEventListener("cuechange",a),"showing"===i.mode&&i.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",r),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++){var o=t[e];o.removeEventListener("cuechange",a)}}))},t.prototype.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return _i(this,e,t,i)},t.prototype.createRemoteTextTrack=function(e){var t=yt(e,{tech:this});return new yi.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],n=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Y.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==i&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(n.track)})),n},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=mt(e),t.techs_[e]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return e=mt(e),t.techs_&&t.techs_[e]?t.techs_[e]:r&&r.videojs&&r.videojs[e]?(Y.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r.videojs[e]):void 0},t}(bt);bi.names.forEach((function(e){var t=bi[e];Ti.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Ti.prototype.featuresVolumeControl=!0,Ti.prototype.featuresMuteControl=!0,Ti.prototype.featuresFullscreenResize=!1,Ti.prototype.featuresPlaybackRate=!1,Ti.prototype.featuresProgressEvents=!1,Ti.prototype.featuresSourceset=!1,Ti.prototype.featuresTimeupdateEvents=!1,Ti.prototype.featuresNativeTextTracks=!1,Ti.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var i=e.sourceHandlers||[],n=void 0,r=0;r<i.length;r++)if(n=i[r].canPlayType(t),n)return n;return""},e.selectSourceHandler=function(t,i){for(var n=e.sourceHandlers||[],r=void 0,a=0;a<n.length;a++)if(r=n[a].canHandleSource(t,i),r)return n[a];return null},e.canPlaySource=function(t,i){var n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""};var t=["seekable","seeking","duration"];t.forEach((function(e){var t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:Y.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},bt.registerComponent("Tech",Ti),Ti.registerTech("Tech",Ti),Ti.defaultTechOrder_=[];var Si={},wi={},Ei={};function ki(e,t){Si[e]=Si[e]||[],Si[e].push(t)}function Ci(e,t,i){e.setTimeout((function(){return Bi(t,Si[t.type],i,e)}),1)}function xi(e,t){e.forEach((function(e){return e.setTech&&e.setTech(t)}))}function Ai(e,t,i){return e.reduceRight(Di(i),t[i]())}function Ii(e,t,i,n){return t[i](e.reduce(Di(i),n))}function Oi(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r="call"+mt(i),a=e.reduce(Di(r),n),s=a===Ei,o=s?null:t[i](a);return Ri(e,i,o,s),o}var ji={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Li={setCurrentTime:1},Pi={play:1,pause:1};function Di(e){return function(t,i){return t===Ei?Ei:i[e]?i[e](t):t}}function Ri(e,t,i,n){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](n,i)}}function Mi(e){wi[e.id()]=null}function Ni(e,t){var i=wi[e.id()],n=null;if(void 0===i||null===i)return n=t(e),wi[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var a=i[r],s=a[0],o=a[1];s===t&&(n=o)}return null===n&&(n=t(e),i.push([t,n])),n}function Bi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments[2],n=arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=t[0],o=t.slice(1);if("string"===typeof s)Bi(e,Si[s],i,n,r,a);else if(s){var l=Ni(n,s);if(!l.setSource)return r.push(l),Bi(e,o,i,n,r,a);l.setSource(q({},e),(function(t,s){if(t)return Bi(e,o,i,n,r,a);r.push(l),Bi(s,e.type===s.type?o:Si[s.type],i,n,r,a)}))}else o.length?Bi(e,o,i,n,r,a):a?i(e,r):Bi(e,Si["*"],i,n,r,!0)}var Ui={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Fi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=ri(e),i=Ui[t.toLowerCase()];return i||""},Vi=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter((function(e){return e.src===t}));if(i.length)return i[0].type;for(var n=e.$$("source"),r=0;r<n.length;r++){var a=n[r];if(a.type&&a.src&&a.src===t)return a.type}return Fi(t)},Hi=function e(t){if(Array.isArray(t)){var i=[];t.forEach((function(t){t=e(t),Array.isArray(t)?i=i.concat(t):z(t)&&i.push(t)})),t=i}else t="string"===typeof t&&t.trim()?[qi({src:t})]:z(t)&&"string"===typeof t.src&&t.src&&t.src.trim()?[qi(t)]:[];return t};function qi(e){var t=Fi(e.src);return!e.type&&t&&(e.type=t),e}var zi=function(e){function t(i,n,r){R(this,t);var a=yt({createEl:!1},n),s=N(this,e.call(this,i,a,r));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)i.src(n.playerOptions.sources);else for(var o=0,l=n.playerOptions.techOrder;o<l.length;o++){var u=mt(l[o]),c=Ti.getTech(u);if(u||(c=bt.getComponent(u)),c&&c.isSupported()){i.loadTech_(u);break}}return s}return M(t,e),t}(bt);bt.registerComponent("MediaLoader",zi);var Gi=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.emitTapEvents(),r.enable(),r}return M(t,e),t.prototype.createEl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=q({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&Y.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=q({role:"button"},n),this.tabIndex_=i.tabIndex;var r=e.prototype.createEl.call(this,t,i,n);return this.createControlTextEl(r),r},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=se("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,oe(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){ze(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){Ge(a,"keydown",tt(this,this.handleKeyPress))},t}(bt);bt.registerComponent("ClickableComponent",Gi);var Wi=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.update(),i.on("posterchange",tt(r,r.update)),r}return M(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=se("div",{className:"vjs-poster",tabIndex:-1});return L||(this.fallbackImg_=se("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?Dt(this.player_.play()):this.player_.pause())},t}(Gi);bt.registerComponent("PosterImage",Wi);var $i="#222",Xi="#ccc",Yi={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Ki(e,t){var i=void 0;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Qi(e,t,i){try{e.style[t]=i}catch(n){return}}var Ji=function(e){function t(i,n,a){R(this,t);var s=N(this,e.call(this,i,n,a)),o=tt(s,s.updateDisplay);return i.on("loadstart",tt(s,s.toggleDisplay)),i.on("texttrackchange",o),i.on("loadstart",tt(s,s.preselectTrack)),i.ready(tt(s,(function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",o),i.on("playerresize",o),r.addEventListener&&r.addEventListener("orientationchange",o),i.on("dispose",(function(){return r.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}}))),s}return M(t,e),t.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage,n=void 0,r=void 0,a=void 0,s=0;s<t.length;s++){var o=t[s];i&&i.enabled&&i.language===o.language?o.kind===i.kind?a=o:a||(a=o):i&&!i.enabled?(a=null,n=null,r=null):o["default"]&&("descriptions"!==o.kind||n?o.kind in e&&!r&&(r=o):n=o)}a?a.mode="showing":r?r.mode="showing":n&&(n.mode="showing")},t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"===typeof r.WebVTT&&r.WebVTT.processCues(r,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();var t=null,i=null,n=e.length;while(n--){var r=e[n];"showing"===r.mode&&("descriptions"===r.kind?t=r:i=r)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},t.prototype.updateForTrack=function(e){if("function"===typeof r.WebVTT&&e.activeCues){for(var t=[],i=0;i<e.activeCues.length;i++)t.push(e.activeCues[i]);if(r.WebVTT.processCues(r,t,this.el_),this.player_.textTrackSettings){var n=this.player_.textTrackSettings.getValues(),a=t.length;while(a--){var s=t[a];if(s){var o=s.displayState;if(n.color&&(o.firstChild.style.color=n.color),n.textOpacity&&Qi(o.firstChild,"color",Ki(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(o.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Qi(o.firstChild,"backgroundColor",Ki(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Qi(o,"backgroundColor",Ki(n.windowColor,n.windowOpacity)):o.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px "+$i+", 2px 2px 4px "+$i+", 2px 2px 5px "+$i:"raised"===n.edgeStyle?o.firstChild.style.textShadow="1px 1px "+$i+", 2px 2px "+$i+", 3px 3px "+$i:"depressed"===n.edgeStyle?o.firstChild.style.textShadow="1px 1px "+Xi+", 0 1px "+Xi+", -1px -1px "+$i+", 0 -1px "+$i:"uniform"===n.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px "+$i+", 0 0 4px "+$i+", 0 0 4px "+$i+", 0 0 4px "+$i)),n.fontPercent&&1!==n.fontPercent){var l=r.parseFloat(o.style.fontSize);o.style.fontSize=l*n.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Yi[n.fontFamily])}}}}},t}(bt);bt.registerComponent("TextTrackDisplay",Ji);var Zi=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),i=this.localize(t?"Audio Player":"Video Player"),n=se("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},t}(bt);bt.registerComponent("LoadingSpinner",Zi);var en=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=q({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),i=q({type:"button"},i);var n=bt.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return Y.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),bt.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(Gi);bt.registerComponent("Button",en);var tn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)Dt(t);else{var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var r=function(){return n.focus()};Pt(t)?t.then(r,(function(){})):this.setTimeout(r,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(en);tn.prototype.controlText_="Play Video",bt.registerComponent("BigPlayButton",tn);var nn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.controlText(n&&n.controlText||r.localize("Close")),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(en);bt.registerComponent("CloseButton",nn);var rn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"play",r.handlePlay),r.on(i,"pause",r.handlePause),r.on(i,"ended",r.handleEnded),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(en);rn.prototype.controlText_="Play",bt.registerComponent("PlayToggle",rn);var an=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),r=r>0||s>0?r+":":"",n=((r||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,r+n+i},sn=an;function on(e){sn=e}function ln(){sn=an}var un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return sn(e,t)},cn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.throttledUpdateContent=it(tt(r,r.updateContent),25),r.on(i,"timeupdate",r.throttledUpdateContent),r}return M(t,e),t.prototype.createEl=function(t){var i=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=se("span",{className:i+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return un(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(bt);cn.prototype.labelText_="Time",cn.prototype.controlText_="Time",bt.registerComponent("TimeDisplay",cn);var hn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"ended",r.handleEnded),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(cn);hn.prototype.labelText_="Current Time",hn.prototype.controlText_="Current Time",bt.registerComponent("CurrentTimeDisplay",hn);var dn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"durationchange",r.updateContent),r.on(i,"loadedmetadata",r.throttledUpdateContent),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(cn);dn.prototype.labelText_="Duration",dn.prototype.controlText_="Duration",bt.registerComponent("DurationDisplay",dn);var pn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(bt);bt.registerComponent("TimeDivider",pn);var fn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"durationchange",r.throttledUpdateContent),r.on(i,"ended",r.handleEnded),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(cn);fn.prototype.labelText_="Remaining Time",fn.prototype.controlText_="Remaining Time",bt.registerComponent("RemainingTimeDisplay",fn);var vn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}return M(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=se("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(bt);bt.registerComponent("LiveDisplay",vn);var mn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}return M(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.className=i.className+" vjs-slider",i=q({tabIndex:0},i),n=q({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||k||e.preventDefault(),ye(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;be(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!==typeof e||e!==e||e<0||e===1/0)&&(e=0);var i=(100*e).toFixed(2)+"%",n=t.el().style;return this.vertical()?n.height=i:n.width=i,e}}},t.prototype.calculateDistance=function(e){var t=Se(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(bt);bt.registerComponent("Slider",mn);var gn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.partEls_=[],r.on(i,"progress",r.update),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),i=this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,a=function(e,t){var i=e/t||0;return 100*(i>=1?1:i)+"%"};this.el_.style.width=a(n,i);for(var s=0;s<t.length;s++){var o=t.start(s),l=t.end(s),u=r[s];u||(u=this.el_.appendChild(se()),r[s]=u),u.style.left=a(o,n),u.style.width=a(l-o,n)}for(var c=r.length;c>t.length;c--)this.el_.removeChild(r[c-1]);r.length=t.length},t}(bt);bt.registerComponent("LoadProgressBar",gn);var yn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,i){var n=_e(this.el_),r=_e(this.player_.el()),a=e.width*t;if(r&&n){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),l=n.width/2;s<l?l+=l-s:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),this.el_.style.right="-"+l+"px",oe(this.el_,i)}},t}(bt);bt.registerComponent("TimeTooltip",yn);var bn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),r=un(n,i.player_.duration()),a=i.getChild("timeTooltip");a&&a.update(e,t,r)}))},t}(bt);bn.prototype.options_={children:[]},A&&!(A>8)||g||b||bn.prototype.options_.children.push("timeTooltip"),bt.registerComponent("PlayProgressBar",bn);var _n=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.update=it(tt(r,r.update),25),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.duration(),r=un(t*n,n);i.el_.style.left=e.width*t+"px",i.getChild("timeTooltip").update(e,t,r)}))},t}(bt);_n.prototype.options_={children:["timeTooltip"]},bt.registerComponent("MouseTimeDisplay",_n);var Tn=5,Sn=30,wn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.setEventHandlers_(),r}return M(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=it(tt(this,this.update),Sn),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),Sn)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[un(e,i),un(i,i)],"{1} of {2}")),this.bar.update(_e(this.el_),t)},t.prototype.update=function(t){var i=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),i),i},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Ae(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Ae(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Dt(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+Tn)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-Tn)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(mn);wn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},A&&!(A>8)||g||b||wn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),wn.prototype.playerEvent="timeupdate",bt.registerComponent("SeekBar",wn);var En=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.handleMouseMove=it(tt(r,r.handleMouseMove),25),r.throttledHandleMouseSeek=it(tt(r,r.handleMouseSeek),25),r.enable(),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("mouseTimeDisplay"),n=t.el(),r=_e(n),a=Se(n,e).x;a>1?a=1:a<0&&(a=0),i&&i.update(r,a)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(bt);En.prototype.options_={children:["seekBar"]},bt.registerComponent("ProgressControl",En);var kn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"fullscreenchange",r.handleFullscreenChange),!1===a[kt.fullscreenEnabled]&&r.disable(),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(en);kn.prototype.controlText_="Fullscreen",bt.registerComponent("FullscreenToggle",kn);var Cn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},xn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(bt);bt.registerComponent("VolumeLevel",xn);var An=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on("slideractive",r.updateLastVolume_),r.on(i,"volumechange",r.updateARIAAttributes),i.ready((function(){return r.updateARIAAttributes()})),r}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Ae(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Ae(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(mn);An.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},An.prototype.playerEvent="volumechange",bt.registerComponent("VolumeBar",An);var In=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t),n.vertical=n.vertical||!1,("undefined"===typeof n.volumeBar||G(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var r=N(this,e.call(this,i,n));return Cn(r,i),r.throttledHandleMouseMove=it(tt(r,r.handleMouseMove),25),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}return M(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(bt);In.prototype.options_={children:["volumeBar"]},bt.registerComponent("VolumeControl",In);var On=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},jn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return On(r,i),r.on(i,["loadstart","volumechange"],r.update),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;g&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)he(this.el_,"vjs-vol-"+i);ce(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(en);jn.prototype.controlText_="Mute",bt.registerComponent("MuteToggle",jn);var Ln=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t),"undefined"!==typeof n.inline?n.inline=n.inline:n.inline=!0,("undefined"===typeof n.volumeControl||G(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var r=N(this,e.call(this,i,n));return r.on(i,["loadstart"],r.volumePanelState_),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}return M(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(bt);Ln.prototype.options_={children:["muteToggle","volumeControl"]},bt.registerComponent("VolumePanel",Ln);var Pn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyPress),r}return M(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",tt(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=se(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),ze(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),i=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(bt);bt.registerComponent("Menu",Pn);var Dn=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t);var r=N(this,e.call(this,i,n));r.menuButton_=new en(i,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var a=en.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+a,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"focus",r.handleFocus),r.on(r.menuButton_,"blur",r.handleBlur),r.on("keydown",r.handleSubmenuKeyPress),r}return M(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new Pn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=se("li",{className:"vjs-menu-title",innerHTML:mt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),le(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";!0===this.options_.inline?t+="-inline":t+="-popup";var i=en.prototype.buildCSSClass();return"vjs-menu-button "+t+" "+i+" "+e.prototype.buildCSSClass.call(this)},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",tt(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){ze(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleBlur=function(){Ge(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),g&&re())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(bt);bt.registerComponent("MenuButton",Dn);var Rn=function(e){function t(i,n){R(this,t);var r=n.tracks,a=N(this,e.call(this,i,n));if(a.items.length<=1&&a.hide(),!r)return N(a);var s=tt(a,a.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),a.player_.on("ready",s),a.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s)})),a}return M(t,e),t}(Dn);bt.registerComponent("TrackButton",Rn);var Mn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}return M(t,e),t.prototype.createEl=function(t,i,n){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",q({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Gi);bt.registerComponent("MenuItem",Mn);var Nn=function(e){function t(i,n){R(this,t);var s=n.track,o=i.textTracks();n.label=s.label||s.language||"Unknown",n.selected="showing"===s.mode;var l=N(this,e.call(this,i,n));l.track=s;var u=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];l.handleTracksChange.apply(l,t)},c=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];l.handleSelectedLanguageChange.apply(l,t)};if(i.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",c),l.on("dispose",(function(){i.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange){var h=void 0;l.on(["tap","click"],(function(){if("object"!==D(r.Event))try{h=new r.Event("change")}catch(e){}h||(h=a.createEvent("Event"),h.initEvent("change",!0,!0)),o.dispatchEvent(h)}))}return l.handleTracksChange(),l}return M(t,e),t.prototype.handleClick=function(t){var i=this.track.kind,n=this.track.kinds,r=this.player_.textTracks();if(n||(n=[i]),e.prototype.handleClick.call(this,t),r)for(var a=0;a<r.length;a++){var s=r[a];s===this.track&&n.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Mn);bt.registerComponent("TextTrackMenuItem",Nn);var Bn=function(e){function t(i,n){return R(this,t),n.track={player:i,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,N(this,e.call(this,i,n))}return M(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Nn);bt.registerComponent("OffTextTrackMenuItem",Bn);var Un=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(this,t),n.tracks=i.textTracks(),N(this,e.call(this,i,n))}return M(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nn,i=void 0;this.label_&&(i=this.label_+" off"),e.push(new Bn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var a=n[r];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Rn);bt.registerComponent("TextTrackButton",Un);var Fn=function(e){function t(i,n){R(this,t);var r=n.track,a=n.cue,s=i.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime;var o=N(this,e.call(this,i,n));return o.track=r,o.cue=a,r.addEventListener("cuechange",tt(o,o.update)),o}return M(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},t}(Mn);bt.registerComponent("ChaptersTrackMenuItem",Fn);var Vn=function(e){function t(i,n,r){return R(this,t),N(this,e.call(this,i,n,r))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(mt(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],a=new Fn(this.player_,{track:this.track_,cue:r});e.push(a)}return e},t}(Un);Vn.prototype.kind_="chapters",Vn.prototype.controlText_="Chapters",bt.registerComponent("ChaptersButton",Vn);var Hn=function(e){function t(i,n,r){R(this,t);var a=N(this,e.call(this,i,n,r)),s=i.textTracks(),o=tt(a,a.handleTracksChange);return s.addEventListener("change",o),a.on("dispose",(function(){s.removeEventListener("change",o)})),a}return M(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var a=t[n];if(a.kind!==this.kind_&&"showing"===a.mode){i=!0;break}}i?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Un);Hn.prototype.kind_="descriptions",Hn.prototype.controlText_="Descriptions",bt.registerComponent("DescriptionsButton",Hn);var qn=function(e){function t(i,n,r){return R(this,t),N(this,e.call(this,i,n,r))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Un);qn.prototype.kind_="subtitles",qn.prototype.controlText_="Subtitles",bt.registerComponent("SubtitlesButton",qn);var zn=function(e){function t(i,n){R(this,t),n.track={player:i,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem";var r=N(this,e.call(this,i,n));return r.addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return M(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Nn);bt.registerComponent("CaptionSettingsMenuItem",zn);var Gn=function(e){function t(i,n,r){return R(this,t),N(this,e.call(this,i,n,r))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new zn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Un);Gn.prototype.kind_="captions",Gn.prototype.controlText_="Captions",bt.registerComponent("CaptionsButton",Gn);var Wn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(t,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),r+="</span>";var a=e.prototype.createEl.call(this,t,q({innerHTML:r},i),n);return a},t}(Nn);bt.registerComponent("SubsCapsMenuItem",Wn);var $n=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t);var r=N(this,e.call(this,i,n));return r.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(mt(r.label_)),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new zn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Wn),t},t}(Un);$n.prototype.kinds_=["captions","subtitles"],$n.prototype.controlText_="Subtitles",bt.registerComponent("SubsCapsButton",$n);var Xn=function(e){function t(i,n){R(this,t);var r=n.track,a=i.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled;var s=N(this,e.call(this,i,n));s.track=r,s.addClass("vjs-"+r.kind+"-menu-item");var o=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.handleTracksChange.apply(s,t)};return a.addEventListener("change",o),s.on("dispose",(function(){a.removeEventListener("change",o)})),s}return M(t,e),t.prototype.createEl=function(t,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);"main-desc"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),r+="</span>";var a=e.prototype.createEl.call(this,t,q({innerHTML:r},i),n);return a},t.prototype.handleClick=function(t){var i=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var n=0;n<i.length;n++){var r=i[n];r.enabled=r===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Mn);bt.registerComponent("AudioTrackMenuItem",Xn);var Yn=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(this,t),n.tracks=i.audioTracks(),N(this,e.call(this,i,n))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new Xn(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},t}(Rn);Yn.prototype.controlText_="Audio Track",bt.registerComponent("AudioTrackButton",Yn);var Kn=function(e){function t(i,n){R(this,t);var r=n.rate,a=parseFloat(r,10);n.label=r,n.selected=1===a,n.selectable=!0,n.multiSelectable=!1;var s=N(this,e.call(this,i,n));return s.label=r,s.rate=a,s.on(i,"ratechange",s.update),s}return M(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Mn);Kn.prototype.contentElType="button",bt.registerComponent("PlaybackRateMenuItem",Kn);var Qn=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.updateVisibility(),r.updateLabel(),r.on(i,"loadstart",r.updateVisibility),r.on(i,"ratechange",r.updateLabel),r}return M(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=se("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.prototype.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createMenu=function(){var e=new Pn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;i>=0;i--)e.addChild(new Kn(this.player(),{rate:t[i]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>t){n=i[r];break}this.player().playbackRate(n)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Dn);Qn.prototype.controlText_="Playback Rate",bt.registerComponent("PlaybackRateMenuButton",Qn);var Jn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(bt);bt.registerComponent("Spacer",Jn);var Zn=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Jn);bt.registerComponent("CustomControlSpacer",Zn);var er=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(bt);er.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},bt.registerComponent("ControlBar",er);var tr=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n));return r.on(i,"error",r.open),r}return M(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Vt);tr.prototype.options_=yt(Vt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),bt.registerComponent("ErrorDisplay",tr);var ir="vjs-text-track-settings",nr=["#000","Black"],rr=["#00F","Blue"],ar=["#0FF","Cyan"],sr=["#0F0","Green"],or=["#F0F","Magenta"],lr=["#F00","Red"],ur=["#FFF","White"],cr=["#FF0","Yellow"],hr=["1","Opaque"],dr=["0.5","Semi-Transparent"],pr=["0","Transparent"],fr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[nr,ur,lr,sr,rr,cr,or,ar]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[hr,dr,pr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ur,nr,lr,sr,rr,cr,or,ar]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[hr,dr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[pr,dr,hr]}};function vr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function mr(e,t){var i=e.options[e.options.selectedIndex].value;return vr(i,t)}function gr(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(vr(e.options[n].value,i)===t){e.selectedIndex=n;break}}fr.windowColor.options=fr.backgroundColor.options;var yr=function(e){function t(i,n){R(this,t),n.temporary=!1;var r=N(this,e.call(this,i,n));return r.updateDisplay=tt(r,r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=se("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),V(fr,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}return M(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",r=fr[e],a=r.id.replace("%s",this.id_),s=[i,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map((function(e){var i=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+i+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+i+'">',t.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElColors_=function(){return se("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return se("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return se("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return H(fr,(function(t,i,n){var r=mr(e.$(i.selector),i.parser);return void 0!==r&&(t[n]=r),t}),{})},t.prototype.setValues=function(e){var t=this;V(fr,(function(i,n){gr(t.$(i.selector),e[n],i.parser)}))},t.prototype.setDefaults=function(){var e=this;V(fr,(function(t){var i=t.hasOwnProperty("default")?t["default"]:0;e.$(t.selector).selectedIndex=i}))},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(r.localStorage.getItem(ir))}catch(t){Y.warn(t)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?r.localStorage.setItem(ir,JSON.stringify(e)):r.localStorage.removeItem(ir)}catch(t){Y.warn(t)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(a,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},t}(Vt);bt.registerComponent("TextTrackSettings",yr);var br=function(e){function t(i,n){R(this,t);var a=n.ResizeObserver||r.ResizeObserver;null===n.ResizeObserver&&(a=!1);var s=yt({createEl:!a},n),o=N(this,e.call(this,i,s));return o.ResizeObserver=n.ResizeObserver||r.ResizeObserver,o.loadListener_=null,o.resizeObserver_=null,o.debouncedHandler_=nt((function(){o.resizeHandler()}),100,!1,o),a?(o.resizeObserver_=new o.ResizeObserver(o.debouncedHandler_),o.resizeObserver_.observe(i.el())):(o.loadListener_=function(){o.el_&&o.el_.contentWindow&&ze(o.el_.contentWindow,"resize",o.debouncedHandler_)},o.one("load",o.loadListener_)),o}return M(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},t.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&Ge(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},t}(bt);bt.registerComponent("ResizeManager",br);var _r=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var i=e.$$("source"),n=[],r="";if(!i.length)return!1;for(var a=0;a<i.length;a++){var s=i[a].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},Tr={};x||(Tr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;var i=a.createDocumentFragment();while(t.childNodes.length)i.appendChild(t.childNodes[0]);return this.innerText="",r.Element.prototype.appendChild.call(this,i),this.innerHTML}}));var Sr=function(e,t){for(var i={},n=0;n<e.length;n++)if(i=Object.getOwnPropertyDescriptor(e[n],t),i&&i.set&&i.get)break;return i.enumerable=!0,i.configurable=!0,i},wr=function(e){return Sr([e.el(),r.HTMLMediaElement.prototype,r.Element.prototype,Tr],"innerHTML")},Er=function(e){var t=e.el();if(!t.resetSourceWatch_){var i={},n=wr(e),r=function(i){return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=i.apply(t,r);return _r(e),s}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(i[e]=t[e],t[e]=r(i[e]))})),Object.defineProperty(t,"innerHTML",yt(n,{set:r(n.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(i).forEach((function(e){t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)}},kr={};x||(kr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?ni(r.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return r.Element.prototype.setAttribute.call(this,"src",e),e}}));var Cr=function(e){return Sr([e.el(),r.HTMLMediaElement.prototype,kr],"src")},xr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var i=Cr(e),n=t.setAttribute,r=t.load;Object.defineProperty(t,"src",yt(i,{set:function(n){var r=i.set.call(t,n);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(i,r){var a=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),a},t.load=function(){var i=r.call(t);return _r(e)||(e.triggerSourceset(""),Er(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):_r(e)||Er(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=r,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Ar=B(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),Ir=function(e){function t(i,n){R(this,t);var r=N(this,e.call(this,i,n)),a=i.source,o=!1;if(a&&(r.el_.currentSrc!==a.src||i.tag&&3===i.tag.initNetworkState_)?r.setSource(a):r.handleLateInit_(r.el_),i.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){var l=r.el_.childNodes,u=l.length,c=[];while(u--){var h=l[u],d=h.nodeName.toLowerCase();"track"===d&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(h),r.remoteTextTracks().addTrack(h.track),r.textTracks().addTrack(h.track),o||r.el_.hasAttribute("crossorigin")||!ai(h.src)||(o=!0)):c.push(h))}for(var p=0;p<c.length;p++)r.el_.removeChild(c[p])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Y.warn(s(Ar)),r.restoreMetadataTracksInIOSNativePlayer_(),(j||v||S)&&!0===i.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}return M(t,e),t.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},t.prototype.setupSourcesetHandling_=function(){xr(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,i=function(){t=[];for(var i=0;i<e.length;i++){var n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",(function(){return e.removeEventListener("change",i)}));var n=function i(){for(var n=0;n<t.length;n++){var r=t[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))},t.prototype.proxyNativeTracks_=function(){var e=this;gi.names.forEach((function(t){var i=gi[t],n=e.el()[i.getterName],r=e[i.getterName]();if(e["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){var a={change:function(e){r.trigger({type:"change",target:r,currentTarget:r,srcElement:r})},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<r.length;t++){for(var i=!1,a=0;a<n.length;a++)if(n[a]===r[t]){i=!0;break}i||e.push(r[t])}while(e.length)r.removeTrack(e.shift())};Object.keys(a).forEach((function(t){var i=a[t];n.addEventListener(t,i),e.on("dispose",(function(e){return n.removeEventListener(t,i)}))})),e.on("loadstart",s),e.on("dispose",(function(t){return e.off("loadstart",s)}))}}))},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=a.createElement("video");var n=this.options_.tag&&fe(this.options_.tag),r=yt({},n);j&&!0===this.options_.nativeControlsForTouch||delete r.controls,pe(e,q(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&me(e,"preload",this.options_.preload);for(var s=["loop","muted","playsinline","autoplay"],o=0;o<s.length;o++){var l=s[o],u=this.options_[l];"undefined"!==typeof u&&(u?me(e,l,l):ge(e,l),e[l]=u)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(t){Y(t,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&b&&k&&0===this.el_.currentTime){var t=function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"===typeof this.el_.webkitEnterFullScreen){var e=r.navigator&&r.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,i,n):e.prototype.addTextTrack.call(this,t,i,n)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var i=a.createElement("track");return t.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t["default"]&&(i["default"]=t["default"]),t.id&&(i.id=t.id),t.src&&(i.src=t.src),i},t.prototype.addRemoteTextTrack=function(t,i){var n=e.prototype.addRemoteTextTrack.call(this,t,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks){var i=this.$$("track"),n=i.length;while(n--)t!==i[n]&&t!==i[n].track||this.el().removeChild(i[n])}},t.prototype.getVideoPlaybackQuality=function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r.performance&&"function"===typeof r.performance.now?e.creationTime=r.performance.now():r.performance&&r.performance.timing&&"number"===typeof r.performance.timing.navigationStart&&(e.creationTime=r.Date.now()-r.performance.timing.navigationStart),e},t}(Ti);if(ie()){Ir.TEST_VID=a.createElement("video");var Or=a.createElement("track");Or.kind="captions",Or.srclang="en",Or.label="English",Ir.TEST_VID.appendChild(Or)}Ir.isSupported=function(){try{Ir.TEST_VID.volume=.5}catch(e){return!1}return!(!Ir.TEST_VID||!Ir.TEST_VID.canPlayType)},Ir.canPlayType=function(e){return Ir.TEST_VID.canPlayType(e)},Ir.canPlaySource=function(e,t){return Ir.canPlayType(e.type)},Ir.canControlVolume=function(){try{var e=Ir.TEST_VID.volume;return Ir.TEST_VID.volume=e/2+.1,e!==Ir.TEST_VID.volume}catch(t){return!1}},Ir.canMuteVolume=function(){try{var e=Ir.TEST_VID.muted;return Ir.TEST_VID.muted=!e,Ir.TEST_VID.muted?me(Ir.TEST_VID,"muted","muted"):ge(Ir.TEST_VID,"muted","muted"),e!==Ir.TEST_VID.muted}catch(t){return!1}},Ir.canControlPlaybackRate=function(){if(b&&k&&C<58)return!1;try{var e=Ir.TEST_VID.playbackRate;return Ir.TEST_VID.playbackRate=e/2+.1,e!==Ir.TEST_VID.playbackRate}catch(t){return!1}},Ir.canOverrideAttributes=function(){if(x)return!1;try{var e=function(){};Object.defineProperty(a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(t){return!1}return!0},Ir.supportsNativeTextTracks=function(){return O||g&&k},Ir.supportsNativeVideoTracks=function(){return!(!Ir.TEST_VID||!Ir.TEST_VID.videoTracks)},Ir.supportsNativeAudioTracks=function(){return!(!Ir.TEST_VID||!Ir.TEST_VID.audioTracks)},Ir.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Ir.prototype.featuresVolumeControl=Ir.canControlVolume(),Ir.prototype.featuresMuteControl=Ir.canMuteVolume(),Ir.prototype.featuresPlaybackRate=Ir.canControlPlaybackRate(),Ir.prototype.featuresSourceset=Ir.canOverrideAttributes(),Ir.prototype.movingMediaElementInDOM=!g,Ir.prototype.featuresFullscreenResize=!0,Ir.prototype.featuresProgressEvents=!0,Ir.prototype.featuresTimeupdateEvents=!0,Ir.prototype.featuresNativeTextTracks=Ir.supportsNativeTextTracks(),Ir.prototype.featuresNativeVideoTracks=Ir.supportsNativeVideoTracks(),Ir.prototype.featuresNativeAudioTracks=Ir.supportsNativeAudioTracks();var jr=Ir.TEST_VID&&Ir.TEST_VID.constructor.prototype.canPlayType,Lr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Pr=/^video\/mp4/i;Ir.patchCanPlayType=function(){_>=4&&!w&&!k?Ir.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Lr.test(e)?"maybe":jr.call(this,e)}:T&&(Ir.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Pr.test(e)?"maybe":jr.call(this,e)})},Ir.unpatchCanPlayType=function(){var e=Ir.TEST_VID.constructor.prototype.canPlayType;return Ir.TEST_VID.constructor.prototype.canPlayType=jr,e},Ir.patchCanPlayType(),Ir.disposeMediaElement=function(e){if(e){e.parentNode&&e.parentNode.removeChild(e);while(e.hasChildNodes())e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},Ir.resetMediaElement=function(e){if(e){var t=e.querySelectorAll("source"),i=t.length;while(i--)e.removeChild(t[i]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ir.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ir.prototype["set"+mt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){Ir.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){Ir.prototype["set"+mt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ir.prototype[e]=function(){return this.el_[e]()}})),Ti.withSourceHandlers(Ir),Ir.nativeSourceHandler={},Ir.nativeSourceHandler.canPlayType=function(e){try{return Ir.TEST_VID.canPlayType(e)}catch(t){return""}},Ir.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ir.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=ri(e.src);return Ir.nativeSourceHandler.canPlayType("video/"+i)}return""},Ir.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Ir.nativeSourceHandler.dispose=function(){},Ir.registerSourceHandler(Ir.nativeSourceHandler),Ti.registerTech("Html5",Ir);var Dr=B(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),Rr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Mr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Nr=["tiny","xsmall","small","medium","large","xlarge","huge"],Br={};Nr.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Br[e]="vjs-layout-"+t}));var Ur={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Fr=function(e){function t(i,n,r){if(R(this,t),i.id=i.id||n.id||"vjs_video_"+Pe(),n=q(t.getTagSettings(i),n),n.initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"===typeof i.closest){var a=i.closest("[lang]");a&&a.getAttribute&&(n.language=a.getAttribute("lang"))}else{var s=i;while(s&&1===s.nodeType){if(fe(s).hasOwnProperty("lang")){n.language=s.getAttribute("lang");break}s=s.parentNode}}var o=N(this,e.call(this,null,n,r));if(o.log=K(o.id_),o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,!o.options_||!o.options_.techOrder||!o.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(o.tag=i,o.tagAttributes=i&&fe(i),o.language(o.options_.language),n.languages){var l={};Object.getOwnPropertyNames(n.languages).forEach((function(e){l[e.toLowerCase()]=n.languages[e]})),o.languages_=l}else o.languages_=t.prototype.options_.languages;o.cache_={},o.poster_=n.poster||"",o.controls_=!!n.controls,o.cache_.lastVolume=1,i.controls=!1,i.removeAttribute("controls"),i.hasAttribute("autoplay")?o.options_.autoplay=!0:o.autoplay(o.options_.autoplay),o.scrubbing_=!1,o.el_=o.createEl(),o.cache_.lastPlaybackRate=o.defaultPlaybackRate(),pt(o,{eventBusKey:"el_"});var u=yt(o.options_);if(n.plugins){var h=n.plugins;Object.keys(h).forEach((function(e){if("function"!==typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](h[e])}),o)}o.options_.playerOptions=u,o.middleware_=[],o.initChildren(),o.isAudio("audio"===i.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),g||o.addClass("vjs-workinghover"),t.players[o.id_]=o;var d=c.split(".")[0];return o.addClass("vjs-v"+d),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("fullscreenchange",o.handleFullscreenChange_),o.on("stageclick",o.handleStageClick_),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o.changingSrc_=!1,o.playWaitingForReady_=!1,o.playOnLoadstart_=null,o}return M(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Mi(this),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,i=void 0,n=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();n?i=this.el_=t.parentNode:s||(i=this.el_=e.prototype.createEl.call(this,"div"));var o=fe(t);if(s){i=this.el_=t,t=this.tag=a.createElement("video");while(i.children.length)t.appendChild(i.firstChild);ue(i,"video-js")||ce(i,"video-js"),i.appendChild(t),n=this.playerElIngest_=i,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(e){"undefined"!==typeof i[e]&&(t[e]=i[e])}))}if(t.setAttribute("tabindex","-1"),o.tabindex="-1",A&&(t.setAttribute("role","application"),o.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){"class"===e?(i.className+=" "+o[e],s&&(t.className+=" "+o[e])):(i.setAttribute(e,o[e]),s&&t.setAttribute(e,o[e]))})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=i.player=this,this.addClass("vjs-paused"),!0!==r.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Ze("vjs-styles-dimensions");var l=Ie(".vjs-styles-defaults"),u=Ie("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=t.getElementsByTagName("a"),h=0;h<c.length;h++){var d=c.item(h);ce(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!n&&t.parentNode.insertBefore(i,t),le(t,i),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_=i,i},t.prototype.width=function(e){return this.dimension("width",e)},t.prototype.height=function(e){return this.dimension("height",e)},t.prototype.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?Y.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},t.prototype.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,e?(this.addClass("vjs-fluid"),this.fill(!1)):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},t.prototype.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0!==r.VIDEOJS_NO_DYNAMIC_STYLE){var e=void 0,t=void 0,i=void 0,n=void 0;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var a=i.split(":"),s=a[1]/a[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*s,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),et(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*s+"%;\n }\n ")}else{var o="number"===typeof this.width_?this.width_:this.options_.width,l="number"===typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),l>=0&&(u.height=l))}},t.prototype.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=mt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Ti.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var a="string"!==typeof this.autoplay()&&this.autoplay(),s={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};bi.names.forEach((function(e){var t=bi[e];s[t.getterName]=i[t.privateName]})),q(s,this.options_[n]),q(s,this.options_[r]),q(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var o=Ti.getTech(e);if(!o)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new o(s),this.tech_.ready(tt(this,this.handleTechReady_),!0),Bt.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Rr.forEach((function(e){i.on(i.tech_,e,i["handleTech"+mt(e)+"_"])})),Object.keys(Mr).forEach((function(e){i.on(i.tech_,e,(function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Mr[e]+"_"].bind(i),event:t}):i["handleTech"+Mr[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||le(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;bi.names.forEach((function(t){var i=bi[t];e[i.privateName]=e[i.getterName]()})),this.textTracksJson_=Bt.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.prototype.tech=function(e){return void 0===e&&Y.warn(s(Dr)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},t.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){Y("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},t.prototype.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"===typeof e){var i=function(){var e=t.muted();t.muted(!0);var i=t.play();if(i&&i.then&&i["catch"])return i["catch"]((function(i){t.muted(e)}))},n=void 0;if("any"===e?(n=this.play(),n&&n.then&&n["catch"]&&n["catch"]((function(){return i()}))):n="muted"===e?i():this.play(),n&&n.then&&n["catch"])return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})}))["catch"]((function(i){t.trigger({type:"autoplay-failure",autoplay:e})}))}},t.prototype.updateSourceCaches_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,i="";"string"!==typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=Vi(this,t)),this.cache_.source=yt({},e,{src:t,type:i});for(var n=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var l=fe(a[o]);r.push(l),l.src&&l.src===t&&s.push(l.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},t.prototype.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var i=function(e){return t.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=function(){}),i(r),!e.src){var a=function e(i){if("sourceset"!==i.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}t.tech_.off(["sourceset","loadstart"],e)};this.tech_.one(["sourceset","loadstart"],a)}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},t.prototype.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Y.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){Ae(e)&&this.controls_&&(this.paused()?Dt(this.play()):this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready((function(){if(e in Li)return Ii(this.middleware_,this.tech_,e,t);if(e in Pi)return Oi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw Y(i),i}}),!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in ji)return Ai(this.middleware_,this.tech_,e);if(e in Pi)return Oi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Y("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Y("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Y(t),t}}},t.prototype.play=function(){var e=this,t=this.options_.Promise||r.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},t.prototype.play_=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dt;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){e.playWaitingForReady_=!1,t(e.play())}))}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||wt(0,0)},t.prototype.scrubbing=function(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){return"undefined"!==typeof e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=wt(0,0)),e},t.prototype.bufferedPercent=function(){return Et(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return i>t&&(i=t),i},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},t.prototype.requestFullscreen=function(){var e=kt;this.isFullscreen(!0),e.requestFullscreen?(ze(a,e.fullscreenchange,tt(this,(function t(i){this.isFullscreen(a[e.fullscreenElement]),!1===this.isFullscreen()&&Ge(a,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=kt;this.isFullscreen(!1),e.requestFullscreen?a[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=a.documentElement.style.overflow,ze(a,"keydown",tt(this,this.fullWindowOnEscKey)),a.documentElement.style.overflow="hidden",ce(a.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,Ge(a,"keydown",this.fullWindowOnEscKey),a.documentElement.style.overflow=this.docOrigOverflow,he(a.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],a=Ti.getTech(r);if(a||(a=bt.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e),t))return t}else Y.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t=this,i=this.options_.techOrder.map((function(e){return[e,Ti.getTech(e)]})).filter((function(e){var t=e[0],i=e[1];return i?i.isSupported():(Y.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(e,t,i){var n=void 0;return e.some((function(e){return t.some((function(t){if(n=i(e,t),n)return!0}))})),n},r=void 0,a=function(e){return function(t,i){return e(i,t)}},s=function(e,i){var n=e[0],r=e[1];if(r.canPlaySource(i,t.options_[n.toLowerCase()]))return{source:i,tech:n}};return r=this.options_.sourceOrder?n(e,i,a(s)):n(i,e,s),r||!1},t.prototype.src=function(e){var t=this;if("undefined"===typeof e)return this.cache_.src||"";var i=Hi(e);i.length?(this.changingSrc_=!0,this.cache_.sources=i,this.updateSourceCaches_(i[0]),Ci(this,i[0],(function(e,n){t.middleware_=n,t.cache_.sources=i,t.updateSourceCaches_(e);var r=t.src_(e);if(r)return i.length>1?t.src(i.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());xi(n,t.tech_)}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},t.prototype.src_=function(e){var t=this,i=this.selectSource([e]);return!i||(gt(i.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){t.changingSrc_=!1})),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"===typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new jt(e),this.addClass("vjs-error"),Y.error("(CODE:"+this.error_.code+" "+jt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,i=void 0,n=tt(this,this.reportUserActivity),r=function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())},a=function(){n(),this.clearInterval(e),e=this.setInterval(n,250)},s=function(t){n(),this.clearInterval(e)};this.on("mousedown",a),this.on("mousemove",r),this.on("mouseup",s),this.on("keydown",n),this.on("keyup",n);var o=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.prototype.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track,i=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(i)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return yt(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=yt(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];n=yt(n),n.player=void 0,e.tracks[i]=n}return e},t.prototype.createModal=function(e,t){var i=this;t=t||{},t.content=e||"";var n=new Vt(this,t);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open(),n},t.prototype.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Nr.length;i++){var n=Nr[i],r=this.breakpoints_[n];if(t<=r){if(e===n)return;e&&this.removeClass(Br[e]),this.addClass(Br[n]),this.breakpoint_=n;break}}},t.prototype.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},t.prototype.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=q({},Ur,e),this.updateCurrentBreakpoint_()),q(this.breakpoints_)},t.prototype.responsive=function(e){if(void 0===e)return this.responsive_;e=Boolean(e);var t=this.responsive_;return e!==t?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},t.prototype.currentBreakpoint=function(){return this.breakpoint_},t.prototype.currentBreakpointClass=function(){return Br[this.breakpoint_]||""},t.getTagSettings=function(e){var t={sources:[],tracks:[]},i=fe(e),n=i["data-setup"];if(ue(e,"vjs-fill")&&(i.fill=!0),ue(e,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=o(n||"{}"),a=r[0],s=r[1];a&&Y.error(a),q(i,s)}if(q(t,i),e.hasChildNodes())for(var l=e.childNodes,u=0,c=l.length;u<c;u++){var h=l[u],d=h.nodeName.toLowerCase();"source"===d?t.sources.push(fe(h)):"track"===d&&t.tracks.push(fe(h))}return t},t.prototype.flexNotSupported_=function(){var e=a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(bt);bi.names.forEach((function(e){var t=bi[e];Fr.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Fr.players={};var Vr=r.navigator;Fr.prototype.options_={techOrder:Ti.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Vr&&(Vr.languages&&Vr.languages[0]||Vr.userLanguage||Vr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},x||Fr.prototype.options_.children.push("resizeManager"),["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Fr.prototype[e]=function(){return this.techGet_(e)}})),Rr.forEach((function(e){Fr.prototype["handleTech"+mt(e)+"_"]=function(){return this.trigger(e)}})),bt.registerComponent("Player",Fr);var Hr="plugin",qr="activePlugins_",zr={},Gr=function(e){return zr.hasOwnProperty(e)},Wr=function(e){return Gr(e)?zr[e]:void 0},$r=function(e,t){e[qr]=e[qr]||{},e[qr][t]=!0},Xr=function(e,t,i){var n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},Yr=function(e,t){var i=function(){Xr(this,{name:e,plugin:t,instance:null},!0);var i=t.apply(this,arguments);return $r(this,e),Xr(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i},Kr=function(e,t){return t.prototype.name=e,function(){Xr(this,{name:e,plugin:t,instance:null},!0);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var a=new(Function.prototype.bind.apply(t,[null].concat([this].concat(n))));return this[e]=function(){return a},Xr(this,a.getEventHash()),a}},Qr=function(){function e(t){if(R(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,pt(this),delete this.trigger,vt(this,this.constructor.defaultState),$r(t,this.name),this.dispose=tt(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return We(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[qr][e]=!1,this.player=this.state=null,t[e]=Kr(e,zr[e])},e.isBasic=function(t){var i="string"===typeof t?Wr(t):t;return"function"===typeof i&&!e.prototype.isPrototypeOf(i.prototype)},e.registerPlugin=function(t,i){if("string"!==typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+("undefined"===typeof t?"undefined":D(t))+".");if(Gr(t))Y.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Fr.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!==typeof i)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+("undefined"===typeof i?"undefined":D(i))+".");return zr[t]=i,t!==Hr&&(e.isBasic(i)?Fr.prototype[t]=Yr(t,i):Fr.prototype[t]=Kr(t,i)),i},e.deregisterPlugin=function(e){if(e===Hr)throw new Error("Cannot de-register base plugin.");Gr(e)&&(delete zr[e],delete Fr.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(zr),t=void 0;return e.forEach((function(e){var i=Wr(e);i&&(t=t||{},t[e]=i)})),t},e.getPluginVersion=function(e){var t=Wr(e);return t&&t.VERSION||""},e}();Qr.getPlugin=Wr,Qr.BASE_PLUGIN_NAME=Hr,Qr.registerPlugin(Hr,Qr),Fr.prototype.usingPlugin=function(e){return!!this[qr]&&!0===this[qr][e]},Fr.prototype.hasPlugin=function(e){return!!Gr(e)};var Jr=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":D(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)},Zr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function(){e.apply(this,arguments)},n={};for(var r in"object"===("undefined"===typeof t?"undefined":D(t))?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"===typeof t&&(i=t),Jr(i,e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i};"undefined"===typeof HTMLVideoElement&&ie()&&(a.createElement("video"),a.createElement("audio"),a.createElement("track"),a.createElement("video-js"));var ea=function(e){return 0===e.indexOf("#")?e.slice(1):e};function ta(e,t,i){var n=ta.getPlayer(e);if(n)return t&&Y.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var r="string"===typeof e?Ie("#"+ea(e)):e;if(!ne(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");a.body.contains(r)||Y.warn("The element supplied is not included in the DOM"),t=t||{},ta.hooks("beforesetup").forEach((function(e){var i=e(r,yt(t));z(i)&&!Array.isArray(i)?t=yt(t,i):Y.error("please return an object in beforesetup hooks")}));var s=bt.getComponent("Player");return n=new s(r,t,i),ta.hooks("setup").forEach((function(e){return e(n)})),n}if(ta.hooks_={},ta.hooks=function(e,t){return ta.hooks_[e]=ta.hooks_[e]||[],t&&(ta.hooks_[e]=ta.hooks_[e].concat(t)),ta.hooks_[e]},ta.hook=function(e,t){ta.hooks(e,t)},ta.hookOnce=function(e,t){ta.hooks(e,[].concat(t).map((function(t){var i=function i(){return ta.removeHook(e,i),t.apply(void 0,arguments)};return i})))},ta.removeHook=function(e,t){var i=ta.hooks(e).indexOf(t);return!(i<=-1)&&(ta.hooks_[e]=ta.hooks_[e].slice(),ta.hooks_[e].splice(i,1),!0)},!0!==r.VIDEOJS_NO_DYNAMIC_STYLE&&ie()){var ia=Ie(".vjs-styles-defaults");if(!ia){ia=Ze("vjs-styles-defaults");var na=Ie("head");na&&na.insertBefore(ia,na.firstChild),et(ia,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Je(1,ta),ta.VERSION=c,ta.options=Fr.prototype.options_,ta.getPlayers=function(){return Fr.players},ta.getPlayer=function(e){var t=Fr.players,i=void 0;if("string"===typeof e){var n=ea(e),r=t[n];if(r)return r;i=Ie("#"+n)}else i=e;if(ne(i)){var a=i,s=a.player,o=a.playerId;if(s||t[o])return s||t[o]}},ta.getAllPlayers=function(){return Object.keys(Fr.players).map((function(e){return Fr.players[e]})).filter(Boolean)},ta.players=Fr.players,ta.getComponent=bt.getComponent,ta.registerComponent=function(e,t){Ti.isTech(t)&&Y.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),bt.registerComponent.call(bt,e,t)},ta.getTech=Ti.getTech,ta.registerTech=Ti.registerTech,ta.use=ki,!x&&Object.defineProperty?(Object.defineProperty(ta,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ta.middleware,"TERMINATOR",{value:Ei,writeable:!1,enumerable:!0})):ta.middleware={TERMINATOR:Ei},ta.browser=P,ta.TOUCH_ENABLED=j,ta.extend=Zr,ta.mergeOptions=yt,ta.bind=tt,ta.registerPlugin=Qr.registerPlugin,ta.deregisterPlugin=Qr.deregisterPlugin,ta.plugin=function(e,t){return Y.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Qr.registerPlugin(e,t)},ta.getPlugins=Qr.getPlugins,ta.getPlugin=Qr.getPlugin,ta.getPluginVersion=Qr.getPluginVersion,ta.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),ta.options.languages=yt(ta.options.languages,(i={},i[e]=t,i)),ta.options.languages[e]},ta.log=Y,ta.createLogger=K,ta.createTimeRange=ta.createTimeRanges=wt,ta.formatTime=un,ta.setFormatTime=on,ta.resetFormatTime=ln,ta.parseUrl=ii,ta.isCrossOrigin=ai,ta.EventTarget=rt,ta.on=ze,ta.one=$e,ta.off=Ge,ta.trigger=We,ta.xhr=l,ta.TextTrack=ui,ta.AudioTrack=ci,ta.VideoTrack=hi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){ta[e]=function(){return Y.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),je[e].apply(null,arguments)}})),ta.computedStyle=Q,ta.dom=je,ta.url=si,e.exports=ta},e68a:function(e,t){var i=Math.pow(2,32),n=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):n.getUint32(0)*i+n.getUint32(4)};e.exports={getUint64:n,MAX_UINT32:i}},e96b:function(e,t,i){var n=i("0c42");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("7db8cb9e",n,!0,{sourceMap:!1,shadowMode:!1})},e970:function(e,t,i){"use strict";i.r(t);var n=i("5ba9"),r=i("600f");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("3586");var s,o=i("f0c5"),l=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"5467c718",null,!1,n["a"],s);t["default"]=l.exports},e9b0:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(){r(this,e),this.listeners={}}return n(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){var i=void 0;return!!this.listeners[e]&&(i=this.listeners[e].indexOf(t),this.listeners[e].splice(i,1),i>-1)}},{key:"trigger",value:function(e){var t=void 0,i=void 0,n=void 0,r=void 0;if(t=this.listeners[e],t)if(2===arguments.length)for(n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),n=t.length,i=0;i<n;++i)t[i].apply(this,r)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(e){this.on("data",(function(t){e.push(t)}))}}]),e}();t["default"]=a,e.exports=t["default"]},e9b3:function(e,t,i){(function(t){var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=i}).call(this,i("c8ba"))},ea3c:function(e,t){var i="auto",n={"":!0,lr:!0,rl:!0},r={start:!0,middle:!0,end:!0,left:!0,right:!0};function a(e){if("string"!==typeof e)return!1;var t=n[e.toLowerCase()];return!!t&&e.toLowerCase()}function s(e){if("string"!==typeof e)return!1;var t=r[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function l(e,t,n){var r=this,l=/MSIE\s8\.0/.test(navigator.userAgent),u={};l?r=document.createElement("custom"):u.enumerable=!0,r.hasBeenReset=!1;var c="",h=!1,d=e,p=t,f=n,v=null,m="",g=!0,y="auto",b="start",_=50,T="middle",S=50,w="middle";if(Object.defineProperty(r,"id",o({},u,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(r,"pauseOnExit",o({},u,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(r,"startTime",o({},u,{get:function(){return d},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",o({},u,{get:function(){return p},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",o({},u,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",o({},u,{get:function(){return v},set:function(e){v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",o({},u,{get:function(){return m},set:function(e){var t=a(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",o({},u,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",o({},u,{get:function(){return y},set:function(e){if("number"!==typeof e&&e!==i)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",o({},u,{get:function(){return b},set:function(e){var t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",o({},u,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",o({},u,{get:function(){return T},set:function(e){var t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",o({},u,{get:function(){return S},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",o({},u,{get:function(){return w},set:function(e){var t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),r.displayState=void 0,l)return r}l.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=l},ea7c:function(e,t,i){(function(t){var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=i}).call(this,i("c8ba"))},ed4d:function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("a9e3");t.default={name:"u-empty",props:{src:{type:String,default:""},text:{type:String,default:""},color:{type:String,default:"#c0c4cc"},iconColor:{type:String,default:"#c0c4cc"},iconSize:{type:[String,Number],default:120},fontSize:{type:[String,Number],default:26},mode:{type:String,default:"data"},imgWidth:{type:[String,Number],default:120},imgHeight:{type:[String,Number],default:"auto"},show:{type:Boolean,default:!0},marginTop:{type:[String,Number],default:0},iconStyle:{type:Object,default:function(){return{}}}},data:function(){return{icons:{car:"购物车为空",page:"页面不存在",search:"没有搜索结果",address:"没有收货地址",wifi:"没有WiFi",order:"订单为空",coupon:"没有优惠券",favor:"暂无收藏",permission:"无权限",history:"无历史记录",news:"无新闻列表",message:"消息列表为空",list:"列表为空",data:"数据为空"}}}}},ed4db:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)if(i.push(s.value),t&&i.length===t)break}catch(l){r=!0,a=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw a}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function r(e){return e&&e.__esModule?e:{default:e}}var a=i("be09"),s=r(a),o=function(e,t){for(var i=e.cues,n=0;n<i.length;n++){var r=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},l=function(e,t){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(e.segments)for(var r=i,a=void 0,l=0;l<e.segments.length;l++){var u=e.segments[l];if(a||(a=o(t,r+u.duration/2)),a){if("cueIn"in u){a.endTime=r,a.adEndTime=r,r+=u.duration,a=null;continue}if(r<a.endTime){r+=u.duration;continue}a.endTime+=u.duration}else if("cueOut"in u&&(a=new s["default"].VTTCue(r,r+u.duration,u.cueOut),a.adStartTime=r,a.adEndTime=r+parseFloat(u.cueOut),t.addCue(a)),"cueOutCont"in u){var c=void 0,h=void 0,d=u.cueOutCont.split("/").map(parseFloat),p=n(d,2);c=p[0],h=p[1],a=new s["default"].VTTCue(r,r+u.duration,""),a.adStartTime=r-c,a.adEndTime=a.adStartTime+h,t.addCue(a)}r+=u.duration}};t["default"]={updateAdCues:l,findAdCue:o},e.exports=t["default"]},ed7b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4],a=void 0,s=void 0,o=void 0,l=[],u=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,v=void 0;for(a=0;a<256;a++)u[(l[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=u[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,n[s]=p,r[p]=s,d=l[h=l[c=l[s]]],v=16843009*d^65537*h^257*c^16843008*s,f=257*l[p]^16843008*p,a=0;a<4;a++)t[a][s]=f=f<<24^f>>>8,i[a][p]=v=v<<24^v>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e},s=null,o=function(){function e(t){r(this,e),s||(s=a()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var i=void 0,n=void 0,o=void 0,l=void 0,u=void 0,c=this._tables[0][4],h=this._tables[1],d=t.length,p=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(l=t.slice(0),u=[],this._key=[l,u],i=d;i<4*d+28;i++)o=l[i-1],(i%d===0||8===d&&i%d===4)&&(o=c[o>>>24]<<24^c[o>>16&255]<<16^c[o>>8&255]<<8^c[255&o],i%d===0&&(o=o<<8^o>>>24^p<<24,p=p<<1^283*(p>>7))),l[i]=l[i-d]^o;for(n=0;i;n++,i--)o=l[3&n?i:i-4],u[n]=i<=4||n<4?o:h[0][c[o>>>24]]^h[1][c[o>>16&255]]^h[2][c[o>>8&255]]^h[3][c[255&o]]}return n(e,[{key:"decrypt",value:function(e,t,i,n,r,a){var s=this._key[1],o=e^s[0],l=n^s[1],u=i^s[2],c=t^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,v=void 0,m=4,g=this._tables[1],y=g[0],b=g[1],_=g[2],T=g[3],S=g[4];for(v=0;v<f;v++)h=y[o>>>24]^b[l>>16&255]^_[u>>8&255]^T[255&c]^s[m],d=y[l>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&o]^s[m+1],p=y[u>>>24]^b[c>>16&255]^_[o>>8&255]^T[255&l]^s[m+2],c=y[c>>>24]^b[o>>16&255]^_[l>>8&255]^T[255&u]^s[m+3],m+=4,o=h,l=d,u=p;for(v=0;v<4;v++)r[(3&-v)+a]=S[o>>>24]<<24^S[l>>16&255]<<16^S[u>>8&255]<<8^S[255&c]^s[m++],h=o,o=l,l=u,u=c,c=h}}]),e}();t["default"]=o,e.exports=t["default"]},eec7:function(e,t,i){"use strict";var n=i("e9b3"),r=i("8362"),a=i("6444"),s=i("53a8");function o(e,t){for(var i=0;i<e.length;i++)t(e[i])}function l(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function u(e,t,i){var n=e;return r(t)?(i=t,"string"===typeof e&&(n={uri:e})):n=s(t,{uri:e}),n.callback=i,n}function c(e,t,i){return t=u(e,t,i),h(t)}function h(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,n,r){t||(t=!0,e.callback(i,n,r))};function n(){4===p.readyState&&setTimeout(o,0)}function r(){var e=void 0;if(e=p.response?p.response:p.responseText||d(p),_)try{e=JSON.parse(e)}catch(t){}return e}function s(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!h){var t;clearTimeout(f),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var n=T,s=null;return 0!==t?(n={body:r(),statusCode:t,method:m,headers:{},url:v,rawRequest:p},p.getAllResponseHeaders&&(n.headers=a(p.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),i(s,n,n.body)}}var u,h,p=e.xhr||null;p||(p=e.cors||e.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var f,v=p.url=e.uri||e.url,m=p.method=e.method||"GET",g=e.body||e.data,y=p.headers=e.headers||{},b=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:m,url:v,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,y["accept"]||y["Accept"]||(y["Accept"]="application/json"),"GET"!==m&&"HEAD"!==m&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),g=JSON.stringify(!0===e.json?g:e.json))),p.onreadystatechange=n,p.onload=o,p.onerror=s,p.onprogress=function(){},p.onabort=function(){h=!0},p.ontimeout=s,p.open(m,v,!b,e.username,e.password),b||(p.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout((function(){if(!h){h=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",s(e)}}),e.timeout)),p.setRequestHeader)for(u in y)y.hasOwnProperty(u)&&p.setRequestHeader(u,y[u]);else if(e.headers&&!l(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(g||null),p}function d(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}function p(){}e.exports=c,c.XMLHttpRequest=n.XMLHttpRequest||p,c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:n.XDomainRequest,o(["get","put","post","patch","head","delete"],(function(e){c["delete"===e?"del":e]=function(t,i,n){return i=u(t,i,n),i.method=e.toUpperCase(),h(i)}}))},ef34:function(e,t,i){(function(t){var n,r="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},a=i(1);"undefined"!==typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"],n||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=n}).call(this,i("c8ba"))},efe2:function(e,t,i){"use strict";i.r(t);var n=[[{label:"市辖区",value:"1101"}],[{label:"市辖区",value:"1201"}],[{label:"石家庄市",value:"1301"},{label:"唐山市",value:"1302"},{label:"秦皇岛市",value:"1303"},{label:"邯郸市",value:"1304"},{label:"邢台市",value:"1305"},{label:"保定市",value:"1306"},{label:"张家口市",value:"1307"},{label:"承德市",value:"1308"},{label:"沧州市",value:"1309"},{label:"廊坊市",value:"1310"},{label:"衡水市",value:"1311"}],[{label:"太原市",value:"1401"},{label:"大同市",value:"1402"},{label:"阳泉市",value:"1403"},{label:"长治市",value:"1404"},{label:"晋城市",value:"1405"},{label:"朔州市",value:"1406"},{label:"晋中市",value:"1407"},{label:"运城市",value:"1408"},{label:"忻州市",value:"1409"},{label:"临汾市",value:"1410"},{label:"吕梁市",value:"1411"}],[{label:"呼和浩特市",value:"1501"},{label:"包头市",value:"1502"},{label:"乌海市",value:"1503"},{label:"赤峰市",value:"1504"},{label:"通辽市",value:"1505"},{label:"鄂尔多斯市",value:"1506"},{label:"呼伦贝尔市",value:"1507"},{label:"巴彦淖尔市",value:"1508"},{label:"乌兰察布市",value:"1509"},{label:"兴安盟",value:"1522"},{label:"锡林郭勒盟",value:"1525"},{label:"阿拉善盟",value:"1529"}],[{label:"沈阳市",value:"2101"},{label:"大连市",value:"2102"},{label:"鞍山市",value:"2103"},{label:"抚顺市",value:"2104"},{label:"本溪市",value:"2105"},{label:"丹东市",value:"2106"},{label:"锦州市",value:"2107"},{label:"营口市",value:"2108"},{label:"阜新市",value:"2109"},{label:"辽阳市",value:"2110"},{label:"盘锦市",value:"2111"},{label:"铁岭市",value:"2112"},{label:"朝阳市",value:"2113"},{label:"葫芦岛市",value:"2114"}],[{label:"长春市",value:"2201"},{label:"吉林市",value:"2202"},{label:"四平市",value:"2203"},{label:"辽源市",value:"2204"},{label:"通化市",value:"2205"},{label:"白山市",value:"2206"},{label:"松原市",value:"2207"},{label:"白城市",value:"2208"},{label:"延边朝鲜族自治州",value:"2224"}],[{label:"哈尔滨市",value:"2301"},{label:"齐齐哈尔市",value:"2302"},{label:"鸡西市",value:"2303"},{label:"鹤岗市",value:"2304"},{label:"双鸭山市",value:"2305"},{label:"大庆市",value:"2306"},{label:"伊春市",value:"2307"},{label:"佳木斯市",value:"2308"},{label:"七台河市",value:"2309"},{label:"牡丹江市",value:"2310"},{label:"黑河市",value:"2311"},{label:"绥化市",value:"2312"},{label:"大兴安岭地区",value:"2327"}],[{label:"市辖区",value:"3101"}],[{label:"南京市",value:"3201"},{label:"无锡市",value:"3202"},{label:"徐州市",value:"3203"},{label:"常州市",value:"3204"},{label:"苏州市",value:"3205"},{label:"南通市",value:"3206"},{label:"连云港市",value:"3207"},{label:"淮安市",value:"3208"},{label:"盐城市",value:"3209"},{label:"扬州市",value:"3210"},{label:"镇江市",value:"3211"},{label:"泰州市",value:"3212"},{label:"宿迁市",value:"3213"}],[{label:"杭州市",value:"3301"},{label:"宁波市",value:"3302"},{label:"温州市",value:"3303"},{label:"嘉兴市",value:"3304"},{label:"湖州市",value:"3305"},{label:"绍兴市",value:"3306"},{label:"金华市",value:"3307"},{label:"衢州市",value:"3308"},{label:"舟山市",value:"3309"},{label:"台州市",value:"3310"},{label:"丽水市",value:"3311"}],[{label:"合肥市",value:"3401"},{label:"芜湖市",value:"3402"},{label:"蚌埠市",value:"3403"},{label:"淮南市",value:"3404"},{label:"马鞍山市",value:"3405"},{label:"淮北市",value:"3406"},{label:"铜陵市",value:"3407"},{label:"安庆市",value:"3408"},{label:"黄山市",value:"3410"},{label:"滁州市",value:"3411"},{label:"阜阳市",value:"3412"},{label:"宿州市",value:"3413"},{label:"六安市",value:"3415"},{label:"亳州市",value:"3416"},{label:"池州市",value:"3417"},{label:"宣城市",value:"3418"}],[{label:"福州市",value:"3501"},{label:"厦门市",value:"3502"},{label:"莆田市",value:"3503"},{label:"三明市",value:"3504"},{label:"泉州市",value:"3505"},{label:"漳州市",value:"3506"},{label:"南平市",value:"3507"},{label:"龙岩市",value:"3508"},{label:"宁德市",value:"3509"}],[{label:"南昌市",value:"3601"},{label:"景德镇市",value:"3602"},{label:"萍乡市",value:"3603"},{label:"九江市",value:"3604"},{label:"新余市",value:"3605"},{label:"鹰潭市",value:"3606"},{label:"赣州市",value:"3607"},{label:"吉安市",value:"3608"},{label:"宜春市",value:"3609"},{label:"抚州市",value:"3610"},{label:"上饶市",value:"3611"}],[{label:"济南市",value:"3701"},{label:"青岛市",value:"3702"},{label:"淄博市",value:"3703"},{label:"枣庄市",value:"3704"},{label:"东营市",value:"3705"},{label:"烟台市",value:"3706"},{label:"潍坊市",value:"3707"},{label:"济宁市",value:"3708"},{label:"泰安市",value:"3709"},{label:"威海市",value:"3710"},{label:"日照市",value:"3711"},{label:"莱芜市",value:"3712"},{label:"临沂市",value:"3713"},{label:"德州市",value:"3714"},{label:"聊城市",value:"3715"},{label:"滨州市",value:"3716"},{label:"菏泽市",value:"3717"}],[{label:"郑州市",value:"4101"},{label:"开封市",value:"4102"},{label:"洛阳市",value:"4103"},{label:"平顶山市",value:"4104"},{label:"安阳市",value:"4105"},{label:"鹤壁市",value:"4106"},{label:"新乡市",value:"4107"},{label:"焦作市",value:"4108"},{label:"濮阳市",value:"4109"},{label:"许昌市",value:"4110"},{label:"漯河市",value:"4111"},{label:"三门峡市",value:"4112"},{label:"南阳市",value:"4113"},{label:"商丘市",value:"4114"},{label:"信阳市",value:"4115"},{label:"周口市",value:"4116"},{label:"驻马店市",value:"4117"},{label:"省直辖县级行政区划",value:"4190"}],[{label:"武汉市",value:"4201"},{label:"黄石市",value:"4202"},{label:"十堰市",value:"4203"},{label:"宜昌市",value:"4205"},{label:"襄阳市",value:"4206"},{label:"鄂州市",value:"4207"},{label:"荆门市",value:"4208"},{label:"孝感市",value:"4209"},{label:"荆州市",value:"4210"},{label:"黄冈市",value:"4211"},{label:"咸宁市",value:"4212"},{label:"随州市",value:"4213"},{label:"恩施土家族苗族自治州",value:"4228"},{label:"省直辖县级行政区划",value:"4290"}],[{label:"长沙市",value:"4301"},{label:"株洲市",value:"4302"},{label:"湘潭市",value:"4303"},{label:"衡阳市",value:"4304"},{label:"邵阳市",value:"4305"},{label:"岳阳市",value:"4306"},{label:"常德市",value:"4307"},{label:"张家界市",value:"4308"},{label:"益阳市",value:"4309"},{label:"郴州市",value:"4310"},{label:"永州市",value:"4311"},{label:"怀化市",value:"4312"},{label:"娄底市",value:"4313"},{label:"湘西土家族苗族自治州",value:"4331"}],[{label:"广州市",value:"4401"},{label:"韶关市",value:"4402"},{label:"深圳市",value:"4403"},{label:"珠海市",value:"4404"},{label:"汕头市",value:"4405"},{label:"佛山市",value:"4406"},{label:"江门市",value:"4407"},{label:"湛江市",value:"4408"},{label:"茂名市",value:"4409"},{label:"肇庆市",value:"4412"},{label:"惠州市",value:"4413"},{label:"梅州市",value:"4414"},{label:"汕尾市",value:"4415"},{label:"河源市",value:"4416"},{label:"阳江市",value:"4417"},{label:"清远市",value:"4418"},{label:"东莞市",value:"4419"},{label:"中山市",value:"4420"},{label:"潮州市",value:"4451"},{label:"揭阳市",value:"4452"},{label:"云浮市",value:"4453"}],[{label:"南宁市",value:"4501"},{label:"柳州市",value:"4502"},{label:"桂林市",value:"4503"},{label:"梧州市",value:"4504"},{label:"北海市",value:"4505"},{label:"防城港市",value:"4506"},{label:"钦州市",value:"4507"},{label:"贵港市",value:"4508"},{label:"玉林市",value:"4509"},{label:"百色市",value:"4510"},{label:"贺州市",value:"4511"},{label:"河池市",value:"4512"},{label:"来宾市",value:"4513"},{label:"崇左市",value:"4514"}],[{label:"海口市",value:"4601"},{label:"三亚市",value:"4602"},{label:"三沙市",value:"4603"},{label:"儋州市",value:"4604"},{label:"省直辖县级行政区划",value:"4690"}],[{label:"市辖区",value:"5001"},{label:"县",value:"5002"}],[{label:"成都市",value:"5101"},{label:"自贡市",value:"5103"},{label:"攀枝花市",value:"5104"},{label:"泸州市",value:"5105"},{label:"德阳市",value:"5106"},{label:"绵阳市",value:"5107"},{label:"广元市",value:"5108"},{label:"遂宁市",value:"5109"},{label:"内江市",value:"5110"},{label:"乐山市",value:"5111"},{label:"南充市",value:"5113"},{label:"眉山市",value:"5114"},{label:"宜宾市",value:"5115"},{label:"广安市",value:"5116"},{label:"达州市",value:"5117"},{label:"雅安市",value:"5118"},{label:"巴中市",value:"5119"},{label:"资阳市",value:"5120"},{label:"阿坝藏族羌族自治州",value:"5132"},{label:"甘孜藏族自治州",value:"5133"},{label:"凉山彝族自治州",value:"5134"}],[{label:"贵阳市",value:"5201"},{label:"六盘水市",value:"5202"},{label:"遵义市",value:"5203"},{label:"安顺市",value:"5204"},{label:"毕节市",value:"5205"},{label:"铜仁市",value:"5206"},{label:"黔西南布依族苗族自治州",value:"5223"},{label:"黔东南苗族侗族自治州",value:"5226"},{label:"黔南布依族苗族自治州",value:"5227"}],[{label:"昆明市",value:"5301"},{label:"曲靖市",value:"5303"},{label:"玉溪市",value:"5304"},{label:"保山市",value:"5305"},{label:"昭通市",value:"5306"},{label:"丽江市",value:"5307"},{label:"普洱市",value:"5308"},{label:"临沧市",value:"5309"},{label:"楚雄彝族自治州",value:"5323"},{label:"红河哈尼族彝族自治州",value:"5325"},{label:"文山壮族苗族自治州",value:"5326"},{label:"西双版纳傣族自治州",value:"5328"},{label:"大理白族自治州",value:"5329"},{label:"德宏傣族景颇族自治州",value:"5331"},{label:"怒江傈僳族自治州",value:"5333"},{label:"迪庆藏族自治州",value:"5334"}],[{label:"拉萨市",value:"5401"},{label:"日喀则市",value:"5402"},{label:"昌都市",value:"5403"},{label:"林芝市",value:"5404"},{label:"山南市",value:"5405"},{label:"那曲地区",value:"5424"},{label:"阿里地区",value:"5425"}],[{label:"西安市",value:"6101"},{label:"铜川市",value:"6102"},{label:"宝鸡市",value:"6103"},{label:"咸阳市",value:"6104"},{label:"渭南市",value:"6105"},{label:"延安市",value:"6106"},{label:"汉中市",value:"6107"},{label:"榆林市",value:"6108"},{label:"安康市",value:"6109"},{label:"商洛市",value:"6110"}],[{label:"兰州市",value:"6201"},{label:"嘉峪关市",value:"6202"},{label:"金昌市",value:"6203"},{label:"白银市",value:"6204"},{label:"天水市",value:"6205"},{label:"武威市",value:"6206"},{label:"张掖市",value:"6207"},{label:"平凉市",value:"6208"},{label:"酒泉市",value:"6209"},{label:"庆阳市",value:"6210"},{label:"定西市",value:"6211"},{label:"陇南市",value:"6212"},{label:"临夏回族自治州",value:"6229"},{label:"甘南藏族自治州",value:"6230"}],[{label:"西宁市",value:"6301"},{label:"海东市",value:"6302"},{label:"海北藏族自治州",value:"6322"},{label:"黄南藏族自治州",value:"6323"},{label:"海南藏族自治州",value:"6325"},{label:"果洛藏族自治州",value:"6326"},{label:"玉树藏族自治州",value:"6327"},{label:"海西蒙古族藏族自治州",value:"6328"}],[{label:"银川市",value:"6401"},{label:"石嘴山市",value:"6402"},{label:"吴忠市",value:"6403"},{label:"固原市",value:"6404"},{label:"中卫市",value:"6405"}],[{label:"乌鲁木齐市",value:"6501"},{label:"克拉玛依市",value:"6502"},{label:"吐鲁番市",value:"6504"},{label:"哈密市",value:"6505"},{label:"昌吉回族自治州",value:"6523"},{label:"博尔塔拉蒙古自治州",value:"6527"},{label:"巴音郭楞蒙古自治州",value:"6528"},{label:"阿克苏地区",value:"6529"},{label:"克孜勒苏柯尔克孜自治州",value:"6530"},{label:"喀什地区",value:"6531"},{label:"和田地区",value:"6532"},{label:"伊犁哈萨克自治州",value:"6540"},{label:"塔城地区",value:"6542"},{label:"阿勒泰地区",value:"6543"},{label:"自治区直辖县级行政区划",value:"6590"}],[{label:"台北",value:"6601"},{label:"高雄",value:"6602"},{label:"基隆",value:"6603"},{label:"台中",value:"6604"},{label:"台南",value:"6605"},{label:"新竹",value:"6606"},{label:"嘉义",value:"6607"},{label:"宜兰",value:"6608"},{label:"桃园",value:"6609"},{label:"苗栗",value:"6610"},{label:"彰化",value:"6611"},{label:"南投",value:"6612"},{label:"云林",value:"6613"},{label:"屏东",value:"6614"},{label:"台东",value:"6615"},{label:"花莲",value:"6616"},{label:"澎湖",value:"6617"}],[{label:"香港岛",value:"6701"},{label:"九龙",value:"6702"},{label:"新界",value:"6703"}],[{label:"澳门半岛",value:"6801"},{label:"氹仔岛",value:"6802"},{label:"路环岛",value:"6803"},{label:"路氹城",value:"6804"}]];t["default"]=n},f0e2:function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"default",(function(){return ka}));var n=i("be09"),r=i.n(n),a=i("ef34"),s=i.n(a),o=i("df33"),l=i.n(o),u=i("8c10"),c=i.n(u),h=i("3603"),d=i.n(h),p=i("2b8c"),f=i.n(p),v=i("0c01"),m=i("a559"),g=i.n(m),y=i("db19"),b=i("0235"),_=i("3317"),T=i("b8a5"),S=i("8484"),w=i("0a96"),E=i.n(w),k=i("8ff6"),C=i("6a7c"),x=i("699f"),A="8.6.1";const I={},O=function(e,t){return I[e]=I[e]||[],t&&(I[e]=I[e].concat(t)),I[e]},j=function(e,t){O(e,t)},L=function(e,t){const i=O(e).indexOf(t);return!(i<=-1)&&(I[e]=I[e].slice(),I[e].splice(i,1),!0)},P=function(e,t){O(e,[].concat(t).map(t=>{const i=(...n)=>(L(e,i),t(...n));return i}))},D={prefixed:!0},R=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],M=R[0];let N;for(let t=0;t<R.length;t++)if(R[t][1]in s.a){N=R[t];break}if(N){for(let e=0;e<N.length;e++)D[M[e]]=N[e];D.prefixed=N[0]!==M[0]}let B=[];const U=(e,t,i)=>(n,a,s)=>{const o=t.levels[a],l=new RegExp(`^(${o})$`);let u=e;if("log"!==n&&s.unshift(n.toUpperCase()+":"),i&&(u="%c"+e,s.unshift(i)),s.unshift(u+":"),B){B.push([].concat(s));const e=B.length-1e3;B.splice(0,e>0?e:0)}if(!r.a.console)return;let c=r.a.console[n];c||"debug"!==n||(c=r.a.console.info||r.a.console.log),c&&o&&l.test(n)&&c[Array.isArray(s)?"apply":"call"](r.a.console,s)};function F(e,t=":",i=""){let n,r="info";const a=function(...e){n("log",r,e)};return n=U(e,a,i),a.createLogger=(n,r,a)=>{const s=void 0!==r?r:t,o=void 0!==a?a:i,l=`${e} ${s} ${n}`;return F(l,s,o)},a.createNewLogger=(e,t,i)=>F(e,t,i),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=e=>{if("string"===typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);r=e}return r},a.history=()=>B?[].concat(B):[],a.history.filter=e=>(B||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),a.history.clear=()=>{B&&(B.length=0)},a.history.disable=()=>{null!==B&&(B.length=0,B=null)},a.history.enable=()=>{null===B&&(B=[])},a.error=(...e)=>n("error",r,e),a.warn=(...e)=>n("warn",r,e),a.debug=(...e)=>n("debug",r,e),a}const V=F("VIDEOJS"),H=V.createLogger,q=Object.prototype.toString,z=function(e){return $(e)?Object.keys(e):[]};function G(e,t){z(e).forEach(i=>t(e[i],i))}function W(e,t,i=0){return z(e).reduce((i,n)=>t(i,e[n],n),i)}function $(e){return!!e&&"object"===typeof e}function X(e){return $(e)&&"[object Object]"===q.call(e)&&e.constructor===Object}function Y(...e){const t={};return e.forEach(e=>{e&&G(e,(e,i)=>{X(e)?(X(t[i])||(t[i]={}),t[i]=Y(t[i],e)):t[i]=e})}),t}function K(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const n=e[i];t.push(n)}return t}function Q(e,t,i,n=!0){const r=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const e=i();return r(e),e}};return n&&(a.set=r),Object.defineProperty(e,t,a)}var J=Object.freeze({__proto__:null,each:G,reduce:W,isObject:$,isPlain:X,merge:Y,values:K,defineLazyProperty:Q});let Z,ee=!1,te=null,ie=!1,ne=!1,re=!1,ae=!1,se=!1,oe=null,le=null,ue=null,ce=!1,he=!1,de=!1,pe=!1;const fe=Boolean(Te()&&("ontouchstart"in r.a||r.a.navigator.maxTouchPoints||r.a.DocumentTouch&&r.a.document instanceof r.a.DocumentTouch)),ve=r.a.navigator&&r.a.navigator.userAgentData;if(ve&&(ie="Android"===ve.platform,re=Boolean(ve.brands.find(e=>"Microsoft Edge"===e.brand)),ae=Boolean(ve.brands.find(e=>"Chromium"===e.brand)),se=!re&&ae,oe=le=(ve.brands.find(e=>"Chromium"===e.brand)||{}).version||null,he="Windows"===ve.platform),!ae){const e=r.a.navigator&&r.a.navigator.userAgent||"";ee=/iPod/i.test(e),te=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),ie=/Android/i.test(e),Z=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return i&&n?parseFloat(t[1]+"."+t[2]):i||null}(),ne=/Firefox/i.test(e),re=/Edg/i.test(e),ae=/Chrome/i.test(e)||/CriOS/i.test(e),se=!re&&ae,oe=le=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),ue=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),ce=/Safari/i.test(e)&&!se&&!ie&&!re,he=/Windows/i.test(e),de=/iPad/i.test(e)||ce&&fe&&!/iPhone/i.test(e),pe=/iPhone/i.test(e)&&!de}const me=pe||de||ee,ge=(ce||me)&&!se;var ye=Object.freeze({__proto__:null,get IS_IPOD(){return ee},get IOS_VERSION(){return te},get IS_ANDROID(){return ie},get ANDROID_VERSION(){return Z},get IS_FIREFOX(){return ne},get IS_EDGE(){return re},get IS_CHROMIUM(){return ae},get IS_CHROME(){return se},get CHROMIUM_VERSION(){return oe},get CHROME_VERSION(){return le},get IE_VERSION(){return ue},get IS_SAFARI(){return ce},get IS_WINDOWS(){return he},get IS_IPAD(){return de},get IS_IPHONE(){return pe},TOUCH_ENABLED:fe,IS_IOS:me,IS_ANY_SAFARI:ge});function be(e){return"string"===typeof e&&Boolean(e.trim())}function _e(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Te(){return s.a===r.a.document}function Se(e){return $(e)&&1===e.nodeType}function we(){try{return r.a.parent!==r.a.self}catch(e){return!0}}function Ee(e){return function(t,i){if(!be(t))return s.a[e](null);be(i)&&(i=s.a.querySelector(i));const n=Se(i)?i:s.a;return n[e]&&n[e](t)}}function ke(e="div",t={},i={},n){const r=s.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?Ce(r,i):r[e]===i&&"tabIndex"!==e||(r[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&Ge(r,n),r}function Ce(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function xe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ae(e,t){return _e(t),e.classList.contains(t)}function Ie(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e}function Oe(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e):(V.warn("removeClass was called with an element that doesn't exist"),null)}function je(e,t,i){return"function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=void 0),t.split(/\s+/).forEach(t=>e.classList.toggle(t,i)),e}function Le(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const n=t[i];null===n||"undefined"===typeof n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function Pe(e){const t={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const n=e.attributes;for(let e=n.length-1;e>=0;e--){const r=n[e].name;let a=n[e].value;i.includes(r)&&(a=null!==a),t[r]=a}}return t}function De(e,t){return e.getAttribute(t)}function Re(e,t,i){e.setAttribute(t,i)}function Me(e,t){e.removeAttribute(t)}function Ne(){s.a.body.focus(),s.a.onselectstart=function(){return!1}}function Be(){s.a.onselectstart=function(){return!0}}function Ue(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(Ke(e,"height"))),i.width||(i.width=parseFloat(Ke(e,"width"))),i}}function Fe(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let n=0,r=0;while(e.offsetParent&&e!==s.a[D.fullscreenElement])n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:n,top:r,width:t,height:i}}function Ve(e,t){const i={x:0,y:0};if(me){let t=e;while(t&&"html"!==t.nodeName.toLowerCase()){const e=Ke(t,"transform");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}t=t.parentNode}}const n={},r=Fe(t.target),a=Fe(e),s=a.width,o=a.height;let l=t.offsetY-(a.top-r.top),u=t.offsetX-(a.left-r.left);return t.changedTouches&&(u=t.changedTouches[0].pageX-a.left,l=t.changedTouches[0].pageY+a.top,me&&(u-=i.x,l-=i.y)),n.y=1-Math.max(0,Math.min(1,l/o)),n.x=Math.max(0,Math.min(1,u/s)),n}function He(e){return $(e)&&3===e.nodeType}function qe(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function ze(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>("function"===typeof e&&(e=e()),Se(e)||He(e)?e:"string"===typeof e&&/\S/.test(e)?s.a.createTextNode(e):void 0)).filter(e=>e)}function Ge(e,t){return ze(t).forEach(t=>e.appendChild(t)),e}function We(e,t){return Ge(qe(e),t)}function $e(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}const Xe=Ee("querySelector"),Ye=Ee("querySelectorAll");function Ke(e,t){if(!e||!t)return"";if("function"===typeof r.a.getComputedStyle){let n;try{n=r.a.getComputedStyle(e)}catch(i){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}function Qe(e){[...s.a.styleSheets].forEach(t=>{try{const i=[...t.cssRules].map(e=>e.cssText).join(""),n=s.a.createElement("style");n.textContent=i,e.document.head.appendChild(n)}catch(i){const n=s.a.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media.mediaText,n.href=t.href,e.document.head.appendChild(n)}})}var Je=Object.freeze({__proto__:null,isReal:Te,isEl:Se,isInFrame:we,createEl:ke,textContent:Ce,prependTo:xe,hasClass:Ae,addClass:Ie,removeClass:Oe,toggleClass:je,setAttributes:Le,getAttributes:Pe,getAttribute:De,setAttribute:Re,removeAttribute:Me,blockTextSelection:Ne,unblockTextSelection:Be,getBoundingClientRect:Ue,findPosition:Fe,getPointerPosition:Ve,isTextNode:He,emptyEl:qe,normalizeContent:ze,appendContent:Ge,insertContent:We,isSingleLeftClick:$e,$:Xe,$$:Ye,computedStyle:Ke,copyStyleSheetsToWindow:Qe});let Ze,et=!1;const tt=function(){if(!1===Ze.options.autoSetup)return;const e=Array.prototype.slice.call(s.a.getElementsByTagName("video")),t=Array.prototype.slice.call(s.a.getElementsByTagName("audio")),i=Array.prototype.slice.call(s.a.getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(let r=0,a=n.length;r<a;r++){const e=n[r];if(!e||!e.getAttribute){it(1);break}if(void 0===e.player){const t=e.getAttribute("data-setup");null!==t&&Ze(e)}}else et||it(1)};function it(e,t){Te()&&(t&&(Ze=t),r.a.setTimeout(tt,e))}function nt(){et=!0,r.a.removeEventListener("load",nt)}Te()&&("complete"===s.a.readyState?nt():r.a.addEventListener("load",nt));const rt=function(e){const t=s.a.createElement("style");return t.className=e,t},at=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var st=new WeakMap;const ot=3;let lt,ut=ot;function ct(){return ut++}function ht(e,t){if(!st.has(e))return;const i=st.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&st.delete(e)}function dt(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function pt(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const n=e||r.a.event;e={};for(const t in n)"layerX"!==t&&"layerY"!==t&&"keyLocation"!==t&&"webkitMovementX"!==t&&"webkitMovementY"!==t&&"path"!==t&&("returnValue"===t&&n.preventDefault||(e[t]=n[t]));if(e.target||(e.target=e.srcElement||s.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=s.a.documentElement,i=s.a.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const ft=function(){if("boolean"!==typeof lt){lt=!1;try{const e=Object.defineProperty({},"passive",{get(){lt=!0}});r.a.addEventListener("test",null,e),r.a.removeEventListener("test",null,e)}catch(e){}}return lt},vt=["touchstart","touchmove"];function mt(e,t,i){if(Array.isArray(t))return dt(mt,e,t,i);st.has(e)||st.set(e,{});const n=st.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=ct()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(n.disabled)return;t=pt(t);const r=n.handlers[t.type];if(r){const n=r.slice(0);for(let r=0,s=n.length;r<s;r++){if(t.isImmediatePropagationStopped())break;try{n[r].call(e,t,i)}catch(a){V.error(a)}}}}),1===n.handlers[t].length)if(e.addEventListener){let i=!1;ft()&&vt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,n.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function gt(e,t,i){if(!st.has(e))return;const n=st.get(e);if(!n.handlers)return;if(Array.isArray(t))return dt(gt,e,t,i);const r=function(e,t){n.handlers[t]=[],ht(e,t)};if(void 0===t){for(const t in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},t)&&r(e,t);return}const a=n.handlers[t];if(a)if(i){if(i.guid)for(let e=0;e<a.length;e++)a[e].guid===i.guid&&a.splice(e--,1);ht(e,t)}else r(e,t)}function yt(e,t,i){const n=st.has(e)?st.get(e):{},r=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=pt(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)yt.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){st.has(t.target)||st.set(t.target,{});const e=st.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function bt(e,t,i){if(Array.isArray(t))return dt(bt,e,t,i);const n=function(){gt(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||ct(),mt(e,t,n)}function _t(e,t,i){const n=function(){gt(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||ct(),mt(e,t,n)}var Tt=Object.freeze({__proto__:null,fixEvent:pt,on:mt,off:gt,trigger:yt,one:bt,any:_t});const St=30,wt=function(e,t,i){t.guid||(t.guid=ct());const n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},Et=function(e,t){let i=r.a.performance.now();const n=function(...n){const a=r.a.performance.now();a-i>=t&&(e(...n),i=a)};return n},kt=function(e,t,i,n=r.a){let a;const s=()=>{n.clearTimeout(a),a=null},o=function(){const r=this,s=arguments;let o=function(){a=null,o=null,i||e.apply(r,s)};!a&&i&&e.apply(r,s),n.clearTimeout(a),a=n.setTimeout(o,t)};return o.cancel=s,o};var Ct=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:St,bind_:wt,throttle:Et,debounce:kt});let xt;class At{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},mt(this,e,t),this.addEventListener=i}off(e,t){gt(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},bt(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},_t(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;"string"===typeof e&&(e={type:t}),e=pt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),yt(this,e)}queueTrigger(e){xt||(xt=new Map);const t=e.type||e;let i=xt.get(this);i||(i=new Map,xt.set(this,i));const n=i.get(t);i.delete(t),r.a.clearTimeout(n);const a=r.a.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,xt.delete(this)),this.trigger(e)},0);i.set(t,a)}}At.prototype.allowedEvents_={},At.prototype.addEventListener=At.prototype.on,At.prototype.removeEventListener=At.prototype.off,At.prototype.dispatchEvent=At.prototype.trigger;const It=e=>"function"===typeof e.name?e.name():"string"===typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,Ot=e=>e instanceof At||!!e.eventBusEl_&&["on","one","off","trigger"].every(t=>"function"===typeof e[t]),jt=(e,t)=>{Ot(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))},Lt=e=>"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,Pt=(e,t,i)=>{if(!e||!e.nodeName&&!Ot(e))throw new Error(`Invalid target for ${It(t)}#${i}; must be a DOM node or evented object.`)},Dt=(e,t,i)=>{if(!Lt(e))throw new Error(`Invalid event type for ${It(t)}#${i}; must be a non-empty string or array.`)},Rt=(e,t,i)=>{if("function"!==typeof e)throw new Error(`Invalid listener for ${It(t)}#${i}; must be a function.`)},Mt=(e,t,i)=>{const n=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let r,a,s;return n?(r=e.eventBusEl_,t.length>=3&&t.shift(),[a,s]=t):[r,a,s]=t,Pt(r,e,i),Dt(a,e,i),Rt(s,e,i),s=wt(e,s),{isTargetingSelf:n,target:r,type:a,listener:s}},Nt=(e,t,i,n)=>{Pt(e,e,t),e.nodeName?Tt[t](e,i,n):e[t](i,n)},Bt={on(...e){const{isTargetingSelf:t,target:i,type:n,listener:r}=Mt(this,e,"on");if(Nt(i,"on",n,r),!t){const e=()=>this.off(i,n,r);e.guid=r.guid;const t=()=>this.off("dispose",e);t.guid=r.guid,Nt(this,"on","dispose",e),Nt(i,"on","dispose",t)}},one(...e){const{isTargetingSelf:t,target:i,type:n,listener:r}=Mt(this,e,"one");if(t)Nt(i,"one",n,r);else{const e=(...t)=>{this.off(i,n,e),r.apply(null,t)};e.guid=r.guid,Nt(i,"one",n,e)}},any(...e){const{isTargetingSelf:t,target:i,type:n,listener:r}=Mt(this,e,"any");if(t)Nt(i,"any",n,r);else{const e=(...t)=>{this.off(i,n,e),r.apply(null,t)};e.guid=r.guid,Nt(i,"any",n,e)}},off(e,t,i){if(!e||Lt(e))gt(this.eventBusEl_,e,t);else{const n=e,r=t;Pt(n,this,"off"),Dt(r,this,"off"),Rt(i,this,"off"),i=wt(this,i),this.off("dispose",i),n.nodeName?(gt(n,r,i),gt(n,"dispose",i)):Ot(n)&&(n.off(r,i),n.off("dispose",i))}},trigger(e,t){Pt(this.eventBusEl_,this,"trigger");const i=e&&"string"!==typeof e?e.type:e;if(!Lt(i))throw new Error(`Invalid event type for ${It(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return yt(this.eventBusEl_,e,t)}};function Ut(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=ke("span",{className:"vjs-event-bus"});return Object.assign(e,Bt),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on("dispose",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&st.has(e)&&st.delete(e)})),r.a.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const Ft={state:{},setState(e){let t;return"function"===typeof e&&(e=e()),G(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&Ot(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Vt(e,t){return Object.assign(e,Ft),e.state=Object.assign({},e.state,t),"function"===typeof e.handleStateChanged&&Ot(e)&&e.on("statechanged",e.handleStateChanged),e}const Ht=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toLowerCase())},qt=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},zt=function(e,t){return qt(e)===qt(t)};var Gt=Object.freeze({__proto__:null,toLowerCase:Ht,toTitleCase:qt,titleCaseEquals:zt});class Wt{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Y({},this.options_),t=this.options_=Y(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${ct()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(e=>this.addClass(e)),["on","off","one","any","trigger"].forEach(e=>{this[e]=void 0}),!1!==t.evented&&(Ut(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Vt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}on(e,t){}off(e,t){}one(e,t){}any(e,t){}trigger(e,t){}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=Y(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return ke(e,t,i)}localize(e,t,i=e){const n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],s=n&&n.split("-")[0],o=r&&r[s];let l=i;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const n=t[i-1];let r=n;return"undefined"===typeof n&&(r=e),r}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i="http://www.w3.org/2000/svg",n=ke("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),r=s.a.createElementNS(i,"svg");r.setAttributeNS(null,"viewBox","0 0 512 512");const a=s.a.createElementNS(i,"use");return r.appendChild(a),a.setAttributeNS(null,"href","#vjs-icon-"+e),n.appendChild(r),this.iconIsSet_?t.replaceChild(n,t.querySelector(".vjs-icon-placeholder")):t.appendChild(n),this.iconIsSet_=!0,n}addChild(e,t={},i=this.children_.length){let n,r;if("string"===typeof e){r=qt(e);const i=t.componentClass||r;t.name=r;const a=Wt.getComponent(i);if(!a)throw new Error(`Component ${i} does not exist`);if("function"!==typeof a)return null;n=new a(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,"function"===typeof n.id&&(this.childIndex_[n.id()]=n),r=r||n.name&&qt(n.name()),r&&(this.childNameIndex_[r]=n,this.childNameIndex_[Ht(r)]=n),"function"===typeof n.el&&n.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Se(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(n.el(),e)}return n}removeChild(e){if("string"===typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[qt(e.name())]=null,this.childNameIndex_[Ht(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let n=e.opts;if(void 0!==t[i]&&(n=t[i]),!1===n)return;!0===n&&(n={}),n.playerOptions=this.options_.playerOptions;const r=this.addChild(i,n);r&&(this[i]=r)};let n;const r=Wt.getComponent("Tech");n=Array.isArray(e)?e:Object.keys(e),n.concat(Object.keys(this.options_).filter((function(e){return!n.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map(t=>{let i,n;return"string"===typeof t?(i=t,n=e[i]||this.options_[i]||{}):(i=t.name,n=t),{name:i,opts:n}}).filter(e=>{const t=Wt.getComponent(e.opts.componentClass||qt(e.name));return t&&!r.isTech(t)}).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return Xe(e,t||this.contentEl())}$$(e,t){return Ye(e,t||this.contentEl())}hasClass(e){return Ae(this.el_,e)}addClass(...e){Ie(this.el_,...e)}removeClass(...e){Oe(this.el_,...e)}toggleClass(e,t){je(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return De(this.el_,e)}setAttribute(e,t){Re(this.el_,e,t)}removeAttribute(e){Me(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;const n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+qt(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Ke(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i="offset"+qt(e);t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(l.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const i=10,n=200;let a;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=r.a.performance.now(),a=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)a=!1;else if(t){const n=e.touches[0].pageX-t.pageX,r=e.touches[0].pageY-t.pageY,s=Math.sqrt(n*n+r*r);s>i&&(a=!1)}}));const s=function(){a=!1};this.on("touchleave",s),this.on("touchcancel",s),this.on("touchend",(function(i){if(t=null,!0===a){const t=r.a.performance.now()-e;t<n&&(i.preventDefault(),this.trigger("tap"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=wt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=wt(this,e),this.clearTimersOnDispose_(),i=r.a.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),r.a.clearTimeout(e)),e}setInterval(e,t){e=wt(this,e),this.clearTimersOnDispose_();const i=r.a.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),r.a.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=wt(this,e),t=r.a.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){if(this.namedRafs_.has(e))return;this.clearTimersOnDispose_(),t=wt(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),r.a.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}static registerComponent(e,t){if("string"!==typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=Wt.getComponent("Tech"),n=i&&i.isTech(t),r=Wt===t||Wt.prototype.isPrototypeOf(t.prototype);if(n||!r){let t;throw t=n?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=qt(e),Wt.components_||(Wt.components_={});const a=Wt.getComponent("Player");if("Player"===e&&a&&a.players){const e=a.players,t=Object.keys(e);if(e&&t.length>0&&t.map(t=>e[t]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return Wt.components_[e]=t,Wt.components_[Ht(e)]=t,t}static getComponent(e){if(e&&Wt.components_)return Wt.components_[e]}}function $t(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}function Xt(e,t,i,n){return $t(e,n,i.length-1),i[n][t]}function Yt(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Xt.bind(null,"start",0,e),end:Xt.bind(null,"end",1,e)},r.a.Symbol&&r.a.Symbol.iterator&&(t[r.a.Symbol.iterator]=()=>(e||[]).values()),t}function Kt(e,t){return Array.isArray(e)?Yt(e):void 0===e||void 0===t?Yt():Yt([[e,t]])}Wt.registerComponent("Component",Wt);const Qt=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600);const a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),r=r>0||s>0?r+":":"",n=((r||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,r+n+i};let Jt=Qt;function Zt(e){Jt=e}function ei(){Jt=Qt}function ti(e,t=e){return Jt(e,t)}var ii=Object.freeze({__proto__:null,createTimeRanges:Kt,createTimeRange:Kt,setFormatTime:Zt,resetFormatTime:ei,formatTime:ti});function ni(e,t){let i,n,r=0;if(!t)return 0;e&&e.length||(e=Kt(0,0));for(let a=0;a<e.length;a++)i=e.start(a),n=e.end(a),n>t&&(n=t),r+=n-i;return r/t}function ri(e){if(e instanceof ri)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:$(e)&&("number"===typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=ri.defaultMessages[this.code]||"")}ri.prototype.code=0,ri.prototype.message="",ri.prototype.status=null,ri.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ri.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(let t=0;t<ri.errorTypes.length;t++)ri[ri.errorTypes[t]]=t,ri.prototype[ri.errorTypes[t]]=t;function ai(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function si(e){ai(e)&&e.then(null,e=>{})}const oi=function(e){const t=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,i,n)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))});return t},li=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,e=>e.track),n=Array.prototype.map.call(t,(function(e){const t=oi(e.track);return e.src&&(t.src=e.src),t}));return n.concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(oi))},ui=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))})),t.textTracks()};var ci={textTracksToJson:li,jsonToTextTracks:ui,trackToJson_:oi};const hi="vjs-modal-dialog";class di extends Wt{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=ke("div",{className:hi+"-content"},{role:"document"}),this.descEl_=ke("p",{className:hi+"-description vjs-control-text",id:this.el().getAttribute("aria-describedby")}),Ce(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${hi} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(!this.opened_){const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}}opened(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"===typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),We(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);const r=this.getChild("closeButton");r&&i.appendChild(r.el_)}empty(){this.trigger("beforemodalempty"),qe(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!==typeof e&&(this.content_=e),this.content_}conditionalFocus_(){const e=s.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(e.stopPropagation(),l.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(!l.a.isEventKey(e,"Tab"))return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let n;for(let r=0;r<t.length;r++)if(i===t[r]){n=r;break}s.a.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,e=>(e instanceof r.a.HTMLAnchorElement||e instanceof r.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r.a.HTMLInputElement||e instanceof r.a.HTMLSelectElement||e instanceof r.a.HTMLTextAreaElement||e instanceof r.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r.a.HTMLIFrameElement||e instanceof r.a.HTMLObjectElement||e instanceof r.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable"))}}di.prototype.options_={pauseOnOpen:!0,temporary:!0},Wt.registerComponent("ModalDialog",di);class pi extends At{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Ot(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}pi.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const t in pi.prototype.allowedEvents_)pi.prototype["on"+t]=null;const fi=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class vi extends pi{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){fi(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&fi(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,fi(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const mi=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class gi extends pi{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){mi(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&mi(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,mi(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class yi extends pi{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);const t=["metadata","chapters"];-1===t.indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class bi{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"===typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"===typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class _i{constructor(e){_i.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const n=e.length;this.cues_=e,this.length_=e.length;const r=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)}getCueById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}const Ti={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Si={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},wi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ei={disabled:"disabled",hidden:"hidden",showing:"showing"};class ki extends At{constructor(e={}){super();const t={id:e.id||"vjs_track_"+ct(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const n in t)Object.defineProperty(this,n,{get(){return t[n]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const Ci=function(e){const t=["protocol","hostname","port","pathname","search","hash","host"],i=s.a.createElement("a");i.href=e;const n={};for(let r=0;r<t.length;r++)n[t[r]]=i[t[r]];return"http:"===n.protocol&&(n.host=n.host.replace(/:80$/,"")),"https:"===n.protocol&&(n.host=n.host.replace(/:443$/,"")),n.protocol||(n.protocol=r.a.location.protocol),n.host||(n.host=r.a.location.host),n},xi=function(e){if(!e.match(/^https?:\/\//)){const t=s.a.createElement("a");t.href=e,e=t.href}return e},Ai=function(e){if("string"===typeof e){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},Ii=function(e,t=r.a.location){const i=Ci(e),n=":"===i.protocol?t.protocol:i.protocol,a=n+i.host!==t.protocol+t.host;return a};var Oi=Object.freeze({__proto__:null,parseUrl:Ci,getAbsoluteURL:xi,getFileExtension:Ai,isCrossOrigin:Ii});const ji=function(e,t){const i=new r.a.WebVTT.Parser(r.a,r.a.vttjs,r.a.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(r.a.console&&r.a.console.groupCollapsed&&r.a.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(e=>V.error(e)),r.a.console&&r.a.console.groupEnd&&r.a.console.groupEnd()),i.flush()},Li=function(e,t){const i={uri:e},n=Ii(e);n&&(i.cors=n);const a="use-credentials"===t.tech_.crossOrigin();a&&(i.withCredentials=a),d()(i,wt(this,(function(e,i,n){if(e)return V.error(e,i);t.loaded_=!0,"function"!==typeof r.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],e=>{if("vttjserror"!==e.type)return ji(n,t);V.error("vttjs failed to load, stopping trying to process "+t.src)}):ji(n,t)})))};class Pi extends ki{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=Y(e,{kind:wi[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=Ei[t.mode]||"disabled";const n=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const r=new _i(this.cues_),a=new _i(this.activeCues_);let s=!1;this.timeupdateHandler=wt(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,s&&(this.trigger("cuechange"),s=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));const o=()=>{this.stopTracking()};this.tech_.one("dispose",o),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get(){return n},set(){}},mode:{get(){return i},set(e){Ei[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Li(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?r:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return a;const e=this.tech_.currentTime(),t=[];for(let i=0,n=this.cues.length;i<n;i++){const n=this.cues[i];n.startTime<=e&&n.endTime>=e&&t.push(n)}if(s=!1,t.length!==this.activeCues_.length)s=!0;else for(let i=0;i<t.length;i++)-1===this.activeCues_.indexOf(t[i])&&(s=!0);return this.activeCues_=t,a.setCues_(this.activeCues_),a},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&Li(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new r.a.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let n=0;n<i.length;n++)i[n]!==this&&i[n].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}removeCue(e){let t=this.cues_.length;while(t--){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}Pi.prototype.allowedEvents_={cuechange:"cuechange"};class Di extends ki{constructor(e={}){const t=Y(e,{kind:Si[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class Ri extends ki{constructor(e={}){const t=Y(e,{kind:Ti[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Mi extends At{constructor(e={}){let t;super();const i=new Pi(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return i}}}),t=Mi.NONE,i.addEventListener("loadeddata",()=>{t=Mi.LOADED,this.trigger({type:"load",target:this})})}}Mi.prototype.allowedEvents_={load:"load"},Mi.NONE=0,Mi.LOADING=1,Mi.LOADED=2,Mi.ERROR=3;const Ni={audio:{ListClass:vi,TrackClass:Di,capitalName:"Audio"},video:{ListClass:gi,TrackClass:Ri,capitalName:"Video"},text:{ListClass:yi,TrackClass:Pi,capitalName:"Text"}};Object.keys(Ni).forEach((function(e){Ni[e].getterName=e+"Tracks",Ni[e].privateName=e+"Tracks_"}));const Bi={remoteText:{ListClass:yi,TrackClass:Pi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:bi,TrackClass:Mi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ui=Object.assign({},Ni,Bi);function Fi(e,t,i,n,r={}){const a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;const s=new Ui.text.TrackClass(r);return a.addTrack(s),s}Bi.names=Object.keys(Bi),Ni.names=Object.keys(Ni),Ui.names=[].concat(Bi.names).concat(Ni.names);class Vi extends Wt{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),Ui.names.forEach(t=>{const i=Ui[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new Ui.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(wt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Kt(0,0)}bufferedPercent(){return ni(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Ni.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(e=>{const t=this[e+"Tracks"]()||[];let i=t.length;while(i--){const n=t[i];"text"===e&&this.removeRemoteTextTrack(n),t.removeTrack(n)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;while(t--){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new ri(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Kt(0,0):Kt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Ni.names.forEach(e=>{const t=Ni[e],i=()=>{this.trigger(e+"trackchange")},n=this[t.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),this.on("dispose",()=>{n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!r.a.WebVTT)if(s.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&X(f.a)&&Object.keys(f.a).length>0)return void this.trigger("vttjsloaded");const e=s.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),r.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),n=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",n),this.addWebVttScript_();const r=()=>this.trigger("texttrackchange"),a=()=>{r();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",r),"showing"===i.mode&&i.addEventListener("cuechange",r)}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",(function(){t.off("addtrack",i),t.off("removetrack",n),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",r)}}))}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return Fi(this,e,t,i)}createRemoteTextTrack(e){const t=Y(e,{tech:this});return new Bi.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return"boolean"!==typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=ct();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Vi.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Vi||e instanceof Vi||e===Vi}static registerTech(e,t){if(Vi.techs_||(Vi.techs_={}),!Vi.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Vi.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Vi.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=qt(e),Vi.techs_[e]=t,Vi.techs_[Ht(e)]=t,"Tech"!==e&&Vi.defaultTechOrder_.push(e),t}static getTech(e){if(e)return Vi.techs_&&Vi.techs_[e]?Vi.techs_[e]:(e=qt(e),r.a&&r.a.videojs&&r.a.videojs[e]?(V.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),r.a.videojs[e]):void 0)}}Ui.names.forEach((function(e){const t=Ui[e];Vi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Vi.prototype.featuresVolumeControl=!0,Vi.prototype.featuresMuteControl=!0,Vi.prototype.featuresFullscreenResize=!1,Vi.prototype.featuresPlaybackRate=!1,Vi.prototype.featuresProgressEvents=!1,Vi.prototype.featuresSourceset=!1,Vi.prototype.featuresTimeupdateEvents=!1,Vi.prototype.featuresNativeTextTracks=!1,Vi.prototype.featuresVideoFrameCallback=!1,Vi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let n;for(let e=0;e<i.length;e++)if(n=i[e].canPlayType(t),n)return n;return""},e.selectSourceHandler=function(t,i){const n=e.sourceHandlers||[];let r;for(let e=0;e<n.length;e++)if(r=n[e].canHandleSource(t,i),r)return n[e];return null},e.canPlaySource=function(t,i){const n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""};const t=["seekable","seeking","duration"];t.forEach((function(e){const t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:V.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Wt.registerComponent("Tech",Vi),Vi.registerTech("Tech",Vi),Vi.defaultTechOrder_=[];const Hi={},qi={},zi={};function Gi(e,t){Hi[e]=Hi[e]||[],Hi[e].push(t)}function Wi(e,t,i){e.setTimeout(()=>an(t,Hi[t.type],i,e),1)}function $i(e,t){e.forEach(e=>e.setTech&&e.setTech(t))}function Xi(e,t,i){return e.reduceRight(en(i),t[i]())}function Yi(e,t,i,n){return t[i](e.reduce(en(i),n))}function Ki(e,t,i,n=null){const r="call"+qt(i),a=e.reduce(en(r),n),s=a===zi,o=s?null:t[i](a);return tn(e,i,o,s),o}const Qi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Ji={setCurrentTime:1,setMuted:1,setVolume:1},Zi={play:1,pause:1};function en(e){return(t,i)=>t===zi?zi:i[e]?i[e](t):t}function tn(e,t,i,n){for(let r=e.length-1;r>=0;r--){const a=e[r];a[t]&&a[t](n,i)}}function nn(e){qi[e.id()]=null}function rn(e,t){const i=qi[e.id()];let n=null;if(void 0===i||null===i)return n=t(e),qi[e.id()]=[[t,n]],n;for(let r=0;r<i.length;r++){const[e,a]=i[r];e===t&&(n=a)}return null===n&&(n=t(e),i.push([t,n])),n}function an(e={},t=[],i,n,r=[],a=!1){const[s,...o]=t;if("string"===typeof s)an(e,Hi[s],i,n,r,a);else if(s){const t=rn(n,s);if(!t.setSource)return r.push(t),an(e,o,i,n,r,a);t.setSource(Object.assign({},e),(function(s,l){if(s)return an(e,o,i,n,r,a);r.push(t),an(l,e.type===l.type?o:Hi[l.type],i,n,r,a)}))}else o.length?an(e,o,i,n,r,a):a?i(e,r):an(e,Hi["*"],i,n,r,!0)}const sn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},on=function(e=""){const t=Ai(e),i=sn[t.toLowerCase()];return i||""},ln=(e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const n=e.$$("source");for(let r=0;r<n.length;r++){const e=n[r];if(e.type&&e.src&&e.src===t)return e.type}return on(t)},un=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=un(e),Array.isArray(e)?t=t.concat(e):$(e)&&t.push(e)})),e=t}else e="string"===typeof e&&e.trim()?[cn({src:e})]:$(e)&&"string"===typeof e.src&&e.src&&e.src.trim()?[cn(e)]:[];return e};function cn(e){if(!e.type){const t=on(e.src);t&&(e.type=t)}return e}var hn='<svg xmlns="http://www.w3.org/2000/svg">\n <defs>\n <symbol viewBox="0 0 48 48" id="vjs-icon-play">\n <path d="M16 10v28l22-14z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-pause">\n <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-audio">\n <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-captions">\n <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">\n <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">\n <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">\n <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">\n <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">\n <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">\n <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">\n <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">\n <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">\n <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>\n </symbol>\n <symbol viewBox="0 0 24 24" id="vjs-icon-hd">\n <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">\n <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>\n </symbol>\n <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">\n <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">\n <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">\n <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">\n <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-share">\n <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cog">\n <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-square">\n <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle">\n <circle cx="24" cy="24" r="20"></circle>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">\n <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">\n <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">\n <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-replay">\n <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">\n <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">\n <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">\n <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">\n <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">\n <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">\n <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>\n </symbol>\n <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">\n <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>\n </symbol>\n <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">\n <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">\n <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">\n <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">\n <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-cast">\n <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>\n </symbol>\n <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">\n <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>\n </symbol>\n <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">\n <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>\n <path fill="none" d="M-1-3h24v24H-1z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">\n <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">\n <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-twitter">\n <path d="M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5T1369.5 1125 1185 1335.5t-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5T285 1033q33 5 61 5 43 0 85-11-112-23-185.5-111.5T172 710v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5T884 653q-8-38-8-74 0-134 94.5-228.5T1199 256q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">\n <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>\n </symbol>\n <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">\n <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>\n </symbol>\n </defs>\n</svg>';class dn extends Wt{constructor(e,t,i){const n=Y({createEl:!1},t);if(super(e,n,i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let r=0,a=t.playerOptions.techOrder;r<a.length;r++){const t=qt(a[r]);let i=Vi.getTech(t);if(t||(i=Wt.getComponent(t)),i&&i.isSupported()){e.loadTech_(t);break}}}}Wt.registerComponent("MediaLoader",dn);class pn extends Wt{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&V.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const n=ke(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=ke("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,Ce(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return"vjs-control vjs-button "+super.buildCSSClass()}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}Wt.registerComponent("ClickableComponent",pn);class fn extends pn{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return ke("div",{className:"vjs-poster"})}crossOrigin(e){if("undefined"===typeof e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(ke("picture",{className:"vjs-poster",tabIndex:-1},{},ke("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?si(this.player_.play()):this.player_.pause())}}fn.prototype.crossorigin=fn.prototype.crossOrigin,Wt.registerComponent("PosterImage",fn);const vn="#222",mn="#ccc",gn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function yn(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function bn(e,t,i){try{e.style[t]=i}catch(n){return}}function _n(e){return e?e+"px":""}class Tn extends Wt{constructor(e,t,i){super(e,t,i);const n=e=>this.updateDisplay(e),a=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",e=>this.toggleDisplay(e)),e.on("texttrackchange",n),e.on("loadedmetadata",e=>{this.updateDisplayOverlay(),this.preselectTrack(e)}),e.ready(wt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",a),e.on("playerresize",a);const t=r.a.screen.orientation||r.a,i=r.a.screen.orientation?"change":"orientationchange";t.addEventListener(i,a),e.on("dispose",()=>t.removeEventListener(i,a));const n=this.options_.playerOptions.tracks||[];for(let e=0;e<n.length;e++)this.player_.addRemoteTextTrack(n[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let n,r,a;for(let s=0;s<t.length;s++){const o=t[s];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?a=o:a||(a=o):i&&!i.enabled?(a=null,n=null,r=null):o.default&&("descriptions"!==o.kind||n?o.kind in e&&!r&&(r=o):n=o)}a?a.mode="showing":r?r.mode="showing":n&&(n.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"===typeof r.a.WebVTT&&r.a.WebVTT.processCues(r.a,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const n=e[i];"showing"===n.mode&&t.push(n)}return void this.updateForTrack(t)}let i=null,n=null,r=e.length;while(r--){const t=e[r];"showing"===t.mode&&("descriptions"===t.kind?i=t:n=t)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}updateDisplayOverlay(){if(!this.player_.videoHeight()||!r.a.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,n=this.player_.videoWidth()/this.player_.videoHeight();let a=0,s=0;Math.abs(i-n)>.1&&(i>n?a=Math.round((e-t*n)/2):s=Math.round((t-e/n)/2)),bn(this.el_,"insetInline",_n(a)),bn(this.el_,"insetBlock",_n(s))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let n=i.length;while(n--){const e=i[n];if(!e)continue;const a=e.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&bn(a.firstChild,"color",yn(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&bn(a.firstChild,"backgroundColor",yn(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?bn(a,"backgroundColor",yn(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?a.firstChild.style.textShadow=`2px 2px 3px ${vn}, 2px 2px 4px ${vn}, 2px 2px 5px ${vn}`:"raised"===t.edgeStyle?a.firstChild.style.textShadow=`1px 1px ${vn}, 2px 2px ${vn}, 3px 3px ${vn}`:"depressed"===t.edgeStyle?a.firstChild.style.textShadow=`1px 1px ${mn}, 0 1px ${mn}, -1px -1px ${vn}, 0 -1px ${vn}`:"uniform"===t.edgeStyle&&(a.firstChild.style.textShadow=`0 0 4px ${vn}, 0 0 4px ${vn}, 0 0 4px ${vn}, 0 0 4px ${vn}`)),t.fontPercent&&1!==t.fontPercent){const e=r.a.parseFloat(a.style.fontSize);a.style.fontSize=e*t.fontPercent+"px",a.style.height="auto",a.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=gn[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!==typeof r.a.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const n=e[i];for(let e=0;e<n.activeCues.length;++e)t.push(n.activeCues[e])}r.a.WebVTT.processCues(r.a,t,this.el_);for(let i=0;i<e.length;++i){const t=e[i];for(let e=0;e<t.activeCues.length;++e){const n=t.activeCues[e].displayState;Ie(n,"vjs-text-track-cue","vjs-text-track-cue-"+(t.language?t.language:i)),t.language&&Re(n,"lang",t.language)}this.player_.textTrackSettings&&this.updateDisplayState(t)}}}Wt.registerComponent("TextTrackDisplay",Tn);class Sn extends Wt{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=ke("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),n=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}Wt.registerComponent("LoadingSpinner",Sn);class wn extends pn{createEl(e,t={},i={}){e="button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i);const n=ke(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}addChild(e,t={}){const i=this.constructor.name;return V.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),Wt.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter")?e.stopPropagation():super.handleKeyDown(e)}}Wt.registerComponent("Button",wn);class En extends wn{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",e=>this.handleMouseDown(e))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e)return si(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(!n)return void this.player_.tech(!0).focus();const r=()=>n.focus();ai(t)?t.then(r,()=>{}):this.setTimeout(r,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}En.prototype.controlText_="Play Video",Wt.registerComponent("BigPlayButton",En);class kn extends wn{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button "+super.buildCSSClass()}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){l.a.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}Wt.registerComponent("CloseButton",kn);class Cn extends wn{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",e=>this.handlePlay(e)),this.on(e,"pause",e=>this.handlePause(e)),t.replay&&this.on(e,"ended",e=>this.handleEnded(e))}buildCSSClass(){return"vjs-play-control "+super.buildCSSClass()}handleClick(e){this.player_.paused()?si(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",e=>this.handleSeeked(e))}}Cn.prototype.controlText_="Play",Wt.registerComponent("PlayToggle",Cn);class xn extends Wt{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended"],e=>this.updateContent(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:e+" vjs-time-control vjs-control"}),i=ke("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return t.appendChild(i),this.contentEl_=ke("span",{className:e+"-display"},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}updateTextNode_(e=0){e=ti(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,V.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=s.a.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}xn.prototype.labelText_="Time",xn.prototype.controlText_="Time",Wt.registerComponent("TimeDisplay",xn);class An extends xn{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}An.prototype.labelText_="Current Time",An.prototype.controlText_="Current Time",Wt.registerComponent("CurrentTimeDisplay",An);class In extends xn{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}In.prototype.labelText_="Duration",In.prototype.controlText_="Duration",Wt.registerComponent("DurationDisplay",In);class On extends Wt{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}Wt.registerComponent("TimeDivider",On);class jn extends xn{constructor(e,t){super(e,t),this.on(e,"durationchange",e=>this.updateContent(e))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(ke("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!==typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}jn.prototype.labelText_="Remaining Time",jn.prototype.controlText_="Remaining Time",Wt.registerComponent("RemainingTimeDisplay",jn);class Ln extends Wt{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",e=>this.updateShowing(e))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ke("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ke("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(s.a.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}Wt.registerComponent("LiveDisplay",Ln);class Pn extends wn{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=ke("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function Dn(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}Pn.prototype.controlText_="Seek to live, currently playing live",Wt.registerComponent("SeekToLive",Pn);var Rn=Object.freeze({__proto__:null,clamp:Dn});class Mn extends Wt{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||se||e.preventDefault(),Ne(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Be(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"})),e}getProgress(){return Number(Dn(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Ve(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){l.a.isEventKey(e,"Left")||l.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):l.a.isEventKey(e,"Right")||l.a.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}Wt.registerComponent("Slider",Mn);const Nn=(e,t)=>Dn(e/t*100,0,100).toFixed(2)+"%";class Bn extends Wt{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",e=>this.update(e))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=ke("span",{className:"vjs-control-text"}),i=ke("span",{textContent:this.localize("Loaded")}),n=s.a.createTextNode(": ");return this.percentageEl_=ke("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,a=Nn(n,i);this.percent_!==a&&(this.el_.style.width=a,Ce(this.percentageEl_,a),this.percent_=a);for(let s=0;s<t.length;s++){const e=t.start(s),i=t.end(s);let a=r[s];a||(a=this.el_.appendChild(ke()),r[s]=a),a.dataset.start===e&&a.dataset.end===i||(a.dataset.start=e,a.dataset.end=i,a.style.left=Nn(e,n),a.style.width=Nn(i-e,n))}for(let s=r.length;s>t.length;s--)this.el_.removeChild(r[s-1]);r.length=t.length})}}Wt.registerComponent("LoadProgressBar",Bn);class Un extends Wt{constructor(e,t){super(e,t),this.update=Et(wt(this,this.update),St)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const n=Fe(this.el_),r=Ue(this.player_.el()),a=e.width*t;if(!r||!n)return;const s=e.left-r.left+a,o=e.width-a+(r.right-e.right);let l=n.width/2;s<l?l+=l-s:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ce(this.el_,e)}updateTime(e,t,i,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let r;const a=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;r=(i<1?"":"-")+ti(i,e)}else r=ti(i,a);this.update(e,t,r),n&&n()})}}Wt.registerComponent("TimeTooltip",Un);class Fn extends Wt{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=Et(wt(this,this.update),St)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}}Fn.prototype.options_={children:[]},me||ie||Fn.prototype.options_.children.push("timeTooltip"),Wt.registerComponent("PlayProgressBar",Fn);class Vn extends Wt{constructor(e,t){super(e,t),this.update=Et(wt(this,this.update),St)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+"px"})}}Vn.prototype.options_={children:["timeTooltip"]},Wt.registerComponent("MouseTimeDisplay",Vn);const Hn=5,qn=12;class zn extends Mn{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=wt(this,this.update),this.update=Et(this.update_,St),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s.a&&"visibilityState"in s.a&&this.on(s.a,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===s.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,St))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===s.a.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let n=this.player_.duration();i&&i.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===e&&this.duration_===n||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[ti(e,n),ti(n,n)],"{1} of {2}")),this.currentTime_=e,this.duration_=n),this.bar&&this.bar.update(Ue(this.el()),this.getProgress())}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){$e(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!$e(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();const e=r.seekableStart(),t=r.liveCurrentTime();if(i=e+n*r.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=n*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.userSeek_(i)}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?si(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+Hn)}stepBack(){this.userSeek_(this.player_.currentTime()-Hn)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(l.a.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(l.a.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(l()(e))){e.preventDefault(),e.stopPropagation();const i=10*(l.a.codes[l()(e)]-l.a.codes["0"])/100;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else l.a.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-Hn*qn)):l.a.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+Hn*qn)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s.a&&"visibilityState"in s.a&&this.off(s.a,"visibilitychange",this.toggleVisibility_),super.dispose()}}zn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},me||ie||zn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Wt.registerComponent("SeekBar",zn);class Gn extends Wt{constructor(e,t){super(e,t),this.handleMouseMove=Et(wt(this,this.handleMouseMove),St),this.throttledHandleMouseSeek=Et(wt(this,this.handleMouseSeek),St),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(!i&&!n)return;const r=t.el(),a=Fe(r);let s=Ve(r,e).x;s=Dn(s,0,1),n&&n.update(a,s),i&&i.update(a,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&si(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Gn.prototype.options_={children:["seekBar"]},Wt.registerComponent("ProgressControl",Gn);class Wn extends wn{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],e=>this.handlePictureInPictureChange(e)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control vjs-hidden "+super.buildCSSClass()}handlePictureInPictureAudioModeChange(){const e="audio"===this.player_.currentType().substring(0,5),t=e||this.player_.audioPosterMode()||this.player_.audioOnlyMode();t?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){s.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in r.a?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"===typeof s.a.exitPictureInPicture&&super.show()}}Wn.prototype.controlText_="Picture-in-Picture",Wt.registerComponent("PictureInPictureToggle",Wn);class $n extends wn{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",e=>this.handleFullscreenChange(e)),!1===s.a[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control "+super.buildCSSClass()}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}$n.prototype.controlText_="Fullscreen",Wt.registerComponent("FullscreenToggle",$n);const Xn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))};class Yn extends Wt{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}Wt.registerComponent("VolumeLevel",Yn);class Kn extends Wt{constructor(e,t){super(e,t),this.update=Et(wt(this,this.update),St)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,n){if(!i){const i=Ue(this.el_),n=Ue(this.player_.el()),r=e.width*t;if(!n||!i)return;const a=e.left-n.left+r,s=e.width-r+(n.right-e.right);let o=i.width/2;a<o?o+=o-a:s<o&&(o=s),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(n+"%")}write(e){Ce(this.el_,e)}updateVolume(e,t,i,n,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,n.toFixed(0)),r&&r()})}}Wt.registerComponent("VolumeLevelTooltip",Kn);class Qn extends Wt{constructor(e,t){super(e,t),this.update=Et(wt(this,this.update),St)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const n=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,n,()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"})}}Qn.prototype.options_={children:["volumeLevelTooltip"]},Wt.registerComponent("MouseVolumeLevelDisplay",Qn);class Jn extends Mn{constructor(e,t){super(e,t),this.on("slideractive",e=>this.updateLastVolume_(e)),this.on(e,"volumechange",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){$e(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),n=Ue(i),r=this.vertical();let a=Ve(i,e);a=r?a.y:a.x,a=Dn(a,0,1),t.update(n,a,r)}$e(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Jn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},me||ie||Jn.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Jn.prototype.playerEvent="volumechange",Wt.registerComponent("VolumeBar",Jn);class Zn extends Wt{constructor(e,t={}){t.vertical=t.vertical||!1,("undefined"===typeof t.volumeBar||X(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),Xn(this,e),this.throttledHandleMouseMove=Et(wt(this,this.handleMouseMove),St),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",e=>this.handleMouseDown(e)),this.on("touchstart",e=>this.handleMouseDown(e)),this.on("mousemove",e=>this.handleMouseMove(e)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control "+e})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}Zn.prototype.options_={children:["volumeBar"]},Wt.registerComponent("VolumeControl",Zn);const er=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))};class tr extends wn{constructor(e,t){super(e,t),er(this,e),this.on(e,["loadstart","volumechange"],e=>this.update(e))}buildCSSClass(){return"vjs-mute-control "+super.buildCSSClass()}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),me&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Oe(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?" ":""}vjs-vol-${t}`,"")),Ie(this.el_,"vjs-vol-"+t)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}tr.prototype.controlText_="Mute",Wt.registerComponent("MuteToggle",tr);class ir extends Wt{constructor(e,t={}){"undefined"!==typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"===typeof t.volumeControl||X(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,"keyup",e=>this.handleKeyPress(e)),this.on(this.volumeControl,"keyup",e=>this.handleVolumeControlKeyUp(e)),this.on("keydown",e=>this.handleKeyPress(e)),this.on("mouseover",e=>this.handleMouseOver(e)),this.on("mouseout",e=>this.handleMouseOut(e)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control "+e})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){l.a.isEventKey(e,"Esc")&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),mt(s.a,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),gt(s.a,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){l.a.isEventKey(e,"Esc")&&this.handleMouseOut()}}ir.prototype.options_={children:["muteToggle","volumeControl"]},Wt.registerComponent("VolumePanel",ir);class nr extends wn{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("forward-"+this.skipTime),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()?i.seekableEnd():this.player_.duration();let r;r=t+this.skipTime<=n?t+this.skipTime:n,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}Wt.registerComponent("SkipForward",nr);class rr extends wn{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon("replay-"+this.skipTime),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()&&i.seekableStart();let r;r=n&&t-this.skipTime<=n?n:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}rr.prototype.controlText_="Skip Backward",Wt.registerComponent("SkipBackward",rr);class ar extends Wt{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof Wt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof Wt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"===typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=ke(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),mt(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||s.a.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){l.a.isEventKey(e,"Left")||l.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(l.a.isEventKey(e,"Right")||l.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice(),i=t.length&&t[0].hasClass("vjs-menu-title");i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}Wt.registerComponent("Menu",ar);class sr extends Wt{constructor(e,t={}){super(e,t),this.menuButton_=new wn(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=wn.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",e=>this.handleKeyDown(e)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),mt(s.a,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",e=>this.handleMouseLeave(e)),this.on("keydown",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new ar(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=ke("li",{className:"vjs-menu-title",textContent:qt(this.options_.title),tabIndex:-1}),i=new Wt(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";!0===this.options_.inline?e+="-inline":e+="-popup";const t=wn.prototype.buildCSSClass();return`vjs-menu-button ${e} ${t} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),gt(s.a,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),l.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(l.a.isEventKey(e,"Up")||l.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),l.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),me&&we())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}Wt.registerComponent("MenuButton",sr);class or extends sr{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const n=wt(this,this.update);i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),this.player_.on("ready",n),this.player_.on("dispose",(function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)}))}}Wt.registerComponent("TrackButton",or);const lr=["Tab","Esc","Up","Down","Right","Left"];class ur extends pn{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const n=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i),r=ke("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?n.appendChild(r):n.replaceChild(r,n.querySelector(".vjs-icon-placeholder")),n}handleKeyDown(e){lr.some(t=>l.a.isEventKey(e,t))||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}Wt.registerComponent("MenuItem",ur);class cr extends ur{constructor(e,t){const i=t.track,n=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const a=(...e)=>{this.handleTracksChange.apply(this,e)},o=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],a),n.addEventListener("change",a),n.addEventListener("selectedlanguagechange",o),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],a),n.removeEventListener("change",a),n.removeEventListener("selectedlanguagechange",o)})),void 0===n.onchange){let e;this.on(["tap","click"],(function(){if("object"!==typeof r.a.Event)try{e=new r.a.Event("change")}catch(t){}e||(e=s.a.createEvent("Event"),e.initEvent("change",!0,!0)),n.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let n=0;n<i.length;n++){const e=i[n];-1!==this.kinds.indexOf(e.kind)&&(e===t?"showing"!==e.mode&&(e.mode="showing"):"disabled"!==e.mode&&(e.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}Wt.registerComponent("TextTrackMenuItem",cr);class hr extends cr{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,r=t.length;n<r;n++){const e=t[n];if(this.options_.kinds.indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,r=t.length;n<r;n++){const e=t[n];if(["captions","descriptions","subtitles"].indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}Wt.registerComponent("OffTextTrackMenuItem",hr);class dr extends or{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=cr){let i;this.label_&&(i=this.label_+" off"),e.push(new hr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let r=0;r<n.length;r++){const i=n[r];if(this.kinds_.indexOf(i.kind)>-1){const n=new t(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});n.addClass(`vjs-${i.kind}-menu-item`),e.push(n)}}return e}}Wt.registerComponent("TextTrackButton",dr);class pr extends ur{constructor(e,t){const i=t.track,n=t.cue,r=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=r&&r<n.endTime,super(e,t),this.track=i,this.cue=n}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Wt.registerComponent("ChaptersTrackMenuItem",pr);class fr extends dr{constructor(e,t,i){super(e,t,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return"vjs-chapters-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-chapters-button "+super.buildWrapperCSSClass()}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,n=t.length;i<n;i++){const n=t[i],r=new pr(this.player_,{track:this.track_,cue:n});e.push(r)}return e}}fr.prototype.kind_="chapters",fr.prototype.controlText_="Chapters",Wt.registerComponent("ChaptersButton",fr);class vr extends dr{constructor(e,t,i){super(e,t,i),this.setIcon("audio-description");const n=e.textTracks(),r=wt(this,this.handleTracksChange);n.addEventListener("change",r),this.on("dispose",(function(){n.removeEventListener("change",r)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let n=0,r=t.length;n<r;n++){const e=t[n];if(e.kind!==this.kind_&&"showing"===e.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return"vjs-descriptions-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-descriptions-button "+super.buildWrapperCSSClass()}}vr.prototype.kind_="descriptions",vr.prototype.controlText_="Descriptions",Wt.registerComponent("DescriptionsButton",vr);class mr extends dr{constructor(e,t,i){super(e,t,i),this.setIcon("subtitles")}buildCSSClass(){return"vjs-subtitles-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-subtitles-button "+super.buildWrapperCSSClass()}}mr.prototype.kind_="subtitles",mr.prototype.controlText_="Subtitles",Wt.registerComponent("SubtitlesButton",mr);class gr extends cr{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}Wt.registerComponent("CaptionSettingsMenuItem",gr);class yr extends dr{constructor(e,t,i){super(e,t,i),this.setIcon("captions")}buildCSSClass(){return"vjs-captions-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-captions-button "+super.buildWrapperCSSClass()}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new gr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}yr.prototype.kind_="captions",yr.prototype.controlText_="Captions",Wt.registerComponent("CaptionsButton",yr);class br extends cr{createEl(e,t,i){const n=super.createEl(e,t,i),r=n.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",n):r.appendChild(ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(ke("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),n}}Wt.registerComponent("SubsCapsMenuItem",br);class _r extends dr{constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(qt(this.label_))}buildCSSClass(){return"vjs-subs-caps-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-subs-caps-button "+super.buildWrapperCSSClass()}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new gr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,br),e}}_r.prototype.kinds_=["captions","subtitles"],_r.prototype.controlText_="Subtitles",Wt.registerComponent("SubsCapsButton",_r);class Tr extends ur{constructor(e,t){const i=t.track,n=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const r=(...e)=>{this.handleTracksChange.apply(this,e)};n.addEventListener("change",r),this.on("dispose",()=>{n.removeEventListener("change",r)})}createEl(e,t,i){const n=super.createEl(e,t,i),r=n.querySelector(".vjs-menu-item-text");return["main-desc","description"].indexOf(this.options_.track.kind)>=0&&(r.appendChild(ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(ke("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}Wt.registerComponent("AudioTrackMenuItem",Tr);class Sr extends or{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return"vjs-audio-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-audio-button "+super.buildWrapperCSSClass()}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];e.push(new Tr(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e}}Sr.prototype.controlText_="Audio Track",Wt.registerComponent("AudioTrackButton",Sr);class wr extends ur{constructor(e,t){const i=t.rate,n=parseFloat(i,10);t.label=i,t.selected=n===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=n,this.on(e,"ratechange",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}wr.prototype.contentElType="button",Wt.registerComponent("PlaybackRateMenuItem",wr);class Er extends sr{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",e=>this.updateVisibility(e)),this.on(e,"ratechange",e=>this.updateLabel(e)),this.on(e,"playbackrateschange",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=ke("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-playback-rate "+super.buildWrapperCSSClass()}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new wr(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Er.prototype.controlText_="Playback Rate",Wt.registerComponent("PlaybackRateMenuButton",Er);class kr extends Wt{buildCSSClass(){return"vjs-spacer "+super.buildCSSClass()}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}Wt.registerComponent("Spacer",kr);class Cr extends kr{buildCSSClass(){return"vjs-custom-control-spacer "+super.buildCSSClass()}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}Wt.registerComponent("CustomControlSpacer",Cr);class xr extends Wt{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}xr.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},Wt.registerComponent("ControlBar",xr);class Ar extends di{constructor(e,t){super(e,t),this.on(e,"error",e=>this.open(e))}buildCSSClass(){return"vjs-error-display "+super.buildCSSClass()}content(){const e=this.player().error();return e?this.localize(e.message):""}}Ar.prototype.options_=Object.assign({},di.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Wt.registerComponent("ErrorDisplay",Ar);const Ir="vjs-text-track-settings",Or=["#000","Black"],jr=["#00F","Blue"],Lr=["#0FF","Cyan"],Pr=["#0F0","Green"],Dr=["#F0F","Magenta"],Rr=["#F00","Red"],Mr=["#FFF","White"],Nr=["#FF0","Yellow"],Br=["1","Opaque"],Ur=["0.5","Semi-Transparent"],Fr=["0","Transparent"],Vr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Or,Mr,Rr,Pr,jr,Nr,Dr,Lr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Br,Ur,Fr]},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Mr,Or,Rr,Pr,jr,Nr,Dr,Lr]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Br,Ur]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[Fr,Ur,Br]}};function Hr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function qr(e,t){const i=e.options[e.options.selectedIndex].value;return Hr(i,t)}function zr(e,t,i){if(t)for(let n=0;n<e.options.length;n++)if(Hr(e.options[n].value,i)===t){e.selectedIndex=n;break}}Vr.windowColor.options=Vr.backgroundColor.options;class Gr extends di{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.endDialog=ke("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.on(this.$(".vjs-done-button"),"click",()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),"click",()=>{this.setDefaults(),this.updateDisplay()}),G(Vr,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}),this.options_.persistTextTrackSettings&&this.restoreSettings()}dispose(){this.endDialog=null,super.dispose()}createElSelect_(e,t="",i="label"){const n=Vr[e],r=n.id.replace("%s",this.id_),a=[t,r].join(" ").trim();return[`<${i} id="${r}" class="${"label"===i?"vjs-label":""}">`,this.localize(n.label),`</${i}>`,`<select aria-labelledby="${a}">`].concat(n.options.map(e=>{const t=r+"-"+e[1].replace(/\W+/g,"");return[`<option id="${t}" value="${e[0]}" `,`aria-labelledby="${a} ${t}">`,this.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")}createElFgColor_(){const e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg vjs-track-setting">',`<legend id="${e}">`,this.localize("Text"),"</legend>",'<span class="vjs-text-color">',this.createElSelect_("color",e),"</span>",'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")}createElBgColor_(){const e="captions-background-"+this.id_;return['<fieldset class="vjs-bg vjs-track-setting">',`<legend id="${e}">`,this.localize("Text Background"),"</legend>",'<span class="vjs-bg-color">',this.createElSelect_("backgroundColor",e),"</span>",'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")}createElWinColor_(){const e="captions-window-"+this.id_;return['<fieldset class="vjs-window vjs-track-setting">',`<legend id="${e}">`,this.localize("Caption Area Background"),"</legend>",'<span class="vjs-window-color">',this.createElSelect_("windowColor",e),"</span>",'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")}createElColors_(){return ke("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}createElFont_(){return ke("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})}createElControls_(){const e=this.localize("restore all settings to the default values");return ke("div",{className:"vjs-track-settings-controls",innerHTML:[`<button type="button" class="vjs-default-button" title="${e}">`,this.localize("Reset"),`<span class="vjs-control-text"> ${e}</span>`,"</button>",`<button type="button" class="vjs-done-button">${this.localize("Done")}</button>`].join("")})}content(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return W(Vr,(e,t,i)=>{const n=qr(this.$(t.selector),t.parser);return void 0!==n&&(e[i]=n),e},{})}setValues(e){G(Vr,(t,i)=>{zr(this.$(t.selector),e[i],t.parser)})}setDefaults(){G(Vr,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(r.a.localStorage.getItem(Ir))}catch(t){V.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?r.a.localStorage.setItem(Ir,JSON.stringify(e)):r.a.localStorage.removeItem(Ir)}catch(t){V.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}conditionalBlur_(){this.previouslyActiveEl_=null;const e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()}handleLanguagechange(){this.fill()}}Wt.registerComponent("TextTrackSettings",Gr);class Wr extends Wt{constructor(e,t){let i=t.ResizeObserver||r.a.ResizeObserver;null===t.ResizeObserver&&(i=!1);const n=Y({createEl:!i,reportTouchActivity:!1},t);super(e,n),this.ResizeObserver=t.ResizeObserver||r.a.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=kt(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){gt(this,"resize",e),gt(this,"unload",t),t=null};mt(this.el_.contentWindow,"unload",t),mt(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}Wt.registerComponent("ResizeManager",Wr);const $r={trackingThreshold:20,liveTolerance:15};class Xr extends Wt{constructor(e,t){const i=Y($r,t,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",e=>this.handleDurationchange(e)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(r.a.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const n=this.liveCurrentTime(),a=this.player_.currentTime();let s=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-a)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,St),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;while(i--)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;while(i--)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"===typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}Wt.registerComponent("LiveTracker",Xr);class Yr extends Wt{constructor(e,t){super(e,t),this.on("statechanged",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:ke("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-"+ct()}),description:ke("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-"+ct()})},ke("div",{className:"vjs-title-bar"},{},K(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(e=>{const n=this.state[e],r=this.els[e],a=i[e];qe(r),n&&Ce(r,n),t&&(t.removeAttribute(a),n&&t.setAttribute(a,r.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}Wt.registerComponent("TitleBar",Yr);const Kr=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),n=[];let r="";if(!i.length)return!1;for(let a=0;a<i.length;a++){const e=i[a].src;e&&-1===n.indexOf(e)&&n.push(e)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},Qr=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=s.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=s.a.createDocumentFragment();while(t.childNodes.length)i.appendChild(t.childNodes[0]);return this.innerText="",r.a.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Jr=(e,t)=>{let i={};for(let n=0;n<e.length;n++)if(i=Object.getOwnPropertyDescriptor(e[n],t),i&&i.set&&i.get)break;return i.enumerable=!0,i.configurable=!0,i},Zr=e=>Jr([e.el(),r.a.HTMLMediaElement.prototype,r.a.Element.prototype,Qr],"innerHTML"),ea=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},n=Zr(e),r=i=>(...n)=>{const r=i.apply(t,n);return Kr(e),r};["append","appendChild","insertAdjacentHTML"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=r(i[e]))}),Object.defineProperty(t,"innerHTML",Y(n,{set:r(n.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)},ta=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?xi(r.a.Element.prototype.getAttribute.call(this,"src")):""},set(e){return r.a.Element.prototype.setAttribute.call(this,"src",e),e}}),ia=e=>Jr([e.el(),r.a.HTMLMediaElement.prototype,ta],"src"),na=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=ia(e),n=t.setAttribute,r=t.load;Object.defineProperty(t,"src",Y(i,{set:n=>{const r=i.set.call(t,n);return e.triggerSourceset(t.src),r}})),t.setAttribute=(i,r)=>{const a=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),a},t.load=()=>{const i=r.call(t);return Kr(e)||(e.triggerSourceset(""),ea(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Kr(e)||ea(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=r,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class ra extends Vi{constructor(e,t){super(e,t);const i=e.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];while(t--){const r=e[t],a=r.nodeName.toLowerCase();"track"===a&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),this.textTracks().addTrack(r.track),n||this.el_.hasAttribute("crossorigin")||!Ii(r.src)||(n=!0)):i.push(r))}for(let n=0;n<i.length;n++)this.el_.removeChild(i[n])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&n&&V.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(fe||pe)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),ra.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){na(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",()=>e.removeEventListener("change",i));const n=()=>{for(let e=0;e<t.length;e++){const i=t[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach(e=>{const t=this.el()[i+"Tracks"];t.removeEventListener(e,this[i+"TracksListeners_"][e])}),this[`featuresNative${e}Tracks`]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=Ni[e],i=this.el()[t.getterName],n=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const r={change:t=>{const i={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(i),"text"===e&&this[Bi.remoteText.getterName]().trigger(i)},addtrack(e){n.addTrack(e.track)},removetrack(e){n.removeTrack(e.track)}},a=function(){const e=[];for(let t=0;t<n.length;t++){let r=!1;for(let e=0;e<i.length;e++)if(i[e]===n[t]){r=!0;break}r||e.push(n[t])}while(e.length)n.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=r,Object.keys(r).forEach(e=>{const t=r[e];i.addEventListener(e,t),this.on("dispose",n=>i.removeEventListener(e,t))}),this.on("loadstart",a),this.on("dispose",e=>this.off("loadstart",a))}proxyNativeTracks_(){Ni.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),ra.disposeMediaElement(e),e=t}else{e=s.a.createElement("video");const t=this.options_.tag&&Pe(this.options_.tag),i=Y({},t);fe&&!0===this.options_.nativeControlsForTouch||delete i.controls,Le(e,Object.assign(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Re(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const n=t[i],r=this.options_[n];"undefined"!==typeof r&&(r?Re(e,n,n):Me(e,n),e[n]=r)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const i=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",i),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&ge?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){V(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&ie&&se&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return"function"===typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)si(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}reset(){ra.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=s.a.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;while(i--)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r.a.performance&&(e.creationTime=r.a.performance.now()),e}}Q(ra,"TEST_VID",(function(){if(!Te())return;const e=s.a.createElement("video"),t=s.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),ra.isSupported=function(){try{ra.TEST_VID.volume=.5}catch(e){return!1}return!(!ra.TEST_VID||!ra.TEST_VID.canPlayType)},ra.canPlayType=function(e){return ra.TEST_VID.canPlayType(e)},ra.canPlaySource=function(e,t){return ra.canPlayType(e.type)},ra.canControlVolume=function(){try{const e=ra.TEST_VID.volume;ra.TEST_VID.volume=e/2+.1;const t=e!==ra.TEST_VID.volume;return t&&me?(r.a.setTimeout(()=>{ra&&ra.prototype&&(ra.prototype.featuresVolumeControl=e!==ra.TEST_VID.volume)}),!1):t}catch(e){return!1}},ra.canMuteVolume=function(){try{const e=ra.TEST_VID.muted;return ra.TEST_VID.muted=!e,ra.TEST_VID.muted?Re(ra.TEST_VID,"muted","muted"):Me(ra.TEST_VID,"muted","muted"),e!==ra.TEST_VID.muted}catch(e){return!1}},ra.canControlPlaybackRate=function(){if(ie&&se&&le<58)return!1;try{const e=ra.TEST_VID.playbackRate;return ra.TEST_VID.playbackRate=e/2+.1,e!==ra.TEST_VID.playbackRate}catch(e){return!1}},ra.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(s.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},ra.supportsNativeTextTracks=function(){return ge||me&&se},ra.supportsNativeVideoTracks=function(){return!(!ra.TEST_VID||!ra.TEST_VID.videoTracks)},ra.supportsNativeAudioTracks=function(){return!(!ra.TEST_VID||!ra.TEST_VID.audioTracks)},ra.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function([e,t]){Q(ra.prototype,e,()=>ra[t](),!0)})),ra.prototype.featuresVolumeControl=ra.canControlVolume(),ra.prototype.movingMediaElementInDOM=!me,ra.prototype.featuresFullscreenResize=!0,ra.prototype.featuresProgressEvents=!0,ra.prototype.featuresTimeupdateEvents=!0,ra.prototype.featuresVideoFrameCallback=!(!ra.TEST_VID||!ra.TEST_VID.requestVideoFrameCallback),ra.disposeMediaElement=function(e){if(e){e.parentNode&&e.parentNode.removeChild(e);while(e.hasChildNodes())e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},ra.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;while(i--)e.removeChild(t[i]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){ra.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){ra.prototype["set"+qt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){ra.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){ra.prototype["set"+qt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){ra.prototype[e]=function(){return this.el_[e]()}})),Vi.withSourceHandlers(ra),ra.nativeSourceHandler={},ra.nativeSourceHandler.canPlayType=function(e){try{return ra.TEST_VID.canPlayType(e)}catch(t){return""}},ra.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return ra.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Ai(e.src);return ra.nativeSourceHandler.canPlayType("video/"+t)}return""},ra.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},ra.nativeSourceHandler.dispose=function(){},ra.registerSourceHandler(ra.nativeSourceHandler),Vi.registerTech("Html5",ra);const aa=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],sa={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},oa=["tiny","xsmall","small","medium","large","xlarge","huge"],la={};oa.forEach(e=>{const t="x"===e.charAt(0)?"x-"+e.substring(1):e;la[e]="vjs-layout-"+t});const ua={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class ca extends Wt{constructor(e,t,i){if(e.id=e.id||t.id||"vjs_video_"+ct(),t=Object.assign(ca.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.isFullscreen_=!1,this.log=H(this.id_),this.fsApi_=D,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Pe(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=ca.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if("function"!==typeof this[e])throw new Error(`plugin "${e}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Ut(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(mt(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=Y(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=new r.a.DOMParser,t=e.parseFromString(hn,"image/svg+xml"),i=t.querySelector("parsererror");if(i)V.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const e=t.documentElement;e.style.display="none",this.el_.appendChild(e),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),fe&&this.addClass("vjs-touch-enabled"),me||this.addClass("vjs-workinghover"),ca.players[this.id_]=this;const a=A.split(".")[0];this.addClass("vjs-v"+a),this.userActive(!0),this.reportUserActivity(),this.one("play",e=>this.listenForUserActivity_(e)),this.on("keydown",e=>this.handleKeyDown(e)),this.on("languagechange",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),gt(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),gt(s.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),ca.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),nn(this),Ui.names.forEach(e=>{const t=Ui[e],i=this[t.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const n="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:n||(e=this.el_=super.createEl("div"));const a=Pe(t);if(n){e=this.el_=t,t=this.tag=s.a.createElement("video");while(e.children.length)t.appendChild(e.firstChild);Ae(e,"video-js")||Ie(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(n){}})}if(t.setAttribute("tabindex","-1"),a.tabindex="-1",se&&he&&(t.setAttribute("role","application"),a.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach((function(i){n&&"class"===i||e.setAttribute(i,a[i]),n&&t.setAttribute(i,a[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused"),!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=rt("vjs-styles-dimensions");const e=Xe(".vjs-styles-defaults"),t=Xe("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const o=t.getElementsByTagName("a");for(let r=0;r<o.length;r++){const e=o.item(r);Ie(e,"vjs-hidden"),e.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),xe(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if("undefined"===typeof e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):V.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();const n=parseFloat(t);isNaN(n)?V.error(`Improper value "${t}" supplied for for ${e}`):(this[i]=n,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,Ot(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),jt(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===r.a.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"===typeof this.width_?this.width_:this.options_.width,t="number"===typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,n;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const a=i.split(":"),s=a[1]/a[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*s,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),at(this.styleEl_,`\n .${n} {\n width: ${e}px;\n height: ${t}px;\n }\n\n .${n}.vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: ${100*s}%;\n }\n `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=qt(e),n=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(Vi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let r=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(r=!1);const a={source:t,autoplay:r,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Ui.names.forEach(e=>{const t=Ui[e];a[t.getterName]=this[t.privateName]}),Object.assign(a,this.options_[i]),Object.assign(a,this.options_[n]),Object.assign(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);const s=Vi.getTech(e);if(!s)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new s(a),this.tech_.ready(wt(this,this.handleTechReady_),!0),ci.jsonToTextTracks(this.textTracksJson_||[],this.tech_),aa.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${qt(e)}_`](t))}),Object.keys(sa).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${sa[e]}_`].bind(this),event:t}):this[`handleTech${sa[e]}_`](t)})}),this.on(this.tech_,"loadstart",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,"sourceset",e=>this.handleTechSourceset_(e)),this.on(this.tech_,"waiting",e=>this.handleTechWaiting_(e)),this.on(this.tech_,"ended",e=>this.handleTechEnded_(e)),this.on(this.tech_,"seeking",e=>this.handleTechSeeking_(e)),this.on(this.tech_,"play",e=>this.handleTechPlay_(e)),this.on(this.tech_,"pause",e=>this.handleTechPause_(e)),this.on(this.tech_,"durationchange",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,"fullscreenchange",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,"fullscreenerror",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,"enterpictureinpicture",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,"leavepictureinpicture",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,"error",e=>this.handleTechError_(e)),this.on(this.tech_,"posterchange",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,"textdata",e=>this.handleTechTextData_(e)),this.on(this.tech_,"ratechange",e=>this.handleTechRateChange_(e)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||xe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Ui.names.forEach(e=>{const t=Ui[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=ci.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&V.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!==typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(ai(i))return i.catch(e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))})};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),ai(i)&&(i=i.catch(t))),ai(i)?i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})}):void 0}updateSourceCaches_(e=""){let t=e,i="";"string"!==typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=ln(this,t)),this.cache_.source=Y({},e,{src:t,type:i});const n=this.cache_.sources.filter(e=>e.src&&e.src===t),r=[],a=this.$$("source"),s=[];for(let o=0;o<a.length;o++){const e=Pe(a[o]);r.push(e),e.src&&e.src===t&&s.push(e.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,n=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==i)&&(t=()=>{}),t(n),e.src||this.tech_.any(["sourceset","loadstart"],e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?si(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;const t=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),t=>t.contains(e.target));t||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let n=s.a[this.fsApi_.fullscreenElement]===i;!n&&i.matches&&(n=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in Ji)return Yi(this.middleware_,this.tech_,e,t);if(e in Zi)return Ki(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw V(i),i}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Qi)return Xi(this.middleware_,this.tech_,e);if(e in Zi)return Ki(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw V(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if("TypeError"===t.name)throw V(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw V(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=si){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(ge||me);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&i&&this.load());const n=this.techGet_("play"),r=i&&this.hasClass("vjs-ended");r&&this.resetProgressBar_(),null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||Kt(0,0)}scrubbing(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=Kt(0,0)),e}bufferedPercent(){return ni(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,n)=>{function r(){t.off("fullscreenerror",s),t.off("fullscreenchange",a)}function a(){r(),i()}function s(e,t){r(),n(t)}t.one("fullscreenchange",a),t.one("fullscreenerror",s);const o=t.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(i,n))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function n(){e.off("fullscreenerror",a),e.off("fullscreenchange",r)}function r(){n(),t()}function a(e,t){n(),i(t)}e.one("fullscreenchange",r),e.one("fullscreenerror",a);const s=e.exitFullscreenHelper_();s&&(s.then(n,n),s.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=s.a[this.fsApi_.exitFullscreen]();return e&&si(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s.a.documentElement.style.overflow,mt(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow="hidden",Ie(s.a.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){l.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,gt(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow=this.docOrigOverflow,Oe(s.a.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&r.a.documentPictureInPicture){const e=s.a.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(ke("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),r.a.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(Qe(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger("enterpictureinpicture"),t.addEventListener("pagehide",t=>{const i=t.target.querySelector(".video-js");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in s.a&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return r.a.documentPictureInPicture&&r.a.documentPictureInPicture.window?(r.a.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in s.a?s.a.exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;const i=e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;const i=["button","checkbox","hidden","radio","reset","submit"];if("input"===t)return-1===i.indexOf(e.type);const n=["textarea"];return-1!==n.indexOf(t)};i(this.el_.ownerDocument.activeElement)||("function"===typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=(e=>l.a.isEventKey(e,"f")),muteKey:n=(e=>l.a.isEventKey(e,"m")),playPauseKey:r=(e=>l.a.isEventKey(e,"k")||l.a.isEventKey(e,"Space"))}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Wt.getComponent("FullscreenToggle");!1!==s.a[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Wt.getComponent("MuteToggle");t.prototype.handleClick.call(this,e)}else if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Wt.getComponent("PlayToggle");t.prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,n=this.options_.techOrder;i<n.length;i++){const r=n[i];let a=Vi.getTech(r);if(a||(a=Wt.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e),t))return t}else V.error(`The "${r}" tech is undefined. Skipped browser support check for that tech.`)}return""}selectSource(e){const t=this.options_.techOrder.map(e=>[e,Vi.getTech(e)]).filter(([e,t])=>t?t.isSupported():(V.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let n;return e.some(e=>t.some(t=>{if(n=i(e,t),n)return!0})),n};let n;const r=e=>(t,i)=>e(i,t),a=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};return n=this.options_.sourceOrder?i(e,t,r(a)):i(t,e,a),n||!1}handleSrc_(e,t){if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=un(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),Wi(this,i[0],(e,n)=>{this.middleware_=n,t||(this.cache_.sources=i),this.updateSourceCaches_(e);const r=this.src_(e);if(r)return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());$i(n,this.tech_)}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(zt(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();si(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Ot(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:r}=i||{};e&&e.updateContent(),t&&t.updateContent(),n&&n.updateContent(),r&&(r.update(),r.loadProgressBar&&r.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"===typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"===typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t="undefined"===typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(void 0===e)return this.error_||null;if(O("beforeerror").forEach(t=>{const i=t(this,e);$(i)&&!Array.isArray(i)||"string"===typeof i||"number"===typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new ri(e),this.addClass("vjs-error"),V.error(`(CODE:${this.error_.code} ${ri.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),O("error").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,i;const n=wt(this,this.reportUserActivity),r=function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())},a=function(){n(),this.clearInterval(e),e=this.setInterval(n,250)},s=function(t){n(),this.clearInterval(e)};this.on("mousedown",a),this.on("mousemove",r),this.on("mouseup",s),this.on("mouseleave",s);const o=this.getChild("controlBar");let l;!o||me||ie||(o.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),o.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n);const u=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(l);const e=this.options_.inactivityTimeout;e<=0||(l=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))};this.setInterval(u,250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){const e=this.tech_&&this.tech_;e.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){const e=this.tech_&&this.tech_;e.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){const e=this.audioOnlyMode(!1);return e.then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ot(this)&&this.trigger("languagechange"))}languages(){return Y(ca.prototype.options_.languages,this.languages_)}toJSON(){const e=Y(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let n=t[i];n=Y(n),n.player=void 0,e.tracks[i]=n}return e}createModal(e,t){t=t||{},t.content=e||"";const i=new di(this,t);return this.addChild(i),i.on("dispose",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<oa.length;i++){const n=oa[i],r=this.breakpoints_[n];if(t<=r){if(e===n)return;e&&this.removeClass(la[e]),this.addClass(la[n]),this.breakpoint_=n;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},ua,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;e=Boolean(e);const t=this.responsive_;return e!==t?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return la[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!==typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=Y(e);const{artist:n,artwork:r,description:a,poster:s,src:o,textTracks:l,title:u}=this.cache_.media;!r&&s&&(this.cache_.media.artwork=[{src:s,type:on(s)}]),i&&this.crossOrigin(i),o&&this.src(o),s&&this.poster(s),Array.isArray(l)&&l.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:u,description:a||n||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})),n={src:t,textTracks:i};return e&&(n.poster=e,n.artwork=[{src:n.poster,type:on(n.poster)}]),n}return Y(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=Pe(e),n=i["data-setup"];if(Ae(e,"vjs-fill")&&(i.fill=!0),Ae(e,"vjs-fluid")&&(i.fluid=!0),null!==n){const[e,t]=c()(n||"{}");e&&V.error(e),Object.assign(i,t)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,n=i.length;e<n;e++){const n=i[e],r=n.nodeName.toLowerCase();"source"===r?t.sources.push(Pe(n)):"track"===r&&t.tracks.push(Pe(n))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>"number"===typeof e)&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Ui.names.forEach((function(e){const t=Ui[e];ca.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),ca.prototype.crossorigin=ca.prototype.crossOrigin,ca.players={};const ha=r.a.navigator;ca.prototype.options_={techOrder:Vi.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ha&&(ha.languages&&ha.languages[0]||ha.userLanguage||ha.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){ca.prototype[e]=function(){return this.techGet_(e)}})),aa.forEach((function(e){ca.prototype[`handleTech${qt(e)}_`]=function(){return this.trigger(e)}})),Wt.registerComponent("Player",ca);const da="plugin",pa="activePlugins_",fa={},va=e=>fa.hasOwnProperty(e),ma=e=>va(e)?fa[e]:void 0,ga=(e,t)=>{e[pa]=e[pa]||{},e[pa][t]=!0},ya=(e,t,i)=>{const n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},ba=function(e,t){const i=function(){ya(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return ga(this,e),ya(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i},_a=(e,t)=>(t.prototype.name=e,function(...i){ya(this,{name:e,plugin:t,instance:null},!0);const n=new t(...[this,...i]);return this[e]=()=>n,ya(this,n.getEventHash()),n});class Ta{constructor(e){if(this.constructor===Ta)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ut(this),delete this.trigger,Vt(this,this.constructor.defaultState),ga(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return yt(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[pa][e]=!1,this.player=this.state=null,t[e]=_a(e,fa[e])}static isBasic(e){const t="string"===typeof e?ma(e):e;return"function"===typeof t&&!Ta.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!==typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(va(e))V.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(ca.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!==typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return fa[e]=t,e!==da&&(Ta.isBasic(t)?ca.prototype[e]=ba(e,t):ca.prototype[e]=_a(e,t)),t}static deregisterPlugin(e){if(e===da)throw new Error("Cannot de-register base plugin.");va(e)&&(delete fa[e],delete ca.prototype[e])}static getPlugins(e=Object.keys(fa)){let t;return e.forEach(e=>{const i=ma(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=ma(e);return t&&t.VERSION||""}}function Sa(e,t){let i=!1;return function(...n){return i||V.warn(e),i=!0,t.apply(this,n)}}function wa(e,t,i,n){return Sa(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,n)}Ta.getPlugin=ma,Ta.BASE_PLUGIN_NAME=da,Ta.registerPlugin(da,Ta),ca.prototype.usingPlugin=function(e){return!!this[pa]&&!0===this[pa][e]},ca.prototype.hasPlugin=function(e){return!!va(e)};const Ea=e=>0===e.indexOf("#")?e.slice(1):e;function ka(e,t,i){let n=ka.getPlayer(e);if(n)return t&&V.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const a="string"===typeof e?Xe("#"+Ea(e)):e;if(!Se(a))throw new TypeError("The element or ID supplied is not valid. (videojs)");const s="getRootNode"in a&&a.getRootNode()instanceof r.a.ShadowRoot,o=s?a.getRootNode():a.ownerDocument.body;a.ownerDocument.defaultView&&o.contains(a)||V.warn("The element supplied is not included in the DOM"),t=t||{},!0===t.restoreEl&&(t.restoreEl=(a.parentNode&&a.parentNode.hasAttribute("data-vjs-player")?a.parentNode:a).cloneNode(!0)),O("beforesetup").forEach(e=>{const i=e(a,Y(t));$(i)&&!Array.isArray(i)?t=Y(t,i):V.error("please return an object in beforesetup hooks")});const l=Wt.getComponent("Player");return n=new l(a,t,i),O("setup").forEach(e=>e(n)),n}if(ka.hooks_=I,ka.hooks=O,ka.hook=j,ka.hookOnce=P,ka.removeHook=L,!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE&&Te()){let e=Xe(".vjs-styles-defaults");if(!e){e=rt("vjs-styles-defaults");const t=Xe("head");t&&t.insertBefore(e,t.firstChild),at(e,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}it(1,ka),ka.VERSION=A,ka.options=ca.prototype.options_,ka.getPlayers=()=>ca.players,ka.getPlayer=e=>{const t=ca.players;let i;if("string"===typeof e){const n=Ea(e),r=t[n];if(r)return r;i=Xe("#"+n)}else i=e;if(Se(i)){const{player:e,playerId:n}=i;if(e||t[n])return e||t[n]}},ka.getAllPlayers=()=>Object.keys(ca.players).map(e=>ca.players[e]).filter(Boolean),ka.players=ca.players,ka.getComponent=Wt.getComponent,ka.registerComponent=(e,t)=>(Vi.isTech(t)&&V.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),Wt.registerComponent.call(Wt,e,t)),ka.getTech=Vi.getTech,ka.registerTech=Vi.registerTech,ka.use=Gi,Object.defineProperty(ka,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ka.middleware,"TERMINATOR",{value:zi,writeable:!1,enumerable:!0}),ka.browser=ye,ka.obj=J,ka.mergeOptions=wa(9,"videojs.mergeOptions","videojs.obj.merge",Y),ka.defineLazyProperty=wa(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Q),ka.bind=wa(9,"videojs.bind","native Function.prototype.bind",wt),ka.registerPlugin=Ta.registerPlugin,ka.deregisterPlugin=Ta.deregisterPlugin,ka.plugin=(e,t)=>(V.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ta.registerPlugin(e,t)),ka.getPlugins=Ta.getPlugins,ka.getPlugin=Ta.getPlugin,ka.getPluginVersion=Ta.getPluginVersion,ka.addLanguage=function(e,t){return e=(""+e).toLowerCase(),ka.options.languages=Y(ka.options.languages,{[e]:t}),ka.options.languages[e]},ka.log=V,ka.createLogger=H,ka.time=ii,ka.createTimeRange=wa(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Kt),ka.createTimeRanges=wa(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Kt),ka.formatTime=wa(9,"videojs.formatTime","videojs.time.formatTime",ti),ka.setFormatTime=wa(9,"videojs.setFormatTime","videojs.time.setFormatTime",Zt),ka.resetFormatTime=wa(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",ei),ka.parseUrl=wa(9,"videojs.parseUrl","videojs.url.parseUrl",Ci),ka.isCrossOrigin=wa(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Ii),ka.EventTarget=At,ka.any=_t,ka.on=mt,ka.one=bt,ka.off=gt,ka.trigger=yt,ka.xhr=d.a,ka.TextTrack=Pi,ka.AudioTrack=Di,ka.VideoTrack=Ri,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(e=>{ka[e]=function(){return V.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),Je[e].apply(null,arguments)}}),ka.computedStyle=wa(9,"videojs.computedStyle","videojs.dom.computedStyle",Ke),ka.dom=Je,ka.fn=Ct,ka.num=Rn,ka.str=Gt,ka.url=Oi;
/*! @name videojs-contrib-quality-levels @version 4.0.0 @license Apache-2.0 */
class Ca{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(e){t.enabled_(e)}}),t}}class xa extends ka.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new Ca(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}xa.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const t in xa.prototype.allowedEvents_)xa.prototype["on"+t]=null;var Aa="4.0.0";const Ia=function(e,t){const i=e.qualityLevels,n=new xa,r=function(){n.dispose(),e.qualityLevels=i,e.off("dispose",r)};return e.on("dispose",r),e.qualityLevels=()=>n,e.qualityLevels.VERSION=Aa,n},Oa=function(e){return Ia(this,ka.obj.merge({},e))};ka.registerPlugin("qualityLevels",Oa),Oa.VERSION=Aa;
/*! @name @videojs/http-streaming @version 3.7.0 @license Apache-2.0 */
const ja=v["a"],La=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Pa=e=>ka.log.debug?ka.log.debug.bind(ka,"VHS:",e+" >"):function(){};function Da(...e){const t=ka.obj||ka,i=t.merge||t.mergeOptions;return i.apply(t,e)}function Ra(...e){const t=ka.time||ka,i=t.createTimeRanges||t.createTimeRanges;return i.apply(t,e)}function Ma(e){let t="";for(let i=0;i<e.length;i++){const n=e.start(i),r=e.end(i),a=r-n;t.length&&(t+="\n"),t+=`[${a}](${n} -> ${r})`}return t||"empty"}const Na=1/30,Ba=3*Na,Ua=function(e,t){const i=[];let n;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return Ra(i)},Fa=function(e,t){return Ua(e,(function(e,i){return e-Ba<=t&&i+Ba>=t}))},Va=function(e,t){return Ua(e,(function(e){return e-Na>=t}))},Ha=function(e){if(e.length<2)return Ra();const t=[];for(let i=1;i<e.length;i++){const n=e.end(i-1),r=e.start(i);t.push([n,r])}return Ra(t)},qa=function(e,t){let i=null,n=null,r=0;const a=[],s=[];if(!e||!e.length||!t||!t.length)return Ra();let o=e.length;while(o--)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});o=t.length;while(o--)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),o=0;o<a.length;o++)"start"===a[o].type?(r++,2===r&&(i=a[o].time)):"end"===a[o].type&&(r--,1===r&&(n=a[o].time)),null!==i&&null!==n&&(s.push([i,n]),i=null,n=null);return Ra(s)},za=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},Ga=function(e,t,i=1){const n=e.length?e.end(e.length-1):0;return(n-t)/i},Wa=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},$a=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1},Xa=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ya=function(e,t){let i=0;if(!e||!e.length)return i;for(let n=0;n<e.length;n++){const r=e.start(n),a=e.end(n);t>a||(i+=t>r&&t<=a?a-t:a-r)}return i},Ka=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},Qa=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach((function(n,r){e.push({duration:n.duration,segmentIndex:i,partIndex:r,part:n,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Ja=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},Za=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let n=(i||[]).reduce((e,t)=>e+("PART"===t.type?1:0),0);return n+=t&&t.length?t.length:0,n},es=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Ja(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ts=function(e,t){let i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if("undefined"!==typeof r.start)return{result:r.start,precise:!0};if("undefined"!==typeof r.end)return{result:r.end-r.duration,precise:!0}}while(n--){if(r=e.segments[n],"undefined"!==typeof r.end)return{result:i+r.end,precise:!0};if(i+=Ka(e,r),"undefined"!==typeof r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}},is=function(e,t){let i,n=0,r=t-e.mediaSequence;for(;r<e.segments.length;r++){if(i=e.segments[r],"undefined"!==typeof i.start)return{result:i.start-n,precise:!0};if(n+=Ka(e,i),"undefined"!==typeof i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}},ns=function(e,t,i){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const n=ts(e,t);if(n.precise)return n.result;const r=is(e,t);return r.precise?r.result:n.result+i},rs=function(e,t,i){if(!e)return 0;if("number"!==typeof i&&(i=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return r.a.Infinity}return ns(e,t,i)},as=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:n}){let r=0;if(i>n&&([i,n]=[n,i]),i<0){for(let t=i;t<Math.min(0,n);t++)r+=e;i=0}for(let a=i;a<n;a++)r+=t[a].duration;return r},ss=function(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return rs(e);if(null===t)return null;t=t||0;let r=ns(e,e.mediaSequence+e.segments.length,t);return i&&(n="number"===typeof n?n:es(null,e),r-=n),Math.max(0,r)},os=function(e,t,i){const n=!0,r=t||0;let a=ss(e,t,n,i);return null===a?Ra():(a<r&&(a=r),Ra(r,a))},ls=function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:n,startTime:r,exactManifestTimings:a}){let s=t-r;const o=Qa(e);let l=0;for(let u=0;u<o.length;u++){const e=o[u];if(i===e.segmentIndex&&("number"!==typeof n||"number"!==typeof e.partIndex||n===e.partIndex)){l=u;break}}if(s<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(s+=i.duration,a){if(s<0)continue}else if(s+Na<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:r-as({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(s-=e.targetDuration,s<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let u=l;u<o.length;u++){const t=o[u];if(s-=t.duration,a){if(s>0)continue}else if(s-Na>=0)continue;return{partIndex:t.partIndex,segmentIndex:t.segmentIndex,startTime:r+as({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:u})}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},us=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},cs=function(e){return e.excludeUntil&&e.excludeUntil===1/0},hs=function(e){const t=us(e);return!e.disabled&&!t},ds=function(e){return e.disabled},ps=function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},fs=function(e,t){return t.attributes&&t.attributes[e]},vs=function(e,t,i,n=0){if(!fs("BANDWIDTH",i))return NaN;const r=e*i.attributes.BANDWIDTH;return(r-8*n)/t},ms=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!hs(e)&&(e.attributes.BANDWIDTH||0)<i).length},gs=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),ys=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let n=!1;for(const r in i){for(const e in i[r])if(n=t(i[r][e]),n)break;if(n)break}return!!n},bs=e=>{if(!e||!e.playlists||!e.playlists.length){const t=ys(e,e=>e.playlists&&e.playlists.length||e.uri);return t}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],n=i.attributes&&i.attributes.CODECS;if(n&&n.split(",").every(e=>Object(b["f"])(e)))continue;const r=ys(e,e=>gs(i,e));if(!r)return!1}return!0};var _s={liveEdgeDelay:es,duration:rs,seekable:os,getMediaInfoForTime:ls,isEnabled:hs,isDisabled:ds,isExcluded:us,isIncompatible:cs,playlistEnd:ss,isAes:ps,hasAttribute:fs,estimateSegmentRequestTime:vs,isLowestEnabledRendition:ms,isAudioOnly:bs,playlistMatch:gs,segmentDurationWithParts:Ka};const{log:Ts}=ka,Ss=(e,t)=>`${e}-${t}`,ws=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,Es=({onwarn:e,oninfo:t,manifestString:i,customTagParsers:n=[],customTagMappers:r=[],llhls:a})=>{const s=new y["a"];e&&s.on("warn",e),t&&s.on("info",t),n.forEach(e=>s.addParser(e)),r.forEach(e=>s.addTagMapper(e)),s.push(i),s.end();const o=s.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e("manifest has no targetDuration defaulting to "+t),o.targetDuration=t}const l=Ja(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e("manifest has no partTargetDuration defaulting to "+t),Ts.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o},ks=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(e.mediaGroups[i])for(const n in e.mediaGroups[i])for(const r in e.mediaGroups[i][n]){const a=e.mediaGroups[i][n][r];t(a,i,n,r)}})},Cs=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},xs=e=>{let t=e.playlists.length;while(t--){const i=e.playlists[t];Cs({playlist:i,id:Ss(t,i.uri)}),i.resolvedUri=ja(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||Ts.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},As=e=>{ks(e,t=>{t.uri&&(t.resolvedUri=ja(e.uri,t.uri))})},Is=(e,t)=>{const i=Ss(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r.a.location.href,resolvedUri:r.a.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n},Os=(e,t,i=ws)=>{e.uri=t;for(let r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){const t="placeholder-uri-"+r;e.playlists[r].uri=t}const n=bs(e);ks(e,(t,r,a,s)=>{if(!t.playlists||!t.playlists.length){if(n&&"AUDIO"===r&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===a)return}t.playlists=[g()({},t)]}t.playlists.forEach((function(t,n){const o=i(r,a,s,t),l=Ss(n,o);t.uri?t.resolvedUri=t.resolvedUri||ja(e.uri,t.uri):(t.uri=0===n?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))}),xs(e),As(e)};class js{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,n)=>{if(!this.processedDateRanges_.has(n)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){const t=new Map(this.processedDateRanges_);t.forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const{EventTarget:Ls}=ka,Ps=(e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let n=t.mediaSequence+t.segments.length;if(e){const r=e.parts||[],a=Za(t)-1;a>-1&&a!==r.length-1&&(i._HLS_part=a),(a>-1||r.length)&&n--}i._HLS_msn=n}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new r.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e},Ds=(e,t)=>{if(!e)return t;const i=Da(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let n=0;n<t.parts.length;n++)e.parts&&e.parts[n]&&(i.parts[n]=Da(e.parts[n],t.parts[n]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},Rs=(e,t,i)=>{const n=e.slice(),r=t.slice();i=i||0;const a=[];let s;for(let o=0;o<r.length;o++){const e=n[o+i],t=r[o];e?(s=e.map||s,a.push(Ds(e,t))):(s&&!t.map&&(t.map=s),a.push(t))}return a},Ms=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=ja(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ja(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ja(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ja(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=ja(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=ja(t,e.uri))})},Ns=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},Bs=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Us=(e,t,i=Bs)=>{const n=Da(e,{}),r=n.playlists[t.id];if(!r)return null;if(i(r,t))return null;t.segments=Ns(t);const a=Da(r,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}a.segments=Rs(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}a.segments.forEach(e=>{Ms(e,a.resolvedUri)});for(let s=0;s<n.playlists.length;s++)n.playlists[s].id===t.id&&(n.playlists[s]=a);return n.playlists[t.id]=a,n.playlists[t.uri]=a,ks(e,(e,i,n,r)=>{if(e.playlists)for(let s=0;s<e.playlists.length;s++)t.id===e.playlists[s].id&&(e.playlists[s]=a)}),n},Fs=(e,t)=>{const i=e.segments||[],n=i[i.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],a=r&&r.duration||n&&n.duration;return t&&a?1e3*a:500*(e.partTargetDuration||e.targetDuration||10)};class Vs extends Ls{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Pa("PlaylistLoader");const{withCredentials:n=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=n,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const r=t.options_;this.customTagParsers=r&&r.customTagParsers||[],this.customTagMappers=r&&r.customTagMappers||[],this.llhls=r&&r.llhls,this.dateRangesStorage_=new js,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=ja(this.main.uri,e.uri);this.llhls&&(t=Ps(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:n,id:r}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[r],status:e.status,message:`HLS playlist request error at URL: ${n}.`,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}parseManifest_({url:e,manifestString:t}){return Es({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:n}){this.request=null,this.state="HAVE_METADATA";const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),Cs({playlist:r,uri:i,id:n});const a=Us(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Fs(this.media(),!!a)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new js,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(r.a.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=r.a.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,n=!this.media_||e.id!==this.media_.id,a=this.main.playlists[e.id];if(a&&a.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Fs(e,!0)),n){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(t,n)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=La(e.resolvedUri,n),t)return this.playlistRequestError(this.request,e,i);this.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}pause(){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=r.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=r.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(e,t)=>{if(!this.request)return;if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.src=La(this.src,t);const i=this.parseManifest_({manifestString:t.responseText,url:this.src});this.setupInitialPlaylist(i)})}srcUri(){return"string"===typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,Os(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=Ns(e),e.segments.forEach(t=>{Ms(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||r.a.location.href;this.main=Is(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}}const{xhr:Hs}=ka,qs=function(e,t,i,n){const r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),n(t,e)},zs=(e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i},Gs=(e,t,i,n)=>{e&&e.size&&e.forEach(e=>{e(t,i,n)})},Ws=function(){const e=function e(t,i){t=Da({timeout:45e3},t);const n=e.beforeRequest||ka.Vhs.xhr.beforeRequest,r=e._requestCallbackSet||ka.Vhs.xhr._requestCallbackSet||new Set,a=e._responseCallbackSet||ka.Vhs.xhr._responseCallbackSet;n&&"function"===typeof n&&(ka.log.warn("beforeRequest is deprecated, use onRequest instead."),r.add(n));const s=!0===ka.Vhs.xhr.original?Hs:ka.Vhs.xhr,o=zs(r,t);r.delete(n);const l=s(o||t,(function(e,t){return Gs(a,l,e,t),qs(l,e,t,i)})),u=l.abort;return l.abort=function(){return l.aborted=!0,u.apply(l,arguments)},l.uri=t.uri,l.requestTime=Date.now(),l};return e.original=!0,e},$s=function(e){let t;const i=e.offset;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?r.a.BigInt(e.offset)+r.a.BigInt(e.length)-r.a.BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t},Xs=function(e){const t={};return e.byterange&&(t.Range=$s(e.byterange)),t},Ys=function(e,t){return e.start(t)+"-"+e.end(t)},Ks=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Qs=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Js=function(e){const t={};return Object.keys(e).forEach(i=>{const n=e[i];Object(T["e"])(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t},Zs=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},eo=function(e){return e.resolvedUri},to=e=>{const t=Array.prototype.slice.call(e),i=16;let n,r,a="";for(let s=0;s<t.length/i;s++)n=t.slice(s*i,s*i+i).map(Ks).join(""),r=t.slice(s*i,s*i+i).map(Qs).join(""),a+=n+" "+r+"\n";return a},io=({bytes:e})=>to(e),no=e=>{let t,i="";for(t=0;t<e.length;t++)i+=Ys(e,t)+" ";return i};var ro=Object.freeze({__proto__:null,createTransferableMessage:Js,initSegmentId:Zs,segmentKeyId:eo,hexDump:to,tagDump:io,textRanges:no});const ao=.25,so=(e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,n=t.videoTimingInfo.transmuxedPresentationStart,r=n+i,a=e-r;return new Date(t.dateTimeObject.getTime()+1e3*a)},oo=e=>e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds,lo=(e,t)=>{let i;try{i=new Date(e)}catch(l){return null}if(!t||!t.segments||0===t.segments.length)return null;let n=t.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let u=0;u<t.segments.length-1;u++){n=t.segments[u];const e=new Date(t.segments[u+1].dateTimeObject);if(i<e)break}const r=t.segments[t.segments.length-1],a=r.dateTimeObject,s=r.videoTimingInfo?oo(r.videoTimingInfo):r.duration+r.duration*ao,o=new Date(a.getTime()+1e3*s);return i>o?null:(i>new Date(a)&&(n=r),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:_s.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},uo=(e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,n=0;for(let a=0;a<t.segments.length;a++)if(i=t.segments[a],n=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration,e<=n)break;const r=t.segments[t.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+r.duration*ao)return null;i=r}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},co=(e,t)=>{let i,n;try{i=new Date(e),n=new Date(t)}catch(s){}const r=i.getTime(),a=n.getTime();return(a-r)/1e3},ho=e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++){const i=e.segments[t];if(!i.dateTimeObject)return!1}return!0},po=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const n=uo(t,e);if(!n)return i({message:"valid programTime was not found"});if("estimate"===n.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const r={mediaSeconds:t},a=so(t,n.segment);return a&&(r.programDateTime=a.toISOString()),i(null,r)},fo=({programTime:e,playlist:t,retryCount:i=2,seekTo:n,pauseAfterSeek:r=!0,tech:a,callback:s})=>{if(!s)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof e||!t||!n)return s({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!a.hasStarted_)return s({message:"player must be playing a live stream to start buffering"});if(!ho(t))return s({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=lo(e,t);if(!o)return s({message:e+" was not found in the stream"});const l=o.segment,u=co(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?s({message:e+" is not buffered yet. Try again"}):(n(o.estimatedStart+u),void a.one("seeked",()=>{fo({programTime:e,playlist:t,retryCount:i-1,seekTo:n,pauseAfterSeek:r,tech:a,callback:s})}));const c=l.start+u,h=()=>s(null,a.currentTime());a.one("seeked",h),r&&a.pause(),n(c)},vo=(e,t)=>{if(4===e.readyState)return t()},mo=(e,t,i)=>{let n,r=[],a=!1;const s=function(e,t,n,r){return t.abort(),a=!0,i(e,t,n,r)},o=function(e,t){if(a)return;if(e)return s(e,t,"",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=Object(T["d"])(r,Object(T["h"])(i,!0)),n=n||Object(k["a"])(r),r.length<10||n&&r.length<n+2)return vo(t,()=>s(e,t,"",r));const o=Object(C["a"])(r);return"ts"===o&&r.length<188||!o&&r.length<376?vo(t,()=>s(e,t,"",r)):s(null,t,o,r)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return qs(e,null,{statusCode:e.status},o)}))}},u=t(l,(function(e,t){return qs(u,e,t,o)}));return u},{EventTarget:go}=ka,yo=function(e,t){if(!Bs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const n=e.segments[i],r=t.segments[i];if(n.uri!==r.uri)return!1;if(!n.byterange&&!r.byterange)continue;const a=n.byterange,s=r.byterange;if(a&&!s||!a&&s)return!1;if(a.offset!==s.offset||a.length!==s.length)return!1}return!0},bo=(e,t,i,n)=>{const r=n.attributes.NAME||i;return`placeholder-uri-${e}-${t}-${r}`},_o=({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:n,previousManifest:r})=>{const a=Object(S["c"])(e,{manifestUri:t,clientOffset:i,sidxMapping:n,previousManifest:r});return Os(a,t,bo),a},To=(e,t)=>{ks(e,(i,n,r,a)=>{a in t.mediaGroups[n][r]||delete e.mediaGroups[n][r][a]})},So=(e,t,i)=>{let n=!0,r=Da(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let a=0;a<t.playlists.length;a++){const e=t.playlists[a];if(e.sidx){const t=Object(S["b"])(e.sidx);i&&i[t]&&i[t].sidx&&Object(S["a"])(e,i[t].sidx,e.sidx.resolvedUri)}const s=Us(r,e,yo);s&&(r=s,n=!1)}return ks(t,(e,t,i,a)=>{if(e.playlists&&e.playlists.length){const s=e.playlists[0].id,o=Us(r,e.playlists[0],yo);o&&(r=o,a in r.mediaGroups[t][i]||(r.mediaGroups[t][i][a]=e),r.mediaGroups[t][i][a].playlists[0]=r.playlists[s],n=!1)}}),To(r,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(n=!1),n?null:r},wo=(e,t)=>{const i=Boolean(!e.map&&!t.map),n=i||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length);return n&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},Eo=(e,t)=>{const i={};for(const n in e){const r=e[n],a=r.sidx;if(a){const e=Object(S["b"])(a);if(!t[e])break;const n=t[e].sidxInfo;wo(n,a)&&(i[e]=t[e])}}return i},ko=(e,t)=>{const i=Eo(e.playlists,t);let n=i;return ks(e,(e,i,r,a)=>{if(e.playlists&&e.playlists.length){const i=e.playlists;n=Da(n,Eo(i,t))}}),n};class Co extends go{constructor(e,t,i={},n){super(),this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:r=!1}=i;if(this.vhs_=t,this.withCredentials=r,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.media().attributes.serviceLocation||this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Pa("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const n=e.sidx&&Object(S["b"])(e.sidx);if(!e.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n])return void(this.mediaRequest_=r.a.setTimeout(()=>i(!1),0));const a=La(e.sidx.resolvedUri),s=(r,a)=>{if(this.requestErrored_(r,a,t))return;const s=this.mainPlaylistLoader_.sidxMapping_;let o;try{o=E()(Object(T["k"])(a.response).subarray(8))}catch(l){return void this.requestErrored_(l,a,t)}return s[n]={sidxInfo:e.sidx,sidx:o},Object(S["a"])(e,o,e.sidx.resolvedUri),i(!0)};this.request=mo(a,this.vhs_.xhr,(t,i,n,r)=>{if(t)return s(t,i);if(!n||"mp4"!==n)return s({status:i.status,message:`Unsupported ${n||"unknown"} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i);const{offset:o,length:l}=e.sidx.byterange;if(r.length>=l+o)return s(t,{response:r.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:Xs({byterange:e.sidx.byterange})},s)})}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),r.a.clearTimeout(this.mediaRequest_),r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"===typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(r.a.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout(()=>this.load(),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):this.mediaRequest_=r.a.setTimeout(()=>this.haveMain_(),0)}requestMain_(e){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(t,i)=>{if(this.requestErrored_(t,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));const n=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=La(this.mainPlaylistLoader_.srcUrl,i),n?(this.handleMain_(),void this.syncClientServerClock_(()=>e(i,n))):e(i,n)})}syncClientServerClock_(e){const t=Object(S["d"])(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ja(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},(i,n)=>{if(!this.request)return;if(i)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();let r;r="HEAD"===t.method?n.responseHeaders&&n.responseHeaders.date?Date.parse(n.responseHeaders.date):this.mainLoaded_:Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=r-Date.now(),e()}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main;let t=_o({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=So(e,t,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=t||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(t),Boolean(t)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(r.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!==typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=r.a.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=ko(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=r.a.setTimeout(()=>{this.trigger("mediaupdatetimeout"),e()},Fs(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}}var xo={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Ao=e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer},Io=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Oo=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}},jo=function(e){return function(){const t=Oo(e),i=Io(new Worker(t));i.objURL=t;const n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),n.call(this)},i}},Lo=function(e){return`var browserWorkerPolyFill = ${Io.toString()};\nbrowserWorkerPolyFill(self);\n`+e},Po=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Do=Lo(Po((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},i=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,a;if(i=e[t],i)if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(a=[],n=arguments.length,n=1;n<arguments.length;++n)a.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,a)}},this.dispose=function(){e={}}}};i.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},i.prototype.partialFlush=function(e){this.trigger("partialdone",e)},i.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},i.prototype.reset=function(e){this.trigger("reset",e)};var n,r,a,s,o,l,u,c,h,d,p,f,v,m,g,y,b,_,T,S,w,E,k,C,x,A,I,O,j,L,P,D,R,M,N,B,U=i,F=Math.pow(2,32),V=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):i.getUint32(0)*F+i.getUint32(4)},H={getUint64:V,MAX_UINT32:F},q=H.MAX_UINT32;(function(){var e;if(k={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in k)k.hasOwnProperty(e)&&(k[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),A=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),x=new Uint8Array([0,0,0,1]),I=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),j={video:I,audio:O},D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),M=R,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=R,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),n=function(e){var t,i,n,r=[],a=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);t=r.length;while(t--)a+=r[t].byteLength;for(i=new Uint8Array(a+8),n=new DataView(i.buffer,i.byteOffset,i.byteLength),n.setUint32(0,i.byteLength),i.set(e,4),t=0,a=8;t<r.length;t++)i.set(r[t],a),a+=r[t].byteLength;return i},r=function(){return n(k.dinf,n(k.dref,D))},a=function(e){return n(k.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},s=function(){return n(k.ftyp,C,x,C,A)},y=function(e){return n(k.hdlr,j[e])},o=function(e){return n(k.mdat,e)},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(k.mdhd,t)},m=function(e){return n(k.mdia,g(e),y(e.type),u(e))},l=function(e){return n(k.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},u=function(e){return n(k.minf,"video"===e.type?n(k.vmhd,L):n(k.smhd,P),r(),_(e))},c=function(e,t){var i=[],r=t.length;while(r--)i[r]=S(t[r]);return n.apply(null,[k.moof,l(e)].concat(i))},h=function(e){var t=e.length,i=[];while(t--)i[t]=f(e[t]);return n.apply(null,[k.moov,p(4294967295)].concat(i).concat(d(e)))},d=function(e){var t=e.length,i=[];while(t--)i[t]=w(e[t]);return n.apply(null,[k.mvex].concat(i))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(k.mvhd,t)},b=function(e){var t,i,r=e.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)t=r[i].flags,a[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return n(k.sdtp,a)},_=function(e){return n(k.stbl,T(e),n(k.stts,B),n(k.stsc,M),n(k.stsz,N),n(k.stco,R))},function(){var e,t;T=function(i){return n(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?e(i):t(i))},e=function(e){var t,i,r=e.sps||[],a=e.pps||[],s=[],o=[];for(t=0;t<r.length;t++)s.push((65280&r[t].byteLength)>>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));for(t=0;t<a.length;t++)o.push((65280&a[t].byteLength)>>>8),o.push(255&a[t].byteLength),o=o.concat(Array.prototype.slice.call(a[t]));if(i=[k.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(k.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],s,[a.length],o))),n(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],u=e.sarRatio[1];i.push(n(k.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return n.apply(null,i)},t=function(e){return n(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))}}(),v=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(k.tkhd,t)},S=function(e){var t,i,r,a,s,o,l;return t=n(k.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/q),l=Math.floor(e.baseMediaDecodeTime%q),i=n(k.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l>>>24&255,l>>>16&255,l>>>8&255,255&l])),s=92,"audio"===e.type?(r=E(e,s),n(k.traf,t,i,r)):(a=b(e),r=E(e,a.length+s),n(k.traf,t,i,r,a))},f=function(e){return e.duration=e.duration||4294967295,n(k.trak,v(e),m(e))},w=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(k.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,a,s,o,l,u;for(o=e.samples||[],t+=20+16*o.length,s=i(o,t),a=new Uint8Array(s.length+16*o.length),a.set(s),r=s.length,u=0;u<o.length;u++)l=o[u],a[r++]=(4278190080&l.duration)>>>24,a[r++]=(16711680&l.duration)>>>16,a[r++]=(65280&l.duration)>>>8,a[r++]=255&l.duration,a[r++]=(4278190080&l.size)>>>24,a[r++]=(16711680&l.size)>>>16,a[r++]=(65280&l.size)>>>8,a[r++]=255&l.size,a[r++]=l.flags.isLeading<<2|l.flags.dependsOn,a[r++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample,a[r++]=61440&l.flags.degradationPriority,a[r++]=15&l.flags.degradationPriority,a[r++]=(4278190080&l.compositionTimeOffset)>>>24,a[r++]=(16711680&l.compositionTimeOffset)>>>16,a[r++]=(65280&l.compositionTimeOffset)>>>8,a[r++]=255&l.compositionTimeOffset;return n(k.trun,a)},e=function(e,t){var r,a,s,o,l,u;for(o=e.samples||[],t+=20+8*o.length,s=i(o,t),r=new Uint8Array(s.length+8*o.length),r.set(s),a=s.length,u=0;u<o.length;u++)l=o[u],r[a++]=(4278190080&l.duration)>>>24,r[a++]=(16711680&l.duration)>>>16,r[a++]=(65280&l.duration)>>>8,r[a++]=255&l.duration,r[a++]=(4278190080&l.size)>>>24,r[a++]=(16711680&l.size)>>>16,r[a++]=(65280&l.size)>>>8,r[a++]=255&l.size;return n(k.trun,r)},E=function(i,n){return"audio"===i.type?e(i,n):t(i,n)}}();var z,G,W,$,X,Y,K,Q,J={ftyp:s,mdat:o,moof:c,moov:h,initSegment:function(e){var t,i=s(),n=h(e);return t=new Uint8Array(i.byteLength+n.byteLength),t.set(i),t.set(n,i.byteLength),t}},Z=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,n.byteLength=0,t=0;t<e.length;t++)i=e[t],"access_unit_delimiter_rbsp"===i.nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),n=[i],n.byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},ee=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)i=e[t],i.keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),n=[i],n.nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},te=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},ie=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},ne=function(e,t){var i=ie();return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},re=function(e,t){var i,n,r,a,s,o=t||0,l=[];for(i=0;i<e.length;i++)for(a=e[i],n=0;n<a.length;n++)s=a[n],r=ne(s,o),o+=r.size,l.push(r);return l},ae=function(e){var t,i,n,r,a,s,o=0,l=e.byteLength,u=e.nalCount,c=l+4*u,h=new Uint8Array(c),d=new DataView(h.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],d.setUint32(o,s.data.byteLength),o+=4,h.set(s.data,o),o+=s.data.byteLength;return h},se=function(e,t){var i,n=t||0,r=[];return i=ne(e,n),r.push(i),r},oe=function(e){var t,i,n=0,r=e.byteLength,a=e.length,s=r+4*a,o=new Uint8Array(s),l=new DataView(o.buffer);for(t=0;t<e.length;t++)i=e[t],l.setUint32(n,i.data.byteLength),n+=4,o.set(i.data,n),n+=i.data.byteLength;return o},le={groupNalsIntoFrames:Z,groupFramesIntoGops:ee,extendFirstKeyFrame:te,generateSampleTable:re,concatenateNalData:ae,generateSampleTableForFrame:se,concatenateNalDataForFrame:oe},ue=[33,16,5,32,164,27],ce=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],he=function(e){var t=[];while(e--)t.push(0);return t},de=function(e){return Object.keys(e).reduce((function(t,i){return t[i]=new Uint8Array(e[i].reduce((function(e,t){return e.concat(t)}),[])),t}),{})},pe=function(){if(!z){var e={96e3:[ue,[227,64],he(154),[56]],88200:[ue,[231],he(170),[56]],64e3:[ue,[248,192],he(240),[56]],48e3:[ue,[255,192],he(268),[55,148,128],he(54),[112]],44100:[ue,[255,192],he(268),[55,163,128],he(84),[112]],32e3:[ue,[255,192],he(268),[55,234],he(226),[112]],24e3:[ue,[255,192],he(268),[55,255,128],he(268),[111,112],he(126),[224]],16e3:[ue,[255,192],he(268),[55,255,128],he(268),[111,255],he(269),[223,108],he(195),[1,192]],12e3:[ce,he(268),[3,127,248],he(268),[6,255,240],he(268),[13,255,224],he(268),[27,253,128],he(259),[56]],11025:[ce,he(268),[3,127,248],he(268),[6,255,240],he(268),[13,255,224],he(268),[27,255,192],he(268),[55,175,128],he(108),[112]],8e3:[ce,he(268),[3,121,16],he(47),[7]]};z=de(e)}return z},fe=9e4;G=function(e){return e*fe},W=function(e,t){return e*t},$=function(e){return e/fe},X=function(e,t){return e/t},Y=function(e,t){return G(X(e,t))},K=function(e,t){return W($(e),t)},Q=function(e,t,i){return $(i?e:e-t)};var ve={ONE_SECOND_IN_TS:fe,secondsToVideoTs:G,secondsToAudioTs:W,videoTsToSeconds:$,audioTsToSeconds:X,audioTsToVideoTs:Y,videoTsToAudioTs:K,metadataTsToSeconds:Q},me=pe,ge=ve,ye=function(e){var t,i,n=0;for(t=0;t<e.length;t++)i=e[t],n+=i.data.byteLength;return n},be=function(e,t,i,n){var r,a,s,o,l=0,u=0,c=0,h=0;if(t.length&&(r=ge.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),l=Math.ceil(ge.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&n&&(u=r-Math.max(i,n),c=Math.floor(u/l),h=c*l),!(c<1||h>ge.ONE_SECOND_IN_TS/2))){for(a=me()[e.samplerate],a||(a=t[0].data),s=0;s<c;s++)o=t[0],t.splice(0,0,{data:a,dts:o.dts-l,pts:o.pts-l});return e.baseMediaDecodeTime-=Math.floor(ge.videoTsToAudioTs(h,e.samplerate)),h}},_e=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},Se=function(e){var t,i,n=0,r=new Uint8Array(ye(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r},we={prefixWithSilence:be,trimAdtsFramesByEarliestDts:_e,generateSampleTable:Te,concatenateFrameData:Se},Ee=ve.ONE_SECOND_IN_TS,ke=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ce=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},xe=function(e,t){var i,n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=r,i=Math.max(0,i),"audio"===e.type&&(n=e.samplerate/Ee,i*=n,i=Math.floor(i)),i},Ae={clearDtsInfo:Ce,calculateTrackBaseMediaDecodeTime:xe,collectDtsInfo:ke},Ie=4,Oe=128,je=function(e){var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;while(t<e.byteLength){if(e[t]===Oe)break;while(255===e[t])n+=255,t++;n+=e[t++];while(255===e[t])r+=255,t++;if(r+=e[t++],!i.payload&&n===Ie){var a=String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6]);if("GA94"===a){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}i.payload=void 0}t+=r,n=0,r=0}return i},Le=function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Pe=function(e,t){var i,n,r,a,s=[];if(!(64&t[0]))return s;for(n=31&t[0],i=0;i<n;i++)r=3*i,a={type:3&t[r+2],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));return s},De=function(e){var t,i,n=e.byteLength,r=[],a=1;while(a<n-2)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},Re={parseSei:je,parseUserData:Le,parseCaptionPackets:Pe,discardEmulationPreventionBytes:De,USER_DATA_REGISTERED_ITU_T_T35:Ie},Me=U,Ne=Re,Be=function(e){e=e||{},Be.prototype.init.call(this),this.parse708captions_="boolean"!==typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ke(0,0),new Ke(0,1),new Ke(1,0),new Ke(1,1)],this.parse708captions_&&(this.cc708Stream_=new ze({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Be.prototype=new Me,Be.prototype.push=function(e){var t,i,n;if("sei_rbsp"===e.nalUnitType&&(t=Ne.parseSei(e.escapedRBSP),t.payload&&t.payloadType===Ne.USER_DATA_REGISTERED_ITU_T_T35&&(i=Ne.parseUserData(t),i)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=Ne.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Be.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Be.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Be.prototype.flush=function(){return this.flushStream("flush")},Be.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Be.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Be.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Be.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},Be.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},Be.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},Be.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var Ue={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Fe=function(e){var t=Ue[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)},Ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},He=function(e){this.windowNum=e,this.reset()};He.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},He.prototype.getText=function(){return this.rows.join("\n")},He.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},He.prototype.newLine=function(e){this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);while(this.rows.length>this.virtualRowCount)this.rows.shift(),this.rowIdx--},He.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},He.prototype.addText=function(e){this.rows[this.rowIdx]+=e},He.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var qe=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new He(-1),this.windows=[],this.stream=i,"string"===typeof t&&this.createTextDecoder(t)};qe.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new He(i),"function"===typeof t&&(this.windows[i].beforeRowOverflow=t)},qe.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},qe.prototype.createTextDecoder=function(e){if("undefined"===typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var ze=function(e){e=e||{},ze.prototype.init.call(this);var t,i=this,n=e.captionServices||{},r={};Object.keys(n).forEach(e=>{t=n[e],/^SERVICE/.test(e)&&(r[e]=t.encoding)}),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};ze.prototype=new Me,ze.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ze.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},ze.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,r=0,a=t[r++];for(e.seq=a>>6,e.sizeCode=63&a;r<t.length;r++)a=t[r++],i=a>>5,n=31&a,7===i&&n>0&&(a=t[r++],i=a),this.pushServiceBlock(i,r,n),n>0&&(r+=n-1)},ze.prototype.pushServiceBlock=function(e,t,i){var n,r=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,r));r<t+i&&r<a.length;r++)n=a[r],Ve(n)?r=this.handleText(r,s):24===n?r=this.multiByteCharacter(r,s):16===n?r=this.extendedCommands(r,s):128<=n&&n<=135?r=this.setCurrentWindow(r,s):152<=n&&n<=159?r=this.defineWindow(r,s):136===n?r=this.clearWindows(r,s):140===n?r=this.deleteWindows(r,s):137===n?r=this.displayWindows(r,s):138===n?r=this.hideWindows(r,s):139===n?r=this.toggleWindows(r,s):151===n?r=this.setWindowAttributes(r,s):144===n?r=this.setPenAttributes(r,s):145===n?r=this.setPenColor(r,s):146===n?r=this.setPenLocation(r,s):143===n?s=this.reset(r,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&r++},ze.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data,n=i[++e];return Ve(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},ze.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},ze.prototype.initService=function(e,t){var i,n="SERVICE"+e,r=this;return n in this.serviceEncodings&&(i=this.serviceEncodings[n]),this.services[e]=new qe(e,i,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},ze.prototype.handleText=function(e,t,i){var n,r,a=i&&i.isExtended,s=i&&i.isMultiByte,o=this.current708Packet.data,l=a?4096:0,u=o[e],c=o[e+1],h=t.currentWindow;function d(e){return e.map(e=>("0"+(255&e).toString(16)).slice(-2)).join("")}if(s?(r=[u,c],e++):r=[u],t.textDecoder_&&!a)n=t.textDecoder_.decode(new Uint8Array(r));else if(s){const e=d(r);n=String.fromCharCode(parseInt(e,16))}else n=Fe(l|u);return h.pendingNewLine&&!h.isEmpty()&&h.newLine(this.getPts(e)),h.pendingNewLine=!1,h.addText(n),e},ze.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],r=i[e+2];return Ve(n)&&Ve(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},ze.prototype.setCurrentWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;return t.setCurrentWindow(r),e},ze.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;t.setCurrentWindow(r);var a=t.currentWindow;return n=i[++e],a.visible=(32&n)>>5,a.rowLock=(16&n)>>4,a.columnLock=(8&n)>>3,a.priority=7&n,n=i[++e],a.relativePositioning=(128&n)>>7,a.anchorVertical=127&n,n=i[++e],a.anchorHorizontal=n,n=i[++e],a.anchorPoint=(240&n)>>4,a.rowCount=15&n,n=i[++e],a.columnCount=63&n,n=i[++e],a.windowStyle=(56&n)>>3,a.penStyle=7&n,a.virtualRowCount=a.rowCount+1,e},ze.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.winAttr;return n=i[++e],r.fillOpacity=(192&n)>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,n=i[++e],r.borderType=(192&n)>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++e],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,n=i[++e],r.effectSpeed=(240&n)>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,e},ze.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},ze.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},ze.prototype.displayWindows=function(e,t){var i=this.current708Packet.data,n=i[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var a=0;a<8;a++)n&1<<a&&(t.windows[a].visible=1);return e},ze.prototype.hideWindows=function(e,t){var i=this.current708Packet.data,n=i[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var a=0;a<8;a++)n&1<<a&&(t.windows[a].visible=0);return e},ze.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data,n=i[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var a=0;a<8;a++)n&1<<a&&(t.windows[a].visible^=1);return e},ze.prototype.clearWindows=function(e,t){var i=this.current708Packet.data,n=i[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var a=0;a<8;a++)n&1<<a&&t.windows[a].clearText();return e},ze.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data,n=i[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var a=0;a<8;a++)n&1<<a&&t.windows[a].reset();return e},ze.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penAttr;return n=i[++e],r.textTag=(240&n)>>4,r.offset=(12&n)>>2,r.penSize=3&n,n=i[++e],r.italics=(128&n)>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,e},ze.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penColor;return n=i[++e],r.fgOpacity=(192&n)>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,n=i[++e],r.bgOpacity=(192&n)>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,n=i[++e],r.edgeRed=(48&n)>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,e},ze.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},ze.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Ge={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},We=function(e){return null===e?"":(e=Ge[e]||e,String.fromCharCode(e))},$e=14,Xe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ye=function(){var e=[],t=$e+1;while(t--)e.push({text:"",indent:0,offset:0});return e},Ke=function(e,t){Ke.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a;if(t=32639&e.ccData,t!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ye();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ye();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ye()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))n=(3&n)<<8,a=We(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),n=(3&n)<<8,a=We(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&r)&&this.addFormatting(e.pts,["i"]),1===(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r)){const e=3&r;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(n,r)){var s=Xe.indexOf(7968&t);if("rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(r)&&14===(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=We(n),a+=We(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Ke.prototype=new Me,Ke.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},i=[];this.displayed_.forEach((e,n)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(r){t(n)}e.text.length&&i.push({text:e.text,line:n+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else void 0!==e&&null!==e||t(n)}),i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ke.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ye(),this.nonDisplayed_=Ye(),this.lastControlCode_=null,this.column_=0,this.row_=$e,this.rollUpRows_=2,this.formatting_=[]},Ke.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ke.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ke.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ke.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ke.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ke.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ke.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ke.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ke.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=$e,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ye(),this.displayed_=Ye()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ke.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ke.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Ke.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ke.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ke.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<$e+1;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Ke.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Qe={CaptionStream:Be,Cea608Stream:Ke,Cea708Stream:ze},Je={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ze=U,et=8589934592,tt=4294967296,it="shared",nt=function(e,t){var i=1;e>t&&(i=-1);while(Math.abs(t-e)>tt)e+=i*et;return e},rt=function(e){var t,i;rt.prototype.init.call(this),this.type_=e||it,this.push=function(e){this.type_!==it&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=nt(e.dts,i),e.pts=nt(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};rt.prototype=new Ze;var at,st={TimestampRolloverStream:rt,handleRollover:nt},ot=(e,t,i)=>{if(!e)return-1;for(var n=i;n<e.length;n++)if(e[n]===t)return n;return-1},lt={typedArrayIndexOf:ot},ut=lt.typedArrayIndexOf,ct={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},ht=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},dt=function(e,t,i){return decodeURIComponent(ht(e,t,i))},pt=function(e,t,i){return unescape(ht(e,t,i))},ft=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},vt={APIC:function(e){var t,i,n=1,r="--\x3e";e.data[0]===ct.Utf8&&(t=ut(e.data,0,n),t<0||(e.mimeType=pt(e.data,n,t),n=t+1,e.pictureType=e.data[n],n++,i=ut(e.data,0,n),i<0||(e.description=dt(e.data,n,i),n=i+1,e.mimeType===r?e.url=pt(e.data,n,e.data.length):e.pictureData=e.data.subarray(n,e.data.length))))},"T*":function(e){e.data[0]===ct.Utf8&&(e.value=dt(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===ct.Utf8&&(t=ut(e.data,0,1),-1!==t&&(e.description=dt(e.data,1,t),e.value=dt(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value))},"W*":function(e){e.url=pt(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===ct.Utf8&&(t=ut(e.data,0,1),-1!==t&&(e.description=dt(e.data,1,t),e.url=pt(e.data,t+1,e.data.length).replace(/\0.*$/,"")))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=pt(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},mt=function(e){var t,i,n=10,r=0,a=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){r=ft(e.subarray(6,10)),r+=10;var s=64&e[5];s&&(n+=4,n+=ft(e.subarray(10,14)),r-=ft(e.subarray(16,20)));do{if(t=ft(e.subarray(n+4,n+8)),t<1)break;i=String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]);var o={id:i,data:e.subarray(n+10,n+t+10)};o.key=o.id,vt[o.id]?vt[o.id](o):"T"===o.id[0]?vt["T*"](o):"W"===o.id[0]&&vt["W*"](o),a.push(o),n+=10,n+=t}while(n<r);return a}},gt={parseId3Frames:mt,parseSyncSafeInteger:ft,frameParsers:vt},yt=U,bt=Je,_t=gt;at=function(e){var t,i={descriptor:e&&e.descriptor},n=0,r=[],a=0;if(at.prototype.init.call(this),this.dispatchType=bt.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,s,o,l,u;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),a+=e.data.byteLength,1===r.length&&(n=_t.parseSyncSafeInteger(e.data.subarray(6,10)),n+=10),!(a<n)){for(t={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<n;)t.data.set(r[0].data.subarray(0,n-l),l),l+=r[0].data.byteLength,a-=r[0].data.byteLength,r.shift();i=10,64&t.data[5]&&(i+=4,i+=_t.parseSyncSafeInteger(t.data.subarray(10,14)),n-=_t.parseSyncSafeInteger(t.data.subarray(16,20)));do{if(s=_t.parseSyncSafeInteger(t.data.subarray(i+4,i+8)),s<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(u=String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),o={id:u,data:t.data.subarray(i+10,i+s+10)},o.key=o.id,_t.frameParsers[o.id]?_t.frameParsers[o.id](o):"T"===o.id[0]?_t.frameParsers["T*"](o):"W"===o.id[0]&&_t.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var c=o.data,h=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;h*=4,h+=3&c[7],o.timeStamp=h,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=s}while(i<n);this.trigger("data",t)}}},at.prototype=new yt;var Tt,St,wt,Et=at,kt=U,Ct=Qe,xt=Je,At=st.TimestampRolloverStream,It=188,Ot=71;Tt=function(){var e=new Uint8Array(It),t=0;Tt.prototype.init.call(this),this.push=function(i){var n,r=0,a=It;t?(n=new Uint8Array(i.byteLength+t),n.set(e.subarray(0,t)),n.set(i,t),t=0):n=i;while(a<n.byteLength)n[r]!==Ot||n[a]!==Ot?(r++,a++):(this.trigger("data",n.subarray(r,a)),r+=It,a+=It);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.byteLength-r)},this.flush=function(){t===It&&e[0]===Ot&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}},Tt.prototype=new kt,St=function(){var e,t,i,n;St.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var r=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,r,a,s;if(1&e[5]){n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=(15&e[1])<<8|e[2],r=3+i-4,a=(15&e[10])<<8|e[11],s=12+a;while(s<r){var o=e[s],l=(31&e[s+1])<<8|e[s+2];o===xt.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=l:o===xt.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=l:o===xt.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][l]=o),s+=5+((15&e[s+3])<<8|e[s+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid){i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);while(this.packetsWaitingForPmt.length)this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=xt.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=xt.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},St.prototype=new kt,St.STREAM_TYPES={h264:27,adts:15},wt=function(){var e,t=this,i=!1,n={data:[],size:0},r={data:[],size:0},a={data:[],size:0},s=function(e,t){var i;const n=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===n&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))},o=function(e,i,n){var r,a=new Uint8Array(e.size),o={type:i},l=0,u=0,c=!1;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,u),u+=r.data.byteLength;s(a,o),c="video"===i||o.packetLength<=e.size,(n||c)&&(e.size=0,e.data.length=0),c&&t.trigger("data",o)}};wt.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case xt.H264_STREAM_TYPE:e=n,t="video";break;case xt.ADTS_STREAM_TYPE:e=r,t="audio";break;case xt.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};e=s.programMapTable,null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",n)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(n,"video"),o(r,"audio"),o(a,"timed-metadata")},this.flush=function(){if(!i&&e){var n={type:"metadata",tracks:[]};null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}},wt.prototype=new kt;var jt={PAT_PID:0,MP2T_PACKET_LENGTH:It,TransportPacketStream:Tt,TransportParseStream:St,ElementaryStream:wt,TimestampRolloverStream:At,CaptionStream:Ct.CaptionStream,Cea608Stream:Ct.Cea608Stream,Cea708Stream:Ct.Cea708Stream,MetadataStream:Et};for(var Lt in xt)xt.hasOwnProperty(Lt)&&(jt[Lt]=xt[Lt]);var Pt,Dt=jt,Rt=U,Mt=ve.ONE_SECOND_IN_TS,Nt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Pt=function(e){var t,i=0;Pt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(n){var r,a,s,o,l,u=0;if(e||(i=0),"audio"===n.type){var c;t&&t.length?(s=t,t=new Uint8Array(s.byteLength+n.data.byteLength),t.set(s),t.set(n.data,s.byteLength)):t=n.data;while(u+7<t.length)if(255===t[u]&&240===(246&t[u+1])){if("number"===typeof c&&(this.skipWarn_(c,u),c=null),a=2*(1&~t[u+1]),r=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,o=1024*(1+(3&t[u+6])),l=o*Mt/Nt[(60&t[u+2])>>>2],t.byteLength-u<r)break;this.trigger("data",{pts:n.pts+i*l,dts:n.dts+i*l,sampleCount:o,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:Nt[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+a,u+r)}),i++,u+=r}else"number"!==typeof c&&(c=u),u++;"number"===typeof c&&(this.skipWarn_(c,u),c=null),t=t.subarray(u)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},Pt.prototype=new Rt;var Bt,Ut=Pt;Bt=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),i=new DataView(a.buffer).getUint32(0),n=8*s,t-=s},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,r=Math.floor(e/8),e-=8*r,t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),a=i>>>32-r;return n-=r,n>0?i<<=r:t>0&&this.loadWord(),r=e-r,r>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(0!==(i&2147483648>>>e))return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Ft,Vt,Ht,qt=Bt,zt=U,Gt=qt;Vt=function(){var e,t,i=0;Vt.prototype.init.call(this),this.push=function(n){var r;t?(r=new Uint8Array(t.byteLength+n.data.byteLength),r.set(t),r.set(n.data,t.byteLength),t=r):t=n.data;for(var a=t.byteLength;i<a-3;i++)if(1===t[i+2]){e=i+5;break}while(e<a)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<a);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3;break}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Vt.prototype=new zt,Ht={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ft=function(){var e,t,i,n,r,a,s,o=new Vt;Ft.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",(function(s){var o={trackId:t,pts:i,dts:n,data:s,nalUnitTypeCode:31&s[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp";break}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var i,n,r=8,a=8;for(i=0;i<e;i++)0!==a&&(n=t.readExpGolomb(),a=(r+n+256)%256),r=0===a?r:a},r=function(e){var t,i,n=e.byteLength,r=[],a=1;while(a<n-2)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},a=function(e){var t,i,n,r,a,o,l,u,c,h,d,p,f,v=0,m=0,g=0,y=0,b=[1,1];if(t=new Gt(e),i=t.readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Ht[i]&&(a=t.readUnsignedExpGolomb(),3===a&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(d=3!==a?8:12,f=0;f<d;f++)t.readBoolean()&&s(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),o=t.readUnsignedExpGolomb(),0===o)t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),f=0;f<l;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),h=t.readBits(1),0===h&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(v=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(p=t.readUnsignedByte(),p){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()];break}b&&(b[0],b[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:16*(u+1)-2*v-2*m,height:(2-h)*(c+1)*16-2*g-2*y,sarRatio:b}}},Ft.prototype=new zt;var Wt,$t={H264Stream:Ft,NalByteStream:Vt},Xt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Yt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],n=e[t+5],r=(16&n)>>4;return i=i>=0?i:0,r?i+20:i+10},Kt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=Yt(e,t),Kt(e,t))},Qt=function(e){var t=Kt(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},Jt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Zt=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},ei=function(e,t,i){return unescape(Zt(e,t,i))},ti=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3,r=6144&e[t+3];return r|n|i},ii=function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240===(240&e[t+1])?"audio":null},ni=function(e){var t=0;while(t+5<e.length){if(255===e[t]&&240===(246&e[t+1]))return Xt[(60&e[t+2])>>>2];t++}return null},ri=function(e){var t,i,n,r;t=10,64&e[5]&&(t+=4,t+=Jt(e.subarray(10,14)));do{if(i=Jt(e.subarray(t+4,t+8)),i<1)return null;if(r=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]),"PRIV"===r){n=e.subarray(t+10,t+i+10);for(var a=0;a<n.byteLength;a++)if(0===n[a]){var s=ei(n,0,a);if("com.apple.streaming.transportStreamTimestamp"===s){var o=n.subarray(a+1),l=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return l*=4,l+=3&o[7],l}break}}t+=10,t+=i}while(t<e.byteLength);return null},ai={isLikelyAacData:Qt,parseId3TagSize:Yt,parseAdtsSize:ti,parseType:ii,parseSampleRate:ni,parseAacTimestamp:ri},si=U,oi=ai;Wt=function(){var e=new Uint8Array,t=0;Wt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,r,a,s,o=0,l=0;e.length?(s=e.length,e=new Uint8Array(i.byteLength+s),e.set(e.subarray(0,s)),e.set(i,s)):e=i;while(e.length-l>=3)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!==(255&e[l])||240!==(240&e[l+1]))l++;else{if(e.length-l<7)break;if(o=oi.parseAdtsSize(e,l),l+o>e.length)break;a={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",a),l+=o}else{if(e.length-l<10)break;if(o=oi.parseId3TagSize(e,l),l+o>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}},Wt.prototype=new si;var li,ui,ci,hi,di=Wt,pi=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],fi=pi,vi=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],mi=vi,gi=U,yi=J,bi=le,_i=we,Ti=Ae,Si=Dt,wi=ve,Ei=Ut,ki=$t.H264Stream,Ci=di,xi=ai.isLikelyAacData,Ai=ve.ONE_SECOND_IN_TS,Ii=fi,Oi=mi,ji=function(e,t){t.stream=e,this.trigger("log",t)},Li=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++){var r=i[n];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",ji.bind(e,r))}},Pi=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Di=function(e,t,i,n,r,a){var s=i-t,o=n-t,l=r-i;return{start:{dts:e,pts:e+s},end:{dts:e+o,pts:e+l},prependedContentDuration:a,baseMediaDecodeTime:e}};ui=function(e,t){var i,n=[],r=0,a=0,s=1/0;t=t||{},i=t.firstSequenceNumber||0,ui.prototype.init.call(this),this.push=function(t){Ti.collectDtsInfo(e,t),e&&Ii.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,l,u,c,h,d,p;0!==n.length?(o=_i.trimAdtsFramesByEarliestDts(n,e,r),e.baseMediaDecodeTime=Ti.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=_i.prefixWithSilence(e,o,a,s),e.samples=_i.generateSampleTable(o),u=yi.mdat(_i.concatenateFrameData(o)),n=[],l=yi.moof(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),Ti.clearDtsInfo(e),h=Math.ceil(1024*Ai/e.samplerate),o.length&&(d=o.length*h,this.trigger("segmentTimingInfo",Di(wi.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+d,o[0].pts+d,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+d})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ti.clearDtsInfo(e),n=[],this.trigger("reset")}},ui.prototype=new gi,li=function(e,t){var i,n,r,a=[],s=[];t=t||{},i=t.firstSequenceNumber||0,li.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Ti.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Oi.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){var n,r,o,l,u,c,h,d,p=0;while(a.length){if("access_unit_delimiter_rbsp"===a[0].nalUnitType)break;a.shift()}if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=bi.groupNalsIntoFrames(a),o=bi.groupFramesIntoGops(n),o[0][0].keyFrame||(r=this.getGopForFusion_(a[0],e),r?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=bi.extendFirstKeyFrame(o)),s.length){var f;if(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o),!f)return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ti.clearDtsInfo(e),o=f}Ti.collectDtsInfo(e,o),e.samples=bi.generateSampleTable(o),u=yi.mdat(bi.concatenateNalData(o)),e.baseMediaDecodeTime=Ti.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),h=o[0],d=o[o.length-1],this.trigger("segmentTimingInfo",Di(e.baseMediaDecodeTime,h.dts,h.pts,d.dts+d.duration,d.pts+d.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=yi.moof(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){Ti.clearDtsInfo(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var i,n,r,a,s,o=45e3,l=1e4,u=1/0;for(s=0;s<this.gopCache_.length;s++)a=this.gopCache_[s],r=a.gop,e.pps&&Pi(e.pps[0],a.pps[0])&&e.sps&&Pi(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration,i>=-l&&i<=o&&(!n||u>i)&&(n=a,u=i)));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,r,a,o,l,u;a=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;while(t<s.length&&i<e.length){if(n=s[t],r=e[i],n.pts===r.pts)break;r.pts>n.pts?t++:(i++,a-=r.byteLength,o-=r.nalCount,l-=r.duration)}return 0===i?e:i===e.length?null:(u=e.slice(i),u.byteLength=a,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,n,r,a,o,l;t=s.length-1,i=e.length-1,a=null,o=!1;while(t>=0&&i>=0){if(n=s[t],r=e[i],n.pts===r.pts){o=!0;break}n.pts>r.pts?t--:(t===s.length-1&&(a=i),i--)}if(!o&&null===a)return null;if(l=o?i:a,0===l)return e;var u=e.slice(l),c=u.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){s=e}},li.prototype=new gi,hi=function(e,t){this.numberOfTracks=0,this.metadataStream=t,e=e||{},"undefined"!==typeof e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,hi.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},hi.prototype=new gi,hi.prototype.flush=function(e){var t,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Oi.forEach((function(e){s.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ii.forEach((function(e){s.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=yi.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)t=this.pendingCaptions[r],t.startTime=wi.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=wi.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)i=this.pendingMetadata[r],i.cueTime=wi.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),s.metadata.push(i);for(s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",s),r=0;r<s.captions.length;r++)t=s.captions[r],this.trigger("caption",t);for(r=0;r<s.metadata.length;r++)i=s.metadata[r],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},hi.prototype.setRemux=function(e){this.remuxTracks=e},ci=function(e){var t,i,n=this,r=!0;ci.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new Si.MetadataStream,r.aacStream=new Ci,r.audioTimestampRolloverStream=new Si.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new Si.TimestampRolloverStream("timed-metadata"),r.adtsStream=new Ei,r.coalesceStream=new hi(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||r.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new ui(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Li(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new Si.MetadataStream,r.packetStream=new Si.TransportPacketStream,r.parseStream=new Si.TransportParseStream,r.elementaryStream=new Si.ElementaryStream,r.timestampRolloverStream=new Si.TimestampRolloverStream,r.adtsStream=new Ei,r.h264Stream=new ki,r.captionStream=new Si.CaptionStream(e),r.coalesceStream=new hi(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(a){var s;if("metadata"===a.type){s=a.tracks.length;while(s--)t||"video"!==a.tracks[s].type?i||"audio"!==a.tracks[s].type||(i=a.tracks[s],i.timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=a.tracks[s],t.timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime);t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new li(t,e),r.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-n.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new ui(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,n.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Li(this,r)},this.setBaseMediaDecodeTime=function(n){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Ti.clearDtsInfo(i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ti.clearDtsInfo(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(r){var t=xi(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ci.prototype=new gi;var Ri,Mi={Transmuxer:ci,VideoSegmentStream:li,AudioSegmentStream:ui,AUDIO_PROPERTIES:Ii,VIDEO_PROPERTIES:Oi,generateSegmentTimingInfo:Di},Ni=function(e){return e>>>0},Bi=function(e){return("00"+e.toString(16)).slice(-2)},Ui={toUnsigned:Ni,toHexString:Bi},Fi=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3]),t},Vi=Fi,Hi=Ui.toUnsigned,qi=Vi,zi=function(e,t){var i,n,r,a,s,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)n=Hi(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),r=qi(e.subarray(i+4,i+8)),a=n>1?i+n:e.byteLength,r===t[0]&&(1===t.length?o.push(e.subarray(i+8,a)):(s=zi(e.subarray(i+8,a),t.slice(1)),s.length&&(o=o.concat(s)))),i=a;return o},Gi=zi,Wi=Ui.toUnsigned,$i=H.getUint64,Xi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=$i(e.subarray(4)):t.baseMediaDecodeTime=Wi(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Yi=Xi,Ki=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Qi=Ki,Ji=Qi,Zi=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],u=8&i.flags[1],c=n.getUint32(4),h=8;r&&(i.dataOffset=n.getInt32(h),h+=4),a&&c&&(t={flags:Ji(e.subarray(h,h+4))},h+=4,s&&(t.duration=n.getUint32(h),h+=4),o&&(t.size=n.getUint32(h),h+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(h):t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t),c--);while(c--)t={},s&&(t.duration=n.getUint32(h),h+=4),o&&(t.size=n.getUint32(h),h+=4),l&&(t.flags=Ji(e.subarray(h,h+4)),h+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(h):t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t);return i},en=Zi,tn=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],u=65536&n.flags[0],c=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),a&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),u&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},nn=tn;Ri="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};var rn,an,sn,on,ln,un,cn,hn=Ri,dn=Re.discardEmulationPreventionBytes,pn=Qe.CaptionStream,fn=Gi,vn=Yi,mn=en,gn=nn,yn=hn,bn=function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null},_n=function(e,t,i){var n,r,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case 6:var u=e.subarray(r+1,r+1+a),c=bn(r,t);if(n={nalUnitType:"sei_rbsp",size:a,data:u,escapedRBSP:dn(u),trackId:i},c)n.pts=c.pts,n.dts=c.dts,s=c;else{if(!s){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+i+". See mux.js#223."});break}n.pts=s.pts,n.dts=s.dts}l.seiNals.push(n);break}return l},Tn=function(e,t,i){var n=t,r=i.defaultSampleDuration||0,a=i.defaultSampleSize||0,s=i.trackId,o=[];return e.forEach((function(e){var t=mn(e),i=t.samples;i.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof n?(e.pts=n+yn.BigInt(e.compositionTimeOffset),n+=yn.BigInt(e.duration)):(e.pts=n+e.compositionTimeOffset,n+=e.duration)})),o=o.concat(i)})),o},Sn=function(e,t){var i=fn(e,["moof","traf"]),n=fn(e,["mdat"]),r={},a=[];return n.forEach((function(e,t){var n=i[t];a.push({mdat:e,traf:n})})),a.forEach((function(e){var i,n,a=e.mdat,s=e.traf,o=fn(s,["tfhd"]),l=gn(o[0]),u=l.trackId,c=fn(s,["tfdt"]),h=c.length>0?vn(c[0]).baseMediaDecodeTime:0,d=fn(s,["trun"]);t===u&&d.length>0&&(i=Tn(d,h,l),n=_n(a,i,u),r[u]||(r[u]={seiNals:[],logs:[]}),r[u].seiNals=r[u].seiNals.concat(n.seiNals),r[u].logs=r[u].logs.concat(n.logs))})),r},wn=function(e,t,i){var n;if(null===t)return null;n=Sn(e,t);var r=n[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:i}},En=function(){var e,t,i,n,r,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new pn,s=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,r.captions.push(e),r.captionStreams[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(i!==e[0]||n!==t[i])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))i=a[0],n=s[i];else if(null===i||!n)return t.push(e),null;while(t.length>0){var l=t.shift();this.parse(l,a,s)}return o=wn(e,i,n),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},kn=En,Cn=function(e){var t=0,i=String.fromCharCode(e[t]),n="";while("\0"!==i)n+=i,t++,i=String.fromCharCode(e[t]);return n+=i,n},xn={uint8ToCString:Cn},An=xn.uint8ToCString,In=H.getUint64,On=function(e){var t,i,n,r,a,s,o,l,u=4,c=e[0];if(0===c){t=An(e.subarray(u)),u+=t.length,i=An(e.subarray(u)),u+=i.length;var h=new DataView(e.buffer);n=h.getUint32(u),u+=4,a=h.getUint32(u),u+=4,s=h.getUint32(u),u+=4,o=h.getUint32(u),u+=4}else if(1===c){h=new DataView(e.buffer);n=h.getUint32(u),u+=4,r=In(e.subarray(u)),u+=8,s=h.getUint32(u),u+=4,o=h.getUint32(u),u+=4,t=An(e.subarray(u)),u+=t.length,i=An(e.subarray(u)),u+=i.length}l=new Uint8Array(e.subarray(u,e.byteLength));var d={scheme_id_uri:t,value:i,timescale:n||1,presentation_time:r,presentation_time_delta:a,event_duration:s,id:o,message_data:l};return Ln(c,d)?d:void 0},jn=function(e,t,i,n){return e||0===e?e/t:n+i/t},Ln=function(e,t){var i="\0"!==t.scheme_id_uri,n=0===e&&Pn(t.presentation_time_delta)&&i,r=1===e&&Pn(t.presentation_time)&&i;return!(e>1)&&n||r},Pn=function(e){return void 0!==e||null!==e},Dn={parseEmsgBox:On,scaleTime:jn},Rn=Ui.toUnsigned,Mn=Ui.toHexString,Nn=Gi,Bn=Vi,Un=Dn,Fn=nn,Vn=en,Hn=Yi,qn=H.getUint64,zn=hn,Gn=gt.parseId3Frames;rn=function(e){var t={},i=Nn(e,["moov","trak"]);return i.reduce((function(e,t){var i,n,r,a,s;return i=Nn(t,["tkhd"])[0],i?(n=i[0],r=0===n?12:20,a=Rn(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),s=Nn(t,["mdia","mdhd"])[0],s?(n=s[0],r=0===n?12:20,e[a]=Rn(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),e):null):null}),t)},an=function(e,t){var i;i=Nn(t,["moof","traf"]);var n=i.reduce((function(t,i){var n,r=Nn(i,["tfhd"])[0],a=Rn(r[4]<<24|r[5]<<16|r[6]<<8|r[7]),s=e[a]||9e4,o=Nn(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let u;return n=1===o[0]?qn(o.subarray(4,12)):l.getUint32(4),"bigint"===typeof n?u=n/zn.BigInt(s):"number"!==typeof n||isNaN(n)||(u=n/s),u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u<t&&(t=u),t}),1/0);return"bigint"===typeof n||isFinite(n)?n:0},sn=function(e,t){var i,n=Nn(t,["moof","traf"]),r=0,a=0;if(n&&n.length){var s=Nn(n[0],["tfhd"])[0],o=Nn(n[0],["trun"])[0],l=Nn(n[0],["tfdt"])[0];if(s){var u=Fn(s);i=u.trackId}if(l){var c=Hn(l);r=c.baseMediaDecodeTime}if(o){var h=Vn(o);h.samples&&h.samples.length&&(a=h.samples[0].compositionTimeOffset||0)}}var d=e[i]||9e4;"bigint"===typeof r&&(a=zn.BigInt(a),d=zn.BigInt(d));var p=(r+a)/d;return"bigint"===typeof p&&p<Number.MAX_SAFE_INTEGER&&(p=Number(p)),p},on=function(e){var t=Nn(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=Nn(e,["mdia","hdlr"]),n=Nn(e,["tkhd"]);t.forEach((function(e,t){var r,a,s,o=Bn(e.subarray(8,12)),l=n[t];"vide"===o&&(r=new DataView(l.buffer,l.byteOffset,l.byteLength),a=r.getUint8(0),s=0===a?r.getUint32(12):r.getUint32(20),i.push(s))}))})),i},un=function(e){var t=e[0],i=0===t?12:20;return Rn(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])},ln=function(e){var t=Nn(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,r={},a=Nn(e,["tkhd"])[0];a&&(t=new DataView(a.buffer,a.byteOffset,a.byteLength),n=t.getUint8(0),r.id=0===n?t.getUint32(12):t.getUint32(20));var s=Nn(e,["mdia","hdlr"])[0];if(s){var o=Bn(s.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=Nn(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);r.codec=Bn(u.subarray(4,8));var c,h,d=Nn(u,[r.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(r.codec)?(c=d.subarray(78),h=Bn(c.subarray(4,8)),"avcC"===h&&c.length>11?(r.codec+=".",r.codec+=Mn(c[9]),r.codec+=Mn(c[10]),r.codec+=Mn(c[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(c=d.subarray(28),h=Bn(c.subarray(4,8)),"esds"===h&&c.length>20&&0!==c[19]?(r.codec+="."+Mn(c[19]),r.codec+="."+Mn(c[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var p=Nn(e,["mdia","mdhd"])[0];p&&(r.timescale=un(p)),i.push(r)})),i},cn=function(e,t=0){var i=Nn(e,["emsg"]);return i.map(e=>{var i=Un.parseEmsgBox(new Uint8Array(e)),n=Gn(i.message_data);return{cueTime:Un.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Un.scaleTime(i.event_duration,i.timescale),frames:n}})};var Wn={findBox:Nn,parseType:Bn,timescale:rn,startTime:an,compositionStartTime:sn,videoTrackIds:on,tracks:ln,getTimescaleFromMediaHeader:un,getEmsgID3:cn},$n=Je,Xn=function(e){var t=31&e[1];return t<<=8,t|=e[2],t},Yn=function(e){return!!(64&e[1])},Kn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Qn=function(e,t){var i=Xn(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},Jn=function(e){var t=Yn(e),i=4+Kn(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},Zn=function(e){var t={},i=Yn(e),n=4+Kn(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r,a,s;r=(15&e[n+1])<<8|e[n+2],a=3+r-4,s=(15&e[n+10])<<8|e[n+11];var o=12+s;while(o<a){var l=n+o;t[(31&e[l+1])<<8|e[l+2]]=e[l],o+=5+((15&e[l+3])<<8|e[l+4])}return t}},er=function(e,t){var i=Xn(e),n=t[i];switch(n){case $n.H264_STREAM_TYPE:return"video";case $n.ADTS_STREAM_TYPE:return"audio";case $n.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},tr=function(e){var t=Yn(e);if(!t)return null;var i=4+Kn(e);if(i>=e.byteLength)return null;var n,r=null;return n=e[i+7],192&n&&(r={},r.pts=(14&e[i+9])<<27|(255&e[i+10])<<20|(254&e[i+11])<<12|(255&e[i+12])<<5|(254&e[i+13])>>>3,r.pts*=4,r.pts+=(6&e[i+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[i+14])<<27|(255&e[i+15])<<20|(254&e[i+16])<<12|(255&e[i+17])<<5|(254&e[i+18])>>>3,r.dts*=4,r.dts+=(6&e[i+18])>>>1)),r},ir=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},nr=function(e){for(var t,i=4+Kn(e),n=e.subarray(i),r=0,a=0,s=!1;a<n.byteLength-3;a++)if(1===n[a+2]){r=a+5;break}while(r<n.byteLength)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}a+3!==r-2&&(t=ir(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(s=!0));do{r++}while(1!==n[r]&&r<n.length);a=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}t=ir(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(s=!0),a=r-2,r+=3;break;default:r+=3;break}return n=n.subarray(a),r-=a,a=0,n&&n.byteLength>3&&(t=ir(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(s=!0)),s},rr={parseType:Qn,parsePat:Jn,parsePmt:Zn,parsePayloadUnitStartIndicator:Yn,parsePesType:er,parsePesTime:tr,videoPacketContainsKeyFrame:nr},ar=Je,sr=st.handleRollover,or={};or.ts=rr,or.aac=ai;var lr=ve.ONE_SECOND_IN_TS,ur=188,cr=71,hr=function(e,t){var i,n,r=0,a=ur;while(a<e.byteLength)if(e[r]!==cr||e[a]!==cr)r++,a++;else{switch(i=e.subarray(r,a),n=or.ts.parseType(i,t.pid),n){case"pat":t.pid=or.ts.parsePat(i);break;case"pmt":var s=or.ts.parsePmt(i);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}));break}r+=ur,a+=ur}},dr=function(e,t,i){var n,r,a,s,o,l=0,u=ur,c=!1;while(u<=e.byteLength)if(e[l]!==cr||e[u]!==cr&&u!==e.byteLength)l++,u++;else{switch(n=e.subarray(l,u),r=or.ts.parseType(n,t.pid),r){case"pes":a=or.ts.parsePesType(n,t.table),s=or.ts.parsePayloadUnitStartIndicator(n),"audio"===a&&s&&(o=or.ts.parsePesTime(n),o&&(o.type="audio",i.audio.push(o),c=!0));break}if(c)break;l+=ur,u+=ur}u=e.byteLength,l=u-ur,c=!1;while(l>=0)if(e[l]!==cr||e[u]!==cr&&u!==e.byteLength)l--,u--;else{switch(n=e.subarray(l,u),r=or.ts.parseType(n,t.pid),r){case"pes":a=or.ts.parsePesType(n,t.table),s=or.ts.parsePayloadUnitStartIndicator(n),"audio"===a&&s&&(o=or.ts.parsePesTime(n),o&&(o.type="audio",i.audio.push(o),c=!0));break}if(c)break;l-=ur,u-=ur}},pr=function(e,t,i){var n,r,a,s,o,l,u,c,h=0,d=ur,p=!1,f={data:[],size:0};while(d<e.byteLength)if(e[h]!==cr||e[d]!==cr)h++,d++;else{switch(n=e.subarray(h,d),r=or.ts.parseType(n,t.pid),r){case"pes":if(a=or.ts.parsePesType(n,t.table),s=or.ts.parsePayloadUnitStartIndicator(n),"video"===a&&(s&&!p&&(o=or.ts.parsePesTime(n),o&&(o.type="video",i.video.push(o),p=!0)),!i.firstKeyFrame)){if(s&&0!==f.size){l=new Uint8Array(f.size),u=0;while(f.data.length)c=f.data.shift(),l.set(c,u),u+=c.byteLength;if(or.ts.videoPacketContainsKeyFrame(l)){var v=or.ts.parsePesTime(l);v?(i.firstKeyFrame=v,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(n),f.size+=n.byteLength}break}if(p&&i.firstKeyFrame)break;h+=ur,d+=ur}d=e.byteLength,h=d-ur,p=!1;while(h>=0)if(e[h]!==cr||e[d]!==cr)h--,d--;else{switch(n=e.subarray(h,d),r=or.ts.parseType(n,t.pid),r){case"pes":a=or.ts.parsePesType(n,t.table),s=or.ts.parsePayloadUnitStartIndicator(n),"video"===a&&s&&(o=or.ts.parsePesTime(n),o&&(o.type="video",i.video.push(o),p=!0));break}if(p)break;h-=ur,d-=ur}},fr=function(e,t){if(e.audio&&e.audio.length){var i=t;("undefined"===typeof i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=sr(e.dts,i),e.pts=sr(e.pts,i),e.dtsTime=e.dts/lr,e.ptsTime=e.pts/lr}))}if(e.video&&e.video.length){var n=t;if(("undefined"===typeof n||isNaN(n))&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=sr(e.dts,n),e.pts=sr(e.pts,n),e.dtsTime=e.dts/lr,e.ptsTime=e.pts/lr})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=sr(r.dts,n),r.pts=sr(r.pts,n),r.dtsTime=r.dts/lr,r.ptsTime=r.pts/lr}}},vr=function(e){var t,i=!1,n=0,r=null,a=null,s=0,o=0;while(e.length-o>=3){var l=or.aac.parseType(e,o);switch(l){case"timed-metadata":if(e.length-o<10){i=!0;break}if(s=or.aac.parseId3TagSize(e,o),s>e.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=or.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){i=!0;break}if(s=or.aac.parseAdtsSize(e,o),s>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+s),r=or.aac.parseSampleRate(t)),n++,o+=s;break;default:o++;break}if(i)return null}if(null===r||null===a)return null;var u=lr/r,c={audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*u,pts:a+1024*n*u}]};return c},mr=function(e){var t={pid:null,table:null},i={};for(var n in hr(e,t),t.table)if(t.table.hasOwnProperty(n)){var r=t.table[n];switch(r){case ar.H264_STREAM_TYPE:i.video=[],pr(e,t,i),0===i.video.length&&delete i.video;break;case ar.ADTS_STREAM_TYPE:i.audio=[],dr(e,t,i),0===i.audio.length&&delete i.audio;break}}return i},gr=function(e,t){var i,n=or.aac.isLikelyAacData(e);return i=n?vr(e):mr(e),i&&(i.audio||i.video)?(fr(i,t),i):null},yr={inspect:gr,parseAudioPes_:dr};const br=function(e,t){t.on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const n=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const i={start:{decode:ve.videoTsToSeconds(t.start.dts),presentation:ve.videoTsToSeconds(t.start.pts)},end:{decode:ve.videoTsToSeconds(t.end.dts),presentation:ve.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:ve.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=ve.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:ve.videoTsToSeconds(t.start.dts),presentation:ve.videoTsToSeconds(t.start.pts)},end:{decode:ve.videoTsToSeconds(t.end.dts),presentation:ve.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:ve.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=ve.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ve.videoTsToSeconds(t.start),end:ve.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ve.videoTsToSeconds(t.start),end:ve.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))};class _r{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Mi.Transmuxer(this.options),br(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new kn,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Wn.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Wn.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Wn.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i="number"!==typeof t||isNaN(t)?void 0:t*ve.ONE_SECOND_IN_TS,n=yr.inspect(e,i);let r=null;n&&(r={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1},r.hasVideo&&(r.videoStart=n.video[0].ptsTime),r.hasAudio&&(r.audioStart=n.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:r,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(ve.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(ve.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new _r(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new _r(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Ro=jo(Do);const Mo=(e,t,i)=>{const{type:n,initSegment:r,captions:a,captionStreams:s,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:u}=e.data.segment;t.buffer.push({captions:a,captionStreams:s,metadata:o});const c=e.data.segment.boxes||{data:e.data.segment.data},h={type:n,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};"undefined"!==typeof l&&(h.videoFrameDtsTime=l),"undefined"!==typeof u&&(h.videoFramePtsTime=u),i(h)},No=({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)},Bo=(e,t)=>{t.gopInfo=e.data.gopInfo},Uo=e=>{const{transmuxer:t,bytes:i,audioAppendStart:n,gopsToAlignWith:r,remux:a,onData:s,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:u,onVideoSegmentTimingInfo:c,onAudioSegmentTimingInfo:h,onId3:d,onCaptions:p,onDone:f,onEndedTimeline:v,onTransmuxerLog:m,isEndOfTimeline:g}=e,y={buffer:[]};let b=g;const _=i=>{t.currentTransmux===e&&("data"===i.data.action&&Mo(i,y,s),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&Bo(i,y),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&u(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&c(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&h(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&d([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(b=!1,v()),"log"===i.data.action&&m(i.data.log),"transmuxed"===i.data.type&&(b||(t.onmessage=null,No({transmuxedData:y,callback:f}),Fo(t))))};if(t.onmessage=_,n&&t.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),"undefined"!==typeof a&&t.postMessage({action:"setRemux",remux:a}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,n=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:e,byteOffset:n,byteLength:i.byteLength},[e])}g&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Fo=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():Uo(e.currentTransmux))},Vo=(e,t)=>{e.postMessage({action:t}),Fo(e)},Ho=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Vo(t,e);t.transmuxQueue.push(Vo.bind(null,t,e))},qo=e=>{Ho("reset",e)},zo=e=>{Ho("endTimeline",e)},Go=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Uo(e);e.transmuxer.transmuxQueue.push(e)},Wo=e=>{const t=new Ro;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t};var $o={reset:qo,endTimeline:zo,transmux:Go,createTransmuxer:Wo};const Xo=function(e){const t=e.transmuxer,i=e.endAction||e.action,n=e.callback,r=g()({},e,{endAction:null,transmuxer:null,callback:null}),a=r=>{r.data.action===i&&(t.removeEventListener("message",a),r.data.data&&(r.data.data=new Uint8Array(r.data.data,e.byteOffset||0,e.byteLength||r.data.data.byteLength),e.data&&(e.data=r.data.data)),n(r.data))};if(t.addEventListener("message",a),e.data){const i=e.data instanceof ArrayBuffer;r.byteOffset=i?0:e.data.byteOffset,r.byteLength=e.data.byteLength;const n=[i?e.data:e.data.buffer];t.postMessage(r,n)}else t.postMessage(r)},Yo={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Ko=e=>{e.forEach(e=>{e.abort()})},Qo=e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}),Jo=e=>{const t=e.target,i=Date.now()-t.requestTime,n={bandwidth:1/0,bytesReceived:0,roundTripTime:i||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},Zo=(e,t)=>t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Yo.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Yo.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Yo.FAILURE,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Yo.FAILURE,xhr:t}:null,el=(e,t,i)=>(n,r)=>{const a=r.response,s=Zo(n,r);if(s)return i(s,e);if(16!==a.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Yo.FAILURE,xhr:r},e);const o=new DataView(a),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=l;return i(null,e)},tl=(e,t)=>{const i=Object(C["a"])(e.map.bytes);if("mp4"!==i){const n=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:`Found unsupported ${i||"unknown"} container for initialization segment at URL: ${n}`,code:Yo.FAILURE})}Xo({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:n})=>(e.map.bytes=n,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null))})},il=({segment:e,finishProcessingFn:t})=>(i,n)=>{const r=Zo(i,n);if(r)return t(r,e);const a=new Uint8Array(n.response);if(e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,tl(e,(function(i){if(i)return i.xhr=n,i.status=n.status,t(i,e);t(null,e)}))},nl=({segment:e,finishProcessingFn:t,responseType:i})=>(n,r)=>{const a=Zo(n,r);if(a)return t(a,e);const s="arraybuffer"!==i&&r.responseText?Ao(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=Qo(r),e.key?e.encryptedBytes=new Uint8Array(s):e.bytes=new Uint8Array(s),t(null,e)},rl=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})=>{const p=e.map&&e.map.tracks||{},f=Boolean(p.audio&&p.video);let v=n.bind(null,e,"audio","start");const m=n.bind(null,e,"audio","end");let g=n.bind(null,e,"video","start");const y=n.bind(null,e,"video","end"),b=()=>Go({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:f,onData:t=>{t.type="combined"===t.type?"video":t.type,c(e,t)},onTrackInfo:t=>{i&&(f&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{v&&"undefined"!==typeof e.start&&(v(e.start),v=null),m&&"undefined"!==typeof e.end&&m(e.end)},onVideoTimingInfo:e=>{g&&"undefined"!==typeof e.start&&(g(e.start),g=null),y&&"undefined"!==typeof e.end&&y(e.end)},onVideoSegmentTimingInfo:e=>{r(e)},onAudioSegmentTimingInfo:e=>{a(e)},onId3:(t,i)=>{s(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{u()},onTransmuxerLog:d,onDone:t=>{h&&(t.type="combined"===t.type?"video":t.type,h(null,e,t))}});Xo({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:n=>{e.bytes=t=n.data;const r=n.result;r&&(i(e,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:f}),i=null),b()}})},al=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})=>{let p=new Uint8Array(t);if(Object(C["b"])(p)){e.isFmp4=!0;const{tracks:r}=e.map,a={isFmp4:!0,hasVideo:!!r.video,hasAudio:!!r.audio};r.audio&&r.audio.codec&&"enca"!==r.audio.codec&&(a.audioCodec=r.audio.codec),r.video&&r.video.codec&&"encv"!==r.video.codec&&(a.videoCodec=r.video.codec),r.video&&r.audio&&(a.isMuxed=!0),i(e,a);const l=(t,i)=>{c(e,{data:p,type:a.hasAudio&&!a.isMuxed?"audio":"video"}),i&&i.length&&s(e,i),t&&t.length&&o(e,t),h(null,e,{})};Xo({action:"probeMp4StartTime",timescales:e.map.timescales,data:p,transmuxer:e.transmuxer,callback:({data:i,startTime:s})=>{t=i.buffer,e.bytes=p=i,a.hasAudio&&!a.isMuxed&&n(e,"audio","start",s),a.hasVideo&&n(e,"video","start",s),Xo({action:"probeEmsgID3",data:p,transmuxer:e.transmuxer,offset:s,callback:({emsgData:i,id3Frames:n})=>{t=i.buffer,e.bytes=p=i,r.video&&i.byteLength&&e.transmuxer?Xo({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:p,timescales:e.map.timescales,trackIds:[r.video.id],callback:i=>{t=i.data.buffer,e.bytes=p=i.data,i.logs.forEach((function(e){d(Da(e,{stream:"mp4CaptionParser"}))})),l(i.captions,n)}}):l(void 0,n)}})}})}else if(e.transmuxer){if("undefined"===typeof e.container&&(e.container=Object(C["a"])(p)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void h(null,e,{});rl({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})}else h(null,e,{})},sl=function({id:e,key:t,encryptedBytes:i,decryptionWorker:n},r){const a=t=>{if(t.data.source===e){n.removeEventListener("message",a);const e=t.data.decrypted;r(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let s;n.addEventListener("message",a),s=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),n.postMessage(Js({source:e,encrypted:i,key:s,iv:t.iv}),[i.buffer,s.buffer])},ol=({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})=>{sl({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e},e=>{t.bytes=e,al({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})})},ll=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})=>{let p=0,f=!1;return(v,m)=>{if(!f){if(v)return f=!0,Ko(e),h(v,m);if(p+=1,p===e.length){const p=function(){if(m.encryptedBytes)return ol({decryptionWorker:t,segment:m,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d});al({segment:m,bytes:m.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d})};if(m.endOfAllRequests=Date.now(),m.map&&m.map.encryptedBytes&&!m.map.bytes)return sl({decryptionWorker:t,id:m.requestId+"-init",encryptedBytes:m.map.encryptedBytes,key:m.map.key},t=>{m.map.bytes=t,tl(m,t=>{if(t)return Ko(e),h(t,m);p()})});p()}}}},ul=({loadendState:e,abortFn:t})=>i=>{const n=i.target;n.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)},cl=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c})=>i=>{const n=i.target;if(!n.aborted)return e.stats=Da(e.stats,Jo(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},hl=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:n,abortFn:r,progressFn:a,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:p,dataFn:f,doneFn:v,onTransmuxerLog:m})=>{const g=[],y=ll({activeXhrs:g,decryptionWorker:i,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:p,dataFn:f,doneFn:v,onTransmuxerLog:m});if(n.key&&!n.key.bytes){const i=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&i.push(n.map.key);const r=Da(t,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),a=el(n,i,y),s=e(r,a);g.push(s)}if(n.map&&!n.map.bytes){const i=n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri);if(i){const i=Da(t,{uri:n.map.key.resolvedUri,responseType:"arraybuffer"}),r=el(n,[n.map.key],y),a=e(i,r);g.push(a)}const r=Da(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Xs(n.map)}),a=il({segment:n,finishProcessingFn:y}),s=e(r,a);g.push(s)}const b=Da(t,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Xs(n)}),_=nl({segment:n,finishProcessingFn:y,responseType:b.responseType}),T=e(b,_);T.addEventListener("progress",cl({segment:n,progressFn:a,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:p,dataFn:f})),g.push(T);const S={};return g.forEach(e=>{e.addEventListener("loadend",ul({loadendState:S,abortFn:r}))}),()=>Ko(g)},dl=Pa("CodecUtils"),pl=function(e){const t=e.attributes||{};if(t.CODECS)return Object(b["h"])(t.CODECS)},fl=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},vl=(e,t)=>{if(!fl(e,t))return!0;const i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(const r in n)if(!n[r].uri&&!n[r].playlists)return!0;return!1},ml=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:n})=>{t[e]=t[e]||[],t[e].push(Object(b["i"])(`${i}${n}`))}),Object.keys(t).forEach((function(e){if(t[e].length>1)return dl(`multiple ${e} codecs found as attributes: ${t[e].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},gl=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},yl=function(e,t){const i=t.attributes||{},n=ml(pl(t)||[]);if(fl(e,t)&&!n.audio&&!vl(e,t)){const t=ml(Object(b["d"])(e,i.AUDIO)||[]);t.audio&&(n.audio=t.audio)}return n},bl=Pa("PlaylistSelector"),_l=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Tl=function(e,t){if(!e)return"";const i=r.a.getComputedStyle(e);return i?i[t]:""},Sl=function(e,t){const i=e.slice();e.sort((function(e,n){const r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r}))},wl=function(e,t){let i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||r.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||r.a.Number.MAX_VALUE,i-n},El=function(e,t){let i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||r.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||r.a.Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n};let kl=function(e,t,i,n,a,s){if(!e)return;const o={bandwidth:t,width:i,height:n,limitRenditionByPlayerDimensions:a};let l=e.playlists;_s.isAudioOnly(e)&&(l=s.getAudioTrackPlaylists_(),o.audioOnly=!0);let u=l.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||r.a.Number.MAX_VALUE,{bandwidth:t,width:i,height:n,playlist:e}});Sl(u,(e,t)=>e.bandwidth-t.bandwidth),u=u.filter(e=>!_s.isIncompatible(e.playlist));let c=u.filter(e=>_s.isEnabled(e.playlist));c.length||(c=u.filter(e=>!_s.isDisabled(e.playlist)));const h=c.filter(e=>e.bandwidth*xo.BANDWIDTH_VARIANCE<t);let d=h[h.length-1];const p=h.filter(e=>e.bandwidth===d.bandwidth)[0];if(!1===a){const e=p||c[0]||u[0];if(e&&e.playlist){let t="sortedPlaylistReps";return p&&(t="bandwidthBestRep"),c[0]&&(t="enabledPlaylistReps"),bl(`choosing ${_l(e)} using ${t} with options`,o),e.playlist}return bl("could not choose a playlist with options",o),null}const f=h.filter(e=>e.width&&e.height);Sl(f,(e,t)=>e.width-t.width);const v=f.filter(e=>e.width===i&&e.height===n);d=v[v.length-1];const m=v.filter(e=>e.bandwidth===d.bandwidth)[0];let g,y,b,_;if(m||(g=f.filter(e=>e.width>i||e.height>n),y=g.filter(e=>e.width===g[0].width&&e.height===g[0].height),d=y[y.length-1],b=y.filter(e=>e.bandwidth===d.bandwidth)[0]),s.leastPixelDiffSelector){const e=f.map(e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-n),e));Sl(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),_=e[0]}const T=_||b||m||p||c[0]||u[0];if(T&&T.playlist){let e="sortedPlaylistReps";return _?e="leastPixelDiffRep":b?e="resolutionPlusOneRep":m?e="resolutionBestRep":p?e="bandwidthBestRep":c[0]&&(e="enabledPlaylistReps"),bl(`choosing ${_l(T)} using ${e} with options`,o),T.playlist}return bl("could not choose a playlist with options",o),null};const Cl=function(){const e=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return kl(this.playlists.main,this.systemBandwidth,parseInt(Tl(this.tech_.el(),"width"),10)*e,parseInt(Tl(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.playlistController_)},xl=function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){const n=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),kl(this.playlists.main,t,parseInt(Tl(this.tech_.el(),"width"),10)*n,parseInt(Tl(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.playlistController_)}},Al=function(e){const{main:t,currentTime:i,bandwidth:n,duration:r,segmentDuration:a,timeUntilRebuffer:s,currentTimeline:o,syncController:l}=e,u=t.playlists.filter(e=>!_s.isIncompatible(e));let c=u.filter(_s.isEnabled);c.length||(c=u.filter(e=>!_s.isDisabled(e)));const h=c.filter(_s.hasAttribute.bind(null,"BANDWIDTH")),d=h.map(e=>{const t=l.getSyncPoint(e,r,o,i),u=t?1:2,c=_s.estimateSegmentRequestTime(a,n,e),h=c*u-s;return{playlist:e,rebufferingImpact:h}}),p=d.filter(e=>e.rebufferingImpact<=0);return Sl(p,(e,t)=>wl(t.playlist,e.playlist)),p.length?p[0]:(Sl(d,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),d[0]||null)},Il=function(){const e=this.playlists.main.playlists.filter(_s.isEnabled);Sl(e,(e,t)=>wl(e,t));const t=e.filter(e=>!!yl(this.playlists.main,e).video);return t[0]||null},Ol=e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t},jl=function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const r=t.textTracks().getTrackById(n);if(r)e[i]=r;else{const r=t.options_.vhs&&t.options_.vhs.captionServices||{};let a=i,s=i,o=!1;const l=r[n];l&&(a=l.label,s=l.language,o=l.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:n,default:o,label:a,language:s},!1).track}}},Ll=function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const n=r.a.WebKitDataCue||r.a.VTTCue;t.forEach(t=>{const r=t.stream;t.content?t.content.forEach(a=>{const s=new n(t.startTime+i,t.endTime+i,a.text);s.line=a.line,s.align="left",s.position=a.position,s.positionAlign="line-left",e[r].addCue(s)}):e[r].addCue(new n(t.startTime+i,t.endTime+i,t.text))})},Pl=function(e){Object.defineProperties(e.frame,{id:{get(){return ka.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get(){return ka.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get(){return ka.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})},Dl=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:n})=>{if(!t)return;const a=r.a.WebKitDataCue||r.a.VTTCue,s=e.metadataTrack_;if(!s)return;if(t.forEach(e=>{const t=e.cueTime+i;!("number"!==typeof t||r.a.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new a(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,Pl(i),s.addCue(i)})}),!s.cues||!s.cues.length)return;const o=s.cues,l=[];for(let r=0;r<o.length;r++)o[r]&&l.push(o[r]);const u=l.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),c=Object.keys(u).sort((e,t)=>Number(e)-Number(t));c.forEach((e,t)=>{const i=u[e],r=isFinite(n)?n:0,a=Number(c[t+1])||r;i.forEach(e=>{e.endTime=a})})},Rl={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Ml=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Nl=({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const n=r.a.WebKitDataCue||r.a.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Ml.has(t))continue;const r=new n(e.startTime,e.endTime,"");r.id=e.id,r.type="com.apple.quicktime.HLS",r.value={key:Rl[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(r.value.data=new Uint8Array(r.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(r)}e.processDateRange()})},Bl=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ka.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Ul=function(e,t,i){let n,r;if(i&&i.cues){n=i.cues.length;while(n--)r=i.cues[n],r.startTime>=e&&r.endTime<=t&&i.removeCue(r)}},Fl=function(e){const t=e.cues;if(!t)return;const i={};for(let n=t.length-1;n>=0;n--){const r=t[n],a=`${r.startTime}-${r.endTime}-${r.text}`;i[a]?e.removeCue(r):i[a]=r}},Vl=(e,t,i)=>{if("undefined"===typeof t||null===t||!e.length)return[];const n=Math.ceil((t-i+3)*x["ONE_SECOND_IN_TS"]);let r;for(r=0;r<e.length;r++)if(e[r].pts>n)break;return e.slice(r)},Hl=(e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const n=t[0].pts;let r=0;for(r;r<e.length;r++)if(e[r].pts>=n)break;return e.slice(0,r).concat(t)},ql=(e,t,i,n)=>{const r=Math.ceil((t-n)*x["ONE_SECOND_IN_TS"]),a=Math.ceil((i-n)*x["ONE_SECOND_IN_TS"]),s=e.slice();let o=e.length;while(o--)if(e[o].pts<=a)break;if(-1===o)return s;let l=o+1;while(l--)if(e[l].pts<=r)break;return l=Math.max(l,0),s.splice(l,o-l+1),s},zl=function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(let r=0;r<i.length;r++){const a=i[r];if(a!==n[r])return!1;if(e[a]!==t[a])return!1}return!0},Gl=22,Wl=function(e,t,i){t=t||[];const n=[];let r=0;for(let a=0;a<t.length;a++){const s=t[a];if(e===s.timeline&&(n.push(a),r+=s.duration,r>i))return a}return 0===n.length?0:n[n.length-1]},$l=1,Xl=500,Yl=e=>"number"===typeof e&&isFinite(e),Kl=1/60,Ql=(e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null,Jl=(e,t,i)=>{let n=t-xo.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));const r=t-i;return Math.min(r,n)},Zl=e=>{const{startOfSegment:t,duration:i,segment:n,part:r,playlist:{mediaSequence:a,id:s,segments:o=[]},mediaIndex:l,partIndex:u,timeline:c}=e,h=o.length-1;let d="mediaIndex/partIndex increment";e.getMediaInfoForTime?d=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(d="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(d+=" with independent "+e.independent);const p="number"===typeof u,f=e.segment.uri?"segment":"pre-segment",v=p?Za({preloadSegment:n})-1:0;return`${f} [${a+l}/${a+h}]`+(p?` part [${u}/${v}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(p?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${c}]`+` selected by [${d}]`+` playlist [${s}]`},eu=e=>e+"TimingInfo",tu=(e,t)=>e.length?e.end(e.length-1):t,iu=({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:n,calculateTimestampOffsetForEachSegment:r,overrideCheck:a})=>r?tu(n,i):a||e!==t?e<t?i:tu(n,i):null,nu=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:n,audioDisabled:r})=>{if(t===i)return!1;if("audio"===n){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===n&&r){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},ru=e=>{let t=0;return["video","audio"].forEach((function(i){const n=e[i+"TimingInfo"];if(!n)return;const{start:a,end:s}=n;let o;"bigint"===typeof a||"bigint"===typeof s?o=r.a.BigInt(s)-r.a.BigInt(a):"number"===typeof a&&"number"===typeof s&&(o=s-a),"undefined"!==typeof o&&o>t&&(t=o)})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t},au=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Na,su=(e,t)=>{if("hls"!==t)return null;const i=ru({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const n=e.playlist.targetDuration,r=au({segmentDuration:i,maxDuration:2*n}),a=au({segmentDuration:i,maxDuration:n}),s=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${n}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return r||a?{severity:r?"warn":"info",message:s}:null};class ou extends ka.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.calculateTimestampOffsetForEachSegment_=e.calculateTimestampOffsetForEachSegment,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.replaceSegmentsUntil_=-1,this.logger_=Pa(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}createTransmuxer_(){return $o.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,r.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&$o.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ra();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:n}=e;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Zs(e);let n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e}segmentKey(e,t=!1){if(!e)return null;const i=eo(e);let n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});const r={resolvedUri:(n||e).resolvedUri};return n&&(r.bytes=n.bytes),r}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_(`playlist update [${r} => ${e.id||e.uri}]`),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){const t=!e.endList&&"number"===typeof e.partTargetDuration;t?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger("playlistupdate")}const a=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${a}]`),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}n&&(n.mediaIndex-=a,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetLoaderProperties(){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0}}resetEverything(e){this.resetLoaderProperties(),this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.resyncLoader()}resyncLoader(){this.transmuxer_&&$o.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=(()=>{}),n=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let r=1;const a=()=>{r--,0===r&&i()};!n&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,a)),(n||"main"===this.loaderType_)&&(this.gopBuffer_=ql(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,a));for(const s in this.inbandTextTracks_)Ul(e,t,this.inbandTextTracks_[s]);Ul(e,t,this.segmentMetadataTrack_),a()}monitorBuffer_(){this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),Xl)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();e&&("number"===typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const n="number"===typeof e&&t.segments[e],r=e+1===t.segments.length,a=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&a}chooseNextRequest_(){const e=this.buffered_(),t=Xa(e)||0,i=Ya(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,r=i>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());const s={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(s.isSyncRequest)s.mediaIndex=Wl(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){const e=a[this.mediaIndex],i="number"===typeof this.partIndex?this.partIndex:-1;s.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(s.mediaIndex=this.mediaIndex,s.partIndex=i+1):s.mediaIndex=this.mediaIndex+1}else{const{segmentIndex:e,startTime:i,partIndex:n}=_s.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});s.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),s.mediaIndex=e,s.startOfSegment=i,s.partIndex=n}const o=a[s.mediaIndex];let l=o&&"number"===typeof s.partIndex&&o.parts&&o.parts[s.partIndex];if(!o||"number"===typeof s.partIndex&&!l)return null;"number"!==typeof s.partIndex&&o.parts&&(s.partIndex=0,l=o.parts[0]);const u=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!u&&!l.independent)if(0===s.partIndex){const e=a[s.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(s.mediaIndex-=1,s.partIndex=e.parts.length-1,s.independent="previous segment")}else o.parts[s.partIndex-1].independent&&(s.partIndex-=1,s.independent="previous part");const c=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return s.mediaIndex>=a.length-1&&c&&!this.seeking_()?null:this.generateSegmentInfo_(s)}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:n,startOfSegment:r,isSyncRequest:a,partIndex:s,forceTimestampOffset:o,getMediaInfoForTime:l}=e,u=i.segments[n],c="number"===typeof s&&u.parts[s],h={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:c?s:null,isSyncRequest:a,startOfSegment:r,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:c&&c.duration||u.duration,segment:u,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},d="undefined"!==typeof o?o:this.isPendingTimestampOffset_;h.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),calculateTimestampOffsetForEachSegment:this.calculateTimestampOffsetForEachSegment_,overrideCheck:d});const p=Xa(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(h.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(h.gopsToAlignWith=Vl(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),h}timestampOffsetForSegment_(e){return iu(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=_s.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=Ga(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(r<=a)return;const s=Al({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!s)return;const o=r-a,l=o-s.rebufferingImpact;let u=.5;a<=Na&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||l<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*xo.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_("Aborting "+Zl(e)),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},zl(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))}handleTimingInfo_(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const r=this.pendingSegment_,a=eu(t);r[a]=r[a]||{},r[a][i]=n,this.logger_(`timinginfo: ${t} - ${i} - ${n}`),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");const i=this.pendingSegment_;if(!i.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),r={};t.forEach(e=>{r[e.stream]=r[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=r[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)}),Object.keys(r).forEach(e=>{const{startTime:t,endTime:i,captions:a}=r[e],s=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${i} for ${e}`),jl(s,this.vhs_.tech_,e),Ul(t,i,s[e]),Ll({captionArray:a,inbandTextTracks:s,timestampOffset:n})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_;n.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!nu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:n,isMuxed:r}=t;return!(n&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!nu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[eu(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let n;t&&(n=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!==typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:n}){if(i){const e=Zs(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=n,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},n){const a=this.sourceUpdater_.audioBuffered(),s=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Wa(a).join(", ")),s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Wa(s).join(", "));const o=a.length?a.start(0):0,l=a.length?a.end(a.length-1):0,u=s.length?s.start(0):0,c=s.length?s.end(s.length-1):0;if(l-o<=$l&&c-u<=$l)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Wa(a).join(", ")}, video buffer: ${Wa(s).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const h=this.currentTime_(),d=h-$l;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+d),this.remove(0,d,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${$l}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=r.a.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3*$l)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},n){n&&(n.code!==Gl?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error(`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:n,bytes:r}){if(!r){const e=[n];let t=n.byteLength;i&&(e.unshift(i),t+=i.byteLength),r=Ol({bytes:t,segments:e})}this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:r},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:r}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,r=e+"TimingInfo";n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[r].transmuxedPresentationStart=i.start.presentation,n[r].transmuxedDecodeStart=i.start.decode,n[r].transmuxedPresentationEnd=i.end.presentation,n[r].transmuxedDecodeEnd=i.end.decode,n[r].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:n}=t;if(!n||!n.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const r=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:n})}loadSegment_(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"===typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(()=>{const t=g()({},e,{forceTimestampOffset:!0});g()(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)})}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),n=null!==this.mediaIndex,r=e.timeline!==this.currentTimeline_&&e.timeline>0,a=i||n&&r;this.logger_("Requesting "+Zl(e)),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=hl({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:n})=>{this.logger_(`${Zl(e)} logged from transmuxer stream ${n} as a ${i}: ${t}`)}})}trimBackBuffer_(e){const t=Jl(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,n={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=i}return t.map&&(n.map=this.initSegmentForMap(t.map)),n}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Kl?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+Kl):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Yo.ABORTED)return;return this.pause(),e.code===Yo.TIMEOUT?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=Hl(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:n,currentVideoTimestampOffset:r,useVideoTimingInfo:a,videoTimingInfo:s,audioTimingInfo:o}){if("undefined"!==typeof e)return e;if(!a)return o.start;const l=t.segments[i-1];return 0!==i&&l&&"undefined"!==typeof l.start&&l.end===n+r?s.start:n}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:n,isMuxed:r}=t,a="main"===this.loaderType_&&n,s=!this.audioDisabled_&&i&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!==typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=Ql(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!==typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"===typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo,n=i&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"===typeof n.end?n.end:n.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=su(e,this.sourceType_);if(t&&("warn"===t.severity?ka.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_("Throwing away un-appended sync request "+Zl(e));this.logger_("Appended "+Zl(e)),this.addSegmentMetadataCue_(e),this.currentTime_()>=this.replaceSegmentsUntil_&&(this.replaceSegmentsUntil_=-1,this.fetchAtBuffer_=!0),this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,n=e.part,r=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,a=n&&n.end&&this.currentTime_()-n.end>3*e.playlist.partTargetDuration;if(r||a)return this.logger_(`bad ${r?"segment":"part"} ${Zl(e)}`),void this.resetEverything();const s=null!==this.mediaIndex;s&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Kl)return void this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+Kl);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,n=t.end;if(!Yl(i)||!Yl(n))return;Ul(i,n,this.segmentMetadataTrack_);const a=r.a.WebKitDataCue||r.a.VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},o=JSON.stringify(s),l=new a(i,n,o);l.value=s,this.segmentMetadataTrack_.addCue(l)}set replaceSegmentsUntil(e){this.logger_("Replacing currently buffered segments until "+e),this.replaceSegmentsUntil_=e}}function lu(){}const uu=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},cu=["video","audio"],hu=(e,t)=>{const i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},du=(e,t)=>{for(let i=0;i<t.length;i++){const n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null},pu=(e,t)=>{if(0===t.queue.length)return;let i=0,n=t.queue[i];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!hu(e,t)){if(n.type!==e){if(i=du(e,t.queue),null===i)return;n=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=n,n.action(e,t),n.doneFn?void 0:(t.queuePending[e]=null,void pu(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),pu("audio",t),pu("video",t))},fu=(e,t)=>{const i=t[e+"Buffer"],n=uu(e);i&&(i.removeEventListener("updateend",t[`on${n}UpdateEnd_`]),i.removeEventListener("error",t[`on${n}Error_`]),t.codecs[e]=null,t[e+"Buffer"]=null)},vu=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),mu={appendBuffer:(e,t,i)=>(n,r)=>{const a=r[n+"Buffer"];if(vu(r.mediaSource,a)){r.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${n}Buffer`);try{a.appendBuffer(e)}catch(s){r.logger_(`Error with code ${s.code} `+(s.code===Gl?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${n}Buffer`),r.queuePending[n]=null,i(s)}}},remove:(e,t)=>(i,n)=>{const r=n[i+"Buffer"];if(vu(n.mediaSource,r)){n.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{r.remove(e,t)}catch(a){n.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},timestampOffset:e=>(t,i)=>{const n=i[t+"Buffer"];vu(i.mediaSource,n)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),n.timestampOffset=e)},callback:e=>(t,i)=>{e()},endOfStream:e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(i){ka.log.warn("Failed to call media source endOfStream",i)}}},duration:e=>t=>{t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(i){ka.log.warn("Failed to set media source duration",i)}},abort:()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[e+"Buffer"];if(vu(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(n){ka.log.warn(`Failed to abort on ${e}Buffer`,n)}}},addSourceBuffer:(e,t)=>i=>{const n=uu(e),r=Object(b["e"])(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const a=i.mediaSource.addSourceBuffer(r);a.addEventListener("updateend",i[`on${n}UpdateEnd_`]),a.addEventListener("error",i[`on${n}Error_`]),i.codecs[e]=t,i[e+"Buffer"]=a},removeSourceBuffer:e=>t=>{const i=t[e+"Buffer"];if(fu(e,t),vu(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(n){ka.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,n)}}},changeType:e=>(t,i)=>{const n=i[t+"Buffer"],r=Object(b["e"])(e);vu(i.mediaSource,n)&&i.codecs[t]!==e&&(i.logger_(`changing ${t}Buffer codec from ${i.codecs[t]} to ${e}`),n.changeType(r),i.codecs[t]=e)}},gu=({type:e,sourceUpdater:t,action:i,doneFn:n,name:r})=>{t.queue.push({type:e,action:i,doneFn:n,name:r}),pu(e,t)},yu=(e,t)=>i=>{const n=t[e+"Buffered"](),r=Ma(n);if(t.logger_(e+" source buffer update end. Buffered: \n",r),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}pu(e,t)};class bu extends ka.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>pu("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Pa("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=yu("video",this),this.onAudioUpdateEnd_=yu("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){gu({type:"mediaSource",sourceUpdater:this,action:mu.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){gu({type:e,sourceUpdater:this,action:mu.abort(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?gu({type:"mediaSource",sourceUpdater:this,action:mu.removeSourceBuffer(e),name:"removeSourceBuffer"}):ka.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!ka.browser.IS_FIREFOX&&r.a.MediaSource&&r.a.MediaSource.prototype&&"function"===typeof r.a.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return r.a.SourceBuffer&&r.a.SourceBuffer.prototype&&"function"===typeof r.a.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?gu({type:e,sourceUpdater:this,action:mu.changeType(t),name:"changeType"}):ka.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:n,bytes:r}=e;if(this.processedAppend_=!0,"audio"===n&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${r.length} until video append`);const a=t;if(gu({type:n,sourceUpdater:this,action:mu.appendBuffer(r,i||{mediaIndex:-1},a),doneFn:t,name:"appendBuffer"}),"video"===n){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return vu(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ra()}videoBuffered(){return vu(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ra()}buffered(){const e=vu(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=vu(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():qa(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=lu){gu({type:"mediaSource",sourceUpdater:this,action:mu.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=lu){"string"!==typeof e&&(e=void 0),gu({type:"mediaSource",sourceUpdater:this,action:mu.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=lu){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?gu({type:"audio",sourceUpdater:this,action:mu.remove(e,t),doneFn:i,name:"remove"}):i()}removeVideo(e,t,i=lu){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?gu({type:"video",sourceUpdater:this,action:mu.remove(e,t),doneFn:i,name:"remove"}):i()}updating(){return!(!hu("audio",this)&&!hu("video",this))}audioTimestampOffset(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(gu({type:"audio",sourceUpdater:this,action:mu.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(gu({type:"video",sourceUpdater:this,action:mu.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&gu({type:"audio",sourceUpdater:this,action:mu.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&gu({type:"video",sourceUpdater:this,action:mu.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),cu.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[e+"QueueCallback"](()=>fu(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const _u=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),Tu=new Uint8Array("\n\n".split("").map(e=>e.charCodeAt(0)));class Su extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class wu extends ou{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.loaderType_="subtitle",this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ra();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Ra([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Zs(e);let n=this.initSegments_[i];if(t&&!n&&e.bytes){const t=Tu.byteLength+e.bytes.byteLength,r=new Uint8Array(t);r.set(e.bytes),r.set(Tu,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:r}}return n||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Ul(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){while(e&&e.segment.empty){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Yo.TIMEOUT&&this.handleTimeout_(),e.code===Yo.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const a=n.segment;if(a.map&&(a.map.bytes=t.map.bytes),n.bytes=t.bytes,"function"!==typeof r.a.WebVTT&&"function"===typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js"}));a.requested=!0;try{this.parseVTTCues_(n)}catch(s){return void this.stopForError({message:s.message})}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,n.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new r.a.VTTCue(e.startTime,e.endTime,e.text):e)}),Fl(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;if("function"!==typeof r.a.WebVTT)throw new Su;"function"===typeof r.a.TextDecoder?t=new r.a.TextDecoder("utf8"):(t=r.a.WebVTT.StringDecoder(),i=!0);const n=new r.a.WebVTT.Parser(r.a,r.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=t=>{e.timestampmap=t},n.onparsingerror=e=>{ka.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=_u(t)),n.parse(t)}let a=e.bytes;i&&(a=_u(a)),n.parse(a),n.flush()}updateTimeMapping_(e,t,i){const n=e.segment;if(!t)return;if(!e.cues.length)return void(n.empty=!0);const r=e.timestampmap,a=r.MPEGTS/x["ONE_SECOND_IN_TS"]-r.LOCAL+t.mapping;if(e.cues.forEach(e=>{e.startTime+=a,e.endTime+=a}),!i.syncInfo){const t=e.cues[0].startTime,r=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,r-n.duration)}}}}const Eu=function(e,t){const i=e.cues;for(let n=0;n<i.length;n++){const e=i[n];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null},ku=function(e,t,i=0){if(!e.segments)return;let n,a=i;for(let s=0;s<e.segments.length;s++){const i=e.segments[s];if(n||(n=Eu(t,a+i.duration/2)),n){if("cueIn"in i){n.endTime=a,n.adEndTime=a,a+=i.duration,n=null;continue}if(a<n.endTime){a+=i.duration;continue}n.endTime+=i.duration}else if("cueOut"in i&&(n=new r.a.VTTCue(a,a+i.duration,i.cueOut),n.adStartTime=a,n.adEndTime=a+parseFloat(i.cueOut),t.addCue(n)),"cueOutCont"in i){const[e,s]=i.cueOutCont.split("/").map(parseFloat);n=new r.a.VTTCue(a,a+i.duration,""),n.adStartTime=a-e,n.adEndTime=n.adStartTime+s,t.addCue(n)}a+=i.duration}},Cu=86400,xu=[{name:"VOD",run:(e,t,i,n,r)=>{if(i!==1/0){const e={time:0,segmentIndex:0,partIndex:null};return e}return null}},{name:"ProgramDateTime",run:(e,t,i,n,r)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let a=null,s=null;const o=Qa(t);r=r||0;for(let l=0;l<o.length;l++){const i=t.endList||0===r?l:o.length-(l+1),n=o[i],u=n.segment,c=e.timelineToDatetimeMappings[u.timeline];if(!c||!u.dateTimeObject)continue;const h=u.dateTimeObject.getTime()/1e3;let d=h+c;if(u.parts&&"number"===typeof n.partIndex)for(let e=0;e<n.partIndex;e++)d+=u.parts[e].duration;const p=Math.abs(r-d);if(null!==s&&(0===p||s<p))break;s=p,a={time:d,segmentIndex:n.segmentIndex,partIndex:n.partIndex}}return a}},{name:"Segment",run:(e,t,i,n,r)=>{let a=null,s=null;r=r||0;const o=Qa(t);for(let l=0;l<o.length;l++){const e=t.endList||0===r?l:o.length-(l+1),i=o[e],u=i.segment,c=i.part&&i.part.start||u&&u.start;if(u.timeline===n&&"undefined"!==typeof c){const e=Math.abs(r-c);if(null!==s&&s<e)break;(!a||null===s||s>=e)&&(s=e,a={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return a}},{name:"Discontinuity",run:(e,t,i,n,r)=>{let a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let n=0;n<t.discontinuityStarts.length;n++){const s=t.discontinuityStarts[n],o=t.discontinuitySequence+n+1,l=e.discontinuities[o];if(l){const e=Math.abs(r-l.time);if(null!==i&&i<e)break;(!a||null===i||i>=e)&&(i=e,a={time:l.time,segmentIndex:s,partIndex:null})}}}return a}},{name:"Playlist",run:(e,t,i,n,r)=>{if(t.syncInfo){const e={time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null};return e}return null}}];class Au extends ka.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.logger_=Pa("SyncController")}getSyncPoint(e,t,i,n){const r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+as({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,n){const r=[];for(let a=0;a<xu.length;a++){const s=xu[a],o=s.run(this,e,t,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy;for(let a=1;a<e.length;a++){const s=Math.abs(e[a].syncPoint[t.key]-t.value);s<n&&(n=s,i=e[a].syncPoint,r=e[a].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${r}]: [time:${i.time}, segmentIndex:`+i.segmentIndex+("number"===typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>Cu)ka.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let n=i-1;n>=0;n--){const i=e.segments[n];if(i&&"undefined"!==typeof i.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),n=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:n.start}));const r=n.dateTimeObject;n.discontinuity&&t&&r&&(this.timelineToDatetimeMappings[n.timeline]=-r.getTime()/1e3)}timestampOffsetForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const n=e.segment,r=e.part;let a,s,o=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),a=e.startOfSegment,s=t.end+o.mapping;else{if(!o)return!1;a=t.start+o.mapping,s=t.end+o.mapping}return r&&(r.start=a,r.end=s),(!n.start||a<n.start)&&(n.start=a),n.end=s,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let n=0;n<t.discontinuityStarts.length;n++){const r=t.discontinuityStarts[n],a=t.discontinuitySequence+n+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){let n;n=s<0?i.start-as({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):i.end+as({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[a]={time:n,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Iu extends ka.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Ou=Lo(Po((function(){var t=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function i(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}
/*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const n=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4];let a,s,o;const l=[],u=[];let c,h,d,p,f,v;for(a=0;a<256;a++)u[(l[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=u[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,n[s]=p,r[p]=s,d=l[h=l[c=l[s]]],v=16843009*d^65537*h^257*c^16843008*s,f=257*l[p]^16843008*p,a=0;a<4;a++)t[a][s]=f=f<<24^f>>>8,i[a][p]=v=v<<24^v>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e};let r=null;class a{constructor(e){let t,i,a;r||(r=n()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];const s=this._tables[0][4],o=this._tables[1],l=e.length;let u=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");const c=e.slice(0),h=[];for(this._key=[c,h],t=l;t<4*l+28;t++)a=c[t-1],(t%l===0||8===l&&t%l===4)&&(a=s[a>>>24]<<24^s[a>>16&255]<<16^s[a>>8&255]<<8^s[255&a],t%l===0&&(a=a<<8^a>>>24^u<<24,u=u<<1^283*(u>>7))),c[t]=c[t-l]^a;for(i=0;t;i++,t--)a=c[3&i?t:t-4],h[i]=t<=4||i<4?a:o[0][s[a>>>24]]^o[1][s[a>>16&255]]^o[2][s[a>>8&255]]^o[3][s[255&a]]}decrypt(e,t,i,n,r,a){const s=this._key[1];let o,l,u,c=e^s[0],h=n^s[1],d=i^s[2],p=t^s[3];const f=s.length/4-2;let v,m=4;const g=this._tables[1],y=g[0],b=g[1],_=g[2],T=g[3],S=g[4];for(v=0;v<f;v++)o=y[c>>>24]^b[h>>16&255]^_[d>>8&255]^T[255&p]^s[m],l=y[h>>>24]^b[d>>16&255]^_[p>>8&255]^T[255&c]^s[m+1],u=y[d>>>24]^b[p>>16&255]^_[c>>8&255]^T[255&h]^s[m+2],p=y[p>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&d]^s[m+3],m+=4,c=o,h=l,d=u;for(v=0;v<4;v++)r[(3&-v)+a]=S[c>>>24]<<24^S[h>>16&255]<<16^S[d>>8&255]<<8^S[255&p]^s[m++],o=c,c=h,h=d,d=p,p=o}}class s extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(e,t,i){const n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new a(Array.prototype.slice.call(t)),s=new Uint8Array(e.byteLength),l=new Int32Array(s.buffer);let u,c,h,d,p,f,v,m,g;for(u=i[0],c=i[1],h=i[2],d=i[3],g=0;g<n.length;g+=4)p=o(n[g]),f=o(n[g+1]),v=o(n[g+2]),m=o(n[g+3]),r.decrypt(p,f,v,m,l,g),l[g]=o(l[g]^u),l[g+1]=o(l[g+1]^c),l[g+2]=o(l[g+2]^h),l[g+3]=o(l[g+3]^d),u=p,c=f,h=v,d=m;return s};class u{constructor(e,t,n,r){const a=u.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let h=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(h,h+a),t,n,c)),h=a;h<l.length;h+=a)n=new Uint32Array([o(l[h-4]),o(l[h-3]),o(l[h-2]),o(l[h-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(h,h+a),t,n,c));this.asyncStream_.push((function(){r(null,i(c))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,n){return function(){const r=l(e,t,i);n.set(r,e.byteOffset)}}}var c,h="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};c="undefined"!==typeof window?window:"undefined"!==typeof h?h:"undefined"!==typeof self?self:{};var d=c,p=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},f=d.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const v=function(e){const t={};return Object.keys(e).forEach(i=>{const n=e[i];p(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new u(i,n,r,(function(e,i){self.postMessage(v({source:t.source,decrypted:i}),[i.buffer])}))}})));var ju=jo(Ou);const Lu=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Pu=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Du=(e,t)=>{t.activePlaylistLoader=e,e.load()},Ru=(e,t)=>()=>{const{segmentLoaders:{[e]:i,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),s=r.getActiveGroup(),o=r.activePlaylistLoader,l=r.lastGroup_;s&&l&&s.id===l.id||(r.lastGroup_=s,r.lastTrack_=a,Pu(i,r),s&&!s.isMainPlaylist&&(s.playlistLoader?(i.resyncLoader(),Du(s.playlistLoader,r)):o&&n.resetEverything()))},Mu=(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:n}}=t;n.lastGroup_=null,i.abort(),i.pause()},Nu=(e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:n,main:r},mediaTypes:{[e]:a}}=t,s=a.activeTrack(),o=a.getActiveGroup(),l=a.activePlaylistLoader,u=a.lastTrack_;if((!u||!s||u.id!==s.id)&&(a.lastGroup_=o,a.lastTrack_=s,Pu(n,a),o)){if(o.isMainPlaylist){if(!s||!u||s.id===u.id)return;const e=t.vhs.playlistController_,n=e.selectPlaylist();if(e.media()===n)return;return a.logger_(`track change. Switching main audio from ${u.id} to ${s.id}`),i.pause(),r.resetEverything(),void e.fastQualityChange_(n)}if("AUDIO"===e){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();n.setAudio(!0),r.setAudio(!1)}l!==o.playlistLoader?(n.track&&n.track(s),n.resetEverything(),Du(o.playlistLoader,a)):Du(o.playlistLoader,a)}},Bu={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:n}=t,r=i.activeTrack(),a=i.activeGroup(),s=(a.filter(e=>e.default)[0]||a[0]).id,o=i.tracks[s];if(r!==o){ka.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else n({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;ka.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged()}},Uu={AUDIO:(e,t,i)=>{if(!t)return;const{tech:n,requestOptions:r,segmentLoaders:{[e]:a}}=i;t.on("loadedmetadata",()=>{const e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",()=>{a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",Bu[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:n,requestOptions:r,segmentLoaders:{[e]:a},mediaTypes:{[e]:s}}=i;t.on("loadedmetadata",()=>{const e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",()=>{a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",Bu[e](e,i))}},Fu={AUDIO:(e,t)=>{const{vhs:i,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:s},mediaTypes:{[e]:{groups:o,tracks:l,logger_:u}},mainPlaylistLoader:c}=t,h=bs(c.main);s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}},h&&(s[e].main.default.playlists=c.main.playlists));for(const d in s[e]){o[d]||(o[d]=[]);for(const r in s[e][d]){let p,f=s[e][d][r];if(h?(u(`AUDIO group '${d}' label '${r}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===n&&f.playlists?new Vs(f.playlists[0],i,a):f.resolvedUri?new Vs(f.resolvedUri,i,a):f.playlists&&"dash"===n?new Co(f.playlists[0],i,a,c):null,f=Da({id:r,playlistLoader:p},f),Uu[e](e,f.playlistLoader,t),o[d].push(f),"undefined"===typeof l[r]){const e=new ka.AudioTrack({id:r,kind:Lu(f),enabled:!1,language:f.language,default:f.default,label:r});l[r]=e}}}r.on("error",Bu[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:n,sourceType:r,segmentLoaders:{[e]:a},requestOptions:s,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:u}},mainPlaylistLoader:c}=t;for(const h in o[e]){l[h]||(l[h]=[]);for(const a in o[e][h]){if(!n.options_.useForcedSubtitles&&o[e][h][a].forced)continue;let d,p=o[e][h][a];if("hls"===r)d=new Vs(p.resolvedUri,n,s);else if("dash"===r){const e=p.playlists.filter(e=>e.excludeUntil!==1/0);if(!e.length)return;d=new Co(p.playlists[0],n,s,c)}else"vhs-json"===r&&(d=new Vs(p.playlists?p.playlists[0]:p.resolvedUri,n,s));if(p=Da({id:a,playlistLoader:d},p),Uu[e](e,p.playlistLoader,t),l[h].push(p),"undefined"===typeof u[a]){const e=i.addRemoteTextTrack({id:a,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:a},!1).track;u[a]=e}}}a.on("error",Bu[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:n},mediaTypes:{[e]:{groups:r,tracks:a}}}=t;for(const s in n[e]){r[s]||(r[s]=[]);for(const t in n[e][s]){const o=n[e][s][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let u={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[u.instreamId]&&(u=Da(u,l[u.instreamId])),void 0===u.default&&delete u.default,r[s].push(Da({id:t},o)),"undefined"===typeof a[t]){const e=i.addRemoteTextTrack({id:u.instreamId,kind:"captions",default:u.default,language:u.language,label:u.label},!1).track;a[t]=e}}}}},Vu=(e,t)=>{for(let i=0;i<e.length;i++){if(gs(t,e[i]))return!0;if(e[i].playlists&&Vu(e[i].playlists,t))return!0}return!1},Hu=(e,t)=>i=>{const{mainPlaylistLoader:n,mediaTypes:{[e]:{groups:r}}}=t,a=n.media();if(!a)return null;let s=null;a.attributes[e]&&(s=r[a.attributes[e]]);const o=Object.keys(r);if(!s)if("AUDIO"===e&&o.length>1&&bs(t.main))for(let e=0;e<o.length;e++){const t=r[o[e]];if(Vu(t,a)){s=t;break}}else r.main?s=r.main:1===o.length&&(s=r[o[0]]);return"undefined"===typeof i?s:null!==i&&s&&s.filter(e=>e.id===i.id)[0]||null},qu={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}},zu=(e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null},Gu=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{Fu[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:n,vhs:r,segmentLoaders:{["AUDIO"]:a,main:s}}=e;["AUDIO","SUBTITLES"].forEach(i=>{t[i].activeGroup=Hu(i,e),t[i].activeTrack=qu[i](i,e),t[i].onGroupChanged=Ru(i,e),t[i].onGroupChanging=Mu(i,e),t[i].onTrackChanged=Nu(i,e),t[i].getActiveGroup=zu(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();const i=t.AUDIO.getActiveGroup();i.playlistLoader?(s.setAudio(!1),a.setAudio(!0)):s.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",l),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",()=>{n.audioTracks().removeEventListener("change",l),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(const u in t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[u])},Wu=()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:lu,activeTrack:lu,getActiveGroup:lu,onGroupChanged:lu,onTrackChanged:lu,lastTrack_:null,logger_:Pa(`MediaGroups[${t}]`)}}),e};class $u{constructor(){this.priority_=[]}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ja(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}}class Xu extends ka.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.availablePathways_=new Set,this.excludedPathways_=new Set,this.steeringManifest=new $u,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.logger_=Pa("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=this.queryBeforeStart?i:ja(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart||!1,this.proxyServerUrl_=t.proxyServerURL||null,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"),this.queryBeforeStart&&this.requestSteeringManifest(this.steeringManifest.reloadUri))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!e&&!t)return;const i=e||this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();this.request_=this.xhr_({uri:i},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}const n=JSON.parse(this.request_.responseText);this.startTTLTimeout_(),this.assignSteeringProperties_(n)})}setProxyServerUrl_(e){const t=new r.a.URL(e),i=new r.a.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(r.a.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new r.a.URL(e),i=this.getPathway(),n=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(n){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,n)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const t=e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]},i=t(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=r.a.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){r.a.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.excludedPathways_=new Set,this.steeringManifest=new $u}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}}const Yu=10;let Ku;const Qu=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Ju=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Zu=function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:n,bufferLowWaterLine:r,bufferHighWaterLine:a,duration:s,bufferBasedABR:o,log:l}){if(!n)return ka.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${e&&e.id||"null"} -> ${n.id}`;if(!e)return l(u+" as current playlist is not set"),!0;if(n.id===e.id)return!1;const c=Boolean(Fa(t,i).length);if(!e.endList)return c||"number"!==typeof e.partTargetDuration?(l(u+" as current playlist is live"),!0):(l(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const h=Ya(t,i),d=o?xo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:xo.MAX_BUFFER_LOW_WATER_LINE;if(s<d)return l(`${u} as duration < max low water line (${s} < ${d})`),!0;const p=n.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||h<a)){let e=`${u} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${h} < ${a})`),l(e),!0}if((!o||p>f)&&h>=r){let e=`${u} as forwardBuffer >= bufferLowWaterLine (${h} >= ${r})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${u} as no switching criteria met`),!1};class ec extends ka.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:n,bandwidth:a,externVhs:s,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:u,sourceType:c,cacheEncryptionKeys:h,bufferBasedABR:d,leastPixelDiffSelector:p,captionServices:f}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:v}=e;null!==v&&"undefined"!==typeof v||(v=1/0),Ku=s,this.bufferBasedABR=Boolean(d),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=i,this.tech_=n,this.vhs_=n.vhs,this.sourceType_=c,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=v,this.enableLowInitialPlaylist=u,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:v,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=Wu(),this.mediaSource=new r.a.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Ra(),this.hasPlayed_=!1,this.syncController_=new Au(e),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new ju,this.sourceUpdater_=new bu(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Iu;const m={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,calculateTimestampOffsetForEachSegment:e.calculateTimestampOffsetForEachSegment,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:h,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new Co(t,this.vhs_,Da(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Vs(t,this.vhs_,Da(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new ou(Da(m,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new ou(Da(m,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new wu(Da(m,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){n.off("vttjserror",r),e()}function r(){n.off("vttjsloaded",i),t()}n.one("vttjsloaded",i),n.one("vttjserror",r),n.addWebVttScript_()})}),e);const g=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new Xu(this.vhs_.xhr,g),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Qu.forEach(e=>{this[e+"_"]=Ju.bind(this,e)}),this.logger_=Pa("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const n=this.media(),r=n&&(n.id||n.uri),a=e.id||e.uri;r&&r!==a&&(this.logger_(`switch media ${r} -> ${a} from ${t}`),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,n=this.contentSteeringController_.getPathway();if(i&&n){const t=i.length?i[0].playlists:i.playlists,r=t.filter(e=>e.attributes.serviceLocation===n);r.length&&this.mediaTypes_[e].activePlaylistLoader.media(r[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=r.a.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(r.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,n=Object.keys(i);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||n.length&&i[n[0]];for(const t in e)if(e[t].default){r={label:t};break}}if(!r)return t;const a=[];for(const s in i)if(i[s][r.label]){const t=i[s][r.label];if(t.playlists&&t.playlists.length)a.push.apply(a,t.playlists);else if(t.uri)a.push(t);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const t=e.playlists[i];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===s&&a.push(t)}}return a.length?a:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ms(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Gu({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");const i="vhs-json"===this.sourceType_&&this.initialMedia_.segments;if(!i)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on("error",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ms(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;const t=this.stuckAtPlaylistEnd_(e);t&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let n=!0;const r=Object.keys(i.AUDIO);for(const a in i.AUDIO)for(const e in i.AUDIO[a]){const t=i.AUDIO[a][e];t.uri||(n=!1)}n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Ku.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),r.length&&Object.keys(i.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),r=this.bufferHighWaterLine(),a=this.tech_.buffered();return Zu({buffered:a,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:Yu}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){e!==this.mainPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.resetMainLoaderReplaceSegments()):this.logger_("skipping fastQualityChange because new media is same as old")}resetMainLoaderReplaceSegments(){const e=this.tech_.buffered(),t=e.end(e.length-1);this.mainSegmentLoader_.replaceSegmentsUntil=t,this.mainSegmentLoader_.resetLoaderProperties(),this.mainSegmentLoader_.resetLoader()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let n=i;if(e.start){const r=e.start.timeOffset;n=r<0?Math.max(i+r,t.start(0)):Math.min(i,r)}this.trigger("firstplay"),this.tech_.setCurrentTime(n)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,e=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){const t=this.seekable();if(!t.length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(null===i)return!1;const n=Ku.Playlist.playlistEnd(e,i),r=this.tech_.currentTime(),a=this.tech_.buffered();if(!a.length)return n-r<=Ba;const s=a.end(a.length-1);return s-r<=Ba&&n-s<=Ba}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,r=n.filter(hs),a=1===r.length&&r[0]===e;if(1===n.length&&i!==1/0)return ka.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(a);if(a){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;n.forEach(i=>{if(i===e)return;const n=i.excludeUntil;"undefined"!==typeof n&&n!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(ka.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let s;s=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=s,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:ka.log.warn,u=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${u} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const c=o.targetDuration/2*1e3||5e3,h="number"===typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.switchMedia_(o,"exclude",a||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],n="all"===e;(n||"main"===e)&&i.push(this.mainPlaylistLoader_);const r=[];(n||"audio"===e)&&r.push("AUDIO"),(n||"subtitle"===e)&&(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),["main","audio","subtitle"].forEach(t=>{const n=this[t+"SegmentLoader_"];!n||e!==t&&"all"!==e||i.push(n)}),i.forEach(e=>t.forEach(t=>{"function"===typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Fa(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.resetEverything(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.resetEverything(),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ku.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(null===i)return;const n=this.mainPlaylistLoader_.main,r=Ku.Playlist.seekable(t,i,Ku.Playlist.liveEdgeDelay(n,t));if(0===r.length)return;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),null===i)return;if(e=Ku.Playlist.seekable(t,i,Ku.Playlist.liveEdgeDelay(n,t)),0===e.length)return}let a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=Ra([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_(`seekable updated [${za(this.seekable_)}]`),this.tech_.trigger("seekablechanged"))}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Ku.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=yl(this.main(),t),n={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||b["b"]),e.main.isMuxed&&(n.video+=","+(i.audio||e.main.audioCodec||b["a"])),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||b["a"],e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!n.audio&&!n.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const a=(e,t)=>e?Object(b["c"])(t):Object(b["g"])(t),s={};let o;if(["video","audio"].forEach((function(t){if(n.hasOwnProperty(t)&&!a(e[t].isFmp4,n[t])){const i=e[t].isFmp4?"browser":"muxer";s[i]=s[i]||[],s[i].push(n[t]),"audio"===t&&(o=i)}})),r&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{const n=i.attributes&&i.attributes.AUDIO;n===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): "${n.audio}"`)}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach(t=>{const i=(Object(b["h"])(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(Object(b["h"])(n[t]||"")[0]||{}).type;i&&r&&i.toLowerCase()!==r.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${n[t]}"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return n}{const e=Object.keys(s).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${s[t].join(",")}"`,e),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const n=e[i];if(-1!==t.indexOf(n.id))return;t.push(n.id);const r=yl(this.main,n),a=[];!r.audio||Object(b["g"])(r.audio)||Object(b["c"])(r.audio)||a.push("audio codec "+r.audio),!r.video||Object(b["g"])(r.video)||Object(b["c"])(r.video)||a.push("video codec "+r.video),r.text&&"stpp.ttml.im1t"===r.text&&a.push("text codec "+r.text),a.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${a.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,n=ml(Object(b["h"])(e)),r=gl(n),a=n.video&&Object(b["h"])(n.video)[0]||null,s=n.audio&&Object(b["h"])(n.audio)[0]||null;Object.keys(i).forEach(e=>{const n=i[e];if(-1!==t.indexOf(n.id)||n.excludeUntil===1/0)return;t.push(n.id);const o=[],l=yl(this.mainPlaylistLoader_.main,n),u=gl(l);if(l.audio||l.video){if(u!==r&&o.push(`codec count "${u}" !== "${r}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Object(b["h"])(l.video)[0]||null,t=l.audio&&Object(b["h"])(l.audio)[0]||null;e&&a&&e.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${a.type}"`),t&&s&&t.type.toLowerCase()!==s.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${s.type}"`)}o.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id}: ${o.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),ku(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=xo.GOAL_BUFFER_LENGTH,i=xo.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,xo.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=xo.BUFFER_LOW_WATER_LINE,i=xo.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,xo.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,xo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?r:n)}bufferHighWaterLine(){return xo.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Bl(this.inbandTextTracks_,"com.apple.streaming",this.tech_),Nl({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Bl(this.inbandTextTracks_,e,this.tech_),Dl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(!e.contentSteering)return;const t=e=>{for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering)};t(e),this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("mediaupdatetimeout",()=>{this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id),this.contentSteeringController_.abort(),this.contentSteeringController_.clearTTLTimeout_(),this.contentSteeringController_.clearAvailablePathways(),t(this.main())}),this.contentSteeringController_.queryBeforeStart||this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;const t=this.main(),i=t.playlists,n=new Set;let r=!1;Object.keys(i).forEach(t=>{const a=i[t],s=this.pathwayAttribute_(a),o=s&&e!==s,l=a.excludeUntil===1/0&&"content-steering"===a.lastExcludeReason_;l&&!o&&(delete a.excludeUntil,delete a.lastExcludeReason_,r=!0);const u=!a.excludeUntil&&a.excludeUntil!==1/0,c=!n.has(a.id)&&o&&u;c&&(n.add(a.id),a.excludeUntil=1/0,a.lastExcludeReason_="content-steering",this.logger_(`excluding ${a.id} for ${a.lastExcludeReason_}`))}),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(r=!0)}}),r&&this.changeSegmentPathway_()}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}}const tc=(e,t,i)=>n=>{const r=e.main.playlists[t],a=cs(r),s=hs(r);return"undefined"===typeof n?s:(n?delete r.disabled:r.disabled=!0,n===s||a||(i(),n?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),n)};class ic{constructor(e,t,i){const{playlistController_:n}=e,r=n.fastQualityChange_.bind(n);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=yl(n.main(),t),this.playlist=t,this.id=i,this.enabled=tc(e.playlists,t.id,r)}}const nc=function(e){e.representations=()=>{const t=e.playlistController_.main(),i=bs(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!cs(e)).map((t,i)=>new ic(e,t,t.id)):[]}},rc=["seeking","seeked","pause","playing","error"];class ac{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Pa("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),s=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},s[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)});const u=e=>{["main","audio"].forEach(t=>{s[t+"SegmentLoader_"][e]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(rc,a),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(rc,a),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(e=>{s[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)}),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[e+"SegmentLoader_"],n=i.buffered_(),r=$a(this[e+"Buffered_"],n);this[e+"Buffered_"]=n,r?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_(`found #${this[e+"StalledDownloads_"]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Wa(n)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0})))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ba>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){const e=this.tech_.seeking();if(!e)return!1;const t=this.seekable(),i=this.tech_.currentTime(),n=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let r;if(n){const e=t.end(t.length-1);r=e}if(this.beforeSeekableWindow_(t,i)){const e=t.start(0);r=e+(e===t.end(0)?0:Ba)}if("undefined"!==typeof r)return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${za(t)}. Seeking to `+r+"."),this.tech_.setCurrentTime(r),!0;const a=this.playlistController_.sourceUpdater_,s=this.tech_.buffered(),o=a.audioBuffer?a.audioBuffered():null,l=a.videoBuffer?a.videoBuffered():null,u=this.media(),c=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-Na),h=[o,l];for(let p=0;p<h.length;p++){if(!h[p])continue;const e=Ya(h[p],i);if(e<c)return!1}const d=Va(s,i);return 0!==d.length&&(r=d.start(0)+Ba,this.logger_(`Buffered region starts (${d.start(0)}) just beyond seek point (${i}). Seeking to ${r}.`),this.tech_.setCurrentTime(r),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Fa(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) `+i),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t});if(r)return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const a=Va(n,t);return a.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${a.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,n=!1){if(!e.length)return!1;let r=e.end(e.length-1)+Ba;const a=!i.endList,s="number"===typeof i.partTargetDuration;return a&&(s||n)&&(r=e.end(e.length-1)+3*i.targetDuration),t>r}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let n;if(e.length&&t.length){const r=Fa(e,i-3),a=Fa(e,i),s=Fa(t,i);s.length&&!a.length&&r.length&&(n={start:r.end(0),end:s.end(0)})}else{const t=Va(e,i);t.length||(n=this.gapFromVideoUnderflow_(e,i))}return!!n&&(this.logger_(`Encountered a gap in video from ${n.start} to ${n.end}. Seeking to current time `+i),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),n=Va(t,i);this.resetTimeUpdate_(),0!==n.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Na),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}))}gapFromVideoUnderflow_(e,t){const i=Ha(e);for(let n=0;n<i.length;n++){const e=i.start(n),r=i.end(n);if(t-e<4&&t-e>2)return{start:e,end:r}}return null}}const sc={errorInterval:30,getSource(e){const t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_||this.currentSource();return e(i)}},oc=function(e,t){let i=0,n=0;const r=Da(sc,t);e.ready(()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){n&&e.currentTime(n)},s=function(t){null!==t&&void 0!==t&&(n=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",a),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*r.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(r.getSource&&"function"===typeof r.getSource)return i=Date.now(),r.getSource.call(e,s);ka.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",a),e.off("error",o),e.off("dispose",l)},u=function(t){l(),oc(e,t)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=u},lc=function(e){oc(this,e)};var uc="3.7.0",cc="7.0.1",hc="1.2.2",dc="7.1.0",pc="4.0.1";const fc={PlaylistLoader:Vs,Playlist:_s,utils:ro,STANDARD_PLAYLIST_SELECTOR:Cl,INITIAL_PLAYLIST_SELECTOR:Il,lastBandwidthSelector:Cl,movingAverageBandwidthSelector:xl,comparePlaylistBandwidth:wl,comparePlaylistResolution:El,xhr:Ws()};Object.keys(xo).forEach(e=>{Object.defineProperty(fc,e,{get(){return ka.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),xo[e]},set(t){ka.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!==typeof t||t<0?ka.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):xo[e]=t}})});const vc="videojs-vhs",mc=function(e,t){const i=t.media();let n=-1;for(let r=0;r<e.length;r++)if(e[r].id===i.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})},gc=function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),mc(e,t.playlists)};fc.canPlaySource=function(){return ka.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const yc=(e,t,i)=>{if(!e)return e;let n={};t&&t.attributes&&t.attributes.CODECS&&(n=ml(Object(b["h"])(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);const r=Object(b["e"])(n.video),a=Object(b["e"])(n.audio),s={};for(const o in e)s[o]={},a&&(s[o].audioContentType=a),r&&(s[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(s[o].url=e[o]);return Da(e,s)},bc=(e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const n=t.reduce((e,t)=>{const n=i.contentProtection[t];return n&&n.pssh&&(e[t]={pssh:n.pssh}),e},{});return Object.keys(n).length&&e.push(n),e},[]),_c=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:n})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const r=i?n.concat([i]):n,a=bc(r,Object.keys(t)),s=[],o=[];return a.forEach(t=>{o.push(new Promise((t,i)=>{e.tech_.one("keysessioncreated",t)})),s.push(new Promise((i,n)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?n(e):i()})}))}),Promise.race([Promise.all(s),Promise.race(o)])},Tc=({player:e,sourceKeySystems:t,media:i,audioMedia:n})=>{const r=yc(t,i,n);return!!r&&(e.currentSource().keySystems=r,!(r&&!e.eme)||(ka.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Sc=()=>{if(!r.a.localStorage)return null;const e=r.a.localStorage.getItem(vc);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},wc=e=>{if(!r.a.localStorage)return!1;let t=Sc();t=t?Da(t,e):e;try{r.a.localStorage.setItem(vc,JSON.stringify(t))}catch(i){return!1}return t},Ec=e=>0===e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e,kc=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Cc=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},xc=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},Ac=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};fc.supportsNativeHls=function(){if(!s.a||!s.a.createElement)return!1;const e=s.a.createElement("video");if(!ka.getTech("Html5").isSupported())return!1;const t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),fc.supportsNativeDash=function(){return!!(s.a&&s.a.createElement&&ka.getTech("Html5").isSupported())&&/maybe|probably/i.test(s.a.createElement("video").canPlayType("application/dash+xml"))}(),fc.supportsTypeNatively=e=>"hls"===e?fc.supportsNativeHls:"dash"===e&&fc.supportsNativeDash,fc.isSupported=function(){return ka.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},fc.xhr.onRequest=function(e){kc(fc.xhr,e)},fc.xhr.onResponse=function(e){Cc(fc.xhr,e)},fc.xhr.offRequest=function(e){xc(fc.xhr,e)},fc.xhr.offResponse=function(e){Ac(fc.xhr,e)};const Ic=ka.getComponent("Component");class Oc extends Ic{constructor(e,t,i){if(super(t,i.vhs),"number"===typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Pa("VhsHandler"),t.options_&&t.options_.playerId){const e=ka.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(s.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{const t=s.a.fullscreenElement||s.a.webkitFullscreenElement||s.a.mozFullScreenElement||s.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(){if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.calculateTimestampOffsetForEachSegment=this.options_.calculateTimestampOffsetForEachSegment||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Sc();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=xo.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===xo.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","calculateTimestampOffsetForEachSegment","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=Ec(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=fc,this.options_.sourceType=Object(_["a"])(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.playlistController_=new ec(this.options_);const i=Da({liveRangeSafeTimeDelta:Ba},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new ac(i),this.playlistController_.on("error",()=>{const e=ka.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const n=this.options_.bufferBasedABR?fc.movingAverageBandwidthSelector(.55):fc.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=fc.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=r.a.navigator.connection||r.a.navigator.mozConnection||r.a.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const n=1e3*t.downlink*1e3;e=n>=i&&e>=i?Math.max(e,n):n}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;const i=Math.floor(1/(e+t));return i},set(){ka.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Wa(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Wa(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&wc({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{nc(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=r.a.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),_c({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Tc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{if("output-restricted"!==e.status)return;const t=this.playlistController_.main();if(!t||!t.playlists)return;const i=[];t.playlists.forEach(e=>{e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,i.push(e))}),i.length&&(ka.log.warn('DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.',...i),this.playlistController_.mainSegmentLoader_.resetEverything(),this.playlistController_.fastQualityChange_())}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=ka.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{gc(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{mc(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":uc,"mux.js":cc,"mpd-parser":hc,"m3u8-parser":dc,"aes-decrypter":pc}}version(){return this.constructor.version()}canChangeType(){return bu.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&r.a.URL.revokeObjectURL&&(r.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return po({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,n=2){return fo({programTime:e,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{kc(this.xhr,e)},this.xhr.onResponse=e=>{Cc(this.xhr,e)},this.xhr.offRequest=e=>{xc(this.xhr,e)},this.xhr.offResponse=e=>{Ac(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}}const jc={name:"videojs-http-streaming",VERSION:uc,canHandleSource(e,t={}){const i=Da(ka.options,t);return jc.canPlayType(e.type,i)},handleSource(e,t,i={}){const n=Da(ka.options,i);return t.vhs=new Oc(e,t,n),t.vhs.xhr=Ws(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=Object(_["a"])(e);if(!i)return"";const n=jc.getOverrideNative(t),r=fc.supportsTypeNatively(i),a=!r||n;return a?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(ka.browser.IS_ANY_SAFARI||ka.browser.IS_IOS),{overrideNative:n=i}=t;return n}},Lc=()=>Object(b["c"])("avc1.4d400d,mp4a.40.2");Lc()&&ka.getTech("Html5").registerSourceHandler(jc,0),ka.VhsHandler=Oc,ka.VhsSourceHandler=jc,ka.Vhs=fc,ka.use||ka.registerComponent("Vhs",fc),ka.options.vhs=ka.options.vhs||{},ka.getPlugin&&ka.getPlugin("reloadSourceOnError")||ka.registerPlugin("reloadSourceOnError",lc)}.call(this,i("c8ba"))},f24e:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return e.start(t)+"-"+e.end(t)},r=function(e,t){var i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},a=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},s=function(e){var t={};return Object.keys(e).forEach((function(i){var n=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t},o=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},l={hexDump:function(e){for(var t=Array.prototype.slice.call(e),i=16,n="",s=void 0,o=void 0,l=0;l<t.length/i;l++)s=t.slice(l*i,l*i+i).map(r).join(""),o=t.slice(l*i,l*i+i).map(a).join(""),n+=s+" "+o+"\n";return n},tagDump:function(e){return l.hexDump(e.bytes)},textRanges:function(e){var t="",i=void 0;for(i=0;i<e.length;i++)t+=n(e,i)+" ";return t},createTransferableMessage:s,initSegmentId:o};t["default"]=l,e.exports=t["default"]},f631:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i("be09"),o=r(s),l=i("d3ae"),u=r(l),c=i("e475"),h=r(c),d=["seeking","seeked","pause","playing","error"],p=function(){function e(t){var i=this;a(this,e),this.tech_=t.tech,this.seekable=t.seekable,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,t.debug&&(this.logger_=h["default"].log.bind(h["default"],"playback-watcher ->")),this.logger_("initialize");var n=function(){return i.monitorCurrentTime_()},r=function(){return i.techWaiting_()},s=function(){return i.cancelTimer_()},l=function(){return i.fixesBadSeeks_()};this.tech_.on("seekablechanged",l),this.tech_.on("waiting",r),this.tech_.on(d,s),this.tech_.on("canplay",n),this.dispose=function(){i.logger_("dispose"),i.tech_.off("seekablechanged",l),i.tech_.off("waiting",r),i.tech_.off(d,s),i.tech_.off("canplay",n),i.checkCurrentTimeTimeout_&&o["default"].clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}return n(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&o["default"].clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=o["default"].setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+u["default"].SAFE_TIME_DELTA>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var e=this.tech_.seeking(),t=this.seekable(),i=this.tech_.currentTime(),n=void 0;if(e&&this.afterSeekableWindow_(t,i)){var r=t.end(t.length-1);n=r}if(e&&this.beforeSeekableWindow_(t,i)){var a=t.start(0);n=a+u["default"].SAFE_TIME_DELTA}return"undefined"!==typeof n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+u["default"].printableRange(t)+". Seeking to "+n+"."),this.tech_.setCurrentTime(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=u["default"].findRange(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=u["default"].findNextRange(n,t);if(this.videoUnderflow_(r,n,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(r.length>0){var a=r.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t){return!!e.length&&t>e.end(e.length-1)+u["default"].SAFE_TIME_DELTA}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-u["default"].SAFE_TIME_DELTA)}},{key:"videoUnderflow_",value:function(e,t,i){if(0===e.length){var n=this.gapFromVideoUnderflow_(t,i);if(n)return this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". Seeking to current time "+i),!0}return!1}},{key:"skipTheGap_",value:function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),n=u["default"].findNextRange(t,i);this.cancelTimer_(),0!==n.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+u["default"].TIME_FUDGE_FACTOR),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var i=u["default"].findGaps(e),n=0;n<i.length;n++){var r=i.start(n),a=i.end(n);if(t-r<4&&t-r>2)return{start:r,end:a}}return null}},{key:"logger_",value:function(){}}]),e}();t["default"]=p,e.exports=t["default"]},f7fd:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){var n=!0;while(n){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,i=s,n=!0,o=u=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=i("d61a"),u=a(l),c=i("e475"),h=a(c),d=i("6e1b"),p=a(d),f=i("56c8"),v=a(f),m=i("be09"),g=a(m),y=i("4ea2"),b=a(y),_=i("f24e"),T=i("81bc"),S=i("d3ae"),w=i("57db"),E=500,k=function(e,t,i){if(!e||!t)return!1;var n=e.segments,r=i===n.length;return e.endList&&"open"===t.readyState&&r},C=function(e){return"number"===typeof e&&isFinite(e)},x=function(e,t,i){return"main"===e&&t&&i?i.containsAudio||i.containsVideo?t.containsVideo&&!i.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.containsVideo&&i.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null};t.illegalMediaSwitch=x;var A=function(e,t,i){var n=void 0;return n=e.length&&e.start(0)>0&&e.start(0)<t?e.start(0):t-30,Math.min(n,t-i)};t.safeBackBufferTrimTime=A;var I=function(e){function t(e){var i=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.state="INIT",this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.hls_=e.hls,this.loaderType_=e.loaderType,this.startingMedia_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.pendingSegment_=null,this.mimeType_=null,this.sourceUpdater_=null,this.xhrOptions_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.syncController_.on("syncinfoupdate",(function(){return i.trigger("syncinfoupdate")})),this.mediaSource_.addEventListener("sourceopen",(function(){return i.ended_=!1})),this.fetchAtBuffer_=!1,n.debug&&(this.logger_=h["default"].log.bind(h["default"],"segment-loader",this.loaderType_,"->"))}return o(t,e),n(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return"undefined"!==typeof e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():h["default"].createTimeRanges()}},{key:"initSegment",value:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(!e)return null;var i=(0,_.initSegmentId)(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes}),n||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new p["default"](this.mediaSource_,this.mimeType_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(e){var i=this.playlist_,n=this.pendingSegment_;if(this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0}),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(i&&i.uri===e.uri){var r=e.mediaSequence-i.mediaSequence;this.logger_("mediaSequenceDiff",r),null!==this.mediaIndex&&(this.mediaIndex-=r),n&&(n.mediaIndex-=r,n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(g["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e){this.mimeType_||(this.mimeType_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t){this.sourceUpdater_&&this.sourceUpdater_.remove(e,t),(0,b["default"])(e,t,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&g["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=g["default"].setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&g["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=g["default"].setTimeout(this.monitorBufferTick_.bind(this),E)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e){var t=k(this.playlist_,this.mediaSource_,e.mediaIndex);t?this.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment),this.loadSegment_(e))}}}},{key:"checkBuffer_",value:function(e,t,i,n,r,a){var s=0,o=void 0;e.length&&(s=e.end(e.length-1));var l=Math.max(0,s-r);if(!t.segments.length)return null;if(l>=this.goalBufferLength_())return null;if(!n&&l>=1)return null;if(this.logger_("checkBuffer_","mediaIndex:",i,"hasPlayed:",n,"currentTime:",r,"syncPoint:",a,"fetchAtBuffer:",this.fetchAtBuffer_,"bufferedTime:",l),null===a)return i=this.getSyncSegmentCandidate_(t),this.logger_("getSync","mediaIndex:",i),this.generateSegmentInfo_(t,i,null,!0);if(null!==i){this.logger_("walkForward","mediaIndex:",i+1);var c=t.segments[i];return o=c&&c.end?c.end:s,this.generateSegmentInfo_(t,i+1,o,!1)}if(this.fetchAtBuffer_){var h=u["default"].getMediaInfoForTime(t,s,a.segmentIndex,a.time);i=h.mediaIndex,o=h.startTime}else{h=u["default"].getMediaInfoForTime(t,r,a.segmentIndex,a.time);i=h.mediaIndex,o=h.startTime}return this.logger_("getMediaIndexForTime","mediaIndex:",i,"startOfSegment:",o),this.generateSegmentInfo_(t,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map((function(e,t){return{timeline:e.timeline,segmentIndex:t}})).filter((function(e){return e.timeline===t.currentTimeline_}));return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,i,n){if(t<0||t>=e.segments.length)return null;var r=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=u["default"].estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=(0,S.timeUntilRebuffer)(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;var s=(0,w.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a,l=o-s.rebufferingImpact,c=.5;return a<=S.TIME_FUDGE_FACTOR&&(c=1),!s.playlist||s.playlist.uri===this.playlist_.uri||l<c?!1:(this.bandwidth=s.playlist.attributes.BANDWIDTH*v["default"].BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=(0,T.mediaSegmentRequest)(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){var t=A(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var n=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key={resolvedUri:t.key.resolvedUri,iv:n}}return t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===T.REQUEST_ERRORS.ABORTED?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===T.REQUEST_ERRORS.TIMEOUT?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,i=t.segment,n=this.syncController_.probeSegmentInfo(t);"undefined"===typeof this.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});var r=x(this.loaderType_,this.startingMedia_,n);if(r)return this.error({message:r,blacklistDuration:1/0}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var a=this.syncController_.mappingForTimeline(t.timeline);null!==a&&this.trigger({type:"segmenttimemapping",mapping:a}),this.state="APPENDING",i.map&&function(){var t=(0,_.initSegmentId)(i.map);if(!e.activeInitSegmentId_||e.activeInitSegmentId_!==t){var n=e.initSegment(i.map);e.sourceUpdater_.appendBuffer(n.bytes,(function(){e.activeInitSegmentId_=t}))}}(),t.byteLength=t.bytes.byteLength,"number"===typeof i.start&&"number"===typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(this.logger_("handleUpdateEnd_","segmentInfo:",this.pendingSegment_),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,i=null!==this.mediaIndex;if(this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration)this.resetEverything();else{i&&this.trigger("bandwidthupdate"),this.trigger("progress");var n=k(e.playlist,this.mediaSource_,e.mediaIndex+1);n&&this.endOfStream(),this.paused()||this.monitorBuffer_()}}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},{key:"logger_",value:function(){}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(C(i)&&C(n)){(0,b["default"])(i,n,this.segmentMetadataTrack_);var r=g["default"].WebKitDataCue||g["default"].VTTCue,a={bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:i,end:n},s=JSON.stringify(a),o=new r(i,n,s);o.value=a,this.segmentMetadataTrack_.addCue(o)}}}}]),t}(h["default"].EventTarget);t["default"]=I},f97d:function(e,t){var i={"":!0,up:!0};function n(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function r(e){return"number"===typeof e&&e>=0&&e<=100}function a(){var e=100,t=3,i=0,a=100,s=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=n(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}e.exports=a},fc78:function(e,t,i){(function(t){(function(t,i){e.exports=i()})(self,(function(){return function(){var e={"./node_modules/es6-promise/dist/es6-promise.js":
/*!******************************************************!*\
!*** ./node_modules/es6-promise/dist/es6-promise.js ***!
\******************************************************/function(e,i,n){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/
(function(t,i){e.exports=i()})(0,(function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function i(e){return"function"===typeof e}var r=void 0;r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var a=r,s=0,o=void 0,l=void 0,u=function(e,t){S[s]=e,S[s+1]=t,s+=2,2===s&&(l?l(w):k())};function c(e){l=e}function h(e){u=e}var d="undefined"!==typeof window?window:void 0,p=d||{},f=p.MutationObserver||p.WebKitMutationObserver,v="undefined"===typeof self&&"undefined"!==typeof t&&"[object process]"==={}.toString.call(t),m="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function g(){return function(){return t.nextTick(w)}}function y(){return"undefined"!==typeof o?function(){o(w)}:T()}function b(){var e=0,t=new f(w),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function _(){var e=new MessageChannel;return e.port1.onmessage=w,function(){return e.port2.postMessage(0)}}function T(){var e=setTimeout;return function(){return e(w,1)}}var S=new Array(1e3);function w(){for(var e=0;e<s;e+=2){var t=S[e],i=S[e+1];t(i),S[e]=void 0,S[e+1]=void 0}s=0}function E(){try{var e=Function("return this")().require("vertx");return o=e.runOnLoop||e.runOnContext,y()}catch(t){return T()}}var k=void 0;function C(e,t){var i=this,n=new this.constructor(I);void 0===n[A]&&Y(n);var r=i._state;if(r){var a=arguments[r-1];u((function(){return G(r,n,a,i._result)}))}else q(i,n,e,t);return n}function x(e){var t=this;if(e&&"object"===typeof e&&e.constructor===t)return e;var i=new t(I);return U(i,e),i}k=v?g():f?b():m?_():void 0===d?E():T();var A=Math.random().toString(36).substring(2);function I(){}var O=void 0,j=1,L=2;function P(){return new TypeError("You cannot resolve a promise with itself")}function D(){return new TypeError("A promises callback cannot return that same promise.")}function R(e,t,i,n){try{e.call(t,i,n)}catch(r){return r}}function M(e,t,i){u((function(e){var n=!1,r=R(i,t,(function(i){n||(n=!0,t!==i?U(e,i):V(e,i))}),(function(t){n||(n=!0,H(e,t))}),"Settle: "+(e._label||" unknown promise"));!n&&r&&(n=!0,H(e,r))}),e)}function N(e,t){t._state===j?V(e,t._result):t._state===L?H(e,t._result):q(t,void 0,(function(t){return U(e,t)}),(function(t){return H(e,t)}))}function B(e,t,n){t.constructor===e.constructor&&n===C&&t.constructor.resolve===x?N(e,t):void 0===n?V(e,t):i(n)?M(e,t,n):V(e,t)}function U(t,i){if(t===i)H(t,P());else if(e(i)){var n=void 0;try{n=i.then}catch(r){return void H(t,r)}B(t,i,n)}else V(t,i)}function F(e){e._onerror&&e._onerror(e._result),z(e)}function V(e,t){e._state===O&&(e._result=t,e._state=j,0!==e._subscribers.length&&u(z,e))}function H(e,t){e._state===O&&(e._state=L,e._result=t,u(F,e))}function q(e,t,i,n){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+j]=i,r[a+L]=n,0===a&&e._state&&u(z,e)}function z(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,a=e._result,s=0;s<t.length;s+=3)n=t[s],r=t[s+i],n?G(i,n,r,a):r(a);e._subscribers.length=0}}function G(e,t,n,r){var a=i(n),s=void 0,o=void 0,l=!0;if(a){try{s=n(r)}catch(u){l=!1,o=u}if(t===s)return void H(t,D())}else s=r;t._state!==O||(a&&l?U(t,s):!1===l?H(t,o):e===j?V(t,s):e===L&&H(t,s))}function W(e,t){try{t((function(t){U(e,t)}),(function(t){H(e,t)}))}catch(i){H(e,i)}}var $=0;function X(){return $++}function Y(e){e[A]=$++,e._state=void 0,e._result=void 0,e._subscribers=[]}function K(){return new Error("Array Methods must be provided an Array")}var Q=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(I),this.promise[A]||Y(this.promise),a(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?V(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&V(this.promise,this._result))):H(this.promise,K())}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===x){var r=void 0,a=void 0,s=!1;try{r=e.then}catch(l){s=!0,a=l}if(r===C&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!==typeof r)this._remaining--,this._result[t]=e;else if(i===ne){var o=new i(I);s?H(o,a):B(o,e,r),this._willSettleAt(o,t)}else this._willSettleAt(new i((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,i){var n=this.promise;n._state===O&&(this._remaining--,e===L?H(n,i):this._result[t]=i),0===this._remaining&&V(n,this._result)},e.prototype._willSettleAt=function(e,t){var i=this;q(e,void 0,(function(e){return i._settledAt(j,t,e)}),(function(e){return i._settledAt(L,t,e)}))},e}();function J(e){return new Q(this,e).promise}function Z(e){var t=this;return a(e)?new t((function(i,n){for(var r=e.length,a=0;a<r;a++)t.resolve(e[a]).then(i,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function ee(e){var t=this,i=new t(I);return H(i,e),i}function te(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ie(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ne=function(){function e(t){this[A]=X(),this._result=this._state=void 0,this._subscribers=[],I!==t&&("function"!==typeof t&&te(),this instanceof e?W(this,t):ie())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,n=t.constructor;return i(e)?t.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):t.then(e,e)},e}();function re(){var e=void 0;if("undefined"!==typeof n.g)e=n.g;else if("undefined"!==typeof self)e=self;else try{e=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(r){}if("[object Promise]"===i&&!t.cast)return}e.Promise=ne}return ne.prototype.then=C,ne.all=J,ne.race=Z,ne.resolve=x,ne.reject=ee,ne._setScheduler=c,ne._setAsap=h,ne._asap=u,ne.polyfill=re,ne.Promise=ne,ne}))},"./node_modules/events/events.js":
/*!***************************************!*\
!*** ./node_modules/events/events.js ***!
\***************************************/function(e){"use strict";var t,i="object"===typeof Reflect?Reflect:null,n=i&&"function"===typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};function r(e){console&&console.warn&&console.warn(e)}t=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function l(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,i,n){var a,s,o;if(l(i),s=e._events,void 0===s?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),o=s[t]),void 0===o)o=s[t]=i,++e._eventsCount;else if("function"===typeof o?o=s[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),a=u(e),a>0&&o.length>a&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,r(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=h.bind(n);return r.listener=i,n.wrapFn=r,r}function p(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"===typeof r?i?[r.listener||r]:[r]:i?g(r):v(r,r.length)}function f(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"===typeof i)return 1;if(void 0!==i)return i.length}return 0}function v(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function m(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function g(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}function y(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,a),n(i)}function a(){"function"===typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}_(e,t,a,{once:!0}),"error"!==t&&b(e,r,{once:!0})}))}function b(e,t,i){"function"===typeof e.on&&_(e,"error",t,i)}function _(e,t,i,n){if("function"===typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(a){n.once&&e.removeEventListener(t,r),i(a)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,a=this._events;if(void 0!==a)r=r&&void 0===a.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=a[e];if(void 0===l)return!1;if("function"===typeof l)n(l,this,t);else{var u=l.length,c=v(l,u);for(i=0;i<u;++i)n(c[i],this,t)}return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,n,r,a,s;if(l(t),n=this._events,void 0===n)return this;if(i=n[e],void 0===i)return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!==typeof i){for(r=-1,a=i.length-1;a>=0;a--)if(i[a]===t||i[a].listener===t){s=i[a].listener,r=a;break}if(r<0)return this;0===r?i.shift():m(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,i,n;if(i=this._events,void 0===i)return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,a=Object.keys(i);for(n=0;n<a.length;++n)r=a[n],"removeListener"!==r&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=i[e],"function"===typeof t)this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},"./node_modules/webworkify-webpack/index.js":
/*!**************************************************!*\
!*** ./node_modules/webworkify-webpack/index.js ***!
\**************************************************/function(e,t,i){function n(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.i=function(e){return e},i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var n=i(i.s=ENTRY_MODULE);return n.default||n}var r="[\\.|\\-|\\+|\\w|/|@]+",a="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+r+").*?\\)";function s(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e){return!isNaN(1*e)}function l(e,t,n){var l={};l[n]=[];var u=t.toString(),c=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return l;var h,d=c[1],p=new RegExp("(\\\\n|\\W)"+s(d)+a,"g");while(h=p.exec(u))"dll-reference"!==h[3]&&l[n].push(h[3]);p=new RegExp("\\("+s(d)+'\\("(dll-reference\\s('+r+'))"\\)\\)'+a,"g");while(h=p.exec(u))e[h[2]]||(l[n].push(h[1]),e[h[2]]=i(h[1]).m),l[h[2]]=l[h[2]]||[],l[h[2]].push(h[4]);for(var f=Object.keys(l),v=0;v<f.length;v++)for(var m=0;m<l[f[v]].length;m++)o(l[f[v]][m])&&(l[f[v]][m]=1*l[f[v]][m]);return l}function u(e){var t=Object.keys(e);return t.reduce((function(t,i){return t||e[i].length>0}),!1)}function c(e,t){var i={main:[t]},n={main:[]},r={main:{}};while(u(i))for(var a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],c=i[o],h=c.pop();if(r[o]=r[o]||{},!r[o][h]&&e[o][h]){r[o][h]=!0,n[o]=n[o]||[],n[o].push(h);for(var d=l(e,e[o][h],o),p=Object.keys(d),f=0;f<p.length;f++)i[p[f]]=i[p[f]]||[],i[p[f]]=i[p[f]].concat(d[p[f]])}}return n}e.exports=function(e,t){t=t||{};var r={main:i.m},a=t.all?{main:Object.keys(r.main)}:c(r,e),s="";Object.keys(a).filter((function(e){return"main"!==e})).forEach((function(e){var t=0;while(a[e][t])t++;a[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",s=s+"var "+e+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+a[e].map((function(t){return JSON.stringify(t)+": "+r[e][t].toString()})).join(",")+"});\n"})),s=s+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+a.main.map((function(e){return JSON.stringify(e)+": "+r.main[e].toString()})).join(",")+"}))(self);";var o=new window.Blob([s],{type:"text/javascript"});if(t.bare)return o;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,u=l.createObjectURL(o),h=new window.Worker(u);return h.objectURL=u,h}},"./src/config.js":
/*!***********************!*\
!*** ./src/config.js ***!
\***********************/function(e,t,i){"use strict";i.r(t),i.d(t,{defaultConfig:function(){return n},createDefaultConfig:function(){return r}});var n={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function r(){return Object.assign({},n)}},"./src/core/features.js":
/*!******************************!*\
!*** ./src/core/features.js ***!
\******************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),r=i(/*! ../config.js */"./src/config.js"),a=function(){function e(){}return e.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},e.supportNetworkStreamIO=function(){var e=new n.default({},(0,r.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t},e.getNetworkLoaderTypeName=function(){var e=new n.default({},(0,r.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t},e.supportNativeMediaPlayback=function(t){void 0==e.videoElement&&(e.videoElement=window.document.createElement("video"));var i=e.videoElement.canPlayType(t);return"probably"===i||"maybe"==i},e.getFeatureList=function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t},e}();t["default"]=a},"./src/core/media-info.js":
/*!********************************!*\
!*** ./src/core/media-info.js ***!
\********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return e.prototype.isComplete=function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t},e.prototype.isSeekable=function(){return!0===this.hasKeyframesIndex},e.prototype.getNearestKeyframe=function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}},e.prototype._search=function(e,t){var i=0,n=e.length-1,r=0,a=0,s=n;t<e[0]&&(i=0,a=s+1);while(a<=s){if(r=a+Math.floor((s-a)/2),r===n||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?a=r+1:s=r-1}return i},e}();t["default"]=n},"./src/core/media-segment-info.js":
/*!****************************************!*\
!*** ./src/core/media-segment-info.js ***!
\****************************************/function(e,t,i){"use strict";i.r(t),i.d(t,{SampleInfo:function(){return n},MediaSegmentInfo:function(){return r},IDRSampleList:function(){return a},MediaSegmentInfoList:function(){return s}});var n=function(){function e(e,t,i,n,r){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=r,this.fileposition=null}return e}(),r=function(){function e(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return e.prototype.appendSyncPoint=function(e){e.isSyncPoint=!0,this.syncPoints.push(e)},e}(),a=function(){function e(){this._list=[]}return e.prototype.clear=function(){this._list=[]},e.prototype.appendArray=function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))},e.prototype.getLastSyncPointBeforeDts=function(e){if(0==this._list.length)return null;var t=this._list,i=0,n=t.length-1,r=0,a=0,s=n;e<t[0].dts&&(i=0,a=s+1);while(a<=s){if(r=a+Math.floor((s-a)/2),r===n||e>=t[r].dts&&e<t[r+1].dts){i=r;break}t[r].dts<e?a=r+1:s=r-1}return this._list[i]},e}(),s=function(){function e(e){this._type=e,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return 0===this._list.length},e.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},e.prototype._searchNearestSegmentBefore=function(e){var t=this._list;if(0===t.length)return-2;var i=t.length-1,n=0,r=0,a=i,s=0;if(e<t[0].originalBeginDts)return s=-1,s;while(r<=a){if(n=r+Math.floor((a-r)/2),n===i||e>t[n].lastSample.originalDts&&e<t[n+1].originalBeginDts){s=n;break}t[n].originalBeginDts<e?r=n+1:a=n-1}return s},e.prototype._searchNearestSegmentAfter=function(e){return this._searchNearestSegmentBefore(e)+1},e.prototype.append=function(e){var t=this._list,i=e,n=this._lastAppendLocation,r=0;-1!==n&&n<t.length&&i.originalBeginDts>=t[n].lastSample.originalDts&&(n===t.length-1||n<t.length-1&&i.originalBeginDts<t[n+1].originalBeginDts)?r=n+1:t.length>0&&(r=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,i)},e.prototype.getLastSegmentBefore=function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null},e.prototype.getLastSampleBefore=function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null},e.prototype.getLastSyncPointBefore=function(e){var t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;while(0===i.length&&t>0)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null},e}()},"./src/core/mse-controller.js":
/*!************************************!*\
!*** ./src/core/mse-controller.js ***!
\************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ./mse-events.js */"./src/core/mse-events.js"),l=i(/*! ./media-segment-info.js */"./src/core/media-segment-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),c=function(){function e(e){this.TAG="MSEController",this._config=e,this._emitter=new(r()),this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new l.IDRSampleList}return e.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaSource)throw new u.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL},e.prototype.detachMediaElement=function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var n=this._sourceBuffers[t];if(n){if("closed"!==e.readyState){try{e.removeSourceBuffer(n)}catch(r){a.default.e(this.TAG,r.message)}n.removeEventListener("error",this.e.onSourceBufferError),n.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(r){a.default.e(this.TAG,r.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},e.prototype.appendInitSegment=function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var i=e,n=""+i.container;i.codec&&i.codec.length>0&&(n+=";codecs="+i.codec);var r=!1;if(a.default.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])a.default.v(this.TAG,"Notice: "+i.type+" mimeType changed, origin: "+this._mimeTypes[i.type]+", target: "+n);else{r=!0;try{var l=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);l.addEventListener("error",this.e.onSourceBufferError),l.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(u){return a.default.e(this.TAG,u.message),void this._emitter.emit(o.default.ERROR,{code:u.code,msg:u.message})}}this._mimeTypes[i.type]=n}t||this._pendingSegments[i.type].push(i),r||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),s.default.safari&&"audio/mpeg"===i.container&&i.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())},e.prototype.appendMediaSegment=function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var i=this._sourceBuffers[t.type];!i||i.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},e.prototype.seek=function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var i=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{i.abort()}catch(c){a.default.e(this.TAG,c.message)}this._idrList.clear();var n=this._pendingSegments[t];if(n.splice(0,n.length),"closed"!==this._mediaSource.readyState){for(var r=0;r<i.buffered.length;r++){var o=i.buffered.start(r),l=i.buffered.end(r);this._pendingRemoveRanges[t].push({start:o,end:l})}if(i.updating||this._doRemoveRanges(),s.default.safari){var u=this._lastInitSegments[t];u&&(this._pendingSegments[t].push(u),i.updating||this._doAppendSegments())}}}},e.prototype.endOfStream=function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},e.prototype.getNearestKeyframe=function(e){return this._idrList.getLastSyncPointBeforeDts(e)},e.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var i=this._sourceBuffers[t];if(i){var n=i.buffered;if(n.length>=1&&e-n.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},e.prototype._doCleanupSourceBuffer=function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var i=this._sourceBuffers[t];if(i){for(var n=i.buffered,r=!1,a=0;a<n.length;a++){var s=n.start(a),o=n.end(a);if(s<=e&&e<o+3){if(e-s>=this._config.autoCleanupMaxBackwardDuration){r=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:l})}}else o<e&&(r=!0,this._pendingRemoveRanges[t].push({start:s,end:o}))}r&&!i.updating&&this._doRemoveRanges()}}},e.prototype._updateMediaSourceDuration=function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,i=this._pendingMediaDuration;i>0&&(isNaN(t)||i>t)&&(a.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+i),this._mediaSource.duration=i),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},e.prototype._doRemoveRanges=function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating){var t=this._sourceBuffers[e],i=this._pendingRemoveRanges[e];while(i.length&&!t.updating){var n=i.shift();t.remove(n.start,n.end)}}},e.prototype._doAppendSegments=function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var i=e[t].shift();if(i.timestampOffset){var n=this._sourceBuffers[t].timestampOffset,r=i.timestampOffset/1e3,s=Math.abs(n-r);s>.1&&(a.default.v(this.TAG,"Update MPEG audio timestampOffset from "+n+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete i.timestampOffset}if(!i.data||0===i.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(i.data),this._isBufferFull=!1,"video"===t&&i.hasOwnProperty("info")&&this._idrList.appendArray(i.info.syncPoints)}catch(l){this._pendingSegments[t].unshift(i),22===l.code?(this._isBufferFull||this._emitter.emit(o.default.BUFFER_FULL),this._isBufferFull=!0):(a.default.e(this.TAG,l.message),this._emitter.emit(o.default.ERROR,{code:l.code,msg:l.message}))}}},e.prototype._onSourceOpen=function(){if(a.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){var e=this._pendingSourceBufferInit;while(e.length){var t=e.shift();this.appendInitSegment(t,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(o.default.SOURCE_OPEN)},e.prototype._onSourceEnded=function(){a.default.v(this.TAG,"MediaSource onSourceEnded")},e.prototype._onSourceClose=function(){a.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},e.prototype._hasPendingSegments=function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0},e.prototype._hasPendingRemoveRanges=function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0},e.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(o.default.UPDATE_END)},e.prototype._onSourceBufferError=function(e){a.default.e(this.TAG,"SourceBuffer Error: "+e)},e}();t["default"]=c},"./src/core/mse-events.js":
/*!********************************!*\
!*** ./src/core/mse-events.js ***!
\********************************/function(e,t,i){"use strict";i.r(t);var n={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};t["default"]=n},"./src/core/transmuxer.js":
/*!********************************!*\
!*** ./src/core/transmuxer.js ***!
\********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),s=i.n(a),o=i(/*! ../utils/logger.js */"./src/utils/logger.js"),l=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),u=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),c=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),h=i(/*! ./media-info.js */"./src/core/media-info.js"),d=function(){function e(e,t){if(this.TAG="Transmuxer",this._emitter=new(r()),t.enableWorker&&"undefined"!==typeof Worker)try{this._worker=s()(/*! ./transmuxing-worker */"./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,t]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},l.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:l.default.getConfig()})}catch(n){o.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new u.default(e,t)}else this._controller=new u.default(e,t);if(this._controller){var i=this._controller;i.on(c.default.IO_ERROR,this._onIOError.bind(this)),i.on(c.default.DEMUX_ERROR,this._onDemuxError.bind(this)),i.on(c.default.INIT_SEGMENT,this._onInitSegment.bind(this)),i.on(c.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),i.on(c.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),i.on(c.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),i.on(c.default.MEDIA_INFO,this._onMediaInfo.bind(this)),i.on(c.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),i.on(c.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),i.on(c.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),i.on(c.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return e.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),l.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.hasWorker=function(){return null!=this._worker},e.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},e.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},e.prototype.seek=function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)},e.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},e.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},e.prototype._onInitSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(c.default.INIT_SEGMENT,e,t)}))},e.prototype._onMediaSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(c.default.MEDIA_SEGMENT,e,t)}))},e.prototype._onLoadingComplete=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(c.default.LOADING_COMPLETE)}))},e.prototype._onRecoveredEarlyEof=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(c.default.RECOVERED_EARLY_EOF)}))},e.prototype._onMediaInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(c.default.MEDIA_INFO,e)}))},e.prototype._onMetaDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(c.default.METADATA_ARRIVED,e)}))},e.prototype._onScriptDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(c.default.SCRIPTDATA_ARRIVED,e)}))},e.prototype._onStatisticsInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(c.default.STATISTICS_INFO,e)}))},e.prototype._onIOError=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(c.default.IO_ERROR,e,t)}))},e.prototype._onDemuxError=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(c.default.DEMUX_ERROR,e,t)}))},e.prototype._onRecommendSeekpoint=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(c.default.RECOMMEND_SEEKPOINT,e)}))},e.prototype._onLoggingConfigChanged=function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})},e.prototype._onWorkerMessage=function(e){var t=e.data,i=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case c.default.INIT_SEGMENT:case c.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case c.default.LOADING_COMPLETE:case c.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case c.default.MEDIA_INFO:Object.setPrototypeOf(i,h.default.prototype),this._emitter.emit(t.msg,i);break;case c.default.METADATA_ARRIVED:case c.default.SCRIPTDATA_ARRIVED:case c.default.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case c.default.IO_ERROR:case c.default.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case c.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":o.default.emitter.emit("log",i.type,i.logcat);break;default:break}},e}();t["default"]=d},"./src/core/transmuxing-controller.js":
/*!********************************************!*\
!*** ./src/core/transmuxing-controller.js ***!
\********************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ./media-info.js */"./src/core/media-info.js"),l=i(/*! ../demux/flv-demuxer.js */"./src/demux/flv-demuxer.js"),u=i(/*! ../remux/mp4-remuxer.js */"./src/remux/mp4-remuxer.js"),c=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),h=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),d=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),p=function(){function e(e,t){this.TAG="TransmuxingController",this._emitter=new(r()),this._config=t,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!==typeof e.cors&&(e.cors=!0),"boolean"!==typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(n){n.timestampBase=i,i+=n.duration,n.cors=e.cors,n.withCredentials=e.withCredentials,t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return e.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},e.prototype._loadSegment=function(e,t){this._currentSegmentIndex=e;var i=this._mediaDataSource.segments[e],n=this._ioctl=new h.default(i,this._config,e);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)},e.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},e.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},e.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},e.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},e.prototype.seek=function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var i=this._mediaInfo.segments[t];if(void 0==i)this._pendingSeekTime=e;else{var n=i.getNearestKeyframe(e);this._remuxer.seek(n.milliseconds),this._ioctl.seek(n.fileposition),this._pendingResolveSeekPoint=n.milliseconds}}else{var r=this._mediaInfo.segments[t];if(void 0==r)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{n=r.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,n.fileposition),this._pendingResolveSeekPoint=n.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}},e.prototype._searchSegmentIndexContains=function(e){for(var t=this._mediaDataSource.segments,i=t.length-1,n=0;n<t.length;n++)if(e<t[n].timestampBase){i=n-1;break}return i},e.prototype._onInitChunkArrival=function(e,t){var i=this,n=null,r=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((n=l.default.probe(e)).match){this._demuxer=new l.default(n,this._config),this._remuxer||(this._remuxer=new u.default(this._config));var s=this._mediaDataSource;void 0==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"===typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"===typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else n=null,a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){i._internalAbort()})),this._emitter.emit(d.default.DEMUX_ERROR,c.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r},e.prototype._onMediaInfo=function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,o.default.prototype));var i=Object.assign({},e);Object.setPrototypeOf(i,o.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=i,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))},e.prototype._onMetaDataArrived=function(e){this._emitter.emit(d.default.METADATA_ARRIVED,e)},e.prototype._onScriptDataArrived=function(e){this._emitter.emit(d.default.SCRIPTDATA_ARRIVED,e)},e.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},e.prototype._onIOComplete=function(e){var t=e,i=t+1;i<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(i)):(this._remuxer.flushStashedSamples(),this._emitter.emit(d.default.LOADING_COMPLETE),this._disableStatisticsReporter())},e.prototype._onIORedirect=function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e},e.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(d.default.RECOVERED_EARLY_EOF)},e.prototype._onIOException=function(e,t){a.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(d.default.IO_ERROR,e,t),this._disableStatisticsReporter()},e.prototype._onDemuxException=function(e,t){a.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(d.default.DEMUX_ERROR,e,t)},e.prototype._onRemuxerInitSegmentArrival=function(e,t){this._emitter.emit(d.default.INIT_SEGMENT,e,t)},e.prototype._onRemuxerMediaSegmentArrival=function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(d.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var i=t.info.syncPoints,n=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,s.default.safari&&i.length>0&&i[0].originalDts===n&&(n=i[0].pts),this._emitter.emit(d.default.RECOMMEND_SEEKPOINT,n)}},e.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},e.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype._reportSegmentMediaInfo=function(e){var t=this._mediaInfo.segments[e],i=Object.assign({},t);i.duration=this._mediaInfo.duration,i.segmentCount=this._mediaInfo.segmentCount,delete i.segments,delete i.keyframesIndex,this._emitter.emit(d.default.MEDIA_INFO,i)},e.prototype._reportStatisticsInfo=function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(d.default.STATISTICS_INFO,e)},e}();t["default"]=p},"./src/core/transmuxing-events.js":
/*!****************************************!*\
!*** ./src/core/transmuxing-events.js ***!
\****************************************/function(e,t,i){"use strict";i.r(t);var n={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};t["default"]=n},"./src/core/transmuxing-worker.js":
/*!****************************************!*\
!*** ./src/core/transmuxing-worker.js ***!
\****************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),r=i(/*! ../utils/polyfill.js */"./src/utils/polyfill.js"),a=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),s=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),o=function(e){var t=null,i=y.bind(this);function o(t,i){var n={msg:s.default.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function l(t,i){var n={msg:s.default.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function u(){var t={msg:s.default.LOADING_COMPLETE};e.postMessage(t)}function c(){var t={msg:s.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function h(t){var i={msg:s.default.MEDIA_INFO,data:t};e.postMessage(i)}function d(t){var i={msg:s.default.METADATA_ARRIVED,data:t};e.postMessage(i)}function p(t){var i={msg:s.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function f(t){var i={msg:s.default.STATISTICS_INFO,data:t};e.postMessage(i)}function v(t,i){e.postMessage({msg:s.default.IO_ERROR,data:{type:t,info:i}})}function m(t,i){e.postMessage({msg:s.default.DEMUX_ERROR,data:{type:t,info:i}})}function g(t){e.postMessage({msg:s.default.RECOMMEND_SEEKPOINT,data:t})}function y(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}r.default.install(),e.addEventListener("message",(function(r){switch(r.data.cmd){case"init":t=new a.default(r.data.param[0],r.data.param[1]),t.on(s.default.IO_ERROR,v.bind(this)),t.on(s.default.DEMUX_ERROR,m.bind(this)),t.on(s.default.INIT_SEGMENT,o.bind(this)),t.on(s.default.MEDIA_SEGMENT,l.bind(this)),t.on(s.default.LOADING_COMPLETE,u.bind(this)),t.on(s.default.RECOVERED_EARLY_EOF,c.bind(this)),t.on(s.default.MEDIA_INFO,h.bind(this)),t.on(s.default.METADATA_ARRIVED,d.bind(this)),t.on(s.default.SCRIPTDATA_ARRIVED,p.bind(this)),t.on(s.default.STATISTICS_INFO,f.bind(this)),t.on(s.default.RECOMMEND_SEEKPOINT,g.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(r.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var y=r.data.param;n.default.applyConfig(y),!0===y.enableCallback?n.default.addLogListener(i):n.default.removeLogListener(i);break}}))};t["default"]=o},"./src/demux/amf-parser.js":
/*!*********************************!*\
!*** ./src/demux/amf-parser.js ***!
\*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ../utils/utf8-conv.js */"./src/utils/utf8-conv.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js"),s=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),o=function(){function e(){}return e.parseScriptData=function(t,i,r){var a={};try{var s=e.parseValue(t,i,r),o=e.parseValue(t,i+s.size,r-s.size);a[s.data]=o.data}catch(l){n.default.e("AMF",l.toString())}return a},e.parseObject=function(t,i,n){if(n<3)throw new a.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,i,n),s=e.parseValue(t,i+r.size,n-r.size),o=s.objectEnd;return{data:{name:r.data,value:s.data},size:r.size+s.size,objectEnd:o}},e.parseVariable=function(t,i,n){return e.parseObject(t,i,n)},e.parseString=function(e,t,i){if(i<2)throw new a.IllegalStateException("Data not enough when parse String");var n,o=new DataView(e,t,i),l=o.getUint16(0,!s);return n=l>0?(0,r.default)(new Uint8Array(e,t+2,l)):"",{data:n,size:2+l}},e.parseLongString=function(e,t,i){if(i<4)throw new a.IllegalStateException("Data not enough when parse LongString");var n,o=new DataView(e,t,i),l=o.getUint32(0,!s);return n=l>0?(0,r.default)(new Uint8Array(e,t+4,l)):"",{data:n,size:4+l}},e.parseDate=function(e,t,i){if(i<10)throw new a.IllegalStateException("Data size invalid when parse Date");var n=new DataView(e,t,i),r=n.getFloat64(0,!s),o=n.getInt16(8,!s);return r+=60*o*1e3,{data:new Date(r),size:10}},e.parseValue=function(t,i,r){if(r<1)throw new a.IllegalStateException("Data not enough when parse Value");var o,l=new DataView(t,i,r),u=1,c=l.getUint8(0),h=!1;try{switch(c){case 0:o=l.getFloat64(1,!s),u+=8;break;case 1:var d=l.getUint8(1);o=!!d,u+=1;break;case 2:var p=e.parseString(t,i+1,r-1);o=p.data,u+=p.size;break;case 3:o={};var f=0;9===(16777215&l.getUint32(r-4,!s))&&(f=3);while(u<r-4){var v=e.parseObject(t,i+u,r-u-f);if(v.objectEnd)break;o[v.data.name]=v.data.value,u+=v.size}if(u<=r-3){var m=16777215&l.getUint32(u-1,!s);9===m&&(u+=3)}break;case 8:o={},u+=4;f=0;9===(16777215&l.getUint32(r-4,!s))&&(f=3);while(u<r-8){var g=e.parseVariable(t,i+u,r-u-f);if(g.objectEnd)break;o[g.data.name]=g.data.value,u+=g.size}if(u<=r-3){m=16777215&l.getUint32(u-1,!s);9===m&&(u+=3)}break;case 9:o=void 0,u=1,h=!0;break;case 10:o=[];var y=l.getUint32(1,!s);u+=4;for(var b=0;b<y;b++){var _=e.parseValue(t,i+u,r-u);o.push(_.data),u+=_.size}break;case 11:var T=e.parseDate(t,i+1,r-1);o=T.data,u+=T.size;break;case 12:var S=e.parseString(t,i+1,r-1);o=S.data,u+=S.size;break;default:u=r,n.default.w("AMF","Unsupported AMF value type "+c)}}catch(w){n.default.e("AMF",w.toString())}return{data:o,size:u,objectEnd:h}},e}();t["default"]=o},"./src/demux/demux-errors.js":
/*!***********************************!*\
!*** ./src/demux/demux-errors.js ***!
\***********************************/function(e,t,i){"use strict";i.r(t);var n={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};t["default"]=n},"./src/demux/exp-golomb.js":
/*!*********************************!*\
!*** ./src/demux/exp-golomb.js ***!
\*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/exception.js */"./src/utils/exception.js"),r=function(){function e(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}return e.prototype.destroy=function(){this._buffer=null},e.prototype._fillCurrentWord=function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new n.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t},e.prototype.readBits=function(e){if(e>32)throw new n.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var i=this._current_word_bits_left?this._current_word:0;i>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var a=Math.min(r,this._current_word_bits_left),s=this._current_word>>>32-a;return this._current_word<<=a,this._current_word_bits_left-=a,i=i<<a|s,i},e.prototype.readBool=function(){return 1===this.readBits(1)},e.prototype.readByte=function(){return this.readBits(8)},e.prototype._skipLeadingZero=function(){var e;for(e=0;e<this._current_word_bits_left;e++)if(0!==(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},e.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},e.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},e}();t["default"]=r},"./src/demux/flv-demuxer.js":
/*!**********************************!*\
!*** ./src/demux/flv-demuxer.js ***!
\**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./amf-parser.js */"./src/demux/amf-parser.js"),a=i(/*! ./sps-parser.js */"./src/demux/sps-parser.js"),s=i(/*! ./demux-errors.js */"./src/demux/demux-errors.js"),o=i(/*! ../core/media-info.js */"./src/core/media-info.js"),l=i(/*! ../utils/exception.js */"./src/utils/exception.js");function u(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}var c=function(){function e(e,t){this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new o.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return e.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},e.probe=function(e){var t=new Uint8Array(e),i={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return i;var n=(4&t[4])>>>2!==0,r=0!==(1&t[4]),a=u(t,5);return a<9?i:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:n,hasVideoTrack:r}},e.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(e.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedDuration",{get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),e.prototype.resetMediaInfo=function(){this._mediaInfo=new o.default},e.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},e.prototype.parseChunks=function(t,i){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new l.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,a=this._littleEndian;if(0===i){if(!(t.byteLength>13))return 0;var s=e.probe(t);r=s.dataOffset}if(this._firstParse){this._firstParse=!1,i+r!==this._dataOffset&&n.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");var o=new DataView(t,r),u=o.getUint32(0,!a);0!==u&&n.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4}while(r<t.byteLength){this._dispatch=!0;o=new DataView(t,r);if(r+11+4>t.byteLength)break;var c=o.getUint8(0),h=16777215&o.getUint32(0,!a);if(r+11+h+4>t.byteLength)break;if(8===c||9===c||18===c){var d=o.getUint8(4),p=o.getUint8(5),f=o.getUint8(6),v=o.getUint8(7),m=f|p<<8|d<<16|v<<24,g=16777215&o.getUint32(7,!a);0!==g&&n.default.w(this.TAG,"Meet tag which has StreamID != 0!");var y=r+11;switch(c){case 8:this._parseAudioData(t,y,h,m);break;case 9:this._parseVideoData(t,y,h,m,i+r);break;case 18:this._parseScriptData(t,y,h);break}var b=o.getUint32(11+h,!a);b!==11+h&&n.default.w(this.TAG,"Invalid PrevTagSize "+b),r+=11+h+4}else n.default.w(this.TAG,"Unsupported tag type "+c+", skipped"),r+=11+h+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r},e.prototype._parseScriptData=function(e,t,i){var a=r.default.parseScriptData(e,t,i);if(a.hasOwnProperty("onMetaData")){if(null==a.onMetaData||"object"!==typeof a.onMetaData)return void n.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&n.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=a;var s=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},s)),"boolean"===typeof s.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=s.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"===typeof s.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=s.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"===typeof s.audiodatarate&&(this._mediaInfo.audioDataRate=s.audiodatarate),"number"===typeof s.videodatarate&&(this._mediaInfo.videoDataRate=s.videodatarate),"number"===typeof s.width&&(this._mediaInfo.width=s.width),"number"===typeof s.height&&(this._mediaInfo.height=s.height),"number"===typeof s.duration){if(!this._durationOverrided){var o=Math.floor(s.duration*this._timescale);this._duration=o,this._mediaInfo.duration=o}}else this._mediaInfo.duration=0;if("number"===typeof s.framerate){var l=Math.floor(1e3*s.framerate);if(l>0){var u=l/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=l,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if("object"===typeof s.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var c=s.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(c),s.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=s,n.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(a).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},a))},e.prototype._parseKeyframesIndex=function(e){for(var t=[],i=[],n=1;n<e.times.length;n++){var r=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(r),i.push(e.filepositions[n])}return{times:t,filepositions:i}},e.prototype._parseAudioData=function(e,t,i,r){if(i<=1)n.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var a=new DataView(e,t,i),o=a.getUint8(0),l=o>>>4;if(2===l||10===l){var u=0,c=(12&o)>>>2;if(c>=0&&c<=4){u=this._flvSoundRateTable[c];var h=1&o,d=this._audioMetadata,p=this._audioTrack;if(d||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),d=this._audioMetadata={},d.type="audio",d.id=p.id,d.timescale=this._timescale,d.duration=this._duration,d.audioSampleRate=u,d.channelCount=0===h?1:2),10===l){var f=this._parseAACAudioData(e,t+1,i-1);if(void 0==f)return;if(0===f.packetType){d.config&&n.default.w(this.TAG,"Found another AudioSpecificConfig!");var v=f.data;d.audioSampleRate=v.samplingRate,d.channelCount=v.channelCount,d.codec=v.codec,d.originalCodec=v.originalCodec,d.config=v.config,d.refSampleDuration=1024/d.audioSampleRate*d.timescale,n.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",d);var m=this._mediaInfo;m.audioCodec=d.originalCodec,m.audioSampleRate=d.audioSampleRate,m.audioChannelCount=d.channelCount,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}else if(1===f.packetType){var g=this._timestampBase+r,y={unit:f.data,length:f.data.byteLength,dts:g,pts:g};p.samples.push(y),p.length+=f.data.length}else n.default.e(this.TAG,"Flv: Unsupported AAC data type "+f.packetType)}else if(2===l){if(!d.codec){v=this._parseMP3AudioData(e,t+1,i-1,!0);if(void 0==v)return;d.audioSampleRate=v.samplingRate,d.channelCount=v.channelCount,d.codec=v.codec,d.originalCodec=v.originalCodec,d.refSampleDuration=1152/d.audioSampleRate*d.timescale,n.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",d);m=this._mediaInfo;m.audioCodec=d.codec,m.audioSampleRate=d.audioSampleRate,m.audioChannelCount=d.channelCount,m.audioDataRate=v.bitRate,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}var b=this._parseMP3AudioData(e,t+1,i-1,!1);if(void 0==b)return;g=this._timestampBase+r;var _={unit:b,length:b.byteLength,dts:g,pts:g};p.samples.push(_),p.length+=b.length}}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+c)}else this._onError(s.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+l)}},e.prototype._parseAACAudioData=function(e,t,i){if(!(i<=1)){var r={},a=new Uint8Array(e,t,i);return r.packetType=a[0],0===a[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):r.data=a.subarray(1),r}n.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},e.prototype._parseAACAudioSpecificConfig=function(e,t,i){var n=new Uint8Array(e,t,i),r=null,a=0,o=0,l=0,u=null;if(a=o=n[0]>>>3,l=(7&n[0])<<1|n[1]>>>7,l<0||l>=this._mpegSamplingRates.length)this._onError(s.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[l],h=(120&n[1])>>>3;if(!(h<0||h>=8)){5===a&&(u=(7&n[1])<<1|n[2]>>>7,(124&n[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?l>=6?(a=5,r=new Array(4),u=l-3):(a=2,r=new Array(2),u=l):-1!==d.indexOf("android")?(a=2,r=new Array(2),u=l):(a=5,u=l,r=new Array(4),l>=6?u=l-3:1===h&&(a=2,r=new Array(2),u=l)),r[0]=a<<3,r[0]|=(15&l)>>>1,r[1]=(15&l)<<7,r[1]|=(15&h)<<3,5===a&&(r[1]|=(15&u)>>>1,r[2]=(1&u)<<7,r[2]|=8,r[3]=0),{config:r,samplingRate:c,channelCount:h,codec:"mp4a.40."+a,originalCodec:"mp4a.40."+o}}this._onError(s.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},e.prototype._parseMP3AudioData=function(e,t,i,r){if(!(i<4)){this._littleEndian;var a=new Uint8Array(e,t,i),s=null;if(r){if(255!==a[0])return;var o=a[1]>>>3&3,l=(6&a[1])>>1,u=(240&a[2])>>>4,c=(12&a[2])>>>2,h=a[3]>>>6&3,d=3!==h?2:1,p=0,f=0,v="mp3";switch(o){case 0:p=this._mpegAudioV25SampleRateTable[c];break;case 2:p=this._mpegAudioV20SampleRateTable[c];break;case 3:p=this._mpegAudioV10SampleRateTable[c];break}switch(l){case 1:34,u<this._mpegAudioL3BitRateTable.length&&(f=this._mpegAudioL3BitRateTable[u]);break;case 2:33,u<this._mpegAudioL2BitRateTable.length&&(f=this._mpegAudioL2BitRateTable[u]);break;case 3:32,u<this._mpegAudioL1BitRateTable.length&&(f=this._mpegAudioL1BitRateTable[u]);break}s={bitRate:f,samplingRate:p,channelCount:d,codec:v,originalCodec:v}}else s=a;return s}n.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},e.prototype._parseVideoData=function(e,t,i,r,a){if(i<=1)n.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var o=new Uint8Array(e,t,i)[0],l=(240&o)>>>4,u=15&o;7===u?this._parseAVCVideoPacket(e,t+1,i-1,r,a,l):this._onError(s.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+u)}},e.prototype._parseAVCVideoPacket=function(e,t,i,r,a,o){if(i<4)n.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var l=this._littleEndian,u=new DataView(e,t,i),c=u.getUint8(0),h=16777215&u.getUint32(0,!l),d=h<<8>>8;if(0===c)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===c)this._parseAVCVideoData(e,t+4,i-4,r,a,o,d);else if(2!==c)return void this._onError(s.default.FORMAT_ERROR,"Flv: Invalid video packet type "+c)}},e.prototype._parseAVCDecoderConfigurationRecord=function(e,t,i){if(i<7)n.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,o=this._videoTrack,l=this._littleEndian,u=new DataView(e,t,i);r?"undefined"!==typeof r.avcc&&n.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),r=this._videoMetadata={},r.type="video",r.id=o.id,r.timescale=this._timescale,r.duration=this._duration);var c=u.getUint8(0),h=u.getUint8(1);u.getUint8(2),u.getUint8(3);if(1===c&&0!==h)if(this._naluLengthSize=1+(3&u.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var d=31&u.getUint8(5);if(0!==d){d>1&&n.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+d);for(var p=6,f=0;f<d;f++){var v=u.getUint16(p,!l);if(p+=2,0!==v){var m=new Uint8Array(e,t+p,v);p+=v;var g=a.default.parseSPS(m);if(0===f){r.codecWidth=g.codec_size.width,r.codecHeight=g.codec_size.height,r.presentWidth=g.present_size.width,r.presentHeight=g.present_size.height,r.profile=g.profile_string,r.level=g.level_string,r.bitDepth=g.bit_depth,r.chromaFormat=g.chroma_format,r.sarRatio=g.sar_ratio,r.frameRate=g.frame_rate,!1!==g.frame_rate.fixed&&0!==g.frame_rate.fps_num&&0!==g.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var y=r.frameRate.fps_den,b=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(y/b);for(var _=m.subarray(1,4),T="avc1.",S=0;S<3;S++){var w=_[S].toString(16);w.length<2&&(w="0"+w),T+=w}r.codec=T;var E=this._mediaInfo;E.width=r.codecWidth,E.height=r.codecHeight,E.fps=r.frameRate.fps,E.profile=r.profile,E.level=r.level,E.refFrames=g.ref_frames,E.chromaFormat=g.chroma_format_string,E.sarNum=r.sarRatio.width,E.sarDen=r.sarRatio.height,E.videoCodec=T,E.hasAudio?null!=E.audioCodec&&(E.mimeType='video/x-flv; codecs="'+E.videoCodec+","+E.audioCodec+'"'):E.mimeType='video/x-flv; codecs="'+E.videoCodec+'"',E.isComplete()&&this._onMediaInfo(E)}}}var k=u.getUint8(p);if(0!==k){k>1&&n.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+k),p++;for(f=0;f<k;f++){v=u.getUint16(p,!l);p+=2,0!==v&&(p+=v)}r.avcc=new Uint8Array(i),r.avcc.set(new Uint8Array(e,t,i),0),n.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(s.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},e.prototype._parseAVCVideoData=function(e,t,i,r,a,s,o){var l=this._littleEndian,u=new DataView(e,t,i),c=[],h=0,d=0,p=this._naluLengthSize,f=this._timestampBase+r,v=1===s;while(d<i){if(d+4>=i){n.default.w(this.TAG,"Malformed Nalu near timestamp "+f+", offset = "+d+", dataSize = "+i);break}var m=u.getUint32(d,!l);if(3===p&&(m>>>=8),m>i-p)return void n.default.w(this.TAG,"Malformed Nalus near timestamp "+f+", NaluSize > DataSize!");var g=31&u.getUint8(d+p);5===g&&(v=!0);var y=new Uint8Array(e,t+d,p+m),b={type:g,data:y};c.push(b),h+=y.byteLength,d+=p+m}if(c.length){var _=this._videoTrack,T={units:c,length:h,isKeyframe:v,dts:f,cts:o,pts:f+o};v&&(T.fileposition=a),_.samples.push(T),_.length+=h}},e}();t["default"]=c},"./src/demux/sps-parser.js":
/*!*********************************!*\
!*** ./src/demux/sps-parser.js ***!
\*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ./exp-golomb.js */"./src/demux/exp-golomb.js"),r=function(){function e(){}return e._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,a=0;a<i;a++)a>=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(n[r]=t[a],r++);return new Uint8Array(n.buffer,0,r)},e.parseSPS=function(t){var i=e._ebsp2rbsp(t),r=new n.default(i);r.readByte();var a=r.readByte();r.readByte();var s=r.readByte();r.readUEG();var o=e.getProfileString(a),l=e.getLevelString(s),u=1,c=420,h=[0,420,422,444],d=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(u=r.readUEG(),3===u&&r.readBits(1),u<=3&&(c=h[u]),d=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var p=3!==u?8:12,f=0;f<p;f++)r.readBool()&&(f<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var v=r.readUEG();if(0===v)r.readUEG();else if(1===v){r.readBits(1),r.readSEG(),r.readSEG();var m=r.readUEG();for(f=0;f<m;f++)r.readSEG()}var g=r.readUEG();r.readBits(1);var y=r.readUEG(),b=r.readUEG(),_=r.readBits(1);0===_&&r.readBits(1),r.readBits(1);var T=0,S=0,w=0,E=0,k=r.readBool();k&&(T=r.readUEG(),S=r.readUEG(),w=r.readUEG(),E=r.readUEG());var C=1,x=1,A=0,I=!0,O=0,j=0,L=r.readBool();if(L){if(r.readBool()){var P=r.readByte(),D=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],R=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];P>0&&P<16?(C=D[P-1],x=R[P-1]):255===P&&(C=r.readByte()<<8|r.readByte(),x=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var M=r.readBits(32),N=r.readBits(32);I=r.readBool(),O=N,j=2*M,A=O/j}}var B=1;1===C&&1===x||(B=C/x);var U=0,F=0;if(0===u)U=1,F=2-_;else{var V=3===u?1:2,H=1===u?2:1;U=V,F=H*(2-_)}var q=16*(y+1),z=16*(b+1)*(2-_);q-=(T+S)*U,z-=(w+E)*F;var G=Math.ceil(q*B);return r.destroy(),r=null,{profile_string:o,level_string:l,bit_depth:d,ref_frames:g,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:I,fps:A,fps_den:j,fps_num:O},sar_ratio:{width:C,height:x},codec_size:{width:q,height:z},present_size:{width:G,height:z}}},e._skipScalingList=function(e,t){for(var i=8,n=8,r=0,a=0;a<t;a++)0!==n&&(r=e.readSEG(),n=(i+r+256)%256),i=0===n?i:n},e.getProfileString=function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},e.getLevelString=function(e){return(e/10).toFixed(1)},e.getChromaFormatString=function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},e}();t["default"]=r},"./src/flv.js":
/*!********************!*\
!*** ./src/flv.js ***!
\********************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ./utils/polyfill.js */"./src/utils/polyfill.js"),r=i(/*! ./core/features.js */"./src/core/features.js"),a=i(/*! ./io/loader.js */"./src/io/loader.js"),s=i(/*! ./player/flv-player.js */"./src/player/flv-player.js"),o=i(/*! ./player/native-player.js */"./src/player/native-player.js"),l=i(/*! ./player/player-events.js */"./src/player/player-events.js"),u=i(/*! ./player/player-errors.js */"./src/player/player-errors.js"),c=i(/*! ./utils/logging-control.js */"./src/utils/logging-control.js"),h=i(/*! ./utils/exception.js */"./src/utils/exception.js");function d(e,t){var i=e;if(null==i||"object"!==typeof i)throw new h.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new h.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"flv":return new s.default(i,t);default:return new o.default(i,t)}}function p(){return r.default.supportMSEH264Playback()}function f(){return r.default.getFeatureList()}n.default.install();var v={};v.createPlayer=d,v.isSupported=p,v.getFeatureList=f,v.BaseLoader=a.BaseLoader,v.LoaderStatus=a.LoaderStatus,v.LoaderErrors=a.LoaderErrors,v.Events=l.default,v.ErrorTypes=u.ErrorTypes,v.ErrorDetails=u.ErrorDetails,v.FlvPlayer=s.default,v.NativePlayer=o.default,v.LoggingControl=c.default,Object.defineProperty(v,"version",{enumerable:!0,get:function(){return"1.6.2"}}),t["default"]=v},"./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/function(e,t,i){e.exports=i(/*! ./flv.js */"./src/flv.js").default},"./src/io/fetch-stream-loader.js":
/*!***************************************!*\
!*** ./src/io/fetch-stream-loader.js ***!
\***************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/browser.js */"./src/utils/browser.js"),r=i(/*! ./loader.js */"./src/io/loader.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js"),s=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=function(e){function t(t,i){var n=e.call(this,"fetch-stream-loader")||this;return n.TAG="FetchStreamLoader",n._seekHandler=t,n._config=i,n._needStash=!0,n._requestAbort=!1,n._contentLength=null,n._receivedLength=0,n}return s(t,e),t.isSupported=function(){try{var e=n.default.msedge&&n.default.version.minor>=15048,t=!n.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(i){return!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){var i=this;this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(n=e.redirectedURL);var s=this._seekHandler.getConfig(n,t),o=new self.Headers;if("object"===typeof s.headers){var l=s.headers;for(var u in l)l.hasOwnProperty(u)&&o.append(u,l[u])}var c={method:"GET",headers:o,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===typeof this._config.headers)for(var u in this._config.headers)o.append(u,this._config.headers[u]);!1===e.cors&&(c.mode="same-origin"),e.withCredentials&&(c.credentials="include"),e.referrerPolicy&&(c.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,c.signal=this._abortController.signal),this._status=r.LoaderStatus.kConnecting,self.fetch(s.url,c).then((function(e){if(i._requestAbort)return i._status=r.LoaderStatus.kIdle,void e.body.cancel();if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==s.url&&i._onURLRedirect){var t=i._seekHandler.removeURLParameters(e.url);i._onURLRedirect(t)}var n=e.headers.get("Content-Length");return null!=n&&(i._contentLength=parseInt(n),0!==i._contentLength&&i._onContentLengthKnown&&i._onContentLengthKnown(i._contentLength)),i._pump.call(i,e.body.getReader())}if(i._status=r.LoaderStatus.kError,!i._onError)throw new a.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);i._onError(r.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(!i._abortController||!i._abortController.signal.aborted){if(i._status=r.LoaderStatus.kError,!i._onError)throw e;i._onError(r.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}}))},t.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==r.LoaderStatus.kBuffering||!n.default.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},t.prototype._pump=function(e){var t=this;return e.read().then((function(i){if(i.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=r.LoaderStatus.kError;var n=r.LoaderErrors.EARLY_EOF,s={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new a.RuntimeException(s.msg);t._onError(n,s)}else t._status=r.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(t._abortController&&t._abortController.signal.aborted)return void(t._status=r.LoaderStatus.kComplete);if(!0===t._requestAbort)return t._status=r.LoaderStatus.kComplete,e.cancel();t._status=r.LoaderStatus.kBuffering;var o=i.value.buffer,l=t._range.from+t._receivedLength;t._receivedLength+=o.byteLength,t._onDataArrival&&t._onDataArrival(o,l,t._receivedLength),t._pump(e)}})).catch((function(e){if(t._abortController&&t._abortController.signal.aborted)t._status=r.LoaderStatus.kComplete;else if(11!==e.code||!n.default.msedge){t._status=r.LoaderStatus.kError;var i=0,s=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(i=r.LoaderErrors.EXCEPTION,s={code:e.code,msg:e.message}):(i=r.LoaderErrors.EARLY_EOF,s={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new a.RuntimeException(s.msg);t._onError(i,s)}}))},t}(r.BaseLoader);t["default"]=o},"./src/io/io-controller.js":
/*!*********************************!*\
!*** ./src/io/io-controller.js ***!
\*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),a=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ./fetch-stream-loader.js */"./src/io/fetch-stream-loader.js"),o=i(/*! ./xhr-moz-chunked-loader.js */"./src/io/xhr-moz-chunked-loader.js"),l=i(/*! ./xhr-range-loader.js */"./src/io/xhr-range-loader.js"),u=i(/*! ./websocket-loader.js */"./src/io/websocket-loader.js"),c=i(/*! ./range-seek-handler.js */"./src/io/range-seek-handler.js"),h=i(/*! ./param-seek-handler.js */"./src/io/param-seek-handler.js"),d=i(/*! ../utils/exception.js */"./src/utils/exception.js"),p=function(){function e(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,void 0!=t.stashInitialSize&&t.stashInitialSize>0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===t.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new r.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return e.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},e.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},e.prototype.isPaused=function(){return this._paused},Object.defineProperty(e.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentSpeed",{get:function(){return this._loaderClass===l.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),e.prototype._selectSeekHandler=function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new c.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new h.default(t,i)}else{if("custom"!==e.seekType)throw new d.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!==typeof e.customSeekHandler)throw new d.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}},e.prototype._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=u.default;else if(s.default.isSupported())this._loaderClass=s.default;else if(o.default.isSupported())this._loaderClass=o.default;else{if(!l.default.isSupported())throw new d.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=l.default}},e.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},e.prototype.open=function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},e.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},e.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},e.prototype.resume=function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}},e.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},e.prototype._internalSeek=function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var i={from:e,to:-1};this._currentRange={from:i.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,i),this._onSeeked&&this._onSeeked()},e.prototype.updateUrl=function(e){if(!e||"string"!==typeof e||0===e.length)throw new d.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e},e.prototype._expandBuffer=function(e){var t=this._stashSize;while(t+1048576<e)t*=2;if(t+=1048576,t!==this._bufferSize){var i=new ArrayBuffer(t);if(this._stashUsed>0){var n=new Uint8Array(this._stashBuffer,0,this._stashUsed),r=new Uint8Array(i,0,t);r.set(n,0)}this._stashBuffer=i,this._bufferSize=t}},e.prototype._normalizeSpeed=function(e){var t=this._speedNormalizeList,i=t.length-1,n=0,r=0,a=i;if(e<t[0])return t[0];while(r<=a){if(n=r+Math.floor((a-r)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:a=n-1}},e.prototype._adjustStashSize=function(e){var t=0;t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e,t>8192&&(t=8192);var i=1024*t+1048576;this._bufferSize<i&&this._expandBuffer(i),this._stashSize=1024*t},e.prototype._dispatchChunks=function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)},e.prototype._onURLRedirect=function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)},e.prototype._onContentLengthKnown=function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)},e.prototype._onLoaderChunkArrival=function(e,t,i){if(!this._onDataArrival)throw new d.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var n=this._speedSampler.lastSecondKBps;if(0!==n){var r=this._normalizeSpeed(n);this._speedNormalized!==r&&(this._speedNormalized=r,this._adjustStashSize(r))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){l=new Uint8Array(this._stashBuffer,0,this._stashSize);l.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{l=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var a=this._stashBuffer.slice(0,this._stashUsed);s=this._dispatchChunks(a,this._stashByteStart);if(s<a.byteLength){if(s>0){u=new Uint8Array(a,s);l.set(u,0),this._stashUsed=u.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),l=new Uint8Array(this._stashBuffer,0,this._bufferSize)),l.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{s=this._dispatchChunks(e,t);if(s<e.byteLength){o=e.byteLength-s;o>this._bufferSize&&(this._expandBuffer(o),l=new Uint8Array(this._stashBuffer,0,this._bufferSize)),l.set(new Uint8Array(e,s),0),this._stashUsed+=o,this._stashByteStart=t+s}}}else if(0===this._stashUsed){var s=this._dispatchChunks(e,t);if(s<e.byteLength){var o=e.byteLength-s;o>this._bufferSize&&this._expandBuffer(o);var l=new Uint8Array(this._stashBuffer,0,this._bufferSize);l.set(new Uint8Array(e,s),0),this._stashUsed+=o,this._stashByteStart=t+s}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var l=new Uint8Array(this._stashBuffer,0,this._bufferSize);l.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var s=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(s<this._stashUsed&&s>0){var u=new Uint8Array(this._stashBuffer,s);l.set(u,0)}this._stashUsed-=s,this._stashByteStart+=s}}},e.prototype._flushStashBuffer=function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-i;if(i<t.byteLength){if(!e){if(i>0){var a=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,i);a.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=i}return 0}n.default.w(this.TAG,r+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,r}return 0},e.prototype._onLoaderComplete=function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},e.prototype._onLoaderError=function(e,t){switch(n.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=a.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case a.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var i=this._currentRange.to+1;return void(i<this._totalLength&&(n.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(i,!1)))}e=a.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case a.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case a.LoaderErrors.CONNECTING_TIMEOUT:case a.LoaderErrors.HTTP_STATUS_CODE_INVALID:case a.LoaderErrors.EXCEPTION:break}if(!this._onError)throw new d.RuntimeException("IOException: "+t.msg);this._onError(e,t)},e}();t["default"]=p},"./src/io/loader.js":
/*!**************************!*\
!*** ./src/io/loader.js ***!
\**************************/function(e,t,i){"use strict";i.r(t),i.d(t,{LoaderStatus:function(){return r},LoaderErrors:function(){return a},BaseLoader:function(){return s}});var n=i(/*! ../utils/exception.js */"./src/utils/exception.js"),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},a={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},s=function(){function e(e){this._type=e||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return e.prototype.destroy=function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},e.prototype.isWorking=function(){return this._status===r.kConnecting||this._status===r.kBuffering},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),e.prototype.open=function(e,t){throw new n.NotImplementedException("Unimplemented abstract function!")},e.prototype.abort=function(){throw new n.NotImplementedException("Unimplemented abstract function!")},e}()},"./src/io/param-seek-handler.js":
/*!**************************************!*\
!*** ./src/io/param-seek-handler.js ***!
\**************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(e,t){this._startName=e,this._endName=t}return e.prototype.getConfig=function(e,t){var i=e;if(0!==t.from||-1!==t.to){var n=!0;-1===i.indexOf("?")&&(i+="?",n=!1),n&&(i+="&"),i+=this._startName+"="+t.from.toString(),-1!==t.to&&(i+="&"+this._endName+"="+t.to.toString())}return{url:i,headers:{}}},e.prototype.removeURLParameters=function(e){var t=e.split("?")[0],i=void 0,n=e.indexOf("?");-1!==n&&(i=e.substring(n+1));var r="";if(void 0!=i&&i.length>0)for(var a=i.split("&"),s=0;s<a.length;s++){var o=a[s].split("="),l=s>0;o[0]!==this._startName&&o[0]!==this._endName&&(l&&(r+="&"),r+=a[s])}return 0===r.length?t:t+"?"+r},e}();t["default"]=n},"./src/io/range-seek-handler.js":
/*!**************************************!*\
!*** ./src/io/range-seek-handler.js ***!
\**************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(e){this._zeroStart=e||!1}return e.prototype.getConfig=function(e,t){var i={};if(0!==t.from||-1!==t.to){var n=void 0;n=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",i["Range"]=n}else this._zeroStart&&(i["Range"]="bytes=0-");return{url:e,headers:i}},e.prototype.removeURLParameters=function(e){return e},e}();t["default"]=n},"./src/io/speed-sampler.js":
/*!*********************************!*\
!*** ./src/io/speed-sampler.js ***!
\*********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return e.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},e.prototype.addBytes=function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())},Object.defineProperty(e.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),e}();t["default"]=n},"./src/io/websocket-loader.js":
/*!************************************!*\
!*** ./src/io/websocket-loader.js ***!
\************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ./loader.js */"./src/io/loader.js"),r=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=function(e){function t(){var t=e.call(this,"websocket-loader")||this;return t.TAG="WebSocketLoader",t._needStash=!0,t._ws=null,t._requestAbort=!1,t._receivedLength=0,t}return a(t,e),t.isSupported=function(){try{return"undefined"!==typeof self.WebSocket}catch(e){return!1}},t.prototype.destroy=function(){this._ws&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=n.LoaderStatus.kConnecting}catch(a){this._status=n.LoaderStatus.kError;var i={code:a.code,msg:a.message};if(!this._onError)throw new r.RuntimeException(i.msg);this._onError(n.LoaderErrors.EXCEPTION,i)}},t.prototype.abort=function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=n.LoaderStatus.kComplete},t.prototype._onWebSocketOpen=function(e){this._status=n.LoaderStatus.kBuffering},t.prototype._onWebSocketClose=function(e){!0!==this._requestAbort?(this._status=n.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},t.prototype._onWebSocketMessage=function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var i=new FileReader;i.onload=function(){t._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(e.data)}else{this._status=n.LoaderStatus.kError;var a={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new r.RuntimeException(a.msg);this._onError(n.LoaderErrors.EXCEPTION,a)}},t.prototype._dispatchArrayBuffer=function(e){var t=e,i=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)},t.prototype._onWebSocketError=function(e){this._status=n.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new r.RuntimeException(t.msg);this._onError(n.LoaderErrors.EXCEPTION,t)},t}(n.BaseLoader);t["default"]=s},"./src/io/xhr-moz-chunked-loader.js":
/*!******************************************!*\
!*** ./src/io/xhr-moz-chunked-loader.js ***!
\******************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./loader.js */"./src/io/loader.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js"),s=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=function(e){function t(t,i){var n=e.call(this,"xhr-moz-chunked-loader")||this;return n.TAG="MozChunkedLoader",n._seekHandler=t,n._config=i,n._needStash=!0,n._xhr=null,n._requestAbort=!1,n._contentLength=null,n._receivedLength=0,n}return s(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(t){return n.default.w("MozChunkedLoader",t.message),!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);var n=this._seekHandler.getConfig(i,t);this._requestURL=n.url;var a=this._xhr=new XMLHttpRequest;if(a.open("GET",n.url,!0),a.responseType="moz-chunked-arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onloadend=this._onLoadEnd.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"===typeof n.headers){var s=n.headers;for(var o in s)s.hasOwnProperty(o)&&a.setRequestHeader(o,s[o])}if("object"===typeof this._config.headers){s=this._config.headers;for(var o in s)s.hasOwnProperty(o)&&a.setRequestHeader(o,s[o])}this._status=r.LoaderStatus.kConnecting,a.send()},t.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=r.LoaderStatus.kComplete},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var i=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(i)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=r.LoaderStatus.kError,!this._onError)throw new a.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(r.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=r.LoaderStatus.kBuffering}},t.prototype._onProgress=function(e){if(this._status!==r.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}},t.prototype._onLoadEnd=function(e){!0!==this._requestAbort?this._status!==r.LoaderStatus.kError&&(this._status=r.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},t.prototype._onXhrError=function(e){this._status=r.LoaderStatus.kError;var t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=r.LoaderErrors.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=r.LoaderErrors.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new a.RuntimeException(i.msg);this._onError(t,i)},t}(r.BaseLoader);t["default"]=o},"./src/io/xhr-range-loader.js":
/*!************************************!*\
!*** ./src/io/xhr-range-loader.js ***!
\************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),a=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),o=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),l=function(e){function t(t,i){var n=e.call(this,"xhr-range-loader")||this;return n.TAG="RangeLoader",n._seekHandler=t,n._config=i,n._needStash=!1,n._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],n._currentChunkSizeKB=384,n._currentSpeedNormalized=0,n._zeroSpeedChunkCount=0,n._xhr=null,n._speedSampler=new r.default,n._requestAbort=!1,n._waitForTotalLength=!1,n._totalLengthReceived=!1,n._currentRequestURL=null,n._currentRedirectedURL=null,n._currentRequestRange=null,n._totalLength=null,n._contentLength=null,n._receivedLength=0,n._lastTimeLoaded=0,n}return o(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(t){return n.default.w("RangeLoader",t.message),!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),t.prototype.open=function(e,t){this._dataSource=e,this._range=t,this._status=a.LoaderStatus.kConnecting;var i=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(i=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||i?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},t.prototype._openSubRange=function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,i=t+e;null!=this._contentLength&&i-this._range.from>=this._contentLength&&(i=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:i},this._internalOpen(this._dataSource,this._currentRequestRange)},t.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var i=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?i=this._currentRedirectedURL:void 0!=e.redirectedURL&&(i=e.redirectedURL));var n=this._seekHandler.getConfig(i,t);this._currentRequestURL=n.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"===typeof n.headers){var a=n.headers;for(var s in a)a.hasOwnProperty(s)&&r.setRequestHeader(s,a[s])}if("object"===typeof this._config.headers){a=this._config.headers;for(var s in a)a.hasOwnProperty(s)&&r.setRequestHeader(s,a[s])}r.send()},t.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=a.LoaderStatus.kComplete},t.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var i=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&i!==this._currentRedirectedURL&&(this._currentRedirectedURL=i,this._onURLRedirect&&this._onURLRedirect(i))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=a.LoaderStatus.kBuffering}else{if(this._status=a.LoaderStatus.kError,!this._onError)throw new s.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(a.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}},t.prototype._onProgress=function(e){if(this._status!==a.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var i=e.total;this._internalAbort(),null!=i&0!==i&&(this._totalLength=i)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var n=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(n)}},t.prototype._normalizeSpeed=function(e){var t=this._chunkSizeKBList,i=t.length-1,n=0,r=0,a=i;if(e<t[0])return t[0];while(r<=a){if(n=r+Math.floor((a-r)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:a=n-1}},t.prototype._onLoad=function(e){if(this._status!==a.LoaderStatus.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){var i=this._normalizeSpeed(t);this._currentSpeedNormalized!==i&&(this._currentSpeedNormalized=i,this._currentChunkSizeKB=i)}var n=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=n.byteLength;var s=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():s=!0,this._onDataArrival&&this._onDataArrival(n,r,this._receivedLength),s&&(this._status=a.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},t.prototype._onXhrError=function(e){this._status=a.LoaderStatus.kError;var t=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=a.LoaderErrors.EARLY_EOF,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=a.LoaderErrors.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new s.RuntimeException(i.msg);this._onError(t,i)},t}(a.BaseLoader);t["default"]=l},"./src/player/flv-player.js":
/*!**********************************!*\
!*** ./src/player/flv-player.js ***!
\**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ./player-events.js */"./src/player/player-events.js"),l=i(/*! ../core/transmuxer.js */"./src/core/transmuxer.js"),u=i(/*! ../core/transmuxing-events.js */"./src/core/transmuxing-events.js"),c=i(/*! ../core/mse-controller.js */"./src/core/mse-controller.js"),h=i(/*! ../core/mse-events.js */"./src/core/mse-events.js"),d=i(/*! ./player-errors.js */"./src/player/player-errors.js"),p=i(/*! ../config.js */"./src/config.js"),f=i(/*! ../utils/exception.js */"./src/utils/exception.js"),v=function(){function e(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(r()),this._config=(0,p.createDefaultConfig)(),"object"===typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new f.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=s.default.chrome&&(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661);this._alwaysSeekKeyframe=!!(i||s.default.msedge||s.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return e.prototype.destroy=function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){var i=this;e===o.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){i._emitter.emit(o.default.MEDIA_INFO,i.mediaInfo)})):e===o.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){i._emitter.emit(o.default.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new c.default(this._config),this._msectl.on(h.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(h.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(h.default.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(h.default.ERROR,(function(e){t._emitter.emit(o.default.ERROR,d.ErrorTypes.MEDIA_ERROR,d.ErrorDetails.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(i){}},e.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},e.prototype.load=function(){var e=this;if(!this._mediaElement)throw new f.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new f.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new l.default(this._mediaDataSource,this._config),this._transmuxer.on(u.default.INIT_SEGMENT,(function(t,i){e._msectl.appendInitSegment(i)})),this._transmuxer.on(u.default.MEDIA_SEGMENT,(function(t,i){if(e._msectl.appendMediaSegment(i),e._config.lazyLoad&&!e._config.isLive){var n=e._mediaElement.currentTime;i.info.endDts>=1e3*(n+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(a.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(u.default.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(o.default.LOADING_COMPLETE)})),this._transmuxer.on(u.default.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(o.default.RECOVERED_EARLY_EOF)})),this._transmuxer.on(u.default.IO_ERROR,(function(t,i){e._emitter.emit(o.default.ERROR,d.ErrorTypes.NETWORK_ERROR,t,i)})),this._transmuxer.on(u.default.DEMUX_ERROR,(function(t,i){e._emitter.emit(o.default.ERROR,d.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:i})})),this._transmuxer.on(u.default.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(o.default.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(u.default.METADATA_ARRIVED,(function(t){e._emitter.emit(o.default.METADATA_ARRIVED,t)})),this._transmuxer.on(u.default.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(o.default.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(u.default.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(o.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(u.default.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))},e.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),e.prototype._fillStatisticsInfo=function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();i=r.totalVideoFrames,n=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e},e.prototype._onmseUpdateEnd=function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,i=0,n=0;n<e.length;n++){var r=e.start(n),s=e.end(n);if(r<=t&&t<s){r,i=s;break}}i>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(a.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},e.prototype._onmseBufferFull=function(){a.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},e.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},e.prototype._checkProgressAndResume=function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,i=!1,n=0;n<t.length;n++){var r=t.start(n),s=t.end(n);if(e>=r&&e<s){e>=s-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(a.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},e.prototype._isTimepointBuffered=function(e){for(var t=this._mediaElement.buffered,i=0;i<t.length;i++){var n=t.start(i),r=t.end(i);if(e>=n&&e<r)return!0}return!1},e.prototype._internalSeek=function(e){var t=this._isTimepointBuffered(e),i=!1,n=0;if(e<1&&this._mediaElement.buffered.length>0){var r=this._mediaElement.buffered.start(0);(r<1&&e<r||s.default.safari)&&(i=!0,n=s.default.safari?.1:r)}if(i)this._requestSetTime=!0,this._mediaElement.currentTime=n;else if(t){if(this._alwaysSeekKeyframe){var a=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=a?a.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)},e.prototype._checkAndApplyUnbufferedSeekpoint=function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},e.prototype._checkAndResumeStuckPlayback=function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var i=t.buffered;i.length>0&&t.currentTime<i.start(0)&&(a.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+i.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=i.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)},e.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},e.prototype._onvSeeking=function(e){var t=this._mediaElement.currentTime,i=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&i.length>0){var n=i.start(0);if(n<1&&t<n||s.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=s.default.safari?.1:n)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var r=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=r&&(this._requestSetTime=!0,this._mediaElement.currentTime=r.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},e.prototype._onvCanPlay=function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},e.prototype._onvStalled=function(e){this._checkAndResumeStuckPlayback(!0)},e.prototype._onvProgress=function(e){this._checkAndResumeStuckPlayback()},e}();t["default"]=v},"./src/player/native-player.js":
/*!*************************************!*\
!*** ./src/player/native-player.js ***!
\*************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ./player-events.js */"./src/player/player-events.js"),s=i(/*! ../config.js */"./src/config.js"),o=i(/*! ../utils/exception.js */"./src/utils/exception.js"),l=function(){function e(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(r()),this._config=(0,s.createDefaultConfig)(),"object"===typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new o.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new o.InvalidArgumentException("NativePlayer("+e.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}return e.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){var i=this;e===a.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(a.default.MEDIA_INFO,i.mediaInfo)})):e===a.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(a.default.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}},e.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.load=function(){if(!this._mediaElement)throw new o.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},e.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){var e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();i=r.totalVideoFrames,n=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e},enumerable:!1,configurable:!0}),e.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(a.default.MEDIA_INFO,this.mediaInfo)},e.prototype._reportStatisticsInfo=function(){this._emitter.emit(a.default.STATISTICS_INFO,this.statisticsInfo)},e}();t["default"]=l},"./src/player/player-errors.js":
/*!*************************************!*\
!*** ./src/player/player-errors.js ***!
\*************************************/function(e,t,i){"use strict";i.r(t),i.d(t,{ErrorTypes:function(){return a},ErrorDetails:function(){return s}});var n=i(/*! ../io/loader.js */"./src/io/loader.js"),r=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),a={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},s={NETWORK_EXCEPTION:n.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:r.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:r.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:r.default.CODEC_UNSUPPORTED}},"./src/player/player-events.js":
/*!*************************************!*\
!*** ./src/player/player-events.js ***!
\*************************************/function(e,t,i){"use strict";i.r(t);var n={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};t["default"]=n},"./src/remux/aac-silent.js":
/*!*********************************!*\
!*** ./src/remux/aac-silent.js ***!
\*********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}();t["default"]=n},"./src/remux/mp4-generator.js":
/*!************************************!*\
!*** ./src/remux/mp4-generator.js ***!
\************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.init=function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var i=e.constants={};i.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),i.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),i.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),i.STSC=i.STCO=i.STTS,i.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),i.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),i.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),i.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},e.box=function(e){for(var t=8,i=null,n=Array.prototype.slice.call(arguments,1),r=n.length,a=0;a<r;a++)t+=n[a].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);var s=8;for(a=0;a<r;a++)i.set(n[a],s),s+=n[a].byteLength;return i},e.generateInitSegment=function(t){var i=e.box(e.types.ftyp,e.constants.FTYP),n=e.moov(t),r=new Uint8Array(i.byteLength+n.byteLength);return r.set(i,0),r.set(n,i.byteLength),r},e.moov=function(t){var i=e.mvhd(t.timescale,t.duration),n=e.trak(t),r=e.mvex(t);return e.box(e.types.moov,i,n,r)},e.mvhd=function(t,i){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},e.trak=function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.tkhd=function(t){var i=t.id,n=t.duration,r=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,a>>>8&255,255&a,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))},e.mdhd=function(t){var i=t.timescale,n=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))},e.hdlr=function(t){var i=null;return i="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,i)},e.minf=function(t){var i=null;return i="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,i,e.dinf(),e.stbl(t))},e.dinf=function(){var t=e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF));return t},e.stbl=function(t){var i=e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO));return i},e.stsd=function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))},e.mp3=function(t){var i=t.channelCount,n=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types[".mp3"],r)},e.mp4a=function(t){var i=t.channelCount,n=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types.mp4a,r,e.esds(t))},e.esds=function(t){var i=t.config||[],n=i.length,r=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(i).concat([6,1,2]));return e.box(e.types.esds,r)},e.avc1=function(t){var i=t.avcc,n=t.codecWidth,r=t.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,i))},e.mvex=function(t){return e.box(e.types.mvex,e.trex(t))},e.trex=function(t){var i=t.id,n=new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,n)},e.moof=function(t,i){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,i))},e.mfhd=function(t){var i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,i)},e.traf=function(t,i){var n=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=e.sdtp(t),o=e.trun(t,s.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,a,o,s)},e.sdtp=function(t){for(var i=t.samples||[],n=i.length,r=new Uint8Array(4+n),a=0;a<n;a++){var s=i[a].flags;r[a+4]=s.isLeading<<6|s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy}return e.box(e.types.sdtp,r)},e.trun=function(t,i){var n=t.samples||[],r=n.length,a=12+16*r,s=new Uint8Array(a);i+=8+a,s.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0);for(var o=0;o<r;o++){var l=n[o].duration,u=n[o].size,c=n[o].flags,h=n[o].cts;s.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,u>>>24&255,u>>>16&255,u>>>8&255,255&u,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o)}return e.box(e.types.trun,s)},e.mdat=function(t){return e.box(e.types.mdat,t)},e}();n.init(),t["default"]=n},"./src/remux/mp4-remuxer.js":
/*!**********************************!*\
!*** ./src/remux/mp4-remuxer.js ***!
\**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./mp4-generator.js */"./src/remux/mp4-generator.js"),a=i(/*! ./aac-silent.js */"./src/remux/aac-silent.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ../core/media-segment-info.js */"./src/core/media-segment-info.js"),l=i(/*! ../utils/exception.js */"./src/utils/exception.js"),u=function(){function e(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new o.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new o.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.default.chrome||!(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661)),this._fillSilentAfterSeek=s.default.msedge||s.default.msie,this._mp3UseMpegAudio=!s.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return e.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},e.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(e.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),e.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},e.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},e.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new l.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)},e.prototype._onTrackMetadataReceived=function(e,t){var i=null,n="mp4",a=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",a="",i=new Uint8Array):i=r.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=r.default.generateInitSegment(t)}if(!this._onInitSegment)throw new l.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:a,container:e+"/"+n,mediaDuration:t.duration})},e.prototype._calculateDtsBase=function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},e.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=e.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(n,!0)},e.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var i=e,l=i.samples,u=void 0,c=-1,h=-1,d=this._audioMeta.refSampleDuration,p="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,f=this._dtsBaseInited&&void 0===this._audioNextDts,v=!1;if(l&&0!==l.length&&(1!==l.length||t)){var m=0,g=null,y=0;p?(m=0,y=i.length):(m=8,y=8+i.length);var b=null;if(l.length>1&&(b=l.pop(),y-=b.length),null!=this._audioStashedLastSample){var _=this._audioStashedLastSample;this._audioStashedLastSample=null,l.unshift(_),y+=_.length}null!=b&&(this._audioStashedLastSample=b);var T=l[0].dts-this._dtsBase;if(this._audioNextDts)u=T-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())u=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(v=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(T);if(null!=S){var w=T-(S.originalDts+S.duration);w<=3&&(w=0);var E=S.dts+S.duration+w;u=T-E}else u=0}if(v){var k=T-u,C=this._videoSegmentInfoList.getLastSegmentBefore(T);if(null!=C&&C.beginDts<k){var x=a.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(x){var A=C.beginDts,I=k-C.beginDts;n.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+A+", duration: "+I),l.unshift({unit:x,dts:A,pts:A}),y+=x.byteLength}}else v=!1}for(var O=[],j=0;j<l.length;j++){_=l[j];var L=_.unit,P=_.dts-this._dtsBase,D=(A=P,!1),R=null,M=0;if(!(P<-.001)){if("mp3"!==this._audioMeta.codec){var N=P,B=3;if(this._audioNextDts&&(N=this._audioNextDts),u=P-N,u<=-B*d){n.default.w(this.TAG,"Dropping 1 audio frame (originalDts: "+P+" ms ,curRefDts: "+N+" ms) due to dtsCorrection: "+u+" ms overlap.");continue}if(u>=B*d&&this._fillAudioTimestampGap&&!s.default.safari){D=!0;var U=Math.floor(u/d);n.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+P+" ms, curRefDts: "+N+" ms, dtsCorrection: "+Math.round(u)+" ms, generate: "+U+" frames"),A=Math.floor(N),M=Math.floor(N+d)-A;x=a.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==x&&(n.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),x=L),R=[];for(var F=0;F<U;F++){N+=d;var V=Math.floor(N),H=Math.floor(N+d)-V,q={dts:V,pts:V,cts:0,unit:x,size:x.byteLength,duration:H,originalDts:P,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};R.push(q),y+=q.size}this._audioNextDts=N+d}else A=Math.floor(N),M=Math.floor(N+d)-A,this._audioNextDts=N+d}else{if(A=P-u,j!==l.length-1){var z=l[j+1].dts-this._dtsBase-u;M=z-A}else if(null!=b){z=b.dts-this._dtsBase-u;M=z-A}else M=O.length>=1?O[O.length-1].duration:Math.floor(d);this._audioNextDts=A+M}-1===c&&(c=A),O.push({dts:A,pts:A,cts:0,unit:_.unit,size:_.unit.byteLength,duration:M,originalDts:P,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),D&&O.push.apply(O,R)}}if(0===O.length)return i.samples=[],void(i.length=0);p?g=new Uint8Array(y):(g=new Uint8Array(y),g[0]=y>>>24&255,g[1]=y>>>16&255,g[2]=y>>>8&255,g[3]=255&y,g.set(r.default.types.mdat,4));for(j=0;j<O.length;j++){L=O[j].unit;g.set(L,m),m+=L.byteLength}var G=O[O.length-1];h=G.dts+G.duration;var W=new o.MediaSegmentInfo;W.beginDts=c,W.endDts=h,W.beginPts=c,W.endPts=h,W.originalBeginDts=O[0].originalDts,W.originalEndDts=G.originalDts+G.duration,W.firstSample=new o.SampleInfo(O[0].dts,O[0].pts,O[0].duration,O[0].originalDts,!1),W.lastSample=new o.SampleInfo(G.dts,G.pts,G.duration,G.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(W),i.samples=O,i.sequenceNumber++;var $=null;$=p?new Uint8Array:r.default.moof(i,c),i.samples=[],i.length=0;var X={type:"audio",data:this._mergeBoxes($,g).buffer,sampleCount:O.length,info:W};p&&f&&(X.timestampOffset=c),this._onMediaSegment("audio",X)}}},e.prototype._remuxVideo=function(e,t){if(null!=this._videoMeta){var i=e,n=i.samples,a=void 0,s=-1,l=-1,u=-1,c=-1;if(n&&0!==n.length&&(1!==n.length||t)){var h=8,d=null,p=8+e.length,f=null;if(n.length>1&&(f=n.pop(),p-=f.length),null!=this._videoStashedLastSample){var v=this._videoStashedLastSample;this._videoStashedLastSample=null,n.unshift(v),p+=v.length}null!=f&&(this._videoStashedLastSample=f);var m=n[0].dts-this._dtsBase;if(this._videoNextDts)a=m-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())a=0;else{var g=this._videoSegmentInfoList.getLastSampleBefore(m);if(null!=g){var y=m-(g.originalDts+g.duration);y<=3&&(y=0);var b=g.dts+g.duration+y;a=m-b}else a=0}for(var _=new o.MediaSegmentInfo,T=[],S=0;S<n.length;S++){v=n[S];var w=v.dts-this._dtsBase,E=v.isKeyframe,k=w-a,C=v.cts,x=k+C;-1===s&&(s=k,u=x);var A=0;if(S!==n.length-1){var I=n[S+1].dts-this._dtsBase-a;A=I-k}else if(null!=f){I=f.dts-this._dtsBase-a;A=I-k}else A=T.length>=1?T[T.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(E){var O=new o.SampleInfo(k,x,A,v.dts,!0);O.fileposition=v.fileposition,_.appendSyncPoint(O)}T.push({dts:k,pts:x,cts:C,units:v.units,size:v.length,isKeyframe:E,duration:A,originalDts:w,flags:{isLeading:0,dependsOn:E?2:1,isDependedOn:E?1:0,hasRedundancy:0,isNonSync:E?0:1}})}d=new Uint8Array(p),d[0]=p>>>24&255,d[1]=p>>>16&255,d[2]=p>>>8&255,d[3]=255&p,d.set(r.default.types.mdat,4);for(S=0;S<T.length;S++){var j=T[S].units;while(j.length){var L=j.shift(),P=L.data;d.set(P,h),h+=P.byteLength}}var D=T[T.length-1];if(l=D.dts+D.duration,c=D.pts+D.duration,this._videoNextDts=l,_.beginDts=s,_.endDts=l,_.beginPts=u,_.endPts=c,_.originalBeginDts=T[0].originalDts,_.originalEndDts=D.originalDts+D.duration,_.firstSample=new o.SampleInfo(T[0].dts,T[0].pts,T[0].duration,T[0].originalDts,T[0].isKeyframe),_.lastSample=new o.SampleInfo(D.dts,D.pts,D.duration,D.originalDts,D.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_),i.samples=T,i.sequenceNumber++,this._forceFirstIDR){var R=T[0].flags;R.dependsOn=2,R.isNonSync=0}var M=r.default.moof(i,s);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(M,d).buffer,sampleCount:T.length,info:_})}}},e.prototype._mergeBoxes=function(e,t){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i},e}();t["default"]=u},"./src/utils/browser.js":
/*!******************************!*\
!*** ./src/utils/browser.js ***!
\******************************/function(e,t,i){"use strict";i.r(t);var n={};function r(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||""},a={};if(r.browser){a[r.browser]=!0;var s=r.majorVersion.split(".");a.version={major:parseInt(r.majorVersion,10),string:r.version},s.length>1&&(a.version.minor=parseInt(s[1],10)),s.length>2&&(a.version.build=parseInt(s[2],10))}if(r.platform&&(a[r.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),a.rv||a.iemobile){a.rv&&delete a.rv;var o="msie";r.browser=o,a[o]=!0}if(a.edge){delete a.edge;var l="msedge";r.browser=l,a[l]=!0}if(a.opr){var u="opera";r.browser=u,a[u]=!0}if(a.safari&&a.android){var c="android";r.browser=c,a[c]=!0}for(var h in a.name=r.browser,a.platform=r.platform,n)n.hasOwnProperty(h)&&delete n[h];Object.assign(n,a)}r(),t["default"]=n},"./src/utils/exception.js":
/*!********************************!*\
!*** ./src/utils/exception.js ***!
\********************************/function(e,t,i){"use strict";i.r(t),i.d(t,{RuntimeException:function(){return r},IllegalStateException:function(){return a},InvalidArgumentException:function(){return s},NotImplementedException:function(){return o}});var n=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=function(){function e(e){this._message=e}return Object.defineProperty(e.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.name+": "+this.message},e}(),a=function(e){function t(t){return e.call(this,t)||this}return n(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),t}(r),s=function(e){function t(t){return e.call(this,t)||this}return n(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),t}(r),o=function(e){function t(t){return e.call(this,t)||this}return n(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),t}(r)},"./src/utils/logger.js":
/*!*****************************!*\
!*** ./src/utils/logger.js ***!
\*****************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=function(){function e(){}return e.e=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",n),e.ENABLE_ERROR&&(console.error?console.error(n):console.warn?console.warn(n):console.log(n))},e.i=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",n),e.ENABLE_INFO&&(console.info?console.info(n):console.log(n))},e.w=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",n),e.ENABLE_WARN&&(console.warn?console.warn(n):console.log(n))},e.d=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",n),e.ENABLE_DEBUG&&(console.debug?console.debug(n):console.log(n))},e.v=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",n),e.ENABLE_VERBOSE&&console.log(n)},e}();a.GLOBAL_TAG="flv.js",a.FORCE_GLOBAL_TAG=!1,a.ENABLE_ERROR=!0,a.ENABLE_INFO=!0,a.ENABLE_WARN=!0,a.ENABLE_DEBUG=!0,a.ENABLE_VERBOSE=!0,a.ENABLE_CALLBACK=!1,a.emitter=new(r()),t["default"]=a},"./src/utils/logging-control.js":
/*!**************************************!*\
!*** ./src/utils/logging-control.js ***!
\**************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),a=i(/*! ./logger.js */"./src/utils/logger.js"),s=function(){function e(){}return Object.defineProperty(e,"forceGlobalTag",{get:function(){return a.default.FORCE_GLOBAL_TAG},set:function(t){a.default.FORCE_GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"globalTag",{get:function(){return a.default.GLOBAL_TAG},set:function(t){a.default.GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableAll",{get:function(){return a.default.ENABLE_VERBOSE&&a.default.ENABLE_DEBUG&&a.default.ENABLE_INFO&&a.default.ENABLE_WARN&&a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_VERBOSE=t,a.default.ENABLE_DEBUG=t,a.default.ENABLE_INFO=t,a.default.ENABLE_WARN=t,a.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableDebug",{get:function(){return a.default.ENABLE_DEBUG},set:function(t){a.default.ENABLE_DEBUG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableVerbose",{get:function(){return a.default.ENABLE_VERBOSE},set:function(t){a.default.ENABLE_VERBOSE=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableInfo",{get:function(){return a.default.ENABLE_INFO},set:function(t){a.default.ENABLE_INFO=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableWarn",{get:function(){return a.default.ENABLE_WARN},set:function(t){a.default.ENABLE_WARN=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableError",{get:function(){return a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),e.getConfig=function(){return{globalTag:a.default.GLOBAL_TAG,forceGlobalTag:a.default.FORCE_GLOBAL_TAG,enableVerbose:a.default.ENABLE_VERBOSE,enableDebug:a.default.ENABLE_DEBUG,enableInfo:a.default.ENABLE_INFO,enableWarn:a.default.ENABLE_WARN,enableError:a.default.ENABLE_ERROR,enableCallback:a.default.ENABLE_CALLBACK}},e.applyConfig=function(e){a.default.GLOBAL_TAG=e.globalTag,a.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,a.default.ENABLE_VERBOSE=e.enableVerbose,a.default.ENABLE_DEBUG=e.enableDebug,a.default.ENABLE_INFO=e.enableInfo,a.default.ENABLE_WARN=e.enableWarn,a.default.ENABLE_ERROR=e.enableError,a.default.ENABLE_CALLBACK=e.enableCallback},e._notifyChange=function(){var t=e.emitter;if(t.listenerCount("change")>0){var i=e.getConfig();t.emit("change",i)}},e.registerListener=function(t){e.emitter.addListener("change",t)},e.removeListener=function(t){e.emitter.removeListener("change",t)},e.addLogListener=function(t){a.default.emitter.addListener("log",t),a.default.emitter.listenerCount("log")>0&&(a.default.ENABLE_CALLBACK=!0,e._notifyChange())},e.removeLogListener=function(t){a.default.emitter.removeListener("log",t),0===a.default.emitter.listenerCount("log")&&(a.default.ENABLE_CALLBACK=!1,e._notifyChange())},e}();s.emitter=new(r()),t["default"]=s},"./src/utils/polyfill.js":
/*!*******************************!*\
!*** ./src/utils/polyfill.js ***!
\*******************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(void 0!==n&&null!==n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t},"function"!==typeof self.Promise&&i(/*! es6-promise */"./node_modules/es6-promise/dist/es6-promise.js").polyfill()},e}();n.install(),t["default"]=n},"./src/utils/utf8-conv.js":
/*!********************************!*\
!*** ./src/utils/utf8-conv.js ***!
\********************************/function(e,t,i){"use strict";function n(e,t,i){var n=e;if(t+i<n.length){while(i--)if(128!==(192&n[++t]))return!1;return!0}return!1}function r(e){var t=[],i=e,r=0,a=e.length;while(r<a)if(i[r]<128)t.push(String.fromCharCode(i[r])),++r;else{if(i[r]<192);else if(i[r]<224){if(n(i,r,1)){var s=(31&i[r])<<6|63&i[r+1];if(s>=128){t.push(String.fromCharCode(65535&s)),r+=2;continue}}}else if(i[r]<240){if(n(i,r,2)){s=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2];if(s>=2048&&55296!==(63488&s)){t.push(String.fromCharCode(65535&s)),r+=3;continue}}}else if(i[r]<248&&n(i,r,3)){s=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}i.r(t),t["default"]=r}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var a=i[t]={exports:{}};return e[t].call(a.exports,a,a.exports,n),a.exports}n.m=e,function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var r=n("./src/index.js");return r}()}))}).call(this,i("4362"))},fc85:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(){r(this,e),this.listeners={}}return n(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),i>-1}},{key:"trigger",value:function(e){var t=this.listeners[e],i=void 0,n=void 0,r=void 0;if(t)if(2===arguments.length)for(n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),n=t.length,i=0;i<n;++i)t[i].apply(this,r)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(e){this.on("data",(function(t){e.push(t)}))}}]),e}();t["default"]=a},fd9b:function(e,t,i){var n=i("5316");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("63eba517",n,!0,{sourceMap:!1,shadowMode:!1})},fda2:function(e,t,i){var n=i("9b40");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=i("4f06").default;r("4e62413c",n,!0,{sourceMap:!1,shadowMode:!1})},ffdf:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return s}));var n=i("be09"),r=i.n(n),a=function(t){return r.a.atob?r.a.atob(t):e.from(t,"base64").toString("binary")};function s(e){for(var t=a(e),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i}}).call(this,i("b639").Buffer)}}]);