hls-player
Version:
A hls video player component for Vue.js
4 lines • 595 kB
JavaScript
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["hls-player"]=t():e["hls-player"]=t()})("undefined"!==typeof self?self:this,(function(){return 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,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return 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="fb15")}({0:function(e,t){},"00ee":function(e,t,i){var n=i("b622"),r=n("toStringTag"),a={};a[r]="z",e.exports="[object z]"===String(a)},"0366":function(e,t,i){var n=i("1c0b");e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,r){return e.call(t,i,n,r)}}return function(){return e.apply(t,arguments)}}},"045f":function(e,t,i){"use strict";var n=i("d7d2"),r=i("a559"),a=i("8362"),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 u(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function l(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=l(e,t,i),d(t)}function d(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===f.readyState&&setTimeout(o,0)}function r(){var e=void 0;if(e=f.response?f.response:f.responseText||h(f),b)try{e=JSON.parse(e)}catch(t){}return e}function a(e){return clearTimeout(p),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!d){var t;clearTimeout(p),t=e.useXDR&&void 0===f.status?200:1223===f.status?204:f.status;var n=T,a=null;return 0!==t?(n={body:r(),statusCode:t,method:g,headers:{},url:m,rawRequest:f},f.getAllResponseHeaders&&(n.headers=s(f.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),i(a,n,n.body)}}var l,d,f=e.xhr||null;f||(f=e.cors||e.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var p,m=f.url=e.uri||e.url,g=f.method=e.method||"GET",v=e.body||e.data,y=f.headers=e.headers||{},_=!!e.sync,b=!1,T={body:void 0,headers:{},statusCode:0,method:g,url:m,rawRequest:f};if("json"in e&&!1!==e.json&&(b=!0,y["accept"]||y["Accept"]||(y["Accept"]="application/json"),"GET"!==g&&"HEAD"!==g&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),v=JSON.stringify(!0===e.json?v:e.json))),f.onreadystatechange=n,f.onload=o,f.onerror=a,f.onprogress=function(){},f.onabort=function(){d=!0},f.ontimeout=a,f.open(g,m,!_,e.username,e.password),_||(f.withCredentials=!!e.withCredentials),!_&&e.timeout>0&&(p=setTimeout((function(){if(!d){d=!0,f.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),f.setRequestHeader)for(l in y)y.hasOwnProperty(l)&&f.setRequestHeader(l,y[l]);else if(e.headers&&!u(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(f.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(f),f.send(v||null),f}function h(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 f(){}e.exports=c,e.exports.default=c,c.XMLHttpRequest=n.XMLHttpRequest||f,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=l(t,i,n),i.method=e.toUpperCase(),d(i)}}))},"0538":function(e,t,i){"use strict";var n=i("1c0b"),r=i("861d"),a=[].slice,s={},o=function(e,t,i){if(!(t in s)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";s[t]=Function("C,a","return new C("+n.join(",")+")")}return s[t](e,i)};e.exports=Function.bind||function(e){var t=n(this),i=a.call(arguments,1),s=function(){var n=i.concat(a.call(arguments));return this instanceof s?o(t,n.length,n):t.apply(e,n)};return r(t.prototype)&&(s.prototype=t.prototype),s}},"057f":function(e,t,i){var n=i("fc6a"),r=i("241c").f,a={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return r(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==a.call(e)?o(e):r(n(e))}},"06cf":function(e,t,i){var n=i("83ab"),r=i("d1e7"),a=i("5c6c"),s=i("fc6a"),o=i("c04e"),u=i("5135"),l=i("0cfb"),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(e,t){if(e=s(e),t=o(t,!0),l)try{return c(e,t)}catch(i){}if(u(e,t))return a(!r.f.call(e,t),e[t])}},"0821":function(e,t,i){"use strict";
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */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}();e.exports=n},"0cfb":function(e,t,i){var n=i("83ab"),r=i("d039"),a=i("cc12");e.exports=!n&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"159b":function(e,t,i){var n=i("da84"),r=i("fdbc"),a=i("17c2"),s=i("9112");for(var o in r){var u=n[o],l=u&&u.prototype;if(l&&l.forEach!==a)try{s(l,"forEach",a)}catch(c){l.forEach=a}}},"15f9":function(e,t,i){var n=i("7fe1").toUnsigned,r=i("8eff"),a=function(e,t){var i,s,o,u,l,c=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=n(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),o=r(e.subarray(i+4,i+8)),u=s>1?i+s:e.byteLength,o===t[0]&&(1===t.length?c.push(e.subarray(i+8,u)):(l=a(e.subarray(i+8,u),t.slice(1)),l.length&&(c=c.concat(l)))),i=u;return c};e.exports=a},"17c2":function(e,t,i){"use strict";var n=i("b727").forEach,r=i("a640"),a=i("ae40"),s=r("forEach"),o=a("forEach");e.exports=s&&o?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},"1be4":function(e,t,i){var n=i("d066");e.exports=n("document","documentElement")},"1c0b":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"1d80":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"1dde":function(e,t,i){var n=i("d039"),r=i("b622"),a=i("2d00"),s=r("species");e.exports=function(e){return a>=51||!n((function(){var t=[],i=t.constructor={};return i[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},"1fb5":function(e,t,i){"use strict";t.byteLength=c,t.toByteArray=h,t.fromByteArray=m;for(var n=[],r=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function l(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=l(e),i=t[0],n=t[1];return 3*(i+n)/4-n}function d(e,t,i){return 3*(t+i)/4-i}function h(e){var t,i,n=l(e),s=n[0],o=n[1],u=new a(d(e,s,o)),c=0,h=o>0?s-4:s;for(i=0;i<h;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)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,u[c++]=255&t),1===o&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u}function f(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function p(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(f(n));return r.join("")}function m(e){for(var t,i=e.length,r=i%3,a=[],s=16383,o=0,u=i-r;o<u;o+=s)a.push(p(e,o,o+s>u?u: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},"23cb":function(e,t,i){var n=i("a691"),r=Math.max,a=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):a(i,t)}},"23e7":function(e,t,i){var n=i("da84"),r=i("06cf").f,a=i("9112"),s=i("6eeb"),o=i("ce4e"),u=i("e893"),l=i("94ca");e.exports=function(e,t){var i,c,d,h,f,p,m=e.target,g=e.global,v=e.stat;if(c=g?n:v?n[m]||o(m,{}):(n[m]||{}).prototype,c)for(d in t){if(f=t[d],e.noTargetGet?(p=r(c,d),h=p&&p.value):h=c[d],i=l(g?d:m+(v?".":"#")+d,e.forced),!i&&void 0!==h){if(typeof f===typeof h)continue;u(f,h)}(e.sham||h&&h.sham)&&a(f,"sham",!0),s(c,d,f,e)}}},"241c":function(e,t,i){var n=i("ca84"),r=i("7839"),a=r.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},"256f":function(e,t,i){"use strict";var n=i("4329"),r=8589934592,a=4294967296,s="shared",o=function(e,t){var i=1;e>t&&(i=-1);while(Math.abs(t-e)>a)e+=i*r;return e},u=function(e){var t,i;u.prototype.init.call(this),this.type_=e||s,this.push=function(e){this.type_!==s&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=o(e.dts,i),e.pts=o(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")}};u.prototype=new n,e.exports={TimestampRolloverStream:u,handleRollover:o}},"25f0":function(e,t,i){"use strict";var n=i("6eeb"),r=i("825a"),a=i("d039"),s=i("ad6d"),o="toString",u=RegExp.prototype,l=u[o],c=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d=l.name!=o;(c||d)&&n(RegExp.prototype,o,(function(){var e=r(this),t=String(e.source),i=e.flags,n=String(void 0===i&&e instanceof RegExp&&!("flags"in u)?s.call(e):i);return"/"+t+"/"+n}),{unsafe:!0})},2806:function(e,t,i){"use strict";var n,r,a,s,o,u,l=i("7fe1").toUnsigned,c=i("7fe1").toHexString,d=i("15f9"),h=i("8eff"),f=i("caac"),p=i("8a2d"),m=i("dbdc");n=function(e){var t={},i=d(e,["moov","trak"]);return i.reduce((function(e,t){var i,n,r,a,s;return i=d(t,["tkhd"])[0],i?(n=i[0],r=0===n?12:20,a=l(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),s=d(t,["mdia","mdhd"])[0],s?(n=s[0],r=0===n?12:20,e[a]=l(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),e):null):null}),t)},r=function(e,t){var i,n,r;return i=d(t,["moof","traf"]),n=[].concat.apply([],i.map((function(t){return d(t,["tfhd"]).map((function(i){var n,r,a;return n=l(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),r=e[n]||9e4,a=d(t,["tfdt"]).map((function(e){var t,i;return t=e[0],i=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(i*=Math.pow(2,32),i+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i}))[0],a=a||1/0,a/r}))}))),r=Math.min.apply(null,n),isFinite(r)?r:0},a=function(e,t){var i,n=d(t,["moof","traf"]),r=0,a=0;if(n&&n.length){var s=d(n[0],["tfhd"])[0],o=d(n[0],["trun"])[0],u=d(n[0],["tfdt"])[0];if(s){var l=f(s);i=l.trackId}if(u){var c=m(u);r=c.baseMediaDecodeTime}if(o){var h=p(o);h.samples&&h.samples.length&&(a=h.samples[0].compositionTimeOffset||0)}}var g=e[i]||9e4;return(r+a)/g},s=function(e){var t=d(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=d(e,["mdia","hdlr"]),n=d(e,["tkhd"]);t.forEach((function(e,t){var r,a,s,o=h(e.subarray(8,12)),u=n[t];"vide"===o&&(r=new DataView(u.buffer,u.byteOffset,u.byteLength),a=r.getUint8(0),s=0===a?r.getUint32(12):r.getUint32(20),i.push(s))}))})),i},u=function(e){var t=e[0],i=0===t?12:20;return l(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])},o=function(e){var t=d(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,r={},a=d(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=d(e,["mdia","hdlr"])[0];if(s){var o=h(s.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=d(e,["mdia","minf","stbl","stsd"])[0];if(l){var f=l.subarray(8);r.codec=h(f.subarray(4,8));var p,m,g=d(f,[r.codec])[0];g&&(/^[a-z]vc[1-9]$/i.test(r.codec)?(p=g.subarray(78),m=h(p.subarray(4,8)),"avcC"===m&&p.length>11?(r.codec+=".",r.codec+=c(p[9]),r.codec+=c(p[10]),r.codec+=c(p[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)&&(p=g.subarray(28),m=h(p.subarray(4,8)),"esds"===m&&p.length>20&&0!==p[19]?(r.codec+="."+c(p[19]),r.codec+="."+c(p[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"))}var v=d(e,["mdia","mdhd"])[0];v&&(r.timescale=u(v)),i.push(r)})),i},e.exports={findBox:d,parseType:h,timescale:n,startTime:r,compositionStartTime:a,videoTrackIds:s,tracks:o,getTimescaleFromMediaHeader:u}},"28de":function(e,t,i){"use strict";
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function n(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}Object.defineProperty(t,"__esModule",{value:!0});var r=n(i("be09")),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)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},s=["video","audio","text"],o=["Video","Audio","Text"],u=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},l=function(e){return e.map(u)},c=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return l([e])[0]}))},d=function(e){void 0===e&&(e="");var t=e.split(","),i={},n=[];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[n]={type:s,details:o}}})),t||n.push(e)})),n.length&&(i.unknown=n),i},h=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 d(r.playlists[0].attributes.CODECS)}return null},f=function(e){return void 0===e&&(e=""),a.video.test(e.trim().toLowerCase())},p=function(e){return void 0===e&&(e=""),a.audio.test(e.trim().toLowerCase())},m=function(e){return void 0===e&&(e=""),a.text.test(e.trim().toLowerCase())},g=function(e){if(e&&"string"===typeof e){var t=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),i="video";1===t.length&&p(t[0])?i="audio":1===t.length&&m(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+'"'}},v=function(e){return void 0===e&&(e=""),r.MediaSource&&r.MediaSource.isTypeSupported&&r.MediaSource.isTypeSupported(g(e))||!1},y=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}))},_="mp4a.40.2",b="avc1.4d400d";t.DEFAULT_AUDIO_CODEC=_,t.DEFAULT_VIDEO_CODEC=b,t.browserSupportsCodec=v,t.codecsFromDefault=h,t.getMimeForCodec=g,t.isAudioCodec=p,t.isTextCodec=m,t.isVideoCodec=f,t.mapLegacyAvcCodecs=c,t.muxerSupportsCodec=y,t.parseCodecs=d,t.translateLegacyCodec=u,t.translateLegacyCodecs=l},"29d8":function(e,t,i){function n(e){this.options=e||{locator:{}}}function r(e,t,i){if(!e){if(t instanceof a)return t;e=t}var n={},r=e instanceof Function;function s(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+o(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}function a(){this.cdata=!1}function s(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function o(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function u(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 l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}n.prototype.parseFromString=function(e,t){var i=this.options,n=new c,s=i.domBuilder||new a,o=i.errorHandler,u=i.locator,l=i.xmlns||{},d={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&s.setDocumentLocator(u),n.errorHandler=r(o,s,u),n.domBuilder=i.domBuilder||s,/\/x?html?$/.test(t)&&(d.nbsp=" ",d.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?n.parse(e,l,d):n.errorHandler.error("invalid doc source"),s.doc},a.prototype={startDocument:function(){this.doc=(new d).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),o=n.length;l(this,a),this.currentElement=a,this.locator&&s(this.locator,a);for(var u=0;u<o;u++){e=n.getURI(u);var c=n.getValue(u),d=(i=n.getQName(u),r.createAttributeNS(e,i));this.locator&&s(n.getLocator(u),d),d.value=d.nodeValue=c,a.setAttributeNode(d)}},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&&s(this.locator,i),l(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=u.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&&s(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=u.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&s(this.locator,n),l(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&&s(this.locator,r),l(this,r)}},warning:function(e){console.warn("[xmldom warning]\t"+e,o(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,o(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,o(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){a.prototype[e]=function(){return null}}));var c=i("d61d").XMLReader,d=t.DOMImplementation=i("749c").DOMImplementation;t.XMLSerializer=i("749c").XMLSerializer,t.DOMParser=n},"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,u=n.VTTRegion;r.shim=function(){n.VTTCue=a,n.VTTRegion=s},r.restore=function(){n.VTTCue=o,n.VTTRegion=u},n.VTTCue||r.shim()},"2d00":function(e,t,i){var n,r,a=i("da84"),s=i("342f"),o=a.process,u=o&&o.versions,l=u&&u.v8;l?(n=l.split("."),r=n[0]+n[1]):s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(r=n[1]))),e.exports=r&&+r},"2eee":function(e){e.exports=JSON.parse('{"Play":"播放","Pause":"暂停","Current Time":"当前时间","Duration":"时长","Remaining Time":"剩余时间","Stream Type":"媒体流类型","LIVE":"直播","Loaded":"加载完成","Progress":"进度","Fullscreen":"全屏","Non-Fullscreen":"退出全屏","Picture-in-Picture":"画中画","Exit Picture-in-Picture":"退出画中画","Mute":"静音","Unmute":"取消静音","Playback Rate":"播放速度","Subtitles":"字幕","subtitles off":"关闭字幕","Captions":"内嵌字幕","captions off":"关闭内嵌字幕","Chapters":"节目段落","Close Modal Dialog":"关闭弹窗","Descriptions":"描述","descriptions off":"关闭描述","Audio Track":"音轨","You aborted the media playback":"视频播放被终止","A network error caused the media download to fail part-way.":"网络错误导致视频下载中途失败。","The media could not be loaded, either because the server or network failed or because the format is not supported.":"视频因格式不支持或者服务器或网络的问题无法加载。","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。","No compatible source was found for this media.":"无法找到此视频兼容的源。","The media is encrypted and we do not have the keys to decrypt it.":"视频已加密,无法解密。","Play Video":"播放视频","Close":"关闭","Modal Window":"弹窗","This is a modal window":"这是一个弹窗","This modal can be closed by pressing the Escape key or activating the close button.":"可以按ESC按键或启用关闭按钮来关闭此弹窗。",", opens captions settings dialog":", 开启标题设置弹窗",", opens subtitles settings dialog":", 开启字幕设置弹窗",", opens descriptions settings dialog":", 开启描述设置弹窗",", selected":", 选择","captions settings":"字幕设定","Audio Player":"音频播放器","Video Player":"视频播放器","Replay":"重新播放","Progress Bar":"进度条","Volume Level":"音量","subtitles settings":"字幕设定","descriptions settings":"描述设定","Text":"文字","White":"白","Black":"黑","Red":"红","Green":"绿","Blue":"蓝","Yellow":"黄","Magenta":"紫红","Cyan":"青","Background":"背景","Window":"窗口","Transparent":"透明","Semi-Transparent":"半透明","Opaque":"不透明","Font Size":"字体尺寸","Text Edge Style":"字体边缘样式","None":"无","Raised":"浮雕","Depressed":"压低","Uniform":"均匀","Dropshadow":"下阴影","Font Family":"字体库","Proportional Sans-Serif":"比例无细体","Monospace Sans-Serif":"单间隔无细体","Proportional Serif":"比例细体","Monospace Serif":"单间隔细体","Casual":"舒适","Script":"手写体","Small Caps":"小型大写字体","Reset":"重置","restore all settings to the default values":"恢复全部设定至预设值","Done":"完成","Caption Settings Dialog":"字幕设定窗口","Beginning of dialog window. Escape will cancel and close the window.":"打开对话窗口。Escape键将取消并关闭对话窗口","End of dialog window.":"结束对话窗口","Seek to live, currently behind live":"尝试直播,当前为延时播放","Seek to live, currently playing live":"尝试直播,当前为实时播放","progress bar timing: currentTime={1} duration={2}":"{1}/{2}","{1} is loading.":"正在加载 {1}。"}')},3410:function(e,t,i){var n=i("23e7"),r=i("d039"),a=i("7b0b"),s=i("e163"),o=i("e177"),u=r((function(){s(1)}));n({target:"Object",stat:!0,forced:u,sham:!o},{getPrototypeOf:function(e){return s(a(e))}})},"342f":function(e,t,i){var n=i("d066");e.exports=n("navigator","userAgent")||""},"36c6":function(e,t){var i,n,r,a,s,o,u,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)},u=function(e,t,i){return r(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:i,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:s,videoTsToAudioTs:o,metadataTsToSeconds:u}},"36c6e":function(e,t,i){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}i("3410"),e.exports=n},"37e8":function(e,t,i){var n=i("83ab"),r=i("9bf2"),a=i("825a"),s=i("df75");e.exports=n?Object.defineProperties:function(e,t){a(e);var i,n=s(t),o=n.length,u=0;while(o>u)r.f(e,i=n[u++],t[i]);return e}},"3bbe":function(e,t,i){var n=i("861d");e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"3c96":function(e,t){function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e.exports=i},"3ca3":function(e,t,i){"use strict";var n=i("6547").charAt,r=i("69f3"),a=i("7dd0"),s="String Iterator",o=r.set,u=r.getterFor(s);a(String,"String",(function(e){o(this,{type:s,string:String(e),index:0})}),(function(){var e,t=u(this),i=t.string,r=t.index;return r>=i.length?{value:void 0,done:!0}:(e=n(i,r),t.index+=e.length,{value:e,done:!1})}))},"3f8c":function(e,t){e.exports={}},4160:function(e,t,i){"use strict";var n=i("23e7"),r=i("17c2");n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},"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},u=function(e){var t=a(e),i=4+s(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},l=function(e){var t={},i=a(e),n=4+s(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r,o,u;r=(15&e[n+1])<<8|e[n+2],o=3+r-4,u=(15&e[n+10])<<8|e[n+11];var l=12+u;while(l<o){var c=n+l;t[(31&e[c+1])<<8|e[c+2]]=e[c],l+=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}},d=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},h=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}},f=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=h(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=h(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=h(31&n[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(o=!0)),o};e.exports={parseType:o,parsePat:u,parsePmt:l,parsePayloadUnitStartIndicator:a,parsePesType:c,parsePesTime:d,videoPacketContainsKeyFrame:f}},"428f":function(e,t,i){var n=i("da84");e.exports=n},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)})),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},n.prototype.push=function(e){this.trigger("data",e)},n.prototype.flush=function(e){this.trigger("done",e)},n.prototype.partialFlush=function(e){this.trigger("partialdone",e)},n.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},n.prototype.reset=function(e){this.trigger("reset",e)},e.exports=n},"44ad":function(e,t,i){var n=i("d039"),r=i("c6b6"),a="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},"44d2":function(e,t,i){var n=i("b622"),r=i("7c73"),a=i("9bf2"),s=n("unscopables"),o=Array.prototype;void 0==o[s]&&a.f(o,s,{configurable:!0,value:r(null)}),e.exports=function(e){o[s][e]=!0}},4930:function(e,t,i){var n=i("d039");e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},"4a4b":function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(t,n)}e.exports=i},"4ae1":function(e,t,i){var n=i("23e7"),r=i("d066"),a=i("1c0b"),s=i("825a"),o=i("861d"),u=i("7c73"),l=i("0538"),c=i("d039"),d=r("Reflect","construct"),h=c((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),f=!c((function(){d((function(){}))})),p=h||f;n({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(e,t){a(e),s(t);var i=arguments.length<3?e:a(arguments[2]);if(f&&!h)return d(e,t,i);if(e==i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return n.push.apply(n,t),new(l.apply(e,n))}var r=i.prototype,c=u(o(r)?r:Object.prototype),p=Function.apply.call(e,c,t);return o(p)?p:c}})},"4bcc":function(e,t,i){},"4d64":function(e,t,i){var n=i("fc6a"),r=i("50c4"),a=i("23cb"),s=function(e){return function(t,i,s){var o,u=n(t),l=r(u.length),c=a(s,l);if(e&&i!=i){while(l>c)if(o=u[c++],o!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===i)return e||c||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},"4de4":function(e,t,i){"use strict";var n=i("23e7"),r=i("b727").filter,a=i("1dde"),s=i("ae40"),o=a("filter"),u=s("filter");n({target:"Array",proto:!0,forced:!o||!u},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},"50c4":function(e,t,i){var n=i("a691"),r=Math.min;e.exports=function(e){return e>0?r(n(e),9007199254740991):0}},5135:function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},"54f1":function(e,t,i){"use strict";i("c91b")},"55b5":function(e,t){function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}e.exports=i},5692:function(e,t,i){var n=i("c430"),r=i("c6cd");(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.2",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,t,i){var n=i("d066"),r=i("241c"),a=i("7418"),s=i("825a");e.exports=n("Reflect","ownKeys")||function(e){var t=r.f(s(e)),i=a.f;return i?t.concat(i(e)):t}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5fcf":function(e,t,i){"use strict";
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function n(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var r=n(i("d136")),a=n(i("be09")),s=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=r.buildAbsoluteURL(a.location&&a.location.href||"",e)),r.buildAbsoluteURL(e,t))};e.exports=s},"60da":function(e,t,i){"use strict";var n=i("83ab"),r=i("d039"),a=i("df75"),s=i("7418"),o=i("d1e7"),u=i("7b0b"),l=i("44ad"),c=Object.assign,d=Object.defineProperty;e.exports=!c||r((function(){if(n&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[i]||a(c({},t)).join("")!=r}))?function(e,t){var i=u(e),r=arguments.length,c=1,d=s.f,h=o.f;while(r>c){var f,p=l(arguments[c++]),m=d?a(p).concat(d(p)):a(p),g=m.length,v=0;while(g>v)f=m[v++],n&&!h.call(p,f)||(i[f]=p[f])}return i}:c},6547:function(e,t,i){var n=i("a691"),r=i("1d80"),a=function(e){return function(t,i){var a,s,o=String(r(t)),u=n(i),l=o.length;return u<0||u>=l?e?"":void 0:(a=o.charCodeAt(u),a<55296||a>56319||u+1===l||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):s-56320+(a-55296<<10)+65536)}};e.exports={codeAt:a(!1),charAt:a(!0)}},"65f0":function(e,t,i){var n=i("861d"),r=i("e8b5"),a=i("b622"),s=a("species");e.exports=function(e,t){var i;return r(e)&&(i=e.constructor,"function"!=typeof i||i!==Array&&!r(i.prototype)?n(i)&&(i=i[s],null===i&&(i=void 0)):i=void 0),new(void 0===i?Array:i)(0===t?0:t)}},"69f3":function(e,t,i){var n,r,a,s=i("7f9a"),o=i("da84"),u=i("861d"),l=i("9112"),c=i("5135"),d=i("c6cd"),h=i("f772"),f=i("d012"),p=o.WeakMap,m=function(e){return a(e)?r(e):n(e,{})},g=function(e){return function(t){var i;if(!u(t)||(i=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}};if(s){var v=d.state||(d.state=new p),y=v.get,_=v.has,b=v.set;n=function(e,t){return t.facade=e,b.call(v,e,t),t},r=function(e){return y.call(v,e)||{}},a=function(e){return _.call(v,e)}}else{var T=h("state");f[T]=!0,n=function(e,t){return t.facade=e,l(e,T,t),t},r=function(e){return c(e,T)?e[T]:{}},a=function(e){return c(e,T)}}e.exports={set:n,get:r,has:a,enforce:m,getterFor:g}},"6b58":function(e,t,i){var n=i("7037"),r=i("3c96");function a(e,t){return!t||"object"!==n(t)&&"function"!==typeof t?r(e):t}e.exports=a},"6eeb":function(e,t,i){var n=i("da84"),r=i("9112"),a=i("5135"),s=i("ce4e"),o=i("8925"),u=i("69f3"),l=u.get,c=u.enforce,d=String(String).split("String");(e.exports=function(e,t,i,o){var u,l=!!o&&!!o.unsafe,h=!!o&&!!o.enumerable,f=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||a(i,"name")||r(i,"name",t),u=c(i),u.source||(u.source=d.join("string"==typeof t?t:""))),e!==n?(l?!f&&e[t]&&(h=!0):delete e[t],h?e[t]=i:r(e,t,i)):h?e[t]=i:s(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||o(this)}))},"6f8f":function(e,t,i){function n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}i("d3b7"),i("4ae1"),i("25f0"),e.exports=n},7037:function(e,t,i){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}i("a4d3"),i("e01a"),i("d28b"),i("e260"),i("d3b7"),i("3ca3"),i("ddb0"),e.exports=n},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,i){var n=i("428f"),r=i("5135"),a=i("e538"),s=i("9bf2").f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||s(t,e,{value:a.f(e)})}},"749c":function(e,t){function i(e,t){for(var i in e)t[i]=e[i]}function n(e,t){var n=e.prototype;if(Object.create){var r=Object.create(t.prototype);n.__proto__=r}if(!(n instanceof t)){function a(){}a.prototype=t.prototype,a=new a,i(n,a),e.prototype=n=a}n.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),n.constructor=e)}var r="http://www.w3.org/1999/xhtml",a={},s=a.ELEMENT_NODE=1,o=a.ATTRIBUTE_NODE=2,u=a.TEXT_NODE=3,l=a.CDATA_SECTION_NODE=4,c=a.ENTITY_REFERENCE_NODE=5,d=a.ENTITY_NODE=6,h=a.PROCESSING_INSTRUCTION_NODE=7,f=a.COMMENT_NODE=8,p=a.DOCUMENT_NODE=9,m=a.DOCUMENT_TYPE_NODE=10,g=a.DOCUMENT_FRAGMENT_NODE=11,v=a.NOTATION_NODE=12,y={},_={},b=(y.INDEX_SIZE_ERR=(_[1]="Index size error",1),y.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),y.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),T=(y.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),y.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),y.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),y.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),y.NOT_FOUND_ERR=(_[8]="Not found",8)),S=(y.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),y.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));y.INVALID_STATE_ERR=(_[11]="Invalid state",11),y.SYNTAX_ERR=(_[12]="Syntax error",12),y.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),y.NAMESPACE_ERR=(_[14]="Invalid namespace",14),y.INVALID_ACCESS_ERR=(_[15]="Invalid access",15);function w(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,_[e]),this.message=_[e],Error.captureStackTrace&&Error.captureStackTrace(this,w);return i.code=e,t&&(this.message=this.message+": "+t),i}function E(){}function k(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);se(e,"length",n.length),i(n,e),e._inc=t}}function I(){}function A(e,t){var i=e.length;while(i--)if(e[i]===t)return i}function x(e,t,i,n){if(n?t[A(t,n)]=i:t[t.length++]=i,e){i.ownerElement=e;var r=e.ownerDocument;r&&(n&&U(r,e,n),N(r,e,i))}}function P(e,t,i){var n=A(t,i);if(!(n>=0))throw w(T,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&&(U(a,e,i),i.ownerElement=null)}}function O(e){if(this._features={},e)for(var t in e)this._features=e[t]}function L(){}function D(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function R(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(R(e,t))return!0}while(e=e.nextSibling)}function M(){}function N(e,t,i){e&&e._inc++;var n=i.namespaceURI;"http://www.w3.org/2000/xmlns/"==n&&(t._nsMap[i.prefix?i.localName:""]=i.value)}function U(e,t,i,n){e&&e._inc++;var r=i.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&delete t._nsMap[i.prefix?i.localName:""]}function B(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}}}function F(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,B(e.ownerDocument,e),t}function j(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===g){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var s=i?i.previousSibling:e.lastChild;r.previousSibling=s,a.nextSibling=i,s?s.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return B(e.ownerDocument||e,e),t.nodeType==g&&(t.firstChild=t.lastChild=null),t}function V(e,t){var i=t.parentNode;if(i){var n=e.lastChild;i.removeChild(t);n=e.lastChild}n=e.lastChild;return t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,B(e.ownerDocument,e,t),t}function H(){this._nsMap={}}function q(){}function W(){}function z(){}function G(){}function Y(){}function X(){}function K(){}function $(){}function Q(){}function J(){}function Z(){}function ee(){}function te(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 ne(this,i,e,t,s),i.join("")}function ie(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(!n&&!r)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===r||"http://www.w3.org/2000/xmlns/"==r)return!1;var a=i.length;while(a--){var s=i[a];if(s.prefix==n)return s.namespace!=r}return!0}function ne(e,t,i,n,a){if(n){if(e=n(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case s:a||(a=[]);a.length;var d=e.attributes,v=d.length,y=e.firstChild,_=e.tagName;i=r===e.namespaceURI||i,t.push("<",_);for(var b=0;b<v;b++){var T=d.item(b);"xmlns"==T.prefix?a.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&a.push({prefix:"",namespace:T.value})}for(b=0;b<v;b++){T=d.item(b);if(ie(T,i,a)){var S=T.prefix||"",w=T.namespaceURI,E=S?" xmlns:"+S:" xmlns";t.push(E,'="',w,'"'),a.push({prefix:S,namespace:w})}ne(T,t,i,n,a)}if(ie(e,i,a)){S=e.prefix||"",w=e.namespaceURI,E=S?" xmlns:"+S:" xmlns";t.push(E,'="',w,'"'),a.push({prefix:S,namespace:w})}if(y||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(_)){if(t.push(">"),i&&/^script$/i.test(_))while(y)y.data?t.push(y.data):ne(y,t,i,n,a),y=y.nextSibling;else while(y)ne(y,t,i,n,a),y=y.nextSibling;t.push("</",_,">")}else t.push("/>");return;case p:case g:y=e.firstChild;while(y)ne(y,t,i,n,a),y=y.nextSibling;return;case o:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,D),'"');case u:return t.push(e.data.replace(/[<&]/g,D));case l:return t.push("<![CDATA[",e.data,"]]>");case f:return t.push("\x3c!--",e.data,"--\x3e");case m:var k=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),k)t.push(' PUBLIC "',k),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case h:return t.push("<?",e.target," ",e.data,"?>");case c:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function re(e,t,i){var n;switch(t.nodeType){case s:n=t.cloneNode(!1),n.ownerDocument=e;case g:break;case o:i=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i){var r=t.firstChild;while(r)n.appendChild(re(e,r,i)),r=r.nextSibling}return n}function ae(e,t,i){var n=new t.constructor;for(var r in t){var a=t[r];"object"!=typeof a&&a!=n[r]&&(n[r]=a)}switch(t.childNodes&&(n.childNodes=new E),n.ownerDocument=e,n.nodeType){case s:var u=t.attributes,l=n.attributes=new I,c=u.length;l._ownerElement=n;for(var d=0;d<c;d++)n.setAttributeNode(ae(e,u.item(d),!0));break;case o:i=!0}if(i){var h=t.firstChild;while(h)n.appendChild(ae(e,h,i)),h=h.nextSibling}return n}function se(e,t,i){e[t]=i}w.prototype=Error.prototype,i(y,w),E.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)ne(this[n],i,e,t);return i.join("")}},k.prototype.item=function(e){return C(this),this[e]},n(k,E),I.prototype={length:0,item:E.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 w(S);var i=this.getNamedItem(e.nodeName);return x(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new w(S);return t=this.getNamedItemNS(e.namespaceURI,e.localName),x(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return P(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}},O.prototype={hasFeature:function(e,t){var i=this._features[e.toLowerCase()];return!(!i||t&&!(t in i))},createDocument:function(e,t,i){var n=new M;if(n.implementation=this,n.childNodes=new E,n.doctype=i,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new X;return n.name=e,n.nodeName=e,n.publicId=t,n.systemId=i,n}},L.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 j(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return F(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ae(this.ownerDocument||this,this,e)},normalize:function(){var e=this.firstChild;while(e){var t=e.nextSibling;t&&t.nodeType==u&&e.nodeType==u?(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(i[n]==e)return n;t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){var t=this;while(t){var i=t._nsMap;if(i&&e in i)return i[e];t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},i(a,L),i(a,L.prototype),M.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==g){var i=e.firstChild;while(i){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return null==this.documentElement&&e.nodeType==s&&(this.documentElement=e),j(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),F(this,e)},importNode:function(e,t){return re(this,e,t)},getElementById:function(e){var t=null;return R(this.documentElement,(function(i){if(i.nodeType==s&&i.getAttribute("id")==e)return t=i,!0})),t},createElement:function(e){var t=new H;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new E;var i=t.attributes=new I;return i._ownerElement=t,t},createDocumentFragment:function(){var e=new J;return e.ownerDocument=this,e.childNodes=new E,e},createTextNode:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new G;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new Z;return i.ownerDocument=this,i.tagName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new q;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Q;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new H,n=t.split(":"),r=i.attributes=new I;return i.childNodes=new E,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 q,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}},n(M,L),H.prototype={nodeType:s,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===g?this.insertBefore(e,null):V(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 k(this,(function(t){var i=[];return R(t,(function(n){n===t||n.nodeType!=s||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new k(this,(function(i){var n=[];return R(i,(function(r){r===i||r.nodeType!==s||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},M.prototype.getElementsByTagName=H.prototype.getElementsByTagName,M.prototype.getElementsByTagNameNS=H.prototype.getElementsByTagNameNS,n(H,L),q.prototype.nodeType=o,n(q,L),W.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(_[b])},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}},n(W,L),z.prototype={nodeName:"#text",nodeType:u,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}},n(z,W),G.prototype={nodeName:"#comment",nodeType:f},n(G,W),Y.prototype={nodeName:"#cdata-section",nodeType:l},n(Y,W),X.prototype.nodeType=m,n(X,L),K.prototype.nodeType=v,n(K,L),$.prototype.nodeType=d,n($,L),Q.prototype.nodeType=c,n(Q,L),J.prototype.nodeName="#document-fragment",J.prototype.nodeType=g,n(J,L),Z.prototype.nodeType=h,n(Z,L),ee.prototype.serializeToString=function(e,t,i){return te.call(e,t,i)},L.prototype.toString=te;try{if(Object.defineProperty){function oe(e){switch(e.nodeType){case s:case g:var t=[];e=e.firstChild;while(e)7!==e.nodeType&&8!==e.nodeType&&t.push(oe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(k.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return oe(this)},set:function(e){switch(this.nodeType){case s:case