@flowplayer/player
Version:
video player for the future
1 lines • 986 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).flowplayer=t.flowplayer||{},t.flowplayer.dash=e())}(this,function(){"use strict";function t(t){const e=function(){const t="undefined"!=typeof document&&"undefined"!=typeof window,e=t?navigator.userAgent:"",n=/iP(hone|od)/i.test(e)&&!/iPad/.test(e)&&!/IEMobile/i.test(e),o=/Android/.test(e)&&!/Firefox/.test(e),s=/^((?!chrome|android).)*safari/i.test(e),u=/chrome|crios/i.test(e)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(e),d=/firefox|fxios/i.test(e)&&!/seamonkey/i.test(e),f=/edg/i.test(e),h=/opr|opera/i.test(e),p=/SamsungBrowser/.test(e),b=p&&/SMART-TV/.test(e);return{controls:!n,video:function(e){return t&&document.createElement("video").canPlayType(e)},lang:t&&window.navigator.language,android:o,iphone:n,safari:s,edge:f,opera:h,chrome:u,firefox:d,ios:t&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:p,samsung_tv:p&&b,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}();switch(t){case"com.widevine.alpha":return e.chrome||e.firefox||e.edge||e.opera;case"org.w3.clearkey":return e.chrome||e.firefox;case"com.microsoft.playready":return e.edge}}function e(t){const{pathname:e}=function(t){const e=document.createElement("a");return e.href=t,e}(t);return e.endsWith(".mpd")}var n="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};var o=[],u=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,f=!1;function h(){f=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)o[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function p(t){return o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}function b(t,e,n){for(var o,s=[],u=e;u<n;u+=3)o=(t[u]<<16)+(t[u+1]<<8)+t[u+2],s.push(p(o));return s.join("")}function y(t){var e;f||h();for(var n=t.length,s=n%3,u="",d=[],p=16383,y=0,E=n-s;y<E;y+=p)d.push(b(t,y,y+p>E?E:y+p));return 1===s?(e=t[n-1],u+=o[e>>2],u+=o[e<<4&63],u+="=="):2===s&&(e=(t[n-2]<<8)+t[n-1],u+=o[e>>10],u+=o[e>>4&63],u+=o[e<<2&63],u+="="),d.push(u),d.join("")}function E(t,e,n,o,s){var u,d,f=8*s-o-1,h=(1<<f)-1,p=h>>1,b=-7,y=n?s-1:0,E=n?-1:1,_=t[e+y];for(y+=E,u=_&(1<<-b)-1,_>>=-b,b+=f;b>0;u=256*u+t[e+y],y+=E,b-=8);for(d=u&(1<<-b)-1,u>>=-b,b+=o;b>0;d=256*d+t[e+y],y+=E,b-=8);if(0===u)u=1-p;else{if(u===h)return d?NaN:1/0*(_?-1:1);d+=Math.pow(2,o),u-=p}return(_?-1:1)*d*Math.pow(2,u-o)}function _(t,e,n,o,s,u){var d,f,h,p=8*u-s-1,b=(1<<p)-1,y=b>>1,E=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:u-1,T=o?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,d=b):(d=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-d))<1&&(d--,h*=2),(e+=d+y>=1?E/h:E*Math.pow(2,1-y))*h>=2&&(d++,h/=2),d+y>=b?(f=0,d=b):d+y>=1?(f=(e*h-1)*Math.pow(2,s),d+=y):(f=e*Math.pow(2,y-1)*Math.pow(2,s),d=0));s>=8;t[n+_]=255&f,_+=T,f/=256,s-=8);for(d=d<<s|f,p+=s;p>0;t[n+_]=255&d,_+=T,d/=256,p-=8);t[n+_-T]|=128*v}var T={}.toString,v=Array.isArray||function(t){return"[object Array]"==T.call(t)};function S(){return k.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(t,e){if(S()<e)throw new RangeError("Invalid typed array length");return k.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=k.prototype:(null===t&&(t=new k(e)),t.length=e),t}function k(t,e,n){if(!(k.TYPED_ARRAY_SUPPORT||this instanceof k))return new k(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return N(this,t)}return A(this,t,e,n)}function A(t,e,n,o){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,o){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(o||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===o?new Uint8Array(e):void 0===o?new Uint8Array(e,n):new Uint8Array(e,n,o);k.TYPED_ARRAY_SUPPORT?(t=e).__proto__=k.prototype:t=C(t,e);return t}(t,e,n,o):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!k.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var o=0|M(e,n);t=I(t,o);var s=t.write(e,n);s!==o&&(t=t.slice(0,s));return t}(t,e,n):function(t,e){if(x(e)){var n=0|D(e.length);return 0===(t=I(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(o=e.length)!=o?I(t,0):C(t,e);if("Buffer"===e.type&&v(e.data))return C(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function R(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function N(t,e){if(R(e),t=I(t,e<0?0:0|D(e)),!k.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function C(t,e){var n=e.length<0?0:0|D(e.length);t=I(t,n);for(var o=0;o<n;o+=1)t[o]=255&e[o];return t}function D(t){if(t>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return 0|t}function x(t){return!(null==t||!t._isBuffer)}function M(t,e){if(x(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return st(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ut(t).length;default:if(o)return st(t).length;e=(""+e).toLowerCase(),o=!0}}function P(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,e,n);case"utf8":case"utf-8":return K(this,e,n);case"ascii":return $(this,e,n);case"latin1":case"binary":return X(this,e,n);case"base64":return V(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function z(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function L(t,e,n,o,s){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=s?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(s)return-1;n=t.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof e&&(e=k.from(e,o)),x(e))return 0===e.length?-1:F(t,e,n,o,s);if("number"==typeof e)return e&=255,k.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):F(t,[e],n,o,s);throw new TypeError("val must be string, number or Buffer")}function F(t,e,n,o,s){var u,d=1,f=t.length,h=e.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;d=2,f/=2,h/=2,n/=2}function p(t,e){return 1===d?t[e]:t.readUInt16BE(e*d)}if(s){var b=-1;for(u=n;u<f;u++)if(p(t,u)===p(e,-1===b?0:u-b)){if(-1===b&&(b=u),u-b+1===h)return b*d}else-1!==b&&(u-=u-b),b=-1}else for(n+h>f&&(n=f-h),u=n;u>=0;u--){for(var y=!0,E=0;E<h;E++)if(p(t,u+E)!==p(e,E)){y=!1;break}if(y)return u}return-1}function U(t,e,n,o){n=Number(n)||0;var s=t.length-n;o?(o=Number(o))>s&&(o=s):o=s;var u=e.length;if(u%2!=0)throw new TypeError("Invalid hex string");o>u/2&&(o=u/2);for(var d=0;d<o;++d){var f=parseInt(e.substr(2*d,2),16);if(isNaN(f))return d;t[n+d]=f}return d}function j(t,e,n,o){return dt(st(e,t.length-n),t,n,o)}function B(t,e,n,o){return dt(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,o)}function q(t,e,n,o){return B(t,e,n,o)}function G(t,e,n,o){return dt(ut(e),t,n,o)}function H(t,e,n,o){return dt(function(t,e){for(var n,o,s,u=[],d=0;d<t.length&&!((e-=2)<0);++d)o=(n=t.charCodeAt(d))>>8,s=n%256,u.push(s),u.push(o);return u}(e,t.length-n),t,n,o)}function V(t,e,n){return 0===e&&n===t.length?y(t):y(t.slice(e,n))}function K(t,e,n){n=Math.min(t.length,n);for(var o=[],s=e;s<n;){var u,d,f,h,p=t[s],b=null,y=p>239?4:p>223?3:p>191?2:1;if(s+y<=n)switch(y){case 1:p<128&&(b=p);break;case 2:128==(192&(u=t[s+1]))&&(h=(31&p)<<6|63&u)>127&&(b=h);break;case 3:u=t[s+1],d=t[s+2],128==(192&u)&&128==(192&d)&&(h=(15&p)<<12|(63&u)<<6|63&d)>2047&&(h<55296||h>57343)&&(b=h);break;case 4:u=t[s+1],d=t[s+2],f=t[s+3],128==(192&u)&&128==(192&d)&&128==(192&f)&&(h=(15&p)<<18|(63&u)<<12|(63&d)<<6|63&f)>65535&&h<1114112&&(b=h)}null===b?(b=65533,y=1):b>65535&&(b-=65536,o.push(b>>>10&1023|55296),b=56320|1023&b),o.push(b),s+=y}return function(t){var e=t.length;if(e<=W)return String.fromCharCode.apply(String,t);var n="",o=0;for(;o<e;)n+=String.fromCharCode.apply(String,t.slice(o,o+=W));return n}(o)}k.TYPED_ARRAY_SUPPORT=void 0===n.TYPED_ARRAY_SUPPORT||n.TYPED_ARRAY_SUPPORT,S(),k.poolSize=8192,k._augment=function(t){return t.__proto__=k.prototype,t},k.from=function(t,e,n){return A(null,t,e,n)},k.TYPED_ARRAY_SUPPORT&&(k.prototype.__proto__=Uint8Array.prototype,k.__proto__=Uint8Array),k.alloc=function(t,e,n){return function(t,e,n,o){return R(e),e<=0?I(t,e):void 0!==n?"string"==typeof o?I(t,e).fill(n,o):I(t,e).fill(n):I(t,e)}(null,t,e,n)},k.allocUnsafe=function(t){return N(null,t)},k.allocUnsafeSlow=function(t){return N(null,t)},k.isBuffer=function(t){return null!=t&&(!!t._isBuffer||ct(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&ct(t.slice(0,0))}(t))},k.compare=function(t,e){if(!x(t)||!x(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,o=e.length,s=0,u=Math.min(n,o);s<u;++s)if(t[s]!==e[s]){n=t[s],o=e[s];break}return n<o?-1:o<n?1:0},k.isEncoding=function(t){switch(String(t).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}},k.concat=function(t,e){if(!v(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return k.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=k.allocUnsafe(e),s=0;for(n=0;n<t.length;++n){var u=t[n];if(!x(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,s),s+=u.length}return o},k.byteLength=M,k.prototype._isBuffer=!0,k.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)z(this,e,e+1);return this},k.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)z(this,e,e+3),z(this,e+1,e+2);return this},k.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)z(this,e,e+7),z(this,e+1,e+6),z(this,e+2,e+5),z(this,e+3,e+4);return this},k.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?K(this,0,t):P.apply(this,arguments)},k.prototype.equals=function(t){if(!x(t))throw new TypeError("Argument must be a Buffer");return this===t||0===k.compare(this,t)},k.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},k.prototype.compare=function(t,e,n,o,s){if(!x(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===s&&(s=this.length),e<0||n>t.length||o<0||s>this.length)throw new RangeError("out of range index");if(o>=s&&e>=n)return 0;if(o>=s)return-1;if(e>=n)return 1;if(this===t)return 0;for(var u=(s>>>=0)-(o>>>=0),d=(n>>>=0)-(e>>>=0),f=Math.min(u,d),h=this.slice(o,s),p=t.slice(e,n),b=0;b<f;++b)if(h[b]!==p[b]){u=h[b],d=p[b];break}return u<d?-1:d<u?1:0},k.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},k.prototype.indexOf=function(t,e,n){return L(this,t,e,n,!0)},k.prototype.lastIndexOf=function(t,e,n){return L(this,t,e,n,!1)},k.prototype.write=function(t,e,n,o){if(void 0===e)o="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)o=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return U(this,t,e,n);case"utf8":case"utf-8":return j(this,t,e,n);case"ascii":return B(this,t,e,n);case"latin1":case"binary":return q(this,t,e,n);case"base64":return G(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;function $(t,e,n){var o="";n=Math.min(t.length,n);for(var s=e;s<n;++s)o+=String.fromCharCode(127&t[s]);return o}function X(t,e,n){var o="";n=Math.min(t.length,n);for(var s=e;s<n;++s)o+=String.fromCharCode(t[s]);return o}function Q(t,e,n){var o=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>o)&&(n=o);for(var s="",u=e;u<n;++u)s+=lt(t[u]);return s}function Z(t,e,n){for(var o=t.slice(e,n),s="",u=0;u<o.length;u+=2)s+=String.fromCharCode(o[u]+256*o[u+1]);return s}function J(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function tt(t,e,n,o,s,u){if(!x(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||e<u)throw new RangeError('"value" argument is out of bounds');if(n+o>t.length)throw new RangeError("Index out of range")}function et(t,e,n,o){e<0&&(e=65535+e+1);for(var s=0,u=Math.min(t.length-n,2);s<u;++s)t[n+s]=(e&255<<8*(o?s:1-s))>>>8*(o?s:1-s)}function nt(t,e,n,o){e<0&&(e=4294967295+e+1);for(var s=0,u=Math.min(t.length-n,4);s<u;++s)t[n+s]=e>>>8*(o?s:3-s)&255}function at(t,e,n,o,s,u){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function rt(t,e,n,o,s){return s||at(t,0,n,4),_(t,e,n,o,23,4),n+4}function it(t,e,n,o,s){return s||at(t,0,n,8),_(t,e,n,o,52,8),n+8}k.prototype.slice=function(t,e){var n,o=this.length;if((t=~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),(e=void 0===e?o:~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),e<t&&(e=t),k.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=k.prototype;else{var s=e-t;n=new k(s,void 0);for(var u=0;u<s;++u)n[u]=this[u+t]}return n},k.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||J(t,e,this.length);for(var o=this[t],s=1,u=0;++u<e&&(s*=256);)o+=this[t+u]*s;return o},k.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||J(t,e,this.length);for(var o=this[t+--e],s=1;e>0&&(s*=256);)o+=this[t+--e]*s;return o},k.prototype.readUInt8=function(t,e){return e||J(t,1,this.length),this[t]},k.prototype.readUInt16LE=function(t,e){return e||J(t,2,this.length),this[t]|this[t+1]<<8},k.prototype.readUInt16BE=function(t,e){return e||J(t,2,this.length),this[t]<<8|this[t+1]},k.prototype.readUInt32LE=function(t,e){return e||J(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},k.prototype.readUInt32BE=function(t,e){return e||J(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},k.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||J(t,e,this.length);for(var o=this[t],s=1,u=0;++u<e&&(s*=256);)o+=this[t+u]*s;return o>=(s*=128)&&(o-=Math.pow(2,8*e)),o},k.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||J(t,e,this.length);for(var o=e,s=1,u=this[t+--o];o>0&&(s*=256);)u+=this[t+--o]*s;return u>=(s*=128)&&(u-=Math.pow(2,8*e)),u},k.prototype.readInt8=function(t,e){return e||J(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},k.prototype.readInt16LE=function(t,e){e||J(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},k.prototype.readInt16BE=function(t,e){e||J(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},k.prototype.readInt32LE=function(t,e){return e||J(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},k.prototype.readInt32BE=function(t,e){return e||J(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},k.prototype.readFloatLE=function(t,e){return e||J(t,4,this.length),E(this,t,!0,23,4)},k.prototype.readFloatBE=function(t,e){return e||J(t,4,this.length),E(this,t,!1,23,4)},k.prototype.readDoubleLE=function(t,e){return e||J(t,8,this.length),E(this,t,!0,52,8)},k.prototype.readDoubleBE=function(t,e){return e||J(t,8,this.length),E(this,t,!1,52,8)},k.prototype.writeUIntLE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||tt(this,t,e,n,Math.pow(2,8*n)-1,0);var s=1,u=0;for(this[e]=255&t;++u<n&&(s*=256);)this[e+u]=t/s&255;return e+n},k.prototype.writeUIntBE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||tt(this,t,e,n,Math.pow(2,8*n)-1,0);var s=n-1,u=1;for(this[e+s]=255&t;--s>=0&&(u*=256);)this[e+s]=t/u&255;return e+n},k.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,1,255,0),k.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},k.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,2,65535,0),k.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):et(this,t,e,!0),e+2},k.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,2,65535,0),k.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):et(this,t,e,!1),e+2},k.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,4,4294967295,0),k.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):nt(this,t,e,!0),e+4},k.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,4,4294967295,0),k.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},k.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var s=Math.pow(2,8*n-1);tt(this,t,e,n,s-1,-s)}var u=0,d=1,f=0;for(this[e]=255&t;++u<n&&(d*=256);)t<0&&0===f&&0!==this[e+u-1]&&(f=1),this[e+u]=(t/d|0)-f&255;return e+n},k.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var s=Math.pow(2,8*n-1);tt(this,t,e,n,s-1,-s)}var u=n-1,d=1,f=0;for(this[e+u]=255&t;--u>=0&&(d*=256);)t<0&&0===f&&0!==this[e+u+1]&&(f=1),this[e+u]=(t/d|0)-f&255;return e+n},k.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,1,127,-128),k.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},k.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,2,32767,-32768),k.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):et(this,t,e,!0),e+2},k.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,2,32767,-32768),k.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):et(this,t,e,!1),e+2},k.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,4,2147483647,-2147483648),k.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):nt(this,t,e,!0),e+4},k.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||tt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),k.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},k.prototype.writeFloatLE=function(t,e,n){return rt(this,t,e,!0,n)},k.prototype.writeFloatBE=function(t,e,n){return rt(this,t,e,!1,n)},k.prototype.writeDoubleLE=function(t,e,n){return it(this,t,e,!0,n)},k.prototype.writeDoubleBE=function(t,e,n){return it(this,t,e,!1,n)},k.prototype.copy=function(t,e,n,o){if(n||(n=0),o||0===o||(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e<o-n&&(o=t.length-e+n);var s,u=o-n;if(this===t&&n<e&&e<o)for(s=u-1;s>=0;--s)t[s+e]=this[s+n];else if(u<1e3||!k.TYPED_ARRAY_SUPPORT)for(s=0;s<u;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+u),e);return u},k.prototype.fill=function(t,e,n,o){if("string"==typeof t){if("string"==typeof e?(o=e,e=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===t.length){var s=t.charCodeAt(0);s<256&&(t=s)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!k.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var u;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(u=e;u<n;++u)this[u]=t;else{var d=x(t)?t:st(new k(t,o).toString()),f=d.length;for(u=0;u<n-e;++u)this[u+e]=d[u%f]}return this};var ot=/[^+\/0-9A-Za-z-_]/g;function lt(t){return t<16?"0"+t.toString(16):t.toString(16)}function st(t,e){var n;e=e||1/0;for(var o=t.length,s=null,u=[],d=0;d<o;++d){if((n=t.charCodeAt(d))>55295&&n<57344){if(!s){if(n>56319){(e-=3)>-1&&u.push(239,191,189);continue}if(d+1===o){(e-=3)>-1&&u.push(239,191,189);continue}s=n;continue}if(n<56320){(e-=3)>-1&&u.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(e-=3)>-1&&u.push(239,191,189);if(s=null,n<128){if((e-=1)<0)break;u.push(n)}else if(n<2048){if((e-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function ut(t){return function(t){var e,n,o,s,p,b;f||h();var y=t.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");p="="===t[y-2]?2:"="===t[y-1]?1:0,b=new d(3*y/4-p),o=p>0?y-4:y;var E=0;for(e=0,n=0;e<o;e+=4,n+=3)s=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],b[E++]=s>>16&255,b[E++]=s>>8&255,b[E++]=255&s;return 2===p?(s=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,b[E++]=255&s):1===p&&(s=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,b[E++]=s>>8&255,b[E++]=255&s),b}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ot,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function dt(t,e,n,o){for(var s=0;s<o&&!(s+n>=e.length||s>=t.length);++s)e[s+n]=t[s];return s}function ct(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function ft(){throw new Error("setTimeout has not been defined")}function gt(){throw new Error("clearTimeout has not been defined")}var mt=ft,ht=gt;function pt(t){if(mt===setTimeout)return setTimeout(t,0);if((mt===ft||!mt)&&setTimeout)return mt=setTimeout,setTimeout(t,0);try{return mt(t,0)}catch(e){try{return mt.call(null,t,0)}catch(e){return mt.call(this,t,0)}}}"function"==typeof n.setTimeout&&(mt=setTimeout),"function"==typeof n.clearTimeout&&(ht=clearTimeout);var bt,yt=[],Et=!1,_t=-1;function Tt(){Et&&bt&&(Et=!1,bt.length?yt=bt.concat(yt):_t=-1,yt.length&&vt())}function vt(){if(!Et){var t=pt(Tt);Et=!0;for(var e=yt.length;e;){for(bt=yt,yt=[];++_t<e;)bt&&bt[_t].run();_t=-1,e=yt.length}bt=null,Et=!1,function(t){if(ht===clearTimeout)return clearTimeout(t);if((ht===gt||!ht)&&clearTimeout)return ht=clearTimeout,clearTimeout(t);try{return ht(t)}catch(e){try{return ht.call(null,t)}catch(e){return ht.call(this,t)}}}(t)}}function wt(t,e){this.fun=t,this.array=e}wt.prototype.run=function(){this.fun.apply(null,this.array)};function St(){}var At=St,Rt=St,Nt=St,Ct=St,Dt=St,xt=St,Mt=St;var Pt=n.performance||{},Ot=Pt.now||Pt.mozNow||Pt.msNow||Pt.oNow||Pt.webkitNow||function(){return(new Date).getTime()};var zt=new Date;var Lt={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];yt.push(new wt(t,e)),1!==yt.length||Et||pt(vt)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:At,addListener:Rt,once:Nt,off:Ct,removeListener:Dt,removeAllListeners:xt,emit:Mt,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*Ot.call(Pt),n=Math.floor(e),o=Math.floor(e%1*1e9);return t&&(n-=t[0],(o-=t[1])<0&&(n--,o+=1e9)),[n,o]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-zt)/1e3}},Ft={7267:function(t,e){e.byteLength=function(t){var e=f(t),n=e[0],o=e[1];return 3*(n+o)/4-o},e.toByteArray=function(t){var e,n,u=f(t),d=u[0],h=u[1],p=new s(function(t,e,n){return 3*(e+n)/4-n}(0,d,h)),b=0,y=h>0?d-4:d;for(n=0;n<y;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],p[b++]=e>>16&255,p[b++]=e>>8&255,p[b++]=255&e;return 2===h&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,p[b++]=255&e),1===h&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,p[b++]=e>>8&255,p[b++]=255&e),p},e.fromByteArray=function(t){for(var e,o=t.length,s=o%3,u=[],d=16383,f=0,p=o-s;f<p;f+=d)u.push(h(t,f,f+d>p?p:f+d));return 1===s?(e=t[o-1],u.push(n[e>>2]+n[e<<4&63]+"==")):2===s&&(e=(t[o-2]<<8)+t[o-1],u.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),u.join("")};for(var n=[],o=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0;d<64;++d)n[d]=u[d],o[u.charCodeAt(d)]=d;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function h(t,e,o){for(var s,u,d=[],f=e;f<o;f+=3)s=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(255&t[f+2]),d.push(n[(u=s)>>18&63]+n[u>>12&63]+n[u>>6&63]+n[63&u]);return d.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},44:function(t,e,n){var o=n(7267),s=n(7986),u="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},e.INSPECT_MAX_BYTES=50;var d=2147483647;function f(t){if(t>d)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return y(t)}return p(t,e,n)}function p(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|v(t,e),o=f(n),s=o.write(t,e);return s!==n&&(o=o.slice(0,s)),o}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){var e=new Uint8Array(t);return _(e.buffer,e.byteOffset,e.byteLength)}return E(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return _(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return _(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=t.valueOf&&t.valueOf();if(null!=o&&o!==t)return h.from(o,e,n);var s=function(t){if(h.isBuffer(t)){var e=0|T(t.length),n=f(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?f(0):E(t):"Buffer"===t.type&&Array.isArray(t.data)?E(t.data):void 0}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function b(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function y(t){return b(t),f(t<0?0:0|T(t))}function E(t){for(var e=t.length<0?0:0|T(t.length),n=f(e),o=0;o<e;o+=1)n[o]=255&t[o];return n}function _(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var o;return o=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(o,h.prototype),o}function T(t){if(t>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|t}function v(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var s=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(t).length;default:if(s)return o?-1:W(t).length;e=(""+e).toLowerCase(),s=!0}}function S(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return L(this,e,n);case"latin1":case"binary":return F(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function I(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function k(t,e,n,o,s){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=s?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(s)return-1;n=t.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof e&&(e=h.from(e,o)),h.isBuffer(e))return 0===e.length?-1:A(t,e,n,o,s);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):A(t,[e],n,o,s);throw new TypeError("val must be string, number or Buffer")}function A(t,e,n,o,s){var u,d=1,f=t.length,h=e.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;d=2,f/=2,h/=2,n/=2}function p(t,e){return 1===d?t[e]:t.readUInt16BE(e*d)}if(s){var b=-1;for(u=n;u<f;u++)if(p(t,u)===p(e,-1===b?0:u-b)){if(-1===b&&(b=u),u-b+1===h)return b*d}else-1!==b&&(u-=u-b),b=-1}else for(n+h>f&&(n=f-h),u=n;u>=0;u--){for(var y=!0,E=0;E<h;E++)if(p(t,u+E)!==p(e,E)){y=!1;break}if(y)return u}return-1}function R(t,e,n,o){n=Number(n)||0;var s=t.length-n;o?(o=Number(o))>s&&(o=s):o=s;var u=e.length;o>u/2&&(o=u/2);for(var d=0;d<o;++d){var f=parseInt(e.substr(2*d,2),16);if(Z(f))return d;t[n+d]=f}return d}function N(t,e,n,o){return X(W(e,t.length-n),t,n,o)}function C(t,e,n,o){return X(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,o)}function D(t,e,n,o){return X($(e),t,n,o)}function x(t,e,n,o){return X(function(t,e){for(var n,o,s,u=[],d=0;d<t.length&&!((e-=2)<0);++d)o=(n=t.charCodeAt(d))>>8,s=n%256,u.push(s),u.push(o);return u}(e,t.length-n),t,n,o)}function M(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var o=[],s=e;s<n;){var u,d,f,h,p=t[s],b=null,y=p>239?4:p>223?3:p>191?2:1;if(s+y<=n)switch(y){case 1:p<128&&(b=p);break;case 2:128==(192&(u=t[s+1]))&&(h=(31&p)<<6|63&u)>127&&(b=h);break;case 3:u=t[s+1],d=t[s+2],128==(192&u)&&128==(192&d)&&(h=(15&p)<<12|(63&u)<<6|63&d)>2047&&(h<55296||h>57343)&&(b=h);break;case 4:u=t[s+1],d=t[s+2],f=t[s+3],128==(192&u)&&128==(192&d)&&128==(192&f)&&(h=(15&p)<<18|(63&u)<<12|(63&d)<<6|63&f)>65535&&h<1114112&&(b=h)}null===b?(b=65533,y=1):b>65535&&(b-=65536,o.push(b>>>10&1023|55296),b=56320|1023&b),o.push(b),s+=y}return function(t){var e=t.length;if(e<=z)return String.fromCharCode.apply(String,t);for(var n="",o=0;o<e;)n+=String.fromCharCode.apply(String,t.slice(o,o+=z));return n}(o)}e.kMaxLength=d,h.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,n){return p(t,e,n)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,n){return function(t,e,n){return b(t),t<=0?f(t):void 0!==e?"string"==typeof n?f(t).fill(e,n):f(t).fill(e):f(t)}(t,e,n)},h.allocUnsafe=function(t){return y(t)},h.allocUnsafeSlow=function(t){return y(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(Q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),Q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,o=e.length,s=0,u=Math.min(n,o);s<u;++s)if(t[s]!==e[s]){n=t[s],o=e[s];break}return n<o?-1:o<n?1:0},h.isEncoding=function(t){switch(String(t).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}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=h.allocUnsafe(e),s=0;for(n=0;n<t.length;++n){var u=t[n];if(Q(u,Uint8Array))s+u.length>o.length?h.from(u).copy(o,s):Uint8Array.prototype.set.call(o,u,s);else{if(!h.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,s)}s+=u.length}return o},h.byteLength=v,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)I(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)I(this,e,e+3),I(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)I(this,e,e+7),I(this,e+1,e+6),I(this,e+2,e+5),I(this,e+3,e+4);return this},h.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?P(this,0,t):S.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},u&&(h.prototype[u]=h.prototype.inspect),h.prototype.compare=function(t,e,n,o,s){if(Q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===s&&(s=this.length),e<0||n>t.length||o<0||s>this.length)throw new RangeError("out of range index");if(o>=s&&e>=n)return 0;if(o>=s)return-1;if(e>=n)return 1;if(this===t)return 0;for(var u=(s>>>=0)-(o>>>=0),d=(n>>>=0)-(e>>>=0),f=Math.min(u,d),p=this.slice(o,s),b=t.slice(e,n),y=0;y<f;++y)if(p[y]!==b[y]){u=p[y],d=b[y];break}return u<d?-1:d<u?1:0},h.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},h.prototype.indexOf=function(t,e,n){return k(this,t,e,n,!0)},h.prototype.lastIndexOf=function(t,e,n){return k(this,t,e,n,!1)},h.prototype.write=function(t,e,n,o){if(void 0===e)o="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)o=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return R(this,t,e,n);case"utf8":case"utf-8":return N(this,t,e,n);case"ascii":case"latin1":case"binary":return C(this,t,e,n);case"base64":return D(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var z=4096;function L(t,e,n){var o="";n=Math.min(t.length,n);for(var s=e;s<n;++s)o+=String.fromCharCode(127&t[s]);return o}function F(t,e,n){var o="";n=Math.min(t.length,n);for(var s=e;s<n;++s)o+=String.fromCharCode(t[s]);return o}function U(t,e,n){var o=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>o)&&(n=o);for(var s="",u=e;u<n;++u)s+=J[t[u]];return s}function j(t,e,n){for(var o=t.slice(e,n),s="",u=0;u<o.length-1;u+=2)s+=String.fromCharCode(o[u]+256*o[u+1]);return s}function B(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,n,o,s,u){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||e<u)throw new RangeError('"value" argument is out of bounds');if(n+o>t.length)throw new RangeError("Index out of range")}function G(t,e,n,o,s,u){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(t,e,n,o,u){return e=+e,n>>>=0,u||G(t,0,n,4),s.write(t,e,n,o,23,4),n+4}function V(t,e,n,o,u){return e=+e,n>>>=0,u||G(t,0,n,8),s.write(t,e,n,o,52,8),n+8}h.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var o=this.subarray(t,e);return Object.setPrototypeOf(o,h.prototype),o},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);for(var o=this[t],s=1,u=0;++u<e&&(s*=256);)o+=this[t+u]*s;return o},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);for(var o=this[t+--e],s=1;e>0&&(s*=256);)o+=this[t+--e]*s;return o},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);for(var o=this[t],s=1,u=0;++u<e&&(s*=256);)o+=this[t+u]*s;return o>=(s*=128)&&(o-=Math.pow(2,8*e)),o},h.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);for(var o=e,s=1,u=this[t+--o];o>0&&(s*=256);)u+=this[t+--o]*s;return u>=(s*=128)&&(u-=Math.pow(2,8*e)),u},h.prototype.readInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||B(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,e){t>>>=0,e||B(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||B(t,4,this.length),s.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),s.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),s.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(t,8,this.length),s.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,n,o){t=+t,e>>>=0,n>>>=0,o||q(this,t,e,n,Math.pow(2,8*n)-1,0);var s=1,u=0;for(this[e]=255&t;++u<n&&(s*=256);)this[e+u]=t/s&255;return e+n},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,n,o){t=+t,e>>>=0,n>>>=0,o||q(this,t,e,n,Math.pow(2,8*n)-1,0);var s=n-1,u=1;for(this[e+s]=255&t;--s>=0&&(u*=256);)this[e+s]=t/u&255;return e+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e>>>=0,!o){var s=Math.pow(2,8*n-1);q(this,t,e,n,s-1,-s)}var u=0,d=1,f=0;for(this[e]=255&t;++u<n&&(d*=256);)t<0&&0===f&&0!==this[e+u-1]&&(f=1),this[e+u]=(t/d|0)-f&255;return e+n},h.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e>>>=0,!o){var s=Math.pow(2,8*n-1);q(this,t,e,n,s-1,-s)}var u=n-1,d=1,f=0;for(this[e+u]=255&t;--u>=0&&(d*=256);)t<0&&0===f&&0!==this[e+u+1]&&(f=1),this[e+u]=(t/d|0)-f&255;return e+n},h.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeFloatLE=function(t,e,n){return H(this,t,e,!0,n)},h.prototype.writeFloatBE=function(t,e,n){return H(this,t,e,!1,n)},h.prototype.writeDoubleLE=function(t,e,n){return V(this,t,e,!0,n)},h.prototype.writeDoubleBE=function(t,e,n){return V(this,t,e,!1,n)},h.prototype.copy=function(t,e,n,o){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e<o-n&&(o=t.length-e+n);var s=o-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,o):Uint8Array.prototype.set.call(t,this.subarray(n,o),e),s},h.prototype.fill=function(t,e,n,o){if("string"==typeof t){if("string"==typeof e?(o=e,e=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!h.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===t.length){var s=t.charCodeAt(0);("utf8"===o&&s<128||"latin1"===o)&&(t=s)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var u;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(u=e;u<n;++u)this[u]=t;else{var d=h.isBuffer(t)?t:h.from(t,o),f=d.length;if(0===f)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(u=0;u<n-e;++u)this[u+e]=d[u%f]}return this};var K=/[^+/0-9A-Za-z-_]/g;function W(t,e){var n;e=e||1/0;for(var o=t.length,s=null,u=[],d=0;d<o;++d){if((n=t.charCodeAt(d))>55295&&n<57344){if(!s){if(n>56319){(e-=3)>-1&&u.push(239,191,189);continue}if(d+1===o){(e-=3)>-1&&u.push(239,191,189);continue}s=n;continue}if(n<56320){(e-=3)>-1&&u.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(e-=3)>-1&&u.push(239,191,189);if(s=null,n<128){if((e-=1)<0)break;u.push(n)}else if(n<2048){if((e-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function $(t){return o.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function X(t,e,n,o){for(var s=0;s<o&&!(s+n>=e.length||s>=t.length);++s)e[s+n]=t[s];return s}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}var J=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var o=16*n,s=0;s<16;++s)e[o+s]=t[n]+t[s];return e}()},6877:function(t,e){var n={parseBuffer:function(t){return new o(t).parse()},addBoxProcessor:function(t,e){"string"==typeof t&&"function"==typeof e&&(s.prototype._boxProcessors[t]=e)},createFile:function(){return new o},createBox:function(t,e,n){var o=s.create(t);return e&&e.append(o,n),o},createFullBox:function(t,e,o){var s=n.createBox(t,e,o);return s.version=0,s.flags=0,s},Utils:{}};n.Utils.dataViewToString=function(t,e){var n=e||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(t);var o=[],s=0;if("utf-8"===n)for(;s<t.byteLength;){var u=t.getUint8(s++);u<128||(u<224?(u=(31&u)<<6,u|=63&t.getUint8(s++)):u<240?(u=(15&u)<<12,u|=(63&t.getUint8(s++))<<6,u|=63&t.getUint8(s++)):(u=(7&u)<<18,u|=(63&t.getUint8(s++))<<12,u|=(63&t.getUint8(s++))<<6,u|=63&t.getUint8(s++))),o.push(String.fromCharCode(u))}else for(;s<t.byteLength;)o.push(String.fromCharCode(t.getUint8(s++)));return o.join("")},n.Utils.utf8ToByteArray=function(t){var e,n;if("undefined"!=typeof TextEncoder)e=(new TextEncoder).encode(t);else for(e=[],n=0;n<t.length;++n){var o=t.charCodeAt(n);o<128?e.push(o):o<2048?(e.push(192|o>>6),e.push(128|63&o)):o<65536?(e.push(224|o>>12),e.push(128|63&o>>6),e.push(128|63&o)):(e.push(240|o>>18),e.push(128|63&o>>12),e.push(128|63&o>>6),e.push(128|63&o))}return e},n.Utils.appendBox=function(t,e,n){if(e._offset=t._cursor.offset,e._root=t._root?t._root:t,e._raw=t._raw,e._parent=t,-1!==n)if(null!=n){var o,s=-1;if("number"==typeof n)s=n;else{if("string"==typeof n)o=n;else{if("object"!=typeof n||!n.type)return void t.boxes.push(e);o=n.type}for(var u=0;u<t.boxes.length;u++)if(o===t.boxes[u].type){s=u+1;break}}t.boxes.splice(s,0,e)}else t.boxes.push(e)},e.parseBuffer=n.parseBuffer,e.addBoxProcessor=n.addBoxProcessor,e.createFile=n.createFile,e.createBox=n.createBox,e.createFullBox=n.createFullBox,e.Utils=n.Utils,n.Cursor=function(t){this.offset=void 0===t?0:t};var o=function(t){this._cursor=new n.Cursor,this.boxes=[],t&&(this._raw=new DataView(t))};o.prototype.fetch=function(t){var e=this.fetchAll(t,!0);return e.length?e[0]:null},o.prototype.fetchAll=function(t,e){var n=[];return o._sweep.call(this,t,n,e),n},o.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var t=s.parse(this);if(void 0===t.type)break;this.boxes.push(t)}return this},o._sweep=function(t,e,n){for(var s in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&n)return;o._sweep.call(this.boxes[s],t,e,n)}},o.prototype.write=function(){var t,e=0;for(t=0;t<this.boxes.length;t++)e+=this.boxes[t].getLength(!1);var n=new Uint8Array(e);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,t=0;t<this.boxes.length;t++)this.boxes[t].write();return n.buffer},o.prototype.append=f